22 #ifndef EASPOLICYMANAGER_H
23 #define EASPOLICYMANAGER_H
28 #include "cjson/json.h"
31 #include <lunaservice.h>
40 : m_passwordRequired(false)
43 , m_isAlphaNumeric(false)
44 , m_allowSimplePassword(true)
45 , m_inactivityInSeconds(9998)
48 , m_isDevicePolicy(isDevicePolicy)
63 const std::string&
id()
const {
return m_id; }
65 json_object*
toJSON()
const;
71 bool validMinLength()
const {
return m_passwordRequired && m_minLength > 1; }
77 bool operator== (
const EASPolicy& r)
const {
78 return (m_passwordRequired == r.m_passwordRequired &&
79 m_maxRetries == r.m_maxRetries &&
80 m_minLength == r.m_minLength &&
81 m_isAlphaNumeric == r.m_isAlphaNumeric &&
82 m_allowSimplePassword == r.m_allowSimplePassword &&
83 m_inactivityInSeconds == r.m_inactivityInSeconds);
87 bool m_passwordRequired;
88 uint32_t m_maxRetries;
90 bool m_isAlphaNumeric;
91 bool m_allowSimplePassword;
93 uint32_t m_inactivityInSeconds;
97 bool m_isDevicePolicy;
136 static bool cbSecurityPolicy (LSHandle *sh, LSMessage *message,
void *data);
137 static bool cbWatchResponse (LSHandle *sh, LSMessage *message,
void *data);
138 static bool cbDevicePolicy (LSHandle *sh, LSMessage *message,
void *data);
152 void notifyPolicyChanged();
157 uint32_t m_retriesLeft;
161 LSMessageToken m_callToken;