Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * 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 TELEPATHY_TUBE_JOB_H
- #define TELEPATHY_TUBE_JOB_H
- #include "telepathy-base-job.h"
- class TelepathyTubeJobPrivate;
- class TelepathyTubeJob : public TelepathyBaseJob
- {
- Q_OBJECT
- Q_DISABLE_COPY(TelepathyTubeJob)
- Q_DECLARE_PRIVATE(TelepathyTubeJob)
- protected:
- explicit TelepathyTubeJob(TelepathyTubeJobPrivate &dd, QObject *parent = 0);
- virtual ~TelepathyTubeJob();
- TelepathyTubeJobPrivate * const d_ptr;
- Q_SIGNALS:
- void telepathyTubeChannelCreated();
- void telepathyTubeChannelInvalidated();
- void telepathyTubeChannelReady();
- void telepathyTubeChannelNewRemoteConnection();
- };
- #endif // TELEPATHY_TUBE_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 STREAMTUBE_JOB_H
- #define STREAMTUBE_JOB_H
- #include "telepathy-tube-job.h"
- class QIODevice;
- class StreamTubeJobPrivate;
- class StreamTubeJob : public TelepathyTubeJob
- {
- Q_OBJECT
- Q_DISABLE_COPY(StreamTubeJob)
- Q_DECLARE_PRIVATE(StreamTubeJob)
- protected:
- explicit StreamTubeJob(StreamTubeJobPrivate &dd, QObject *parent = 0);
- virtual ~StreamTubeJob();
- StreamTubeJobPrivate * const d_ptr;
- public:
- QIODevice* device();
- };
- #endif // 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 TCP_STREAMTUBE_JOB_H
- #define TCP_STREAMTUBE_JOB_H
- #include "streamtube-job.h"
- class QTcpSocket;
- namespace Nepomuk {
- class PersonContact;
- class Person;
- }
- class TcpStreamTubeJobPrivate;
- class TcpStreamTubeJob : public StreamTubeJob
- {
- Q_OBJECT
- Q_DISABLE_COPY(TcpStreamTubeJob)
- Q_DECLARE_PRIVATE(TcpStreamTubeJob)
- protected:
- explicit TcpStreamTubeJob(StreamTubeJobPrivate &dd, QObject *parent = 0);
- virtual ~TcpStreamTubeJob();
- TcpStreamTubeJobPrivate * const d_ptr;
- public:
- QTcpSocket* socket();
- };
- #endif // 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 "tcp-streamtube-job.h"
- #include "telepathy-bridge.h"
- namespace Nepomuk {
- class PersonContact;
- class Person;
- }
- class QTcpServer;
- class OfferTcpStreamTubeJobPrivate;
- class OfferTcpStreamTubeJob : public TcpStreamTubeJob
- {
- Q_OBJECT
- Q_DISABLE_COPY(OfferTcpStreamTubeJob)
- Q_DECLARE_PRIVATE(OfferTcpStreamTubeJob)
- enum ProcessingMode {
- OfferTcpStreamTubeContactMode,
- OfferTcpStreamTubeMetaContactMode,
- };
- // Our Q_PRIVATE_SLOTS who perform the real job
- Q_PRIVATE_SLOT(d_func(), void __k__offerTcpStreamTubeContact())
- Q_PRIVATE_SLOT(d_func(), void __k__offerTcpStreamTubeMetaContact())
- public:
- OfferStreamTubeJob(const Nepomuk::PersonContact &contact, const StreamTubeSocketMode socketMode = TcpSocketMode, QObject *parent = 0);
- OfferStreamTubeJob(const Nepomuk::Person &contact, const SocketMode socketMode = TcpSocketMode, QObject *parent = 0);
- // TODO Match those constructors
- // PendingOperation *offerTubeAsTcpSocket(const QHostAddress &address, quint16 port, const QVariantMap ¶meters);
- // PendingOperation *offerTubeAsTcpSocket(QTcpServer *server, const QVariantMap ¶meters);
- virtual ~OfferStreamTubeJob();
- virtual void start();
- QTcpServer* tcpServer();
- };
- #endif // OFFER_TCP_STREAMTUBE_JOB_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement