23 #ifndef DOBBYCONTAINER_H
24 #define DOBBYCONTAINER_H
26 #include <sys/types.h>
68 const std::shared_ptr<const DobbyConfig>& _config,
69 const std::shared_ptr<const DobbyRootfs>& _rootfs);
72 const std::shared_ptr<const DobbyConfig>& _config,
73 const std::shared_ptr<const DobbyRootfs>& _rootfs,
74 const std::shared_ptr<const DobbyRdkPluginManager>& _rdkPluginManager);
80 const int32_t descriptor;
81 const std::shared_ptr<const DobbyBundle> bundle;
82 const std::shared_ptr<const DobbyConfig> config;
83 const std::shared_ptr<const DobbyRootfs> rootfs;
84 const std::shared_ptr<const DobbyRdkPluginManager> rdkPluginManager;
89 enum class State { Starting, Running, Stopping, Paused, Hibernating, Hibernated, Awakening, Unknown } state;
90 std::string customConfigFilePath;
93 void setRestartOnCrash(
const std::list<int>& files);
94 void clearRestartOnCrash();
96 bool shouldRestart(
int statusCode);
97 const std::list<int>& files()
const;
100 bool mRestartOnCrash;
101 std::list<int> mFiles;
103 unsigned mRestartCount;
104 std::chrono::time_point<std::chrono::steady_clock> mLastRestartAttempt;
107 static std::mutex mIdsLock;
108 static std::bitset<1024> mUsedIds;
Simple class that just creates a subdir in the bundles directory.
Definition: DobbyBundle.h:46
Interface that configuration file parser classes have to implement.
Definition: DobbyConfig.h:66
Wrapper object used to store container resources.
Definition: DobbyContainer.h:59
static void freeDescriptor(int32_t cd)
Frees a descriptor created with allocDescriptor.
Definition: DobbyContainer.cpp:88
static int32_t allocDescriptor()
Alloc a unique descriptor from the pool.
Definition: DobbyContainer.cpp:49
The main object which starts / stops / manages the containers.
Definition: DobbyManager.h:77
Class that manages all the RDK plugin hook libraries.
Definition: DobbyRdkPluginManager.h:48
Creates a directory populated with rootfs based on the supplied container config.
Definition: DobbyRootfs.h:57
Interface for all character streams used in the daemon.
Definition: DobbyStream.h:41