saAis.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. /*
  2. * Copyright (c) 2002-2003 MontaVista Software, Inc.
  3. *
  4. * All rights reserved.
  5. *
  6. * Author: Steven Dake (sdake@mvista.com)
  7. *
  8. * This software licensed under BSD license, the text of which follows:
  9. *
  10. * Redistribution and use in source and binary forms, with or without
  11. * modification, are permitted provided that the following conditions are met:
  12. *
  13. * - Redistributions of source code must retain the above copyright notice,
  14. * this list of conditions and the following disclaimer.
  15. * - Redistributions in binary form must reproduce the above copyright notice,
  16. * this list of conditions and the following disclaimer in the documentation
  17. * and/or other materials provided with the distribution.
  18. * - Neither the name of the MontaVista Software, Inc. nor the names of its
  19. * contributors may be used to endorse or promote products derived from this
  20. * software without specific prior written permission.
  21. *
  22. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  23. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  24. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  25. * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  26. * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  27. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  28. * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  29. * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  30. * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  31. * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  32. * THE POSSIBILITY OF SUCH DAMAGE.
  33. */
  34. #ifndef AIS_TYPES_H_DEFINED
  35. #define AIS_TYPES_H_DEFINED
  36. typedef enum {
  37. SA_FALSE = 0,
  38. SA_TRUE = 1
  39. } SaBoolT;
  40. #include <stdint.h>
  41. typedef int8_t SaInt8T;
  42. typedef int16_t SaInt16T;
  43. typedef int32_t SaInt32T;
  44. typedef int64_t SaInt64T;
  45. typedef uint8_t SaUint8T;
  46. typedef uint16_t SaUint16T;
  47. typedef uint32_t SaUint32T;
  48. typedef uint64_t SaUint64T;
  49. typedef float SaFloatT;
  50. typedef double SaDoubleT;
  51. typedef char * SaStringT;
  52. typedef SaInt64T SaTimeT;
  53. #define SA_TIME_END ((SaTimeT)0x7fffffffffffffffull)
  54. #define SA_TIME_BEGIN 0x0ULL
  55. #define SA_TIME_UNKNOWN 0x8000000000000000ULL
  56. #define SA_TIME_ONE_MICROSECOND 1000ULL
  57. #define SA_TIME_ONE_MILLISECOND 1000000ULL
  58. #define SA_TIME_ONE_SECOND 1000000000ULL
  59. #define SA_TIME_ONE_MINUTE 60000000000ULL
  60. #define SA_TIME_ONE_HOUR 3600000000000ULL
  61. #define SA_TIME_ONE_DAY 86400000000000ULL
  62. #define SA_TIME_MAX SA_TIME_END
  63. #define SA_MAX_NAME_LENGTH 256
  64. typedef struct {
  65. SaUint16T length;
  66. SaUint8T value[SA_MAX_NAME_LENGTH];
  67. } SaNameT;
  68. typedef struct {
  69. char releaseCode;
  70. unsigned char majorVersion;
  71. unsigned char minorVersion;
  72. } SaVersionT;
  73. typedef SaUint64T SaNtfIdentifierT;
  74. #define SA_TRACK_CURRENT 0x01
  75. #define SA_TRACK_CHANGES 0x02
  76. #define SA_TRACK_CHANGES_ONLY 0x04
  77. typedef enum {
  78. SA_DISPATCH_ONE = 1,
  79. SA_DISPATCH_ALL = 2,
  80. SA_DISPATCH_BLOCKING = 3
  81. } SaDispatchFlagsT;
  82. typedef enum {
  83. SA_AIS_OK = 1,
  84. SA_AIS_ERR_LIBRARY = 2,
  85. SA_AIS_ERR_VERSION = 3,
  86. SA_AIS_ERR_INIT = 4,
  87. SA_AIS_ERR_TIMEOUT = 5,
  88. SA_AIS_ERR_TRY_AGAIN = 6,
  89. SA_AIS_ERR_INVALID_PARAM = 7,
  90. SA_AIS_ERR_NO_MEMORY = 8,
  91. SA_AIS_ERR_BAD_HANDLE = 9,
  92. SA_AIS_ERR_BUSY = 10,
  93. SA_AIS_ERR_ACCESS = 11,
  94. SA_AIS_ERR_NOT_EXIST = 12,
  95. SA_AIS_ERR_NAME_TOO_LONG = 13,
  96. SA_AIS_ERR_EXIST = 14,
  97. SA_AIS_ERR_NO_SPACE = 15,
  98. SA_AIS_ERR_INTERRUPT = 16,
  99. SA_AIS_ERR_NAME_NOT_FOUND = 17,
  100. SA_AIS_ERR_NO_RESOURCES = 18,
  101. SA_AIS_ERR_NOT_SUPPORTED = 19,
  102. SA_AIS_ERR_BAD_OPERATION = 20,
  103. SA_AIS_ERR_FAILED_OPERATION = 21,
  104. SA_AIS_ERR_MESSAGE_ERROR = 22,
  105. SA_AIS_ERR_QUEUE_FULL = 23,
  106. SA_AIS_ERR_QUEUE_NOT_AVAILABLE = 24,
  107. SA_AIS_ERR_BAD_FLAGS = 25,
  108. SA_AIS_ERR_TOO_BIG = 26,
  109. SA_AIS_ERR_NO_SECTIONS = 27
  110. } SaAisErrorT;
  111. typedef SaUint64T SaSelectionObjectT;
  112. typedef SaUint64T SaInvocationT;
  113. typedef SaUint64T SaSizeT;
  114. #endif /* AIS_TYPES_H_DEFINED */