iFun Engine API  1.0.0-b6053
Great Technology for Great Games
steam_authentication.h
Go to the documentation of this file.
1 // Copyright (C) 2013-2020 iFunFactory Inc. All Rights Reserved.
2 //
3 // This work is confidential and proprietary to iFunFactory Inc. and
4 // must not be used, disclosed, copied, or distributed without the prior
5 // consent of iFunFactory Inc.
6 
9 #ifndef INCLUDE_FUNAPI_SERVICE_STEAM_AUTHENTICATION_H_
10 #define INCLUDE_FUNAPI_SERVICE_STEAM_AUTHENTICATION_H_
11 
12 #include <funapi/common/json.h>
13 #include <funapi/player_account.h>
14 #include <funapi/types.h>
15 
16 
17 namespace fun {
18 
19 struct FUNAPI_DLL_VISIBILITY SteamAuthenticationRequest {
20  SteamAuthenticationRequest(const string &app_id,
21  const string &api_key,
22  const string &session_ticket);
23 
24  string app_id;
25  string api_key;
26  string session_ticket;
27 };
28 
29 
30 struct FUNAPI_DLL_VISIBILITY SteamError {
31  SteamError();
32 
33  int64_t code;
34  string message;
35 };
36 
37 struct FUNAPI_DLL_VISIBILITY SteamAuthenticationResponse {
39 
40  bool success;
41  SteamError error;
42 
43  string steam_id;
44  string ownersteam_id;
45  bool vac_banned;
46  bool publisher_banned;
47 };
48 
49 
50 typedef function<void(const SteamAuthenticationRequest &request,
51  const SteamAuthenticationResponse &response,
52  bool error)> SteamAuthenticationResponseHandler;
53 
54 FUNAPI_DLL_VISIBILITY
55 void Authenticate(const SteamAuthenticationRequest &request,
56  const SteamAuthenticationResponseHandler &handler,
57  size_t timeout_in_ms = 0);
58 
59 } // namespace fun
60 
61 #endif // INCLUDE_FUNAPI_SERVICE_STEAM_AUTHENTICATION_H_
Definition: steam_authentication.h:30
Definition: json.h:18
Definition: steam_authentication.h:19
Definition: steam_authentication.h:37