#include <FUiWindow.h>
-namespace Tizen { namespace Shell
+namespace Tizen { namespace Shell
{
/**
*
* @since 2.1
* @return An error code
- * @param[in] instanceId The Id of LiveboxFrame.
* @param[in] size The new width and height
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
*/
- result Construct(const Tizen::Base::String& instanceId, const Tizen::Graphics::Dimension& size);
+ result Construct(const Tizen::Graphics::Dimension& size);
/**
* Initializes this instance of %LiveboxFrame with the specified parameter.
* @since 2.1
* @return An error code
* @param[in] layout The layout for both the portrait and landscape mode
- * @param[in] instanceId The Id of LiveboxFrame.
* @param[in] size The new width and height
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
*/
- result Construct(const Tizen::Ui::Layout& layout, const Tizen::Base::String& instanceId, const Tizen::Graphics::Dimension& size);
+ result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::Dimension& size);
protected:
//
#include <FUiWindow.h>
-namespace Tizen { namespace Shell
+namespace Tizen { namespace Shell
{
/**
*
* @since 2.1
* @return An error code
- * @param[in] instanceId The Id of LiveboxPopup.
* @param[in] size The new width and height
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
*/
- result Construct(const Tizen::Base::String& instanceId, const Tizen::Graphics::Dimension& size);
+ result Construct(const Tizen::Graphics::Dimension& size);
/**
* Initializes this instance of %LiveboxFrame with the specified parameter.
* @since 2.1
* @return An error code
* @param[in] layout The layout for both the portrait and landscape mode
- * @param[in] instanceId The Id of LiveboxPopup.
* @param[in] size The new width and height
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
*/
- result Construct(const Tizen::Ui::Layout& layout, const Tizen::Base::String& instanceId, const Tizen::Graphics::Dimension& size);
+ result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::Dimension& size);
protected:
//
}} //Tizen::Base
-namespace Tizen { namespace Shell
+namespace Tizen { namespace Shell
{
/**
* @since 2.1
* @return An error code
* @param[in] appId The AppId of the installed application
+ * @param[in] providerName The name of the Livebox provider
* @param[in] rect An instance of the Rectangle class @n
* This instance represents the x and y coordinates of the top-left corner @n
* of the created window along with its width and height. @n
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
*/
- result Construct(const Tizen::Base::String& appId, const Tizen::Graphics::Rectangle& rect);
+ result Construct(const Tizen::Base::String& appId, const Tizen::Base::String& providerName, const Tizen::Graphics::Rectangle& rect);
/**
* Initializes this instance of %LiveboxView with the specified parameter.
*
* @since 2.1
* @return An error code
- * @param[in] appId Livebox provider id to provide Livebox functionality
- * @param[in] position The new position
+ * @param[in] appId The AppId of the installed application
+ * @param[in] providerName The name of the Livebox provider
+ * @param[in] rect An instance of the Rectangle class @n
+ * This instance represents the x and y coordinates of the top-left corner @n
+ * of the created window along with its width and height. @n
* @param[in] userInfo Extra data to be delivered to Livebox provider
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG @c height is less than or equal to 0.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
+ * @exception E_INVALID_ARG A specified input parameter is invalid.
*/
- result Construct(const Tizen::Base::String& appId, const Tizen::Graphics::Rectangle& rect, const Tizen::Base::String& userInfo);
+ result Construct(const Tizen::Base::String& appId, const Tizen::Base::String& providerName, const Tizen::Graphics::Rectangle& rect, const Tizen::Base::String& userInfo);
protected:
//
BuildRequires: pkgconfig(appsvc)
BuildRequires: pkgconfig(pkgmgr)
BuildRequires: pkgconfig(minicontrol-provider)
-#BuildRequires: pkgconfig(x11)
-#BuildRequires: pkgconfig(xext)
-#BuildRequires: pkgconfig(glib-2.0)
-#BuildRequires: pkgconfig(ail)
-#BuildRequires: pkgconfig(provider)
-#BuildRequires: pkgconfig(livebox-viewer)
-#BuildRequires: pkgconfig(livebox-service)
-#BuildRequires: pkgconfig(shortcut)
-#BuildRequires: pkgconfig(osp-image-core)
-#BuildRequires: pkgconfig(osp-media)
-#BuildRequires: pkgconfig(osp-net)
-#BuildRequires: osp-image-core-internal-devel
+BuildRequires: pkgconfig(x11)
+BuildRequires: pkgconfig(xext)
+BuildRequires: pkgconfig(glib-2.0)
+BuildRequires: pkgconfig(ail)
+BuildRequires: pkgconfig(provider)
+BuildRequires: pkgconfig(livebox-viewer)
+BuildRequires: pkgconfig(livebox-service)
+BuildRequires: pkgconfig(shortcut)
+BuildRequires: pkgconfig(osp-image-core)
+BuildRequires: pkgconfig(osp-media)
+BuildRequires: pkgconfig(osp-net)
+BuildRequires: osp-image-core-internal-devel
BuildRequires: osp-appfw-internal-devel
BuildRequires: osp-uifw-internal-devel
-#BuildRequires: boost-devel
+BuildRequires: boost-devel
# runtime requires
Requires: chromium
/usr/include/dlog
/usr/include/dbus-1.0
/usr/include/dri2
- #/usr/include/libdrm
+ /usr/include/libdrm
/usr/include/notification
/usr/lib/dbus-1.0/include
/usr/include/e_dbus-1
/usr/include/pixman-1
/usr/include/system
/usr/include/vconf
- #/usr/include/shortcut
- #/usr/include/provider
- #/usr/include/livebox-service
- #/usr/include/livebox-viewer
- #/usr/include/osp/media
+ /usr/include/shortcut
+ /usr/include/provider
+ /usr/include/livebox-service
+ /usr/include/livebox-viewer
+ /usr/include/osp/media
)
SET (${this_target}_SOURCE_FILES
FShell_QuickPanelFrame.cpp
FShell_QuickPanelFrameImpl.cpp
FShell_QuickPanelFramePresenter.cpp
- #FShell_LiveboxProviderImpl.cpp
- #FShell_LiveboxProviderInfoImpl.cpp
- #FShell_LiveboxSizeInfoImpl.cpp
- #FShell_LiveboxManagerImpl.cpp
- #FShell_LiveboxManagerProxy.cpp
- #FShellLiveboxProvider.cpp
- #FShellLiveboxPopupProvider.cpp
- #FShellLiveboxProviderInfo.cpp
- #FShellLiveboxSizeInfo.cpp
- #FShellLiveboxManager.cpp
- #FShell_LiveboxManagerIpcMessage.cpp
- #FShell_LiveboxFrame.cpp
- #FShell_LiveboxFrameImpl.cpp
- #FShell_LiveboxFrameModel.cpp
- #FShell_LiveboxFramePresenter.cpp
- #FShell_LiveboxLayer.cpp
- #FShell_LiveboxPopup.cpp
- #FShell_LiveboxPopupImpl.cpp
- #FShell_LiveboxPopupModel.cpp
- #FShell_LiveboxPopupPresenter.cpp
- #FShell_LiveboxPopupView.cpp
- #FShell_LiveboxPopupViewEvent.cpp
- #FShell_LiveboxPopupViewPresenter.cpp
- #FShell_LiveboxView.cpp
- #FShell_LiveboxViewImpl.cpp
- #FShell_LiveboxViewManager.cpp
- #FShell_LiveboxViewModel.cpp
- #FShell_LiveboxViewPresenter.cpp
- #FShellLiveboxFrame.cpp
- #FShellLiveboxPopup.cpp
- #FShellLiveboxView.cpp
+ FShell_LiveboxProviderImpl.cpp
+ FShell_LiveboxProviderInfoImpl.cpp
+ FShell_LiveboxSizeInfoImpl.cpp
+ FShell_LiveboxManagerImpl.cpp
+ FShell_LiveboxManagerProxy.cpp
+ FShellLiveboxProvider.cpp
+ FShellLiveboxPopupProvider.cpp
+ FShellLiveboxProviderInfo.cpp
+ FShellLiveboxSizeInfo.cpp
+ FShellLiveboxManager.cpp
+ FShell_LiveboxManagerIpcMessage.cpp
+ FShell_LiveboxFrame.cpp
+ FShell_LiveboxFrameImpl.cpp
+ FShell_LiveboxFrameModel.cpp
+ FShell_LiveboxFramePresenter.cpp
+ FShell_LiveboxLayer.cpp
+ FShell_LiveboxPopup.cpp
+ FShell_LiveboxPopupImpl.cpp
+ FShell_LiveboxPopupModel.cpp
+ FShell_LiveboxPopupPresenter.cpp
+ FShell_LiveboxPopupView.cpp
+ FShell_LiveboxPopupViewEvent.cpp
+ FShell_LiveboxPopupViewPresenter.cpp
+ FShell_LiveboxView.cpp
+ FShell_LiveboxViewImpl.cpp
+ FShell_LiveboxViewManager.cpp
+ FShell_LiveboxViewModel.cpp
+ FShell_LiveboxViewPresenter.cpp
+ FShellLiveboxFrame.cpp
+ FShellLiveboxPopup.cpp
+ FShellLiveboxView.cpp
)
## Definitions
TARGET_LINK_LIBRARIES(${this_target} "-lchromium" )
TARGET_LINK_LIBRARIES(${this_target} "-L/usr/lib/osp -losp-appfw" )
TARGET_LINK_LIBRARIES(${this_target} "-L/usr/lib/osp -losp-uifw" )
-#TARGET_LINK_LIBRARIES(${this_target} "-L/usr/lib/osp -losp-image-core" )
+TARGET_LINK_LIBRARIES(${this_target} "-L/usr/lib/osp -losp-image-core" )
TARGET_LINK_LIBRARIES(${this_target} "-lcapi-appfw-application" )
TARGET_LINK_LIBRARIES(${this_target} "-lcapi-appfw-app-manager" )
TARGET_LINK_LIBRARIES(${this_target} "-lnotification" )
TARGET_LINK_LIBRARIES(${this_target} "-lecore_evas" )
TARGET_LINK_LIBRARIES(${this_target} "-lminicontrol-provider" )
#TARGET_LINK_LIBRARIES(${this_target} "-lcapi-system-runtime-info")
-#TARGET_LINK_LIBRARIES(${this_target} "-lX11" )
-#TARGET_LINK_LIBRARIES(${this_target} "-lXext" )
-#TARGET_LINK_LIBRARIES(${this_target} "-lecore_x" )
-#TARGET_LINK_LIBRARIES(${this_target} "-llivebox-viewer" )
-#TARGET_LINK_LIBRARIES(${this_target} "-llivebox-service" )
-#TARGET_LINK_LIBRARIES(${this_target} "-lprovider" )
-#TARGET_LINK_LIBRARIES(${this_target} "-lshortcut" )
-#TARGET_LINK_LIBRARIES(${this_target} "-lail" )
+TARGET_LINK_LIBRARIES(${this_target} "-lX11" )
+TARGET_LINK_LIBRARIES(${this_target} "-lXext" )
+TARGET_LINK_LIBRARIES(${this_target} "-lecore_x" )
+TARGET_LINK_LIBRARIES(${this_target} "-llivebox-viewer" )
+TARGET_LINK_LIBRARIES(${this_target} "-llivebox-service" )
+TARGET_LINK_LIBRARIES(${this_target} "-lprovider" )
+TARGET_LINK_LIBRARIES(${this_target} "-lshortcut" )
+TARGET_LINK_LIBRARIES(${this_target} "-lail" )
SET_TARGET_PROPERTIES(${this_target}
PROPERTIES
using namespace Tizen::Graphics;
using namespace Tizen::Ui;
-namespace Tizen { namespace Shell
+namespace Tizen { namespace Shell
{
LiveboxFrame::LiveboxFrame(void)
}
result
-LiveboxFrame::Construct(const String& instanceId, const Dimension& size)
+LiveboxFrame::Construct(const Dimension& size)
{
SysAssertf(_pControlImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
- SysLog(NID_APP, "000");
unique_ptr<_LiveboxFrameImpl> pImpl(_LiveboxFrameImpl::CreateLiveboxFrameImplN(*this, null, null));
result r = GetLastResult();
SysTryReturn(NID_UI_CTRL, pImpl, r, r, "[%s] Propagating.", GetErrorMessage(r));
- SysLog(NID_APP, "aaa");
_pControlImpl = pImpl.get();
- r = pImpl->Initialize(instanceId, size);
+ r = pImpl->Initialize(size);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- SysLog(NID_APP, "bbb");
pImpl.release();
}
result
-LiveboxFrame::Construct(const Layout& layout, const String& instanceId, const Dimension& size)
+LiveboxFrame::Construct(const Layout& layout, const Dimension& size)
{
SysAssertf(_pControlImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
_pControlImpl = pImpl.get();
- r = pImpl->Initialize(instanceId, size);
+ r = pImpl->Initialize(size);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
pImpl.release();
using namespace Tizen::Graphics;
using namespace Tizen::Ui;
-namespace Tizen { namespace Shell
+namespace Tizen { namespace Shell
{
LiveboxPopup::LiveboxPopup(void)
}
result
-LiveboxPopup::Construct(const String& instanceId, const Dimension& size)
+LiveboxPopup::Construct(const Dimension& size)
{
SysAssertf(_pControlImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
_pControlImpl = pImpl.get();
- r = pImpl->Initialize(instanceId, size);
+ r = pImpl->Initialize(size);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
pImpl.release();
}
result
-LiveboxPopup::Construct(const Layout& layout, const String& instanceId, const Dimension& size)
+LiveboxPopup::Construct(const Layout& layout, const Dimension& size)
{
SysAssertf(_pControlImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
_pControlImpl = pImpl.get();
- r = pImpl->Initialize(instanceId, size);
+ r = pImpl->Initialize(size);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
pImpl.release();
}
result
-LiveboxView::Construct(const String& appId, const Tizen::Graphics::Rectangle& rect)
+LiveboxView::Construct(const String& appId, const Tizen::Base::String& providerName, const Tizen::Graphics::Rectangle& rect)
{
- return Construct(appId, rect, L"default");
+ return Construct(appId, providerName, rect, L"default");
}
result
-LiveboxView::Construct(const String& appId, const Tizen::Graphics::Rectangle& rect, const String& userInfo)
+LiveboxView::Construct(const String& appId, const Tizen::Base::String& providerName, const Tizen::Graphics::Rectangle& rect, const String& userInfo)
{
SysAssertf(_pControlImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
_pControlImpl = pImpl.get();
- r = pImpl->Initialize(appId, rect, userInfo);
+ r = pImpl->Initialize(appId, providerName, rect, userInfo);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
pImpl.release();
using namespace Tizen::Ui;
using namespace Tizen::Ui::Animations;
-namespace Tizen { namespace Shell
+namespace Tizen { namespace Shell
{
_LiveboxFrame::_LiveboxFrame(void)
}
result
-_LiveboxFrame::Initialize(const String& instanceId, const Dimension& size)
+_LiveboxFrame::Initialize(const Dimension& size)
{
result r = E_SUCCESS;
_VisualElement* pVisualElement = null;
FloatRectangle fBounds(0.0f, 0.0f, static_cast<float>(bounds.width), static_cast<float>(bounds.height));
- r = __pLiveboxFramePresenter->Initialize(instanceId);
+ r = __pLiveboxFramePresenter->Initialize();
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- unique_ptr<_LiveboxLayer> pLayer(new (std::nothrow) _LiveboxLayer(instanceId, *this));
+ unique_ptr<_LiveboxLayer> pLayer(new (std::nothrow) _LiveboxLayer(*this));
SysTryReturn(NID_UI_CTRL, pLayer, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
pLayer->Construct();
return r;
}
+result
+_LiveboxFrame::SetProviderId(const String& providerId)
+{
+ __pLiveboxFramePresenter->SetProviderId(providerId);
+
+ result r = __pLiveboxLayer->SetProviderId(providerId);
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ return r;
+}
+
String
-_LiveboxFrame::GetLiveboxId(void) const
+_LiveboxFrame::GetProviderId(void) const
{
- return __pLiveboxFramePresenter->GetLiveboxId();
+ return __pLiveboxFramePresenter->GetProviderId();
}
result
class _RootVisualElement;
}}} // Tizen::Ui::Animations
-namespace Tizen { namespace Shell
+namespace Tizen { namespace Shell
{
class _LiveboxFramePresenter;
static _LiveboxFrame* CreateLiveboxFrameN(void);
virtual ~_LiveboxFrame(void);
- result Initialize(const Tizen::Base::String& instanceId, const Tizen::Graphics::Dimension& size);
- Tizen::Base::String GetLiveboxId(void) const;
+ result Initialize(const Tizen::Graphics::Dimension& size);
+ result SetProviderId(const Tizen::Base::String& providerId);
+ Tizen::Base::String GetProviderId(void) const;
protected:
_LiveboxFrame(void);
using namespace Tizen::Graphics;
using namespace Tizen::Ui;
-namespace Tizen { namespace Shell
+namespace Tizen { namespace Shell
{
const _LiveboxFrameImpl*
}
result
-_LiveboxFrameImpl::Initialize(const String& instanceId, const Dimension& size)
+_LiveboxFrameImpl::Initialize(const Dimension& size)
{
- result r = GetCore().Initialize(instanceId, size);
+ result r = GetCore().Initialize(size);
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ return r;
+}
+
+result
+_LiveboxFrameImpl::SetProviderId(const String& providerId)
+{
+ result r = GetCore().SetProviderId(providerId);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
return r;
class Layout;
}} // Tizen::Ui
-namespace Tizen { namespace Shell
+namespace Tizen { namespace Shell
{
class _LiveboxFrameImpl
virtual const _LiveboxFrame& GetCore(void) const;
virtual _LiveboxFrame& GetCore(void);
- result Initialize(const Tizen::Base::String& instanceId, const Tizen::Graphics::Dimension& size);
+ result Initialize(const Tizen::Graphics::Dimension& size);
+ result SetProviderId(const Tizen::Base::String& providerId);
protected:
_LiveboxFrameImpl(LiveboxFrame* pPublic, _LiveboxFrame* pCore, const Tizen::Ui::Layout* pPortraitLayout, const Tizen::Ui::Layout* pLandscapeLayout);
}
void
-_LiveboxFrameModel::SetinstanceId(const String& instanceId)
+_LiveboxFrameModel::SetProviderId(const String& providerId)
{
- __instanceId = instanceId;
+ __providerId = providerId;
}
String
-_LiveboxFrameModel::GetLiveboxId(void) const
+_LiveboxFrameModel::GetProviderId(void) const
{
- return __instanceId;
+ return __providerId;
}
}} // Tizen::Shell
virtual ~_LiveboxFrameModel(void);
public:
- void SetinstanceId(const Tizen::Base::String& instanceId);
- Tizen::Base::String GetLiveboxId(void) const;
+ void SetProviderId(const Tizen::Base::String& providerId);
+ Tizen::Base::String GetProviderId(void) const;
private:
_LiveboxFrameModel(const _LiveboxFrameModel& rhs);
_LiveboxFrameModel& operator =(const _LiveboxFrameModel& rhs);
private:
- Tizen::Base::String __instanceId;
+ Tizen::Base::String __providerId;
}; // _LiveboxFrameModel
}} // Tizen::Shell
}
result
-_LiveboxFramePresenter::Initialize(const String& instanceId)
+_LiveboxFramePresenter::Initialize(void)
{
result r = E_SUCCESS;
- __pLiveboxFrameModel->SetinstanceId(instanceId);
-
return r;
}
+void
+_LiveboxFramePresenter::SetProviderId(const String& providerId)
+{
+ __pLiveboxFrameModel->SetProviderId(providerId);
+}
+
String
-_LiveboxFramePresenter::GetLiveboxId(void) const
+_LiveboxFramePresenter::GetProviderId(void) const
{
- return __pLiveboxFrameModel->GetLiveboxId();
+ return __pLiveboxFrameModel->GetProviderId();
}
void
_LiveboxFramePresenter(const _LiveboxFrame& liveboxFrame);
virtual ~_LiveboxFramePresenter(void);
- result Initialize(const Tizen::Base::String& instanceId);
- Tizen::Base::String GetLiveboxId(void) const;
+ result Initialize(void);
+ void SetProviderId(const Tizen::Base::String& providerId);
+ Tizen::Base::String GetProviderId(void) const;
void Draw(void);
private:
#include "FShell_LiveboxLayer.h"
#include "FShell_LiveboxManagerImpl.h"
+using namespace std;
using namespace Tizen::Base;
using namespace Tizen::Graphics;
using namespace Tizen::Ui::Animations;
}
-namespace Tizen { namespace Shell {
+namespace Tizen { namespace Shell
+{
-_LiveboxLayer::_LiveboxLayer(const Tizen::Base::String& instanceId, const _Window& window)
+_LiveboxLayer::_LiveboxLayer(const _Window& window)
: __isReleased(false)
, __pEcoreEvas(null)
, __pEvasObject(null)
, __pWindow(&window)
+ , __providerId(L"")
, __pRenderBuffer(null)
, __bufferSize(0)
, __pixmapId(-1)
{
- __instanceId = instanceId;
}
_LiveboxLayer::~_LiveboxLayer(void)
{
- if (__pEvasObject)
- {
- evas_object_del(__pEvasObject);
- __pEvasObject = null;
- }
-
- if (__pEcoreEvas)
- {
- ecore_evas_free(__pEcoreEvas);
- __pEcoreEvas = null;
- }
-
__pWindow = null;
__pRenderBuffer = null;
__pixmapId = -1;
Rectangle bounds = __pWindow->GetBounds();
- __pEcoreEvas = ecore_evas_buffer_allocfunc_new(bounds.width, bounds.height, AllocRenderBuffer, FreeRenderBuffer, this);
- SysTryReturn(NID_UI_CTRL, __pEcoreEvas, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+ unique_ptr<Ecore_Evas, _EcoreEvasDeleter> pEcoreEvas(ecore_evas_buffer_allocfunc_new(bounds.width, bounds.height, AllocRenderBuffer, FreeRenderBuffer, this));
+ SysTryReturn(NID_UI_CTRL, pEcoreEvas, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
- ecore_evas_alpha_set(__pEcoreEvas, EINA_TRUE);
- ecore_evas_manual_render_set(__pEcoreEvas, EINA_FALSE);
- ecore_evas_resize(__pEcoreEvas, bounds.width, bounds.height);
-// ecore_evas_show(__pEcoreEvas);
- ecore_evas_activate(__pEcoreEvas);
+ ecore_evas_alpha_set(pEcoreEvas.get(), EINA_TRUE);
+ ecore_evas_manual_render_set(pEcoreEvas.get(), EINA_FALSE);
+ ecore_evas_resize(pEcoreEvas.get(), bounds.width, bounds.height);
+ ecore_evas_activate(pEcoreEvas.get());
- Evas* pEvas = ecore_evas_get(__pEcoreEvas);
- SysTryCatch(NID_UI_CTRL, pEvas, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+ Evas* pEvas = ecore_evas_get(pEcoreEvas.get());
+ SysTryReturn(NID_UI_CTRL, pEvas, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
evas_event_callback_add(pEvas, EVAS_CALLBACK_RENDER_FLUSH_POST, PostRender, this);
- __pEvasObject = evas_object_rectangle_add(pEvas);
- SysTryCatch(NID_UI_CTRL, __pEvasObject, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
- evas_object_resize(__pEvasObject, bounds.width, bounds.height);
- evas_object_color_set(__pEvasObject, 0, 0, 0, 255);
+ unique_ptr<Evas_Object, _EvasObjectDeleter> pEvasObject(evas_object_rectangle_add(pEvas));
+ SysTryReturn(NID_UI_CTRL, pEvasObject, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
- r = Initialize(__pEvasObject);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+ evas_object_resize(pEvasObject.get(), bounds.width, bounds.height);
+ evas_object_color_set(pEvasObject.get(), 0, 0, 0, 255);
- r = RegisterTouchEventListener();
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+ r = Initialize(pEvasObject.get());
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
- return r;
-
-CATCH:
- if (__pEvasObject)
- {
- evas_object_del(__pEvasObject);
- __pEvasObject = null;
- }
-
- if (__pEcoreEvas)
- {
- ecore_evas_free(__pEcoreEvas);
- __pEcoreEvas = null;
- }
+ __pEcoreEvas = move(pEcoreEvas);
+ __pEvasObject = move(pEvasObject);
return r;
}
return __pWindow;
}
+result
+_LiveboxLayer::SetProviderId(const String& providerId)
+{
+ __providerId = providerId;
+
+ __pixmapId = AcquirePixmap();\r
+ SysTryReturn(NID_UI_CTRL, __pixmapId != -1, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");\r
+\r
+ SysLog(NID_UI_CTRL, "pixmapId (%d)", __pixmapId);
+
+ result r = RegisterTouchEventListener();
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ return r;
+}
+
String
-_LiveboxLayer::GetLiveboxId(void) const
+_LiveboxLayer::GetProviderId(void) const
{
- return __instanceId;
+ return __providerId;
}
int
void
_LiveboxLayer::SetLayerBounds(const Rectangle& bounds)
{
- ecore_evas_resize(__pEcoreEvas, bounds.width, bounds.height);
+ ecore_evas_resize(__pEcoreEvas.get(), bounds.width, bounds.height);
FloatRectangle fBounds(static_cast<float>(bounds.x), static_cast<float>(bounds.y), static_cast<float>(bounds.width), static_cast<float>(bounds.height));
SetBounds(fBounds);
__pRenderBuffer = pBuffer;
- __pixmapId = AcquirePixmap();
- SysTryCatch(NID_UI_CTRL, __pixmapId != -1, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
-
- SysLog(NID_UI_CTRL, "buffer (0x%x) size (%d) pixmapId (%d)", pBuffer, __bufferSize, __pixmapId);
+ SysLog(NID_UI_CTRL, "buffer (0x%x) size (%d)", pBuffer, __bufferSize);
__isReleased = false;
return __pRenderBuffer;
-
-CATCH:
-
- if (__pRenderBuffer)
- {
- free(__pRenderBuffer);
- __pRenderBuffer = null;
- }
-
- return null;
}
void
result
_LiveboxLayer::RegisterTouchEventListener(void)
{
- result r = _LiveboxManagerImpl::GetInstance()->SetLiveboxTouchEventListener(__instanceId, *this);
+ result r = _LiveboxManagerImpl::GetInstance()->SetLiveboxTouchEventListener(__providerId, *this);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
return r;
int
_LiveboxLayer::AcquirePixmap(void)
{
+ SysTryReturn(NID_UI_CTRL, !__providerId.IsEmpty(), -1, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+
int pixmapId = -1;
const _Window* pWindow = GetWindow();
Rectangle bounds = pWindow->GetBounds();
- result r = _LiveboxManagerImpl::GetInstance()->RequestSharedMemoryId(__instanceId, bounds.width, bounds.height, pixmapId);
+ result r = _LiveboxManagerImpl::GetInstance()->RequestSharedMemoryId(__providerId, bounds.width, bounds.height, pixmapId);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, -1, r, "[%s] Propagating.", GetErrorMessage(r));
SysLog(NID_UI_CTRL, "pixmapId(%d) bounds(%d %d %d %d)", pixmapId, bounds.x, bounds.y, bounds.width, bounds.height);
result
_LiveboxLayer::Sync(const Tizen::Graphics::Rectangle& bounds)
{
- result r = _LiveboxManagerImpl::GetInstance()->RequestSyncSharedMemory(__instanceId, bounds.width, bounds.height);
+ SysTryReturn(NID_UI_CTRL, !__providerId.IsEmpty(), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+
+ result r = _LiveboxManagerImpl::GetInstance()->RequestSyncSharedMemory(__providerId, bounds.width, bounds.height);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
return r;
void
_LiveboxLayer::ReleasePixmap(void)
{
- _LiveboxManagerImpl::GetInstance()->RequestReleaseSharedMemory(__instanceId);
+ SysTryReturnVoidResult(NID_UI_CTRL, !__providerId.IsEmpty(), E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+
+ _LiveboxManagerImpl::GetInstance()->RequestReleaseSharedMemory(__providerId);
}
int
int xPos = bounds.width * x;
int yPos = bounds.height * y;
- Evas* pEvas = ecore_evas_get(__pEcoreEvas);
+ Evas* pEvas = ecore_evas_get(__pEcoreEvas.get());
SysTryReturn(NID_UI_CTRL, pEvas, 0, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
switch (eventType)
#ifndef _FSHELL_INTERNAL_LIVEBOX_LAYER_H_
#define _FSHELL_INTERNAL_LIVEBOX_LAYER_H_
+#include <unique_ptr.h>
#include <Ecore_Evas.h>
#include <FBaseString.h>
#include "FUiAnim_EflLayer.h"
class _Window;
}} // Tizen::Ui
-namespace Tizen { namespace Shell
+namespace Tizen { namespace Shell
{
/**
, public Tizen::Shell::_ILiveboxTouchEventListener
{
public:
- _LiveboxLayer(const Tizen::Base::String& instanceId, const Tizen::Ui::_Window& window);
+ _LiveboxLayer(const Tizen::Ui::_Window& window);
virtual ~_LiveboxLayer(void);
virtual result OnConstructed(void);
const Tizen::Ui::_Window* GetWindow(void) const;
- Tizen::Base::String GetLiveboxId(void) const;
+ result SetProviderId(const Tizen::Base::String& providerId);
+ Tizen::Base::String GetProviderId(void) const;
int GetPixmapId(void) const;
void SetLayerBounds(const Tizen::Graphics::Rectangle& bounds);
void* AllocCanvas(int size);
bool __isReleased;
private:
- Ecore_Evas* __pEcoreEvas;
- Evas_Object* __pEvasObject;
+ struct _EcoreEvasDeleter
+ {
+ void operator()(Ecore_Evas* pEcoreEvas)
+ {
+ ecore_evas_free(pEcoreEvas);
+ }
+ };
+
+ struct _EvasObjectDeleter
+ {
+ void operator()(Evas_Object* pEvasObject)
+ {
+ evas_object_del(pEvasObject);
+ }
+ };
+
+ std::unique_ptr<Ecore_Evas, _EcoreEvasDeleter> __pEcoreEvas;
+ std::unique_ptr<Evas_Object, _EvasObjectDeleter> __pEvasObject;
const Tizen::Ui::_Window* __pWindow;
- Tizen::Base::String __instanceId;
+ Tizen::Base::String __providerId;
void* __pRenderBuffer;
int __bufferSize;
int __pixmapId;
using namespace Tizen::Ui::Animations;
using namespace Tizen::Ui::Controls;
-namespace Tizen { namespace Shell
+namespace Tizen { namespace Shell
{
class _LiveboxPopupLayer
: public _LiveboxLayer
{
public:
- _LiveboxPopupLayer(const String& instanceId, const _Window& window);
+ _LiveboxPopupLayer(const _Window& window);
virtual ~_LiveboxPopupLayer(void);
private:
virtual void ReleasePixmap(void);
};
-_LiveboxPopupLayer::_LiveboxPopupLayer(const String& instanceId, const _Window& window)
- : _LiveboxLayer(instanceId, window)
+_LiveboxPopupLayer::_LiveboxPopupLayer(const _Window& window)
+ : _LiveboxLayer(window)
{
}
Rectangle bounds = pWindow->GetBounds();
- result r = _LiveboxManagerImpl::GetInstance()->RequestSharedMemoryIdForPD(GetLiveboxId(), bounds.width, bounds.height, pixmapId);
+ result r = _LiveboxManagerImpl::GetInstance()->RequestSharedMemoryIdForPD(GetProviderId(), bounds.width, bounds.height, pixmapId);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, -1, r, "[%s] Propagating.", GetErrorMessage(r));
SysLog(NID_UI_CTRL, "pixmapId(%d) bounds(%d %d %d %d)", pixmapId, bounds.x, bounds.y, bounds.width, bounds.height);
result
_LiveboxPopupLayer::Sync(const Tizen::Graphics::Rectangle& bounds)
{
- result r = _LiveboxManagerImpl::GetInstance()->RequestSyncSharedMemoryForPD(GetLiveboxId());
+ result r = _LiveboxManagerImpl::GetInstance()->RequestSyncSharedMemoryForPD(GetProviderId());
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
return r;
void
_LiveboxPopupLayer::ReleasePixmap(void)
{
- _LiveboxManagerImpl::GetInstance()->RequestReleaseSharedMemoryForPD(GetLiveboxId());
+ _LiveboxManagerImpl::GetInstance()->RequestReleaseSharedMemoryForPD(GetProviderId());
}
_LiveboxPopup::_LiveboxPopup(void)
}
result
-_LiveboxPopup::Initialize(const String& instanceId, const Tizen::Graphics::Dimension& size)
+_LiveboxPopup::Initialize(const Tizen::Graphics::Dimension& size)
{
result r = E_SUCCESS;
_VisualElement* pVisualElement = null;
FloatRectangle fBounds(0.0f, 0.0f, static_cast<float>(bounds.width), static_cast<float>(bounds.height));
- r = __pLiveboxPopupPresenter->Initialize(instanceId);
+ r = __pLiveboxPopupPresenter->Initialize();
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- unique_ptr<_LiveboxPopupLayer> pLayer(new (std::nothrow) _LiveboxPopupLayer(instanceId, *this));
+ unique_ptr<_LiveboxPopupLayer> pLayer(new (std::nothrow) _LiveboxPopupLayer(*this));
SysTryReturn(NID_UI_CTRL, pLayer, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
r = pLayer->Construct();
return r;
}
+result
+_LiveboxPopup::SetProviderId(const String& providerId)
+{
+ __pLiveboxPopupPresenter->SetProviderId(providerId);
+
+ result r = __pLiveboxPopupLayer->SetProviderId(providerId);
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ return r;
+}
+
String
-_LiveboxPopup::GetLiveboxId(void) const
+_LiveboxPopup::GetProviderId(void) const
{
- return __pLiveboxPopupPresenter->GetLiveboxId();
+ return __pLiveboxPopupPresenter->GetProviderId();
}
result
class _RootVisualElement;
}}} // Tizen::Ui::Animations
-namespace Tizen { namespace Shell
+namespace Tizen { namespace Shell
{
class _LiveboxPopupPresenter;
static _LiveboxPopup* CreateLiveboxPopupN(void);
virtual ~_LiveboxPopup(void);
- result Initialize(const Tizen::Base::String& instanceId, const Tizen::Graphics::Dimension& size);
- Tizen::Base::String GetLiveboxId(void) const;
+ result Initialize(const Tizen::Graphics::Dimension& size);
+ result SetProviderId(const Tizen::Base::String& providerId);
+ Tizen::Base::String GetProviderId(void) const;
protected:
_LiveboxPopup(void);
using namespace Tizen::Graphics;
using namespace Tizen::Ui;
-namespace Tizen { namespace Shell
+namespace Tizen { namespace Shell
{
const _LiveboxPopupImpl*
}
result
-_LiveboxPopupImpl::Initialize(const String& instanceId, const Dimension& size)
+_LiveboxPopupImpl::Initialize(const Dimension& size)
{
- result r = GetCore().Initialize(instanceId, size);
+ result r = GetCore().Initialize(size);
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ return r;
+}
+
+result
+_LiveboxPopupImpl::SetProviderId(const String& providerId)
+{
+ result r = GetCore().SetProviderId(providerId);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
return r;
#include "FUi_WindowImpl.h"
#include "FShell_LiveboxPopup.h"
-namespace Tizen { namespace Shell
+namespace Tizen { namespace Shell
{
class _LiveboxPopupImpl
virtual const _LiveboxPopup& GetCore(void) const;
virtual _LiveboxPopup& GetCore(void);
- result Initialize(const Tizen::Base::String& instanceId, const Tizen::Graphics::Dimension& size);
+ result Initialize(const Tizen::Graphics::Dimension& size);
+ result SetProviderId(const Tizen::Base::String& providerId);
protected:
_LiveboxPopupImpl(LiveboxPopup* pPublic, _LiveboxPopup* pCore, const Tizen::Ui::Layout* pPortraitLayout, const Tizen::Ui::Layout* pLandscapeLayout);
}
void
-_LiveboxPopupModel::SetinstanceId(const String& instanceId)
+_LiveboxPopupModel::SetProviderId(const String& providerId)
{
- __instanceId = instanceId;
+ __providerId = providerId;
}
String
-_LiveboxPopupModel::GetLiveboxId(void) const
+_LiveboxPopupModel::GetProviderId(void) const
{
- return __instanceId;
+ return __providerId;
}
}} // Tizen::Shell
virtual ~_LiveboxPopupModel(void);
public:
- void SetinstanceId(const Tizen::Base::String& instanceId);
- Tizen::Base::String GetLiveboxId(void) const;
+ void SetProviderId(const Tizen::Base::String& providerId);
+ Tizen::Base::String GetProviderId(void) const;
private:
_LiveboxPopupModel(const _LiveboxPopupModel& rhs);
_LiveboxPopupModel& operator =(const _LiveboxPopupModel& rhs);
private:
- Tizen::Base::String __instanceId;
+ Tizen::Base::String __providerId;
}; // _LiveboxPopupModel
}} // Tizen::Shell
namespace Tizen { namespace Shell
{
-_LiveboxPopupPresenter::_LiveboxPopupPresenter(const _LiveboxPopup& liveBoxTray)
+_LiveboxPopupPresenter::_LiveboxPopupPresenter(const _LiveboxPopup& liveBoxPopup)
: __pLiveboxPopup(null)
, __pLiveboxPopupModel(new (std::nothrow) _LiveboxPopupModel)
{
- __pLiveboxPopup = const_cast <_LiveboxPopup*>(&liveBoxTray);
+ __pLiveboxPopup = const_cast <_LiveboxPopup*>(&liveBoxPopup);
}
_LiveboxPopupPresenter::~_LiveboxPopupPresenter(void)
}
result
-_LiveboxPopupPresenter::Initialize(const Tizen::Base::String& instanceId)
+_LiveboxPopupPresenter::Initialize(void)
{
result r = E_SUCCESS;
- __pLiveboxPopupModel->SetinstanceId(instanceId);
-
return r;
}
+void
+_LiveboxPopupPresenter::SetProviderId(const String& providerId)
+{
+ __pLiveboxPopupModel->SetProviderId(providerId);
+}
+
String
-_LiveboxPopupPresenter::GetLiveboxId(void) const
+_LiveboxPopupPresenter::GetProviderId(void) const
{
- return __pLiveboxPopupModel->GetLiveboxId();
+ return __pLiveboxPopupModel->GetProviderId();
}
void
class _LiveboxPopupPresenter
{
public:
- _LiveboxPopupPresenter(const _LiveboxPopup& liveBoxTray);
+ _LiveboxPopupPresenter(const _LiveboxPopup& liveBoxPopup);
virtual ~_LiveboxPopupPresenter(void);
- result Initialize(const Tizen::Base::String& instanceId);
- Tizen::Base::String GetLiveboxId(void) const;
+ result Initialize(void);
+ void SetProviderId(const Tizen::Base::String& providerId);
+ Tizen::Base::String GetProviderId(void) const;
void Draw(void);
private:
}
result
-_LiveboxView::Initialize(const String& appId, const Tizen::Graphics::Rectangle& rect, const String& userInfo)
+_LiveboxView::Initialize(const String& appId, const Tizen::Base::String& providerName, const Tizen::Graphics::Rectangle& rect, const String& userInfo)
{
result r = SetBounds(rect);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- r = __pLiveboxViewPresenter->Initialize(appId);
+ r = __pLiveboxViewPresenter->Initialize(appId, providerName);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
int width = 0;
static _LiveboxView* CreateLiveboxViewN(void);
virtual ~_LiveboxView(void);
- result Initialize(const Tizen::Base::String& appId, const Tizen::Graphics::Rectangle& rect, const Tizen::Base::String& userInfo);
+ result Initialize(const Tizen::Base::String& appId, const Tizen::Base::String& providerName, const Tizen::Graphics::Rectangle& rect, const Tizen::Base::String& userInfo);
_LiveboxPopupView* GetLiveboxPopup(void) const;
Tizen::Base::String GetAppId(void) const;
Tizen::Graphics::Bitmap* GetAppIconBitmap(void) const;
}
result
-_LiveboxViewImpl::Initialize(const String& appId, const Tizen::Graphics::Rectangle& rect, const String& userInfo)
+_LiveboxViewImpl::Initialize(const String& appId, const Tizen::Base::String& providerName, const Tizen::Graphics::Rectangle& rect, const String& userInfo)
{
- result r = GetCore().Initialize(appId, rect, userInfo);
+ result r = GetCore().Initialize(appId, providerName, rect, userInfo);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
return r;
virtual const _LiveboxView& GetCore(void) const;
virtual _LiveboxView& GetCore(void);
- result Initialize(const Tizen::Base::String& appId, const Tizen::Graphics::Rectangle& rect, const Tizen::Base::String& userInfo);
+ result Initialize(const Tizen::Base::String& appId, const Tizen::Base::String& providerName, const Tizen::Graphics::Rectangle& rect, const Tizen::Base::String& userInfo);
protected:
_LiveboxViewImpl(LiveboxView* pPublic, _LiveboxView* pCore);
* @brief This is the implementation file for the _LiveboxViewModel class.
*/
-#include <unique_ptr.h>
-#include <ail.h>
-#include <FAppPkgPackageInfo.h>
#include <FBaseSysLog.h>
-#include <FAppPkg_PackageManagerImpl.h>
+#include <FShellLiveboxManager.h>
+#include <FShellLiveboxProviderInfo.h>
#include <FBase_StringConverter.h>
#include "FShell_LiveboxViewModel.h"
using namespace std;
using namespace Tizen::App;
-using namespace Tizen::App::Package;
using namespace Tizen::Base;
-namespace Tizen { namespace Shell
+namespace Tizen { namespace Shell
{
_LiveboxViewModel::_LiveboxViewModel(void)
}
void
-_LiveboxViewModel::SetAppId(const Tizen::Base::String& appId)
+_LiveboxViewModel::Initialize(const Tizen::Base::String& appId, const Tizen::Base::String& providerName)
{
- result r = E_SUCCESS;
__appId = appId;
+ __providerName = providerName;
- PackageInfo* pPackageInfo = null;
+ LiveboxProviderInfo* pLiveboxProviderInfo = LiveboxManager::GetInstance()->GetLiveboxProviderInfoN(appId, providerName);
+ SysTryReturnVoidResult(NID_UI_CTRL, pLiveboxProviderInfo, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
- pPackageInfo = _PackageManagerImpl::GetInstance()->GetPackageInfoN(appId);
- SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+ __pLiveboxProviderInfo.reset(pLiveboxProviderInfo);
- __appName = pPackageInfo->GetDisplayName();
- //__appIconPath = packageInfo.GetAppIconPath();
+ SysLog(NID_UI_CTRL, "(%ls %ls)", __appId.GetPointer(), __providerName.GetPointer());
- delete pPackageInfo;
-
- if (__appIconPath.IsEmpty() || __appIconPath.Equals(L"(null)", false))
- {
- ail_appinfo_h ai;
- unique_ptr<char[]> pAppId(_StringConverter::CopyToCharArrayN(appId));
- SysTryReturnVoidResult(NID_UI_CTRL, pAppId, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
-
- ail_error_e ret = ail_get_appinfo(pAppId.get(), &ai);
- result r = E_SYSTEM;
- SysTryReturnVoidResult(NID_UI_CTRL, ret == AIL_ERROR_OK, r, "[%s] Propagating.", GetErrorMessage(r));
-
- char* pAppIconPath = null;
- ret = ail_appinfo_get_str(ai, AIL_PROP_ICON_STR, &pAppIconPath);
-
- if (pAppIconPath)
- {
- String iconPath(pAppIconPath);
- __appIconPath = iconPath;
- }
-
- ail_destroy_appinfo(ai);
- }
-
- SysLog(NID_UI_CTRL, "(%ls %s)", __appName.GetPointer(), __appIconPath.GetPointer());
+ SysLog(NID_UI_CTRL, "ProviderInfo(%ls %ls %ls %ls)", __pLiveboxProviderInfo->GetName().GetPointer(), __pLiveboxProviderInfo->GetDisplayName().GetPointer(),
+ __pLiveboxProviderInfo->GetIconPath().GetPointer(), __pLiveboxProviderInfo->GetCongiturationAppControlAppId().GetPointer());
}
String
return __appId;
}
+Tizen::Base::String
+_LiveboxViewModel::GetProviderName(void) const
+{
+ return __providerName;
+}
+
String
-_LiveboxViewModel::GetAppName(void) const
+_LiveboxViewModel::GetDisplayName(void) const
{
- return __appName;
+ return __pLiveboxProviderInfo->GetDisplayName();
}
String
_LiveboxViewModel::GetAppIconPath(void) const
{
- return __appIconPath;
+ return __pLiveboxProviderInfo->GetIconPath();
}
}} // Tizen::Shell
#ifndef _FSHELL_INTERNAL_LIVEBOX_VIEW_MODEL_H_
#define _FSHELL_INTERNAL_LIVEBOX_VIEW_MODEL_H_
+#include <unique_ptr.h>
#include <FBaseObject.h>
#include <FBaseString.h>
-namespace Tizen { namespace Shell
+namespace Tizen { namespace Shell
{
+class LiveboxProviderInfo;
+
class _LiveboxViewModel
: public Tizen::Base::Object
{
virtual ~_LiveboxViewModel(void);
public:
- void SetAppId(const Tizen::Base::String& appId);
+ void Initialize(const Tizen::Base::String& appId, const Tizen::Base::String& providerName);
Tizen::Base::String GetAppId(void) const;
- Tizen::Base::String GetAppName(void) const;
+ Tizen::Base::String GetProviderName(void) const;
+ Tizen::Base::String GetDisplayName(void) const;
Tizen::Base::String GetAppIconPath(void) const;
private:
private:
Tizen::Base::String __appId;
- Tizen::Base::String __appName;
- Tizen::Base::String __appIconPath;
+ Tizen::Base::String __providerName;
+ std::unique_ptr<LiveboxProviderInfo> __pLiveboxProviderInfo;
}; // _LiveboxViewModel
}} // Tizen::Shell
using namespace Tizen::Graphics;
using namespace Tizen::Graphics::_Text;
-namespace Tizen { namespace Shell
+namespace Tizen { namespace Shell
{
_LiveboxViewPresenter::_LiveboxViewPresenter(const _LiveboxView& liveBoxView)
}
result
-_LiveboxViewPresenter::Initialize(const String& appId)
+_LiveboxViewPresenter::Initialize(const String& appId, const Tizen::Base::String& providerName)
{
const int FONT_SIZE = 10;
- __pLiveboxViewModel->SetAppId(appId);
+ __pLiveboxViewModel->Initialize(appId, providerName);
unique_ptr<Font> pFont(new (std::nothrow) Font());
SysTryReturn(NID_UI_CTRL, pFont, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
}
String
-_LiveboxViewPresenter::GetAppName(void) const
+_LiveboxViewPresenter::GetDisplayName(void) const
{
- return __pLiveboxViewModel->GetAppName();
+ return __pLiveboxViewModel->GetDisplayName();
}
String
{
const int TEXT_OBJECT_HEIGHT = 20;
- String appName(GetAppName());
+ String appName(GetDisplayName());
unique_ptr<TextSimple> pSimpleText(new (std::nothrow) TextSimple(appName.GetPointer(), appName.GetLength()));
SysTryReturnVoidResult(NID_UI_CTRL, pSimpleText, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
class TextObject;
}}} // Tizen::Graphics::_Text
-namespace Tizen { namespace Shell
+namespace Tizen { namespace Shell
{
class _LiveboxView;
_LiveboxViewPresenter(const _LiveboxView& liveBoxView);
virtual ~_LiveboxViewPresenter(void);
- result Initialize(const Tizen::Base::String& appId);
+ result Initialize(const Tizen::Base::String& appId, const Tizen::Base::String& providerName);
Tizen::Base::String GetAppId(void) const;
- Tizen::Base::String GetAppName(void) const;
+ Tizen::Base::String GetDisplayName(void) const;
Tizen::Base::String GetAppIconPath(void) const;
void Draw(void);