2 * PresenceManager - object for managing global presence, automatic change
3 * presence to "away" after long inactivity (TODO)...
5 * Copyright (C) 2011 Lukáš Karas <lukas.karas@centrum.cz>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the
19 * Free Software Foundation, Inc.,
20 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 #include <TelepathyQt4/Account>
26 #include "../backend/accounts-model.h"
28 #ifndef PRESENCEMANAGER_H
29 #define PRESENCEMANAGER_H
31 class PresenceManager
: public QObject
{
33 Q_DISABLE_COPY(PresenceManager
)
36 PresenceManager(MaknetoBackend::AccountsModel
* accountModel
, QObject
* parent
= 0);
37 virtual ~PresenceManager();
38 Q_INVOKABLE
void requestGlobalPresence(int type
, const QString
&status
, const QString
&statusMessage
);
39 Q_INVOKABLE
int getGlobalPresenceType();
40 Q_INVOKABLE QString
getGlobalPresenceStatus();
41 Q_INVOKABLE QString
getGlobalPresenceStatusMessage();
44 void globalPresenceChanged(int type
, const QString
&status
, const QString
&statusMessage
);
48 void onPresenceChanged(Tp::ConnectionPresenceType
, const QString
&, const QString
&);
49 void onAccountCountChanged();
52 MaknetoBackend::AccountsModelItem
*getGlobalPresenceAccount();
54 MaknetoBackend::AccountsModel
* _accountModel
;
57 #endif /* PRESENCEMANAGER_H */