3
* Copyright (C) 2006 Remko Troncon
5
* This program is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU General Public License
7
* as published by the Free Software Foundation; either version 2
8
* of the License, or (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this library; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
#ifndef PRIVACYMANAGER_H
22
#define PRIVACYMANAGER_H
25
#include <QStringList>
29
class PrivacyListListener;
35
class PrivacyManager : public QObject
40
PrivacyManager(XMPP::Task* rootTask);
41
virtual ~PrivacyManager();
43
void requestListNames();
45
void changeDefaultList(const QString& name);
46
void changeActiveList(const QString& name);
47
void changeList(const PrivacyList& list);
48
void getDefaultList();
49
void requestList(const QString& name);
52
void block(const QString&);
55
static QStringList blockedContacts(const PrivacyList&, bool* allBlocked);
57
// Can these be private ?
61
void changeDefaultList_finished();
62
void changeActiveList_finished();
63
void changeList_finished();
64
void getDefault_listsReceived(const QString&, const QString&, const QStringList&);
65
void getDefault_listsError();
66
void getDefault_listReceived(const PrivacyList&);
67
void getDefault_listError();
69
void block_getDefaultList_success(const PrivacyList&);
70
void block_getDefaultList_error();
73
void changeDefaultList_success();
74
void changeDefaultList_error();
75
void changeActiveList_success();
76
void changeActiveList_error();
77
void changeList_success();
78
void changeList_error();
79
void defaultListAvailable(const PrivacyList&);
80
void defaultListError();
81
void listChangeSuccess();
82
void listChangeError();
83
void listReceived(const PrivacyList& p);
85
void listsReceived(const QString& defaultList, const QString& activeList, const QStringList& lists);
89
XMPP::Task* rootTask_;
90
PrivacyListListener* listener_;
92
bool getDefault_waiting_;
93
QString getDefault_default_;
95
QStringList block_targets_;