getProperties();
+
+ /**
+ * Exit the terminal.
+ * @param done - call back interface called when operation is completed.
+ * @return pending command handle, can be used to cancel the command.
+ */
+ IToken exit(DoneCommand done);
+ }
+
+ interface DoneCommand {
+ void doneCommand(IToken token, Exception error);
+ }
+ /**
+ * Launch a new terminal toremote machine.
+ * @param type - requested terminal type for the new terminal.
+ * @param encoding - requested encoding for the new terminal.
+ * @param environment - Array of environment variable strings.
+ * if null then default set of environment variables will be used.
+ * @param done - call back interface called when operation is completed.
+ * @return pending command handle, can be used to cancel the command.
+ */
+ IToken launch(String type, String encoding, String[] environment,
+ DoneLaunch done);
+
+ /**
+ * Call-back interface to be called when "start" command is complete.
+ */
+ interface DoneLaunch {
+ void doneLaunch(IToken token, Exception error, TerminalContext terminal);
+ }
+
+
+ /**
+ * Set the terminal widows size
+ * @param context_id - context ID.
+ * @param signal - signal code.
+ * @param done - call back interface called when operation is completed.
+ * @return pending command handle, can be used to cancel the command.
+ */
+ IToken setWinSize(String context_id, int newWidth, int newHeight, DoneCommand done);
+
+ /**
+ * Add terminals service event listener.
+ * @param listener - event listener implementation.
+ */
+ void addListener(TerminalsListener listener);
+
+ /**
+ * Remove terminals service event listener.
+ * @param listener - event listener implementation.
+ */
+ void removeListener(TerminalsListener listener);
+
+ /**
+ * Process event listener is notified when a terminal exits.
+ * Event are reported only for terminals that were started by 'launch' command.
+ */
+ interface TerminalsListener {
+
+ /**
+ * Called when a terminal exits.
+ * @param terminal_id - terminal context ID
+ * @param exit_code - terminal exit code
+ */
+ void exited(String terminal_id, int exit_code);
+
+ /**
+ * Called when a terminal exits.
+ * @param terminal_id - terminal context ID
+ * @param newWidth – new terminal width
+ * @param newHeight – new terminal height
+ */
+ void winSizeChanged (String terminal_id, int newWidth, int newHeight);
+ }
+}
Index: plugins/org.eclipse.tm.tcf.terminals/src/org/eclipse/tm/internal/tcf/terminals/Activator.java
===================================================================
--- plugins/org.eclipse.tm.tcf.terminals/src/org/eclipse/tm/internal/tcf/terminals/Activator.java (revision 0)
+++ plugins/org.eclipse.tm.tcf.terminals/src/org/eclipse/tm/internal/tcf/terminals/Activator.java (revision 0)
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Intel Corporation. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Intel - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.tm.internal.tcf.terminals;
+
+import org.eclipse.core.runtime.Plugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends Plugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.tm.tcf.terminals";
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
Index: plugins/org.eclipse.tm.tcf.terminals/plugin.properties
===================================================================
--- plugins/org.eclipse.tm.tcf.terminals/plugin.properties (revision 0)
+++ plugins/org.eclipse.tm.tcf.terminals/plugin.properties (revision 0)
@@ -0,0 +1,13 @@
+###############################################################################
+# Copyright (c) 2010 Intel, Inc. and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Intel - initial implementation
+###############################################################################
+pluginName = TCF Terminals service (Incubation)
+providerName = Eclipse.org
+
Index: plugins/org.eclipse.tm.tcf.terminals/build.properties
===================================================================
--- plugins/org.eclipse.tm.tcf.terminals/build.properties (revision 0)
+++ plugins/org.eclipse.tm.tcf.terminals/build.properties (revision 0)
@@ -0,0 +1,8 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ about.html,\
+ plugin.properties
+src.includes = about.html
Index: plugins/org.eclipse.tm.tcf.terminals/plugin.xml
===================================================================
--- plugins/org.eclipse.tm.tcf.terminals/plugin.xml (revision 0)
+++ plugins/org.eclipse.tm.tcf.terminals/plugin.xml (revision 0)
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
Index: plugins/org.eclipse.tm.tcf.terminals/about.html
===================================================================
--- plugins/org.eclipse.tm.tcf.terminals/about.html (revision 0)
+++ plugins/org.eclipse.tm.tcf.terminals/about.html (revision 0)
@@ -0,0 +1,28 @@
+
+
+
+
+About
+
+
+About This Content
+
+January 10, 2008
+License
+
+The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at http://www.eclipse.org/legal/epl-v10.html.
+For purposes of the EPL, "Program" will mean the Content.
+
+If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at http://www.eclipse.org.
+
+
+
\ No newline at end of file
Index: plugins/org.eclipse.tm.tcf.terminals/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- plugins/org.eclipse.tm.tcf.terminals/.settings/org.eclipse.jdt.core.prefs (revision 0)
+++ plugins/org.eclipse.tm.tcf.terminals/.settings/org.eclipse.jdt.core.prefs (revision 0)
@@ -0,0 +1,8 @@
+#Mon Jun 07 11:42:38 CST 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6