DVBCore  17.9.0
Open Source DVB Engine
 All Data Structures Files Functions Typedefs Macros Pages
ap_epgsearch.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
3  * Copyright © 2011 Ocean Blue Software Ltd
4  *
5  * This file is part of a DTVKit Software Component
6  * You are permitted to copy, modify or distribute this file subject to the terms
7  * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
8  *
9  * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
10  * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
11  * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
12  *
13  * If you or your organisation is not a member of DTVKit then you have access
14  * to this source code outside of the terms of the licence agreement
15  * and you are expected to delete this and any associated files immediately.
16  * Further information on DTVKit, membership and terms can be found at www.dtvkit.org
17  *******************************************************************************/
25 // pre-processor mechanism so multiple inclusions don't cause compilation error
26 
27 #ifndef _AP_EPGSEARCH_H
28 #define _AP_EPGSEARCH_H
29 
30 #include "techtype.h"
31 
32 //---Constant and macro definitions for public use-----------------------------
33 
34 //---Enumerations for public use-----------------------------------------------
35 typedef enum e_ags_match_type
36 {
37  AGS_MATCH_ANY_WORD = 0, // EVENT CAN CONTAIN ANY WORD IN STRING
38  AGS_MATCH_ALL_WORDS = 1, // EVENT MUST CONTAIN ALL WORDS IN STRING (IN ANY ORDER)
39  AGS_MATCH_EXACT_PHRASE = 2, // EVENT MUST EXACTLY MATCH PHRASE (WORDS IN ORDER)
40  AGS_MATCH_CONTAINS_PHRASE = 3, // EVENT MUST CONTAIN PHRASE (WORDS IN ORDER)
41  AGS_MATCH_NOT_EQUAL = 4, // OPPOSITE OF EXACT_PHRASE
42 
43  AGS_MATCH_IGNORE_CASE = 0x80
44 }
45 E_AGS_MATCH_TYPE;
46 
47 typedef enum e_ags_match_action
48 {
49  AGS_ACTION_NONE = 0,
50  AGS_ACTION_SET_TIMER = 1,
51  AGS_ACTION_SET_ALARM = 2
52 }
53 E_AGS_MATCH_ACTION;
54 
55 typedef enum e_ags_search_fields
56 {
57  AGS_SEARCH_ALL = 0xff, // for convenience
58  // These can be | (ORed) together
59  AGS_SEARCH_TITLE = 0x01,
60  AGS_SEARCH_DESC = 0x02,
61  AGS_SEARCH_EXT_DESC = 0x04
62 }
63 E_AGS_SEARCH_FIELDS;
64 
65 typedef enum e_ags_search_days
66 {
67  AGS_DAYS_ALL = 0xff,
68  AGS_DAYS_WEEKDAYS = 0x1f, // for convenience
69  AGS_DAYS_WEEKENDS = 0x60, // for convenience
70  // These can be | (ORed) together
71  AGS_DAYS_MONDAY = 0x01,
72  AGS_DAYS_TUESDAY = 0x02,
73  AGS_DAYS_WEDNESDAY = 0x04,
74  AGS_DAYS_THURSDAY = 0x08,
75  AGS_DAYS_FRIDAY = 0x10,
76  AGS_DAYS_SATURDAY = 0x20,
77  AGS_DAYS_SUNDAY = 0x40
78 }
79 E_AGS_SEARCH_DAYS;
80 
81 //---Global type defs for public use-------------------------------------------
82 typedef struct s_ags_time_range
83 {
84  U8BIT min_hour;
85  U8BIT min_minutes;
86  U8BIT min_seconds;
87  U8BIT max_hour;
88  U8BIT max_minutes;
89  U8BIT max_seconds;
91 
92 
93 //---Global Function prototypes for public use---------------------------------
94 
105 void* AGS_OpenSearch( U8BIT *search_str, E_AGS_SEARCH_FIELDS search_fields, E_AGS_MATCH_TYPE match_type,
106  E_AGS_SEARCH_DAYS search_days, S_AGS_TIME_RANGE *search_times, E_AGS_MATCH_ACTION match_action);
107 
115 BOOLEAN AGS_GetNextResult( void *ags_handle, U16BIT *event_id, void **serv_ptr );
116 
121 void AGS_CloseSearch( void *ags_handle);
122 
123 #endif // _AP_EPGSEARCH_H
void AGS_CloseSearch(void *ags_handle)
Closes an open search and frees all associated resources.
Definition: ap_epgsearch.c:301
void * AGS_OpenSearch(U8BIT *search_str, E_AGS_SEARCH_FIELDS search_fields, E_AGS_MATCH_TYPE match_type, E_AGS_SEARCH_DAYS search_days, S_AGS_TIME_RANGE *search_times, E_AGS_MATCH_ACTION match_action)
Opens an EPG Search.
Definition: ap_epgsearch.c:107
BOOLEAN AGS_GetNextResult(void *ags_handle, U16BIT *event_id, void **serv_ptr)
Gets the next matching result for an open search.
Definition: ap_epgsearch.c:169
System Wide Global Technical Data Type Definitions.
Definition: ap_epgsearch.h:82