~ubuntu-branches/debian/sid/eclipse-cdt/sid

« back to all changes in this revision

Viewing changes to dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/IMIBackend.java

  • Committer: Package Import Robot
  • Author(s): Jakub Adam
  • Date: 2011-10-06 21:15:04 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20111006211504-8dutmljjih0zikfv
Tags: 8.0.1-1
* New upstream release.
* Split the JNI packages into a separate architecture dependent
  package and made eclipse-cdt architecture independent.
* Install JNI libraries into multiarch aware location
* Bumped Standards-Version to 3.9.2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*******************************************************************************
 
2
 * Copyright (c) 2008, 2009 Wind River Systems and others.
 
3
 * All rights reserved. This program and the accompanying materials
 
4
 * are made available under the terms of the Eclipse Public License v1.0
 
5
 * which accompanies this distribution, and is available at
 
6
 * http://www.eclipse.org/legal/epl-v10.html
 
7
 * 
 
8
 * Contributors:
 
9
 *     Wind River Systems - initial API and implementation
 
10
 *     Nokia - create and use backend service. 
 
11
 *******************************************************************************/
 
12
package org.eclipse.cdt.dsf.mi.service;
 
13
 
 
14
import java.io.InputStream;
 
15
import java.io.OutputStream;
 
16
 
 
17
import org.eclipse.cdt.dsf.concurrent.Immutable;
 
18
import org.eclipse.cdt.dsf.service.IDsfService;
 
19
 
 
20
/**
 
21
 * Service for controlling the back end process.
 
22
 * @since 1.1
 
23
 */
 
24
public interface IMIBackend extends IDsfService {
 
25
 
 
26
    public enum State { NOT_INITIALIZED, STARTED, TERMINATED };
 
27
 
 
28
        /**
 
29
         * Event indicating that the back end process has started or terminated.
 
30
         */
 
31
    @Immutable
 
32
    public static class BackendStateChangedEvent {
 
33
        final private String fSessionId;
 
34
        final private String fBackendId;
 
35
        final private State fState;
 
36
        
 
37
        public BackendStateChangedEvent(String sessionId, String backendId, State state) {
 
38
            fSessionId = sessionId;
 
39
            fBackendId = backendId;
 
40
            fState = state;
 
41
        }
 
42
        
 
43
        public String getSessionId() {
 
44
            return fSessionId;
 
45
        }
 
46
        
 
47
        public String getBackendId() {
 
48
            return fBackendId;
 
49
        }
 
50
        
 
51
        public State getState() {
 
52
            return fState;
 
53
        }
 
54
    }
 
55
 
 
56
    /**
 
57
     * Returns the identifier of this backend service.  It can be used 
 
58
     * to distinguish between multiple instances of this service in a 
 
59
     * single session.   
 
60
     */
 
61
    public String getId();
 
62
    
 
63
    /**
 
64
     * Requests that the backend be immediately terminated.
 
65
     */
 
66
    public void destroy();
 
67
 
 
68
    /**
 
69
     * Returns the current state of the backend.
 
70
     * @return
 
71
     */
 
72
    public State getState();
 
73
 
 
74
    /**
 
75
     * Returns the exit code of the backend.  Returns <code>-1</code> if 
 
76
     * the backend exit code is not available.
 
77
     * @return
 
78
     */
 
79
    public int getExitCode();
 
80
 
 
81
    /**
 
82
     * Returns the backend command stream. 
 
83
     */
 
84
    public InputStream getMIInputStream();
 
85
 
 
86
    /**
 
87
     * Returns the backend result and event stream.
 
88
     * @return
 
89
     */
 
90
    public OutputStream getMIOutputStream();
 
91
}