Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @file: offer-tcp-streamtube-job.h
- /*
- * Copyright (C) 2010 Daniele E. Domenichelli <daniele.domenichelli@gmail.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
- #ifndef OFFER_TCP_STREAMTUBE_JOB_H
- #define OFFER_TCP_STREAMTUBE_JOB_H
- #include "telepathy-base-job.h"
- namespace Nepomuk {
- class PersonContact;
- class Person;
- }
- namespace Tp {
- class OutgoingStreamTubeChannel;
- }
- class QTcpServer;
- class QTcpSocket;
- class QHostAddress;
- class QVariantMap;
- class OfferTcpStreamTubeJobPrivate;
- class OfferTcpStreamTubeJob : public TelepathyBaseJob
- {
- Q_OBJECT
- Q_DISABLE_COPY(OfferTcpStreamTubeJob)
- Q_DECLARE_PRIVATE(OfferTcpStreamTubeJob)
- enum ProcessingMode {
- OfferTcpStreamTubeContactMode,
- OfferTcpStreamTubeContactHostAddressMode,
- OfferTcpStreamTubeContactTcpServerMode,
- OfferTcpStreamTubeMetaContactMode,
- OfferTcpStreamTubeMetaContactHostAddressMode,
- OfferTcpStreamTubeMetaContactTcpServerMode
- };
- // Our Q_PRIVATE_SLOTS who perform the real job
- Q_PRIVATE_SLOT(d_func(), void __k__offerTcpStreamTubeContact())
- Q_PRIVATE_SLOT(d_func(), void __k__offerTcpStreamTubeContactHostAddress())
- Q_PRIVATE_SLOT(d_func(), void __k__offerTcpStreamTubeContactTcpServer())
- Q_PRIVATE_SLOT(d_func(), void __k__offerTcpStreamTubeMetaContact())
- Q_PRIVATE_SLOT(d_func(), void __k__offerTcpStreamTubeMetaContactHostAddress())
- Q_PRIVATE_SLOT(d_func(), void __k__offerTcpStreamTubeMetaContactTcpServer())
- public:
- OfferTcpStreamTubeJob(const Nepomuk::PersonContact &contact, const QVariantMap ¶meters = QVariantMap(), QObject *parent = 0);
- OfferTcpStreamTubeJob(const Nepomuk::PersonContact &contact, const QHostAddress &address, quint16 port, const QVariantMap ¶meters = QVariantMap(), QObject *parent = 0);
- OfferTcpStreamTubeJob(const Nepomuk::PersonContact &contact, QTcpServer *server, const QVariantMap ¶meters = QVariantMap(), QObject *parent = 0);
- OfferTcpStreamTubeJob(const Nepomuk::Person &contact, const QVariantMap ¶meters = QVariantMap(), QObject *parent = 0);
- OfferTcpStreamTubeJob(const Nepomuk::Person &contact, const QHostAddress &address, quint16 port, const QVariantMap ¶meters = QVariantMap(), QObject *parent = 0);
- OfferTcpStreamTubeJob(const Nepomuk::Person &contact, QTcpServer *server, const QVariantMap ¶meters = QVariantMap(), QObject *parent = 0);
- virtual ~OfferTcpStreamTubeJob();
- virtual void start();
- QTcpServer* tcpServer() const;
- Tp::OutgoingStreamTubeChannel* outgoingStreamTubeChannel() const;
- };
- #endif // OFFER_TCP_STREAMTUBE_JOB_H
- --------------------------------------------------------------------------------
- @file: accept-tcp-streamtube-job.h
- /*
- * Copyright (C) 2010 Daniele E. Domenichelli <daniele.domenichelli@gmail.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
- #ifndef ACCEPT_TCP_STREAMTUBE_JOB_H
- #define ACCEPT_TCP_STREAMTUBE_JOB_H
- #include "telepathy-base-job.h"
- #include <QHostAddress>
- namespace Tp {
- class IncomingStreamTubeChannel;
- }
- class QTcpSocket;
- class AcceptTcpStreamTubeJobPrivate;
- class AcceptTcpStreamTubeJob : public TelepathyBaseJob
- {
- Q_OBJECT
- Q_DISABLE_COPY(AcceptStreamTubeJob)
- Q_DECLARE_PRIVATE(AcceptStreamTubeJob)
- // Our Q_PRIVATE_SLOTS who perform the real job
- Q_PRIVATE_SLOT(d_func(), void __k__acceptTcpStreamTube())
- public:
- AcceptTcpStreamTubeJob(const QHostAddress &allowedAddress = QHostAddress::Any, quint16 allowedPort = 0, QObject *parent = 0);
- virtual ~AcceptTcpStreamTubeJob();
- virtual void start();
- QTcpSocket* tcpSocket() const;
- Tp::IncomingStreamTubeChannel* incomingStreamTubeChannel() const;
- };
- #endif // ACCEPT_TCP_STREAMTUBE_JOB_H
- --------------------------------------------------------------------------------
- @file: offer-local-streamtube-job.h
- /*
- * Copyright (C) 2010 Daniele E. Domenichelli <daniele.domenichelli@gmail.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
- #ifndef OFFER_LOCAL_STREAMTUBE_JOB_H
- #define OFFER_LOCAL_STREAMTUBE_JOB_H
- #include "telepathy-base-job.h"
- namespace Nepomuk {
- class PersonContact;
- class Person;
- }
- namespace Tp {
- class OutgoingStreamTubeChannel;
- }
- class QLocalServer;
- class QLocalSocket;
- class QVariantMap;
- class OfferLocalStreamTubeJobPrivate;
- class OfferLocalStreamTubeJob : public TelepathyBaseJob
- {
- Q_OBJECT
- Q_DISABLE_COPY(OfferLocalStreamTubeJob)
- Q_DECLARE_PRIVATE(OfferLocalStreamTubeJob)
- enum ProcessingMode {
- OfferLocalStreamTubeContactMode,
- OfferLocalStreamTubeContactSocketAddressMode,
- OfferLocalStreamTubeContactLocalServerMode,
- OfferLocalStreamTubeMetaContactMode,
- OfferLocalStreamTubeMetaContactSocketAddressMode,
- OfferLocalStreamTubeMetaContactLocalServerMode
- };
- // Our Q_PRIVATE_SLOTS who perform the real job
- Q_PRIVATE_SLOT(d_func(), void __k__offerLocalStreamTubeContact())
- Q_PRIVATE_SLOT(d_func(), void __k__offerLocalStreamTubeContactSocketAddress())
- Q_PRIVATE_SLOT(d_func(), void __k__offerLocalStreamTubeContactLocalServer())
- Q_PRIVATE_SLOT(d_func(), void __k__offerLocalStreamTubeMetaContact())
- Q_PRIVATE_SLOT(d_func(), void __k__offerLocalStreamTubeMetaContactSocketAddress())
- Q_PRIVATE_SLOT(d_func(), void __k__offerLocalStreamTubeMetaContactLocalServer())
- public:
- OfferLocalStreamTubeJob(const Nepomuk::PersonContact &contact, const QVariantMap ¶meters = QVariantMap(), bool requireCredentials = false, QObject *parent = 0);
- OfferLocalStreamTubeJob(const Nepomuk::PersonContact &contact, const QByteArray &socketAddress, const QVariantMap ¶meters = QVariantMap(), bool requireCredentials = false, QObject *parent = 0);
- OfferLocalStreamTubeJob(const Nepomuk::PersonContact &contact, QLocalServer *server, const QVariantMap ¶meters = QVariantMap(), bool requireCredentials = false, QObject *parent = 0);
- OfferLocalStreamTubeJob(const Nepomuk::Person &contact, const QVariantMap ¶meters = QVariantMap(), bool requireCredentials = false, QObject *parent = 0);
- OfferLocalStreamTubeJob(const Nepomuk::Person &contact, const QByteArray &socketAddress, const QVariantMap ¶meters = QVariantMap(), bool requireCredentials = false, QObject *parent = 0);
- OfferLocalStreamTubeJob(const Nepomuk::Person &contact, QLocalServer *server, const QVariantMap ¶meters = QVariantMap(), bool requireCredentials = false, QObject *parent = 0);
- virtual ~OfferLocalStreamTubeJob();
- virtual void start();
- QLocalServer* localServer() const;
- Tp::OutgoingStreamTubeChannel* outgoingStreamTubeChannel() const {return m_channel;}
- };
- #endif // OFFER_LOCAL_STREAMTUBE_JOB_H
- --------------------------------------------------------------------------------
- @file: accept-local-streamtube-job.h
- /*
- * Copyright (C) 2010 Daniele E. Domenichelli <daniele.domenichelli@gmail.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
- #ifndef ACCEPT_LOCAL_STREAMTUBE_JOB_H
- #define ACCEPT_LOCAL_STREAMTUBE_JOB_H
- #include "telepathy-base-job.h"
- namespace Tp {
- class IncomingStreamTubeChannel;
- }
- class QLocalSocket;
- class QVariantMap;
- class AcceptLocalStreamTubeJobPrivate;
- class AcceptLocalStreamTubeJob : public TelepathyBaseJob
- {
- Q_OBJECT
- Q_DISABLE_COPY(AcceptStreamTubeJob)
- Q_DECLARE_PRIVATE(AcceptStreamTubeJob)
- // Our Q_PRIVATE_SLOTS who perform the real job
- Q_PRIVATE_SLOT(d_func(), void __k__acceptLocalStreamTube())
- public:
- AcceptLocalStreamTubeJob(const QVariantMap ¶meters = QVariantMap(), bool requireCredentials = false, QObject *parent = 0);
- virtual ~AcceptLocalStreamTubeJob();
- virtual void start();
- QLocalSocket* localSocket() const;
- Tp::IncomingStreamTubeChannel* incomingStreamTubeChannel() const;
- };
- #endif // ACCEPT_LOCAL_STREAMTUBE_JOB_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement