Milestone SDK Mobile .Net
VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection Class Reference

Main class for connection with the 'Mobile Server'. More...

Inheritance diagram for VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection:
VideoOS.Mobile.SDK.Portable.Server.Interfaces.IErrorResult VideoOS.Mobile.SDK.Portable.Server.Interfaces.IConnectionSync VideoOS.Mobile.SDK.Portable.Server.Interfaces.IConnectionAwait VideoOS.Mobile.SDK.Portable.Server.Interfaces.IAsyncModeCallback VideoOS.Mobile.SDK.Portable.Server.Interfaces.IConnectionAsync VideoOS.Mobile.SDK.Portable.Server.Interfaces.IConnection

Classes

class  ProcessAsyncTask
 

Public Member Functions

void AddCommandForEncryption (Command cmd)
 Adds command to the list of required encrypted commands.
 
ConnectResponse Connect (ConnectParams connectParams, TimeSpan timeout)
 Method for connecting to the Mobile Server

Implemented by Connection object.
Sends message to the Mobile and returns ConnectResponse on success.
Error status message could be obtained with query of IErrorResult.
Parameters
connectParamsConnection paramters used during Connect
timeoutTime to wait the responce from the server
Returns
ConnectResponse object

 
IAsyncResult Connect (ConnectParams connectParams=null, OnResponse< ConnectResponse > onSuccess=null, OnResponse< ConnectResponse > onFail=null)
 Method for connecting to the Mobile Server

Implemented by Connection object.
Sends message to the Mobile and returns IAsyncResult.
If method succeeds IAsyncResult.AsyncState contains BaseCommandResponse.
Error status message could be obtained with query of IErrorResult (from the resulted IAsyncResult).
Parameters
connectParamsConnection paramters used during Connect
onSuccessCallback called on success
onFailCallback called on fail
Returns
IAsyncResult implementer

 
async Task< ConnectResponseConnectAsync (ConnectParams connectParams, TimeSpan timeout)
 Method for connecting to the Mobile Server

Implemented by Connection object.
Sends message to the Mobile and returns Task<ConnectResponse> on success.
Error status message could be obtained with query of IErrorResult.
Could be awaited.
Parameters
connectParamsConnection paramters used during Connect
timeoutTime to wait the responce from the server
Returns
Task<ConnectResponse>>

 
 Connection (ChannelTypes channelType, string ipAddress, uint port, string commandAlias=null, bool plainAuthentication=false, bool requireCommandEncryption=false, List< Command.CommandKinds > commandEncryptionList=null, IReadOnlyDictionary< string, string > headers=null, string videoAlias=Constants.HttpVideoAlias, string audioAlias=Constants.HttpAudioAlias)
 Constructor of the Communication object.
 
 Connection (ChannelTypes channelType, string ipAddress, uint port, string connectionId, IServerCapabilities serverCapabilities, string commandAlias=null, string videoAlias=Constants.HttpVideoAlias, string audioAlias=Constants.HttpAudioAlias)
 Contrucutor from another existing connection and valid connection Id.
 
delegate EncryptionProperties ConnectionEncryptionProperties ()
 
void Dispose ()
 
void DisposeQuiet ()
 Method for quite disposion - if it is used Disconnect command is not sent to the server.
 
string GetEncryptedText (string text)
 Encrypt text with connection shared key using AES algorithm.
 
EncryptionProperties GetEncryptionProperties ()
 
IAsyncResult LiveMessage (OnResponse< LiveMessageResponse > onSuccess=null, OnResponse< LiveMessageResponse > onFail=null)
 Method for heard breathe to the Mobile Server.

Implemented by Connection object.
Sends message to the Mobile and returns IAsyncResult.
If method succeeds IAsyncResult.AsyncState contains BaseCommandResponse.
Error status message could be obtained with query of IErrorResult (from the resulted IAsyncResult).
Parameters
onSuccessCallback called on success
onFailCallback called on fail
Returns
IAsyncResult implementer

 
LiveMessageResponse LiveMessage (TimeSpan timeout)
 Method for heard breathe to the Mobile Server

Implemented by Connection object.
Sends message to the Mobile and returns LiveMessageResponse.
If method succeeds result is true.
Error status message could be obtained with query of IErrorResult.
Parameters
timeoutTime to wait the responce from the server
Returns
LiveMessageResponse object

 
async Task< LiveMessageResponseLiveMessageAsync (TimeSpan timeout)
 Method for heard breathe to the Mobile Server

Implemented by Connection object.
Sends message to the Mobile and returns Task<LiveMessageResponse>.
If method succeeds result is true.
Error status message could be obtained with query of IErrorResult.
Could be awaited.
Parameters
timeoutTime to wait the responce from the server
Returns
Task<LiveMessageResponse>

 
BaseCommandResponse LogIn (LoginSettingsParams loginSettings, LoginParams loginParams, TimeSpan timeout)
 
IAsyncResult LogIn (LoginSettingsParams loginSettings, LoginParams loginParams=null, OnResponse< BaseCommandResponse > onSuccess=null, OnResponse< BaseCommandResponse > onFail=null)
 
BaseCommandResponse LogIn (string username, string password, string clientType, TimeSpan timeout, UserType loginType=UserType.Unknown, LoginParams loginParams=null)
 Method for log-in into the Mobile Server

Implemented by Connection object.
Sends message to the Mobile and returns BaseCommandResponse on success.
Error status message could be obtained with query of IErrorResult.
Parameters
usernameUsername for authentication in the system
passwordPassword for authentication in the system
clientTypeType of the client. If unknown or custom - use String.Empty.
timeoutTime to wait the responce from the server
loginParamsAdditional login paramteres, if any
Returns
BaseCommandResponse object

 
IAsyncResult LogIn (string username, string password, string clientType, UserType loginType=UserType.Unknown, LoginParams loginParams=null, OnResponse< BaseCommandResponse > onSuccess=null, OnResponse< BaseCommandResponse > onFail=null)
 Method for log-in into the Mobile Server

Implemented by Connection object.
Sends message to the Mobile and returns IAsyncResult.
If method succeeds IAsyncResult.AsyncState contains BaseCommandResponse.
Error status message could be obtained with query of IErrorResult (from the resulted IAsyncResult).
Parameters
usernameUsername for authentication in the system
passwordPassword for authentication in the system
clientTypeType of the client. If unknown or custom - use String.Empty.
loginParamsAdditional login paramteres, if any
onSuccessCallback called on success
onFailCallback called on fail
Returns
IAsyncResult implementer

 
async Task< BaseCommandResponseLogInAsync (LoginSettingsParams loginSettings, LoginParams loginParams, TimeSpan timeout)
 
async Task< BaseCommandResponseLogInAsync (string username, string password, string clientType, LoginParams loginParams, TimeSpan timeout, UserType loginType=UserType.Unknown)
 Method for log-in into the Mobile Server

Implemented by Connection object.
Sends message to the Mobile and returns Task<BaseCommandResponse> on success.
Error status message could be obtained with query of IErrorResult.
Could be awaited.
Parameters
usernameUsername for authentication in the system
passwordPassword for authentication in the system
clientTypeType of the client. If unknown or custom - use String.Empty.
loginParamsAdditional login paramteres, if any
timeoutTime to wait the responce from the server
Returns
Task<BaseCommandResponse>

 
delegate void OnReceivedResponse (CommunicationEntry response)
 
delegate IAsyncResult OnSendCommand (Command tCommand)
 
void ProcessIAsyncResult (IAsyncResult result, AsyncCallback callback, TimeSpan timeout)
 Method for IAsyncModeCallback.

Implemented by Connection object.
Error status message could be obtained with query of IErrorResult (from the resulted IAsyncResult).
Parameters
resultIAsyncResult implementer which to be processed
callbackCallback for notification
timeoutTime to wait the responce from the server

 
BaseCommandResponse ProcessResult (IAsyncResult iResult, TimeSpan timeout)
 Method for processing the result and waiting for specific timeout.
Usually used for sync commads implementation.
Parameters
iResultIAsyncResult object to be waited
timeoutTime to wait the responce from the server
Returns
BaseCommandResponse object

 
Task< BaseCommandResponseProcessResultTask (IAsyncResult asyncResult, TimeSpan timeout)
 Method for processing the result and waiting for specific timeout.
Usually used for awaitable commads implementation.
Parameters
asyncResultIAsyncResult object to be waited
timeoutTime to wait the responce from the server
Returns
Task<BaseCommandResponse> object

 
void RemoveEncryptedCommand (Command cmd)
 Removes the command from the list of required encrypted commands.
 
IAsyncResult SendCommand (Command command, OnResponse< BaseCommandResponse > onSuccess=null, OnResponse< BaseCommandResponse > onFail=null, string address=null)
 Method for sending the generic command to the Mobile server.
Implemented by the Connection object.
Parameters
commandCommand parameters
onSuccessCallback called on success
onFailCallback called on fail
addressOptional additional command alias. Used when commands are imeplented via REST API on different addresses.
Returns
IAsyncResult imeplementer

 
IAsyncResult SendCommand (CommunicationEntry entry, OnResponse< BaseCommandResponse > onSuccess=null, OnResponse< BaseCommandResponse > onFail=null)
 Method for sending the generic command to the Mobile server.
Implemented by the Connection object.

 
IAsyncResult SendCommand (CommunicationEntry entry, string connectionId, OnResponse< BaseCommandResponse > onSuccess=null, OnResponse< BaseCommandResponse > onFail=null)
 Method for sending the generic command to the Mobile server.
Implemented by the Connection object.

 
IAsyncResult SendCommand< T > (Command command, OnResponse< T > onSuccess, OnResponse< T > onFail, Func< BaseCommandResponse, T > factoryT, string address=null)
 Generic Method for sending the generic command to the Mobile server.
Implemented by the Connection object.
Template Parameters
T
Parameters
commandCommand parameters
onSuccessCallback called on success
onFailCallback called on fail
factoryTFactory method for creation of the specific response type T derived from the BaseCommandResponse
addressOptional additional command alias. Used when commands are imeplented via REST API on different addresses.
Returns
IAsyncResult imeplementer

 
void Start ()
 
void Stop ()
 
- Public Member Functions inherited from VideoOS.Mobile.SDK.Portable.Server.Interfaces.IConnection
- Public Member Functions inherited from VideoOS.Mobile.SDK.Portable.Server.Interfaces.IConnectionAsync
- Public Member Functions inherited from VideoOS.Mobile.SDK.Portable.Server.Interfaces.IAsyncModeCallback
- Public Member Functions inherited from VideoOS.Mobile.SDK.Portable.Server.Interfaces.IConnectionAwait
- Public Member Functions inherited from VideoOS.Mobile.SDK.Portable.Server.Interfaces.IConnectionSync

Protected Member Functions

virtual void Dispose (bool disposing, bool quiet)
 

Properties

AccessControlCommands AccessControl [get]
 Access Control releated commands provider.
 
ActionsCommands Actions [get]
 Actions commands provider. (aka Outputs and Events)
 
AddressBookServiceCommands AddressBookService [get]
 Address Book Service related commands provider. Not always available on server.
Depends on the license.

 
AlarmCommands Alarms [get]
 Alarms related commands provider.
 
AudioCommands Audio [get]
 Audio related commands provider.
 
string AudioAlias [get]
 Gets the audio channel alias.
 
IAudioFactory AudioFactory [get]
 
bool AutoUpdateConfiguration [get, set]
 Gets or sets whether server features configuration should be autoupdated.
 
BookmarkCommands Bookmarks [get]
 Bookmark related commands provider.
 
ICapabilities Capabilities [get]
 Gets server capabilities in raw format.
 
ChannelTypes ChannelType [get]
 Gets the communication channels type.
 
bool ChapSecurityEnabled [get, set]
 Gets or sets whenever additional CHAP security is enabled or not.
By default is turned on.
 
CommandsQueueing CommandsQueueing [get, set]
 Gets or sets Commands Queueing type.
Recommended value: CommandsQueueing.SendDirect - for Desktop applications; CommandsQueueing.SingleThread - for WP8, UWP & Xamarin.
 
string CommunicationAlias [get]
 Gets the communication chnnel alias.
 
string ConnectionId [get]
 
int ConnectionTimeoutS [get]
 Gets connection timeout in seconds.
This means how menay seconds server will keep the client connection alive before throws it away.
In order to be kept alive periodic live message should be send.
interval of live mesage should not excceed connection timeout.

 
ErrorCodes ErrorCode [get]
 Returns error code (if presents) of the last call.
 
IErrorHandlers ErrorHandlers [get]
 Gets the IErrorHandlers implementer.
Gives possibility to subscribe for and unsubscribe of communication errors.

 
string ErrorMessage [get]
 Returns error string (if presents) of the last call.
 
ExportsCommands Exports [get]
 Exports related cammands provider.
 
int HeartBeatTimeoutS [get]
 Gets value of the heart beat timeout in seconds.
Ususaly > 5s and between 1/2 and 2/3 of the ConnectionTimeoutS.

 
InvestigationExportsCommands InvestigationExports [get]
 Exports of the investigations related commands provider.
 
InvestigationCommands Investigations [get]
 Investigations related commands provider.
 
InvitaionCommands Invitation [get]
 Invitations related commands provider. Not always available on server.
Depends on the license.

 
string IpAddress [get]
 
ItemCommands Items [get]
 Items related commands provider.
 
MessageTypes MessageType = MessageTypes.Automatic [get, set]
 
MulticameraPlayback MulticameraPlayback [get]
 Multicamera playback related commands provider.
 
NotificationEventHandler NotificationEventHandler [get, set]
 Notifications event handler. Not always available on server.
Depends on the license.

 
NotificationCommands Notifications [get]
 Notifications releated commands provider.
Not always available on server.
Depends on the license.

 
bool PeriodicLiveMessage [get]
 Gets whenever periodic live message is tuned on.
 
bool PlainTextAuthentication [get]
 Gets whenever plain text authentication is supported or not. It is disabled by default in all the Mobile servers with version greather than or equals to 10.0a.
 
uint Port [get]
 
Ptz Ptz [get]
 PTZ related commands provider.
 
RegisteredDevicesCommands RegisteredDevices [get]
 Commands related to registered devices for notifications. Not always available on server.
Depends on the license.

 
bool RequireCommandEncryption [get, set]
 Gets or sets whenver to require commnds encryption or not.
 
Command.CommandResultTypes Result [get]
 Returns error status of the last call.
 
bool RunHeartBeat [get, set]
 Gets or sets whenever to run heart beat or not (aka sending Live message)
 
SequencesCommands Sequences [get]
 Sequences releated commands provider.
 
IServerCapabilities ServerCapabilities [get]
 Gets server capabilites.
 
IEnumerable< ServerEndpoint > ServerEndpoints [get]
 Enumeration of server end points.
 
IServerFeatures ServerFeatures [get]
 Gets server features.
 
SmartMapCommands SmartMap [get]
 SmartMap related commands provider.
 
IStateChange StateChange [get]
 Gets the IStateChange imelpementer. Gives possibility to subscribe for the changes in the connection.
 
ThumbnailCommands Thumbnail [get]
 Thumbnal ralated commands provider.
 
TwoStepVerification TwoStepVerification [get]
 Two-steps verification related commands provider.
 
UserIdentityParams UserIdentity [get]
 Get user identity.
 
UtilitiesCommands Utilities [get]
 Miscellaneous commands provider.
 
VideoCommands Video [get]
 Video related commands provider.
 
string VideoAlias [get]
 Gets the video channel alias.
 
IVideoFactory VideoFactory [get]
 Video Factory methods.
 
Views Views [get]
 Views related commands provider.
 
- Properties inherited from VideoOS.Mobile.SDK.Portable.Server.Interfaces.IErrorResult

Detailed Description

Main class for connection with the 'Mobile Server'.

Class for connection with 'Mobile Server'. Supports 'HTTP' and 'HTTPs' connection types. Could work in sync or asyc mode simultaneously. Should be disposed after finishing work with it. Disposion releases all the resourses and informs server that this connection should be terminated.

See also
IControl, IConnection
See also
IConnectionAsync, IAsyncModeCallback
See also
IConnectionAwait
See also
IConnectionSync, IErrorResult

Constructor & Destructor Documentation

◆ Connection() [1/2]

VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.Connection ( ChannelTypes channelType,
string ipAddress,
uint port,
string commandAlias = null,
bool plainAuthentication = false,
bool requireCommandEncryption = false,
List< Command.CommandKinds > commandEncryptionList = null,
IReadOnlyDictionary< string, string > headers = null,
string videoAlias = Constants::HttpVideoAlias,
string audioAlias = Constants::HttpAudioAlias )
inline

Constructor of the Communication object.

Parameters
channelTypeType of the channel for connection with the Mobile server - http or https
ipAddressIP address of the Mobile server or it's domain name
portPort for connection tot he Mobile server. By default http port is 8081, but https one - 8082
commandAliasHttp channel alias for the communication commands. If not changed on the server leave null or blank
plainAuthenticationWhenever to use plain text authentication or not. By default not - recommended
requireCommandEncryptionWhenever to perform commnds encryption. By default no.
commandEncryptionListList of commands to be encrypted. By default null.
headersAdditional headers to be given to the server. By default none.
videoAliasHttp channel alias for the video commands. If not changed on the server omit the parameter.
audioAliasHttp channel alias for the audio commands. If not changed on the server omit the parameter.

◆ Connection() [2/2]

VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.Connection ( ChannelTypes channelType,
string ipAddress,
uint port,
string connectionId,
IServerCapabilities serverCapabilities,
string commandAlias = null,
string videoAlias = Constants::HttpVideoAlias,
string audioAlias = Constants::HttpAudioAlias )
inline

Contrucutor from another existing connection and valid connection Id.

Parameters
channelTypeType of the channel for connection with the Mobile server - http or https
ipAddressIP address of the Mobile server or it's domain name
portPort for connection tot he Mobile server. By default http port is 8081, but https one - 8082
connectionIdConnection Id of existing conenction to the MobileServer
commandAliasHttp channel alias for the communication commands. If not changed on the server leave null or blank
videoAliasHttp channel alias for the video commands. If not changed on the server omit the parameter.
audioAliasHttp channel alias for the audio commands. If not changed on the server omit the parameter.

Member Function Documentation

◆ AddCommandForEncryption()

void VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.AddCommandForEncryption ( Command cmd)
inline

Adds command to the list of required encrypted commands.

Parameters
cmdCommand to be added.

◆ Connect() [1/2]

ConnectResponse VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.Connect ( ConnectParams connectParams,
TimeSpan timeout )
inline

Method for connecting to the Mobile Server

Implemented by Connection object.
Sends message to the Mobile and returns ConnectResponse on success.
Error status message could be obtained with query of IErrorResult.

Parameters
connectParamsConnection paramters used during Connect
timeoutTime to wait the responce from the server
Returns
ConnectResponse object

Implements VideoOS.Mobile.SDK.Portable.Server.Interfaces.IConnectionSync.

◆ Connect() [2/2]

IAsyncResult VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.Connect ( ConnectParams connectParams = null,
OnResponse< ConnectResponse > onSuccess = null,
OnResponse< ConnectResponse > onFail = null )
inline

Method for connecting to the Mobile Server

Implemented by Connection object.
Sends message to the Mobile and returns IAsyncResult.
If method succeeds IAsyncResult.AsyncState contains BaseCommandResponse.
Error status message could be obtained with query of IErrorResult (from the resulted IAsyncResult).

Parameters
connectParamsConnection paramters used during Connect
onSuccessCallback called on success
onFailCallback called on fail
Returns
IAsyncResult implementer

Implements VideoOS.Mobile.SDK.Portable.Server.Interfaces.IConnectionAsync.

◆ ConnectAsync()

async Task< ConnectResponse > VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.ConnectAsync ( ConnectParams connectParams,
TimeSpan timeout )
inline

Method for connecting to the Mobile Server

Implemented by Connection object.
Sends message to the Mobile and returns Task<ConnectResponse> on success.
Error status message could be obtained with query of IErrorResult.
Could be awaited.

Parameters
connectParamsConnection paramters used during Connect
timeoutTime to wait the responce from the server
Returns
Task<ConnectResponse>>

Implements VideoOS.Mobile.SDK.Portable.Server.Interfaces.IConnectionAwait.

◆ ConnectionEncryptionProperties()

delegate EncryptionProperties VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.ConnectionEncryptionProperties ( )

◆ Dispose() [1/2]

void VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.Dispose ( )
inline

◆ Dispose() [2/2]

virtual void VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.Dispose ( bool disposing,
bool quiet )
inlineprotectedvirtual

◆ DisposeQuiet()

void VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.DisposeQuiet ( )
inline

Method for quite disposion - if it is used Disconnect command is not sent to the server.

◆ GetEncryptedText()

string VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.GetEncryptedText ( string text)
inline

Encrypt text with connection shared key using AES algorithm.

Parameters
textText to be encrypted.
Returns

◆ GetEncryptionProperties()

EncryptionProperties VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.GetEncryptionProperties ( )
inline

Returns the Encryption properties.

Returns
EncryptionProperties

◆ LiveMessage() [1/2]

IAsyncResult VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.LiveMessage ( OnResponse< LiveMessageResponse > onSuccess = null,
OnResponse< LiveMessageResponse > onFail = null )
inline

Method for heard breathe to the Mobile Server.

Implemented by Connection object.
Sends message to the Mobile and returns IAsyncResult.
If method succeeds IAsyncResult.AsyncState contains BaseCommandResponse.
Error status message could be obtained with query of IErrorResult (from the resulted IAsyncResult).

Parameters
onSuccessCallback called on success
onFailCallback called on fail
Returns
IAsyncResult implementer

Implements VideoOS.Mobile.SDK.Portable.Server.Interfaces.IConnectionAsync.

◆ LiveMessage() [2/2]

LiveMessageResponse VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.LiveMessage ( TimeSpan timeout)
inline

Method for heard breathe to the Mobile Server

Implemented by Connection object.
Sends message to the Mobile and returns LiveMessageResponse.
If method succeeds result is true.
Error status message could be obtained with query of IErrorResult.

Parameters
timeoutTime to wait the responce from the server
Returns
LiveMessageResponse object

Implements VideoOS.Mobile.SDK.Portable.Server.Interfaces.IConnectionSync.

◆ LiveMessageAsync()

async Task< LiveMessageResponse > VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.LiveMessageAsync ( TimeSpan timeout)
inline

Method for heard breathe to the Mobile Server

Implemented by Connection object.
Sends message to the Mobile and returns Task<LiveMessageResponse>.
If method succeeds result is true.
Error status message could be obtained with query of IErrorResult.
Could be awaited.

Parameters
timeoutTime to wait the responce from the server
Returns
Task<LiveMessageResponse>

Implements VideoOS.Mobile.SDK.Portable.Server.Interfaces.IConnectionAwait.

◆ LogIn() [1/4]

BaseCommandResponse VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.LogIn ( LoginSettingsParams loginSettings,
LoginParams loginParams,
TimeSpan timeout )
inline
Parameters
loginSettings
loginParams
timeout
Returns

Implements VideoOS.Mobile.SDK.Portable.Server.Interfaces.IConnectionSync.

◆ LogIn() [2/4]

IAsyncResult VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.LogIn ( LoginSettingsParams loginSettings,
LoginParams loginParams = null,
OnResponse< BaseCommandResponse > onSuccess = null,
OnResponse< BaseCommandResponse > onFail = null )
inline

◆ LogIn() [3/4]

BaseCommandResponse VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.LogIn ( string username,
string password,
string clientType,
TimeSpan timeout,
UserType loginType = UserType::Unknown,
LoginParams loginParams = null )
inline

Method for log-in into the Mobile Server

Implemented by Connection object.
Sends message to the Mobile and returns BaseCommandResponse on success.
Error status message could be obtained with query of IErrorResult.

Parameters
usernameUsername for authentication in the system
passwordPassword for authentication in the system
clientTypeType of the client. If unknown or custom - use String.Empty.
timeoutTime to wait the responce from the server
loginParamsAdditional login paramteres, if any
Returns
BaseCommandResponse object

Implements VideoOS.Mobile.SDK.Portable.Server.Interfaces.IConnectionSync.

◆ LogIn() [4/4]

IAsyncResult VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.LogIn ( string username,
string password,
string clientType,
UserType loginType = UserType::Unknown,
LoginParams loginParams = null,
OnResponse< BaseCommandResponse > onSuccess = null,
OnResponse< BaseCommandResponse > onFail = null )
inline

Method for log-in into the Mobile Server

Implemented by Connection object.
Sends message to the Mobile and returns IAsyncResult.
If method succeeds IAsyncResult.AsyncState contains BaseCommandResponse.
Error status message could be obtained with query of IErrorResult (from the resulted IAsyncResult).

Parameters
usernameUsername for authentication in the system
passwordPassword for authentication in the system
clientTypeType of the client. If unknown or custom - use String.Empty.
loginParamsAdditional login paramteres, if any
onSuccessCallback called on success
onFailCallback called on fail
Returns
IAsyncResult implementer

Implements VideoOS.Mobile.SDK.Portable.Server.Interfaces.IConnectionAsync.

◆ LogInAsync() [1/2]

async Task< BaseCommandResponse > VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.LogInAsync ( LoginSettingsParams loginSettings,
LoginParams loginParams,
TimeSpan timeout )
inline
Parameters
loginSettings
loginParams
timeout
Returns

Implements VideoOS.Mobile.SDK.Portable.Server.Interfaces.IConnectionAwait.

◆ LogInAsync() [2/2]

async Task< BaseCommandResponse > VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.LogInAsync ( string username,
string password,
string clientType,
LoginParams loginParams,
TimeSpan timeout,
UserType loginType = UserType::Unknown )
inline

Method for log-in into the Mobile Server

Implemented by Connection object.
Sends message to the Mobile and returns Task<BaseCommandResponse> on success.
Error status message could be obtained with query of IErrorResult.
Could be awaited.

Parameters
usernameUsername for authentication in the system
passwordPassword for authentication in the system
clientTypeType of the client. If unknown or custom - use String.Empty.
loginParamsAdditional login paramteres, if any
timeoutTime to wait the responce from the server
Returns
Task<BaseCommandResponse>

Implements VideoOS.Mobile.SDK.Portable.Server.Interfaces.IConnectionAwait.

◆ OnReceivedResponse()

delegate void VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.OnReceivedResponse ( CommunicationEntry response)

◆ OnSendCommand()

delegate IAsyncResult VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.OnSendCommand ( Command tCommand)

◆ ProcessIAsyncResult()

void VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.ProcessIAsyncResult ( IAsyncResult result,
AsyncCallback callback,
TimeSpan timeout )
inline

Method for IAsyncModeCallback.

Implemented by Connection object.
Error status message could be obtained with query of IErrorResult (from the resulted IAsyncResult).

Parameters
resultIAsyncResult implementer which to be processed
callbackCallback for notification
timeoutTime to wait the responce from the server

Implements VideoOS.Mobile.SDK.Portable.Server.Interfaces.IAsyncModeCallback.

◆ ProcessResult()

BaseCommandResponse VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.ProcessResult ( IAsyncResult iResult,
TimeSpan timeout )
inline

Method for processing the result and waiting for specific timeout.
Usually used for sync commads implementation.

Parameters
iResultIAsyncResult object to be waited
timeoutTime to wait the responce from the server
Returns
BaseCommandResponse object

Implements VideoOS.Mobile.SDK.Portable.Server.Interfaces.IConnection.

◆ ProcessResultTask()

Task< BaseCommandResponse > VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.ProcessResultTask ( IAsyncResult asyncResult,
TimeSpan timeout )
inline

Method for processing the result and waiting for specific timeout.
Usually used for awaitable commads implementation.

Parameters
asyncResultIAsyncResult object to be waited
timeoutTime to wait the responce from the server
Returns
Task<BaseCommandResponse> object

Implements VideoOS.Mobile.SDK.Portable.Server.Interfaces.IConnection.

◆ RemoveEncryptedCommand()

void VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.RemoveEncryptedCommand ( Command cmd)
inline

Removes the command from the list of required encrypted commands.

Parameters
cmd

◆ SendCommand() [1/3]

IAsyncResult VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.SendCommand ( Command command,
OnResponse< BaseCommandResponse > onSuccess = null,
OnResponse< BaseCommandResponse > onFail = null,
string address = null )
inline

Method for sending the generic command to the Mobile server.
Implemented by the Connection object.

Parameters
commandCommand parameters
onSuccessCallback called on success
onFailCallback called on fail
addressOptional additional command alias. Used when commands are imeplented via REST API on different addresses.
Returns
IAsyncResult imeplementer

Implements VideoOS.Mobile.SDK.Portable.Server.Interfaces.IConnection.

◆ SendCommand() [2/3]

IAsyncResult VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.SendCommand ( CommunicationEntry entry,
OnResponse< BaseCommandResponse > onSuccess = null,
OnResponse< BaseCommandResponse > onFail = null )
inline

Method for sending the generic command to the Mobile server.
Implemented by the Connection object.

Parameters
entryCommunication entry
onSuccessCallback called on success
onFailCallback called on fail
Returns
IAsyncResult imeplementer

◆ SendCommand() [3/3]

IAsyncResult VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.SendCommand ( CommunicationEntry entry,
string connectionId,
OnResponse< BaseCommandResponse > onSuccess = null,
OnResponse< BaseCommandResponse > onFail = null )
inline

Method for sending the generic command to the Mobile server.
Implemented by the Connection object.

Parameters
entryCommunication entry
connectionIdId of the connection with the server
onSuccessCallback called on success
onFailCallback called on fail
Returns
IAsyncResult imeplementer

◆ SendCommand< T >()

IAsyncResult VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.SendCommand< T > ( Command command,
OnResponse< T > onSuccess,
OnResponse< T > onFail,
Func< BaseCommandResponse, T > factoryT,
string address = null )
inline

Generic Method for sending the generic command to the Mobile server.
Implemented by the Connection object.

Template Parameters
T
Parameters
commandCommand parameters
onSuccessCallback called on success
onFailCallback called on fail
factoryTFactory method for creation of the specific response type T derived from the BaseCommandResponse
addressOptional additional command alias. Used when commands are imeplented via REST API on different addresses.
Returns
IAsyncResult imeplementer

Implements VideoOS.Mobile.SDK.Portable.Server.Interfaces.IConnection.

Type Constraints
T :BaseCommandResponse 

◆ Start()

void VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.Start ( )
inline

◆ Stop()

void VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.Stop ( )
inline

Property Documentation

◆ AccessControl

AccessControlCommands VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.AccessControl
get

Access Control releated commands provider.

◆ Actions

ActionsCommands VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.Actions
get

Actions commands provider. (aka Outputs and Events)

◆ AddressBookService

AddressBookServiceCommands VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.AddressBookService
get

Address Book Service related commands provider. Not always available on server.
Depends on the license.

◆ Alarms

AlarmCommands VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.Alarms
get

Alarms related commands provider.

◆ Audio

AudioCommands VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.Audio
get

Audio related commands provider.

◆ AudioAlias

string VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.AudioAlias
get

Gets the audio channel alias.

◆ AudioFactory

IAudioFactory VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.AudioFactory
get

◆ AutoUpdateConfiguration

bool VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.AutoUpdateConfiguration
getset

Gets or sets whether server features configuration should be autoupdated.

◆ Bookmarks

BookmarkCommands VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.Bookmarks
get

Bookmark related commands provider.

◆ Capabilities

ICapabilities VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.Capabilities
get

Gets server capabilities in raw format.

◆ ChannelType

ChannelTypes VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.ChannelType
get

Gets the communication channels type.

See also
ChannelTypes

◆ ChapSecurityEnabled

bool VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.ChapSecurityEnabled
getset

Gets or sets whenever additional CHAP security is enabled or not.
By default is turned on.

◆ CommandsQueueing

CommandsQueueing VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.CommandsQueueing
getset

Gets or sets Commands Queueing type.
Recommended value: CommandsQueueing.SendDirect - for Desktop applications; CommandsQueueing.SingleThread - for WP8, UWP & Xamarin.

◆ CommunicationAlias

string VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.CommunicationAlias
get

Gets the communication chnnel alias.

◆ ConnectionId

string VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.ConnectionId
get

◆ ConnectionTimeoutS

int VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.ConnectionTimeoutS
get

Gets connection timeout in seconds.
This means how menay seconds server will keep the client connection alive before throws it away.
In order to be kept alive periodic live message should be send.
interval of live mesage should not excceed connection timeout.

◆ ErrorCode

ErrorCodes VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.ErrorCode
get

Returns error code (if presents) of the last call.

Implements VideoOS.Mobile.SDK.Portable.Server.Interfaces.IErrorResult.

◆ ErrorHandlers

IErrorHandlers VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.ErrorHandlers
get

Gets the IErrorHandlers implementer.
Gives possibility to subscribe for and unsubscribe of communication errors.

◆ ErrorMessage

string VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.ErrorMessage
get

Returns error string (if presents) of the last call.

Implements VideoOS.Mobile.SDK.Portable.Server.Interfaces.IErrorResult.

◆ Exports

ExportsCommands VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.Exports
get

Exports related cammands provider.

◆ HeartBeatTimeoutS

int VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.HeartBeatTimeoutS
get

Gets value of the heart beat timeout in seconds.
Ususaly > 5s and between 1/2 and 2/3 of the ConnectionTimeoutS.

◆ InvestigationExports

InvestigationExportsCommands VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.InvestigationExports
get

Exports of the investigations related commands provider.

◆ Investigations

InvestigationCommands VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.Investigations
get

Investigations related commands provider.

◆ Invitation

InvitaionCommands VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.Invitation
get

Invitations related commands provider. Not always available on server.
Depends on the license.

◆ IpAddress

string VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.IpAddress
get

◆ Items

ItemCommands VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.Items
get

Items related commands provider.

◆ MessageType

MessageTypes VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.MessageType = MessageTypes.Automatic
getset

◆ MulticameraPlayback

MulticameraPlayback VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.MulticameraPlayback
get

Multicamera playback related commands provider.

◆ NotificationEventHandler

NotificationEventHandler VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.NotificationEventHandler
getset

Notifications event handler. Not always available on server.
Depends on the license.

◆ Notifications

NotificationCommands VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.Notifications
get

Notifications releated commands provider.
Not always available on server.
Depends on the license.

◆ PeriodicLiveMessage

bool VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.PeriodicLiveMessage
get

Gets whenever periodic live message is tuned on.

◆ PlainTextAuthentication

bool VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.PlainTextAuthentication
get

Gets whenever plain text authentication is supported or not. It is disabled by default in all the Mobile servers with version greather than or equals to 10.0a.

◆ Port

uint VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.Port
get

◆ Ptz

Ptz VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.Ptz
get

PTZ related commands provider.

◆ RegisteredDevices

RegisteredDevicesCommands VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.RegisteredDevices
get

Commands related to registered devices for notifications. Not always available on server.
Depends on the license.

◆ RequireCommandEncryption

bool VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.RequireCommandEncryption
getset

Gets or sets whenver to require commnds encryption or not.

◆ Result

Command.CommandResultTypes VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.Result
get

Returns error status of the last call.

Implements VideoOS.Mobile.SDK.Portable.Server.Interfaces.IErrorResult.

◆ RunHeartBeat

bool VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.RunHeartBeat
getset

Gets or sets whenever to run heart beat or not (aka sending Live message)

◆ Sequences

SequencesCommands VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.Sequences
get

Sequences releated commands provider.

◆ ServerCapabilities

IServerCapabilities VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.ServerCapabilities
get

Gets server capabilites.

◆ ServerEndpoints

IEnumerable<ServerEndpoint> VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.ServerEndpoints
get

Enumeration of server end points.

◆ ServerFeatures

IServerFeatures VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.ServerFeatures
get

Gets server features.

◆ SmartMap

SmartMapCommands VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.SmartMap
get

SmartMap related commands provider.

◆ StateChange

IStateChange VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.StateChange
get

Gets the IStateChange imelpementer. Gives possibility to subscribe for the changes in the connection.

See also
ConnectionStates, ConnectionEventArgs

◆ Thumbnail

ThumbnailCommands VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.Thumbnail
get

Thumbnal ralated commands provider.

◆ TwoStepVerification

TwoStepVerification VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.TwoStepVerification
get

Two-steps verification related commands provider.

◆ UserIdentity

UserIdentityParams VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.UserIdentity
get

Get user identity.

◆ Utilities

UtilitiesCommands VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.Utilities
get

Miscellaneous commands provider.

◆ Video

VideoCommands VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.Video
get

Video related commands provider.

◆ VideoAlias

string VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.VideoAlias
get

Gets the video channel alias.

◆ VideoFactory

IVideoFactory VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.VideoFactory
get

Video Factory methods.

◆ Views

Views VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.Views
get

Views related commands provider.