Counter Strike : Global Offensive Source Code
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.

703 lines
21 KiB

  1. /************ (C) Copyright 2004 Valve Corporation, All rights reserved. ***********
  2. **
  3. ** The copyright to the contents herein is the property of Valve Corporation.
  4. ** The contents may be used and/or copied only with the written permission of
  5. ** Valve, or in accordance with the terms and conditions stipulated in
  6. ** the agreement/contract under which the contents have been supplied.
  7. **
  8. *******************************************************************************
  9. **
  10. ** Contents:
  11. **
  12. ** Common types used in the Steam DLL interface.
  13. **
  14. ** This file is distributed to Steam application developers.
  15. **
  16. **
  17. **
  18. *******************************************************************************/
  19. #ifndef INCLUDED_STEAM2_USERID_STRUCTS
  20. #define INCLUDED_STEAM2_USERID_STRUCTS
  21. #if defined(_MSC_VER) && (_MSC_VER > 1000)
  22. #pragma once
  23. #endif
  24. #ifdef __cplusplus
  25. extern "C"
  26. {
  27. #endif
  28. /* Applications should not define STEAM_EXPORTS. */
  29. #if defined ( _WIN32 )
  30. #ifdef STEAM_EXPORTS
  31. #define STEAM_API __declspec(dllexport)
  32. #else
  33. #define STEAM_API __declspec(dllimport)
  34. #endif
  35. #define STEAM_CALL __cdecl
  36. #else
  37. #define STEAM_API /* */
  38. #define STEAM_CALL /* */
  39. #endif
  40. typedef void (STEAM_CALL *KeyValueIteratorCallback_t )(const char *Key, const char *Val, void *pvParam);
  41. /******************************************************************************
  42. **
  43. ** Exported macros and constants
  44. **
  45. ******************************************************************************/
  46. /* DEPRECATED -- these are ignored now, all API access is granted on SteamStartup */
  47. #define STEAM_USING_FILESYSTEM (0x00000001)
  48. #define STEAM_USING_LOGGING (0x00000002)
  49. #define STEAM_USING_USERID (0x00000004)
  50. #define STEAM_USING_ACCOUNT (0x00000008)
  51. #define STEAM_USING_ALL (0x0000000f)
  52. /* END DEPRECATED */
  53. #define STEAM_MAX_PATH (255)
  54. #define STEAM_QUESTION_MAXLEN (255)
  55. #define STEAM_SALT_SIZE (8)
  56. #define STEAM_PROGRESS_PERCENT_SCALE (0x00001000)
  57. /* These are maximum significant string lengths, excluding nul-terminator. */
  58. #define STEAM_CARD_NUMBER_SIZE (17)
  59. #define STEAM_CARD_HOLDERNAME_SIZE (100)
  60. #define STEAM_CARD_EXPYEAR_SIZE (4)
  61. #define STEAM_CARD_EXPMONTH_SIZE (2)
  62. #define STEAM_CARD_CVV2_SIZE (5)
  63. #define STEAM_BILLING_ADDRESS1_SIZE (128)
  64. #define STEAM_BILLING_ADDRESS2_SIZE (128)
  65. #define STEAM_BILLING_CITY_SIZE (50)
  66. #define STEAM_BILLING_ZIP_SIZE (16)
  67. #define STEAM_BILLING_STATE_SIZE (32)
  68. #define STEAM_BILLING_COUNTRY_SIZE (32)
  69. #define STEAM_BILLING_PHONE_SIZE (20)
  70. #define STEAM_BILLING_EMAIL_ADDRESS_SIZE (100)
  71. #define STEAM_TYPE_OF_PROOF_OF_PURCHASE_SIZE (20)
  72. #define STEAM_PROOF_OF_PURCHASE_TOKEN_SIZE (200)
  73. #define STEAM_EXTERNAL_ACCOUNTNAME_SIZE (100)
  74. #define STEAM_EXTERNAL_ACCOUNTPASSWORD_SIZE (80)
  75. #define STEAM_BILLING_CONFIRMATION_CODE_SIZE (22)
  76. #define STEAM_BILLING_CARD_APPROVAL_CODE_SIZE (100)
  77. #define STEAM_BILLING_TRANS_DATE_SIZE (9) // mm/dd/yy
  78. #define STEAM_BILLING_TRANS_TIME_SIZE (9) // hh:mm:ss
  79. /******************************************************************************
  80. **
  81. ** Scalar type and enumerated type definitions.
  82. **
  83. ******************************************************************************/
  84. typedef unsigned int SteamHandle_t;
  85. typedef void * SteamUserIDTicketValidationHandle_t;
  86. typedef unsigned int SteamCallHandle_t;
  87. #if defined(_MSC_VER)
  88. typedef unsigned __int64 SteamUnsigned64_t;
  89. #else
  90. typedef unsigned long long SteamUnsigned64_t;
  91. #endif
  92. typedef enum
  93. {
  94. eSteamSeekMethodSet = 0,
  95. eSteamSeekMethodCur = 1,
  96. eSteamSeekMethodEnd = 2
  97. } ESteamSeekMethod;
  98. typedef enum
  99. {
  100. eSteamBufferMethodFBF = 0,
  101. eSteamBufferMethodNBF = 1
  102. } ESteamBufferMethod;
  103. typedef enum
  104. {
  105. eSteamErrorNone = 0,
  106. eSteamErrorUnknown = 1,
  107. eSteamErrorLibraryNotInitialized = 2,
  108. eSteamErrorLibraryAlreadyInitialized = 3,
  109. eSteamErrorConfig = 4,
  110. eSteamErrorContentServerConnect = 5,
  111. eSteamErrorBadHandle = 6,
  112. eSteamErrorHandlesExhausted = 7,
  113. eSteamErrorBadArg = 8,
  114. eSteamErrorNotFound = 9,
  115. eSteamErrorRead = 10,
  116. eSteamErrorEOF = 11,
  117. eSteamErrorSeek = 12,
  118. eSteamErrorCannotWriteNonUserConfigFile = 13,
  119. eSteamErrorCacheOpen = 14,
  120. eSteamErrorCacheRead = 15,
  121. eSteamErrorCacheCorrupted = 16,
  122. eSteamErrorCacheWrite = 17,
  123. eSteamErrorCacheSession = 18,
  124. eSteamErrorCacheInternal = 19,
  125. eSteamErrorCacheBadApp = 20,
  126. eSteamErrorCacheVersion = 21,
  127. eSteamErrorCacheBadFingerPrint = 22,
  128. eSteamErrorNotFinishedProcessing = 23,
  129. eSteamErrorNothingToDo = 24,
  130. eSteamErrorCorruptEncryptedUserIDTicket = 25,
  131. eSteamErrorSocketLibraryNotInitialized = 26,
  132. eSteamErrorFailedToConnectToUserIDTicketValidationServer = 27,
  133. eSteamErrorBadProtocolVersion = 28,
  134. eSteamErrorReplayedUserIDTicketFromClient = 29,
  135. eSteamErrorReceiveResultBufferTooSmall = 30,
  136. eSteamErrorSendFailed = 31,
  137. eSteamErrorReceiveFailed = 32,
  138. eSteamErrorReplayedReplyFromUserIDTicketValidationServer = 33,
  139. eSteamErrorBadSignatureFromUserIDTicketValidationServer = 34,
  140. eSteamErrorValidationStalledSoAborted = 35,
  141. eSteamErrorInvalidUserIDTicket = 36,
  142. eSteamErrorClientLoginRateTooHigh = 37,
  143. eSteamErrorClientWasNeverValidated = 38,
  144. eSteamErrorInternalSendBufferTooSmall = 39,
  145. eSteamErrorInternalReceiveBufferTooSmall = 40,
  146. eSteamErrorUserTicketExpired = 41,
  147. eSteamErrorCDKeyAlreadyInUseOnAnotherClient = 42,
  148. eSteamErrorNotLoggedIn = 101,
  149. eSteamErrorAlreadyExists = 102,
  150. eSteamErrorAlreadySubscribed = 103,
  151. eSteamErrorNotSubscribed = 104,
  152. eSteamErrorAccessDenied = 105,
  153. eSteamErrorFailedToCreateCacheFile = 106,
  154. eSteamErrorCallStalledSoAborted = 107,
  155. eSteamErrorEngineNotRunning = 108,
  156. eSteamErrorEngineConnectionLost = 109,
  157. eSteamErrorLoginFailed = 110,
  158. eSteamErrorAccountPending = 111,
  159. eSteamErrorCacheWasMissingRetry = 112,
  160. eSteamErrorLocalTimeIncorrect = 113,
  161. eSteamErrorCacheNeedsDecryption = 114,
  162. eSteamErrorAccountDisabled = 115,
  163. eSteamErrorCacheNeedsRepair = 116,
  164. eSteamErrorRebootRequired = 117,
  165. eSteamErrorNetwork = 200,
  166. eSteamErrorOffline = 201
  167. } ESteamError;
  168. typedef enum
  169. {
  170. eNoDetailedErrorAvailable,
  171. eStandardCerrno,
  172. eWin32LastError,
  173. eWinSockLastError,
  174. eDetailedPlatformErrorCount
  175. } EDetailedPlatformErrorType;
  176. typedef enum /* Filter elements returned by SteamFind{First,Next} */
  177. {
  178. eSteamFindLocalOnly, /* limit search to local filesystem */
  179. eSteamFindRemoteOnly, /* limit search to remote repository */
  180. eSteamFindAll /* do not limit search (duplicates allowed) */
  181. } ESteamFindFilter;
  182. /******************************************************************************
  183. **
  184. ** Exported structure and complex type definitions.
  185. **
  186. ******************************************************************************/
  187. typedef struct
  188. {
  189. ESteamError eSteamError;
  190. EDetailedPlatformErrorType eDetailedErrorType;
  191. int nDetailedErrorCode;
  192. char szDesc[STEAM_MAX_PATH];
  193. } TSteamError;
  194. typedef struct
  195. {
  196. int bIsDir; /* If non-zero, element is a directory; if zero, element is a file */
  197. unsigned int uSizeOrCount; /* If element is a file, this contains size of file in bytes */
  198. int bIsLocal; /* If non-zero, reported item is a standalone element on local filesystem */
  199. char cszName[STEAM_MAX_PATH]; /* Base element name (no path) */
  200. long lLastAccessTime; /* Seconds since 1/1/1970 (like time_t) when element was last accessed */
  201. long lLastModificationTime; /* Seconds since 1/1/1970 (like time_t) when element was last modified */
  202. long lCreationTime; /* Seconds since 1/1/1970 (like time_t) when element was created */
  203. } TSteamElemInfo;
  204. typedef struct
  205. {
  206. unsigned int uNumSubscriptions;
  207. unsigned int uMaxNameChars;
  208. unsigned int uMaxApps;
  209. } TSteamSubscriptionStats;
  210. typedef struct
  211. {
  212. unsigned int uNumApps;
  213. unsigned int uMaxNameChars;
  214. unsigned int uMaxInstallDirNameChars;
  215. unsigned int uMaxVersionLabelChars;
  216. unsigned int uMaxLaunchOptions;
  217. unsigned int uMaxLaunchOptionDescChars;
  218. unsigned int uMaxLaunchOptionCmdLineChars;
  219. unsigned int uMaxNumIcons;
  220. unsigned int uMaxIconSize;
  221. unsigned int uMaxDependencies;
  222. } TSteamAppStats;
  223. typedef struct
  224. {
  225. char *szLabel;
  226. unsigned int uMaxLabelChars;
  227. unsigned int uVersionId;
  228. int bIsNotAvailable;
  229. } TSteamAppVersion;
  230. typedef struct
  231. {
  232. char *szDesc;
  233. unsigned int uMaxDescChars;
  234. char *szCmdLine;
  235. unsigned int uMaxCmdLineChars;
  236. unsigned int uIndex;
  237. unsigned int uIconIndex;
  238. int bNoDesktopShortcut;
  239. int bNoStartMenuShortcut;
  240. int bIsLongRunningUnattended;
  241. } TSteamAppLaunchOption;
  242. typedef struct
  243. {
  244. char *szName;
  245. unsigned int uMaxNameChars;
  246. char *szLatestVersionLabel;
  247. unsigned int uMaxLatestVersionLabelChars;
  248. char *szCurrentVersionLabel;
  249. unsigned int uMaxCurrentVersionLabelChars;
  250. char *szInstallDirName;
  251. unsigned int uMaxInstallDirNameChars;
  252. unsigned int uId;
  253. unsigned int uLatestVersionId;
  254. unsigned int uCurrentVersionId;
  255. unsigned int uMinCacheFileSizeMB;
  256. unsigned int uMaxCacheFileSizeMB;
  257. unsigned int uNumLaunchOptions;
  258. unsigned int uNumIcons;
  259. unsigned int uNumVersions;
  260. unsigned int uNumDependencies;
  261. } TSteamApp;
  262. typedef enum
  263. {
  264. eNoCost = 0,
  265. eBillOnceOnly = 1,
  266. eBillMonthly = 2,
  267. eProofOfPrepurchaseOnly = 3,
  268. eGuestPass = 4,
  269. eHardwarePromo = 5,
  270. eNumBillingTypes,
  271. } EBillingType;
  272. typedef struct
  273. {
  274. char *szName;
  275. unsigned int uMaxNameChars;
  276. unsigned int *puAppIds;
  277. unsigned int uMaxAppIds;
  278. unsigned int uId;
  279. unsigned int uNumApps;
  280. EBillingType eBillingType;
  281. unsigned int uCostInCents;
  282. unsigned int uNumDiscounts;
  283. int bIsPreorder;
  284. int bRequiresShippingAddress;
  285. unsigned int uDomesticShippingCostInCents;
  286. unsigned int uInternationalShippingCostInCents;
  287. bool bIsCyberCafeSubscription;
  288. unsigned int uGameCode;
  289. char szGameCodeDesc[STEAM_MAX_PATH];
  290. bool bIsDisabled;
  291. bool bRequiresCD;
  292. unsigned int uTerritoryCode;
  293. bool bIsSteam3Subscription;
  294. } TSteamSubscription;
  295. typedef struct
  296. {
  297. char szName[STEAM_MAX_PATH];
  298. unsigned int uDiscountInCents;
  299. unsigned int uNumQualifiers;
  300. } TSteamSubscriptionDiscount;
  301. typedef struct
  302. {
  303. char szName[STEAM_MAX_PATH];
  304. unsigned int uRequiredSubscription;
  305. int bIsDisqualifier;
  306. } TSteamDiscountQualifier;
  307. typedef struct TSteamProgress
  308. {
  309. int bValid; /* non-zero if call provides progress info */
  310. unsigned int uPercentDone; /* 0 to 100 * STEAM_PROGRESS_PERCENT_SCALE if bValid */
  311. char szProgress[STEAM_MAX_PATH]; /* additional progress info */
  312. } TSteamProgress;
  313. typedef enum
  314. {
  315. eSteamNotifyTicketsWillExpire,
  316. eSteamNotifyAccountInfoChanged,
  317. eSteamNotifyContentDescriptionChanged,
  318. eSteamNotifyPleaseShutdown,
  319. eSteamNotifyNewContentServer,
  320. eSteamNotifySubscriptionStatusChanged,
  321. eSteamNotifyContentServerConnectionLost,
  322. eSteamNotifyCacheLoadingCompleted,
  323. eSteamNotifyCacheNeedsDecryption,
  324. eSteamNotifyCacheNeedsRepair
  325. } ESteamNotificationCallbackEvent;
  326. typedef void(*SteamNotificationCallback_t)(ESteamNotificationCallbackEvent eEvent, unsigned int nData);
  327. typedef char SteamPersonalQuestion_t[ STEAM_QUESTION_MAXLEN + 1 ];
  328. typedef struct
  329. {
  330. unsigned char uchSalt[STEAM_SALT_SIZE];
  331. } SteamSalt_t;
  332. typedef enum
  333. {
  334. eVisa = 1,
  335. eMaster = 2,
  336. eAmericanExpress = 3,
  337. eDiscover = 4,
  338. eDinnersClub = 5,
  339. eJCB = 6
  340. } ESteamPaymentCardType;
  341. typedef struct
  342. {
  343. ESteamPaymentCardType eCardType;
  344. char szCardNumber[ STEAM_CARD_NUMBER_SIZE +1 ];
  345. char szCardHolderName[ STEAM_CARD_HOLDERNAME_SIZE + 1];
  346. char szCardExpYear[ STEAM_CARD_EXPYEAR_SIZE + 1 ];
  347. char szCardExpMonth[ STEAM_CARD_EXPMONTH_SIZE+ 1 ];
  348. char szCardCVV2[ STEAM_CARD_CVV2_SIZE + 1 ];
  349. char szBillingAddress1[ STEAM_BILLING_ADDRESS1_SIZE + 1 ];
  350. char szBillingAddress2[ STEAM_BILLING_ADDRESS2_SIZE + 1 ];
  351. char szBillingCity[ STEAM_BILLING_CITY_SIZE + 1 ];
  352. char szBillingZip[ STEAM_BILLING_ZIP_SIZE + 1 ];
  353. char szBillingState[ STEAM_BILLING_STATE_SIZE + 1 ];
  354. char szBillingCountry[ STEAM_BILLING_COUNTRY_SIZE + 1 ];
  355. char szBillingPhone[ STEAM_BILLING_PHONE_SIZE + 1 ];
  356. char szBillingEmailAddress[ STEAM_BILLING_EMAIL_ADDRESS_SIZE + 1 ];
  357. unsigned int uExpectedCostInCents;
  358. unsigned int uExpectedTaxInCents;
  359. /* If the TSteamSubscription says that shipping info is required, */
  360. /* then the following fields must be filled out. */
  361. /* If szShippingName is empty, then assumes so are the rest. */
  362. char szShippingName[ STEAM_CARD_HOLDERNAME_SIZE + 1];
  363. char szShippingAddress1[ STEAM_BILLING_ADDRESS1_SIZE + 1 ];
  364. char szShippingAddress2[ STEAM_BILLING_ADDRESS2_SIZE + 1 ];
  365. char szShippingCity[ STEAM_BILLING_CITY_SIZE + 1 ];
  366. char szShippingZip[ STEAM_BILLING_ZIP_SIZE + 1 ];
  367. char szShippingState[ STEAM_BILLING_STATE_SIZE + 1 ];
  368. char szShippingCountry[ STEAM_BILLING_COUNTRY_SIZE + 1 ];
  369. char szShippingPhone[ STEAM_BILLING_PHONE_SIZE + 1 ];
  370. unsigned int uExpectedShippingCostInCents;
  371. } TSteamPaymentCardInfo;
  372. typedef struct
  373. {
  374. char szTypeOfProofOfPurchase[ STEAM_TYPE_OF_PROOF_OF_PURCHASE_SIZE + 1 ];
  375. /* A ProofOfPurchase token is not necessarily a nul-terminated string; it may be binary data
  376. (perhaps encrypted). Hence we need a length and an array of bytes. */
  377. unsigned int uLengthOfBinaryProofOfPurchaseToken;
  378. char cBinaryProofOfPurchaseToken[ STEAM_PROOF_OF_PURCHASE_TOKEN_SIZE + 1 ];
  379. } TSteamPrepurchaseInfo;
  380. typedef struct
  381. {
  382. char szAccountName[ STEAM_EXTERNAL_ACCOUNTNAME_SIZE + 1 ];
  383. char szPassword[ STEAM_EXTERNAL_ACCOUNTPASSWORD_SIZE + 1 ];
  384. } TSteamExternalBillingInfo;
  385. typedef enum
  386. {
  387. ePaymentCardInfo = 1,
  388. ePrepurchasedInfo = 2,
  389. eAccountBillingInfo = 3,
  390. eExternalBillingInfo = 4, /* indirect billing via ISP etc (not supported yet) */
  391. ePaymentCardReceipt = 5,
  392. ePrepurchaseReceipt = 6,
  393. eEmptyReceipt = 7
  394. } ESteamSubscriptionBillingInfoType;
  395. typedef struct
  396. {
  397. ESteamSubscriptionBillingInfoType eBillingInfoType;
  398. union {
  399. TSteamPaymentCardInfo PaymentCardInfo;
  400. TSteamPrepurchaseInfo PrepurchaseInfo;
  401. TSteamExternalBillingInfo ExternalBillingInfo;
  402. char bUseAccountBillingInfo;
  403. };
  404. } TSteamSubscriptionBillingInfo;
  405. typedef enum
  406. {
  407. /* Subscribed */
  408. eSteamSubscriptionOK = 0, /* Subscribed */
  409. eSteamSubscriptionPending = 1, /* Awaiting transaction completion */
  410. eSteamSubscriptionPreorder = 2, /* Is currently a pre-order */
  411. eSteamSubscriptionPrepurchaseTransferred = 3, /* hop to this account */
  412. /* Unusbscribed */
  413. eSteamSubscriptionPrepurchaseInvalid = 4, /* Invalid cd-key */
  414. eSteamSubscriptionPrepurchaseRejected = 5, /* hopped out / banned / etc */
  415. eSteamSubscriptionPrepurchaseRevoked = 6, /* hop away from this account */
  416. eSteamSubscriptionPaymentCardDeclined = 7, /* CC txn declined */
  417. eSteamSubscriptionCancelledByUser = 8, /* Cancelled by client */
  418. eSteamSubscriptionCancelledByVendor = 9, /* Cancelled by us */
  419. eSteamSubscriptionPaymentCardUseLimit = 10, /* Card used too many times, potential fraud */
  420. eSteamSubscriptionPaymentCardAlert = 11, /* Got a "pick up card" or the like from bank */
  421. eSteamSubscriptionFailed = 12, /* Other Error in subscription data or transaction failed/lost */
  422. eSteamSubscriptionPaymentCardAVSFailure = 13, /* Card failed Address Verification check */
  423. eSteamSubscriptionPaymentCardInsufficientFunds = 14, /* Card failed due to insufficient funds */
  424. eSteamSubscriptionRestrictedCountry = 15 /* The subscription is not available in the user's country */
  425. } ESteamSubscriptionStatus;
  426. typedef struct
  427. {
  428. ESteamPaymentCardType eCardType;
  429. char szCardLastFourDigits[ 4 + 1 ];
  430. char szCardHolderName[ STEAM_CARD_HOLDERNAME_SIZE + 1];
  431. char szBillingAddress1[ STEAM_BILLING_ADDRESS1_SIZE + 1 ];
  432. char szBillingAddress2[ STEAM_BILLING_ADDRESS2_SIZE + 1 ];
  433. char szBillingCity[ STEAM_BILLING_CITY_SIZE + 1 ];
  434. char szBillingZip[ STEAM_BILLING_ZIP_SIZE + 1 ];
  435. char szBillingState[ STEAM_BILLING_STATE_SIZE + 1 ];
  436. char szBillingCountry[ STEAM_BILLING_COUNTRY_SIZE + 1 ];
  437. // The following are only available after the subscription leaves "pending" status
  438. char szCardApprovalCode[ STEAM_BILLING_CARD_APPROVAL_CODE_SIZE + 1];
  439. char szTransDate[ STEAM_BILLING_TRANS_DATE_SIZE + 1]; /* mm/dd/yy */
  440. char szTransTime[ STEAM_BILLING_TRANS_TIME_SIZE + 1]; /* hh:mm:ss */
  441. unsigned int uPriceWithoutTax;
  442. unsigned int uTaxAmount;
  443. unsigned int uShippingCost;
  444. } TSteamPaymentCardReceiptInfo;
  445. typedef struct
  446. {
  447. char szTypeOfProofOfPurchase[ STEAM_TYPE_OF_PROOF_OF_PURCHASE_SIZE + 1 ];
  448. } TSteamPrepurchaseReceiptInfo;
  449. typedef struct
  450. {
  451. ESteamSubscriptionStatus eStatus;
  452. ESteamSubscriptionStatus ePreviousStatus;
  453. ESteamSubscriptionBillingInfoType eReceiptInfoType;
  454. char szConfirmationCode[ STEAM_BILLING_CONFIRMATION_CODE_SIZE + 1];
  455. union {
  456. TSteamPaymentCardReceiptInfo PaymentCardReceiptInfo;
  457. TSteamPrepurchaseReceiptInfo PrepurchaseReceiptInfo;
  458. };
  459. } TSteamSubscriptionReceipt;
  460. typedef enum
  461. {
  462. ePhysicalBytesReceivedThisSession = 1,
  463. eAppReadyToLaunchStatus = 2,
  464. eAppPreloadStatus = 3,
  465. eAppEntireDepot = 4,
  466. eCacheBytesPresent = 5
  467. } ESteamAppUpdateStatsQueryType;
  468. typedef struct
  469. {
  470. SteamUnsigned64_t uBytesTotal;
  471. SteamUnsigned64_t uBytesPresent;
  472. } TSteamUpdateStats;
  473. typedef enum
  474. {
  475. eSteamUserAdministrator = 0x00000001, /* May subscribe, unsubscribe, etc */
  476. eSteamUserDeveloper = 0x00000002, /* Steam or App developer */
  477. eSteamUserCyberCafe = 0x00000004 /* CyberCafe, school, etc -- UI should ask for password */
  478. /* before allowing logout, unsubscribe, etc */
  479. } ESteamUserTypeFlags;
  480. typedef enum
  481. {
  482. eSteamAccountStatusDefault = 0x00000000,
  483. eSteamAccountStatusEmailVerified = 0x00000001,
  484. /* Note: Mask value 0x2 is reserved for future use. (Some, but not all, public accounts already have this set.) */
  485. eSteamAccountDisabled = 0x00000004
  486. } ESteamAccountStatusBitFields ;
  487. typedef enum
  488. {
  489. eSteamBootstrapperError = -1,
  490. eSteamBootstrapperDontCheckForUpdate = 0,
  491. eSteamBootstrapperCheckForUpdateAndRerun = 7
  492. } ESteamBootStrapperClientAppResult;
  493. typedef enum
  494. {
  495. eSteamOnline = 0,
  496. eSteamOffline = 1,
  497. eSteamNoAuthMode = 2,
  498. eSteamBillingOffline = 3
  499. } eSteamOfflineStatus;
  500. typedef struct
  501. {
  502. int eOfflineNow;
  503. int eOfflineNextSession;
  504. } TSteamOfflineStatus;
  505. typedef struct
  506. {
  507. unsigned int uAppId;
  508. int bIsSystemDefined;
  509. char szMountPath[STEAM_MAX_PATH];
  510. } TSteamAppDependencyInfo;
  511. typedef enum
  512. {
  513. eSteamOpenFileRegular = 0x0,
  514. eSteamOpenFileIgnoreLocal = 0x1,
  515. eSteamOpenFileChecksumReads = 0x2
  516. } ESteamOpenFileFlags;
  517. typedef enum
  518. {
  519. eSteamValveCDKeyValidationServer = 0,
  520. eSteamHalfLifeMasterServer = 1,
  521. eSteamFriendsServer = 2,
  522. eSteamCSERServer = 3,
  523. eSteamHalfLife2MasterServer = 4,
  524. eSteamRDKFMasterServer = 5,
  525. eMaxServerTypes = 6
  526. } ESteamServerType;
  527. /******************************************************************************
  528. **
  529. ** More exported constants
  530. **
  531. ******************************************************************************/
  532. #ifdef __cplusplus
  533. const SteamHandle_t STEAM_INVALID_HANDLE = 0;
  534. const SteamCallHandle_t STEAM_INVALID_CALL_HANDLE = 0;
  535. const SteamUserIDTicketValidationHandle_t STEAM_INACTIVE_USERIDTICKET_VALIDATION_HANDLE = 0;
  536. const unsigned int STEAM_USE_LATEST_VERSION = 0xFFFFFFFF;
  537. #else
  538. #define STEAM_INVALID_HANDLE ((SteamHandle_t)(0))
  539. #define STEAM_INVALID_CALL_HANDLE ((SteamCallHandle_t)(0))
  540. #define STEAM_INACTIVE_USERIDTICKET_VALIDATION_HANDLE ((SteamUserIDTicketValidationHandle_t)(0))
  541. #define STEAM_USE_LATEST_VERSION (0xFFFFFFFFu);
  542. #endif
  543. /******************************************************************************
  544. ** Each Steam instance (licensed Steam Service Provider) has a unique SteamInstanceID_t.
  545. **
  546. ** Each Steam instance as its own DB of users.
  547. ** Each user in the DB has a unique SteamLocalUserID_t (a serial number, with possible
  548. ** rare gaps in the sequence).
  549. **
  550. ******************************************************************************/
  551. typedef unsigned short SteamInstanceID_t; // MUST be 16 bits
  552. #if defined ( _WIN32 )
  553. typedef unsigned __int64 SteamLocalUserID_t; // MUST be 64 bits
  554. #else
  555. typedef unsigned long long SteamLocalUserID_t; // MUST be 64 bits
  556. #endif
  557. /******************************************************************************
  558. **
  559. ** Applications need to be able to authenticate Steam users from ANY instance.
  560. ** So a SteamIDTicket contains SteamGlobalUserID, which is a unique combination of
  561. ** instance and user id.
  562. **
  563. ** SteamLocalUserID is an unsigned 64-bit integer.
  564. ** For platforms without 64-bit int support, we provide access via a union that splits it into
  565. ** high and low unsigned 32-bit ints. Such platforms will only need to compare LocalUserIDs
  566. ** for equivalence anyway - not perform arithmetic with them.
  567. **
  568. ********************************************************************************/
  569. typedef struct
  570. {
  571. unsigned int Low32bits;
  572. unsigned int High32bits;
  573. } TSteamSplitLocalUserID;
  574. typedef struct
  575. {
  576. SteamInstanceID_t m_SteamInstanceID;
  577. union
  578. {
  579. SteamLocalUserID_t As64bits;
  580. TSteamSplitLocalUserID Split;
  581. } m_SteamLocalUserID;
  582. } TSteamGlobalUserID;
  583. #ifdef __cplusplus
  584. }
  585. #endif
  586. #endif