- simplify cak7 code (thanks to lpm11 and for all who tested)
[oscam.git] / module-cccam.h
blob5124fbe6091faa232cc2534faee80fd8aa7069cf
1 #ifndef MODULE_CCCAM_H_
2 #define MODULE_CCCAM_H_
4 // In this file put functions that are called outside of module-cccam.c and module-cccshare.c
6 void cc_update_nodeid(void);
8 void cc_UA_cccam2oscam(uint8_t *in, uint8_t *out, uint16_t caid);
10 int32_t cc_UA_valid(uint8_t *ua);
12 void refresh_shares(void);
13 LLIST **get_and_lock_sharelist(void);
14 void unlock_sharelist(void);
16 struct cc_card **get_sorted_card_copy(LLIST *cards, int32_t reverse, int32_t *size);
18 void cccam_init_share(void);
20 #if defined(MODULE_CCCSHARE)
21 void cccam_done_share(void);
22 #else
23 static inline void cccam_done_share(void) { }
24 #endif
26 #if defined(MODULE_CCCAM)
27 bool cccam_forward_origin_card(ECM_REQUEST *er);
28 bool cccam_snprintf_cards_stat(struct s_client *cl, char *emmtext, size_t emmtext_sz);
29 bool cccam_client_extended_mode(struct s_client *cl);
30 bool cccam_client_multics_mode(struct s_client *cl);
31 #else
32 static inline bool cccam_forward_origin_card(ECM_REQUEST *UNUSED(er))
34 return false;
36 static inline bool cccam_snprintf_cards_stat(struct s_client *UNUSED(cl), char *UNUSED(emmtext), size_t UNUSED(emmtext_sz))
38 return false;
40 static inline bool cccam_client_extended_mode(struct s_client *UNUSED(cl))
42 return false;
44 static inline bool cccam_client_multics_mode(struct s_client *UNUSED(cl))
46 return false;
48 #endif
50 #endif