diff options
author | jinwoo.shin <jw0227.shin@samsung.com> | 2015-08-07 17:23:52 +0900 |
---|---|---|
committer | jinwoo.shin <jw0227.shin@samsung.com> | 2015-08-07 17:31:16 +0900 |
commit | 7fdb859322266c712bfcda78b7cf2572aaa3d3e5 (patch) | |
tree | 11e98d5d6d8bc7dd0488a55d1e4755a10458ce0b /include | |
parent | 2eb91fd05d920c1ef4eb0f310f1cafef71559824 (diff) | |
download | air_livetv-7fdb859322266c712bfcda78b7cf2572aaa3d3e5.tar.gz air_livetv-7fdb859322266c712bfcda78b7cf2572aaa3d3e5.tar.bz2 air_livetv-7fdb859322266c712bfcda78b7cf2572aaa3d3e5.zip |
Update channel number to handle minor channel
Change-Id: Ib10babb5dfd89d887cbc3fb1da4b4b166a5102a2
Signed-off-by: jinwoo.shin <jw0227.shin@samsung.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/tv_service.h | 281 |
1 files changed, 0 insertions, 281 deletions
diff --git a/include/tv_service.h b/include/tv_service.h deleted file mode 100644 index bae9260..0000000 --- a/include/tv_service.h +++ /dev/null @@ -1,281 +0,0 @@ -/* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. - * - * Licensed under the Apache License, Version 2.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include <glib-object.h> - -#define TVS_EPG_CURRENT_TIME -1 -#define PROGRAM_NAME_MAX_LEN 25 -#define CHANNEL_FILTER_STRING_MAX_LEN 100 - -/** - * An enumeration. - * Enumeration for tv service error type - */ -typedef enum -{ - TVS_ERROR_OK = 0, /**< tv service error ok */ - TVS_ERROR_NO_FREE_MEMORY = -1, /**< tv service error no free memory */ - TVS_ERROR_HANDLE_UNINITIALIZED = -2, /**< tv service error handle uninitialized */ - TVS_ERROR_RPC_CALL_FAIL = -3, /**< tv service error rpc call fail */ - TVS_ERROR_INVALID_PARAMETER = -4, /**< tv service error invalid input parameter */ - TVS_ERROR_INVALID_VALUE = -5, /**< tv service error invalid input value */ - TVS_ERROR_NOT_AVAILABLE = -6, /**< tv service error not available */ - TVS_ERROR_SEQLITE_BUSY = -7, /**< tv service error SQLite busy */ - TVS_ERROR_PROCESS_FAIL = -8, /**< tv service error process error*/ - TVS_ERROR_DATABASE_FAIL = -9, /**< tv service error database query fail*/ - TVS_ERROR_AUTHENTICATE_FAIL = -10, /**< tv service error Authenticate fail, ex, lock password match fail*/ - TVS_ERROR_UNKNOWN = -255 /**< tv service error unknown */ -} TvServiceError; - -typedef enum -{ - TV_SERVICE_CHANNEL_MODE_UNDEFINED = -1, /* Unknown mode */ - TV_SERVICE_CHANNEL_MODE_ALL, /* ALL channel mode */ - TV_SERVICE_CHANNEL_MODE_DIGITAL, /* Digital channel mode */ - TV_SERVICE_CHANNEL_MODE_ANALOG, /* Analog channel mode */ - TV_SERVICE_CHANNEL_MODE_DIGITAL_ANALOG, /* Digital & Analog channel mode*/ - TV_SERVICE_CHANNEL_MODE_FAVORITE, /* Analog channel mode */ - TV_SERVICE_CHANNEL_MODE_ALL_DIGITAL_ANALOG /* Digital & Analog channel mode (include delete channel)*/ -} TvServiceChannelMode; - -/** - * An enumeration. - * Enumeration for channel list sort type. - */ -typedef enum -{ - CHANNEL_SORT_TYPE_MAJOR_MINOR_NUMBER = 0x0, - CHANNEL_SORT_TYPE_SERVICE_ID, - CHANNEL_SORT_TYPE_PROGRAM_NAME, - CHANNEL_SORT_TYPE_MAX -} TvServiceChannelSortType; - -typedef enum -{ - TV_SERVICE_LIVE_EVENT_BEGIN, /* live event tune start*/ - TV_SERVICE_LIVE_EVENT_TUNER_LOCK, /* live event tune lock result*/ - TV_SERVICE_LIVE_EVENT_CHANNEL_LOCK, /* live event channel lock(video and audio mute)*/ - TV_SERVICE_LIVE_EVENT_CHANNEL_UNLOCK, /* live event channel unlock*/ - TV_SERVICE_LIVE_EVENT_AUTO_DESTROY, /* live event auto destroy*/ - TV_SERVICE_LIVE_EVENT_RESOLUTION /* live event resolution*/ -} TvServiceLiveEvent; -typedef void (*TvServiceLiveCallback) (TvServiceLiveEvent event, gpointer user_data, const gpointer data); -typedef struct -{ - gint freq; /**the frequence*/ - gint mod; /**the modulation*/ - gint apid; /**the audio pid*/ - gint vpid; /**the videa pid*/ - gint ppid; /**the pmt pid*/ - gint pro_num; /**the program number*/ -} TvServiceLiveTuneInfo; - -typedef struct -{ - // TvServiceGenLive *proxy; /**the live proxy object*/ - guint service_handle; /**the live service handle*/ - gint antenna_type; /**antenna type*/ - gint service_id; /**service id*/ - gint unique; /**identify*/ - TvServiceLiveTuneInfo tune_info; /**tune info*/ - TvServiceLiveCallback call_back; /**the call back function*/ - gpointer user_data; /**the user_data*/ - gpointer window_id; /**the window id*/ -} TvServiceLiveData; - -typedef gpointer TvServiceLive; - -typedef void* TvServiceEpg; - -typedef enum -{ - TVS_EPG_CREATE = 0, - TVS_EPG_DESTROY, - TVS_EPG_GET_CURRENT_PROGRAM, - TVS_EPG_GET_PROGRAM_LIST, - TVS_EPG_AUTO_DESTROY, - TVS_EPG_DATA_UPDATED -} tvs_epg_event_e; - -typedef void (*TvServiceEpgCallback) (tvs_epg_event_e type, gpointer epg_data, gpointer user_data); - -typedef struct -{ - guint service_id; - guint event_id; - guint start_time; - guint etm_location; - guint length_in_seconds; - guint8 title_text[256]; - guint current_time; - guint8 extended_text[256]; -} TvServiceEpgEventData; - -typedef enum -{ - TVS_MODULATION_TYPE_UNKNOWN = -1, - TVS_MODULATION_TYPE_QPSK, - TVS_MODULATION_TYPE_16QAM, - TVS_MODULATION_TYPE_32QAM, - TVS_MODULATION_TYPE_64QAM, - TVS_MODULATION_TYPE_128QAM, - TVS_MODULATION_TYPE_256QAM, - TVS_MODULATION_TYPE_AUTO_QAM, - TVS_MODULATION_TYPE_8VSB, - TVS_MODULATION_TYPE_16VSB, - TVS_MODULATION_TYPE_8PSK, - TVS_MODULATION_TYPE_NTSC, - TVS_MODULATION_TYPE_PAL, - TVS_MODULATION_TYPE_MAX -} TvServiceModulationTpye; -typedef enum -{ - TV_SERVICE_ANTENNA_TYPE_UNDEFINED = -1, /* Unknown type */ - TV_SERVICE_ANTENNA_TYPE_AIR, /* Antenna air type */ - TV_SERVICE_ANTENNA_TYPE_CABLE, /* Antenna cable type */ - TV_SERVICE_ANTENNA_TYPE_ALL /*Antenna all type */ -} TvServiceAntenna; -typedef enum -{ - TVS_VIDEO_TYPE_UNKNOWN = -1, - TVS_VIDEO_TYPE_MPEG2 , - TVS_VIDEO_TYPE_H264, - TVS_VIDEO_TYPE_JPEG, - TVS_VIDEO_TYPE_AVS, - TVS_VIDEO_TYPE_MAX -} TvServiceVideoType; - -typedef enum -{ - TVS_AUDIO_TYPE_UNKNOWN = -1, - TVS_AUDIO_TYPE_AC3, - TVS_AUDIO_TYPE_MPEG2, - TVS_AUDIO_TYPE_AAC, - TVS_AUDIO_TYPE_HE_AAC, - TVS_AUDIO_TYPE_MAX -} TvServiceAudioType; -typedef struct -{ - guint service_id; - guint frequency; - guint service_type; - guint channel_type; - - gulong program_number; - gulong source_id; - gulong stream_id; - gulong pcr_id; - gulong major; - gulong minor; - gulong vpid; - gulong apid; - gulong pmt_pid; - - gboolean hide_guide; - gboolean hidden; - gboolean locked; - gboolean remembered; - gboolean save_by_psi; - gboolean digital; - gboolean favorite; - - gchar program_name[PROGRAM_NAME_MAX_LEN]; - - TvServiceModulationTpye modulation_type; - TvServiceAntenna antenna_type; - TvServiceVideoType video_type; - TvServiceAudioType audio_type; -} TvServiceChannel; - -typedef enum { - 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 -} TvServiceChannelFilterMatchType; - -typedef enum { - 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 -} TvServiceChannelDataAttr; - -typedef struct { - TvServiceChannelDataAttr attribute; - TvServiceChannelFilterMatchType match_type; - GValue *value; -} TvServiceFilterNode; - -typedef struct { - gint identity; - // TvServiceGenEpg *proxy; - TvServiceEpgCallback cb; - gboolean cb_flag; - gpointer user_data; - GList *event_list; -} EpgProxyData; - -typedef struct { - guint service_id; - guint start_time; - guint duration; - TvServiceEpgCallback event_callback; - gpointer event_callback_userdata; -} EpgProxyEventData; - -gint tv_service_live_get_service_id (TvServiceLive live, gint * service_id); -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_epg_get_current_program (TvServiceEpg epg, guint service_id, TvServiceEpgCallback callback_func, gpointer user_data); -gint tv_service_epg_get_cache_current_program (TvServiceEpg epg, guint service_id, TvServiceEpgEventData * app_data); -gint tv_service_epg_get_program_list (TvServiceEpg epg, guint service_id, guint start_time, guint duration, TvServiceEpgCallback callback_func, gpointer user_data); -gint tv_service_live_create (TvServiceLive * live); -gint tv_service_live_destroy (TvServiceLive live); -gint tv_service_live_tune_locked_channel (TvServiceLive live, gint service_id, gchar * password); -gint tv_service_epg_create (TvServiceEpg * epg); -gint tv_service_epg_destroy (TvServiceEpg epg); -gint tv_service_live_get_last_channel (gint * service_id); -gint tv_service_live_get_antenna_type (TvServiceLive live, TvServiceAntenna * type); -gint tv_service_live_tune (TvServiceLive live, 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_live_tune_down(TvServiceLive live, gint channel_mode, - TvServiceAntenna antenna_type); -gint tv_service_live_tune_up(TvServiceLive live, gint channel_mode, - TvServiceAntenna antenna_type); -gint tv_service_add_favorite_channel(gint service_id); -gint tv_service_delete_favorite_channel(gint service_id); -gint tv_service_add_channel(gint service_id); -gint tv_service_delete_channel(gint service_id); -gint tv_service_live_get_audio_mute(TvServiceLive live_svc, gboolean *mute); -gint tv_service_live_set_audio_mute(TvServiceLive live_svc, gboolean mute); -gint tv_service_live_get_volume(TvServiceLive live_svc, gdouble *vol); -gint tv_service_live_set_volume(TvServiceLive live_svc, gdouble vol); -gint tv_service_live_set_window_overlay(TvServiceLive live_svc, void *window_id); -gint tv_service_channel_info_create(); -gint tv_service_channel_info_destroy(); -gint tv_service_live_register_callback(TvServiceLive live_svc, - void *_tv_service_event_cb, void *some_other_variable); |