This class is used for stand alone applications and services that need to handle multiple users logging in to the same set of server(s).
Some functions and methods are required to be called though this class instead of the usual Configuration.Instance.SomeMethod.
More...
Public Member Functions | |
void | AddLoginSettings (LoginSettings loginSettings) |
Add a LoginSetting to the cache. The cache holds information for logging in to all known servers. A plugin can also save it's own server side login, if it choose to. When working through the normal EnvironmentManager and Configuration classes, a plugin should not add any Milestone servers to this list, it is done automatically. | |
void | Clear () |
Clear the entire cache. | |
LoginSettings | GetLoginSettings (FQID fqid) |
Get one specific LoginSetting. The lookup will look for a login server id in the FQID.ServerId.Id, and all its parents. This method should be used when the Item is a camera, audio or any other single device. | |
LoginSettings | GetLoginSettings (Guid serverGuid) |
Get one specific LoginSetting, indexed by Guid. Please note that before logon and configuration has been received from the server side, the Guid may not be filled. (It is then Guid.Empty) Note: It is recommended to use the FQID version whenever possible. | |
LoginSettings | GetLoginSettings (ServerId serverId) |
Get one specific LoginSetting, by use of different information in the ServerId. The lookup will try the to match the login settings by both Guid and a normalized Host from the Uri. Note: It is recommended to use the FQID version whenever possible. | |
LoginSettings | GetLoginSettings (String hostName, int port=0) |
Get one specific LoginSetting. The lookup will try the to match the login settings by a normalized Host from the Uri. | |
NetworkCredential | GetNetworkCredential (ServerId serverId) |
Returns the NetworkCredential used for connecting to a specific server. If no LoginSettings is available for the given ServerId, then the EnvironmentManager.Instance.LoginNetworkCredential is returned. | |
void | RemoveLoginSettings (LoginSettings loginSettings) |
Remove a specific LoginSettings from the cache. Please only do this when all other references to the LoginSettings are gone. This method should only be used by internal MIP abstraction layers. | |
bool | SetPrivacyMaskLifted (bool liftMask) |
Sets the privacy mask on or off. | |
UserContext () | |
Used internally within .Net library (Internal use only) | |
Public Attributes | |
Guid | InstanceGuid = Guid.NewGuid() |
Identify this specific instance. | |
EventHandler | PrivacyMaskLiftChanged = delegate { } |
Used internally to indicate when privacy mask lifted flag has changed. | |
Properties | |
String | ClientType [get, set] |
Used internally for client type checking. | |
Configuration | Configuration [get, set] |
Used for accessing the configuration relevant for the user in this context. | |
CredentialCache | CredentialCache [get, set] |
The credentials for this user. | |
LogClient | LogClient [get, set] |
Used for accessing the log client relevant for the user in this context. | |
List< LoginSettings > | LoginSettings [get] |
Get the complete list of all LoginSettings. | |
bool | PrivacyMaskLifted [get] |
This property indicates the current state for showing liftable privacy masks. | |
This class is used for stand alone applications and services that need to handle multiple users logging in to the same set of server(s).
Some functions and methods are required to be called though this class instead of the usual Configuration.Instance.SomeMethod.
|
inline |
Used internally within .Net library (Internal use only)
|
inline |
Add a LoginSetting to the cache. The cache holds information for logging in to all known servers. A plugin can also save it's own server side login, if it choose to. When working through the normal EnvironmentManager and Configuration classes, a plugin should not add any Milestone servers to this list, it is done automatically.
loginSettings |
|
inline |
Clear the entire cache.
|
inline |
Get one specific LoginSetting. The lookup will look for a login server id in the FQID.ServerId.Id, and all its parents. This method should be used when the Item is a camera, audio or any other single device.
|
inline |
Get one specific LoginSetting, indexed by Guid. Please note that before logon and configuration has been received from the server side, the Guid may not be filled. (It is then Guid.Empty) Note: It is recommended to use the FQID version whenever possible.
serverGuid |
|
inline |
Get one specific LoginSetting, by use of different information in the ServerId. The lookup will try the to match the login settings by both Guid and a normalized Host from the Uri. Note: It is recommended to use the FQID version whenever possible.
serverId |
|
inline |
Get one specific LoginSetting. The lookup will try the to match the login settings by a normalized Host from the Uri.
hostName | |
port | Specify for non-default ports |
|
inline |
Returns the NetworkCredential used for connecting to a specific server.
If no LoginSettings is available for the given ServerId, then the EnvironmentManager.Instance.LoginNetworkCredential is returned.
serverId | The server to get the NetworkCredentials for |
|
inline |
Remove a specific LoginSettings from the cache. Please only do this when all other references to the LoginSettings are gone. This method should only be used by internal MIP abstraction layers.
loginSettings |
|
inline |
Sets the privacy mask on or off.
Notice: that user needs to have the correct rights to perform this change.
liftMask | True when mask should not be shown |
Guid VideoOS.Platform.UserContext.InstanceGuid = Guid.NewGuid() |
Identify this specific instance.
EventHandler VideoOS.Platform.UserContext.PrivacyMaskLiftChanged = delegate { } |
Used internally to indicate when privacy mask lifted flag has changed.
|
getset |
Used internally for client type checking.
|
getset |
Used for accessing the configuration relevant for the user in this context.
|
getset |
The credentials for this user.
|
getset |
Used for accessing the log client relevant for the user in this context.
|
get |
Get the complete list of all LoginSettings.
|
get |
This property indicates the current state for showing liftable privacy masks.
The state is set by calling the SetPrivacyMaskLifted method.