Advertisement
puneet

Untitled

Aug 22nd, 2012
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.45 KB | None | 0 0
  1. /*
  2. * Copyright (C) 2009-2010 Collabora Ltd. <[email protected]>
  3. * @author George Goldberg <[email protected]>
  4. * Copyright (C) 2012 Daniele E. Domenichelli <[email protected]>
  5. *
  6. * This library is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 2.1 of the License, or (at your option) any later version.
  10. *
  11. * This library is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public
  17. * License along with this library; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  19. */
  20.  
  21. #ifndef KWHITEBOARD_HANDLER_H
  22. #define KWHITEBOARD_HANDLER_H
  23.  
  24. #include <QtCore/QList>
  25.  
  26. #include <TelepathyQt/AbstractClientHandler>
  27. #include "objectManager.h"
  28.  
  29. namespace Tp
  30. {
  31. class PendingOperation;
  32. }
  33.  
  34. class KWhiteboardHandler : public QObject, public Tp::AbstractClientHandler
  35. {
  36. Q_OBJECT
  37.  
  38. public:
  39. KWhiteboardHandler(QObject *parent = 0);
  40. virtual ~KWhiteboardHandler();
  41.  
  42. virtual bool bypassApproval() const;
  43. virtual void handleChannels(const Tp::MethodInvocationContextPtr<> &context,
  44. const Tp::AccountPtr &account,
  45. const Tp::ConnectionPtr &connection,
  46. const QList<Tp::ChannelPtr> &channels,
  47. const QList<Tp::ChannelRequestPtr> &requestsSatisfied,
  48. const QDateTime &userActionTime,
  49. const HandlerInfo &handlerInfo);
  50. static ObjectManager* s_objManager;
  51.  
  52.  
  53. public Q_SLOTS:
  54. void onOfferTubeFinished(Tp::PendingOperation *op);
  55. void onAcceptTubeFinished(Tp::PendingOperation *op);
  56.  
  57. Q_SIGNALS:
  58. void gotTubeDBusConnection(const QDBusConnection &conn);
  59. void gotTubeChannel(Tp::ChannelPtr channel);
  60.  
  61. private Q_SLOTS:
  62. void onChannelInvalidated();
  63.  
  64. private:
  65. Tp::IncomingDBusTubeChannelPtr m_incomingGroupDBusChannel;
  66. Tp::OutgoingDBusTubeChannelPtr m_outgoingGroupDBusChannel;
  67. };
  68.  
  69. ObjectManager* KWhiteboardHandler::s_objManager;
  70. #endif // Header guard
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement