author | dadubrow |
Mon, 01 Mar 2010 11:27:50 -0600 | |
changeset 1039 | c7873299d91f |
parent 899 | b5675f3e69ad |
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 |
|
899 | 26 |
* @since 2.5 |
688 | 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 { |
748
7bd40a2d0a18
Add connection status reconciliation + fixes + tweaks
dadubrow
parents:
702
diff
changeset
|
49 |
READY, NOT_READY, IN_USE, IN_USE_DISCONNECTED, NONE |
688 | 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 |
|
748
7bd40a2d0a18
Add connection status reconciliation + fixes + tweaks
dadubrow
parents:
702
diff
changeset
|
54 |
String getShortDescription(); |
7bd40a2d0a18
Add connection status reconciliation + fixes + tweaks
dadubrow
parents:
702
diff
changeset
|
55 |
|
7bd40a2d0a18
Add connection status reconciliation + fixes + tweaks
dadubrow
parents:
702
diff
changeset
|
56 |
String getLongDescription(); |
688 | 57 |
} |
58 |
||
59 |
/** |
|
60 |
* Gets this connection's status |
|
61 |
* @return IStatus |
|
62 |
*/ |
|
702
432756509142
rename connection status to avoid having to qualify when using with service status in same module
dadubrow
parents:
700
diff
changeset
|
63 |
IConnectionStatus getStatus(); |
688 | 64 |
|
65 |
/** |
|
66 |
* Sets this connection's status |
|
67 |
* @see IConnection2#getStatus() |
|
68 |
* @param status IStatus |
|
69 |
*/ |
|
702
432756509142
rename connection status to avoid having to qualify when using with service status in same module
dadubrow
parents:
700
diff
changeset
|
70 |
void setStatus(IConnectionStatus status); |
688 | 71 |
|
72 |
/** |
|
73 |
* A listener for status changes |
|
74 |
*/ |
|
702
432756509142
rename connection status to avoid having to qualify when using with service status in same module
dadubrow
parents:
700
diff
changeset
|
75 |
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
|
76 |
void statusChanged(IConnectionStatus status); |
688 | 77 |
} |
78 |
||
79 |
/** |
|
80 |
* Adds a listener for status changes |
|
81 |
* @param listener IStatusChangedListener |
|
82 |
*/ |
|
702
432756509142
rename connection status to avoid having to qualify when using with service status in same module
dadubrow
parents:
700
diff
changeset
|
83 |
void addStatusChangedListener(IConnectionStatusChangedListener listener); |
688 | 84 |
|
85 |
/** |
|
86 |
* Removes a listener for status changes |
|
87 |
* @param listener IStatusChangedListener |
|
88 |
*/ |
|
702
432756509142
rename connection status to avoid having to qualify when using with service status in same module
dadubrow
parents:
700
diff
changeset
|
89 |
void removeStatusChangedListener(IConnectionStatusChangedListener listener); |
688 | 90 |
|
91 |
/** |
|
92 |
* An optional icon representing this connection. |
|
93 |
* If none is set, the default icon is used. |
|
94 |
* @return ImageDescriptor |
|
95 |
*/ |
|
96 |
ImageDescriptor getImageDescriptor(); |
|
97 |
||
98 |
/** |
|
99 |
* Set the image descriptor for this connection. |
|
100 |
* @see IConnection2#getImageDescriptor() |
|
101 |
* @param imageDescriptor |
|
102 |
*/ |
|
103 |
void setImageDescriptor(ImageDescriptor imageDescriptor); |
|
104 |
||
105 |
} |