Dobby  3.0
Dobby “Docker based Thingy” is a tool for managing and running OCI containers using crun
LocalTimePlugin.h
1 /*
2 * If not stated otherwise in this file or this component's LICENSE file the
3 * following copyright and licenses apply:
4 *
5 * Copyright 2020 Sky UK
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 */
19 
20 #ifndef LOCALTIMEPLUGIN_H
21 #define LOCALTIMEPLUGIN_H
22 
23 #include <RdkPluginBase.h>
24 
33 {
34 public:
35  LocalTimePlugin(std::shared_ptr<rt_dobby_schema> &containerConfig,
36  const std::shared_ptr<DobbyRdkPluginUtils> &utils,
37  const std::string &rootfsPath);
38 
39 public:
40  inline std::string name() const override
41  {
42  return mName;
43  };
44 
45  unsigned hookHints() const override;
46 
47 public:
48  bool postInstallation() override;
49  bool preCreation() override;
50 
51 public:
52  std::vector<std::string> getDependencies() const override;
53 
54 private:
55  const std::string mName;
56  const std::string mRootfsPath;
57  std::shared_ptr<rt_dobby_schema> mContainerConfig;
58  const std::shared_ptr<DobbyRdkPluginUtils> mUtils;
59 };
60 
61 #endif // !defined(LOCALTIMEPLUGIN_H)
Dobby LocalTime plugin.
Definition: LocalTimePlugin.h:33
bool postInstallation() override
postInstallation OCI hook.
Definition: LocalTimePlugin.cpp:57
std::vector< std::string > getDependencies() const override
Should return the names of the plugins this plugin depends on.
Definition: LocalTimePlugin.cpp:163
unsigned hookHints() const override
Should return a bitfield of the hook points implemented by the plugin.
Definition: LocalTimePlugin.cpp:42
std::string name() const override
Should return the name of the plugin.
Definition: LocalTimePlugin.h:40
bool preCreation() override
postInstallation OCI hook.
Definition: LocalTimePlugin.cpp:116
Basic object that provides the default overrides for a plugin.
Definition: RdkPluginBase.h:34