2
* Copyright (C) 2016 Canonical, Ltd.
5
* Tiago Salem Herrmann <tiago.herrmann@canonical.com>
6
* Gustavo Pichorim Boiko <gustavo.boiko@canonical.com>
8
* This file is part of telephony-service.
10
* telephony-service is free software; you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation; version 3.
14
* telephony-service is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
* GNU General Public License for more details.
19
* You should have received a copy of the GNU General Public License
20
* along with this program. If not, see <http://www.gnu.org/licenses/>.
23
#ifndef CHATSTARTINGJOB_H
24
#define CHATSTARTINGJOB_H
27
#include "messagejob.h"
28
#include <TelepathyQt/Types>
29
#include <TelepathyQt/PendingOperation>
33
class ChatStartingJob : public MessageJob
36
Q_PROPERTY(QString accountId READ accountId CONSTANT)
37
Q_PROPERTY(Tp::TextChannelPtr textChannel READ textChannel NOTIFY textChannelChanged)
38
Q_PROPERTY(QString channelObjectPath READ channelObjectPath NOTIFY channelObjectPathChanged)
40
ChatStartingJob(TextHandler *textHandler, const QString &accountId, const QVariantMap &properties);
43
Tp::TextChannelPtr textChannel() const;
44
QString channelObjectPath() const;
47
virtual void startJob();
50
void textChannelChanged();
51
void channelObjectPathChanged();
55
void startTextChat(const Tp::AccountPtr &account, const QVariantMap &properties);
56
void startTextChatRoom(const Tp::AccountPtr &account, const QVariantMap &properties);
57
void setTextChannel(Tp::TextChannelPtr channel);
59
void onChannelRequestFinished(Tp::PendingOperation *op);
62
TextHandler *mTextHandler;
64
QVariantMap mProperties;
65
Tp::TextChannelPtr mTextChannel;
69
#endif // CHATSTARTINGJOB_H