Modifed Frame/Popup
authorHeeJu Kang <mobum.kang@samsung.com>
Fri, 21 Dec 2012 03:05:12 +0000 (12:05 +0900)
committerHeeJu Kang <mobum.kang@samsung.com>
Fri, 21 Dec 2012 03:05:12 +0000 (12:05 +0900)
Change-Id: I82ee26ab1cea59307485d1c1beabf0550e0988de
Signed-off-by: HeeJu Kang <mobum.kang@samsung.com>
34 files changed:
inc/FShellLiveboxFrame.h
inc/FShellLiveboxPopup.h
inc/FShellLiveboxView.h
packaging/osp-shell.spec
src/CMakeLists.txt
src/FShellLiveboxFrame.cpp
src/FShellLiveboxPopup.cpp
src/FShellLiveboxView.cpp
src/FShell_LiveboxFrame.cpp
src/FShell_LiveboxFrame.h
src/FShell_LiveboxFrameImpl.cpp
src/FShell_LiveboxFrameImpl.h
src/FShell_LiveboxFrameModel.cpp
src/FShell_LiveboxFrameModel.h
src/FShell_LiveboxFramePresenter.cpp
src/FShell_LiveboxFramePresenter.h
src/FShell_LiveboxLayer.cpp
src/FShell_LiveboxLayer.h
src/FShell_LiveboxPopup.cpp
src/FShell_LiveboxPopup.h
src/FShell_LiveboxPopupImpl.cpp
src/FShell_LiveboxPopupImpl.h
src/FShell_LiveboxPopupModel.cpp
src/FShell_LiveboxPopupModel.h
src/FShell_LiveboxPopupPresenter.cpp
src/FShell_LiveboxPopupPresenter.h
src/FShell_LiveboxView.cpp
src/FShell_LiveboxView.h
src/FShell_LiveboxViewImpl.cpp
src/FShell_LiveboxViewImpl.h
src/FShell_LiveboxViewModel.cpp
src/FShell_LiveboxViewModel.h
src/FShell_LiveboxViewPresenter.cpp
src/FShell_LiveboxViewPresenter.h

index 5cdf6aa..e2ad434 100644 (file)
@@ -21,7 +21,7 @@
 
 #include <FUiWindow.h>
 
-namespace Tizen { namespace Shell 
+namespace Tizen { namespace Shell
 {
 
 /**
@@ -56,12 +56,11 @@ public:
         *
         * @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.
@@ -69,12 +68,11 @@ public:
         * @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:
        //
index e172b24..d50cf4b 100644 (file)
@@ -21,7 +21,7 @@
 
 #include <FUiWindow.h>
 
-namespace Tizen { namespace Shell 
+namespace Tizen { namespace Shell
 {
 
 /**
@@ -56,12 +56,11 @@ public:
         *
         * @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.
@@ -69,12 +68,11 @@ public:
         * @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:
        //
index 27917d8..dc390f6 100644 (file)
@@ -27,7 +27,7 @@ class String;
 }} //Tizen::Base
 
 
-namespace Tizen { namespace Shell 
+namespace Tizen { namespace Shell
 {
 
 /**
@@ -63,27 +63,30 @@ public:
         * @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:
        //
index 4a4bd6e..ce4c07c 100644 (file)
@@ -20,21 +20,21 @@ BuildRequires:  pkgconfig(notification)
 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
index 8ea5c2c..463dfd1 100644 (file)
@@ -23,7 +23,7 @@ INCLUDE_DIRECTORIES(
     /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
@@ -46,11 +46,11 @@ INCLUDE_DIRECTORIES(
     /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
@@ -58,37 +58,37 @@ 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
@@ -110,7 +110,7 @@ SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined -
 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" )
@@ -120,14 +120,14 @@ TARGET_LINK_LIBRARIES(${this_target} "-leina" )
 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 
index e4f5a0e..9c26bf0 100644 (file)
@@ -29,7 +29,7 @@ using namespace Tizen::Base;
 using namespace Tizen::Graphics;
 using namespace Tizen::Ui;
 
-namespace Tizen { namespace Shell 
+namespace Tizen { namespace Shell
 {
 
 LiveboxFrame::LiveboxFrame(void)
@@ -41,20 +41,17 @@ 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();
 
@@ -62,7 +59,7 @@ LiveboxFrame::Construct(const String& instanceId, const Dimension& size)
 }
 
 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.");
 
@@ -72,7 +69,7 @@ LiveboxFrame::Construct(const Layout& layout, const String& instanceId, const Di
 
        _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();
index 7c4935c..e7121ed 100644 (file)
@@ -29,7 +29,7 @@ using namespace Tizen::Base;
 using namespace Tizen::Graphics;
 using namespace Tizen::Ui;
 
-namespace Tizen { namespace Shell 
+namespace Tizen { namespace Shell
 {
 
 LiveboxPopup::LiveboxPopup(void)
@@ -41,7 +41,7 @@ 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.");
 
@@ -51,7 +51,7 @@ LiveboxPopup::Construct(const String& instanceId, const Dimension& size)
 
        _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();
@@ -60,7 +60,7 @@ LiveboxPopup::Construct(const String& instanceId, const Dimension& size)
 }
 
 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.");
 
@@ -70,7 +70,7 @@ LiveboxPopup::Construct(const Layout& layout, const String& instanceId, const Di
 
        _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();
index e443f67..a12f5c6 100644 (file)
@@ -42,13 +42,13 @@ LiveboxView::~LiveboxView(void)
 }
 
 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.");
 
@@ -58,7 +58,7 @@ LiveboxView::Construct(const String& appId, const Tizen::Graphics::Rectangle& re
 
        _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();
index 0fbdfa0..e9f317f 100644 (file)
@@ -37,7 +37,7 @@ using namespace Tizen::Graphics;
 using namespace Tizen::Ui;
 using namespace Tizen::Ui::Animations;
 
-namespace Tizen { namespace Shell 
+namespace Tizen { namespace Shell
 {
 
 _LiveboxFrame::_LiveboxFrame(void)
@@ -88,7 +88,7 @@ _LiveboxFrame::CreateLiveboxFrameN(void)
 }
 
 result
-_LiveboxFrame::Initialize(const String& instanceId, const Dimension& size)
+_LiveboxFrame::Initialize(const Dimension& size)
 {
        result r = E_SUCCESS;
        _VisualElement* pVisualElement = null;
@@ -115,10 +115,10 @@ _LiveboxFrame::Initialize(const String& instanceId, const Dimension& size)
 
        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();
@@ -150,10 +150,21 @@ _LiveboxFrame::Initialize(const String& instanceId, const Dimension& size)
        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
index 41d016e..17a69c6 100644 (file)
@@ -37,7 +37,7 @@ namespace Tizen { namespace Ui { namespace Animations
 class _RootVisualElement;
 }}} // Tizen::Ui::Animations
 
-namespace Tizen { namespace Shell 
+namespace Tizen { namespace Shell
 {
 
 class _LiveboxFramePresenter;
@@ -55,8 +55,9 @@ public:
        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);
index b5a9324..167a056 100644 (file)
@@ -25,7 +25,7 @@ using namespace Tizen::Base;
 using namespace Tizen::Graphics;
 using namespace Tizen::Ui;
 
-namespace Tizen { namespace Shell 
+namespace Tizen { namespace Shell
 {
 
 const _LiveboxFrameImpl*
@@ -98,9 +98,18 @@ _LiveboxFrameImpl::GetCore(void)
 }
 
 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;
index 62c7ed5..a619c53 100644 (file)
@@ -26,7 +26,7 @@ namespace Tizen { namespace Ui
 class Layout;
 }} // Tizen::Ui
 
-namespace Tizen { namespace Shell 
+namespace Tizen { namespace Shell
 {
 
 class _LiveboxFrameImpl
@@ -45,7 +45,8 @@ public:
        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);
index 3da3977..f52a500 100644 (file)
@@ -36,15 +36,15 @@ _LiveboxFrameModel::~_LiveboxFrameModel(void)
 }
 
 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
index 1561e18..6ec90c3 100644 (file)
@@ -37,15 +37,15 @@ public:
        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
index 7ca7cc7..9febcaf 100644 (file)
@@ -44,19 +44,23 @@ _LiveboxFramePresenter::~_LiveboxFramePresenter(void)
 }
 
 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
index 5c1f9ee..0189578 100644 (file)
@@ -37,8 +37,9 @@ public:
        _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:
index 374033a..320bb9b 100644 (file)
@@ -35,6 +35,7 @@
 #include "FShell_LiveboxLayer.h"
 #include "FShell_LiveboxManagerImpl.h"
 
+using namespace std;
 using namespace Tizen::Base;
 using namespace Tizen::Graphics;
 using namespace Tizen::Ui::Animations;
@@ -74,34 +75,23 @@ PostRender(void* pData, Evas* pEvas, void* pEventInfo)
 
 }
 
-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;
@@ -114,45 +104,30 @@ _LiveboxLayer::OnConstructed(void)
 
        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;
 }
@@ -163,10 +138,26 @@ _LiveboxLayer::GetWindow(void) const
        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
@@ -178,7 +169,7 @@ _LiveboxLayer::GetPixmapId(void) const
 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);
@@ -195,24 +186,11 @@ _LiveboxLayer::AllocCanvas(int size)
 
        __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
@@ -345,7 +323,7 @@ _LiveboxLayer::OnRendered(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;
@@ -354,6 +332,8 @@ _LiveboxLayer::RegisterTouchEventListener(void)
 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();
@@ -361,7 +341,7 @@ _LiveboxLayer::AcquirePixmap(void)
 
        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);
@@ -372,7 +352,9 @@ _LiveboxLayer::AcquirePixmap(void)
 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;
@@ -381,7 +363,9 @@ _LiveboxLayer::Sync(const Tizen::Graphics::Rectangle& bounds)
 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
@@ -392,7 +376,7 @@ _LiveboxLayer::OnTouchEventRecevied(int eventType, double timestamp, double x, d
        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)
index b7fef4e..e87dc24 100644 (file)
@@ -23,6 +23,7 @@
 #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"
@@ -33,7 +34,7 @@ namespace Tizen { namespace Ui
 class _Window;
 }} // Tizen::Ui
 
-namespace Tizen { namespace Shell 
+namespace Tizen { namespace Shell
 {
 
 /**
@@ -46,13 +47,14 @@ class _LiveboxLayer
        , 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);
@@ -75,10 +77,26 @@ protected:
        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;
index 9e2acba..56b8ccf 100644 (file)
@@ -43,14 +43,14 @@ using namespace Tizen::Ui;
 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:
@@ -63,8 +63,8 @@ private:
        virtual void ReleasePixmap(void);
 };
 
-_LiveboxPopupLayer::_LiveboxPopupLayer(const String& instanceId, const _Window& window)
-       : _LiveboxLayer(instanceId, window)
+_LiveboxPopupLayer::_LiveboxPopupLayer(const _Window& window)
+       : _LiveboxLayer(window)
 {
 }
 
@@ -96,7 +96,7 @@ _LiveboxPopupLayer::AcquirePixmap(void)
 
        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);
@@ -107,7 +107,7 @@ _LiveboxPopupLayer::AcquirePixmap(void)
 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;
@@ -116,7 +116,7 @@ _LiveboxPopupLayer::Sync(const Tizen::Graphics::Rectangle& bounds)
 void
 _LiveboxPopupLayer::ReleasePixmap(void)
 {
-       _LiveboxManagerImpl::GetInstance()->RequestReleaseSharedMemoryForPD(GetLiveboxId());
+       _LiveboxManagerImpl::GetInstance()->RequestReleaseSharedMemoryForPD(GetProviderId());
 }
 
 _LiveboxPopup::_LiveboxPopup(void)
@@ -167,7 +167,7 @@ _LiveboxPopup::CreateLiveboxPopupN(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;
@@ -180,10 +180,10 @@ _LiveboxPopup::Initialize(const String& instanceId, const Tizen::Graphics::Dimen
 
        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();
@@ -216,10 +216,21 @@ _LiveboxPopup::Initialize(const String& instanceId, const Tizen::Graphics::Dimen
        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
index 23e55de..3f43810 100644 (file)
@@ -37,7 +37,7 @@ namespace Tizen { namespace Ui { namespace Animations
 class _RootVisualElement;
 }}} // Tizen::Ui::Animations
 
-namespace Tizen { namespace Shell 
+namespace Tizen { namespace Shell
 {
 
 class _LiveboxPopupPresenter;
@@ -55,8 +55,9 @@ public:
        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);
index fc9e530..af66f7f 100644 (file)
@@ -25,7 +25,7 @@ using namespace Tizen::Base;
 using namespace Tizen::Graphics;
 using namespace Tizen::Ui;
 
-namespace Tizen { namespace Shell 
+namespace Tizen { namespace Shell
 {
 
 const _LiveboxPopupImpl*
@@ -98,9 +98,18 @@ _LiveboxPopupImpl::GetCore(void)
 }
 
 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;
index 5f370bf..dae1b7a 100644 (file)
@@ -21,7 +21,7 @@
 #include "FUi_WindowImpl.h"
 #include "FShell_LiveboxPopup.h"
 
-namespace Tizen { namespace Shell 
+namespace Tizen { namespace Shell
 {
 
 class _LiveboxPopupImpl
@@ -40,7 +40,8 @@ public:
        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);
index b87436e..01e57fb 100644 (file)
@@ -36,15 +36,15 @@ _LiveboxPopupModel::~_LiveboxPopupModel(void)
 }
 
 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
index cfe597c..43f0d29 100644 (file)
@@ -37,15 +37,15 @@ public:
        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
index 012226f..237fdce 100644 (file)
@@ -31,11 +31,11 @@ using namespace Tizen::Graphics;
 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)
@@ -44,19 +44,23 @@ _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
index 4bf8f3e..45e9569 100644 (file)
@@ -35,11 +35,12 @@ class _LiveboxPopupModel;
 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:
index 734c13f..5069dfb 100644 (file)
@@ -96,12 +96,12 @@ _LiveboxView::CreateLiveboxViewN(void)
 }
 
 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;
index 0ca975e..d030206 100644 (file)
@@ -65,7 +65,7 @@ public:
        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;
index a49a2b0..b3e5ac2 100644 (file)
@@ -99,9 +99,9 @@ _LiveboxViewImpl::GetCore(void)
 }
 
 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;
index 911a400..fff3497 100644 (file)
@@ -50,7 +50,7 @@ public:
        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);
index 45ad077..e159158 100644 (file)
  * @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)
@@ -44,44 +41,20 @@ _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
@@ -90,16 +63,22 @@ _LiveboxViewModel::GetAppId(void) const
        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
index 84b85c9..271453d 100644 (file)
 #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
 {
@@ -37,9 +40,10 @@ public:
        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:
@@ -48,8 +52,8 @@ 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
index c18c22a..b062a19 100644 (file)
@@ -36,7 +36,7 @@ using namespace Tizen::Base;
 using namespace Tizen::Graphics;
 using namespace Tizen::Graphics::_Text;
 
-namespace Tizen { namespace Shell 
+namespace Tizen { namespace Shell
 {
 
 _LiveboxViewPresenter::_LiveboxViewPresenter(const _LiveboxView& liveBoxView)
@@ -52,11 +52,11 @@ _LiveboxViewPresenter::~_LiveboxViewPresenter(void)
 }
 
 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.");
@@ -86,9 +86,9 @@ _LiveboxViewPresenter::GetAppId(void) const
 }
 
 String
-_LiveboxViewPresenter::GetAppName(void) const
+_LiveboxViewPresenter::GetDisplayName(void) const
 {
-       return __pLiveboxViewModel->GetAppName();
+       return __pLiveboxViewModel->GetDisplayName();
 }
 
 String
@@ -149,7 +149,7 @@ _LiveboxViewPresenter::DrawText(Canvas& canvas)
 {
        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.");
index 646417d..d0db1ad 100644 (file)
@@ -36,7 +36,7 @@ namespace Tizen { namespace Graphics { namespace _Text
 class TextObject;
 }}} // Tizen::Graphics::_Text
 
-namespace Tizen { namespace Shell 
+namespace Tizen { namespace Shell
 {
 
 class _LiveboxView;
@@ -48,9 +48,9 @@ public:
        _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);