Change getters to use methodCallForce
[platform/core/security/dpm-auth.git] / plugin / password-manager.h
1 /*
2  *  Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  *  Licensed under the Apache License, Version 2.0 (the "License");
5  *  you may not use this file except in compliance with the License.
6  *  You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  *  Unless required by applicable law or agreed to in writing, software
11  *  distributed under the License is distributed on an "AS IS" BASIS,
12  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  *  See the License for the specific language governing permissions and
14  *  limitations under the License
15  */
16
17 #ifndef __DPM_PASSWORD_MANAGER_H__
18 #define __DPM_PASSWORD_MANAGER_H__
19 #include <sys/types.h>
20
21 #include <vector>
22 #include <string>
23
24 #include <auth-passwd-admin.h>
25
26 class PasswordManager {
27 public:
28         typedef password_quality_type QualityType;
29
30         PasswordManager(uid_t uid);
31         ~PasswordManager();
32
33         void setQuality(QualityType quality);
34         void setMinimumLength(int value);
35         void setMinimumComplexCharacters(int value);
36         void setMaximumFailedForWipe(int value);
37         void setExpires(int value);
38         void setHistory(int value);
39         void setPattern(const char* pattern);
40         void deletePatern();
41         void setMaximumCharacterOccurrences(int value);
42         void setMaximumNumericSequenceLength(int value);
43         void setForbiddenStrings(const std::vector<std::string> &forbiddenStrings);
44         void resetPassword(const std::string& password);
45         void enforce();
46
47 private:
48         uid_t user;
49         policy_h *p_policy;
50 };
51 #endif //!__DPM_PASSWORD_MANAGER_H__