Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 33c36da9992ed916f7bebff89df9cc7a9e56abf0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
/*******************************************************************************
 * Copyright (c) 2007, 2013 Wind River Systems, 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:
 *     Wind River Systems - initial API and implementation
 *******************************************************************************/
package org.eclipse.tcf.services;

import java.util.Map;

import org.eclipse.tcf.protocol.IToken;

/**
 * Extension of Processes service.
 * It provides new "start" command that supports additional parameters.
 *
 * @noimplement This interface is not intended to be implemented by clients.
 */
public interface IProcessesV1 extends IProcesses {

    static final String NAME = "ProcessesV1";

    /* Process start parameters */

    /**
     * Process start parameter:
     * Boolean, attach the debugger to the process.
     */
    static final String START_ATTACH = "Attach";

    /**
     * Process start parameter:
     * Boolean, auto-attach process children.
     */
    static final String START_ATTACH_CHILDREN = "AttachChildren";

    /**
     * Process start parameter:
     * Boolean, stop at process entry.
     */
    static final String START_STOP_AT_ENTRY = "StopAtEntry";

    /**
     * Process start parameter:
     * Boolean, stop at main().
     */
    static final String START_STOP_AT_MAIN = "StopAtMain";

    /**
     * Process start parameter:
     * Boolean, Use pseudo-terminal for the process standard I/O.
     */
    static final String START_USE_TERMINAL = "UseTerminal";

    /**
     * Process start parameter:
     * Bit set of signals that should not be intercepted by the debugger.
     * @since 1.2
     */
    static final String START_SIG_DONT_STOP = "SigDontStop";

    /**
     * Process start parameter:
     * Bit set of signals that should not be delivered to the process.
     * @since 1.2
     */
    static final String START_SIG_DONT_PASS = "SigDontPass";

    /**
     * Start a new process on remote machine.
     * @param directory - initial value of working directory for the process.
     * @param file - process image file.
     * @param command_line - command line arguments for the process.
     * Note: the service does NOT add image file name as first argument for the process.
     * If a client wants first parameter to be the file name, it should add it itself.
     * @param environment - map of environment variables for the process,
     * if null then default set of environment variables will be used.
     * @param params - additional process start parameters, see START_*.
     * @param done - call back interface called when operation is completed.
     * @return pending command handle, can be used to cancel the command.
     */
    IToken start(String directory, String file,
            String[] command_line, Map<String,String> environment,
            Map<String,Object> params, DoneStart done);

    /**
     * Set the process TTY widow size.
     * Applicable only when the process is started with START_USE_TERMINAL.
     * @param id - process context ID.
     * @param col - number of columns.
     * @param row - number of rows.
     * @param done - call back interface called when operation is completed.
     * @return pending command handle, can be used to cancel the command.
     * @since 1.2
     */
    IToken setWinSize(String id, int col, int row, DoneCommand done);

    /**
     * Client call back interface for getCapabilities().
     * @since 1.2
     */
    interface DoneGetCapabilities {
        /**
         * Called when the capability retrieval is done.
         *
         * @param error The error description if the operation failed, <code>null</code> if succeeded.
         * @param properties The global processes service or context specific capabilities.
         */
        public void doneGetCapabilities(IToken token, Exception error, Map<String, Object> properties);
    }

    /**
     * The command reports the ProcessesV1 service capabilities to clients so they can adjust
     * to different implementations of the service. When called with a null ("") context
     * ID the global capabilities are returned, otherwise context specific capabilities
     * are returned.
     *
     * @param id The context ID or <code>null</code>.
     * @param done The call back interface called when the operation is completed. Must not be <code>null</code>.
     * @since 1.2
     */
    public IToken getCapabilities(String id, DoneGetCapabilities done);
}

Back to the top