Torc
0.1
|
Encapsulates information on a discovered Torc peer. More...
#include <torcnetworkedcontext.h>
Public Types | |
enum | ServiceSource { Spontaneous = (0 << 0), Bonjour = (1 << 0), UPnP = (1 << 1) } |
Public Slots | |
QString | GetName (void) |
QString | GetUuid (void) |
int | GetPort (void) |
QString | GetHost (void) |
QList< QHostAddress > | GetAddresses (void) |
QString | GetAddress (void) |
qint64 | GetStartTime (void) |
int | GetPriority (void) |
QString | GetAPIVersion (void) |
bool | GetConnected (void) |
void | Connect (void) |
Establish a WebSocket connection to the peer if necessary. More... | |
void | Connected (void) |
void | Disconnected (void) |
void | RequestReady (TorcNetworkRequest *Request) |
void | RequestReady (TorcRPCRequest *Request) |
Signals | |
void | StartTimeChanged (void) |
void | PriorityChanged (void) |
void | ApiVersionChanged (void) |
void | ConnectedChanged (void) |
void | TryConnect (void) |
Public Member Functions | |
TorcNetworkService (const QString &Name, const QString &UUID, int Port, bool Secure, const QList< QHostAddress > &Addresses) | |
~TorcNetworkService () | |
Destroy this service. More... | |
void | SetHost (const QString &Host) |
void | SetStartTime (qint64 StartTime) |
void | SetPriority (int Priority) |
void | SetAPIVersion (const QString &Version) |
void | SetSource (ServiceSource Source) |
ServiceSources | GetSources (void) |
void | RemoveSource (ServiceSource Source) |
void | SetWebSocketThread (TorcWebSocketThread *Thread) |
void | RemoteRequest (TorcRPCRequest *Request) |
void | CancelRequest (TorcRPCRequest *Request) |
QVariant | ToMap (void) |
Static Public Member Functions | |
static bool | WeActAsServer (int Priority, qint64 StartTime, const QString &UUID) |
Determine whether we (the local device) should be the server for peer to peer communications. More... | |
Properties | |
QString | name |
QString | uuid |
int | port |
QString | uiAddress |
QString | host |
qint64 | startTime |
int | priority |
QString | apiVersion |
bool | connected |
Encapsulates information on a discovered Torc peer.
Definition at line 20 of file torcnetworkedcontext.h.
Enumerator | |
---|---|
Spontaneous | |
Bonjour | |
UPnP |
Definition at line 26 of file torcnetworkedcontext.h.
TorcNetworkService::TorcNetworkService | ( | const QString & | Name, |
const QString & | UUID, | ||
int | Port, | ||
bool | Secure, | ||
const QList< QHostAddress > & | Addresses | ||
) |
Definition at line 45 of file torcnetworkedcontext.cpp.
TorcNetworkService::~TorcNetworkService | ( | ) |
Destroy this service.
Definition at line 96 of file torcnetworkedcontext.cpp.
|
signal |
void TorcNetworkService::CancelRequest | ( | TorcRPCRequest * | Request | ) |
Definition at line 506 of file torcnetworkedcontext.cpp.
|
slot |
Establish a WebSocket connection to the peer if necessary.
A connection is only established if we have the necessary details (address, API version, priority, start time etc) and this application should act as the client.
A client has a lower priority or later start time in the event of matching priorities.
Definition at line 150 of file torcnetworkedcontext.cpp.
|
slot |
Definition at line 243 of file torcnetworkedcontext.cpp.
|
signal |
|
slot |
Definition at line 257 of file torcnetworkedcontext.cpp.
|
slot |
Definition at line 218 of file torcnetworkedcontext.cpp.
|
slot |
Definition at line 531 of file torcnetworkedcontext.cpp.
|
slot |
Definition at line 233 of file torcnetworkedcontext.cpp.
|
slot |
Definition at line 238 of file torcnetworkedcontext.cpp.
|
slot |
Definition at line 213 of file torcnetworkedcontext.cpp.
|
slot |
Definition at line 198 of file torcnetworkedcontext.cpp.
|
slot |
Definition at line 208 of file torcnetworkedcontext.cpp.
|
slot |
Definition at line 228 of file torcnetworkedcontext.cpp.
TorcNetworkService::ServiceSources TorcNetworkService::GetSources | ( | void | ) |
Definition at line 562 of file torcnetworkedcontext.cpp.
|
slot |
Definition at line 223 of file torcnetworkedcontext.cpp.
|
slot |
Definition at line 203 of file torcnetworkedcontext.cpp.
|
signal |
void TorcNetworkService::RemoteRequest | ( | TorcRPCRequest * | Request | ) |
Definition at line 490 of file torcnetworkedcontext.cpp.
void TorcNetworkService::RemoveSource | ( | ServiceSource | Source | ) |
Definition at line 567 of file torcnetworkedcontext.cpp.
|
slot |
Definition at line 287 of file torcnetworkedcontext.cpp.
|
slot |
Definition at line 341 of file torcnetworkedcontext.cpp.
void TorcNetworkService::SetAPIVersion | ( | const QString & | Version | ) |
Definition at line 552 of file torcnetworkedcontext.cpp.
void TorcNetworkService::SetHost | ( | const QString & | Host | ) |
Definition at line 536 of file torcnetworkedcontext.cpp.
void TorcNetworkService::SetPriority | ( | int | Priority | ) |
Definition at line 547 of file torcnetworkedcontext.cpp.
void TorcNetworkService::SetSource | ( | ServiceSource | Source | ) |
Definition at line 557 of file torcnetworkedcontext.cpp.
void TorcNetworkService::SetStartTime | ( | qint64 | StartTime | ) |
Definition at line 542 of file torcnetworkedcontext.cpp.
void TorcNetworkService::SetWebSocketThread | ( | TorcWebSocketThread * | Thread | ) |
Definition at line 472 of file torcnetworkedcontext.cpp.
|
signal |
QVariant TorcNetworkService::ToMap | ( | void | ) |
Definition at line 517 of file torcnetworkedcontext.cpp.
|
signal |
|
static |
Determine whether we (the local device) should be the server for peer to peer communications.
The server is the instance with:
Definition at line 132 of file torcnetworkedcontext.cpp.
|
read |
Definition at line 47 of file torcnetworkedcontext.h.
|
read |
Definition at line 48 of file torcnetworkedcontext.h.
|
read |
Definition at line 44 of file torcnetworkedcontext.h.
|
read |
Definition at line 40 of file torcnetworkedcontext.h.
|
read |
Definition at line 42 of file torcnetworkedcontext.h.
|
read |
Definition at line 46 of file torcnetworkedcontext.h.
|
read |
Definition at line 45 of file torcnetworkedcontext.h.
|
read |
Definition at line 43 of file torcnetworkedcontext.h.
|
read |
Definition at line 41 of file torcnetworkedcontext.h.