Fork Vasum on GitHub Official Vasum Wiki on Tizen.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
stop.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_COMMANDS_STOP_HPP
25 #define LXCPP_COMMANDS_STOP_HPP
26 
29 
30 #include "cargo-ipc/client.hpp"
31 
32 #include <sys/types.h>
33 #include <memory>
34 
35 
36 namespace lxcpp {
37 
38 
39 class Stop final: public Command {
40 public:
46  Stop(std::shared_ptr<ContainerConfig>& config,
47  std::shared_ptr<cargo::ipc::Client>& client);
48  ~Stop();
49 
50  void execute();
51 
52 private:
53  std::shared_ptr<ContainerConfig> mConfig;
54  std::shared_ptr<cargo::ipc::Client> mClient;
55 };
56 
57 
58 } // namespace lxcpp
59 
60 
61 #endif // LXCPP_COMMANDS_STOP_HPP
Stop(std::shared_ptr< ContainerConfig > &config, std::shared_ptr< cargo::ipc::Client > &client)
Stops the container.
Definition: stop.cpp:34
std::shared_ptr< ContainerConfig > mConfig
Definition: stop.hpp:53
~Stop()
Definition: stop.cpp:41
Command interface definition.
void execute()
Definition: stop.cpp:45
std::shared_ptr< cargo::ipc::Client > mClient
Definition: stop.hpp:54
Definition: command.hpp:29
Definition: stop.hpp:39
A definition of a ContainerConfig struct.