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.

C#
Copy
public static class ConnectionProfileManager
Inheritance
ConnectionProfileManager

Methods

View Source

AddCellularProfile(CellularProfile)

Adds a new profile.

Declaration
C#
Copy
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.

UnauthorizedAccessException

Thrown when a permission is denied.

System.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 Source

ConnectProfileAsync(ConnectionProfile)

Opens a connection of profile asynchronously.

Declaration
C#
Copy
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
System.NotSupportedException

Thrown when a feature is not supported.

UnauthorizedAccessException

Thrown when a permission is denied.

System.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 Source

DisconnectProfileAsync(ConnectionProfile)

Closes a connection of profile.

Declaration
C#
Copy
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
System.NotSupportedException

Thrown when a feature is not supported.

UnauthorizedAccessException

Thrown when a permission is denied.

System.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 Source

GetCurrentProfile()

Gets the name of the default profile.

Declaration
C#
Copy
public static ConnectionProfile GetCurrentProfile()
Returns
Type Description
ConnectionProfile

Connection profile object.

Exceptions
Type Condition
System.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 Source

GetDefaultCellularProfile(CellularServiceType)

Gets the default profile, which provides the given cellular service.

Declaration
C#
Copy
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.

UnauthorizedAccessException

Thrown when a permission is denied.

System.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 Source

GetProfileListAsync(ProfileListType)

Gets the list of the profile with the profile list type.

Declaration
C#
Copy
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<System.Collections.Generic.IEnumerable<ConnectionProfile>>

List of connection profile objects.

Exceptions
Type Condition
System.NotSupportedException

Thrown when a feature is not supported.

UnauthorizedAccessException

Thrown when a permission is denied.

System.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 Source

RemoveProfile(ConnectionProfile)

Removes an existing profile.

Declaration
C#
Copy
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.

UnauthorizedAccessException

Thrown when a permission is denied.

System.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 Source

SetDefaultCellularProfile(CellularServiceType, ConnectionProfile)

Sets the default profile, which provides the given cellular service.

Declaration
C#
Copy
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
System.NotSupportedException

Thrown when a feature is not supported.

UnauthorizedAccessException

Thrown when a permission is denied.

System.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 Source

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
C#
Copy
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.

UnauthorizedAccessException

Thrown when a permission is denied.

System.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.

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