Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

178 lines
4.3 KiB

  1. /*****************************************************************************
  2. *
  3. * Copyright (c) 2000 - 2001 Microsoft Corporation
  4. *
  5. * Module Name:
  6. *
  7. * obexerr.h
  8. *
  9. * Abstract:
  10. *
  11. * Error codes for OBEX
  12. *
  13. *****************************************************************************/
  14. #if _MSC_VER >= 1000
  15. #pragma once
  16. #endif // _MSC_VER >= 1000
  17. #ifndef __OBEXERR_H__
  18. #define __OBEXERR_H__
  19. //--------------------------------------------------------------------------
  20. // Core OBEX Error messages
  21. //--------------------------------------------------------------------------
  22. //
  23. // Values are 32 bit values layed out as follows:
  24. //
  25. // 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
  26. // 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
  27. // +---+-+-+-----------------------+-------------------------------+
  28. // |Sev|C|R| Facility | Code |
  29. // +---+-+-+-----------------------+-------------------------------+
  30. //
  31. // where
  32. //
  33. // Sev - is the severity code
  34. //
  35. // 00 - Success
  36. // 01 - Informational
  37. // 10 - Warning
  38. // 11 - Error
  39. //
  40. // C - is the Customer code flag
  41. //
  42. // R - is a reserved bit
  43. //
  44. // Facility - is the facility code
  45. //
  46. // Code - is the facility's status code
  47. //
  48. //
  49. // Define the facility codes
  50. //
  51. //
  52. // OBEX error codes from the spec mapped into HRESULTS
  53. //
  54. #define E_OBEX_BASE MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0300)
  55. #define HRESULT_FROM_OBEX(x) ( (x == 0x20) ? S_OK : E_OBEX_BASE | x )
  56. #define OBEX_FROM_HRESULT ( (x == S_OK) ? OBEX_REPLY_SUCCESS : x & 0x000000FF )
  57. #define IS_OBEX_ERR(x) ( (x & 0x00000F00) == 0x0300 )
  58. //
  59. // Windows specific error codes
  60. //
  61. //
  62. // MessageId: OBEX_E_DISCONNECTED
  63. //
  64. // MessageText:
  65. //
  66. // The connection has been disconnected.
  67. //
  68. #define OBEX_E_DISCONNECTED MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0200)
  69. //
  70. // MessageId: OBEX_E_ABORTED
  71. //
  72. // MessageText:
  73. //
  74. // The request has been aborted.
  75. //
  76. #define OBEX_E_ABORTED MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0201)
  77. //
  78. // MessageId: OBEX_E_NOT_INITIALIZED
  79. //
  80. // MessageText:
  81. //
  82. // OBEX has not been initialized.
  83. //
  84. #define OBEX_E_NOT_INITIALIZED MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0202)
  85. //
  86. // MessageId: OBEX_E_TRANSPORT_NOT_AVAILABLE
  87. //
  88. // MessageText:
  89. //
  90. // The requested transport is not available.
  91. //
  92. #define OBEX_E_TRANSPORT_NOT_AVAILABLE MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0203)
  93. // MessageId: OBEX_E_TRANSPORT_INIT
  94. //
  95. // MessageText:
  96. //
  97. // An error occurred while initializing the transports.
  98. //
  99. #define OBEX_E_TRANSPORT_INIT MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0204)
  100. // MessageId: OBEX_E_ALREADY_CONNECTED
  101. //
  102. // MessageText:
  103. //
  104. // A connection to the device has already been established.
  105. //
  106. #define OBEX_E_ALREADY_CONNECTED MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0205)
  107. // MessageId: OBEX_E_NOT_CONNECTED
  108. //
  109. // MessageText:
  110. //
  111. // A connection to the device has not been established.
  112. //
  113. #define OBEX_E_NOT_CONNECTED MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0206)
  114. // MessageId: OBEX_E_CANT_CONNECT
  115. //
  116. // MessageText:
  117. //
  118. // A connection to the OBEX service on the remote device could not be established.
  119. //
  120. #define OBEX_E_CANT_CONNECT MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0207)
  121. // MessageId: OBEX_E_TIMEOUT
  122. //
  123. // MessageText:
  124. //
  125. // A timeout occurred while communicating on the network.
  126. //
  127. #define OBEX_E_TIMEOUT MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0208)
  128. // MessageId: OBEX_E_NETWORK_ERROR
  129. //
  130. // MessageText:
  131. //
  132. // An unspecified network error occurred.
  133. //
  134. #define OBEX_E_NETWORK_ERROR MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0209)
  135. // MessageId: OBEX_E_DEVICE_NOT_FOUND
  136. //
  137. // MessageText:
  138. //
  139. // The specified device could not be located.
  140. //
  141. #define OBEX_E_DEVICE_NOT_FOUND MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x020A)
  142. // MessageId: OBEX_E_SERIVCE_ALREADY_REGISTERED
  143. //
  144. // MessageText:
  145. //
  146. // The specified service has already been registered.
  147. //
  148. #define OBEX_E_SERIVCE_ALREADY_REGISTERED MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x020B)
  149. // MessageId: OBEX_E_UNEXPECTED
  150. //
  151. // MessageText:
  152. //
  153. // The unexpected error occurred.
  154. //
  155. #define OBEX_E_UNEXPECTED MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x020C)
  156. #endif // #ifndef __OBEXERR_H__