Torc  0.1
torcupnp.h
Go to the documentation of this file.
1 #ifndef TORCUPNP_H
2 #define TORCUPNP_H
3 
4 // Torc
5 #include "torclocalcontext.h"
6 
7 #define TORC_ROOT_UPNP_DEVICE QStringLiteral("urn:schemas-torcapp-org:device:TorcClient:1")
8 
9 #define _UUID "uuid"
10 #define _APIVERSION "apiversion"
11 #define _PRIORITY "priority"
12 #define _STARTTIME "starttime"
13 #define _SECURE "secure"
14 
15 #define TORC_UUID QStringLiteral(_UUID)
16 #define TORC_NAME QStringLiteral("name")
17 #define TORC_PORT QStringLiteral("port")
18 #define TORC_APIVERSION QStringLiteral(_APIVERSION)
19 #define TORC_PRIORITY QStringLiteral(_PRIORITY)
20 #define TORC_STARTTIME QStringLiteral(_STARTTIME)
21 #define TORC_ADDRESS QStringLiteral("address")
22 #define TORC_SECURE QStringLiteral(_SECURE)
23 #define TORC_USN QStringLiteral("usn")
24 #define TORC_YES QStringLiteral("yes")
25 
26 #define TORC_UUID_B QByteArrayLiteral(_UUID)
27 #define TORC_APIVERSION_B QByteArrayLiteral(_APIVERSION)
28 #define TORC_PRIORITY_B QByteArrayLiteral(_PRIORITY)
29 #define TORC_STARTTIME_B QByteArrayLiteral(_STARTTIME)
30 #define TORC_SECURE_B QByteArrayLiteral(_SECURE)
31 
33 {
34  public:
36  TorcUPNPDescription (const QString &USN, const QString &Location, qint64 Expires);
37  QString GetUSN (void) const;
38  QString GetLocation (void) const;
39  qint64 GetExpiry (void) const;
40  void SetExpiry (qint64 Expires);
41 
42  private:
43  QString m_usn;
44  QString m_location;
45  qint64 m_expiry;
46 };
47 
48 class TorcUPNP final
49 {
50  public:
51  static QString UUIDFromUSN (const QString &USN);
52 };
53 
54 Q_DECLARE_METATYPE(TorcUPNPDescription)
55 
56 #endif // TORCUPNP_H
QString GetUSN(void) const
Definition: torcupnp.cpp:40
void SetExpiry(qint64 Expires)
Definition: torcupnp.cpp:55
qint64 GetExpiry(void) const
Definition: torcupnp.cpp:50
QString GetLocation(void) const
Definition: torcupnp.cpp:45