Fork Vasum on GitHub Official Vasum Wiki on Tizen.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
provision.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License version 2.1 as published by the Free Software Foundation.
7  *
8  * This library 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 GNU
11  * Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public
14  * License along with this library; if not, write to the Free Software
15  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16  */
17 
24 #ifndef LXCPP_COMMAND_PROVISION_HPP
25 #define LXCPP_COMMAND_PROVISION_HPP
26 
30 
31 #include <sys/types.h>
32 
33 namespace lxcpp {
34 
35 class Provisions final: Command {
36 public:
42  Provisions(ContainerConfig &config) : mConfig(config)
43  {
44  }
45 
46  void execute();
47  void revert();
48 
49 private:
51 };
52 
53 
54 class ProvisionFile final: Command {
55 public:
61  ProvisionFile(const provision::File &file);
62 
63  void execute();
64  void revert();
65 
66 private:
68 };
69 
70 class ProvisionMount final: Command {
71 public:
78 
79  void execute();
80  void revert();
81 
82 private:
84 };
85 
86 class ProvisionLink final: Command {
87 public:
93  ProvisionLink(const provision::Link &link);
94 
95  void execute();
96  void revert();
97 
98 private:
100 };
101 
102 } // namespace lxcpp
103 
104 #endif // LXCPP_COMMAND_PROVISION_HPP
void execute()
Definition: provision.cpp:73
Definition: provision.hpp:35
ProvisionFile(const provision::File &file)
Runs call in the container's context.
Definition: provision.cpp:67
Provisions(ContainerConfig &config)
Runs call in the container's context.
Definition: provision.hpp:42
ProvisionMount(const provision::Mount &mount)
Runs call in the container's context.
Definition: provision.cpp:117
Provision configuration items.
Definition: provision-config.hpp:43
void execute()
Definition: provision.cpp:38
void revert()
Definition: provision.cpp:127
void mount(const std::string &source, const std::string &target, const std::string &filesystemtype, unsigned long mountflags, const std::string &data)
Definition: filesystem.cpp:42
Definition: provision.hpp:54
Definition: provision-config.hpp:81
void execute()
Definition: provision.cpp:123
void revert()
Definition: provision.cpp:52
ContainerConfig & mConfig
Definition: provision.hpp:50
Definition: container-config.hpp:51
void revert()
Definition: provision.cpp:111
Command interface definition.
Provisioning configuration.
const provision::Mount & mMount
Definition: provision.hpp:83
Definition: command.hpp:29
const provision::File & mFile
Definition: provision.hpp:67
Definition: provision.hpp:70
A definition of a ContainerConfig struct.