Tizen Native API
5.0
|
The STC Manager API provides functions for managing STC.
#include <stc.h>
To use STC manager API, first create the STC handle using stc_initialize(). After that, you can obtain STC information. You should destroy the created STC handle if you do not need it anymore. The STC manager API provides functions for managing STC. Using the STC manager, you can implement features that allow the users of your application to:
This API is related with the following features:
It is recommended to use features 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 using features in your application can be found in the Feature Element.
Functions | |
int | stc_get_stats (stc_h stc, stc_stats_rule_h rule, stc_stats_info_cb info_cb, void *user_data) |
Gets the statistics information an application matched rule asynchronously. | |
int | stc_foreach_stats (stc_h stc, stc_stats_rule_h rule, stc_stats_info_cb info_cb, void *user_data) |
Gets the statistics information of each application asynchronously. | |
int | stc_get_total_stats (stc_h stc, stc_stats_rule_h rule, stc_stats_info_cb info_cb, void *user_data) |
Gets the total statistics information by interface type asynchronously. | |
Typedefs | |
typedef stc_callback_ret_e(* | stc_stats_info_cb )(stc_error_e result, stc_stats_info_h info, void *user_data) |
Called for each available statistics information. |
typedef stc_callback_ret_e(* stc_stats_info_cb)(stc_error_e result, stc_stats_info_h info, void *user_data) |
Called for each available statistics information.
[in] | result | The result, one of: STC_ERROR_INVALID_OPERATION No reply STC_ERROR_OPERATION_FAILED Operation failed STC_ERROR_PERMISSION_DENIED Access or permission denied |
[in] | info | The statistics information handle |
[in] | user_data | The user data passed from the statistics provider function |
enum stc_callback_ret_e |
enum stc_conn_period_e |
Enumeration for network connection period type.
Last received/sent mean counting data from the first connection of each interface.
enum stc_iface_type_e |
enum stc_process_state_e |
enum stc_protocol_type_e |
Enumeration for hardware network protocol type.
enum stc_roaming_type_e |
enum stc_time_period_e |
int stc_foreach_stats | ( | stc_h | stc, |
stc_stats_rule_h | rule, | ||
stc_stats_info_cb | info_cb, | ||
void * | user_data | ||
) |
Gets the statistics information of each application asynchronously.
The callback is called for each application that used network in between timestamps specified. If interface name is not specified, each application will only appear once with the total traffic used over all interfaces.
[in] | stc | The STC handle |
[in] | rule | The statistics rule handle |
[in] | info_cb | The callback is called for each application that used network in between timestamps specified |
[in] | user_data | The user data passed to the callback function |
STC_ERROR_NONE | Successful |
STC_ERROR_OPERATION_FAILED | General error |
STC_ERROR_OUT_OF_MEMORY | Out of memory |
STC_ERROR_INVALID_PARAMETER | Invalid parameter |
STC_ERROR_INVALID_OPERATION | Invalid operation |
STC_ERROR_NOT_INITIALIZED | Not initialized |
STC_ERROR_NOT_SUPPORTED | Not supported |
STC_ERROR_PERMISSION_DENIED | Permission denied |
int stc_get_stats | ( | stc_h | stc, |
stc_stats_rule_h | rule, | ||
stc_stats_info_cb | info_cb, | ||
void * | user_data | ||
) |
Gets the statistics information an application matched rule asynchronously.
[in] | stc | The STC handle |
[in] | rule | The statistics rule handle |
[in] | info_cb | The callback is called for each application that used network in between timestamps specified |
[in] | user_data | The user data passed to the callback function |
STC_ERROR_NONE | Successful |
STC_ERROR_OPERATION_FAILED | General error |
STC_ERROR_OUT_OF_MEMORY | Out of memory |
STC_ERROR_INVALID_PARAMETER | Invalid parameter |
STC_ERROR_INVALID_OPERATION | Invalid operation |
STC_ERROR_NOT_INITIALIZED | Not initialized |
STC_ERROR_NOT_SUPPORTED | Not supported |
STC_ERROR_PERMISSION_DENIED | Permission denied |
int stc_get_total_stats | ( | stc_h | stc, |
stc_stats_rule_h | rule, | ||
stc_stats_info_cb | info_cb, | ||
void * | user_data | ||
) |
Gets the total statistics information by interface type asynchronously.
[in] | stc | The STC handle |
[in] | rule | The statistics rule handle |
[in] | info_cb | The callback is called for each application that used network in between timestamps specified |
[in] | user_data | The user data passed to the callback function |
STC_ERROR_NONE | Successful |
STC_ERROR_OPERATION_FAILED | General error |
STC_ERROR_OUT_OF_MEMORY | Out of memory |
STC_ERROR_INVALID_PARAMETER | Invalid parameter |
STC_ERROR_INVALID_OPERATION | Invalid operation |
STC_ERROR_NOT_INITIALIZED | Not initialized |
STC_ERROR_NOT_SUPPORTED | Not supported |
STC_ERROR_PERMISSION_DENIED | Permission denied |