Class ConnectionManager
Definition
- Namespace:
- Tizen.Network.Connection
- Assembly:
- Tizen.Network.Connection.dll
- API Level:
- 3
This is the ConnectionManager class. It provides functions to manage data connections.
C#Copypublic static class ConnectionManager : object
- Inheritance
-
ConnectionManager
Properties
Declaration
C#Copypublic static ConnectionState BluetoothState { get; }
Property Value
Type | Description |
---|---|
ConnectionState | Bluetooth connection state. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/network.get
Feature: http://tizen.org/feature/network.tethering.bluetooth
Declaration
C#Copypublic static CellularState CellularState { get; }
Property Value
Type | Description |
---|---|
CellularState | Cellular network state. |
API Level: 3
Feature: http://tizen.org/feature/network.telephony
Declaration
C#Copypublic static ConnectionItem CurrentConnection { get; }
Property Value
Type | Description |
---|---|
ConnectionItem | Instance of ConnectionItem. |
API Level: 3
Declaration
C#Copypublic static EthernetCableState EthernetCableState { get; }
Property Value
Type | Description |
---|---|
EthernetCableState | Ethernet cable state. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/network.get
Feature: http://tizen.org/feature/network.ethernet
Declaration
C#Copypublic static ConnectionState EthernetState { get; }
Property Value
Type | Description |
---|---|
ConnectionState | Ethernet connection state. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/network.get
Feature: http://tizen.org/feature/network.ethernet
Declaration
C#Copypublic static ConnectionState WiFiState { get; }
Property Value
Type | Description |
---|---|
ConnectionState | WiFi connection state. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/network.get
Feature: http://tizen.org/feature/network.wifi
Methods
AddRoute(AddressFamily, String, System.Net.IPAddress, System.Net.IPAddress)
Adds a route to the routing table.
Declaration
C#Copypublic static void AddRoute(AddressFamily family, string interfaceName, System.Net.IPAddress hostAddress, System.Net.IPAddress gateway)
Parameters
Type | Name | Description |
---|---|---|
AddressFamily | family | The address family. |
String | interfaceName | The name of the network interface. |
System.Net.IPAddress | hostAddress | The IP address of the host. |
System.Net.IPAddress | gateway | The gateway address. |
API Level: 3
Declaration
C#Copypublic static CellularProfile CreateCellularProfile(ConnectionProfileType type, string keyword)
Parameters
Type | Name | Description |
---|---|---|
ConnectionProfileType | type | The type of profile. Cellular profile type is supported. |
String | keyword | The keyword included in profile name. |
Returns
Type | Description |
---|---|
CellularProfile | CellularProfile object. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/network.get
Feature: http://tizen.org/feature/network.telephonyhttp://tizen.org/feature/network.wifi
GetAllIPv6Addresses(ConnectionType)
Gets all the IPv6 addresses of the current connection.
Declaration
C#Copypublic static IEnumerable<System.Net.IPAddress> GetAllIPv6Addresses(ConnectionType type)
Parameters
Type | Name | Description |
---|---|---|
ConnectionType | type | The type of current network connection. |
Returns
Type | Description |
---|---|
IEnumerable<System.Net.IPAddress> | A list of IPv6 addresses of the connection. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/network.get
Feature: http://tizen.org/feature/network.ethernethttp://tizen.org/feature/network.telephonyhttp://tizen.org/feature/network.tethering.bluetoothhttp://tizen.org/feature/network.wifi
Declaration
C#Copypublic static SafeConnectionHandle GetConnectionHandle()
Returns
Type | Description |
---|---|
SafeConnectionHandle | Instance of SafeConnectionHandle. |
API Level: 3
Declaration
C#Copypublic static System.Net.IPAddress GetIPAddress(AddressFamily family)
Parameters
Type | Name | Description |
---|---|---|
AddressFamily | family | The address family. |
Returns
Type | Description |
---|---|
System.Net.IPAddress | IP address of the connection (global address in case of IPv6). |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/network.get
Feature: http://tizen.org/feature/network.ethernethttp://tizen.org/feature/network.telephonyhttp://tizen.org/feature/network.tethering.bluetoothhttp://tizen.org/feature/network.wifi
Declaration
C#Copypublic static string GetMacAddress(ConnectionType type)
Parameters
Type | Name | Description |
---|---|---|
ConnectionType | type | The type of current network connection. |
Returns
Type | Description |
---|---|
String | MAC address of the Wi-Fi or ethernet. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/network.get
Feature: http://tizen.org/feature/network.ethernethttp://tizen.org/feature/network.telephonyhttp://tizen.org/feature/network.tethering.bluetoothhttp://tizen.org/feature/network.wifi
Declaration
C#Copypublic static string GetProxy(AddressFamily family)
Parameters
Type | Name | Description |
---|---|---|
AddressFamily | family | The address family. |
Returns
Type | Description |
---|---|
String | Proxy address of the connection. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/network.get
Feature: http://tizen.org/feature/network.ethernethttp://tizen.org/feature/network.telephonyhttp://tizen.org/feature/network.tethering.bluetoothhttp://tizen.org/feature/network.wifi
Declaration
C#Copypublic static long GetStatistics(ConnectionType connectionType, StatisticsType statisticsType)
Parameters
Type | Name | Description |
---|---|---|
ConnectionType | connectionType | The type of connection (only WiFi and Cellular are supported). |
StatisticsType | statisticsType | The type of statistics. |
Returns
Type | Description |
---|---|
Int64 | The statistics information associated with statisticsType. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/network.get
Feature: http://tizen.org/feature/network.ethernethttp://tizen.org/feature/network.telephonyhttp://tizen.org/feature/network.tethering.bluetoothhttp://tizen.org/feature/network.wifi
RemoveRoute(AddressFamily, String, System.Net.IPAddress, System.Net.IPAddress)
Removes a route from the routing table.
Declaration
C#Copypublic static void RemoveRoute(AddressFamily family, string interfaceName, System.Net.IPAddress hostAddress, System.Net.IPAddress gateway)
Parameters
Type | Name | Description |
---|---|---|
AddressFamily | family | The address family. |
String | interfaceName | The name of network interface. |
System.Net.IPAddress | hostAddress | The IP address of the host. |
System.Net.IPAddress | gateway | The gateway address. |
API Level: 3
Declaration
C#Copypublic static void ResetStatistics(ConnectionType connectionType, StatisticsType statisticsType)
Parameters
Type | Name | Description |
---|---|---|
ConnectionType | connectionType | The type of connection (only WiFi and Cellular are supported). |
StatisticsType | statisticsType | The type of statistics. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/network.gethttp://tizen.org/privilege/network.set
Feature: http://tizen.org/feature/network.ethernethttp://tizen.org/feature/network.telephonyhttp://tizen.org/feature/network.tethering.bluetoothhttp://tizen.org/feature/network.wifi
Events
ConnectionTypeChanged
An event is called when the type of the current connection is changed.
Declaration
C#Copypublic static event EventHandler<ConnectionTypeEventArgs> ConnectionTypeChanged
Event Type
Type | Description |
---|---|
EventHandler<ConnectionTypeEventArgs> |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/network.get
Feature: http://tizen.org/feature/network.ethernethttp://tizen.org/feature/network.telephonyhttp://tizen.org/feature/network.tethering.bluetoothhttp://tizen.org/feature/network.wifi
Declaration
C#Copypublic static event EventHandler<EthernetCableStateEventArgs> EthernetCableStateChanged
Event Type
Type | Description |
---|---|
EventHandler<EthernetCableStateEventArgs> |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/network.get
Feature: http://tizen.org/feature/network.ethernet
Declaration
C#Copypublic static event EventHandler<AddressEventArgs> IPAddressChanged
Event Type
Type | Description |
---|---|
EventHandler<AddressEventArgs> |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/network.get
Feature: http://tizen.org/feature/network.ethernethttp://tizen.org/feature/network.telephonyhttp://tizen.org/feature/network.tethering.bluetoothhttp://tizen.org/feature/network.wifi
Declaration
C#Copypublic static event EventHandler<AddressEventArgs> ProxyAddressChanged
Event Type
Type | Description |
---|---|
EventHandler<AddressEventArgs> |