00001
00002
00003
00004
00005
00006 #ifndef PolKit_h
00007 #define PolKit_h
00008
00009
00010 #include <string>
00011
00012 #include <dbus/dbus.h>
00013 #include <polkit-dbus/polkit-dbus.h>
00014
00015 class PolKit
00016 {
00017 public:
00018
00019 PolKit();
00020 ~PolKit();
00021
00022 bool isDBusUserAuthorized(const std::string &action_id, const std::string &dbus_caller, DBusConnection *con);
00023
00024 static std::string createActionId(const std::string &prefix, const std::string &path,
00025 const std::string &method, const std::string &arg = std::string(),
00026 const std::string &opt = std::string());
00027
00028 private:
00029
00030 DBusError dbus_error;
00031 PolKitError *polkit_error;
00032 PolKitContext *context;
00033 };
00034
00035 #endif
00036