cumbia-http 1.x
Qt widgets on top of the cumbia C++ library
|
#include <cumbiahttp.h>
Public Types | |
enum | Type { CumbiaHTTPType = Cumbia::CumbiaUserType + 18 } |
Public Member Functions | |
CumbiaHttp (const QString &url, const QString &channel, CuThreadFactoryImplI *tfi, CuThreadsEventBridgeFactory_I *teb) | |
CumbiaHttp. More... | |
~CumbiaHttp () | |
void | setTag (const QString &tag) |
CuThreadFactoryImplI * | getThreadFactoryImpl () const |
CuThreadsEventBridgeFactory_I * | getThreadEventsBridgeFactory () const |
QString | url () const |
virtual int | getType () const |
void | readEnqueue (const CuHTTPSrc &source, CuDataListener *l, const CuHTTPActionFactoryI &f) |
void | unsubscribeEnqueue (const CuHTTPSrc &httpsrc, CuDataListener *l) |
void | executeWrite (const CuHTTPSrc &source, CuDataListener *l, const CuHTTPActionFactoryI &f) |
void | unlinkListener (const CuHTTPSrc &source, const std::string &method, CuDataListener *l) |
disconnect the listener l of the given source More... | |
void | addReplaceWildcardI (QuReplaceWildcards_I *rwi) |
add a QuReplaceWildcards_I instance More... | |
void | addSrcHelper (CuHttpSrcHelper_I *srch) |
Add an implementation of CuHttpSrcHelper_I to help processing and preparing the sources before sending them through the http module. More... | |
QList< QuReplaceWildcards_I * > | getReplaceWildcard_Ifaces () const |
QList< CuHttpSrcHelper_I * > | getSrcHelpers () const |
void | onSrcBundleReqReady (const QList< SrcItem > &rsrcs, const QList< SrcItem > &wsrcs) |
void | onSrcBundleReplyReady (const QByteArray &json) |
void | onSrcBundleReplyError (const CuData &errd) |
notify every listener of a http server/gateway general error More... | |
void | onCredsReady (const QString &user, const QString &passwd) |
void | onAuthReply (bool authorised, const QString &user, const QString &message, bool encrypted) |
void | onAuthError (const QString &errm) |
virtual void | onSrcBundleReplyReady (const QByteArray &json)=0 |
virtual void | onSrcBundleReplyError (const CuData &errd)=0 |
virtual void | onIdReady (const unsigned long long &client_id, const time_t ttl)=0 |
virtual void | onIdManError (const QString &err)=0 |
virtual void | onSrcBundleReqReady (const QList< SrcItem > &rsrcs, const QList< SrcItem > &wsrcs)=0 |
virtual void | onCredsReady (const QString &user, const QString &passwd)=0 |
virtual void | onAuthReply (bool authorised, const QString &user, const QString &message, bool encrypted)=0 |
virtual void | onAuthError (const QString &errm)=0 |
enum CumbiaHttp::Type |
CumbiaHttp::CumbiaHttp | ( | const QString & | url, |
const QString & | channel, | ||
CuThreadFactoryImplI * | tfi, | ||
CuThreadsEventBridgeFactory_I * | teb | ||
) |
http_url | the url to be used for http incoming data |
http_url | the http (https) url to be used to send requests to the server (output) |
tfi | thread factory implementation |
teb | thread events bridge factory |
TEST
References url().
CumbiaHttp::~CumbiaHttp | ( | ) |
void CumbiaHttp::addReplaceWildcardI | ( | QuReplaceWildcards_I * | rwi | ) |
add a QuReplaceWildcards_I instance
Referenced by CuHttpRegisterEngine::registerWithDefaults().
void CumbiaHttp::addSrcHelper | ( | CuHttpSrcHelper_I * | srch | ) |
Add an implementation of CuHttpSrcHelper_I to help processing and preparing the sources before sending them through the http module.
srch | a pointer to a valid CuHttpSrcHelper_I instance. |
Referenced by CuHttpRegisterEngine::registerWithDefaults().
void CumbiaHttp::executeWrite | ( | const CuHTTPSrc & | source, |
CuDataListener * | l, | ||
const CuHTTPActionFactoryI & | f | ||
) |
References CuHTTPActionFactoryI::getMethod(), and CuHTTPActionFactoryI::options().
QList< QuReplaceWildcards_I * > CumbiaHttp::getReplaceWildcard_Ifaces | ( | ) | const |
QList< CuHttpSrcHelper_I * > CumbiaHttp::getSrcHelpers | ( | ) | const |
CuThreadsEventBridgeFactory_I * CumbiaHttp::getThreadEventsBridgeFactory | ( | ) | const |
CuThreadFactoryImplI * CumbiaHttp::getThreadFactoryImpl | ( | ) | const |
|
virtual |
References CumbiaHTTPType.
|
virtual |
Implements CuHttpAuthManListener.
|
virtual |
Implements CuHttpAuthManListener.
References CuHttpBundledSrcReq::start().
|
virtual |
Implements CuHttpAuthManListener.
|
virtual |
notify every listener of a http server/gateway general error
errd | data provided by CuHttpBundledSrcReq::onError after getting an error from an http request |
For each listener of a given source (or target), an error message is built and delivered. It will be made up of
Implements CuHttpBundledSrcReqListener.
References CumbiaHTTPWorld::request_reverse_eng().
|
virtual |
Implements CuHttpBundledSrcReqListener.
References CumbiaHTTPWorld::json_decode().
|
virtual |
Implements CuHttpSrcQueueManListener.
void CumbiaHttp::readEnqueue | ( | const CuHTTPSrc & | source, |
CuDataListener * | l, | ||
const CuHTTPActionFactoryI & | f | ||
) |
References CuHTTPActionFactoryI::getMethod(), and CuHTTPActionFactoryI::options().
void CumbiaHttp::setTag | ( | const QString & | tag | ) |
void CumbiaHttp::unlinkListener | ( | const CuHTTPSrc & | source, |
const std::string & | method, | ||
CuDataListener * | l | ||
) |
disconnect the listener l of the given source
source | the full name of the source, as from CuHTTPSrc.prepare |
l | the CuDataListener to disconnect |
References CuHTTPSrc::getName().
void CumbiaHttp::unsubscribeEnqueue | ( | const CuHTTPSrc & | httpsrc, |
CuDataListener * | l | ||
) |
QString CumbiaHttp::url | ( | ) | const |
Referenced by CumbiaHttp().