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 PSIPRIVACYMANAGER_H
22
#define PSIPRIVACYMANAGER_H
25
#include <QStringList>
27
#include "privacymanager.h"
31
class PrivacyListListener;
37
class PsiPrivacyManager : public PrivacyManager
42
PsiPrivacyManager(XMPP::Task* rootTask);
43
virtual ~PsiPrivacyManager();
45
void requestListNames();
47
void changeDefaultList(const QString& name);
48
void changeActiveList(const QString& name);
49
void changeList(const PrivacyList& list);
50
void getDefaultList();
51
void requestList(const QString& name);
54
void block(const QString&);
57
static QStringList blockedContacts(const PrivacyList&, bool* allBlocked);
59
// Can these be private ?
63
void changeDefaultList_finished();
64
void changeActiveList_finished();
65
void changeList_finished();
66
void getDefault_listsReceived(const QString&, const QString&, const QStringList&);
67
void getDefault_listsError();
68
void getDefault_listReceived(const PrivacyList&);
69
void getDefault_listError();
71
void block_getDefaultList_success(const PrivacyList&);
72
void block_getDefaultList_error();
75
XMPP::Task* rootTask_;
76
PrivacyListListener* listener_;
78
bool getDefault_waiting_;
79
QString getDefault_default_;
81
QStringList block_targets_;