Tizen Native API
5.0
|
The STC statistics API provides functions for managing STC statistics.
#include <stc.h>
To use STC statistics 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 statistics API provides functions for managing STC statistics.
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_stats_rule_create (stc_h stc, stc_stats_rule_h *rule) |
Creates the statistics rule handle. | |
int | stc_stats_rule_destroy (stc_stats_rule_h rule) |
Destroys the statistics rule handle. | |
int | stc_stats_rule_set_app_id (stc_stats_rule_h rule, const char *app_id) |
Sets the application ID for statistics rule. | |
int | stc_stats_rule_set_time_interval (stc_stats_rule_h rule, time_t from, time_t to) |
Sets the time interval for statistics rule. | |
int | stc_stats_rule_set_iface_type (stc_stats_rule_h rule, stc_iface_type_e iface_type) |
Sets the interface type for statistics rule. | |
int | stc_stats_rule_set_time_period (stc_stats_rule_h rule, stc_time_period_e time_period) |
Sets the time period for statistics rule. | |
int | stc_stats_rule_get_app_id (stc_stats_rule_h rule, char **app_id) |
Gets the application ID for statistics rule. | |
int | stc_stats_rule_get_time_interval (stc_stats_rule_h rule, time_t *from, time_t *to) |
Gets the time interval for statistics rule. | |
int | stc_stats_rule_get_iface_type (stc_stats_rule_h rule, stc_iface_type_e *iface_type) |
Gets the interface type for statistics rule. | |
int | stc_stats_rule_get_time_period (stc_stats_rule_h rule, stc_time_period_e *time_period) |
Gets the time period for statistics rule. | |
int | stc_stats_info_get_app_id (stc_stats_info_h info, char **app_id) |
Gets the application ID from statistics information. | |
int | stc_stats_info_get_iface_name (stc_stats_info_h info, char **iface_name) |
Gets the interface name from statistics information. | |
int | stc_stats_info_get_time_interval (stc_stats_info_h info, time_t *from, time_t *to) |
Gets the time interval from statistics information. | |
int | stc_stats_info_get_iface_type (stc_stats_info_h info, stc_iface_type_e *iface_type) |
Gets the interface type from statistics information. | |
int | stc_stats_info_get_counter (stc_stats_info_h info, int64_t *incoming, int64_t *outgoing) |
Gets the counters from statistics information. | |
int | stc_stats_info_get_roaming_type (stc_stats_info_h info, stc_roaming_type_e *roaming_type) |
Gets the roaming type from statistics information. | |
int | stc_stats_info_get_protocol_type (stc_stats_info_h info, stc_protocol_type_e *protocol) |
Gets the protocol type from statistics information. | |
int | stc_stats_info_get_process_state (stc_stats_info_h info, stc_process_state_e *state) |
Gets the process state from statistics information. | |
Typedefs | |
typedef void * | stc_stats_rule_h |
The statistics rule handle. | |
typedef void * | stc_stats_info_h |
The statistics information handle. |
typedef void* stc_stats_info_h |
The statistics information handle.
typedef void* stc_stats_rule_h |
The statistics rule handle.
int stc_stats_info_get_app_id | ( | stc_stats_info_h | info, |
char ** | app_id | ||
) |
Gets the application ID from statistics information.
[in] | info | The statistics information handle |
[out] | app_id | The application ID |
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 |
int stc_stats_info_get_counter | ( | stc_stats_info_h | info, |
int64_t * | incoming, | ||
int64_t * | outgoing | ||
) |
Gets the counters from statistics information.
[in] | info | The statistics information handle |
[out] | incoming | The incoming counter |
[out] | outgoing | The outgoing counter |
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 |
int stc_stats_info_get_iface_name | ( | stc_stats_info_h | info, |
char ** | iface_name | ||
) |
Gets the interface name from statistics information.
[in] | info | The statistics information handle |
[out] | iface_name | The interface name |
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 |
int stc_stats_info_get_iface_type | ( | stc_stats_info_h | info, |
stc_iface_type_e * | iface_type | ||
) |
Gets the interface type from statistics information.
[in] | info | The statistics information handle |
[out] | iface_type | The interface type |
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 |
int stc_stats_info_get_process_state | ( | stc_stats_info_h | info, |
stc_process_state_e * | state | ||
) |
Gets the process state from statistics information.
[in] | info | The statistics information handle |
[out] | state | The process state |
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 |
int stc_stats_info_get_protocol_type | ( | stc_stats_info_h | info, |
stc_protocol_type_e * | protocol | ||
) |
Gets the protocol type from statistics information.
[in] | info | The statistics information handle |
[out] | protocol | The protocol type |
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 |
int stc_stats_info_get_roaming_type | ( | stc_stats_info_h | info, |
stc_roaming_type_e * | roaming_type | ||
) |
Gets the roaming type from statistics information.
[in] | info | The statistics information handle |
[out] | roaming_type | The roaming type |
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 |
int stc_stats_info_get_time_interval | ( | stc_stats_info_h | info, |
time_t * | from, | ||
time_t * | to | ||
) |
Gets the time interval from statistics information.
[in] | info | The statistics information handle |
[out] | from | The beginning of the time interval |
[out] | to | The end of the time interval |
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 |
int stc_stats_rule_create | ( | stc_h | stc, |
stc_stats_rule_h * | rule | ||
) |
Creates the statistics rule handle.
[in] | stc | The STC handle |
[out] | rule | The statistics rule handle |
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 |
int stc_stats_rule_destroy | ( | stc_stats_rule_h | rule | ) |
Destroys the statistics rule handle.
[in] | rule | The statistics rule handle |
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 |
int stc_stats_rule_get_app_id | ( | stc_stats_rule_h | rule, |
char ** | app_id | ||
) |
Gets the application ID for statistics rule.
[in] | rule | The statistics rule handle |
[out] | app_id | The application ID |
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 |
int stc_stats_rule_get_iface_type | ( | stc_stats_rule_h | rule, |
stc_iface_type_e * | iface_type | ||
) |
Gets the interface type for statistics rule.
[in] | rule | The statistics rule handle |
[out] | iface_type | The interface type |
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 |
int stc_stats_rule_get_time_interval | ( | stc_stats_rule_h | rule, |
time_t * | from, | ||
time_t * | to | ||
) |
Gets the time interval for statistics rule.
[in] | rule | The statistics rule handle |
[out] | from | The beginning of the time interval |
[out] | to | The end of the time interval |
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 |
int stc_stats_rule_get_time_period | ( | stc_stats_rule_h | rule, |
stc_time_period_e * | time_period | ||
) |
Gets the time period for statistics rule.
[in] | rule | The statistics rule handle |
[out] | time_period | The time period |
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 |
int stc_stats_rule_set_app_id | ( | stc_stats_rule_h | rule, |
const char * | app_id | ||
) |
Sets the application ID for statistics rule.
[in] | rule | The statistics rule handle |
[in] | app_id | The application ID |
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 |
int stc_stats_rule_set_iface_type | ( | stc_stats_rule_h | rule, |
stc_iface_type_e | iface_type | ||
) |
Sets the interface type for statistics rule.
[in] | rule | The stats rule handle |
[in] | iface_type | The interface type |
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 |
int stc_stats_rule_set_time_interval | ( | stc_stats_rule_h | rule, |
time_t | from, | ||
time_t | to | ||
) |
Sets the time interval for statistics rule.
[in] | rule | The statistics rule handle |
[in] | from | The beginning of the time interval |
[in] | to | The end of the time interval |
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 |
int stc_stats_rule_set_time_period | ( | stc_stats_rule_h | rule, |
stc_time_period_e | time_period | ||
) |
Sets the time period for statistics rule.
[in] | rule | The statistics rule handle |
[in] | time_period | The time period |
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 |