iFun Engine API  1.0.0-b2601
Great Technology for Great Games
 All Classes Files Functions Variables Typedefs Macros
line_authentication.h
Go to the documentation of this file.
1 // Copyright (C) 2017 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_LINE_AUTHENTICATION_H_
10 #define INCLUDE_FUNAPI_SERVICE_LINE_AUTHENTICATION_H_
11 
12 #include <funapi/types.h>
13 
14 
15 namespace fun {
16 
18  explicit LineAuthenticationRequest(const string &access_token);
19 
20  string access_token;
21 };
22 
23 
26  LineAuthenticationResponse(const string &scope,
27  const string &client_id,
28  int64_t expires_in);
29 
30  bool success;
31  string error;
32  string error_description;
33 
34  string scope;
35  string client_id; // Channel ID for which the access token is issued.
36  int64_t expires_in;
37 };
38 
39 
41  explicit LinePersonalInfoRequest(const string &access_token);
42 
43  string access_token;
44 };
45 
46 
49  LinePersonalInfoResponse(const string &display_name,
50  const string &user_id,
51  const string &picture_url,
52  const string &status_message);
53  bool success;
54  string error_message;
55 
56  string display_name;
57  string user_id;
58  string picture_url;
59  string status_message;
60 };
61 
62 
63 typedef function<void(const LineAuthenticationRequest &request,
64  const LineAuthenticationResponse &response,
65  bool error)> LineAuthenticationResponseHandler;
66 
67 typedef function<void(const LinePersonalInfoRequest &request,
68  const LinePersonalInfoResponse &response,
69  bool error)> LinePersonalInfoResponseHandler;
70 
71 
72 void Authenticate(const LineAuthenticationRequest &request,
73  const LineAuthenticationResponseHandler &handler,
74  size_t timeout_in_ms = 0);
75 
76 bool AuthenticateSync(const LineAuthenticationRequest &request,
77  LineAuthenticationResponse *response);
78 
79 
80 void GetPersonalInfo(const LinePersonalInfoRequest &request,
81  const LinePersonalInfoResponseHandler &handler,
82  size_t timeout_in_ms = 0);
83 
84 bool GetPersonalInfoSync(const LinePersonalInfoRequest &request,
85  LinePersonalInfoResponse *response);
86 
87 } // namespace fun
88 
89 #endif // INCLUDE_FUNAPI_SERVICE_LINE_AUTHENTICATION_H_
Definition: line_authentication.h:47
Definition: line_authentication.h:17
Definition: line_authentication.h:24
Definition: line_authentication.h:40