Add uid attribute of ThemeInfo
[platform/core/appfw/tizen-theme-manager.git] / src / theme_plugin / theme_parser.h
1 // Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
2 // Use of this source code is governed by a apache 2.0 license that can be
3 // found in the LICENSE file.
4
5 #ifndef THEME_PLUGIN_THEME_PARSER_H_
6 #define THEME_PLUGIN_THEME_PARSER_H_
7
8 #include <sys/types.h>
9
10 #include <memory>
11 #include <string>
12
13 #include "theme/loader/theme_info.h"
14
15 namespace ttm {
16 namespace plugin {
17
18 class ThemeParser {
19  public:
20   enum class ThemeOperation {
21     ADD,
22     UPDATE,
23     REMOVE
24   };
25
26   explicit ThemeParser(const std::string& path) : path_(path) {}
27   loader::ThemeInfo Inflate(const std::string id, const std::string pkgid,
28       uid_t uid);
29   int Commit(ThemeOperation operation, const loader::ThemeInfo& theme);
30
31  private:
32   std::string path_;
33 };
34
35 }  // namespace plugin
36 }  // namespace ttm
37
38 #endif  // THEME_PLUGIN_THEME_PARSER_H_