00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00028 #ifndef LIMAL_APPARMOR_NOTIFICATIONS_HPP
00029 #define LIMAL_APPARMOR_NOTIFICATIONS_HPP
00030
00031 #include <limal/apparmor-notifications/config.h>
00032 #include <blocxx/Map.hpp>
00033 #include <blocxx/String.hpp>
00034 #include <blocxx/COWIntrusiveReference.hpp>
00035
00036 namespace LIMAL_NAMESPACE
00037 {
00038
00039 namespace APPARMOR_NOTIFICATIONS_NAMESPACE
00040 {
00041
00042 typedef blocxx::Map<blocxx::String, blocxx::String> NotificationsMap;
00043 typedef NotificationsMap::value_type notification_value;
00044
00045 class ApparmorNotifications
00046 {
00047
00048 public:
00049
00050 enum EConfigType
00051 {
00052 E_ENABLED,
00053 E_DISABLED
00054 };
00055
00059 ApparmorNotifications();
00060
00064 ~ApparmorNotifications();
00065
00071 blocxx::String
00072 getNotificationsConfigFile();
00073
00079 void
00080 setNotificationsConfigFile(const blocxx::String & value);
00081
00087 blocxx::String
00088 getNotificationsDisabledConfigFile();
00089
00095 void
00096 setNotificationsDisabledConfigFile(const blocxx::String& value);
00097
00104 bool
00105 canReadConfig();
00106
00112 bool
00113 canWriteConfig();
00114
00121 bool
00122 canReadDisabledConfig();
00123
00129 blocxx::Int32
00130 deleteConfig();
00131
00137 blocxx::Int32
00138 disableConfig();
00139
00149 blocxx::Int32
00150 readConfig(NotificationsMap &retMap,
00151 EConfigType readConfigType);
00152
00153
00161 blocxx::Int32
00162 writeConfig(NotificationsMap ¬ificationValues);
00163
00164 private:
00165 class Data;
00166 blocxx::COWIntrusiveReference<Data> m_data;
00167 };
00168 }
00169
00170 namespace Apparmor
00171 {
00172 using limal::apparmor_notifications::ApparmorNotifications;
00173 }
00174 }
00175 #endif
00176