2 * Copyright (C) 2015 Samsung Electronics Co., Ltd All Rights Reserved
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.
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.
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
20 * @author Maciej Karpiuk (m.karpiuk2@samsung.com)
21 * @brief Add new provisioned file/dir/link/mount command
24 #ifndef LXCPP_COMMAND_PROVISION_HPP
25 #define LXCPP_COMMAND_PROVISION_HPP
27 #include "lxcpp/commands/command.hpp"
28 #include "lxcpp/container-config.hpp"
29 #include "lxcpp/provision-config.hpp"
31 #include <sys/types.h>
35 class Provisions final: Command {
38 * Runs call in the container's context
40 * Add/remove all file/fifo/dir/mount/link provisions to/from the container
42 Provisions(ContainerConfig &config) : mConfig(config)
50 ContainerConfig& mConfig;
54 class ProvisionFile final: Command {
57 * Runs call in the container's context
59 * Add/remove new file/fifo/dir provision to/from the container
61 ProvisionFile(ContainerConfig &config, const provision::File &file) :
62 mConfig(config), mFile(file)
70 ContainerConfig& mConfig;
71 const provision::File& mFile;
74 class ProvisionMount final: Command {
77 * Runs call in the container's context
79 * Add/remove new mount provision to/from the container
81 ProvisionMount(ContainerConfig &config, const provision::Mount &mount) :
82 mConfig(config), mMount(mount)
90 ContainerConfig& mConfig;
91 const provision::Mount& mMount;
94 class ProvisionLink final: Command {
97 * Runs call in the container's context
99 * Add/remove link provision to/from the container
101 ProvisionLink(ContainerConfig &config, const provision::Link &link) :
102 mConfig(config), mLink(link)
110 ContainerConfig& mConfig;
111 const provision::Link& mLink;
116 #endif // LXCPP_COMMAND_PROVISION_HPP