SewioWebSocketClient.qm.dox.h
// -*- mode: c++; indent-tabs-mode: nil -*-
/* SewioWebSocketClient.qm Copyright 2013 - 2017 Qore Technologies, s.r.o.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
*/
// minimum required Qore version
// require type definitions everywhere
// enable all warnings
namespace SewioWebSocketClient {
const WsSchemes = (
"sewiows": (
"ssl": False,
),
"sewiowss": (
"ssl": True,
),
);
class SewioWebSocketClient : public WebSocketClient::WebSocketClient {
public:
public :
const RequiredOptions = (
// the Sewio "API key"
"apikey",
);
const Version = "1.0";
const DefaultUserAgent = sprintf("Qore-SewioWebSocketClient/%s", SewioWebSocketClient::Version);
public:
private:internal {
// Sewio API key
string apikey;
}
constructor(code cb, hash opts) ;
sendData(string method, string resource, *hash h);
hash getSchemes();
private:
hash connectUnlocked(*hash hdr, *reference<hash> info);
public:
private:
static code getCallback(code cb);
public:
};
class SewioWebSocketConnection : public WebSocketClient::WebSocketConnectionObject {
public:
constructor(string name, string desc, string url, bool monitor, *hash opts, hash urlh) ;
string getType();
private:
SewioWebSocketClient getImpl(bool connect = True, *hash rtopts);
public:
hash getOptions();
*hash getDefaultOptions();
static SewioWebSocketConnection make(string name, string desc, string url, bool monitor, *hash opts, hash urlh);
};
};
ConnectionProvider::AbstractConnection::monitor
bool monitor
sprintf
string sprintf(string fmt,...)
ConnectionProvider::AbstractConnection::opts
*hash opts
True
const True
ConnectionProvider::AbstractConnection::name
string name
SewioWebSocketClient::SewioWebSocketConnection
class for Sewio RTLS Studio websocket connections; returns an object of class SewioWebSocketClient fo...
Definition: SewioWebSocketClient.qm.dox.h:192
ConnectionProvider::AbstractConnection::urlh
hash urlh
False
const False
WebSocketClient::WebSocketClient
SewioWebSocketClient::SewioWebSocketConnection::make
static SewioWebSocketConnection make(string name, string desc, string url, bool monitor, *hash opts, hash urlh)
static constructor
WebSocketClient::WebSocketConnectionObject
SewioWebSocketClient::SewioWebSocketConnection::getOptions
hash getOptions()
gets options
SewioWebSocketClient::SewioWebSocketConnection::getImpl
SewioWebSocketClient getImpl(bool connect=True, *hash rtopts)
returns a SewioWebSocketClient object
SewioWebSocketClient::WsSchemes
const WsSchemes
known websocket schemes
Definition: SewioWebSocketClient.qm.dox.h:85
ConnectionProvider::AbstractConnection::desc
string desc
SewioWebSocketClient::SewioWebSocketConnection::getType
string getType()
returns "sewiowebsocket"
SewioWebSocketClient::SewioWebSocketConnection::constructor
constructor(string name, string desc, string url, bool monitor, *hash opts, hash urlh)
creates the SewioWebSocketConnection object
ConnectionProvider::AbstractConnection::url
string url
hash
hash hash(object obj)
SewioWebSocketClient::SewioWebSocketConnection::getDefaultOptions
*hash getDefaultOptions()
returns default options
SewioWebSocketClient
the SewioWebSocketClient namespace contains all the definitions in the SewioWebSocketClient module ...
Definition: SewioWebSocketClient.qm.dox.h:83