2 * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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
18 * @author Bartlomiej Grzelewski (b.grzelewski@samsung.com)
20 * @brief Sample service implementation.
24 #include <ckm/ckm-type.h>
29 typedef std::vector<std::string> AppLabelVector;
30 typedef std::vector<uid_t> UidVector;
34 FileSystem(uid_t uid);
36 std::string getDBPath() const;
38 // Domain Key Encryption Key
39 RawBuffer getDKEK() const;
40 bool saveDKEK(const RawBuffer &buffer) const;
42 // Database Data Encryption Key
43 RawBuffer getDBDEK() const;
44 bool saveDBDEK(const RawBuffer &buffer) const;
46 // Remove all ckm data related to user
47 int removeUserData() const;
49 bool addRemovedApp(const std::string &smackLabel) const;
50 AppLabelVector clearRemovedsApps() const;
53 static UidVector getUIDsFromDBFile();
55 virtual ~FileSystem(){}
57 std::string getDKEKPath() const;
58 std::string getDBDEKPath() const;
59 RawBuffer loadFile(const std::string &path) const;
60 bool saveFile(const std::string &path, const RawBuffer &buffer) const;
61 std::string getRemovedAppsPath() const;