public class CotServiceRemote
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
CotServiceRemote.ConnectionListener |
static interface |
CotServiceRemote.CotEventListener |
static interface |
CotServiceRemote.InputsChangedListener |
static interface |
CotServiceRemote.OutputsChangedListener |
static class |
CotServiceRemote.Proto |
Modifier and Type | Field and Description |
---|---|
static NetConnectString |
ALL_STREAMING_OUTPUTS_CONN |
static java.lang.String |
TAG |
Constructor and Description |
---|
CotServiceRemote() |
Modifier and Type | Method and Description |
---|---|
void |
addInput(java.lang.String input,
android.os.Bundle meta)
Request an input be added for the local network.
|
void |
addOutput(java.lang.String output,
android.os.Bundle meta)
Request an output be added for the local network.
|
void |
addStream(java.lang.String connectString,
android.os.Bundle params)
Request a connection be added for a TAK server.
|
void |
connect(CotServiceRemote.ConnectionListener cl)
Enqueues all any ConnectionListener on the queue prior to fireConnected is called.
|
void |
disconnect()
.
|
static void |
fireConnect()
Called by ATAKActivity to tell everyone that we are finally connected.
|
boolean |
isConnected() |
void |
removeInput(java.lang.String input)
Request an input be removed for the local network.
|
void |
removeOutput(java.lang.String output)
Request an output be removed for the local network.
|
void |
removeStream(java.lang.String connectString)
Request a connection be removed for a TAK server.
|
void |
setCotEventListener(CotServiceRemote.CotEventListener cel)
Sets the CotEventListener for the remote service.
|
void |
setCredentialsForStream(java.lang.String connectString,
java.lang.String username,
java.lang.String password) |
void |
setInputsChangedListener(CotServiceRemote.InputsChangedListener listener)
Register a change listener with this instance of CotServiceRemote.
|
void |
setOutputsChangedListener(CotServiceRemote.OutputsChangedListener listener)
Register a change listener with this instance of CotServiceRemote.
|
void |
setUseAuthForStream(java.lang.String connectString,
boolean useAuth) |
public static final java.lang.String TAG
public static final NetConnectString ALL_STREAMING_OUTPUTS_CONN
public void setCotEventListener(CotServiceRemote.CotEventListener cel)
cel
- the cot event listener to use. If a previous one is set, then it is unregisteredpublic static void fireConnect()
public void connect(CotServiceRemote.ConnectionListener cl)
public boolean isConnected()
public void disconnect()
public void addInput(java.lang.String input, android.os.Bundle meta)
input
- this is the ConnectString as shown in CotOutputsListActivitymeta
- contained in CotPortListActivity.CotPort is all of the values that can be put in
the bundle.public void removeInput(java.lang.String input)
input
- the input as described by a string.public void addOutput(java.lang.String output, android.os.Bundle meta)
output
- this is the ConnectString as shown in CotOutputsListActivitymeta
- contained in CotPortListActivity.CotPort is all of the values that can be put in
the bundle.public void removeOutput(java.lang.String output)
output
- the output as described by a stringpublic final void removeStream(java.lang.String connectString)
connectString
- the stream defined by its connect string or
* wild card "**" to remove all streams.public final void addStream(java.lang.String connectString, android.os.Bundle params)
connectString
- the stream defined by the connect stringpublic final void setCredentialsForStream(java.lang.String connectString, java.lang.String username, java.lang.String password)
public final void setUseAuthForStream(java.lang.String connectString, boolean useAuth)
public void setInputsChangedListener(CotServiceRemote.InputsChangedListener listener)
listener
- called when the inputs are changed.public void setOutputsChangedListener(CotServiceRemote.OutputsChangedListener listener)
listener
- called when the outputs are changed