VideoOS.Platform.ServerId Class Reference

The ServerId holds enough information for creating a connection.
Typically this can be used to construct an URL.
For plug-in developed solutions the ServerId need to be understood by the plug-ins own ItemManager, as this class is the primary place for creating, deleting and getting Items.
More...

Public Member Functions

ServerId Clone ()
 Create clone of this class itself.
 
bool Contains (String match)
 Look through ServerHostName, ServerType and Id for a match.
 
override bool Equals (object otherObject)
 Compare this ServerId with the one given as parameter.
A complete compare is done for each field, except the ServerHostname that is normalized before compare is done. Normalization in this case will ignore leading 'http://', and convert 0.0.0.0 and 127.0.0.1 to 'localhost', as well as ignore the port and colon, before comparing.
 
override int GetHashCode ()
 Creates a hash code based on the ServerHostname.
 
 ServerId ()
 Empty constructor.
 
 ServerId (String type, String hostname, int port, Guid id)
 Create a ServerId with all fields present.
 
 ServerId (String type, String hostname, String port, Guid id)
 Overloaded version with port as a String.
 
 ServerId (String type, String scheme, String hostname, int port, Guid id)
 Overloaded construction to include scheme.
 
 ServerId (String type, String scheme, String hostname, String port, Guid id)
 Overloaded construction to include scheme and port as string.
 
override string ToString ()
 Override default ToString in order to be able to identify the server.
 

Static Public Member Functions

static bool operator!= (ServerId obj1, ServerId obj2)
 Will return true if the two references point to different objects and Equals(object) returns false.
 
static bool operator== (ServerId obj1, ServerId obj2)
 Will return true if the two references point to the same object or if Equals(object) returns true.
 

Public Attributes

Guid Id
 Id is the Guid that identify a specific server or set of configuration.
 
String ServerHostname
 The name or IP address of the server owning the item being identified.
 
int Serverport
 The TCP/IP port for this server.
 
String ServerScheme
 The http scheme to be used, default is http://.
 
String ServerType
 The type of server owning the Item being identified.
The XProtect VMS built-in server types are defined as const in this class.
The ServerId.CorporateManagementServerType ("XPCO") will refer to type of communication, more than product type. The XProtect Expert and Professional+, will also have the ServerType as CorporateManagementServerType.
 

Static Public Attributes

const String ArcusServerType = "ARCUS"
 Not supported any more.
 
const String BlkExportType = "BLK"
 Accessing exported video in BLK database format

 
const String CorporateManagementServerType = "XPCO"
 Identifies a XProtect Corporate management server.
 
const String CorporateRecordingServerType = "XPCORS"
 Identifies a XProtect Corporate recording server.
 
const String DefaultServerType = "XP"
 Identifies a Milestone server, type unknown.
 
const String EnterpriseServerType = "XPE"
 Not supported any more.
 
const String IniExportType = "INI"
 Accessing exported video in PQZ database format (multiple sources)
 
const String MobileServerType = "MOBILE"
 Not supported any more.
 
const String PqzExportType = "PQZ"
 Accessing exported video in PQZ database format.
 

Properties

bool IsExportType [get]
 Returns true if this ServerType is one of the 3 Export types (BLK, PQZ, INI)
 
Uri Uri [get]
 Construct an Uri from the ServerHostname and ServerPort.
 
UserContext UserContext [get, set]
 Identifies a specific user context. This is used when multiple users are logged on at the same time towards the same set of servers.
Field is initialized by the stand alone SDK Environment, and should not be modified by any application code.
 

Detailed Description

The ServerId holds enough information for creating a connection.
Typically this can be used to construct an URL.
For plug-in developed solutions the ServerId need to be understood by the plug-ins own ItemManager, as this class is the primary place for creating, deleting and getting Items.

The ServerId.Id MUST always be present.

For configurations saved on a Milestone server, the other fields are not used by the Environment but only by the plug-ins own ItemManager. If a plug-in solution creates Items in one of the administrators, saves the configuration with the Milestone configuration and uses the created Items in the Smart Client or Event Server, the content of this ServerId is not really identifying a server but should be seen as the top node of the plug-in configuration.

Constructor & Destructor Documentation

◆ ServerId() [1/5]

VideoOS.Platform.ServerId.ServerId ( )
inline

Empty constructor.

◆ ServerId() [2/5]

VideoOS.Platform.ServerId.ServerId ( String type,
String hostname,
int port,
Guid id )
inline

Create a ServerId with all fields present.

Parameters
typeThe type of server.
For XProtect video management servers a set of ServerTypes have been defined:
ServerId.CorporateManagementServerType - A XProtect Corporate Management server
ServerId.CorporateRecordingServerType - A XProtect Corporate Recording server
ServerId.DefaultServerType - A XProtect server, but type is not known.
hostname
port
id

◆ ServerId() [3/5]

VideoOS.Platform.ServerId.ServerId ( String type,
String hostname,
String port,
Guid id )
inline

Overloaded version with port as a String.

Parameters
type
hostname
port
id

◆ ServerId() [4/5]

VideoOS.Platform.ServerId.ServerId ( String type,
String scheme,
String hostname,
int port,
Guid id )
inline

Overloaded construction to include scheme.

Parameters
type
scheme
hostname
port
id

◆ ServerId() [5/5]

VideoOS.Platform.ServerId.ServerId ( String type,
String scheme,
String hostname,
String port,
Guid id )
inline

Overloaded construction to include scheme and port as string.

Parameters
type
scheme
hostname
port
id

Member Function Documentation

◆ Clone()

ServerId VideoOS.Platform.ServerId.Clone ( )
inline

Create clone of this class itself.

Returns

◆ Contains()

bool VideoOS.Platform.ServerId.Contains ( String match)
inline

Look through ServerHostName, ServerType and Id for a match.

Parameters
match
Returns

◆ Equals()

override bool VideoOS.Platform.ServerId.Equals ( object otherObject)
inline

Compare this ServerId with the one given as parameter.
A complete compare is done for each field, except the ServerHostname that is normalized before compare is done. Normalization in this case will ignore leading 'http://', and convert 0.0.0.0 and 127.0.0.1 to 'localhost', as well as ignore the port and colon, before comparing.

Parameters
otherObject
Returns

◆ GetHashCode()

override int VideoOS.Platform.ServerId.GetHashCode ( )
inline

Creates a hash code based on the ServerHostname.

Returns

◆ operator!=()

static bool VideoOS.Platform.ServerId.operator!= ( ServerId obj1,
ServerId obj2 )
inlinestatic

Will return true if the two references point to different objects and Equals(object) returns false.

Parameters
obj1
obj2
Returns

◆ operator==()

static bool VideoOS.Platform.ServerId.operator== ( ServerId obj1,
ServerId obj2 )
inlinestatic

Will return true if the two references point to the same object or if Equals(object) returns true.

Parameters
obj1
obj2
Returns

◆ ToString()

override string VideoOS.Platform.ServerId.ToString ( )
inline

Override default ToString in order to be able to identify the server.

Returns
String representation of the serverId

Member Data Documentation

◆ ArcusServerType

const String VideoOS.Platform.ServerId.ArcusServerType = "ARCUS"
static

Not supported any more.

◆ BlkExportType

const String VideoOS.Platform.ServerId.BlkExportType = "BLK"
static

Accessing exported video in BLK database format

◆ CorporateManagementServerType

const String VideoOS.Platform.ServerId.CorporateManagementServerType = "XPCO"
static

Identifies a XProtect Corporate management server.

◆ CorporateRecordingServerType

const String VideoOS.Platform.ServerId.CorporateRecordingServerType = "XPCORS"
static

Identifies a XProtect Corporate recording server.

◆ DefaultServerType

const String VideoOS.Platform.ServerId.DefaultServerType = "XP"
static

Identifies a Milestone server, type unknown.

◆ EnterpriseServerType

const String VideoOS.Platform.ServerId.EnterpriseServerType = "XPE"
static

Not supported any more.

◆ Id

Guid VideoOS.Platform.ServerId.Id

Id is the Guid that identify a specific server or set of configuration.

◆ IniExportType

const String VideoOS.Platform.ServerId.IniExportType = "INI"
static

Accessing exported video in PQZ database format (multiple sources)

◆ MobileServerType

const String VideoOS.Platform.ServerId.MobileServerType = "MOBILE"
static

Not supported any more.

◆ PqzExportType

const String VideoOS.Platform.ServerId.PqzExportType = "PQZ"
static

Accessing exported video in PQZ database format.

◆ ServerHostname

String VideoOS.Platform.ServerId.ServerHostname

The name or IP address of the server owning the item being identified.

◆ Serverport

int VideoOS.Platform.ServerId.Serverport

The TCP/IP port for this server.

◆ ServerScheme

String VideoOS.Platform.ServerId.ServerScheme

The http scheme to be used, default is http://.

This field is new from 2019, introduced to support https sessions.

◆ ServerType

String VideoOS.Platform.ServerId.ServerType

The type of server owning the Item being identified.
The XProtect VMS built-in server types are defined as const in this class.
The ServerId.CorporateManagementServerType ("XPCO") will refer to type of communication, more than product type. The XProtect Expert and Professional+, will also have the ServerType as CorporateManagementServerType.

Property Documentation

◆ IsExportType

bool VideoOS.Platform.ServerId.IsExportType
get

Returns true if this ServerType is one of the 3 Export types (BLK, PQZ, INI)

◆ Uri

Uri VideoOS.Platform.ServerId.Uri
get

Construct an Uri from the ServerHostname and ServerPort.

◆ UserContext

UserContext VideoOS.Platform.ServerId.UserContext
getset

Identifies a specific user context. This is used when multiple users are logged on at the same time towards the same set of servers.
Field is initialized by the stand alone SDK Environment, and should not be modified by any application code.