chatdefs.h 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. /*
  2. ** Command & Conquer Generals(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  4. **
  5. ** This program is free software: you can redistribute it and/or modify
  6. ** it under the terms of the GNU General Public License as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ** GNU General Public License for more details.
  14. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. #ifndef CHATDEFS_HEADER
  19. #define CHATDEFS_HEADER
  20. // gks 11/3/1999: version numbers for SetClientVersion
  21. // GMU 01/12/01 : bumped CHAT_VERSION_MINOR to 15
  22. // BGC 6/7/01: now version 16
  23. #define CHAT_VERSION_MAJOR 1
  24. #define CHAT_VERSION_MINOR 16
  25. #define CHAT_VERSION ( ( CHAT_VERSION_MAJOR << 16 ) | ( CHAT_VERSION_MINOR ) )
  26. //
  27. // Response errors (Sent as arguments to the OnFoo calls)
  28. //
  29. // Your nick is still logged into chat
  30. #define CHAT_E_NICKINUSE MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 100)
  31. // Your password is incorrect during login
  32. #define CHAT_E_BADPASS MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 101)
  33. // Reference made to non-existant user or channel
  34. #define CHAT_E_NONESUCH MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 102)
  35. // The network layer is down or cannot be initialized for some reason
  36. #define CHAT_E_CON_NETDOWN MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 103)
  37. // Name lookup (e.g DNS) failed for some reason
  38. #define CHAT_E_CON_LOOKUP_FAILED MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 104)
  39. // Some fatal error occured with the net connection
  40. #define CHAT_E_CON_ERROR MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 105)
  41. // General request timeout for a request
  42. #define CHAT_E_TIMEOUT MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 106)
  43. // Must patch before continuing
  44. #define CHAT_E_MUSTPATCH MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 107)
  45. // Miscellaneous internal status error
  46. #define CHAT_E_STATUSERROR MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 108)
  47. // Server has returned something we don't recognise
  48. #define CHAT_E_UNKNOWNRESPONSE MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 109)
  49. // Tried to join a channel that has enough players already
  50. #define CHAT_E_CHANNELFULL MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 110)
  51. // Tried to create a channel that already exists
  52. #define CHAT_E_CHANNELEXISTS MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 111)
  53. // Tried to join a channel that does not exist
  54. #define CHAT_E_CHANNELDOESNOTEXIST MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 112)
  55. // Tried to join a channel with the wrong password
  56. #define CHAT_E_BADCHANNELPASSWORD MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 113)
  57. // You've been banned from the server / channel
  58. #define CHAT_E_BANNED MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 114)
  59. // You tried to do something that required operator status
  60. #define CHAT_E_NOT_OPER MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 115)
  61. // Your account is disabled
  62. #define CHAT_E_DISABLED MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 116)
  63. // Your serial# has been banned
  64. #define CHAT_E_SERIALBANNED MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 117)
  65. // Somebody else is using your serial#
  66. #define CHAT_E_SERIALDUP MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 118)
  67. // New error codes -- gks 1/10/2000
  68. // Serial number does not exist in the database
  69. #define CHAT_E_SERIALUNKNOWN MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 119)
  70. // Serial number is for a different product
  71. #define CHAT_E_SKUSERIALMISMATCH MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 120)
  72. //
  73. // Response success codes (non-error arguments passed to the OnFoo callbacks)
  74. // Note: S_OK is the usual success code
  75. // A network connection is underway
  76. #define CHAT_S_CON_CONNECTING MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 300)
  77. // A network connection is complete
  78. #define CHAT_S_CON_CONNECTED MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 301)
  79. // A network connection is going down
  80. #define CHAT_S_CON_DISCONNECTING MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 302)
  81. // A network connection is closed
  82. #define CHAT_S_CON_DISCONNECTED MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 303)
  83. // Find - Nick not in system
  84. #define CHAT_S_FIND_NOTHERE MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 304)
  85. // Find - Not in any channels
  86. #define CHAT_S_FIND_NOCHAN MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 305)
  87. // Find - user has find turned off
  88. #define CHAT_S_FIND_OFF MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 306)
  89. // Page - Nick not in system
  90. #define CHAT_S_PAGE_NOTHERE MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 307)
  91. // Page - user has page turned off
  92. #define CHAT_S_PAGE_OFF MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 308)
  93. // This channel list is only a ping update
  94. #define CHAT_S_PINGLIST MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 315)
  95. //
  96. // Request errors (returned from the RequestFoo calls)
  97. //
  98. // You are not connected to the chat server
  99. #define CHAT_E_NOTCONNECTED MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 500)
  100. // You are not in a channel
  101. #define CHAT_E_NOCHANNEL MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 501)
  102. // Feature is not implemented
  103. #define CHAT_E_NOTIMPLEMENTED MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 502)
  104. // The request was made while while a conflicting request was still pending
  105. #define CHAT_E_PENDINGREQUEST MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 503)
  106. // Invalid parameter passed - usually a NULL pointer
  107. #define CHAT_E_PARAMERROR MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 504)
  108. // Tried to create or join a channel before leaving the previous one
  109. #define CHAT_E_LEAVECHANNEL MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 508)
  110. // Tried to send something to a channel when not a member of any channel
  111. #define CHAT_E_JOINCHANNEL MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 509)
  112. // Tried to join a non-existant channel
  113. #define CHAT_E_UNKNOWNCHANNEL MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 510)
  114. //
  115. // Request success codes
  116. // Notes: S_OK is the usual success code
  117. //
  118. // Channel list filter values
  119. //
  120. #define CHAT_CHANNEL_LIST_ALL -99999
  121. //
  122. // User flags (bit field)
  123. //
  124. // The owner of the current channel
  125. #define CHAT_USER_CHANNELOWNER 0x0001
  126. // The person with voice (conch shell...)
  127. #define CHAT_USER_VOICE 0x0002
  128. // Squelched?
  129. #define CHAT_USER_SQUELCHED 0x0004
  130. // The local user
  131. #define CHAT_USER_MYSELF 0x8000
  132. //
  133. // Channel flags (bit field)
  134. //
  135. #define CHAN_MODE_PRIVATE 0x0004
  136. #define CHAN_MODE_SECRET 0x0008
  137. #define CHAN_MODE_MODERATED 0x0010
  138. #define CHAN_MODE_TOPICLIMIT 0x0020
  139. #define CHAN_MODE_INVITEONLY 0x0040
  140. #define CHAN_MODE_NOPRIVMSGS 0x0080
  141. #define CHAN_MODE_KEY 0x0100
  142. #define CHAN_MODE_BAN 0x0200
  143. #define CHAN_MODE_LIMIT 0x0400
  144. #endif