Tizen Native API
|
Functions | |
int | connection_get_statistics (connection_h connection, connection_type_e connection_type, connection_statistics_type_e statistics_type, long long *size) |
Gets the statistics information. | |
int | connection_reset_statistics (connection_h connection, connection_type_e connection_type, connection_statistics_type_e statistics_type) |
Resets the statistics information. |
The Connection Statistics API provides functions for getting the statistical information.
#include <net_connection.h>
The Connection allows you to track the data transfer information. Use the Connection statistics to gather and reset statistics on network usage, such as the size of the sent or received data, in bytes. It also provides methods for getting the cumulative size of packets sent or received.
This API is related with the following features:
It is recommended to design feature related codes in your application for reliability.
You can check if a device supports the related features for this API by using System Information, thereby controlling the procedure of your application.
To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.
More details on featuring your application can be found from Feature List.
Enumeration for statistics type.
int connection_get_statistics | ( | connection_h | connection, |
connection_type_e | connection_type, | ||
connection_statistics_type_e | statistics_type, | ||
long long * | size | ||
) |
Gets the statistics information.
[in] | connection | The connection handle |
[in] | connection_type | The type of connection (only CONNECTION_TYPE_WIFI and CONNECTION_TYPE_CELLULAR are supported) |
[in] | statistics_type | The type of statistics |
[out] | size | The received data size of the last cellular packet data connection (bytes) |
0
on success, otherwise negative error value CONNECTION_ERROR_NONE | Successful |
CONNECTION_ERROR_INVALID_PARAMETER | Invalid parameter |
CONNECTION_ERROR_OPERATION_FAILED | Operation failed |
CONNECTION_ERROR_NOT_SUPPORTED | Not Supported |
int connection_reset_statistics | ( | connection_h | connection, |
connection_type_e | connection_type, | ||
connection_statistics_type_e | statistics_type | ||
) |
Resets the statistics information.
[in] | connection | The connection handle |
[in] | connection_type | The type of connection (only CONNECTION_TYPE_WIFI and CONNECTION_TYPE_CELLULAR are supported) |
[in] | statistics_type | The type of statistics |
0
on success, otherwise negative error value CONNECTION_ERROR_NONE | Successful |
CONNECTION_ERROR_INVALID_PARAMETER | Invalid parameter |
CONNECTION_ERROR_OPERATION_FAILED | Operation failed |
CONNECTION_ERROR_PERMISSION_DENIED | Permission Denied |
CONNECTION_ERROR_NOT_SUPPORTED | Not Supported |