DVBCore
1.0
Open source DVB engine
|
00001 /******************************************************************************* 00002 * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org) 00003 * Copyright © 2011 Ocean Blue Software Ltd 00004 * 00005 * This file is part of a DTVKit Software Component 00006 * You are permitted to copy, modify or distribute this file subject to the terms 00007 * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org 00008 * 00009 * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, 00010 * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES 00011 * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. 00012 * 00013 * If you or your organisation is not a member of DTVKit then you have access 00014 * to this source code outside of the terms of the licence agreement 00015 * and you are expected to delete this and any associated files immediately. 00016 * Further information on DTVKit, membership and terms can be found at www.dtvkit.org 00017 *******************************************************************************/ 00025 // pre-processor mechanism so multiple inclusions don't cause compilation error 00026 00027 #ifndef _AP_EPGSEARCH_H 00028 #define _AP_EPGSEARCH_H 00029 00030 //---Constant and macro definitions for public use----------------------------- 00031 00032 //---Enumerations for public use----------------------------------------------- 00033 typedef enum e_ags_match_type 00034 { 00035 AGS_MATCH_ANY_WORD = 0, // EVENT CAN CONTAIN ANY WORD IN STRING 00036 AGS_MATCH_ALL_WORDS = 1, // EVENT MUST CONTAIN ALL WORDS IN STRING (IN ANY ORDER) 00037 AGS_MATCH_EXACT_PHRASE = 2, // EVENT MUST EXACTLY MATCH PHRASE (WORDS IN ORDER) 00038 AGS_MATCH_CONTAINS_PHRASE = 3, // EVENT MUST CONTAIN PHRASE (WORDS IN ORDER) 00039 AGS_MATCH_NOT_EQUAL = 4, // OPPOSITE OF EXACT_PHRASE 00040 00041 AGS_MATCH_IGNORE_CASE = 0x80 00042 } 00043 E_AGS_MATCH_TYPE; 00044 00045 typedef enum e_ags_match_action 00046 { 00047 AGS_ACTION_NONE = 0, 00048 AGS_ACTION_SET_TIMER = 1, 00049 AGS_ACTION_SET_ALARM = 2 00050 } 00051 E_AGS_MATCH_ACTION; 00052 00053 typedef enum e_ags_search_fields 00054 { 00055 AGS_SEARCH_ALL = 0xff, // for convenience 00056 // These can be | (ORed) together 00057 AGS_SEARCH_TITLE = 0x01, 00058 AGS_SEARCH_DESC = 0x02, 00059 AGS_SEARCH_EXT_DESC = 0x04 00060 } 00061 E_AGS_SEARCH_FIELDS; 00062 00063 typedef enum e_ags_search_days 00064 { 00065 AGS_DAYS_ALL = 0xff, 00066 AGS_DAYS_WEEKDAYS = 0x1f, // for convenience 00067 AGS_DAYS_WEEKENDS = 0x60, // for convenience 00068 // These can be | (ORed) together 00069 AGS_DAYS_MONDAY = 0x01, 00070 AGS_DAYS_TUESDAY = 0x02, 00071 AGS_DAYS_WEDNESDAY = 0x04, 00072 AGS_DAYS_THURSDAY = 0x08, 00073 AGS_DAYS_FRIDAY = 0x10, 00074 AGS_DAYS_SATURDAY = 0x20, 00075 AGS_DAYS_SUNDAY = 0x40 00076 } 00077 E_AGS_SEARCH_DAYS; 00078 00079 //---Global type defs for public use------------------------------------------- 00080 typedef struct s_ags_time_range 00081 { 00082 U8BIT min_hour; 00083 U8BIT min_minutes; 00084 U8BIT min_seconds; 00085 U8BIT max_hour; 00086 U8BIT max_minutes; 00087 U8BIT max_seconds; 00088 } S_AGS_TIME_RANGE; 00089 00090 00091 //---Global Function prototypes for public use--------------------------------- 00092 00103 void* AGS_OpenSearch( U8BIT *search_str, E_AGS_SEARCH_FIELDS search_fields, E_AGS_MATCH_TYPE match_type, 00104 E_AGS_SEARCH_DAYS search_days, S_AGS_TIME_RANGE *search_times, E_AGS_MATCH_ACTION match_action); 00105 00113 BOOLEAN AGS_GetNextResult( void *ags_handle, U16BIT *event_id, void **serv_ptr ); 00114 00119 void AGS_CloseSearch( void *ags_handle); 00120 00121 #endif // _AP_EPGSEARCH_H