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

Go to the source code of this file.

Data Structures

struct  TvServiceChannel
 
struct  TvServiceFilterNode
 

Macros

#define PROGRAM_NAME_MAX_LEN   25
 
#define CHANNEL_FILTER_STRING_MAX_LEN   100
 

Typedefs

typedef void(* TvServiceChannelCallback )(TvServiceChannelEvent event, gpointer data, gpointer user_data)
 

Enumerations

enum  TvServiceChannelDataAttr {
  TV_SERVICE_CHANNEL_DATA_NONE = 0, TV_SERVICE_CHANNEL_DATA_SERVICE_ID, TV_SERVICE_CHANNEL_DATA_FREQUENCY, TV_SERVICE_CHANNEL_DATA_MAJOR_NUMBER,
  TV_SERVICE_CHANNEL_DATA_MINOR_NUMBER, TV_SERVICE_CHANNEL_DATA_PROGRAM_NAME, TV_SERVICE_CHANNEL_DATA_REMEMBERED, TV_SERVICE_CHANNEL_DATA_MAX
}
 
enum  TvServiceChannelSortType { CHANNEL_SORT_TYPE_MAJOR_MINOR_NUMBER = 0x0, CHANNEL_SORT_TYPE_SERVICE_ID, CHANNEL_SORT_TYPE_PROGRAM_NAME, CHANNEL_SORT_TYPE_MAX }
 
enum  TvServiceChannelFilterMatchType {
  CHANNEL_FILTER_MATCH_NONE = 0, CHANNEL_FILTER_MATCH_EQUAL, CHANNEL_FILTER_MATCH_MORE, CHANNEL_FILTER_MATCH_LESS,
  CHANNEL_FILTER_MATCH_UNEQUAL, CHANNEL_FILTER_MATCH_CONTAIN, CHANNEL_FILTER_MATCH_MAX
}
 
enum  TvServiceChannelEvent {
  TV_SERVICE_CHANNEL_EVENT_NONE = 0, TV_SERVICE_CHANNEL_EVENT_CHANNEL_CHANGE, TV_SERVICE_CHANNEL_EVENT_ADD, TV_SERVICE_CHANNEL_EVENT_DELETE,
  TV_SERVICE_CHANNEL_EVENT_ADD_FAVORITE, TV_SERVICE_CHANNEL_EVENT_DELETE_FAVORITE, TV_SERVICE_CHANNEL_EVENT_SCANED, TV_SERVICE_CHANNEL_EVENT_MAX
}
 

Functions

gint tv_service_get_channel (gint service_id, TvServiceChannel *channel)
 
gint tv_service_get_channel_list (TvServiceChannelMode mode, TvServiceAntenna type, GList **channels)
 
gint tv_service_get_channel_list_ex (TvServiceChannelMode mode, TvServiceAntenna type, GList **channels, GList *filter, TvServiceChannelSortType sort_type)
 
gint tv_service_free_channel_list (GList *channels)
 
gint tv_service_channel_info_create ()
 
gint tv_service_channel_info_destroy ()
 
gint tv_service_add_channel (gint service_id)
 
gint tv_service_delete_channel (gint service_id)
 
gint tv_service_add_favorite_channel (gint service_id)
 
gint tv_service_delete_favorite_channel (gint service_id)
 
gint tv_service_lock_channel (gint service_id, gchar *password)
 
gint tv_service_unlock_channel (gint service_id, gchar *password)
 
gint tv_service_get_channel_locked (gint service_id, gboolean *lock)
 
gint tv_service_channel_info_register_callback (TvServiceChannelCallback callback_func, TvServiceChannelEvent event, gpointer user_data)
 
gint tv_service_channel_info_unregister_callback (TvServiceChannelEvent event)
 

Detailed Description

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

Macro Definition Documentation

#define CHANNEL_FILTER_STRING_MAX_LEN   100
#define PROGRAM_NAME_MAX_LEN   25

Typedef Documentation

typedef void(* TvServiceChannelCallback)(TvServiceChannelEvent event, gpointer data, gpointer user_data)

Enumeration Type Documentation

An enumeration. Enumeration for channel data attribute used in channel list filter.

Enumerator:
TV_SERVICE_CHANNEL_DATA_NONE 
TV_SERVICE_CHANNEL_DATA_SERVICE_ID 
TV_SERVICE_CHANNEL_DATA_FREQUENCY 
TV_SERVICE_CHANNEL_DATA_MAJOR_NUMBER 
TV_SERVICE_CHANNEL_DATA_MINOR_NUMBER 
TV_SERVICE_CHANNEL_DATA_PROGRAM_NAME 
TV_SERVICE_CHANNEL_DATA_REMEMBERED 
TV_SERVICE_CHANNEL_DATA_MAX 

An enumeration. Enumeration for channel event type.

Enumerator:
TV_SERVICE_CHANNEL_EVENT_NONE 
TV_SERVICE_CHANNEL_EVENT_CHANNEL_CHANGE 
TV_SERVICE_CHANNEL_EVENT_ADD 

should remove

TV_SERVICE_CHANNEL_EVENT_DELETE 
TV_SERVICE_CHANNEL_EVENT_ADD_FAVORITE 
TV_SERVICE_CHANNEL_EVENT_DELETE_FAVORITE 
TV_SERVICE_CHANNEL_EVENT_SCANED 
TV_SERVICE_CHANNEL_EVENT_MAX 

An enumeration. Enumeration for channel filter match type.

Enumerator:
CHANNEL_FILTER_MATCH_NONE 
CHANNEL_FILTER_MATCH_EQUAL 
CHANNEL_FILTER_MATCH_MORE 
CHANNEL_FILTER_MATCH_LESS 
CHANNEL_FILTER_MATCH_UNEQUAL 
CHANNEL_FILTER_MATCH_CONTAIN 
CHANNEL_FILTER_MATCH_MAX 

An enumeration. Enumeration for channel list sort type.

Enumerator:
CHANNEL_SORT_TYPE_MAJOR_MINOR_NUMBER 
CHANNEL_SORT_TYPE_SERVICE_ID 
CHANNEL_SORT_TYPE_PROGRAM_NAME 
CHANNEL_SORT_TYPE_MAX 

Function Documentation

gint tv_service_add_channel ( gint  service_id)

tv_service_add_channel

This function add channel which has been deleted

Parameters
service_id[in] service_id of channel
Returns
This function returns zero on success, or negative value with error code.
Examples:
tv_service_add_delete_channel_auto_test.c, and tv_service_add_delete_channel_test.c.
gint tv_service_add_favorite_channel ( gint  service_id)

tv_service_add_favorite_channel

This function add favorite channel which has been deleted

Parameters
service_id[in] service_id of channel
Returns
This function returns zero on success, or negative value with error code.
Examples:
tv_service_add_delete_favorite_channel_auto_test.c, and tv_service_add_delete_favorite_channel_test.c.
gint tv_service_channel_info_create ( )

tv_service_channel_info_create

This function initialize the tv_service_channel_info modules

Returns
This function returns zero on success, or negative value with error code.
Examples:
tv_service_add_delete_channel_auto_test.c, tv_service_add_delete_channel_test.c, tv_service_add_delete_favorite_channel_auto_test.c, tv_service_add_delete_favorite_channel_test.c, tv_service_channel_change_notify_test.c, tv_service_channel_lock_unlock_test.c, and tv_service_get_service_test.c.
gint tv_service_channel_info_destroy ( )

tv_service_channel_info_destroy

This function release resource of tv_service_channel_info modules

Returns
This function returns zero on success, or negative value with error code.
Examples:
tv_service_add_delete_channel_auto_test.c, tv_service_add_delete_channel_test.c, tv_service_add_delete_favorite_channel_auto_test.c, tv_service_add_delete_favorite_channel_test.c, tv_service_channel_change_notify_test.c, tv_service_channel_lock_unlock_test.c, and tv_service_get_service_test.c.
gint tv_service_channel_info_register_callback ( TvServiceChannelCallback  callback_func,
TvServiceChannelEvent  event,
gpointer  user_data 
)

tv_service_channel_info_register_callback

This function register callback to TV Service

Parameters
callback_func[in] callback handle,
event[in] event type,
user_data[in] user data,
Returns
This function returns zero on success, or negative value with error code.
Examples:
tv_service_channel_change_notify_test.c.
gint tv_service_channel_info_unregister_callback ( TvServiceChannelEvent  event)

tv_service_channel_info_unregister_callback

This function unregister callback event to TV Service

Parameters
event[in] event type,
Returns
This function returns zero on success, or negative value with error code.
Examples:
tv_service_channel_change_notify_test.c.
gint tv_service_delete_channel ( gint  service_id)

tv_service_delete_channel

This function delete channel

Parameters
service_id[in] service_id of channel
Returns
This function returns zero on success, or negative value with error code.
Examples:
tv_service_add_delete_channel_auto_test.c, and tv_service_add_delete_channel_test.c.
gint tv_service_delete_favorite_channel ( gint  service_id)

tv_service_delete_favorite_channel

This function delete favorite channel

Parameters
service_id[in] service_id of channel
Returns
This function returns zero on success, or negative value with error code.
Examples:
tv_service_add_delete_favorite_channel_auto_test.c, and tv_service_add_delete_favorite_channel_test.c.
gint tv_service_free_channel_list ( GList *  channels)

tv_service_free_channel_list

This function free channel list data.

Parameters
channels[in] channel list data
Returns
This function returns zero on success, or negative value with error code.
Examples:
tv_service_epg_test.c.
gint tv_service_get_channel ( gint  service_id,
TvServiceChannel channel 
)

tv_service_get_channel

This function get service data according to the service id.

Parameters
service_id[in] ID of the service.
channel[out] TvServiceChannel memory to store the service data.
Returns
This function returns zero on success, or negative value with error code.
Examples:
tv_service_add_delete_channel_auto_test.c, tv_service_add_delete_favorite_channel_auto_test.c, and tv_service_get_service_test.c.
gint tv_service_get_channel_list ( TvServiceChannelMode  mode,
TvServiceAntenna  type,
GList **  channels 
)

tv_service_get_channel_list_ex

This function get channel list data according to antennna mode.

Parameters
mode[in] the channel mode to be selected
type[in] the antenna type to be selected
channels[out] service data list
Returns
This function returns zero on success, or negative value with error code.
Examples:
tv_service_add_delete_channel_auto_test.c, tv_service_add_delete_favorite_channel_auto_test.c, tv_service_channel_change_notify_test.c, tv_service_epg_test.c, and tv_service_get_service_test.c.
gint tv_service_get_channel_list_ex ( TvServiceChannelMode  mode,
TvServiceAntenna  type,
GList **  channels,
GList *  filter,
TvServiceChannelSortType  sort_type 
)

tv_service_get_channel_list_ex

This function get channel list data according to antennna mode.

Parameters
mode[in] the channel mode to be selected
type[in] the antenna type to be selected
channels[out] service data list
filter[in] the filter rule of channel list
sort_type[in] the order attribute of channel list
Returns
This function returns zero on success, or negative value with error code.
Examples:
tv_service_get_service_test.c.
gint tv_service_get_channel_locked ( gint  service_id,
gboolean *  lock 
)

tv_service_get_channel_locked

This function get lock status of the channel

Parameters
service_id[in] service_id of channel
lock[in] lock status of channel
Returns
This function returns zero on success, or negative value with error code.
Examples:
tv_service_channel_lock_unlock_test.c.
gint tv_service_lock_channel ( gint  service_id,
gchar *  password 
)

tv_service_lock_channel

This function lock channel

Parameters
service_id[in] service_id of channel
password[in] password of channel lock
Returns
This function returns zero on success, or negative value with error code.
Examples:
tv_service_channel_lock_unlock_test.c.
gint tv_service_unlock_channel ( gint  service_id,
gchar *  password 
)

tv_service_unlock_channel

This function unlock channel

Parameters
service_id[in] service_id of channel
password[in] password of channel unlock
Returns
This function returns zero on success, or negative value with error code.
Examples:
tv_service_channel_lock_unlock_test.c.