Polkit-Qt-1  0.95.0
polkitqt1-actiondescription.h
1 /*
2  * This file is part of the Polkit-qt project
3  * Copyright (C) 2009 Jaroslav Reznik <jreznik@redhat.com>
4  * Copyright (C) 2010 Dario Freddi <drf@kde.org>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library 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 GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public License
17  * along with this library; see the file COPYING.LIB. If not, write to
18  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  * Boston, MA 02110-1301, USA.
20  */
21 
22 #ifndef POLKITQT1_ACTION_DESCRIPTION_H
23 #define POLKITQT1_ACTION_DESCRIPTION_H
24 
25 #include "polkitqt1-export.h"
26 
27 #include <QtCore/QList>
28 #include <QtCore/QMetaType>
29 #include <QtCore/QSharedData>
30 
31 typedef struct _PolkitActionDescription PolkitActionDescription;
32 
33 namespace PolkitQt1
34 {
42 class POLKITQT1_EXPORT ActionDescription
43 {
44 public:
47  Unknown = -1,
49  NotAuthorized = 0,
51  AuthenticationRequired = 1,
53  AdministratorAuthenticationRequired = 2,
55  AuthenticationRequiredRetained = 3,
57  AdministratorAuthenticationRequiredRetained = 4,
59  Authorized = 5
60  };
61 
62  typedef QList< ActionDescription > List;
63 
72  explicit ActionDescription(PolkitActionDescription *actionDescription);
75 
76  ActionDescription &operator=(const ActionDescription &other);
77 
83  QString actionId() const;
84 
90  QString description() const;
91 
97  QString message() const;
98 
104  QString vendorName() const;
105 
111  QString vendorUrl() const;
112 
118  QString iconName() const;
119 
125  ActionDescription::ImplicitAuthorization implicitAny() const;
126 
132  ActionDescription::ImplicitAuthorization implicitInactive() const;
133 
139  ActionDescription::ImplicitAuthorization implicitActive() const;
140 
141 private:
142  class Data;
143  QSharedDataPointer< Data > d;
144 };
145 }
146 
147 Q_DECLARE_METATYPE(PolkitQt1::ActionDescription::List)
148 
149 #endif //POLKIT_QT_ACTION_DESCRIPTION_H
ImplicitAuthorization
Definition: polkitqt1-actiondescription.h:45
Contains Macros for exporting symbols.
Namespace wrapping Polkit-Qt classes.
Definition: listeneradapter.cpp:26
Class used to encapsulate a registered action.
Definition: polkitqt1-actiondescription.h:42