Don't remove "User" Smack rules on application uninstall
[platform/core/security/security-manager.git] / src / server / service / include / smack-labels.h
1 /*
2  *  Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  *  Contact: Rafal Krypa <r.krypa@samsung.com>
5  *
6  *  Licensed under the Apache License, Version 2.0 (the "License");
7  *  you may not use this file except in compliance with the License.
8  *  You may obtain a copy of the License at
9  *
10  *      http://www.apache.org/licenses/LICENSE-2.0
11  *
12  *  Unless required by applicable law or agreed to in writing, software
13  *  distributed under the License is distributed on an "AS IS" BASIS,
14  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  *  See the License for the specific language governing permissions and
16  *  limitations under the License
17  */
18 /**
19  * @file        smack-labels.h
20  * @author      Jan Cybulski <j.cybulski@samsung.com>
21  * @author      Rafal Krypa <r.krypa@samsung.com>
22  * @version     1.0
23  * @brief       Header file of functions managing smack labels
24  *
25  */
26 #ifndef _SMACK_LABELS_H_
27 #define _SMACK_LABELS_H_
28
29 #include <string>
30 #include <utility>
31
32 #include "security-manager.h"
33
34 namespace SecurityManager {
35
36 /**
37  * Sets Smack labels on a directory and its contents, recursively.
38  *
39  * @param pkgId[in] application's package identifier
40  * @param path[in] path to a file or directory to setup
41  * @param pathType[in] type of path to setup. See description of
42  *         app_install_path_type in security-manager.h for details
43  *
44  * @return true on success, false on error.
45  */
46 bool setupPath(const std::string &pkgId, const std::string &path,
47     app_install_path_type pathType);
48
49 } // namespace SecurityManager
50
51 #endif /* _SMACK_LABELS_H_ */