types.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. /******************************************************************************
  2. ** types.h : Data types
  3. **
  4. ** Author :
  5. **
  6. ** $Id: $
  7. ******************************************************************************/
  8. #ifndef _ENGTYPES_H_
  9. #define _ENGTYPES_H_
  10. #ifdef __cplusplus
  11. extern "C" {
  12. #endif
  13. #ifndef BYTE
  14. typedef unsigned char BYTE;
  15. #endif
  16. #ifndef UINT8
  17. typedef unsigned char UINT8;
  18. #endif
  19. #ifndef UINT16
  20. typedef unsigned short UINT16;
  21. #endif
  22. #ifndef UINT32
  23. typedef unsigned int UINT32;
  24. #endif
  25. #ifndef UINT64
  26. typedef unsigned long long UINT64;
  27. #endif
  28. #ifndef INT8
  29. typedef char INT8;
  30. #endif
  31. #ifndef INT16
  32. typedef short INT16;
  33. #endif
  34. #ifndef INT32
  35. typedef int INT32;
  36. #endif
  37. #ifndef INT64
  38. typedef long long INT64;
  39. #endif
  40. #ifndef BOOLEAN
  41. typedef unsigned char BOOLEAN;
  42. #endif
  43. #ifndef BOOL
  44. typedef unsigned char BOOL;
  45. #endif
  46. #ifndef bool
  47. #ifndef _CCOPTS_
  48. typedef unsigned char bool;
  49. #endif
  50. #endif
  51. #ifndef Boolean
  52. typedef unsigned char Boolean;
  53. #endif
  54. #ifndef TRUE
  55. #define TRUE (1)
  56. #endif
  57. #ifndef FALSE
  58. #define FALSE (0)
  59. #endif
  60. #ifndef true
  61. #define true (1)
  62. #endif
  63. #ifndef false
  64. #define false (0)
  65. #endif
  66. #define NULL ((void *)0)
  67. enum {
  68. /* common status values */
  69. SP_SUCCESS = 0, /*!< successful outcome */
  70. SP_ERR_FAILURE, /*!< operation failed */
  71. SP_ERR_INVALID_HANDLE, /*!< invalid handle */
  72. SP_ERR_INVALID_ID, /*!< invalid identifier */
  73. SP_ERR_INVALID_PARAM, /*!< invalid parameter */
  74. SP_ERR_INVALID_OP, /*!< requested operation is invalid */
  75. SP_ERR_MEMORY_ALLOC, /*!< problem allocating memory */
  76. SP_ERR_MEMORY_SIZE, /*!< problem with the size of memory */
  77. SP_ERR_RESOURCE_UNAVAILABLE,
  78. SP_ERR_TIMEOUT, /*!< timeout */
  79. };
  80. enum{
  81. ERR_CMTNOTFOUND = 1,
  82. ERR_SETCHPATCHANGE = 2,
  83. ERR_TUNERNOTLOCKED = 3,
  84. ERR_SETCHDEMUXPMTFAIL = 4
  85. };
  86. enum
  87. {
  88. S_OK,
  89. S_NOTHANDLE,
  90. E_FAIL = -1,
  91. E_OPENFAIL = -2
  92. };
  93. #ifdef __cplusplus
  94. }
  95. #endif
  96. #endif //_ENGTYPES_H_