types.h 1.7 KB

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