author | dadubrow |
Fri, 18 Dec 2009 09:30:04 -0600 | |
changeset 702 | 432756509142 |
parent 700 | 9441b6037cb6 |
child 748 | 7bd40a2d0a18 |
permissions | -rw-r--r-- |
688 | 1 |
/** |
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 |
* All rights reserved. |
|
4 |
* This component and the accompanying materials are made available |
|
5 |
* under the terms of the License "Eclipse Public License v1.0" |
|
6 |
* which accompanies this distribution, and is available |
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 |
* |
|
9 |
* Initial Contributors: |
|
10 |
* Nokia Corporation - initial contribution. |
|
11 |
* |
|
12 |
* Contributors: |
|
13 |
* |
|
14 |
* Description: |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
700 | 18 |
package com.nokia.carbide.remoteconnections.internal.api; |
688 | 19 |
|
20 |
import org.eclipse.jface.resource.ImageDescriptor; |
|
21 |
||
22 |
import com.nokia.carbide.remoteconnections.interfaces.IConnection; |
|
23 |
||
24 |
/** |
|
25 |
* An extended interface to a connection |
|
26 |
* @since 3.0 |
|
27 |
*/ |
|
28 |
public interface IConnection2 extends IConnection { |
|
29 |
||
30 |
/** |
|
31 |
* Whether this connection is dynamic (managed by an automated process) |
|
32 |
* Dynamic connections are not persisted or user editable. |
|
33 |
* @return boolean |
|
34 |
*/ |
|
35 |
boolean isDynamic(); |
|
36 |
||
37 |
/** |
|
38 |
* Sets this connection's dynamic attribute. |
|
39 |
* @see IConnection2#isDynamic() |
|
40 |
* @param dynamic boolean |
|
41 |
*/ |
|
42 |
void setDynamic(boolean dynamic); |
|
43 |
||
44 |
/** |
|
45 |
* The status of a connection |
|
46 |
*/ |
|
702
432756509142
rename connection status to avoid having to qualify when using with service status in same module
dadubrow
parents:
700
diff
changeset
|
47 |
public interface IConnectionStatus { |
432756509142
rename connection status to avoid having to qualify when using with service status in same module
dadubrow
parents:
700
diff
changeset
|
48 |
enum EConnectionStatus { |
688 | 49 |
READY, NOT_READY, IN_USE, IN_USE_DISCONNECTED |
50 |
}; |
|
51 |
||
702
432756509142
rename connection status to avoid having to qualify when using with service status in same module
dadubrow
parents:
700
diff
changeset
|
52 |
EConnectionStatus getEConnectionStatus(); |
688 | 53 |
|
54 |
String getDescription(); |
|
55 |
} |
|
56 |
||
57 |
/** |
|
58 |
* Gets this connection's status |
|
59 |
* @return IStatus |
|
60 |
*/ |
|
702
432756509142
rename connection status to avoid having to qualify when using with service status in same module
dadubrow
parents:
700
diff
changeset
|
61 |
IConnectionStatus getStatus(); |
688 | 62 |
|
63 |
/** |
|
64 |
* Sets this connection's status |
|
65 |
* @see IConnection2#getStatus() |
|
66 |
* @param status IStatus |
|
67 |
*/ |
|
702
432756509142
rename connection status to avoid having to qualify when using with service status in same module
dadubrow
parents:
700
diff
changeset
|
68 |
void setStatus(IConnectionStatus status); |
688 | 69 |
|
70 |
/** |
|
71 |
* A listener for status changes |
|
72 |
*/ |
|
702
432756509142
rename connection status to avoid having to qualify when using with service status in same module
dadubrow
parents:
700
diff
changeset
|
73 |
public interface IConnectionStatusChangedListener { |
432756509142
rename connection status to avoid having to qualify when using with service status in same module
dadubrow
parents:
700
diff
changeset
|
74 |
void statusChanged(IConnectionStatus status); |
688 | 75 |
} |
76 |
||
77 |
/** |
|
78 |
* Adds a listener for status changes |
|
79 |
* @param listener IStatusChangedListener |
|
80 |
*/ |
|
702
432756509142
rename connection status to avoid having to qualify when using with service status in same module
dadubrow
parents:
700
diff
changeset
|
81 |
void addStatusChangedListener(IConnectionStatusChangedListener listener); |
688 | 82 |
|
83 |
/** |
|
84 |
* Removes a listener for status changes |
|
85 |
* @param listener IStatusChangedListener |
|
86 |
*/ |
|
702
432756509142
rename connection status to avoid having to qualify when using with service status in same module
dadubrow
parents:
700
diff
changeset
|
87 |
void removeStatusChangedListener(IConnectionStatusChangedListener listener); |
688 | 88 |
|
89 |
/** |
|
90 |
* An optional icon representing this connection. |
|
91 |
* If none is set, the default icon is used. |
|
92 |
* @return ImageDescriptor |
|
93 |
*/ |
|
94 |
ImageDescriptor getImageDescriptor(); |
|
95 |
||
96 |
/** |
|
97 |
* Set the image descriptor for this connection. |
|
98 |
* @see IConnection2#getImageDescriptor() |
|
99 |
* @param imageDescriptor |
|
100 |
*/ |
|
101 |
void setImageDescriptor(ImageDescriptor imageDescriptor); |
|
102 |
||
103 |
} |