#include <dpl/assert.h>
#include <wrt_plugin_export.h>
#include <Commons/Exception.h>
-#include "WrtWrapper.h"
-#include "WrtCameraManager.h"
+#include "WrtAccess.h"
#include <ace-client/ace_client.h>
+#include <dpl/singleton_impl.h>
+
+IMPLEMENT_SINGLETON(WrtDeviceApis::Commons::WrtAccess)
namespace WrtDeviceApis {
namespace Commons {
}
};
-WrtWrapper::WrtWrapper(int widgetId,
- const engine_interface_t* interface) :
- m_widgetId(widgetId)
+WrtAccess::WrtAccess()
+{
+ DPL::Log::LogSystemSingleton::Instance().SetTag("WRT_PLUGINS");
+}
+
+WrtAccess::~WrtAccess()
{
- m_wrt = interface;
+}
- if (!interface) {
- LogError("Pointer to interface is NULL");
+void WrtAccess::initialize(int widgetId)
+{
+ LogDebug("initialize");
+
+ if (widgetId < 0)
+ {
+ LogDebug("Invalid widget id");
+ Throw(Exception);
}
- m_cameraManager = IWrtCameraManagerPtr(
- new WrtCameraManager(widgetId, interface));
+ m_widgetId = widgetId;
}
-WrtWrapper::~WrtWrapper()
+void WrtAccess::deinitialize(int widgetId)
{
- LogDebug("entered");
+ LogDebug("deinitialize");
}
-int WrtWrapper::getWidgetId() const
+int WrtAccess::getWidgetId() const
{
- LogDebug("entered");
return m_widgetId;
}
-bool WrtWrapper::checkAccess(const AceFunction& aceFunction) const
+bool WrtAccess::checkAccessControl(const AceFunction& aceFunction) const
{
size_t deviceCount = aceFunction.deviceCapabilities.size();
Instance().checkFunctionCall(aceRequest);
}
-IWrtCameraManagerPtr WrtWrapper::getCameraManagerInterface() const
-{
- return m_cameraManager;
-}
-
}
} // WrtDeviceApisCommon