Qore SewioWebSocketClient Module Reference  1.0
SewioWebSocketClient.qm.dox.h
1 // -*- mode: c++; indent-tabs-mode: nil -*-
3 
4 /* SewioWebSocketClient.qm Copyright 2013 - 2017 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 
25 // minimum required Qore version
26 
27 // require type definitions everywhere
28 
29 // enable all warnings
30 
31 
32 
33 
34 
82 namespace SewioWebSocketClient {
85  const WsSchemes = (
86  "sewiows": (
87  "ssl": False,
88  ),
89  "sewiowss": (
90  "ssl": True,
91  ),
92  );
93 
95 
108 
109 public:
110  public :
112  const RequiredOptions = (
113  // the Sewio "API key"
114  "apikey",
115  );
116 
118  const Version = "1.0";
119 
121  const DefaultUserAgent = sprintf("Qore-SewioWebSocketClient/%s", SewioWebSocketClient::Version);
122 
123 public:
124 
125  private:internal {
126  // Sewio API key
127  string apikey;
128  }
129 
131 
151  constructor(code cb, hash opts) ;
152 
153 
155  sendData(string method, string resource, *hash h);
156 
157 
159  hash getSchemes();
160 
161 
163 
164 private:
165  hash connectUnlocked(*hash hdr, *reference<hash> info);
166 public:
167 
168 
170 
171 private:
172  static code getCallback(code cb);
173 public:
174 
175  };
176 
178 
193 
194 public:
196 
205  constructor(string name, string desc, string url, bool monitor, *hash opts, hash urlh) ;
206 
207 
209  string getType();
210 
211 
213 
222 private:
223  SewioWebSocketClient getImpl(bool connect = True, *hash rtopts);
224 public:
225 
226 
228  hash getOptions();
229 
230 
233 
234 
236  static SewioWebSocketConnection make(string name, string desc, string url, bool monitor, *hash opts, hash urlh);
237  };
238 };
string sprintf(string fmt,...)
const True
class for Sewio RTLS Studio websocket connections; returns an object of class SewioWebSocketClient fo...
Definition: SewioWebSocketClient.qm.dox.h:192
const False
static SewioWebSocketConnection make(string name, string desc, string url, bool monitor, *hash opts, hash urlh)
static constructor
SewioWebSocketClient getImpl(bool connect=True, *hash rtopts)
returns a SewioWebSocketClient object
const WsSchemes
known websocket schemes
Definition: SewioWebSocketClient.qm.dox.h:85
string getType()
returns "sewiowebsocket"
constructor(string name, string desc, string url, bool monitor, *hash opts, hash urlh)
creates the SewioWebSocketConnection object
hash hash(object obj)
*hash getDefaultOptions()
returns default options
the SewioWebSocketClient namespace contains all the definitions in the SewioWebSocketClient module ...
Definition: SewioWebSocketClient.qm.dox.h:83