rename connection status to avoid having to qualify when using with service status in same module
--- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/AbstractConnection.java Fri Dec 18 09:17:36 2009 -0600
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/AbstractConnection.java Fri Dec 18 09:30:04 2009 -0600
@@ -24,7 +24,7 @@
import org.eclipse.jface.resource.ImageDescriptor;
import com.nokia.carbide.remoteconnections.internal.api.IConnection2;
-import com.nokia.carbide.remoteconnections.internal.api.IConnection2.IStatus.EStatus;
+import com.nokia.carbide.remoteconnections.internal.api.IConnection2.IConnectionStatus.EConnectionStatus;
import com.nokia.cpp.internal.api.utils.core.Check;
import com.nokia.cpp.internal.api.utils.core.ListenerList;
@@ -33,16 +33,16 @@
*/
public abstract class AbstractConnection implements IConnection2 {
- public class Status implements IStatus {
- private EStatus estatus;
+ public static class ConnectionStatus implements IConnectionStatus {
+ private EConnectionStatus estatus;
private String description;
- public Status(EStatus estatus, String description) {
+ public ConnectionStatus(EConnectionStatus estatus, String description) {
this.estatus = estatus;
this.description = description;
}
- public EStatus getEStatus() {
+ public EConnectionStatus getEConnectionStatus() {
return estatus;
}
@@ -50,7 +50,7 @@
return description;
}
- public void setEStatus(EStatus estatus) {
+ public void setEStatus(EConnectionStatus estatus) {
this.estatus = estatus;
}
@@ -64,14 +64,14 @@
private String name;
private String id;
private boolean dynamic;
- private IStatus status;
+ private IConnectionStatus status;
private ImageDescriptor imageDescriptor;
- private ListenerList<IStatusChangedListener> listeners;
+ private ListenerList<IConnectionStatusChangedListener> listeners;
public AbstractConnection(IConnectionType connectionType, Map<String, String> settings) {
this.connectionType = connectionType;
this.settings = new HashMap<String, String>(settings);
- status = new Status(EStatus.NOT_READY, ""); //$NON-NLS-1$
+ status = new ConnectionStatus(EConnectionStatus.NOT_READY, ""); //$NON-NLS-1$
}
public void dispose() {
@@ -114,22 +114,22 @@
this.dynamic = dynamic;
}
- public IStatus getStatus() {
+ public IConnectionStatus getStatus() {
return status;
}
- public void setStatus(IStatus status) {
+ public void setStatus(IConnectionStatus status) {
Check.checkArg(status);
this.status = status;
}
- public void addStatusChangedListener(IStatusChangedListener listener) {
+ public void addStatusChangedListener(IConnectionStatusChangedListener listener) {
if (listeners == null)
- listeners = new ListenerList<IStatusChangedListener>();
+ listeners = new ListenerList<IConnectionStatusChangedListener>();
listeners.add(listener);
}
- public void removeStatusChangedListener(IStatusChangedListener listener) {
+ public void removeStatusChangedListener(IConnectionStatusChangedListener listener) {
if (listeners != null)
listeners.remove(listener);
}
@@ -137,7 +137,7 @@
public void fireStatusChanged() {
if (listeners == null)
return;
- for (IStatusChangedListener listener : listeners) {
+ for (IConnectionStatusChangedListener listener : listeners) {
listener.statusChanged(status);
}
}
--- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/api/IConnection2.java Fri Dec 18 09:17:36 2009 -0600
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/api/IConnection2.java Fri Dec 18 09:30:04 2009 -0600
@@ -44,12 +44,12 @@
/**
* The status of a connection
*/
- public interface IStatus {
- enum EStatus {
+ public interface IConnectionStatus {
+ enum EConnectionStatus {
READY, NOT_READY, IN_USE, IN_USE_DISCONNECTED
};
- EStatus getEStatus();
+ EConnectionStatus getEConnectionStatus();
String getDescription();
}
@@ -58,33 +58,33 @@
* Gets this connection's status
* @return IStatus
*/
- IStatus getStatus();
+ IConnectionStatus getStatus();
/**
* Sets this connection's status
* @see IConnection2#getStatus()
* @param status IStatus
*/
- void setStatus(IStatus status);
+ void setStatus(IConnectionStatus status);
/**
* A listener for status changes
*/
- public interface IStatusChangedListener {
- void statusChanged(IStatus status);
+ public interface IConnectionStatusChangedListener {
+ void statusChanged(IConnectionStatus status);
}
/**
* Adds a listener for status changes
* @param listener IStatusChangedListener
*/
- void addStatusChangedListener(IStatusChangedListener listener);
+ void addStatusChangedListener(IConnectionStatusChangedListener listener);
/**
* Removes a listener for status changes
* @param listener IStatusChangedListener
*/
- void removeStatusChangedListener(IStatusChangedListener listener);
+ void removeStatusChangedListener(IConnectionStatusChangedListener listener);
/**
* An optional icon representing this connection.