The STC Manager API provides functions for managing STC.
Required Header
#include <stc.h>
Overview
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:
- Reset / Get / Update the statistics information
- Set / Get / Remove / Exclude the restriction rule
Related Features
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) TIZEN_DEPRECATED_API |
| 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) TIZEN_DEPRECATED_API |
| Gets the statistics information of each application asynchronously.
|
int | stc_get_all_stats (stc_h stc, stc_stats_rule_h rule, stc_get_all_stats_finished_cb finished_cb, void *user_data) |
| Starts to get statistical information based on the rules asynchronously.
|
int | stc_foreach_all_stats (stc_all_stats_info_h info, stc_stats_info_cb info_cb, void *user_data) |
| Gets all statistical information.
|
int | stc_get_total_stats (stc_h stc, stc_stats_rule_h rule, stc_stats_info_cb info_cb, void *user_data) TIZEN_DEPRECATED_API |
| 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 whenever there is available statistical information.
|
typedef void(* | stc_get_all_stats_finished_cb )(stc_error_e result, stc_all_stats_info_h info, void *user_data) |
| Called when getting all statistical information is finished.
|
Typedef Documentation
Enumeration Type Documentation
Enumeration for return type of the callback.
- Since :
- 4.0
- Enumerator:
STC_CALLBACK_CANCEL |
Cancel
|
STC_CALLBACK_CONTINUE |
Continue
|
Enumeration for network connection period type.
Last received/sent mean counting data from the first connection of each interface.
- Since :
- 4.0
- Enumerator:
STC_CONN_PERIOD_UNKNOWN |
Unknown period
|
STC_CONN_PERIOD_LAST_RECEIVED_DATA |
Last received data
|
STC_CONN_PERIOD_LAST_SENT_DATA |
Last sent data
|
STC_CONN_PERIOD_TOTAL_RECEIVED_DATA |
Total received data
|
STC_CONN_PERIOD_TOTAL_SENT_DATA |
Total sent data
|
Enumeration for network interface type.
- Since :
- 4.0
- Enumerator:
STC_IFACE_UNKNOWN |
Unknown interface
|
STC_IFACE_DATACALL |
Mobile data
|
STC_IFACE_WIFI |
Wifi data
|
STC_IFACE_WIRED |
Wired interface
|
STC_IFACE_BLUETOOTH |
Bluetooth interface
|
STC_IFACE_ALL |
Enumerate all network interface types
|
Enumeration for monitored process state.
- Since :
- 4.0
- Enumerator:
STC_PROCESS_STATE_UNKNOWN |
Unknown state
|
STC_PROCESS_STATE_FOREGROUND |
Foreground state
|
STC_PROCESS_STATE_BACKGROUND |
Background state
|
Enumeration for hardware network protocol type.
- Since :
- 4.0
- Enumerator:
STC_PROTOCOL_UNKNOWN |
Network unknown
|
STC_PROTOCOL_DATACALL_NOSVC |
Network no service
|
STC_PROTOCOL_DATACALL_EMERGENCY |
Network emergency
|
STC_PROTOCOL_DATACALL_SEARCH |
Network search 1900
|
STC_PROTOCOL_DATACALL_2G |
Network 2G
|
STC_PROTOCOL_DATACALL_2_5G |
Network 2.5G
|
STC_PROTOCOL_DATACALL_2_5G_EDGE |
Network EDGE
|
STC_PROTOCOL_DATACALL_3G |
Network UMTS
|
STC_PROTOCOL_DATACALL_HSDPA |
Network HSDPA
|
STC_PROTOCOL_DATACALL_LTE |
Network LTE
|
Enumeration for network roaming type.
- Since :
- 4.0
- Enumerator:
STC_ROAMING_UNKNOWN |
Roaming unknown
|
STC_ROAMING_ENABLED |
In roaming
|
STC_ROAMING_DISABLED |
Not in roaming
|
Enumeration for time period.
- Since :
- 4.0
- Enumerator:
STC_TIME_PERIOD_UNKNOWN |
Unknown
|
STC_TIME_PERIOD_HOUR |
Hour
|
STC_TIME_PERIOD_DAY |
Day
|
STC_TIME_PERIOD_WEEK |
Week
|
STC_TIME_PERIOD_MONTH |
Month
|
Function Documentation
Gets all statistical information.
- Since :
- 5.5
- Parameters:
-
[in] | info | All statistics information handle |
[in] | info_cb | The callback is called for each application |
[in] | user_data | The user data passed to the callback function |
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
- Precondition:
- stc_get_all_stats() needs to be called and data needs to be received in stc_get_stats_finished_cb() before calling this function.
- Postcondition:
- This function invokes stc_stats_info_cb().
- See also:
- stc_get_all_stats()
-
stc_stats_info_cb()