Qore EmpathicBuildingDataProvider Module Reference 1.1
Loading...
Searching...
No Matches
EmpathicBuildingRestConnection.qc.dox.h
1// -*- mode: c++; indent-tabs-mode: nil -*-
3
4/* EmpathicBuildingRestConnection.qc Copyright 2019 - 2024 Qore Technologies, s.r.o.
5
6 Permission is hereby granted, free of charge, to any person obtaining a
7 copy of this software and associated documentation files (the "Software"),
8 to deal in the Software without restriction, including without limitation
9 the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 and/or sell copies of the Software, and to permit persons to whom the
11 Software is furnished to do so, subject to the following conditions:
12
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 DEALINGS IN THE SOFTWARE.
23*/
24
27class EmpathicBuildingRestClient : public RestClient::RestClient {
28
29public:
31 const LoginUriPath = "v1/login";
32
34 const TokenRefreshUriPath = "v1/token";
35
37 const DefaultPingMethod= "GET";
38
40 const DefaultPingPath = "v1/current_time";
41
43 const DefaultOptions = ...;
44
45
46protected:
48
51 bool broken_refresh = True;
52
53public:
54
55 constructor(*hash<auto> opts, *softbool do_not_connect) ;
56
57
59protected:
60 setupAuth(hash<auto> opts, *bool do_not_connect);
61public:
62
63
65
69protected:
70 hash<auto> refreshTokenIntern(*reference<hash<auto>> info);
71public:
72
73
74protected:
75 bool refreshTokenInvalid(hash<ExceptionInfo> ex, *hash<auto> info);
76public:
77
78
80protected:
81 checkLogin(*reference<hash<auto>> info);
82public:
83
84
86 hash<auto> gotOAuth2LoginInfo(hash<auto> h, *bool refresh);
87
88
90protected:
91 hash<auto> doHaltianTokenRefreshRequest(*reference<hash<auto>> info);
92public:
93
94
96protected:
97 hash<auto> doHaltianLoginRequest(*reference<hash<auto>> info);
98public:
99
100
102protected:
103 bool needsRefresh(*hash<ExceptionInfo> ex, *hash<auto> info, bool decode_errors, auto body);
104public:
105
106
108
110protected:
111 *hash<auto> getUpdateOptionsAfterLogin(hash<auto> h);
112public:
113
114
116protected:
117 hash<auto> loginIntern(*reference<hash<auto>> info);
118public:
119
120};
121
123class EmpathicBuildingRestConnection : public RestClient::RestConnection {
124
125public:
127 const ConnectionScheme = ...;
128
129
131
148 constructor(hash<auto> config, *hash<auto> attr) ;
149
150
152 string getType();
153
154
156
160 DataProvider::AbstractDataProvider getDataProvider(*hash<auto> constructor_options);
161
162
164protected:
166public:
167
168
170
175protected:
176 RestClient getImpl(bool connect = True, *hash<auto> rtopts);
177public:
178
179
181protected:
182 hash<ConnectionSchemeInfo> getConnectionSchemeInfoImpl();
183public:
184
185
187protected:
188 *hash<auto> processOAuth2TokenResponseImpl(hash<auto> resp);
189public:
190
191};
192};
EmpathicBuilding REST connection.
Definition EmpathicBuildingRestConnection.qc.dox.h:123
hash< ConnectionSchemeInfo > getConnectionSchemeInfoImpl()
Returns the connection scheme for this class.
const ConnectionScheme
Connection entry info.
Definition EmpathicBuildingRestConnection.qc.dox.h:127
setFeatures()
Sets features during REST client initialization.
*hash< auto > processOAuth2TokenResponseImpl(hash< auto > resp)
Processes login responses and returns updated options.
DataProvider::AbstractDataProvider getDataProvider(*hash< auto > constructor_options)
returns a data provider object for this connection
RestClient getImpl(bool connect=True, *hash< auto > rtopts)
returns a RestClient object
constructor(hash< auto > config, *hash< auto > attr)
creates the EmpathicBuildingRestConnection object
Qore EmpathicBuildingDataProvider module definition.
Definition EmpathicBuildingDataProvider.qc.dox.h:26