tv-service  0.1.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
tv_service_proxy_utils.h File Reference
#include <glib.h>
#include "tv_service_proxy_base.h"

Go to the source code of this file.

Data Structures

struct  GetTimeResult
 

Typedefs

typedef gpointer TvServiceUtils
 
typedef void(* TvServiceUtilsCallback )(TvServiceUtilsEvent event, gpointer data, gpointer user_data)
 

Enumerations

enum  TvServiceUtilsEvent { TV_SERVICE_UTILS_EVENT_NONE, TV_SERVICE_UTILS_EVENT_GET_TIME, TV_SERVICE_UTILS_EVENT_MAX }
 
enum  UtilsGetTimeResultType {
  UTILS_GET_TIME_SUCCESS, UTILS_GET_TIME_FAIL_TUNER_LOCK_FAIL, UTILS_GET_TIME_FAIL_GET_STT_FAIL, UTILS_GET_TIME_FAIL_NOT_AVAIABLE,
  UTILS_GET_TIME_MAX
}
 

Functions

gint tv_service_utils_create ()
 
gint tv_service_utils_register_callback (TvServiceUtilsCallback callback_func, gpointer user_data)
 
gint tv_service_utils_get_time (gint service_id)
 
gint tv_service_utils_destroy ()
 

Detailed Description

This API is not official tv-service API. It can always be changed without announcement.

Typedef Documentation

typedef gpointer TvServiceUtils
typedef void(* TvServiceUtilsCallback)(TvServiceUtilsEvent event, gpointer data, gpointer user_data)

Enumeration Type Documentation

An enumeration. Enumeration define utils event type.

Enumerator:
TV_SERVICE_UTILS_EVENT_NONE 
TV_SERVICE_UTILS_EVENT_GET_TIME 
TV_SERVICE_UTILS_EVENT_MAX 

An enumeration. Enumeration define get-time result type.

Enumerator:
UTILS_GET_TIME_SUCCESS 
UTILS_GET_TIME_FAIL_TUNER_LOCK_FAIL 
UTILS_GET_TIME_FAIL_GET_STT_FAIL 
UTILS_GET_TIME_FAIL_NOT_AVAIABLE 
UTILS_GET_TIME_MAX 

Function Documentation

gint tv_service_utils_create ( )

This function creates a utils proxy.

Returns
This function returns zero on success, or negative value with error code.
See Also
tv_service_utils_create.
Remarks
You can create multiple handles on a context at the same time.
However, live cannot guarantee proper operation because of limitation of resources,
such as audio device or display device.
Examples:
tv_service_utils_test.c.
gint tv_service_utils_destroy ( )

This function destroy a utils proxy.

Returns
This function returns zero on success, or negative value with error code.
See Also
tv_service_utils_create.
Remarks
You can create multiple handles on a context at the same time. However, live cannot guarantee proper operation because of limitation of resources, such as audio device or display device.
Examples:
tv_service_utils_test.c.
gint tv_service_utils_get_time ( gint  service_id)

This function get the stt tables time.

Parameters
service_id[in] the service(channel) index.
Returns
This function returns zero on success, or negative value with error code.
See Also
tv_service_utils_get_time.
Remarks
You can create multiple handles on a context at the same time.
However, live cannot guarantee proper operation because of limitation of resources,
such as audio device or display device.
Examples:
tv_service_utils_test.c.
gint tv_service_utils_register_callback ( TvServiceUtilsCallback  callback_func,
gpointer  user_data 
)

tv_service_utils_register_callback

This function register callback to TV Service

Parameters
callback_func[in] callback handle,
user_data[in] user data,
Returns
This function returns zero on success, or negative value with error code.
Examples:
tv_service_utils_test.c.