DVBCore  22.3.0
Open Source DVB Engine
ap_ci.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 #ifndef _AP_CI_H
27 #define _AP_CI_H
28 
29 #include "techtype.h"
30 
31 //---Constant and macro definitions for public use-----------------------------
32 
33 
34 //---Enumerations for public use-----------------------------------------------
35 
36 /* Replies for starting an operator profile search */
37 
38 typedef enum {
39  CIP_START_OPERATOR_SEARCH_NO,
40  CIP_START_OPERATOR_SEARCH_YES,
41  CIP_START_OPERATOR_SEARCH_ASK
42 } E_CIP_START_OPERATOR_SEARCH;
43 
44 typedef enum {
45  CIP_NORMAL_TUNE,
46  CIP_QUIET_TUNE,
47  CIP_KEEP_APP_RUNING,
48  CIP_QUIET_KEEP_APP
49 } E_CIP_TUNE_FLAGS;
50 
51 //---Global type defs for public use-------------------------------------------
52 
64 typedef void (*F_NotifyStartTuning)(U32BIT module, U16BIT onet_id, U16BIT trans_id, U16BIT serv_id, E_CIP_TUNE_FLAGS flags);
65 
66 //---Global Function prototypes for public use---------------------------------
67 
72 U8BIT ACI_GetCamUpgradeMode(void);
73 
78 void ACI_SetCamUpgradeMode(U8BIT upgrade_mode);
79 
84 E_CIP_START_OPERATOR_SEARCH ACI_GetOperatorSearchMode(void);
85 
92 void ACI_SetOperatorSearchMode(E_CIP_START_OPERATOR_SEARCH search_mode);
93 
99 void ACI_OperatorSearchRequired(U32BIT module, BOOLEAN required);
100 
108 void ACI_ScheduleOperatorSearch(U32BIT cicam_id, U16BIT date, U8BIT hour, U8BIT min);
109 
114 BOOLEAN ACI_IsOperatorSearchRequired(void);
115 
120 U32BIT ACI_GetOperatorSearchModule(void);
121 
128 BOOLEAN ACI_GetFirstOperatorSearchModule(U32BIT *module);
129 
139 BOOLEAN ACI_GetFirstScheduledOperatorSearch(U32BIT *module, U16BIT *date, U8BIT *hours, U8BIT *mins);
140 
146 BOOLEAN ACI_StartOperatorSearchForModule(U32BIT module);
147 
155 BOOLEAN ACI_AcquireCISlot(U8BIT path, void *s_ptr);
156 
163 BOOLEAN ACI_AcquireCISlotForRecording(U8BIT path, void* s_ptr);
164 
170 U8BIT ACI_FindCISlotForService(void *serv_ptr);
171 
177 S32BIT ACI_ReadPinForSlot(U8BIT slot_id);
178 
187 BOOLEAN ACI_WritePinForSlot(U8BIT slot_id, S32BIT pin);
188 
197 BOOLEAN ACI_SendPinToCam(U8BIT slot_id, U32BIT pin);
198 
205 
206 #endif
void ACI_RegisterStartTuneNotifyCallback(F_NotifyStartTuning cb_func)
Register callback function to notify start of tuning process due to CI tune request.
Definition: ap_ci.c:2354
U32BIT ACI_GetOperatorSearchModule(void)
Returns the module performing or requiring and operator search.
Definition: ap_ci.c:1126
BOOLEAN ACI_AcquireCISlotForRecording(U8BIT path, void *s_ptr)
Acquires a CI slot for the recording path. This function may need to "steal" the CI slot from the liv...
Definition: ap_ci.c:1516
BOOLEAN ACI_IsOperatorSearchRequired(void)
Returns whether an operator profile search has been requested.
Definition: ap_ci.c:1115
void ACI_ScheduleOperatorSearch(U32BIT cicam_id, U16BIT date, U8BIT hour, U8BIT min)
Sets the date/time that an operator search should be started for the given module.
Definition: ap_ci.c:1089
BOOLEAN ACI_GetFirstOperatorSearchModule(U32BIT *module)
Checks all the CI+ profiles to see if any have requested an update search.
Definition: ap_ci.c:1139
U8BIT ACI_GetCamUpgradeMode(void)
Return CAM upgrade option (Yes/No/Ask)
Definition: ap_ci.c:1010
U8BIT ACI_FindCISlotForService(void *serv_ptr)
Looks for a CAM that's able to descramble the given service and returns its slot id.
Definition: ap_ci.c:1579
void(* F_NotifyStartTuning)(U32BIT module, U16BIT onet_id, U16BIT trans_id, U16BIT serv_id, E_CIP_TUNE_FLAGS flags)
Notify that DVB is about to tune to service or transport stream. This function would be called as a r...
Definition: ap_ci.h:64
BOOLEAN ACI_GetFirstScheduledOperatorSearch(U32BIT *module, U16BIT *date, U8BIT *hours, U8BIT *mins)
Checks all the CI+ profiles to find the one with the earliest scheduled search. All returned values a...
Definition: ap_ci.c:1182
void ACI_SetCamUpgradeMode(U8BIT upgrade_mode)
Sets the CAM upgrade option (Yes/No/Ask)
Definition: ap_ci.c:1021
System Wide Global Technical Data Type Definitions.
S32BIT ACI_ReadPinForSlot(U8BIT slot_id)
Checks if a pin has been saved for the CAM in the given slot and returns it.
Definition: ap_ci.c:1715
void ACI_SetOperatorSearchMode(E_CIP_START_OPERATOR_SEARCH search_mode)
Sets the operator profile search mode (Yes/No/Ask). This should be used by the app to control whether...
Definition: ap_ci.c:1045
BOOLEAN ACI_StartOperatorSearchForModule(U32BIT module)
Called by the app to start an operator profile search for the given module.
Definition: ap_ci.c:1245
BOOLEAN ACI_AcquireCISlot(U8BIT path, void *s_ptr)
Acquires a CI slot for the given path on the given service after releasing any slot already being use...
Definition: ap_ci.c:1434
BOOLEAN ACI_SendPinToCam(U8BIT slot_id, U32BIT pin)
Converts the pin value to ASCII and sends it to the CAM An STB_EVENT_CI_PIN_STATUS event will be sent...
Definition: ap_ci.c:2302
void ACI_OperatorSearchRequired(U32BIT module, BOOLEAN required)
Sets whether an operator profile search needs to be run.
Definition: ap_ci.c:1057
BOOLEAN ACI_WritePinForSlot(U8BIT slot_id, S32BIT pin)
Saves the given pin associated with the CAM in the given slot. If the pin for this CAM has previously...
Definition: ap_ci.c:1811
E_CIP_START_OPERATOR_SEARCH ACI_GetOperatorSearchMode(void)
Return the option for starting an operator profile search (yes/no/ask)
Definition: ap_ci.c:1032