Class ConnectionProfileManager
Definition
- Namespace:
- Tizen.Network.Connection
- Assembly:
- Tizen.Network.Connection.dll
- API Level:
- 3
This is the ConnectionProfileManager class. It provides functions to add, get, connect, or modify the connection profile.
public static class ConnectionProfileManager
- Inheritance
-
ConnectionProfileManager
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 |
---|---|
NotSupportedException | Thrown when a feature is not supported. |
UnauthorizedAccessException | Thrown when a permission is denied. |
ArgumentException | Thrown when a value is an invalid parameter. |
ArgumentNullException | Thrown when a value is null. |
OutOfMemoryException | Thrown when memory is not enough to continue execution. |
InvalidOperationException | Thrown when connection or profile instance is invalid or when a method fails due to an invalid operation. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/network.profilehttp://tizen.org/privilege/network.get
Feature: http://tizen.org/feature/network.telephonyhttp://tizen.org/feature/network.wifihttp://tizen.org/feature/network.tethering.bluetoothhttp://tizen.org/feature/network.ethernet
View SourceConnectProfileAsync(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 |
---|---|
Task | A task indicates whether the ConnectProfileAsync method is done successfully or not. |
Remarks
This method must be called from MainThread.
Exceptions
Type | Condition |
---|---|
NotSupportedException | Thrown when a feature is not supported. |
UnauthorizedAccessException | Thrown when a permission is denied. |
ArgumentException | Thrown when value is an invalid parameter. |
ArgumentNullException | Thrown when a value is null. |
OutOfMemoryException | Thrown when memory is not enough to continue execution. |
InvalidOperationException | Thrown when a connection or a profile instance is invalid or when a method fails due to an invalid operation. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/network.gethttp://tizen.org/privilege/network.set
Feature: http://tizen.org/feature/network.telephonyhttp://tizen.org/feature/network.wifihttp://tizen.org/feature/network.tethering.bluetoothhttp://tizen.org/feature/network.ethernet
View SourceDisconnectProfileAsync(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 |
---|---|
Task | A task indicates whether the DisconnectProfileAsync method is done successfully or not. |
Remarks
This method must be called from MainThread.
Exceptions
Type | Condition |
---|---|
NotSupportedException | Thrown when a feature is not supported. |
UnauthorizedAccessException | Thrown when a permission is denied. |
ArgumentException | Thrown when a value is an invalid parameter. |
ArgumentNullException | Thrown when a value is null. |
OutOfMemoryException | Thrown when memory is not enough to continue execution. |
InvalidOperationException | Thrown when a connection or a profile instance is invalid or when a method fails due to invalid operation. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/network.gethttp://tizen.org/privilege/network.set
Feature: http://tizen.org/feature/network.telephonyhttp://tizen.org/feature/network.wifihttp://tizen.org/feature/network.tethering.bluetoothhttp://tizen.org/feature/network.ethernet
View SourceGetCurrentProfile()
Gets the name of the default profile.
Declaration
public static ConnectionProfile GetCurrentProfile()
Returns
Type | Description |
---|---|
ConnectionProfile | Connection profile object. |
Exceptions
Type | Condition |
---|---|
NotSupportedException | Thrown when a feature is not supported. |
UnauthorizedAccessException | Thrown when a permission is denied. |
OutOfMemoryException | Thrown when memory is not enough to continue execution. |
InvalidOperationException | Thrown when a connection instance is invalid or when a method fails due to an invalid operation. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/network.get
Feature: http://tizen.org/feature/network.telephonyhttp://tizen.org/feature/network.wifihttp://tizen.org/feature/network.tethering.bluetoothhttp://tizen.org/feature/network.ethernet
View SourceGetDefaultCellularProfile(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 |
---|---|
NotSupportedException | Thrown when a feature is not supported. |
UnauthorizedAccessException | Thrown when a permission is denied. |
ArgumentException | Thrown when a value is an invalid parameter. |
OutOfMemoryException | Thrown when memory is not enough to continue execution. |
InvalidOperationException | Thrown when a connection instance is invalid or when a method fails due to an invalid operation. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/network.get
Feature: http://tizen.org/feature/network.telephonyhttp://tizen.org/feature/network.wifihttp://tizen.org/feature/network.tethering.bluetoothhttp://tizen.org/feature/network.ethernet
View SourceGetProfileListAsync(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 |
---|---|
Task<IEnumerable<ConnectionProfile>> | List of connection profile objects. |
Exceptions
Type | Condition |
---|---|
NotSupportedException | Thrown when a feature is not supported. |
UnauthorizedAccessException | Thrown when a permission is denied. |
ArgumentException | Thrown when value is an invalid parameter. |
OutOfMemoryException | Thrown when memory is not enough to continue execution. |
InvalidOperationException | Thrown when a connection instance has been disposed. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/network.get
Feature: http://tizen.org/feature/network.telephonyhttp://tizen.org/feature/network.wifihttp://tizen.org/feature/network.tethering.bluetoothhttp://tizen.org/feature/network.ethernet
View SourceRemoveProfile(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 |
---|---|
NotSupportedException | Thrown when a feature is not supported. |
UnauthorizedAccessException | Thrown when a permission is denied. |
ArgumentException | Thrown when value is an invalid parameter. |
ArgumentNullException | Thrown when a value is null. |
OutOfMemoryException | Thrown when memory is not enough to continue execution. |
InvalidOperationException | Thrown when a connection or a profile instance is invalid or when a method fails due to invalid operation. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/network.gethttp://tizen.org/privilege/network.profile
Feature: http://tizen.org/feature/network.telephonyhttp://tizen.org/feature/network.wifihttp://tizen.org/feature/network.tethering.bluetoothhttp://tizen.org/feature/network.ethernet
View SourceSetDefaultCellularProfile(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 |
---|---|
Task | A task indicates whether the SetDefaultCellularProfile method is done successfully or not. |
Remarks
This method must be called from MainThread.
Exceptions
Type | Condition |
---|---|
NotSupportedException | Thrown when a feature is not supported. |
UnauthorizedAccessException | Thrown when a permission is denied. |
ArgumentException | Thrown when a value is an invalid parameter. |
ArgumentNullException | Thrown when a value is null. |
OutOfMemoryException | Thrown when memory is not enough to continue execution. |
InvalidOperationException | Thrown when a connection or a profile instance is invalid or when a method fails due to invalid operation. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/network.gethttp://tizen.org/privilege/network.profile
Feature: http://tizen.org/feature/network.telephonyhttp://tizen.org/feature/network.wifihttp://tizen.org/feature/network.tethering.bluetoothhttp://tizen.org/feature/network.ethernet
View SourceUpdateProfile(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 |
---|---|
NotSupportedException | Thrown when a feature is not supported. |
UnauthorizedAccessException | Thrown when a permission is denied. |
ArgumentException | Thrown when a value is an invalid parameter. |
ArgumentNullException | Thrown when a value is null. |
OutOfMemoryException | Thrown when memory is not enough to continue execution. |
InvalidOperationException | Thrown when a connection or a profile instance is invalid or when a method fails due to an invalid operation. |