iFun Engine API  1.0.0-b6053
Great Technology for Great Games
nexon_toy_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_NEXON_TOY_AUTHENTICATION_H_
10 #define INCLUDE_FUNAPI_SERVICE_NEXON_TOY_AUTHENTICATION_H_
11 
12 #include <funapi/common/json.h>
13 #include <funapi/types.h>
14 
15 
16 namespace fun {
17 
18 struct FUNAPI_DLL_VISIBILITY NexonToyError {
19  NexonToyError();
20  NexonToyError(int64_t code, const string &message);
21 
22  int64_t code;
23  string message;
24 };
25 
26 
27 struct FUNAPI_DLL_VISIBILITY NexonToyAuthenticationRequest {
28  NexonToyAuthenticationRequest(int64_t svc_id,
29  const string &client_id,
30  const string &np_sn,
31  const string &np_token);
32 
33  int64_t svc_id;
34  string client_id;
35  string np_sn;
36  string np_token;
37 };
38 
39 
40 struct FUNAPI_DLL_VISIBILITY NexonToyAuthenticationResponse {
42  explicit NexonToyAuthenticationResponse(const NexonToyError &error);
43 
44  bool success;
45  NexonToyError error;
46 };
47 
48 
49 typedef function<void(const NexonToyAuthenticationRequest &request,
50  const NexonToyAuthenticationResponse &response,
51  bool error)> NexonToyAuthenticationResponseHandler;
52 
53 FUNAPI_DLL_VISIBILITY
54 void Authenticate(const NexonToyAuthenticationRequest &request,
55  const NexonToyAuthenticationResponseHandler &handler,
56  size_t timeout_in_ms = 0);
57 
58 FUNAPI_DLL_VISIBILITY
59 bool AuthenticateSync(const NexonToyAuthenticationRequest &request,
61 
62 } // namespace fun
63 
64 #endif // INCLUDE_FUNAPI_SERVICE_NEXON_TOY_AUTHENTICATION_H_
Definition: nexon_toy_authentication.h:40
Definition: nexon_toy_authentication.h:18
Definition: json.h:18
Definition: nexon_toy_authentication.h:27