chatdefs.h 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. /*
  2. ** Command & Conquer Renegade(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. //
  21. // Response errors (Sent as arguments to the OnFoo calls)
  22. //
  23. // Your nick is still logged into chat
  24. #define CHAT_E_NICKINUSE MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 100)
  25. // Your password is incorrect during login
  26. #define CHAT_E_BADPASS MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 101)
  27. // Reference made to non-existant user or channel
  28. #define CHAT_E_NONESUCH MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 102)
  29. // The network layer is down or cannot be initialized for some reason
  30. #define CHAT_E_CON_NETDOWN MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 103)
  31. // Name lookup (e.g DNS) failed for some reason
  32. #define CHAT_E_CON_LOOKUP_FAILED MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 104)
  33. // Some fatal error occured with the net connection
  34. #define CHAT_E_CON_ERROR MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 105)
  35. // General request timeout for a request
  36. #define CHAT_E_TIMEOUT MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 106)
  37. // Must patch before continuing
  38. #define CHAT_E_MUSTPATCH MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 107)
  39. // Miscellaneous internal status error
  40. #define CHAT_E_STATUSERROR MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 108)
  41. // Server has returned something we don't recognise
  42. #define CHAT_E_UNKNOWNRESPONSE MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 109)
  43. // Tried to join a channel that has enough players already
  44. #define CHAT_E_CHANNELFULL MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 110)
  45. // Tried to create a channel that already exists
  46. #define CHAT_E_CHANNELEXISTS MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 111)
  47. // Tried to join a channel that does not exist
  48. #define CHAT_E_CHANNELDOESNOTEXIST MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 112)
  49. // Tried to join a channel with the wrong password
  50. #define CHAT_E_BADCHANNELPASSWORD MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 113)
  51. // You've been banned from the server / channel
  52. #define CHAT_E_BANNED MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 114)
  53. // You tried to do something that required operator status
  54. #define CHAT_E_NOT_OPER MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 115)
  55. // Your account is disabled
  56. #define CHAT_E_DISABLED MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 116)
  57. // Your serial# has been banned
  58. #define CHAT_E_SERIALBANNED MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 117)
  59. // Somebody else is using your serial#
  60. #define CHAT_E_SERIALDUP MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 118)
  61. // New error codes -- gks 1/10/2000
  62. // Serial number does not exist in the database
  63. #define CHAT_E_SERIALUNKNOWN MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 119)
  64. // Serial number is for a different product
  65. #define CHAT_E_SKUSERIALMISMATCH MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 120)
  66. //
  67. // Response success codes (non-error arguments passed to the OnFoo callbacks)
  68. // Note: S_OK is the usual success code
  69. // A network connection is underway
  70. #define CHAT_S_CON_CONNECTING MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 300)
  71. // A network connection is complete
  72. #define CHAT_S_CON_CONNECTED MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 301)
  73. // A network connection is going down
  74. #define CHAT_S_CON_DISCONNECTING MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 302)
  75. // A network connection is closed
  76. #define CHAT_S_CON_DISCONNECTED MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 303)
  77. // Find - Nick not in system
  78. #define CHAT_S_FIND_NOTHERE MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 304)
  79. // Find - Not in any channels
  80. #define CHAT_S_FIND_NOCHAN MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 305)
  81. // Find - user has find turned off
  82. #define CHAT_S_FIND_OFF MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 306)
  83. // Page - Nick not in system
  84. #define CHAT_S_PAGE_NOTHERE MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 307)
  85. // Page - user has page turned off
  86. #define CHAT_S_PAGE_OFF MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 308)
  87. // This channel list is only a ping update
  88. #define CHAT_S_PINGLIST MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 315)
  89. //
  90. // Request errors (returned from the RequestFoo calls)
  91. //
  92. // You are not connected to the chat server
  93. #define CHAT_E_NOTCONNECTED MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 500)
  94. // You are not in a channel
  95. #define CHAT_E_NOCHANNEL MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 501)
  96. // Feature is not implemented
  97. #define CHAT_E_NOTIMPLEMENTED MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 502)
  98. // The request was made while while a conflicting request was still pending
  99. #define CHAT_E_PENDINGREQUEST MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 503)
  100. // Invalid parameter passed - usually a NULL pointer
  101. #define CHAT_E_PARAMERROR MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 504)
  102. // Tried to create or join a channel before leaving the previous one
  103. #define CHAT_E_LEAVECHANNEL MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 508)
  104. // Tried to send something to a channel when not a member of any channel
  105. #define CHAT_E_JOINCHANNEL MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 509)
  106. // Tried to join a non-existant channel
  107. #define CHAT_E_UNKNOWNCHANNEL MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 510)
  108. //
  109. // Request success codes
  110. // Notes: S_OK is the usual success code
  111. //
  112. // Channel list filter values
  113. //
  114. #define CHAT_CHANNEL_LIST_ALL -99999
  115. //
  116. // User flags (bit field)
  117. //
  118. // The owner of the current channel
  119. #define CHAT_USER_CHANNELOWNER 0x0001
  120. // The person with voice (conch shell...)
  121. #define CHAT_USER_VOICE 0x0002
  122. // Squelched?
  123. #define CHAT_USER_SQUELCHED 0x0004
  124. // The local user
  125. #define CHAT_USER_MYSELF 0x8000
  126. //
  127. // Channel flags (bit field)
  128. //
  129. #define CHAN_MODE_PRIVATE 0x0004
  130. #define CHAN_MODE_SECRET 0x0008
  131. #define CHAN_MODE_MODERATED 0x0010
  132. #define CHAN_MODE_TOPICLIMIT 0x0020
  133. #define CHAN_MODE_INVITEONLY 0x0040
  134. #define CHAN_MODE_NOPRIVMSGS 0x0080
  135. #define CHAN_MODE_KEY 0x0100
  136. #define CHAN_MODE_BAN 0x0200
  137. #define CHAN_MODE_LIMIT 0x0400
  138. #endif