public interface ISdlProtocol
| Modifier and Type | Method and Description |
|---|---|
VideoStreamingParameters |
getDesiredVideoParams()
A method that should be implemented by the hosting class of the SdlProtocol instance that will
return the desired video streaming parameters.
|
SdlSecurityBase |
getSdlSecurity()
A method that should be implemented by the hosting class of the SdlProtocol instance that will
return the currently being used security library if any.
|
int |
getSessionId()
Method that the protocol layer will use to obtain the session ID
|
void |
onAuthTokenReceived(String authToken)
A callback to indicate the SDL connected device has supplied an authentication token to this
application.
|
void |
onProtocolError(String info,
Exception e)
Called to indicate that a protocol error was detected in received data.
|
void |
onProtocolMessageReceived(ProtocolMessage msg)
Called to indicate that a complete message (RPC, BULK, etc.) has been received.
|
void |
onServiceEnded(SdlPacket packet,
SessionType serviceType,
int sessionID)
This will get called when a service has ended
|
void |
onServiceError(SdlPacket packet,
SessionType serviceType,
int sessionID,
String error)
If there is an error with starting or stopping the service or any other error this method
will be called.
|
void |
onServiceStarted(SdlPacket packet,
SessionType serviceType,
int sessionID,
Version version,
boolean isEncrypted)
Called to indicate that a service has been started
|
void |
onTransportDisconnected(String info,
boolean altTransportAvailable,
BaseTransportConfig transportConfig)
Called when a transport disconnects
|
void |
setAcceptedVideoParams(VideoStreamingParameters acceptedVideoParams)
A callback that will be called when the video service has been successfully started and the
streaming parameters have been negotiated.
|
void |
shutdown(String info)
A request made by the protocol layer to shutdown the layers above it.
|
void onProtocolMessageReceived(ProtocolMessage msg)
msg - the message that was receivedvoid onServiceStarted(SdlPacket packet, SessionType serviceType, int sessionID, Version version, boolean isEncrypted)
packet - the control packet StartServiceACK received from the connected deviceserviceType - the service type that has been startedsessionID - the session ID that this service has been started onversion - the protocol version used for this session and serviceisEncrypted - if the service is encryptedvoid onServiceEnded(SdlPacket packet, SessionType serviceType, int sessionID)
packet - the packet received that ended this serviceserviceType - the service type that has endedsessionID - the id of the session that this service was operating onvoid onServiceError(SdlPacket packet, SessionType serviceType, int sessionID, String error)
packet - if there is a packet that caused this error it will be included, however this
can be null.serviceType - the service type that experienced the errorsessionID - the session ID that this service was associated witherror - a human readable string of the errorvoid onProtocolError(String info, Exception e)
info - a human readable string of the errore - the exception if one occurredint getSessionId()
void shutdown(String info)
info - human readable string on why the shutdown should occurvoid onTransportDisconnected(String info, boolean altTransportAvailable, BaseTransportConfig transportConfig)
info - a human readable string including information on the disconnected transportaltTransportAvailable - a boolean flag indicating if there is another transport that can
be used to connect with the SDL enabled device.transportConfig - the previously supplied transport configSdlSecurityBase getSdlSecurity()
VideoStreamingParameters getDesiredVideoParams()
void setAcceptedVideoParams(VideoStreamingParameters acceptedVideoParams)
acceptedVideoParams - the negotiated and accepted video parameters that should be used
to stream to the SDL enabled device.void onAuthTokenReceived(String authToken)
authToken -