23 #ifndef OPENCDMPLUGIN_H
24 #define OPENCDMPLUGIN_H
26 #include <IDobbyPlugin.h>
27 #include <PluginBase.h>
29 #include <sys/types.h>
30 #include <netinet/in.h>
53 const std::shared_ptr<IDobbyUtils> &utils);
57 std::string
name()
const final;
63 const std::shared_ptr<IDobbyStartState>& startupState,
64 const std::string& rootfsPath,
65 const Json::Value& jsonData)
final;
68 const std::string mName;
69 const std::shared_ptr<IDobbyUtils> mUtilities;
70 const gid_t mAppsGroupId;
76 bool enableTmpOCDMDir(
const std::shared_ptr<IDobbyStartState>& startupState)
const;
A wrapper around a std::string, used to add some type definition to to an id and also to sanity check...
Definition: ContainerId.h:41
Dobby plugin for creating the necessary OCDM buffers.
Definition: OpenCDMPlugin.h:50
std::string ocdmBufferAdminPath(unsigned bufferNum) const
Returns the file path of the OCDM admin Buffer corresponding to the specified buffer number.
Definition: OpenCDMPlugin.cpp:228
std::string ocdmBufferPath(unsigned bufferNum) const
Returns the file path of the OCDMBuffer corresponding to the specified buffer number.
Definition: OpenCDMPlugin.cpp:216
bool postConstruction(const ContainerId &id, const std::shared_ptr< IDobbyStartState > &startupState, const std::string &rootfsPath, const Json::Value &jsonData) final
Creates the required temp files for WPE browser to launch and decrypt content. The files are created ...
Definition: OpenCDMPlugin.cpp:116
unsigned hookHints() const final
Indicates which hook points we want and whether to run the asynchronously or synchronously with the o...
Definition: OpenCDMPlugin.cpp:90
bool writeFileIfNotExists(const std::string &filePath) const
Checks if the specified file exists then creates a blank file with permissions 0760 it if it doesn't ...
Definition: OpenCDMPlugin.cpp:241
bool enableTmpOCDMDir(const std::shared_ptr< IDobbyStartState > &startupState) const
Ensures the /tmp/OCDM directory exists and has permissions so accessible by apps but not (directory) ...
Definition: OpenCDMPlugin.cpp:180
std::string name() const final
Boilerplate that just returns the name of the hook.
Definition: OpenCDMPlugin.cpp:78
Basic object that provides the default overrides for a plugin.
Definition: PluginBase.h:38