14e00e97a56152a804d721b063a8dc9c0d14b314
[iec.git] / src / type3_AndroidCloud / anbox-master / src / anbox / utils / environment_file.h
1 /*
2  * Copyright (C) 2017 Simon Fels <morphis@gravedo.de>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License as published by
6  * the Free Software Foundation; version 3.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11  * GNU Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
15  *
16  */
17
18 #ifndef ANBOX_UTILS_ENVIRONMENT_FILE_H_
19 #define ANBOX_UTILS_ENVIRONMENT_FILE_H_
20
21 #include <map>
22 #include <string>
23 #include <boost/filesystem.hpp>
24
25 namespace anbox {
26 namespace utils {
27 class EnvironmentFile {
28  public:
29   EnvironmentFile(const boost::filesystem::path &path);
30   ~EnvironmentFile() = default;
31
32   std::string value(const std::string &key, const std::string &default_value = "") const;
33
34  private:
35   std::map<std::string, std::string> data_;
36 };
37 } // namespace utils
38 } // namespace anbox
39
40 #endif