Class Session
Definition
- Assembly:
- Tizen.System.Session.dll
Provides methods to manage subsession users. Allows to register for events triggered by operations on subsession users.
public sealed class Session
- Inheritance
-
Session
Fields
View SourceEmptyUser
Special subsession ID, which is always present and does not represent any user.
Declaration
public const string EmptyUser = ""
Field Value
| Type | Description |
|---|---|
| string |
MaxUserLength
Maximum length of any given user ID.
Declaration
public const int MaxUserLength = 20
Field Value
| Type | Description |
|---|---|
| int |
Properties
View SourceSessionUID
Gets session UID of this session object.
Declaration
public int SessionUID { get; }
Property Value
| Type | Description |
|---|---|
| int |
Methods
View SourceGetInstance(int)
Gets a Session object instance for a given sessionUID.
Declaration
public static Session GetInstance(int sessionUID)
Parameters
| Type | Name | Description |
|---|---|---|
| int | sessionUID | Session UID of a requested Session object instance |
Returns
| Type | Description |
|---|---|
| Session | Returns requested Session object |
Remarks
To ensure thread safety, explicit creation of Session object is not allowed.
SubsessionEventMarkAsDone(SubsessionEventArgs)
Mark event as completed.
Declaration
public void SubsessionEventMarkAsDone(SubsessionEventArgs subsessionEventArgs)
Parameters
| Type | Name | Description |
|---|---|---|
| SubsessionEventArgs | subsessionEventArgs | Event argument of the event (obtained from said event) |
Remarks
This method is assumed to be called from an event handler. You can only mark an event as completed if you registered for it in the same process.
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | Session UID of this object is invalid |
| IOException | Internal error |
| UnauthorizedAccessException | Not permitted |
| NotSupportedException | Not supported |
Events
View SourceAddUserWait
Event to be invoked when a new subession user is successfully added to this session.
Declaration
public event EventHandler<AddUserEventArgs> AddUserWait
Event Type
| Type | Description |
|---|---|
| EventHandler<AddUserEventArgs> |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | Session UID of this object is invalid |
| OutOfMemoryException | Out of memory |
| IOException | Internal error |
| UnauthorizedAccessException | Not permitted |
| NotSupportedException | Not supported |
RemoveUserWait
Event to be invoked when a subession user is successfully removed from this session.
Declaration
public event EventHandler<RemoveUserEventArgs> RemoveUserWait
Event Type
| Type | Description |
|---|---|
| EventHandler<RemoveUserEventArgs> |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | Session UID of this object is invalid |
| OutOfMemoryException | Out of memory |
| IOException | Internal error |
| UnauthorizedAccessException | Not permitted |
| NotSupportedException | Not supported |
SwitchUserCompleted
Event to be invoked when an existing subession user is successfully switched to an acvite state.
Declaration
public event EventHandler<SwitchUserCompletionEventArgs> SwitchUserCompleted
Event Type
| Type | Description |
|---|---|
| EventHandler<SwitchUserCompletionEventArgs> |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | Session UID of this object is invalid |
| OutOfMemoryException | Out of memory |
| IOException | Internal error |
| UnauthorizedAccessException | Not permitted |
| NotSupportedException | Not supported |
SwitchUserWait
Event to be invoked when an existing subession user has begun switching to an active state.
Declaration
public event EventHandler<SwitchUserWaitEventArgs> SwitchUserWait
Event Type
| Type | Description |
|---|---|
| EventHandler<SwitchUserWaitEventArgs> |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | Session UID of this object is invalid |
| OutOfMemoryException | Out of memory |
| IOException | Internal error |
| UnauthorizedAccessException | Not permitted |
| NotSupportedException | Not supported |