/** * Copyright (C) 2012-2013 Canonical, Ltd. * * Authors: * Tiago Salem Herrmann * * This file is part of telepathy-ofono. * * telepathy-ofono is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 3. * * telepathy-ofono 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef OFONOTEXTCHANNEL_H #define OFONOTEXTCHANNEL_H #include #include #include #include #include "connection.h" class oFonoConnection; class oFonoTextChannel : public QObject { Q_OBJECT public: oFonoTextChannel(oFonoConnection *conn, QString phoneNumber, uint targetHandle, QObject *parent = 0); QString sendMessage(const Tp::MessagePartList& message, uint flags, Tp::DBusError* error); void messageReceived(const QString & message, const QVariantMap &info); Tp::BaseChannelPtr baseChannel(); private Q_SLOTS: void onOfonoMessageStateChanged(QString status); private: ~oFonoTextChannel(); Tp::BaseChannelPtr mBaseChannel; QString mPhoneNumber; oFonoConnection *mConnection; uint mTargetHandle; Tp::BaseChannelMessagesInterfacePtr mMessagesIface; Tp::BaseChannelTextTypePtr mTextChannel; uint mMessageCounter; }; #endif // OFONOTEXTCHANNEL_H