DVBCore  17.9.0
Open Source DVB Engine
 All Data Structures Files Functions Typedefs Macros Pages
stbcicc.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright © 2016 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
3  *
4  * This file is part of a DTVKit Software Component
5  * You are permitted to copy, modify or distribute this file subject to the terms
6  * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
7  *
8  * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
9  * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
10  * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
11  *
12  * If you or your organisation is not a member of DTVKit then you have access
13  * to this source code outside of the terms of the licence agreement
14  * and you are expected to delete this and any associated files immediately.
15  * Further information on DTVKit, membership and terms can be found at www.dtvkit.org
16  *******************************************************************************/
24 #ifndef _STBCICC_H
25 #define _STBCICC_H
26 
27 #include "techtype.h"
28 
29 /*---Constant and macro definitions for public use-----------------------------*/
30 
31 #define CIP_CICAM_ID_LEN 8
32 #define CIP_URI_LEN 8
33 #define CIP_MAX_PIN_LENGTH 8
34 #define CIP_PIN_PRIVATE_DATA_SIZE 15
35 
36 /*---Enumerations for public use-----------------------------------------------*/
37 
38 /*---Global type defs for public use-------------------------------------------*/
39 
40 /*---Global Function prototypes for public use---------------------------------*/
41 
45 void STB_CiCcInitialise(void);
46 
51 void STB_CiCcRemove(U8BIT slot_id);
52 
57 void STB_CiCcNotifyModuleInsert(U8BIT slot_id);
58 
63 void STB_CiCcNotifyModuleRemove(U8BIT slot_id);
64 
70 BOOLEAN STB_CiCcIsSlotReady(U8BIT slot_id);
71 
80 void STB_CiCcSetSDTAcquisitionStatus(BOOLEAN complete);
81 
90 BOOLEAN STB_CiCcIsServiceAllowed(U8BIT slot_id, U8BIT *ci_prot_desc);
91 
97 BOOLEAN STB_CiCcAuthenticated(U8BIT slot_id);
98 
104 U8BIT STB_CiCcFindSlotForCicamId(U8BIT cicam_id[CIP_CICAM_ID_LEN]);
105 
113 void STB_CiCcGetUsageRulesInfo(U8BIT slot_id, U16BIT service_id,
114  U8BIT uri[CIP_URI_LEN]);
115 
120 void STB_CiCcGetDefaultUsageRulesInfo(U8BIT raw_uri[CIP_URI_LEN]);
121 
127 U32BIT STB_CiCcGetRetentionLimit(U8BIT uri[CIP_URI_LEN]);
128 
133 void STB_CiCcApplyUsageRulesInfo(U8BIT *uri);
134 
140 
145 BOOLEAN STB_CiCcIsHDCPRequired(U16BIT service_id);
146 
156 BOOLEAN STB_CiCcSendPlaybackLicence(U8BIT slot_id, U16BIT program_number, U8BIT *licence,
157  U16BIT licence_len);
158 
167 U8BIT *STB_CiCcGetRecordingLicence(U8BIT slot_id, U8BIT * licence_status, U16BIT * licence_len,
168  U8BIT raw_uri[CIP_URI_LEN]);
169 
178 U8BIT *STB_CiCcGetPlaybackLicence(U8BIT slot_id, U8BIT * licence_status, U16BIT * licence_len,
179  U8BIT raw_uri[CIP_URI_LEN]);
180 
189 BOOLEAN STB_CiCcSendPin(U8BIT slot_id, U8BIT *pin_data);
190 
203 BOOLEAN STB_CiCcGetRecordingPinInfo(U8BIT slot_id, U8BIT *status, U8BIT *age_rating,
204  U8BIT **private_data, U16BIT *date_code, U8BIT *hour, U8BIT *min, U8BIT *sec);
205 
213 BOOLEAN STB_CiCcSendPinPlayback(U8BIT slot_id, U8BIT age_rating, U8BIT *private_data);
214 
220 void STB_CiCcSetRecordOperatingMode(U8BIT slot_id, U32BIT mode, U16BIT service_id);
221 
229 BOOLEAN STB_CiCcSendRecordStart(U8BIT slot_id, U16BIT program_number, U8BIT *pin_string);
230 
236 BOOLEAN STB_CiCcSendRecordStop(U8BIT slot_id);
237 
238 #endif /* _STBCICC_H */
BOOLEAN STB_CiCcGetRecordingPinInfo(U8BIT slot_id, U8BIT *status, U8BIT *age_rating, U8BIT **private_data, U16BIT *date_code, U8BIT *hour, U8BIT *min, U8BIT *sec)
Returns the information to be stored with a pin event when recording.
Definition: stbcicc.c:984
U8BIT * STB_CiCcGetPlaybackLicence(U8BIT slot_id, U8BIT *licence_status, U16BIT *licence_len, U8BIT raw_uri[CIP_URI_LEN])
Returns the last licence received from the CAM during playback.
Definition: stbcicc.c:1427
U8BIT * STB_CiCcGetRecordingLicence(U8BIT slot_id, U8BIT *licence_status, U16BIT *licence_len, U8BIT raw_uri[CIP_URI_LEN])
Returns the last licence received from the CAM when recording.
Definition: stbcicc.c:1276
BOOLEAN STB_CiCcAuthenticated(U8BIT slot_id)
Tell whether authenticated CI+ module is in the slot.
Definition: stbcicc.c:374
void STB_CiCcGetUsageRulesInfo(U8BIT slot_id, U16BIT service_id, U8BIT uri[CIP_URI_LEN])
Return the current URI for the given service.
Definition: stbcicc.c:449
BOOLEAN STB_CiCcSendPinPlayback(U8BIT slot_id, U8BIT age_rating, U8BIT *private_data)
Sends a pin event to the CAM during playback.
Definition: stbcicc.c:1021
void STB_CiCcGetDefaultUsageRulesInfo(U8BIT raw_uri[CIP_URI_LEN])
Sets the default URI values into the given array. The URI requires HDCP.
Definition: stbcicc.c:477
BOOLEAN STB_CiCcSendRecordStop(U8BIT slot_id)
Called by the app when a recording is stopped or completes.
Definition: stbcicc.c:1513
void STB_CiCcApplyUsageRulesInfoForPlayback(U8BIT *uri)
Apply the given Usage Rules Information for playback.
Definition: stbcicc.c:578
BOOLEAN STB_CiCcIsSlotReady(U8BIT slot_id)
Return whether CI slot is ready.
Definition: stbcicc.c:319
BOOLEAN STB_CiCcSendPin(U8BIT slot_id, U8BIT *pin_data)
Called by the host to check whether a CAM pin is valid. An STB_EVENT_CI_PIN_STATUS event will be sent...
Definition: stbcicc.c:857
void STB_CiCcRemove(U8BIT slot_id)
Handle CAM removal from slot.
Definition: stbcicc.c:275
BOOLEAN STB_CiCcSendPlaybackLicence(U8BIT slot_id, U16BIT program_number, U8BIT *licence, U16BIT licence_len)
Sends a CICAM licence to a module during playback, which will result in a modified licence being noti...
Definition: stbcicc.c:1308
BOOLEAN STB_CiCcIsHDCPRequired(U16BIT service_id)
Tell whether the given service requires HDCP.
Definition: stbcicc.c:609
System Wide Global Technical Data Type Definitions.
U32BIT STB_CiCcGetRetentionLimit(U8BIT uri[CIP_URI_LEN])
Return the retention limit given a packed URI.
Definition: stbcicc.c:495
void STB_CiCcSetSDTAcquisitionStatus(BOOLEAN complete)
To implement the first part of the diagram in "Figure 10.2: Shunning Operation" of ci-plus_specificat...
Definition: stbcicc.c:434
U8BIT STB_CiCcFindSlotForCicamId(U8BIT cicam_id[CIP_CICAM_ID_LEN])
Checks CAMs in all slots to find the one with the given CAM id.
Definition: stbcicc.c:399
void STB_CiCcInitialise(void)
CI content control support initialise.
Definition: stbcicc.c:159
void STB_CiCcSetRecordOperatingMode(U8BIT slot_id, U32BIT mode, U16BIT service_id)
Sets the record operating mode for the given slot id.
Definition: stbcicc.c:1049
void STB_CiCcNotifyModuleRemove(U8BIT slot_id)
Notify module removal.
Definition: stbcicc.c:249
BOOLEAN STB_CiCcIsServiceAllowed(U8BIT slot_id, U8BIT *ci_prot_desc)
Tell whether the service is allowed. This function checks whether the CI Protection Descriptor allows...
Definition: stbcicc.c:349
void STB_CiCcApplyUsageRulesInfo(U8BIT *uri)
Apply the given Usage Rules Information.
void STB_CiCcNotifyModuleInsert(U8BIT slot_id)
Notify module insertion.
Definition: stbcicc.c:170
BOOLEAN STB_CiCcSendRecordStart(U8BIT slot_id, U16BIT program_number, U8BIT *pin_string)
Called by the app when a recording is to be started on a CA protected service.
Definition: stbcicc.c:1094