Torc
0.1
|
A class to discover and connect to other Torc applications. More...
#include <torcnetworkedcontext.h>
Public Slots | |
QVariantList | GetPeers (void) |
void | SubscriberDeleted (QObject *Subscriber) |
Signals | |
void | PeersChanged (void) |
void | PeerConnected (QString &Name, QString &UUID) |
void | PeerDisconnected (QString &Name, QString &UUID) |
void | NewPeer (TorcWebSocketThread *Socket, const QVariantMap &Data) |
void | NewRequest (const QString &UUID, TorcRPCRequest *Request) |
void | RequestCancelled (const QString &UUID, TorcRPCRequest *Request) |
Public Member Functions | |
QString | GetUIName (void) |
Public Member Functions inherited from TorcHTTPService | |
TorcHTTPService (QObject *Parent, const QString &Signature, const QString &Name, const QMetaObject &MetaObject, const QString &Blacklist=QStringLiteral("")) | |
virtual | ~TorcHTTPService () |
void | ProcessHTTPRequest (const QString &PeerAddress, int PeerPort, const QString &LocalAddress, int LocalPort, TorcHTTPRequest &Request) override |
QVariantMap | ProcessRequest (const QString &Method, const QVariant &Parameters, QObject *Connection, bool Authenticated) override |
QString | GetMethod (int Index) |
QVariant | GetProperty (int Index) |
Get the value of a given property. More... | |
QVariantMap | GetServiceDetails (void) |
Return a QVariantMap describing the services methods and properties. More... | |
virtual QString | GetPresentationURL (void) |
Public Member Functions inherited from TorcHTTPHandler | |
TorcHTTPHandler (const QString &Signature, const QString &Name) | |
virtual | ~TorcHTTPHandler () |
QString | Signature (void) const |
bool | GetRecursive (void) const |
QString | Name (void) const |
Static Public Member Functions | |
static void | PeerConnected (TorcWebSocketThread *Thread, const QVariantMap &Data) |
Respond to a valid WebSocket upgrade request and schedule creation of a WebSocket on the give QTcpSocket. More... | |
static void | RemoteRequest (const QString &UUID, TorcRPCRequest *Request) |
Pass Request to the remote connection identified by UUID. More... | |
static void | CancelRequest (const QString &UUID, TorcRPCRequest *Request, int Wait=1000) |
Cancel Request associated with the connection identified by UUID. More... | |
Protected Slots | |
void | HandleNewPeer (TorcWebSocketThread *Thread, const QVariantMap &Data) |
void | HandleNewRequest (const QString &UUID, TorcRPCRequest *Request) |
void | HandleCancelRequest (const QString &UUID, TorcRPCRequest *Request) |
Protected Member Functions | |
TorcNetworkedContext () | |
~TorcNetworkedContext () | |
void | Connected (TorcNetworkService *Peer) |
void | Disconnected (TorcNetworkService *Peer) |
bool | event (QEvent *Event) |
Protected Member Functions inherited from TorcHTTPService | |
void | HandleSubscriberDeleted (QObject *Subscriber) |
Properties | |
QVariantList | peers |
Friends | |
class | TorcNetworkedContextObject |
class | TorcNetworkService |
Additional Inherited Members | |
Static Protected Member Functions inherited from TorcHTTPHandler | |
static bool | MethodIsAuthorised (TorcHTTPRequest &Request, int Allowed) |
Check the current request is authorised and set the authentication header if not. More... | |
static void | HandleOptions (TorcHTTPRequest &Request, int Allowed) |
static void | HandleFile (TorcHTTPRequest &Request, const QString &Filename, int Cache) |
Protected Attributes inherited from TorcHTTPService | |
QReadWriteLock | m_httpServiceLock |
Protected Attributes inherited from TorcHTTPHandler | |
QString | m_signature |
bool | m_recursive |
QString | m_name |
A class to discover and connect to other Torc applications.
"Torc peer discovery and connection"
TorcNetworkedContext searches for other Torc applications on the local network using UPnP and Bonjour (where available). When a new application is discovered, its details will be retrieved automatically and a websocket connection initiated if necessary.
The list of detected peers is available to the local UI via QAbstractListModel and hence this object must sit in the main thread. The peer list is also available to remote UIs via TorcHTTPService, which will process requests from multiple threads, hence limited locking is required around the peer list (the remote UI cannot write to the peer list, only read).
Definition at line 120 of file torcnetworkedcontext.h.
|
protected |
Definition at line 589 of file torcnetworkedcontext.cpp.
|
protected |
Definition at line 610 of file torcnetworkedcontext.cpp.
|
static |
Cancel Request associated with the connection identified by UUID.
See TorcWebSocket::CancelRequest for details on blocking.
Definition at line 843 of file torcnetworkedcontext.cpp.
|
protected |
Definition at line 637 of file torcnetworkedcontext.cpp.
|
protected |
Definition at line 647 of file torcnetworkedcontext.cpp.
|
protected |
Definition at line 661 of file torcnetworkedcontext.cpp.
|
slot |
Definition at line 626 of file torcnetworkedcontext.cpp.
|
virtual |
Reimplemented from TorcHTTPService.
Definition at line 621 of file torcnetworkedcontext.cpp.
|
protectedslot |
Definition at line 889 of file torcnetworkedcontext.cpp.
|
protectedslot |
Definition at line 912 of file torcnetworkedcontext.cpp.
|
protectedslot |
Definition at line 871 of file torcnetworkedcontext.cpp.
|
signal |
|
signal |
|
static |
Respond to a valid WebSocket upgrade request and schedule creation of a WebSocket on the give QTcpSocket.
Definition at line 807 of file torcnetworkedcontext.cpp.
|
signal |
|
signal |
|
signal |
|
static |
Pass Request to the remote connection identified by UUID.
Definition at line 823 of file torcnetworkedcontext.cpp.
|
signal |
|
slot |
Definition at line 907 of file torcnetworkedcontext.cpp.
|
friend |
Definition at line 122 of file torcnetworkedcontext.h.
|
friend |
Definition at line 123 of file torcnetworkedcontext.h.
|
read |
Definition at line 128 of file torcnetworkedcontext.h.