fyf_descr.h
上传用户:sunhongbo
上传日期:2022-01-25
资源大小:3010k
文件大小:5k
源码类别:

数据库系统

开发平台:

C/C++

  1. /******************************************************************************/
  2. /*    Copyright (c) 2008 Embedded Internet Solutions, Inc                     */
  3. /*    All rights reserved. You are not allowed to copy or distribute          */
  4. /*    the code without permission.                                            */
  5. /*    This is the demo implenment of the Porting APIs needed by            */
  6. /*    MiddleWare.                                                             */
  7. /*    Maybe you should modify it accorrding to Platform.                      */
  8. /*                                                                            */
  9. /*    $author szhy 2008/10/14                                              */
  10. /******************************************************************************/
  11. typedef enum FYF_DESCR_KeyParity_s
  12. {
  13.     FYF_DESCR_KEY_PARITY_EVEN_PARITY,
  14.     FYF_DESCR_KEY_PARITY_ODD_PARITY,
  15.     FYF_DESCR_KEY_PARITY_GENERIC_KEY
  16. } FYF_DESCR_KeyParity_t;
  17. typedef enum FYF_DESCR_KeyUsage_s
  18. {
  19.     FYF_DESCR_KEY_USAGE_INVALID,
  20.     FYF_DESCR_KEY_USAGE_VALID_FOR_PES,
  21.     FYF_DESCR_KEY_USAGE_VALID_FOR_TRANSPORT,
  22.     FYF_DESCR_KEY_USAGE_VALID_FOR_ALL
  23. } FYF_DESCR_KeyUsage_t;  
  24. typedef struct
  25. BU32 (*FYF_CPI_descr_open)(void);
  26. BU32 (*FYF_CPI_descr_associate_pid)(BU32 handle,BU32 pid);
  27. BU32 (*FYF_CPI_descr_close)(BU32 handle); 
  28. BU32 (*FYF_CPI_descr_disassociate_pid)(BU32 handle,BU32 pid); 
  29. BU32 (*FYF_CPI_descr_set)(BU32 handle, FYF_DESCR_KeyParity_t Parity, FYF_DESCR_KeyUsage_t Usage, BU08 *Data_p);        
  30. }FYF_DESCR_PORTING; 
  31. /******************************************************************************/
  32. /*Description: register descramble                                            */
  33. /*Input      : porting       */
  34. /*Output     : no                                                             */
  35. /*Return     : no                                                             */
  36. /******************************************************************************/
  37. void FYF_API_descr_register(FYF_DESCR_PORTING *porting);
  38. /******************************************************************************/
  39. /*Description: descramble open                                                */
  40. /*Input      : no       */
  41. /*Output     : no                                                             */
  42. /*Return     : no                                                             */
  43. /******************************************************************************/
  44. BU32 FYF_API_descr_open(void);   
  45. /******************************************************************************/
  46. /*Description: associate pid                                                  */
  47. /*Input      : no       */
  48. /*Output     : no                                                             */
  49. /*Return     : no                                                             */
  50. /******************************************************************************/
  51. BU32 FYF_API_descr_associate_pid(BU32 handle,BU32 pid); 
  52. /******************************************************************************/
  53. /*Description: descramble close                                               */
  54. /*Input      : no       */
  55. /*Output     : no                                                             */
  56. /*Return     : no                                                             */
  57. /******************************************************************************/
  58. BU32 FYF_API_descr_close(BU32 handle);
  59. /******************************************************************************/
  60. /*Description: disassociate pid                                               */
  61. /*Input      : no       */
  62. /*Output     : no                                                             */
  63. /*Return     : no                                                             */
  64. /******************************************************************************/
  65. BU32 FYF_API_descr_disassociate_pid(BU32 handle,BU32 pid);
  66. /******************************************************************************/
  67. /*Description: descramble set                                                 */
  68. /*Input      : no       */
  69. /*Output     : no                                                             */
  70. /*Return     : no                                                             */
  71. /******************************************************************************/
  72. BU32 FYF_API_descr_set(BU32 handle, FYF_DESCR_KeyParity_t Parity, FYF_DESCR_KeyUsage_t Usage, BU08 *Data_p);