Advertisement
Guest User

Untitled

a guest
May 26th, 2017
517
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 11.17 KB | None | 0 0
  1. --------------------------------------------------------------------------------
  2. @file: telepathy-tube-job.h
  3.  
  4. /*
  5. * Copyright (C) 2010 Daniele E. Domenichelli <daniele.domenichelli@gmail.com>
  6. *
  7. * This library is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU Lesser General Public
  9. * License as published by the Free Software Foundation; either
  10. * version 2.1 of the License, or (at your option) any later version.
  11. *
  12. * This library is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  15. * Lesser General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Lesser General Public
  18. * License along with this library; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  20. */
  21.  
  22. #ifndef TELEPATHY_TUBE_JOB_H
  23. #define TELEPATHY_TUBE_JOB_H
  24.  
  25. #include "telepathy-base-job.h"
  26.  
  27. class TelepathyTubeJobPrivate;
  28. class TelepathyTubeJob : public TelepathyBaseJob
  29. {
  30.     Q_OBJECT
  31.     Q_DISABLE_COPY(TelepathyTubeJob)
  32.     Q_DECLARE_PRIVATE(TelepathyTubeJob)
  33.  
  34.     protected:
  35.         explicit TelepathyTubeJob(TelepathyTubeJobPrivate &dd, QObject *parent = 0);
  36.         virtual ~TelepathyTubeJob();
  37.  
  38.         TelepathyTubeJobPrivate * const d_ptr;
  39.  
  40.     Q_SIGNALS:
  41.         void telepathyTubeChannelCreated();
  42.         void telepathyTubeChannelInvalidated();
  43.         void telepathyTubeChannelReady();
  44.         void telepathyTubeChannelNewRemoteConnection();
  45. };
  46.  
  47. #endif // TELEPATHY_TUBE_JOB_H
  48.  
  49. --------------------------------------------------------------------------------
  50. @file: streamtube-job.h
  51.  
  52. /*
  53. * Copyright (C) 2010 Daniele E. Domenichelli <daniele.domenichelli@gmail.com>
  54. *
  55. * This library is free software; you can redistribute it and/or
  56. * modify it under the terms of the GNU Lesser General Public
  57. * License as published by the Free Software Foundation; either
  58. * version 2.1 of the License, or (at your option) any later version.
  59. *
  60. * This library is distributed in the hope that it will be useful,
  61. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  62. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  63. * Lesser General Public License for more details.
  64. *
  65. * You should have received a copy of the GNU Lesser General Public
  66. * License along with this library; if not, write to the Free Software
  67. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  68. */
  69.  
  70. #ifndef STREAMTUBE_JOB_H
  71. #define STREAMTUBE_JOB_H
  72.  
  73. #include "telepathy-tube-job.h"
  74.  
  75. class QIODevice;
  76.  
  77. class StreamTubeJobPrivate;
  78. class StreamTubeJob : public TelepathyTubeJob
  79. {
  80.     Q_OBJECT
  81.     Q_DISABLE_COPY(StreamTubeJob)
  82.     Q_DECLARE_PRIVATE(StreamTubeJob)
  83.  
  84.     protected:
  85.         explicit StreamTubeJob(StreamTubeJobPrivate &dd, QObject *parent = 0);
  86.         virtual ~StreamTubeJob();
  87.  
  88.         StreamTubeJobPrivate * const d_ptr;
  89.  
  90.     public:
  91.         QIODevice* device();
  92. };
  93.  
  94. #endif // STREAMTUBE_JOB_H
  95.  
  96. --------------------------------------------------------------------------------
  97. @file: tcp-streamtube-job.h
  98.  
  99. /*
  100. * Copyright (C) 2010 Daniele E. Domenichelli <daniele.domenichelli@gmail.com>
  101. *
  102. * This library is free software; you can redistribute it and/or
  103. * modify it under the terms of the GNU Lesser General Public
  104. * License as published by the Free Software Foundation; either
  105. * version 2.1 of the License, or (at your option) any later version.
  106. *
  107. * This library is distributed in the hope that it will be useful,
  108. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  109. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  110. * Lesser General Public License for more details.
  111. *
  112. * You should have received a copy of the GNU Lesser General Public
  113. * License along with this library; if not, write to the Free Software
  114. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  115. */
  116.  
  117. #ifndef TCP_STREAMTUBE_JOB_H
  118. #define TCP_STREAMTUBE_JOB_H
  119.  
  120. #include "streamtube-job.h"
  121.  
  122. class QTcpSocket;
  123.  
  124. namespace Nepomuk {
  125.     class PersonContact;
  126.     class Person;
  127. }
  128.  
  129. class TcpStreamTubeJobPrivate;
  130. class TcpStreamTubeJob : public StreamTubeJob
  131. {
  132.     Q_OBJECT
  133.     Q_DISABLE_COPY(TcpStreamTubeJob)
  134.     Q_DECLARE_PRIVATE(TcpStreamTubeJob)
  135.  
  136.     protected:
  137.         explicit TcpStreamTubeJob(StreamTubeJobPrivate &dd, QObject *parent = 0);
  138.         virtual ~TcpStreamTubeJob();
  139.  
  140.         TcpStreamTubeJobPrivate * const d_ptr;
  141.  
  142.     public:
  143.         QTcpSocket* socket();
  144. };
  145.  
  146. #endif // TCP_STREAMTUBE_JOB_H
  147.  
  148. --------------------------------------------------------------------------------
  149. @file: offer-tcp-streamtube-job.h
  150.  
  151. /*
  152. * Copyright (C) 2010 Daniele E. Domenichelli <daniele.domenichelli@gmail.com>
  153. *
  154. * This library is free software; you can redistribute it and/or
  155. * modify it under the terms of the GNU Lesser General Public
  156. * License as published by the Free Software Foundation; either
  157. * version 2.1 of the License, or (at your option) any later version.
  158. *
  159. * This library is distributed in the hope that it will be useful,
  160. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  161. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  162. * Lesser General Public License for more details.
  163. *
  164. * You should have received a copy of the GNU Lesser General Public
  165. * License along with this library; if not, write to the Free Software
  166. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  167. */
  168.  
  169. #ifndef OFFER_TCP_STREAMTUBE_JOB_H
  170. #define OFFER_TCP_STREAMTUBE_JOB_H
  171.  
  172. #include "tcp-streamtube-job.h"
  173.  
  174. namespace Nepomuk {
  175.     class PersonContact;
  176.     class Person;
  177. }
  178.  
  179. class QTcpServer;
  180. class QHostAddress;
  181. class QVariantMap;
  182.  
  183. class OfferStreamTubeJobPrivate;
  184. class OfferStreamTubeJob : public TcpStreamTubeJob
  185. {
  186.     Q_OBJECT
  187.     Q_DISABLE_COPY(OfferStreamTubeJob)
  188.     Q_DECLARE_PRIVATE(OfferStreamTubeJob)
  189.  
  190.     enum ProcessingMode {
  191.         OfferTcpStreamTubeContactMode,
  192.         OfferTcpStreamTubeMetaContactMode,
  193.         OfferTcpStreamTubeHostAddressMode,
  194.         OfferTcpStreamTubeTcpServerMode
  195.     };
  196.  
  197.     // Our Q_PRIVATE_SLOTS who perform the real job
  198.     Q_PRIVATE_SLOT(d_func(), void __k__offerTcpStreamTubeContact())
  199.     Q_PRIVATE_SLOT(d_func(), void __k__offerTcpStreamTubeMetaContact())
  200.     Q_PRIVATE_SLOT(d_func(), void __k__offerTcpStreamTubeHostAddress())
  201.     Q_PRIVATE_SLOT(d_func(), void __k__offerTcpStreamTubeTcpServer())
  202.  
  203.     public:
  204.         OfferTcpStreamTubeJob(const Nepomuk::PersonContact &contact, QObject *parent = 0);
  205.         OfferTcpStreamTubeJob(const Nepomuk::Person &contact, QObject *parent = 0);
  206.         OfferTcpStreamTubeJob(const QHostAddress &address, quint16 port, const QVariantMap &parameters, QObject *parent = 0);
  207.         OfferTcpStreamTubeJob(QTcpServer *server, const QVariantMap &parameters, QObject *parent = 0);
  208.  
  209.         virtual ~OfferTcpStreamTubeJob();
  210.  
  211.         virtual void start();
  212.  
  213.         QTcpServer* tcpServer();
  214. };
  215.  
  216. #endif // OFFER_TCP_STREAMTUBE_JOB_H
  217.  
  218. --------------------------------------------------------------------------------
  219. @file: local-streamtube-job.h
  220.  
  221. /*
  222. * Copyright (C) 2010 Daniele E. Domenichelli <daniele.domenichelli@gmail.com>
  223. *
  224. * This library is free software; you can redistribute it and/or
  225. * modify it under the terms of the GNU Lesser General Public
  226. * License as published by the Free Software Foundation; either
  227. * version 2.1 of the License, or (at your option) any later version.
  228. *
  229. * This library is distributed in the hope that it will be useful,
  230. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  231. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  232. * Lesser General Public License for more details.
  233. *
  234. * You should have received a copy of the GNU Lesser General Public
  235. * License along with this library; if not, write to the Free Software
  236. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  237. */
  238.  
  239. #ifndef LOCAL_STREAMTUBE_JOB_H
  240. #define LOCAL_STREAMTUBE_JOB_H
  241.  
  242. #include "streamtube-job.h"
  243.  
  244. class QLocalSocket;
  245.  
  246. namespace Nepomuk {
  247.     class PersonContact;
  248.     class Person;
  249. }
  250.  
  251. class LocalStreamTubeJobPrivate;
  252. class LocalStreamTubeJob : public StreamTubeJob
  253. {
  254.     Q_OBJECT
  255.     Q_DISABLE_COPY(LocalStreamTubeJob)
  256.     Q_DECLARE_PRIVATE(LocalStreamTubeJob)
  257.  
  258.     protected:
  259.         explicit LocalStreamTubeJob(StreamTubeJobPrivate &dd, QObject *parent = 0);
  260.         virtual ~LocalStreamTubeJob();
  261.  
  262.         LocalStreamTubeJobPrivate * const d_ptr;
  263.  
  264.     public:
  265.         QLocalSocket* localSocket();
  266. };
  267.  
  268. #endif // LOCAL_STREAMTUBE_JOB_H
  269.  
  270. --------------------------------------------------------------------------------
  271. @file: offer-local-streamtube-job.h
  272.  
  273. /*
  274. * Copyright (C) 2010 Daniele E. Domenichelli <daniele.domenichelli@gmail.com>
  275. *
  276. * This library is free software; you can redistribute it and/or
  277. * modify it under the terms of the GNU Lesser General Public
  278. * License as published by the Free Software Foundation; either
  279. * version 2.1 of the License, or (at your option) any later version.
  280. *
  281. * This library is distributed in the hope that it will be useful,
  282. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  283. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  284. * Lesser General Public License for more details.
  285. *
  286. * You should have received a copy of the GNU Lesser General Public
  287. * License along with this library; if not, write to the Free Software
  288. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  289. */
  290.  
  291. #ifndef OFFER_LOCAL_STREAMTUBE_JOB_H
  292. #define OFFER_LOCAL_STREAMTUBE_JOB_H
  293.  
  294. #include "local-streamtube-job.h"
  295.  
  296. namespace Nepomuk {
  297.     class PersonContact;
  298.     class Person;
  299. }
  300.  
  301. class QLocalServer;
  302. //class QByteArray;
  303. //class QVariantMap;
  304.  
  305. class OfferStreamTubeJobPrivate;
  306. class OfferStreamTubeJob : public LocalStreamTubeJob
  307. {
  308.     Q_OBJECT
  309.     Q_DISABLE_COPY(OfferStreamTubeJob)
  310.     Q_DECLARE_PRIVATE(OfferStreamTubeJob)
  311.  
  312.     enum ProcessingMode {
  313.         OfferLocalStreamTubeContactMode,
  314.         OfferLocalStreamTubeMetaContactMode,
  315.         OfferLocalStreamTubeSocketAddressMode,
  316.         OfferLocalStreamTubeLocalServerMode
  317.     };
  318.  
  319.     // Our Q_PRIVATE_SLOTS who perform the real job
  320.     Q_PRIVATE_SLOT(d_func(), void __k__offerLocalStreamTubeContact())
  321.     Q_PRIVATE_SLOT(d_func(), void __k__offerLocalStreamTubeMetaContact())
  322.     Q_PRIVATE_SLOT(d_func(), void __k__offerLocalStreamTubeSocketAddress())
  323.     Q_PRIVATE_SLOT(d_func(), void __k__offerLocalStreamTubeLocalServer())
  324.  
  325.     public:
  326.         OfferLocalStreamTubeJob(const Nepomuk::PersonContact &contact, QObject *parent = 0);
  327.         OfferLocalStreamTubeJob(const Nepomuk::Person &contact, QObject *parent = 0);
  328.         OfferLocalStreamTubeJob(const QByteArray &socketAddress, const QVariantMap &parameters, bool requireCredentials = false, QObject *parent = 0);
  329.         OfferLocalStreamTubeJob(QLocalServer *server, const QVariantMap &parameters, bool requireCredentials = false, QObject *parent = 0);
  330.  
  331.         virtual ~OfferLocalStreamTubeJob();
  332.  
  333.         virtual void start();
  334.  
  335.         QLocalServer* localServer();
  336. };
  337.  
  338. #endif // OFFER_LOCAL_STREAMTUBE_JOB_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement