Team Fortress 2 Source Code as on 22/4/2020
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.

203 lines
12 KiB

  1. //====== Copyright 1996-2010, Valve Corporation, All rights reserved. =======
  2. //
  3. // Purpose: The file defines our Google Protocol Buffers which are used in over
  4. // the wire messages between servers as well as between clients and servers.
  5. //
  6. //=============================================================================
  7. // We care more about speed than code size
  8. option optimize_for = SPEED;
  9. // We don't use the service generation functionality
  10. option cc_generic_services = false;
  11. //
  12. // STYLE NOTES:
  13. //
  14. // Use CamelCase CMsgMyMessageName style names for messages.
  15. //
  16. // Use lowercase _ delimited names like my_steam_id for field names, this is non-standard for Steam,
  17. // but plays nice with the Google formatted code generation.
  18. //
  19. // Try not to use required fields ever. Only do so if you are really really sure you'll never want them removed.
  20. // Optional should be preffered as it will make versioning easier and cleaner in the future if someone refactors
  21. // your message and wants to remove or rename fields.
  22. //
  23. // Use fixed64 for JobId_t, GID_t, or SteamID. This is appropriate for any field that is normally
  24. // going to be larger than 2^56. Otherwise use int64 for 64 bit values that are frequently smaller
  25. // than 2^56 as it will safe space on the wire in those cases.
  26. //
  27. // Similar to fixed64, use fixed32 for RTime32 or other 32 bit values that are frequently larger than
  28. // 2^28. It will safe space in those cases, otherwise use int32 which will safe space for smaller values.
  29. // An exception to this rule for RTime32 is if the value will frequently be zero rather than set to an actual
  30. // time.
  31. //
  32. enum EGCSystemMsg
  33. {
  34. k_EGCMsgInvalid = 0;
  35. k_EGCMsgMulti = 1;
  36. k_EGCMsgGenericReply = 10;
  37. k_EGCMsgSystemBase = 50;
  38. k_EGCMsgAchievementAwarded = 51;
  39. k_EGCMsgConCommand = 52; // A command from the GC's admin console
  40. k_EGCMsgStartPlaying = 53;
  41. k_EGCMsgStopPlaying = 54;
  42. k_EGCMsgStartGameserver = 55;
  43. k_EGCMsgStopGameserver = 56;
  44. k_EGCMsgWGRequest = 57;
  45. k_EGCMsgWGResponse = 58;
  46. k_EGCMsgGetUserGameStatsSchema = 59; // Gets the user game stats schema for the app
  47. k_EGCMsgGetUserGameStatsSchemaResponse = 60;
  48. k_EGCMsgGetUserStatsDEPRECATED = 61; // Gets user game stats for a user
  49. k_EGCMsgGetUserStatsResponse = 62;
  50. k_EGCMsgAppInfoUpdated = 63; // Message sent to the GC when there has been an AppInfo update
  51. k_EGCMsgValidateSession = 64; // Message sent by the GC when it wants to make sure a session exists
  52. k_EGCMsgValidateSessionResponse = 65; // Message sent to the GC in response to ValidateSession
  53. k_EGCMsgLookupAccountFromInput = 66; // Sent by the GC to lookup user. Reply is k_EGCMsgGenericReply
  54. k_EGCMsgSendHTTPRequest = 67; // Message sent by the GC to do a generic HTTP request
  55. k_EGCMsgSendHTTPRequestResponse = 68; // Response back to the GC with the results of the HTTP request
  56. k_EGCMsgPreTestSetup = 69; // Reset the GC database (usually for testing purposes)
  57. k_EGCMsgRecordSupportAction = 70; // Logs a support action
  58. k_EGCMsgGetAccountDetails_DEPRECATED = 71; // DEPRECATED - Use protobuf-based k_EGCMsgGetAccountDetails //Requests the details for an account
  59. // k_EGCMsgSendInterAppMessage = 72; // Sends a message to another app's GC
  60. k_EGCMsgReceiveInterAppMessage = 73; // Receives a message from another app's GC
  61. k_EGCMsgFindAccounts = 74; // queries the AMs for accounts by name
  62. k_EGCMsgPostAlert = 75; // posts an alert to Steam
  63. k_EGCMsgGetLicenses = 76; // asks Steam for the user's licenses
  64. k_EGCMsgGetUserStats = 77; // Gets user game stats for a user
  65. k_EGCMsgGetCommands = 78; // request for a list of commands from a gc console
  66. k_EGCMsgGetCommandsResponse = 79; // response with a list of commands for a gc console
  67. k_EGCMsgAddFreeLicense = 80; // request for for Steam to add a license to the specified free package
  68. k_EGCMsgAddFreeLicenseResponse = 81; // response with the result of the attempt to add a free license
  69. k_EGCMsgGetIPLocation = 82; // Get geolocation data for a specific IP
  70. k_EGCMsgGetIPLocationResponse = 83; // Geolocation response
  71. k_EGCMsgSystemStatsSchema = 84; // Message sent by the GC specifying what its stats schema is
  72. k_EGCMsgGetSystemStats = 85; // Message sent to the GC requesting its stats
  73. k_EGCMsgGetSystemStatsResponse = 86; // Message sent by the GC with its stats
  74. k_EGCMsgSendEmail = 87; // Sent by the GC to send an email to a user
  75. k_EGCMsgSendEmailResponse = 88; // Response with the result of the send request
  76. k_EGCMsgGetEmailTemplate = 89; // Sent to the GC to request an email template
  77. k_EGCMsgGetEmailTemplateResponse = 90; // Get email template response
  78. k_EGCMsgGrantGuestPass = 91; // Sends a guest pass/gift to a user
  79. k_EGCMsgGrantGuestPassResponse = 92; // Send guest pass response
  80. k_EGCMsgGetAccountDetails = 93; // Requests the details for an account
  81. k_EGCMsgGetAccountDetailsResponse = 94; // Requests the details for an account response
  82. k_EGCMsgGetPersonaNames = 95; // Gets the persona names for a set of accounts
  83. k_EGCMsgGetPersonaNamesResponse = 96; // Gets the persona names for a set of accounts response
  84. k_EGCMsgMultiplexMsg = 97; // Sends a single message to multiple users
  85. // web API calls
  86. k_EGCMsgWebAPIRegisterInterfaces = 101; // sent once at startup to register APIs
  87. k_EGCMsgWebAPIJobRequest = 102; // sent when an actual request is made
  88. // k_EGCMsgWebAPIRegistrationRequested = 103; // sent by the GC Host when it learns a web API server has started -- No longer sent by the GCH
  89. k_EGCMsgWebAPIJobRequestHttpResponse = 104; // sent by the GC in response to k_EGCMsgWebAPIJobRequest - uses CMsgHttpResponse
  90. k_EGCMsgWebAPIJobRequestForwardResponse = 105; // sent by the GC in response to k_EGCMsgWebAPIJobRequest - uses CMsgGCMsgWebAPIJobRequestForwardResponse
  91. // Memcached
  92. k_EGCMsgMemCachedGet = 200; // Get key(s) from memcached
  93. k_EGCMsgMemCachedGetResponse = 201; // Retrieved keys
  94. k_EGCMsgMemCachedSet = 202; // Set key(s) into memcached
  95. k_EGCMsgMemCachedDelete = 203; // Delete key(s) from memcached
  96. k_EGCMsgMemCachedStats = 204; // Request stats from memcached
  97. k_EGCMsgMemCachedStatsResponse = 205; // Retrieved stats
  98. // SQL
  99. k_EGCMsgSQLStats = 210; // Get the current SQL stats
  100. k_EGCMsgSQLStatsResponse = 211; // Retrieved stats
  101. // Multi-GC setup
  102. k_EGCMsgMasterSetDirectory = 220; // The master GC will send this back to the GCH indicating the sub GC's that need to be created
  103. k_EGCMsgMasterSetDirectoryResponse = 221; // Response back from the GCH to the master GC regarding the successful receiving of the directory (note this doesn't mean all sub GCs are done starting up)
  104. k_EGCMsgMasterSetWebAPIRouting = 222; // The master GC will send this back to the GCH indicating the routing details for WebAPI requests
  105. k_EGCMsgMasterSetWebAPIRoutingResponse = 223; // Response back from the GCH to the master GC regarding the successful receipt and processing of k_EGCMsgMasterSetWebAPIRouting
  106. k_EGCMsgMasterSetClientMsgRouting = 224; // The master GC will send this back to the GCH indicating the routing details for client messages
  107. k_EGCMsgMasterSetClientMsgRoutingResponse = 225; // Response back from the GCH to the master GC regarding the successful receipt and processing of k_EGCMsgMasterSetClientMsgRouting
  108. k_EGCMsgSetOptions = 226; // Each GC can send this back to the GCH indicating which client messages and data streams the GC is interested in
  109. k_EGCMsgSetOptionsResponse = 227; // Response back from the GCH (optional - don't send a job ID with SetOptions to skip the response)
  110. // Newer GC SDK messages. All should be protobuf based.
  111. k_EGCMsgSystemBase2 = 500;
  112. k_EGCMsgGetPurchaseTrustStatus = 501; // Gets information about a user's purchase trustworthiness
  113. k_EGCMsgGetPurchaseTrustStatusResponse = 502; // Gets information about a user's purchase trustworthiness response
  114. k_EGCMsgUpdateSession = 503; // GCH update regarding the status of a session, only sent if the convar to enable these messages is set
  115. k_EGCMsgGCAccountVacStatusChange = 504; // Accounts VAC status has changed
  116. k_EGCMsgCheckFriendship = 505; // GC checking if two users are friends
  117. k_EGCMsgCheckFriendshipResponse = 506; // Response to the GC regarding the users' friendship
  118. k_EGCMsgGetPartnerAccountLink = 507; // Request the partner account link details for a user
  119. k_EGCMsgGetPartnerAccountLinkResponse = 508; // Response to the GC with the partner account link details
  120. k_EGCMsgVSReportedSuspiciousActivity = 509; // Suspicious activity detected on user's account
  121. k_EGCMsgAccountTradeBanStatusChange = 510; // Account's trade ban status has changed
  122. k_EGCMsgAccountLockStatusChange = 511; // Account's lock status has changed
  123. k_EGCMsgDPPartnerMicroTxns = 512; // A set of microtransaction data relayed to the DP for insert or update.
  124. k_EGCMsgDPPartnerMicroTxnsResponse = 513; // ... Response
  125. k_EGCMsgGetIPASN = 514; // Get ASN data for a specific IP
  126. k_EGCMsgGetIPASNResponse = 515; // IP ASN response
  127. k_EGCMsgGetAppFriendsList = 516; // GC requesting a list of app-friends for a user (defined as friends who play the app requesting the friends list)
  128. k_EGCMsgGetAppFriendsListResponse = 517; // ... Response
  129. k_EGCMsgVacVerificationChange = 518; // From VS to GC
  130. k_EGCMsgAccountPhoneNumberChange = 519; // From Phone Server to GC
  131. k_EGCMsgAccountTwoFactorChange = 520; // From AM to GC
  132. k_EGCMsgCheckClanMembership = 521; // Checks if an account is a member of a given clan
  133. k_EGCMsgCheckClanMembershipResponse = 522; // Checks if an account is a member of a given clan response
  134. };
  135. enum ESOMsg
  136. {
  137. k_ESOMsg_Create = 21;
  138. k_ESOMsg_Update = 22;
  139. k_ESOMsg_Destroy = 23;
  140. k_ESOMsg_CacheSubscribed = 24;
  141. k_ESOMsg_CacheUnsubscribed = 25;
  142. k_ESOMsg_UpdateMultiple = 26;
  143. k_ESOMsg_CacheSubscriptionCheck = 27; // need to get rid of this!
  144. k_ESOMsg_CacheSubscriptionRefresh = 28;
  145. k_ESOMsg_CacheSubscribedUpToDate = 29;
  146. };
  147. enum EGCBaseClientMsg
  148. {
  149. k_EMsgGCPingRequest = 3001; // GC <=> client
  150. k_EMsgGCPingResponse = 3002; // GC <=> client
  151. // WARNING: These messages were promoted into the gcsdk
  152. // from base_gcmessages.proto (which is not part of the gcsdk put is
  153. // "shared game code"). But we did not want to change the numbers
  154. // for existing messages. Don't add new messages in the 4000 range!
  155. k_EMsgGCClientWelcome = 4004; // GC => client
  156. k_EMsgGCServerWelcome = 4005; // GC => server
  157. k_EMsgGCClientHello = 4006; // client => GC
  158. k_EMsgGCServerHello = 4007; // server => GC
  159. k_EMsgGCClientGoodbye = 4008; // GC => client
  160. k_EMsgGCServerGoodbye = 4009; // GC => server
  161. // !FIXME! DOTAMERGE
  162. //k_EMsgGCClientConnectionStatus = 4009; // GC => client
  163. //k_EMsgGCServerConnectionStatus = 4010; // GC => server
  164. };
  165. enum EGCToGCMsg
  166. {
  167. k_EGCToGCMsgMasterAck = 150; // Sub GC => Master GC, confirm that we've started up successfully so the master can go when all sub GCs are ready
  168. k_EGCToGCMsgMasterAckResponse = 151; // Master GC => Sub GC, the ack came through fine and everything is as expected
  169. k_EGCToGCMsgRouted = 152; // Master GC => Sub GC, a routed message that originally came in from a client or the system and has been sent to another GC
  170. k_EGCToGCMsgRoutedReply = 153; // Sub GC => Sub/Master GC, a reply message that needs to be sent back from the original GC that received the message
  171. k_EMsgGCUpdateSubGCSessionInfo = 154; // Master GC => Other GCs
  172. k_EMsgGCRequestSubGCSessionInfo = 155; // Sub GC => Master GC
  173. k_EMsgGCRequestSubGCSessionInfoResponse = 156; // Master GC => Sub GC
  174. k_EGCToGCMsgMasterStartupComplete = 157; // Master GC => Sub GC - Indicates that the master universe has completed startup, indicating that sub GC's are in a good spot to complete startup
  175. k_EMsgGCToGCSOCacheSubscribe = 158; // Master GC => Sub GC - A steam ID has subscribed to another SO cache (or possibly their own)
  176. k_EMsgGCToGCSOCacheUnsubscribe = 159; // Master GC => Sub GC - A steam ID has unsubscribed from another SO cache (or possibly their own)
  177. }
  178. // Do not remove this comment due to a bug on the Mac OS X protobuf compiler