~ubuntu-branches/ubuntu/utopic/kde-workspace/utopic-proposed

« back to all changes in this revision

Viewing changes to kdm/kcm/helper.h

  • Committer: Bazaar Package Importer
  • Author(s): Michał Zając
  • Date: 2011-07-09 08:31:15 UTC
  • Revision ID: james.westby@ubuntu.com-20110709083115-ohyxn6z93mily9fc
Tags: upstream-4.6.90
Import upstream version 4.6.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *  helper.h
 
3
 *
 
4
 *  Copyright (C) 2010 Igor Krivenko <igor@shg.ru>
 
5
 *
 
6
 *  This program is free software; you can redistribute it and/or modify
 
7
 *  it under the terms of the GNU General Public License as published by
 
8
 *  the Free Software Foundation; either version 2 of the License, or
 
9
 *  (at your option) any later version.
 
10
 *
 
11
 *  This program is distributed in the hope that it will be useful,
 
12
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 *  GNU General Public License for more details.
 
15
 *
 
16
 *  You should have received a copy of the GNU General Public License
 
17
 *  along with this program; if not, write to the Free Software
 
18
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
19
 *
 
20
 */
 
21
#ifndef KDM_HELPER_H
 
22
#define KDM_HELPER_H
 
23
 
 
24
#include <kauth.h>
 
25
 
 
26
using namespace KAuth;
 
27
 
 
28
class Helper : public QObject {
 
29
    Q_OBJECT
 
30
 
 
31
public:
 
32
    enum {
 
33
        KdmrcInstallError          = 1 << 0,
 
34
        BackgroundrcInstallError   = 1 << 1,
 
35
        CreateFacesDirError        = 1 << 2,
 
36
        RemoveFaceError            = 1 << 3,
 
37
        InstallFaceError           = 1 << 4,
 
38
        CreateThemesDirError       = 1 << 5,
 
39
        RemoveThemesError          = 1 << 6,
 
40
        InstallThemesError         = 1 << 7
 
41
    };
 
42
 
 
43
    enum { CreateFacesDir, RemoveFace, InstallFace };
 
44
    enum { CreateThemesDir, RemoveThemes, InstallThemes };
 
45
 
 
46
public slots:
 
47
    ActionReply save(const QVariantMap &map);
 
48
    ActionReply managefaces(const QVariantMap &map);
 
49
    ActionReply managethemes(const QVariantMap &map);
 
50
 
 
51
private:
 
52
    bool removeFace(const QString &facesDir, const QString &user);
 
53
    bool installFace(const QString &facesDir, const QString &user, const QString &sourceFile);
 
54
    bool removeThemes(const QString &themesDir, QStringList &themes);
 
55
    bool installThemes(const QString &themesDir, QStringList &themes);
 
56
 
 
57
    ActionReply createReply(int code, const QVariantMap *returnData = 0);
 
58
};
 
59
 
 
60
#endif // KDM_HELPER_H