Class ConnectionProfileManager
Definition
- Namespace:
- Tizen.Network.Connection
- Assembly:
- Tizen.Network.Connection.dll
This is the ConnectionProfileManager class. It provides functions to add, get, connect, or modify the connection profile.
public static class ConnectionProfileManager
- Inheritance
-
objectConnectionProfileManager
Methods
View SourceAddCellularProfile(CellularProfile)
Adds a new profile.
Declaration
public static void AddCellularProfile(CellularProfile profile)
Parameters
| Type | Name | Description |
|---|---|---|
| CellularProfile | profile | The cellular profile object. |
Exceptions
| Type | Condition |
|---|---|
| System.NotSupportedException | Thrown when a feature is not supported. |
| System.UnauthorizedAccessException | Thrown when a permission is denied. |
| System.ArgumentException | Thrown when a value is an invalid parameter. |
| System.ArgumentNullException | Thrown when a value is null. |
| System.OutOfMemoryException | Thrown when memory is not enough to continue execution. |
| System.InvalidOperationException | Thrown when connection or profile instance is invalid or when a method fails due to an invalid operation. |
ConnectProfileAsync(ConnectionProfile)
Opens a connection of profile asynchronously.
Declaration
public static Task ConnectProfileAsync(ConnectionProfile profile)
Parameters
| Type | Name | Description |
|---|---|---|
| ConnectionProfile | profile | The connection profile object. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task | A task indicates whether the ConnectProfileAsync method is done successfully or not. |
Remarks
This method must be called from MainThread.
Exceptions
| Type | Condition |
|---|---|
| System.NotSupportedException | Thrown when a feature is not supported. |
| System.UnauthorizedAccessException | Thrown when a permission is denied. |
| System.ArgumentException | Thrown when value is an invalid parameter. |
| System.ArgumentNullException | Thrown when a value is null. |
| System.OutOfMemoryException | Thrown when memory is not enough to continue execution. |
| System.InvalidOperationException | Thrown when a connection or a profile instance is invalid or when a method fails due to an invalid operation. |
DisconnectProfileAsync(ConnectionProfile)
Closes a connection of profile.
Declaration
public static Task DisconnectProfileAsync(ConnectionProfile profile)
Parameters
| Type | Name | Description |
|---|---|---|
| ConnectionProfile | profile | The connection profile object. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task | A task indicates whether the DisconnectProfileAsync method is done successfully or not. |
Remarks
This method must be called from MainThread.
Exceptions
| Type | Condition |
|---|---|
| System.NotSupportedException | Thrown when a feature is not supported. |
| System.UnauthorizedAccessException | Thrown when a permission is denied. |
| System.ArgumentException | Thrown when a value is an invalid parameter. |
| System.ArgumentNullException | Thrown when a value is null. |
| System.OutOfMemoryException | Thrown when memory is not enough to continue execution. |
| System.InvalidOperationException | Thrown when a connection or a profile instance is invalid or when a method fails due to invalid operation. |
GetCurrentProfile()
Gets the name of the default profile.
Declaration
public static ConnectionProfile GetCurrentProfile()
Returns
| Type | Description |
|---|---|
| ConnectionProfile | Connection profile object. |
Exceptions
| Type | Condition |
|---|---|
| System.NotSupportedException | Thrown when a feature is not supported. |
| System.UnauthorizedAccessException | Thrown when a permission is denied. |
| System.ArgumentException | Thrown when a value is an invalid parameter. |
| System.OutOfMemoryException | Thrown when memory is not enough to continue execution. |
| System.InvalidOperationException | Thrown when a connection instance is invalid or when a method fails due to an invalid operation. |
GetDefaultCellularProfile(CellularServiceType)
Gets the default profile, which provides the given cellular service.
Declaration
public static ConnectionProfile GetDefaultCellularProfile(CellularServiceType type)
Parameters
| Type | Name | Description |
|---|---|---|
| CellularServiceType | type | The cellular service type. |
Returns
| Type | Description |
|---|---|
| ConnectionProfile | Connection profile object. |
Exceptions
| Type | Condition |
|---|---|
| System.NotSupportedException | Thrown when a feature is not supported. |
| System.UnauthorizedAccessException | Thrown when a permission is denied. |
| System.ArgumentException | Thrown when a value is an invalid parameter. |
| System.OutOfMemoryException | Thrown when memory is not enough to continue execution. |
| System.InvalidOperationException | Thrown when a connection instance is invalid or when a method fails due to an invalid operation. |
GetProfileListAsync(ProfileListType)
Gets the list of the profile with the profile list type.
Declaration
public static Task<IEnumerable<ConnectionProfile>> GetProfileListAsync(ProfileListType type)
Parameters
| Type | Name | Description |
|---|---|---|
| ProfileListType | type | The type of profile. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<TResult><System.Collections.Generic.IEnumerable<T><ConnectionProfile>> | List of connection profile objects. |
Exceptions
| Type | Condition |
|---|---|
| System.NotSupportedException | Thrown when a feature is not supported. |
| System.UnauthorizedAccessException | Thrown when a permission is denied. |
| System.ArgumentException | Thrown when value is an invalid parameter. |
| System.OutOfMemoryException | Thrown when memory is not enough to continue execution. |
| System.InvalidOperationException | Thrown when a connection instance has been disposed. |
RemoveProfile(ConnectionProfile)
Removes an existing profile.
Declaration
public static void RemoveProfile(ConnectionProfile profile)
Parameters
| Type | Name | Description |
|---|---|---|
| ConnectionProfile | profile | The connection profile object. |
Exceptions
| Type | Condition |
|---|---|
| System.NotSupportedException | Thrown when a feature is not supported. |
| System.UnauthorizedAccessException | Thrown when a permission is denied. |
| System.ArgumentException | Thrown when value is an invalid parameter. |
| System.ArgumentNullException | Thrown when a value is null. |
| System.OutOfMemoryException | Thrown when memory is not enough to continue execution. |
| System.InvalidOperationException | Thrown when a connection or a profile instance is invalid or when a method fails due to invalid operation. |
SetDefaultCellularProfile(CellularServiceType, ConnectionProfile)
Sets the default profile, which provides the given cellular service.
Declaration
public static Task SetDefaultCellularProfile(CellularServiceType type, ConnectionProfile profile)
Parameters
| Type | Name | Description |
|---|---|---|
| CellularServiceType | type | The cellular service type. |
| ConnectionProfile | profile | The connection profile object. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task | A task indicates whether the SetDefaultCellularProfile method is done successfully or not. |
Remarks
This method must be called from MainThread.
Exceptions
| Type | Condition |
|---|---|
| System.NotSupportedException | Thrown when a feature is not supported. |
| System.UnauthorizedAccessException | Thrown when a permission is denied. |
| System.ArgumentException | Thrown when a value is an invalid parameter. |
| System.ArgumentNullException | Thrown when a value is null. |
| System.OutOfMemoryException | Thrown when memory is not enough to continue execution. |
| System.InvalidOperationException | Thrown when a connection or a profile instance is invalid or when a method fails due to invalid operation. |
UpdateProfile(ConnectionProfile)
Updates an existing profile. When a profile is changed, these changes will be not applied to the ConnectionProfileManager immediately. When you call this function, your changes affect the ConnectionProfileManager and the existing profile is updated.
Declaration
public static void UpdateProfile(ConnectionProfile profile)
Parameters
| Type | Name | Description |
|---|---|---|
| ConnectionProfile | profile | The connection profile object. |
Exceptions
| Type | Condition |
|---|---|
| System.NotSupportedException | Thrown when a feature is not supported. |
| System.UnauthorizedAccessException | Thrown when a permission is denied. |
| System.ArgumentException | Thrown when a value is an invalid parameter. |
| System.ArgumentNullException | Thrown when a value is null. |
| System.OutOfMemoryException | Thrown when memory is not enough to continue execution. |
| System.InvalidOperationException | Thrown when a connection or a profile instance is invalid or when a method fails due to an invalid operation. |