change class name '_Livebox -> _LiveboxContext'
authorjungmin76.park <jungmin76.park@samsung.com>
Fri, 1 Feb 2013 06:05:07 +0000 (15:05 +0900)
committerjungmin76.park <jungmin76.park@samsung.com>
Fri, 1 Feb 2013 12:38:07 +0000 (21:38 +0900)
Change-Id: Ic14dca71bd7bf98e8c48810de27261a6f3642260
Signed-off-by: jungmin76.park <jungmin76.park@samsung.com>
15 files changed:
CMakeLists.txt
inc/FShell_LiveboxContext.h [moved from inc/FShell_Livebox.h with 55% similarity]
inc/FShell_LiveboxContextBase.h [moved from inc/FShell_LiveboxBase.h with 58% similarity]
inc/FShell_LiveboxManagerService.h
inc/FShell_LiveboxManagerStub.h
inc/FShell_LiveboxPopup.h [deleted file]
inc/FShell_LiveboxPopupContext.h [new file with mode: 0644]
inc/OspLiveboxService.h
src/FShell_LiveboxContext.cpp [moved from src/FShell_Livebox.cpp with 74% similarity]
src/FShell_LiveboxContextBase.cpp [moved from src/FShell_LiveboxBase.cpp with 86% similarity]
src/FShell_LiveboxManagerService.cpp
src/FShell_LiveboxManagerStub.cpp
src/FShell_LiveboxPopupContext.cpp [moved from src/FShell_LiveboxPopup.cpp with 68% similarity]
src/OspLiveboxService.cpp
src/OspLiveboxServiceEntry.cpp

index 7449ac4..3355a21 100644 (file)
@@ -26,11 +26,11 @@ INCLUDE_DIRECTORIES (
 SET (${this_target}_SOURCE_FILES
        src/OspLiveboxService.cpp
        src/OspLiveboxServiceEntry.cpp
-       src/FShell_Livebox.cpp
-       src/FShell_LiveboxBase.cpp
+       src/FShell_LiveboxContext.cpp
+       src/FShell_LiveboxContextBase.cpp
        src/FShell_LiveboxManagerService.cpp
        src/FShell_LiveboxManagerStub.cpp
-       src/FShell_LiveboxPopup.cpp
+       src/FShell_LiveboxPopupContext.cpp
        )
 
 ## SET EXTRA COMPILER FLAGS
similarity index 55%
rename from inc/FShell_Livebox.h
rename to inc/FShell_LiveboxContext.h
index ec90989..bd9f32a 100644 (file)
@@ -1,24 +1,29 @@
 //
 // Open Service Platform
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
-// All rights reserved.
 //
-// This software contains confidential and proprietary information
-// of Samsung Electronics Co., Ltd.
-// The user of this software agrees not to disclose, disseminate or copy such
-// Confidential Information and shall use the software only in accordance with
-// the terms of the license agreement the user entered into with Samsung.
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
 //
 
 /**
- * @file       FShell_Livebox.h
- * @brief      This is the header file for the _Livebox class.
+ * @file       FShell_LiveboxContext.h
+ * @brief      This is the header file for the _LiveboxContext class.
  *
- * This header file contains the declarations of the _Livebox class.
+ * This header file contains the declarations of the _LiveboxContext class.
  */
 
-#ifndef FShell_Livebox_H_
-#define FShell_Livebox_H_
+#ifndef _FSHELL_INTERNAL_LIVEBOX_CONTEXT_H_
+#define _FSHELL_INTERNAL_LIVEBOX_CONTEXT_H_
 
 #include <provider.h>
 #include <provider_buffer.h>
@@ -28,7 +33,7 @@
 #include <FBaseObject.h>
 #include <FBaseColArrayList.h>
 
-#include "FShell_LiveboxBase.h"
+#include "FShell_LiveboxContextBase.h"
 
 
 #define MAX_PACKAGENAME  512
 
 namespace Tizen { namespace Shell  { namespace App
 {
-class _LiveboxPopup;
+class _LiveboxPopupContext;
 
-class _Livebox
-        : public _LiveboxBase
+class _LiveboxContext
+        : public _LiveboxContextBase
          ,public Tizen::Base::Runtime::ITimerEventListener
 {
 public:
-       _Livebox(const Tizen::Base::String& name, const Tizen::Base::String& appId, const Tizen::Base::String& instanceId,
+       _LiveboxContext(const Tizen::Base::String& name, const Tizen::Base::String& appId, const Tizen::Base::String& instanceId,
                                                int width, int height, int period, int priority);
-       virtual ~_Livebox();
+       virtual ~_LiveboxContext();
        void OnAdded(void);
        void OnUpdate(const Tizen::Base::String& argument);
        void OnResize(int width, int height);
@@ -57,7 +62,7 @@ public:
 
        result RequestUpdateRemote(int width, int height);
 
-       _LiveboxPopup* GetLiveboxPopup() const;
+       _LiveboxPopupContext* GetLiveboxPopup() const;
        virtual result SendTouchEvent(buffer_event event, double timestamp, double x, double y);
 
        void RestartLifeDurationTimer();
@@ -73,7 +78,7 @@ private:
        virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);
 
 private:
-       _LiveboxPopup* __pLiveboxPopup;
+       _LiveboxPopupContext* __pLiveboxPopup;
        Tizen::Base::Runtime::Timer __lifeDurationTimer;
        Tizen::Base::Runtime::Timer __UpdateTimer;
        int __UpdateMillis;
@@ -84,4 +89,4 @@ private:
 } } } // Tizen::Shell::App {
 
 
-#endif /* FShell_Livebox_H_ */
+#endif // _FSHELL_INTERNAL_LIVEBOX_CONTEXT_H_
similarity index 58%
rename from inc/FShell_LiveboxBase.h
rename to inc/FShell_LiveboxContextBase.h
index 976aedc..2968b58 100644 (file)
@@ -1,12 +1,29 @@
-/*
- * FShell_LiveboxBase.h
+//
+// Open Service Platform
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file       FShell_LiveboxContextBase.h
+ * @brief      This is the header file for the _LiveboxContextBase class.
  *
- *  Created on: Oct 20, 2012
- *      Author: jungmin76park
+ * This header file contains the declarations of the _LiveboxContextBase class.
  */
 
-#ifndef _FSHL_LIVEBOXBASE_H_
-#define _FSHL_LIVEBOXBASE_H_
+#ifndef _FSHELL_INTERNAL_LIVEBOX_CONTEXT_BASE_H_
+#define _FSHELL_INTERNAL_LIVEBOX_CONTEXT_BASE_H_
 
 #include <provider.h>
 
@@ -21,12 +38,12 @@ typedef struct _bundle_t bundle;//TODO move code to osp-appfw
 namespace Tizen { namespace Shell  { namespace App
 {
 
-class _LiveboxBase:
+class _LiveboxContextBase:
        public Tizen::Base::Object
 {
 public:
-       _LiveboxBase(target_type type, const Tizen::Base::String& userInfo, const Tizen::Base::String& providerId, const Tizen::Base::String& instanceId, int width, int height, int priority);
-       virtual ~_LiveboxBase();
+       _LiveboxContextBase(target_type type, const Tizen::Base::String& userInfo, const Tizen::Base::String& providerId, const Tizen::Base::String& instanceId, int width, int height, int priority);
+       virtual ~_LiveboxContextBase();
 
        virtual void OnPopupCreated(int width, int height) = 0;
        virtual void OnPopupDestoyed(void) = 0;
@@ -75,4 +92,4 @@ public:
 } /* namespace App */
 } /* namespace Livebox */
 } /* namespace Samsung */
-#endif /* _FSHL_LIVEBOXBASE_H_ */
+#endif // _FSHELL_INTERNAL_LIVEBOX_CONTEXT_BASE_H_
index 05a5cd2..f47721d 100644 (file)
@@ -1,13 +1,18 @@
 //
 // Open Service Platform
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
-// All rights reserved.
 //
-// This software contains confidential and proprietary information
-// of Samsung Electronics Co., Ltd.
-// The user of this software agrees not to disclose, disseminate or copy such
-// Confidential Information and shall use the software only in accordance with
-// the terms of the license agreement the user entered into with Samsung.
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
 //
 
 /**
  * This header file contains the declarations of the %LiveboxManagerService class.
  */
 
-#ifndef FShell_LiveboxMANAGERSERVICE_H_
-#define FShell_LiveboxMANAGERSERVICE_H_
+#ifndef _FSHELL_INTERNAL_LIVEBOX_MANAGER_SERVICE_H_
+#define _FSHELL_INTERNAL_LIVEBOX_MANAGER_SERVICE_H_
 
 #include <FBaseObject.h>
 #include <FBaseString.h>
 #include <FBaseRtTimer.h>
-//#include <FApp_IAppManagerEventListener.h>
-#include <FShell_Livebox.h>
-//#include <FBaseColHashMapT.h>
 #include <FBaseColArrayListT.h>
+
+#include "FShell_LiveboxContext.h"
 #include "FShell_LiveboxManagerStub.h"
 
 namespace Tizen { namespace Shell  { namespace App {
@@ -34,12 +38,11 @@ namespace Tizen { namespace Shell  { namespace App {
 
 class LiveboxManagerService
        :public Tizen::Shell::App::_LiveboxManagerStub
-//      ,public Tizen::App::_IAppManagerEventListener
         ,public Tizen::Base::Runtime::ITimerEventListener
 {
 public:
        static LiveboxManagerService* GetInstance(void);
-       result AddLivebox(_Livebox* pLivebox);
+       result AddLivebox(_LiveboxContext* pLivebox);
        result RemoveLivebox(const char* pPackageName, const char* pId, bool free);
 
 private:
@@ -75,9 +78,6 @@ private:
        LiveboxManagerService();
        virtual ~LiveboxManagerService();
 
-//     virtual void OnApplicationLaunched(const Tizen::App::AppId& appId, Tizen::App::_AppType type);
-//     virtual void OnApplicationTerminated(const Tizen::App::AppId& appId, Tizen::App::_AppType type);
-
        virtual void OnIpcClientConnected(const Tizen::Io::_IpcServer& server, int clientId);
        virtual void OnIpcClientDisconnected(const Tizen::Io::_IpcServer&server, int clientId);
 
@@ -87,7 +87,7 @@ private:
 
        void StartPingTimer();
        virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);
-       _Livebox* Find(const Tizen::App::AppId& appId, const Tizen::Base::String& instanceId) const;
+       _LiveboxContext* Find(const Tizen::App::AppId& appId, const Tizen::Base::String& instanceId) const;
 
 
        class _TaskHandlerThread
@@ -100,11 +100,11 @@ private:
        };
 
 private:
-       Tizen::Base::Collection::ArrayListT<_Livebox*> __liveboxes;
+       Tizen::Base::Collection::ArrayListT<_LiveboxContext*> __liveboxContextList;
        Tizen::Base::Runtime::Timer __pingTimer;
        _TaskHandlerThread      __handlerThread;
 };
 
 } } } // Tizen::Shell::App {
 
-#endif /* FShell_LiveboxMANAGERSERVICE_H_ */
+#endif // _FSHELL_INTERNAL_LIVEBOX_MANAGER_SERVICE_H_
index 6a54d54..b4d8770 100644 (file)
@@ -1,24 +1,29 @@
 //
 // Open Service Platform
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
-// All rights reserved.
 //
-// This software contains confidential and proprietary information
-// of Samsung Electronics Co., Ltd.
-// The user of this software agrees not to disclose, disseminate or copy such
-// Confidential Information and shall use the software only in accordance with
-// the terms of the license agreement the user entered into with Samsung.
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
 //
 
 /**
- * @file       FAppAppManager.h
- * @brief      This is the header file for the %AppManager class.
+ * @file       FShell_LiveboxManagerStub.h
+ * @brief      This is the header file for the %_LiveboxManagerStub class.
  *
- * This header file contains the declarations of the %AppManager class.
+ * This header file contains the declarations of the %_LiveboxManagerStub class.
  */
 
-#ifndef _FAPP_INTERNAL_APP_MANAGER_STUB_H_
-#define _FAPP_INTERNAL_APP_MANAGER_STUB_H_
+#ifndef _FSHELL_INTERNAL_LIVEBOX_MANAGER_STUB_H_
+#define _FSHELL_INTERNAL_LIVEBOX_MANAGER_STUB_H_
 
 #include <FBaseObject.h>
 #include <FBaseString.h>
@@ -91,4 +96,4 @@ protected:
 
 }}}
 
-#endif//_FAPP_INTERNAL_APP_MANAGER_STUB_H_
+#endif//_FSHELL_INTERNAL_LIVEBOX_MANAGER_STUB_H_
diff --git a/inc/FShell_LiveboxPopup.h b/inc/FShell_LiveboxPopup.h
deleted file mode 100644 (file)
index 03f791a..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * FShell_LiveboxPopup.h
- *
- *  Created on: Oct 19, 2012
- *      Author: jungmin76park
- */
-
-#ifndef _FSHL_LiveboxPopup_H_
-#define _FSHL_LiveboxPopup_H_
-
-#include "FShell_LiveboxBase.h"
-
-namespace Tizen { namespace Shell { namespace App
-{
-
-class _LiveboxPopup
-        :public Tizen::Shell::App::_LiveboxBase
-{
-public:
-       _LiveboxPopup(const Tizen::Base::String& userInfo, const Tizen::Base::String& appId, const Tizen::Base::String& instanceId, int width, int height, int priority);
-       virtual ~_LiveboxPopup();
-
-       // event handler
-       void OnPopupCreated(int width, int height);
-       void OnPopupDestoyed(void);
-
-       // request to app
-       result SendPopupCreateRequest(int width, int height);
-       result SendPopupDestroyRequest();
-       virtual result SendTouchEvent(buffer_event event, double timestamp, double x, double y);
-
-       result RequestUpdateRemote();
-};
-
-
-} /* namespace App */
-} /* namespace Livebox */
-} /* namespace Samsung */
-#endif /* _FSHL_LiveboxPopup_H_ */
diff --git a/inc/FShell_LiveboxPopupContext.h b/inc/FShell_LiveboxPopupContext.h
new file mode 100644 (file)
index 0000000..8b72e61
--- /dev/null
@@ -0,0 +1,56 @@
+//
+// Open Service Platform
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file       FShell_LiveboxPopupContext.h
+ * @brief      This is the header file for the %_LiveboxPopupContext class.
+ *
+ * This header file contains the declarations of the %_LiveboxPopupContext class.
+ */
+
+#ifndef _FSHELL_INTERNAL_LIVEBOX_POPUP_CONTEXT_H_
+#define _FSHELL_INTERNAL_LIVEBOX_POPUP_CONTEXT_H_
+
+#include "FShell_LiveboxContextBase.h"
+
+namespace Tizen { namespace Shell { namespace App
+{
+
+class _LiveboxPopupContext
+        :public Tizen::Shell::App::_LiveboxContextBase
+{
+public:
+       _LiveboxPopupContext(const Tizen::Base::String& userInfo, const Tizen::Base::String& appId, const Tizen::Base::String& instanceId, int width, int height, int priority);
+       virtual ~_LiveboxPopupContext();
+
+       // event handler
+       void OnPopupCreated(int width, int height);
+       void OnPopupDestoyed(void);
+
+       // request to app
+       result SendPopupCreateRequest(int width, int height);
+       result SendPopupDestroyRequest();
+       virtual result SendTouchEvent(buffer_event event, double timestamp, double x, double y);
+
+       result RequestUpdateRemote();
+};
+
+
+} /* namespace App */
+} /* namespace Livebox */
+} /* namespace Samsung */
+#endif // _FSHELL_INTERNAL_LIVEBOX_POPUP_CONTEXT_H_
index 695afb7..6bc93eb 100644 (file)
  * This header file contains the declarations of the OspLiveboxService class.
  */
 
-#ifndef _OSPLIVEBOXSERVICE_H_
-#define _OSPLIVEBOXSERVICE_H_
+#ifndef _OSP_LIVEBOX_SERVICE_H_
+#define _OSP_LIVEBOX_SERVICE_H_
 
 #include <FApp.h>
 #include <FBase.h>
 #include <FSystem.h>
-//#include <FUi.h>
 
 /**
  * [OspLiveboxService] ServiceApp must inherit from ServiceApp class
  * which provides basic features necessary to define an ServiceApp.
  */
 class OspLiveboxService
-//     : public Tizen::App::ServiceApp
        : public Tizen::App::ServiceApp
 {
 public:
similarity index 74%
rename from src/FShell_Livebox.cpp
rename to src/FShell_LiveboxContext.cpp
index 3d92247..5178dd7 100644 (file)
@@ -1,18 +1,23 @@
 //
 // Open Service Platform
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
-// All rights reserved.
 //
-// This software contains confidential and proprietary information
-// of Samsung Electronics Co., Ltd.
-// The user of this software agrees not to disclose, disseminate or copy such
-// Confidential Information and shall use the software only in accordance with
-// the terms of the license agreement the user entered into with Samsung.
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
 //
 
 /**
- * @file       FShell_Livebox.cpp
- * @brief      This is the implementation for the Livebox class.
+ * @file       FShell_LiveboxContext.cpp
+ * @brief      This is the implementation for the _LiveboxContext class.
  */
 
 #include <stdlib.h>
@@ -27,9 +32,9 @@
 #include <FApp_AppControlManager.h>
 
 #include "FShell_LiveboxManagerService.h"
-#include "FShell_LiveboxPopup.h"
-#include "FShell_LiveboxBase.h"
-#include "FShell_Livebox.h"
+#include "FShell_LiveboxPopupContext.h"
+#include "FShell_LiveboxContextBase.h"
+#include "FShell_LiveboxContext.h"
 
 
 namespace Tizen { namespace Shell  { namespace App
@@ -56,8 +61,8 @@ const String ARG_KEY_Y = L"_Y";
 
 const int LIVE_DURATION_MSEC= 30000;//30sec
 
-_Livebox::_Livebox(const String& info, const String& providerId, const String& instanceId, int width, int height, int period, int priority)
-:_LiveboxBase(TYPE_LB, info, providerId, instanceId, width, height, priority)
+_LiveboxContext::_LiveboxContext(const String& info, const String& providerId, const String& instanceId, int width, int height, int period, int priority)
+:_LiveboxContextBase(TYPE_LB, info, providerId, instanceId, width, height, priority)
 ,__pLiveboxPopup(null), __UpdateMillis(period)
 {
        SysLog(NID_APP, "period(%d)", period);
@@ -73,33 +78,33 @@ _Livebox::_Livebox(const String& info, const String& providerId, const String& i
        }
 }
 
-_Livebox::~_Livebox()
+_LiveboxContext::~_LiveboxContext()
 {
        SysLog(NID_APP, "appId(%ls), instanceId(%ls), width(%d), height(%d), priority(%d)", __providerId.GetPointer(), __instanceId.GetPointer(), __width, __height, __priority);
        __lifeDurationTimer.Cancel();
        __UpdateTimer.Cancel();
 }
 
-_LiveboxPopup*
-_Livebox::GetLiveboxPopup() const
+_LiveboxPopupContext*
+_LiveboxContext::GetLiveboxPopup() const
 {
        return __pLiveboxPopup;
 }
 
 void
-_Livebox::OnAdded(void)
+_LiveboxContext::OnAdded(void)
 {
        SendAddRequest(__width, __height);
 }
 
 void
-_Livebox::OnRemoved()
+_LiveboxContext::OnRemoved()
 {
        SendRemoveRequest();
 }
 
 void
-_Livebox::OnUpdate(const String& argument)
+_LiveboxContext::OnUpdate(const String& argument)
 {
        SysLog(NID_APP, "appId(%ls), instanceId(%ls), width(%d), height(%d), priority(%d)", __providerId.GetPointer(), __instanceId.GetPointer(), __width, __height, __priority);
 
@@ -107,7 +112,7 @@ _Livebox::OnUpdate(const String& argument)
 }
 
 void
-_Livebox::OnResize(int width, int height)
+_LiveboxContext::OnResize(int width, int height)
 {
        SysLog(NID_APP, "appId(%ls), instanceId(%ls), width(%d), height(%d), priority(%d)", __providerId.GetPointer(), __instanceId.GetPointer(), __width, __height, __priority);
 
@@ -117,7 +122,7 @@ _Livebox::OnResize(int width, int height)
 }
 
 void
-_Livebox::OnForeground()
+_LiveboxContext::OnForeground()
 {
        SysLog(NID_APP, "");
        __isForeground = true;
@@ -127,7 +132,7 @@ _Livebox::OnForeground()
 }
 
 void
-_Livebox::OnBackground()
+_LiveboxContext::OnBackground()
 {
        SysLog(NID_APP, "");
        __isForeground = false;
@@ -135,9 +140,9 @@ _Livebox::OnBackground()
 }
 
 void
-_Livebox::OnPopupCreated(int width, int height)
+_LiveboxContext::OnPopupCreated(int width, int height)
 {
-       __pLiveboxPopup = new (std::nothrow) _LiveboxPopup(__userInfo, __providerId, __instanceId, width, height, __priority);
+       __pLiveboxPopup = new (std::nothrow) _LiveboxPopupContext(__userInfo, __providerId, __instanceId, width, height, __priority);
        __pLiveboxPopup->SetClientId(__ipcClientId);
        __pLiveboxPopup->OnPopupCreated(width, height);
 
@@ -145,7 +150,7 @@ _Livebox::OnPopupCreated(int width, int height)
 }
 
 void
-_Livebox::OnPopupDestoyed(void)
+_LiveboxContext::OnPopupDestoyed(void)
 {
        if (__pLiveboxPopup)
        {
@@ -157,7 +162,7 @@ _Livebox::OnPopupDestoyed(void)
 }
 
 result
-_Livebox::SendAddRequest(int width, int height)
+_LiveboxContext::SendAddRequest(int width, int height)
 {
 /*     std::unique_ptr<ArrayList, AllElementsDeleter> pArgs (new (std::nothrow) ArrayList);
        pArgs->Construct();
@@ -176,7 +181,7 @@ _Livebox::SendAddRequest(int width, int height)
 }
 
 result
-_Livebox::SendUpdateRequest(int width, int height, const String& argument)
+_LiveboxContext::SendUpdateRequest(int width, int height, const String& argument)
 {
        std::unique_ptr<HashMap, AllElementsDeleter> pArgs (CreateRequestArgs() );
 
@@ -187,7 +192,7 @@ _Livebox::SendUpdateRequest(int width, int height, const String& argument)
 }
 
 result
-_Livebox::SendResizeRequest(int width, int height)
+_LiveboxContext::SendResizeRequest(int width, int height)
 {
        std::unique_ptr<HashMap, AllElementsDeleter> pArgs (CreateRequestArgs() );
 
@@ -198,7 +203,7 @@ _Livebox::SendResizeRequest(int width, int height)
 }
 
 result
-_Livebox::SendRemoveRequest()
+_LiveboxContext::SendRemoveRequest()
 {
        std::unique_ptr<HashMap, AllElementsDeleter> pArgs (CreateRequestArgs() );
 
@@ -206,7 +211,7 @@ _Livebox::SendRemoveRequest()
 }
 
 result
-_Livebox::SendTouchEvent(buffer_event event, double timestamp, double x, double y)
+_LiveboxContext::SendTouchEvent(buffer_event event, double timestamp, double x, double y)
 {
        SysLog(NID_APP, "");
        if( HasValidClientId() == false )
@@ -229,16 +234,16 @@ _Livebox::SendTouchEvent(buffer_event event, double timestamp, double x, double
 }
 
 result
-_Livebox::SendRequestToApp(const AppId& appId, const String& operation, HashMap* pArgs)
+_LiveboxContext::SendRequestToApp(const AppId& appId, const String& operation, HashMap* pArgs)
 {
-       result r = _LiveboxBase::SendRequestToApp(appId, operation, pArgs);
+       result r = _LiveboxContextBase::SendRequestToApp(appId, operation, pArgs);
        RestartLifeDurationTimer();
 
        return r;
 }
 
 result
-_Livebox::RequestUpdateRemote(int width, int height)
+_LiveboxContext::RequestUpdateRemote(int width, int height)
 {
        /*if( GetLiveboxPopup() != null)
        {
@@ -257,7 +262,7 @@ _Livebox::RequestUpdateRemote(int width, int height)
 }
 
 void
-_Livebox::RestartLifeDurationTimer()
+_LiveboxContext::RestartLifeDurationTimer()
 {
        __lifeDurationTimer.Cancel();
        __lifeDurationTimer.Start(LIVE_DURATION_MSEC);
@@ -265,7 +270,7 @@ _Livebox::RestartLifeDurationTimer()
 }
 
 void
-_Livebox::OnTimerExpired(Tizen::Base::Runtime::Timer& timer)
+_LiveboxContext::OnTimerExpired(Tizen::Base::Runtime::Timer& timer)
 {
        SysLog(NID_APP, "");
 
similarity index 86%
rename from src/FShell_LiveboxBase.cpp
rename to src/FShell_LiveboxContextBase.cpp
index 8476845..dd19d59 100644 (file)
@@ -1,18 +1,23 @@
 //
 // Open Service Platform
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
-// All rights reserved.
 //
-// This software contains confidential and proprietary information
-// of Samsung Electronics Co., Ltd.
-// The user of this software agrees not to disclose, disseminate or copy such
-// Confidential Information and shall use the software only in accordance with
-// the terms of the license agreement the user entered into with Samsung.
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
 //
 
 /**
- * @file       FShell_LiveboxBase.cpp
- * @brief      This is the implementation for the Livebox class.
+ * @file       FShell_LiveboxContextBase.cpp
+ * @brief      This is the implementation for the _LiveboxContextBase class.
  */
 
 #include <stdlib.h>
@@ -30,7 +35,7 @@
 #include <FShell_TemplateUtil.h>
 #include <FShell_LiveboxManagerImpl.h>
 
-#include "FShell_LiveboxBase.h"
+#include "FShell_LiveboxContextBase.h"
 
 // provider/src/fb.c
 struct fb_info {
@@ -94,7 +99,7 @@ const String ARG_KEY_PROVIDER_NAME = L"_ProviderName";
 const String ARG_KEY_USER_INFO = L"_UserInfo";
 
 
-_LiveboxBase::_LiveboxBase(target_type type, const String& userInfo, const String& providerId, const String& instanceId, int width, int height, int priority)
+_LiveboxContextBase::_LiveboxContextBase(target_type type, const String& userInfo, const String& providerId, const String& instanceId, int width, int height, int priority)
        :__type(type)
        ,__userInfo(userInfo)
        ,__providerId(providerId)
@@ -112,27 +117,27 @@ _LiveboxBase::_LiveboxBase(target_type type, const String& userInfo, const Strin
        SysLog(NID_APP, "appId(%ls), providerId(%ls), instanceId(%ls), width(%d), height(%d), priority(%d)", __appId.GetPointer(), __providerId.GetPointer(), __instanceId.GetPointer(), __width, __height, __priority);
 }
 
-_LiveboxBase::~_LiveboxBase()
+_LiveboxContextBase::~_LiveboxContextBase()
 {
        SysLog(NID_APP, "providerId(%ls), instanceId(%ls), width(%d), height(%d), priority(%d)", __providerId.GetPointer(), __instanceId.GetPointer(), __width, __height, __priority);
 }
 
 
 void
-_LiveboxBase::SetClientId(int clientId)
+_LiveboxContextBase::SetClientId(int clientId)
 {
        __ipcClientId = clientId;
 }
 
 bool
-_LiveboxBase::HasValidClientId() const
+_LiveboxContextBase::HasValidClientId() const
 {
        SysLog(NID_APP, "%d", __ipcClientId);
        return (__ipcClientId > -1);
 }
 
 int
-_LiveboxBase::GetSharedMemId(int w, int h)
+_LiveboxContextBase::GetSharedMemId(int w, int h)
 {
        SysLog(NID_APP, "Enter");
 
@@ -157,7 +162,7 @@ _LiveboxBase::GetSharedMemId(int w, int h)
 }
 
 result
-_LiveboxBase::ReleaseSharedMem()
+_LiveboxContextBase::ReleaseSharedMem()
 {
        SysLog(NID_APP, "Enter");
 
@@ -185,7 +190,7 @@ _LiveboxBase::ReleaseSharedMem()
 }
 
 Tizen::Base::Collection::HashMap*
-_LiveboxBase::CreateRequestArgs(void)
+_LiveboxContextBase::CreateRequestArgs(void)
 {
        HashMap* pArgs = new (std::nothrow) HashMap(SingleObjectDeleter);
        pArgs->Construct();
@@ -197,7 +202,7 @@ _LiveboxBase::CreateRequestArgs(void)
 }
 
 result
-_LiveboxBase::SendRequestToApp(const AppId& appId, const String& operation, HashMap* pArgs)
+_LiveboxContextBase::SendRequestToApp(const AppId& appId, const String& operation, HashMap* pArgs)
 {
        if( __isForeground == false)
        {
@@ -300,7 +305,7 @@ static int LiveboxHandleBufferEventCallback( struct livebox_buffer *info, enum b
 {
     SysLog(NID_APP, "timestamp(%f), x(%f), y(%f)", timestamp, x, y);
 
-    Tizen::Shell::App::_LiveboxBase *pLiveboxBase = static_cast<Tizen::Shell::App::_LiveboxBase*>(data);
+    Tizen::Shell::App::_LiveboxContextBase *pLiveboxBase = static_cast<Tizen::Shell::App::_LiveboxContextBase*>(data);
     SysTryReturn(NID_APP, pLiveboxBase != null, 0, E_SYSTEM, "[E_SYSTEM] retrieved pLiveboxBase is null");
 
 //    const char *pkgname = provider_buffer_pkgname(info);
index 4339da2..7ebb33b 100644 (file)
@@ -1,18 +1,23 @@
 //
 // Open Service Platform
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
-// All rights reserved.
 //
-// This software contains confidential and proprietary information
-// of Samsung Electronics Co., Ltd.
-// The user of this software agrees not to disclose, disseminate or copy such
-// Confidential Information and shall use the software only in accordance with
-// the terms of the license agreement the user entered into with Samsung.
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
 //
 
 /**
- * @file       FAppAppManager.cpp
- * @brief      This is the implementation for the AppManager class.
+ * @file       FShell_LiveboxManagerService.cpp
+ * @brief      This is the implementation for the LiveboxManagerService class.
  */
 
 #include <stdlib.h>
@@ -28,8 +33,8 @@
 #include <FIo_IpcServer.h>
 #include <FBase_StringConverter.h>
 
-#include "FShell_Livebox.h"
-#include "FShell_LiveboxPopup.h"
+#include "FShell_LiveboxContext.h"
+#include "FShell_LiveboxPopupContext.h"
 #include "FShell_LiveboxManagerStub.h"
 
 #include "FShell_LiveboxManagerService.h"
@@ -132,19 +137,19 @@ LiveboxManagerService::OnTimerExpired(Timer& timer)
        provider_send_ping();
 }
 
-_Livebox*
+_LiveboxContext*
 LiveboxManagerService::Find(const String& appId, const String& instanceId) const
 {
-       for( int i = 0; i < __liveboxes.GetCount(); i++ )
+       for( int i = 0; i < __liveboxContextList.GetCount(); i++ )
        {
-               _Livebox* pLivebox = null;
-               __liveboxes.GetAt(i, pLivebox);
-//             SysLog(NID_APP, "%ls", pLivebox->__instanceId.GetPointer());
+               _LiveboxContext* pLiveboxContext = null;
+               __liveboxContextList.GetAt(i, pLiveboxContext);
+//             SysLog(NID_APP, "%ls", pLiveboxContext->__instanceId.GetPointer());
 
-               if ( pLivebox->__instanceId == instanceId )
+               if ( pLiveboxContext->__instanceId == instanceId )
                {
-//                     SysAssert(pLivebox->__appId == appId)
-                       return pLivebox;
+//                     SysAssert(pLiveboxContext->__appId == appId)
+                       return pLiveboxContext;
                }
        }
        return null;
@@ -153,23 +158,23 @@ LiveboxManagerService::Find(const String& appId, const String& instanceId) const
 result
 LiveboxManagerService::SetClientIds(const Tizen::App::AppId& appId, int clientId)
 {
-       for( int i = 0; i < __liveboxes.GetCount(); i++ )
+       for( int i = 0; i < __liveboxContextList.GetCount(); i++ )
        {
-               _Livebox* pLivebox = null;
-               __liveboxes.GetAt(i, pLivebox);
-               SysLog(NID_APP, "%ls", pLivebox->__instanceId.GetPointer());
-               SysLog(NID_APP, "%ls, %ls", pLivebox->__providerId.GetPointer(), appId.GetPointer());
+               _LiveboxContext* pLiveboxContext = null;
+               __liveboxContextList.GetAt(i, pLiveboxContext);
+               SysLog(NID_APP, "%ls", pLiveboxContext->__instanceId.GetPointer());
+               SysLog(NID_APP, "%ls, %ls", pLiveboxContext->__providerId.GetPointer(), appId.GetPointer());
 
-               if ( pLivebox->__appId == appId )
+               if ( pLiveboxContext->__appId == appId )
                {
-                       pLivebox->SetClientId(clientId);
+                       pLiveboxContext->SetClientId(clientId);
                        SysLog(NID_APP, "client is registered.(%d)", clientId);
                        if( clientId == -1)
                        {
-                               pLivebox->ReleaseSharedMem();
-                               if(pLivebox->GetLiveboxPopup())
+                               pLiveboxContext->ReleaseSharedMem();
+                               if(pLiveboxContext->GetLiveboxPopup())
                                {
-                                       pLivebox->OnPopupDestoyed();
+                                       pLiveboxContext->OnPopupDestoyed();
                                }
                        }
                }
@@ -177,25 +182,13 @@ LiveboxManagerService::SetClientIds(const Tizen::App::AppId& appId, int clientId
        return E_SUCCESS;
 }
 
-//void
-//LiveboxManagerService::OnApplicationLaunched(const AppId& appId, _AppType type)
-//{
-//
-//}
-//
-//void
-//LiveboxManagerService::OnApplicationTerminated(const AppId& appId, _AppType type)
-//{
-//     this->SetClientIds(appId, -1);
-//}
-
 void
 LiveboxManagerService::OnIpcClientConnected(const _IpcServer& server, int clientId)
 {
        //SysLog(NID_APP, "(clientId:%d)\n", clientId);
        String fullAppId = server.GetClientAppId() + "." + server.GetClientAppExecutableName();
        SysLog(NID_APP, "(%ls)\n", fullAppId.GetPointer());
-//     this->SetClientIds(fullAppId, clientId);
+//     this->SetClientIds(fullAppId, clientId);//Todo
 
 }
 
@@ -208,27 +201,27 @@ LiveboxManagerService::OnIpcClientDisconnected(const _IpcServer& server, int cli
 }
 
 result
-LiveboxManagerService::AddLivebox(_Livebox* pLivebox)
+LiveboxManagerService::AddLivebox(_LiveboxContext* pLiveboxContext)
 {
-       SysLog(NID_APP, "%ls, %ls, count(%d)", pLivebox->__providerId.GetPointer(), pLivebox->__instanceId.GetPointer(), __liveboxes.GetCount());
+       SysLog(NID_APP, "%ls, %ls, count(%d)", pLiveboxContext->__providerId.GetPointer(), pLiveboxContext->__instanceId.GetPointer(), __liveboxContextList.GetCount());
 
-       return __liveboxes.Add(pLivebox);
+       return __liveboxContextList.Add(pLiveboxContext);
 }
 
 result
 LiveboxManagerService::RemoveLivebox(const char* pPackageName, const char* pId, bool free)
 {
-       SysLog(NID_APP, "%s, %s, count(%d)", pPackageName, pId, __liveboxes.GetCount());
+       SysLog(NID_APP, "%s, %s, count(%d)", pPackageName, pId, __liveboxContextList.GetCount());
 
        SysTryReturn(NID_APP, ( pPackageName != null && pId != null), null, E_INVALID_ARG, "[E_INVALID_ARG]");
        SysLog(NID_APP, "%s, %s", pPackageName, pId);
 
-       _Livebox* pLivebox = Find(pPackageName, pId);
-       SysTryReturn(NID_APP, pLivebox, null, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND]");
+       _LiveboxContext* pLiveboxContext = Find(pPackageName, pId);
+       SysTryReturn(NID_APP, pLiveboxContext, null, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND]");
 
-       result r = __liveboxes.Remove(pLivebox);
+       result r = __liveboxContextList.Remove(pLiveboxContext);
 
-       if( __liveboxes.GetCount() == 0 )
+       if( __liveboxContextList.GetCount() == 0 )
        {
                SysLog(NID_APP, "No running native livebox app remains, terminating osp livebox service...");
                Tizen::App::App::GetInstance()->Terminate();
@@ -253,19 +246,19 @@ LiveboxManagerService::OnLiveboxCreate(struct event_arg *arg, int *width, int *h
        SysTryReturn (NID_APP, LiveboxManagerService::GetInstance()->Find(arg->pkgname, arg->id) == null, -EBUSY, E_SUCCESS,"already exist");
 
        double default_priority = 1.0f;
-       _Livebox* pLivebox = new (std::nothrow)_Livebox( arg->info.lb_create.content, arg->pkgname, arg->id,
+       _LiveboxContext* pLiveboxContext = new (std::nothrow)_LiveboxContext( arg->info.lb_create.content, arg->pkgname, arg->id,
                        arg->info.lb_create.width, arg->info.lb_create.height, arg->info.lb_create.period * 1000, default_priority);
-       SysTryReturn(NID_APP, pLivebox, 0, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY]");
+       SysTryReturn(NID_APP, pLiveboxContext, 0, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY]");
 
        LiveboxManagerService* pLiveboxService = LiveboxManagerService::GetInstance();
-       pLiveboxService->AddLivebox(pLivebox);
-       pLivebox->OnAdded();
+       pLiveboxService->AddLivebox(pLiveboxContext);
+       pLiveboxContext->OnAdded();
 
-       *priority = pLivebox->__priority;
-       *height= pLivebox->__height;
-       *width = pLivebox->__width;
+       *priority = pLiveboxContext->__priority;
+       *height= pLiveboxContext->__height;
+       *width = pLiveboxContext->__width;
 
-       SysLog(NID_APP, "Exit. %d livebox(es)", pLiveboxService->__liveboxes.GetCount());
+       SysLog(NID_APP, "Exit. %d livebox(es)", pLiveboxService->__liveboxContextList.GetCount());
     return 0;
 }
 
@@ -279,10 +272,10 @@ LiveboxManagerService::OnLiveboxUpdate(struct event_arg *arg, void* data)
        }
        else
        {
-               _Livebox* pLivebox = LiveboxManagerService::GetInstance()->Find(arg->pkgname, arg->id);
-               SysTryReturnResult(NID_APP, pLivebox , E_SYSTEM, "[E_SYSTEM] pLivebox is null for appId(%s), instanceId(%s)", arg->pkgname, arg->id);
+               _LiveboxContext* pLiveboxContext = LiveboxManagerService::GetInstance()->Find(arg->pkgname, arg->id);
+               SysTryReturnResult(NID_APP, pLiveboxContext , E_SYSTEM, "[E_SYSTEM] pLiveboxContext is null for appId(%s), instanceId(%s)", arg->pkgname, arg->id);
 
-               pLivebox->OnUpdate(L"");
+               pLiveboxContext->OnUpdate(L"");
        }
 
        return 0;
@@ -291,14 +284,14 @@ LiveboxManagerService::OnLiveboxUpdate(struct event_arg *arg, void* data)
 int
 LiveboxManagerService::UpdateAllLiveboxesByAppId(const String& providerId)
 {
-       for( int i = 0; i < __liveboxes.GetCount(); i++ )
+       for( int i = 0; i < __liveboxContextList.GetCount(); i++ )
        {
-               _Livebox* pLivebox = null;
-               __liveboxes.GetAt(i, pLivebox);
+               _LiveboxContext* pLiveboxContext = null;
+               __liveboxContextList.GetAt(i, pLiveboxContext);
 
-               if ( pLivebox->__providerId == providerId )
+               if ( pLiveboxContext->__providerId == providerId )
                {
-                       pLivebox->OnUpdate(L"");
+                       pLiveboxContext->OnUpdate(L"");
                }
        }
        return E_SUCCESS;
@@ -312,12 +305,12 @@ LiveboxManagerService::OnLiveboxDestroy(struct event_arg *arg, void* data)
 
        LiveboxManagerService* pLiveboxManagerService = LiveboxManagerService::GetInstance();
 
-       _Livebox* pLivebox = pLiveboxManagerService->Find(arg->pkgname, arg->id);
-       SysTryReturnResult(NID_APP, pLivebox , E_SYSTEM, "[E_SYSTEM] pLivebox is null for appId(%s), instanceId(%s)", arg->pkgname, arg->id);
+       _LiveboxContext* pLiveboxContext = pLiveboxManagerService->Find(arg->pkgname, arg->id);
+       SysTryReturnResult(NID_APP, pLiveboxContext , E_SYSTEM, "[E_SYSTEM] pLiveboxContext is null for appId(%s), instanceId(%s)", arg->pkgname, arg->id);
 
-    pLivebox->OnRemoved();
+    pLiveboxContext->OnRemoved();
     pLiveboxManagerService->RemoveLivebox( arg->pkgname, arg->id, true);
-    delete pLivebox;
+    delete pLiveboxContext;
 
     SysLog(NID_APP, "Exit");
     return 0;
@@ -329,14 +322,14 @@ LiveboxManagerService::OnLiveboxPopupCreate(struct event_arg *arg, void* data)
        SysTryReturn (NID_APP, arg->type == event_arg::EVENT_PD_CREATE, -EPERM, E_SUCCESS, "invalid argument from master");
        SysLog(NID_APP, "packageName(%s), id(%s), width(%d), height(%d), priority(%d)", arg->pkgname, arg->id);
 
-       _Livebox* pLivebox = LiveboxManagerService::GetInstance()->Find(arg->pkgname, arg->id);
-       SysTryReturnResult(NID_APP, pLivebox , E_SYSTEM, "[E_SYSTEM] pLivebox is null for appId(%s), instanceId(%s)", arg->pkgname, arg->id);
+       _LiveboxContext* pLiveboxContext = LiveboxManagerService::GetInstance()->Find(arg->pkgname, arg->id);
+       SysTryReturnResult(NID_APP, pLiveboxContext , E_SYSTEM, "[E_SYSTEM] pLiveboxContext is null for appId(%s), instanceId(%s)", arg->pkgname, arg->id);
 
-       /*if( pLivebox->GetLiveboxPopup() )
+       /*if( pLiveboxContext->GetLiveboxPopup() )
        {
-               pLivebox->OnPopupDestoyed();
+               pLiveboxContext->OnPopupDestoyed();
        }*/
-       pLivebox->OnPopupCreated(arg->info.pd_create.w, arg->info.pd_create.h);
+       pLiveboxContext->OnPopupCreated(arg->info.pd_create.w, arg->info.pd_create.h);
 
     return 0;
 }
@@ -346,10 +339,10 @@ LiveboxManagerService::OnLiveboxPopupCreate(struct event_arg *arg, void* data)
 {
        SysTryReturn (NID_APP, arg->type == event_arg::EVENT_PD_DESTROY, -EPERM, E_SUCCESS, "invalid argument from master");
        SysLog(NID_APP, "packageName(%s), id(%s)", arg->pkgname, arg->id);
-       _Livebox* pLivebox = LiveboxManagerService::GetInstance()->Find(arg->pkgname, arg->id);
-       SysTryReturnResult(NID_APP, pLivebox , E_SYSTEM, "[E_SYSTEM] pLivebox is null for appId(%s), instanceId(%s)", arg->pkgname, arg->id);
+       _LiveboxContext* pLiveboxContext = LiveboxManagerService::GetInstance()->Find(arg->pkgname, arg->id);
+       SysTryReturnResult(NID_APP, pLiveboxContext , E_SYSTEM, "[E_SYSTEM] pLiveboxContext is null for appId(%s), instanceId(%s)", arg->pkgname, arg->id);
 
-       pLivebox->OnPopupDestoyed();
+       pLiveboxContext->OnPopupDestoyed();
 
     return 0;
 }
@@ -359,11 +352,11 @@ LiveboxManagerService::OnLiveboxPopupCreate(struct event_arg *arg, void* data)
 {
         SysTryReturn(NID_APP, arg, 0, E_SUCCESS, "arg is null!");
 
-        _Livebox* pLivebox = LiveboxManagerService::GetInstance()->Find(arg->pkgname, arg->id);
-        SysTryReturnResult(NID_APP, pLivebox , 0, "[E_SYSTEM] pLivebox is null for appId(%s), instanceId(%s)", arg->pkgname, arg->id);
+        _LiveboxContext* pLiveboxContext = LiveboxManagerService::GetInstance()->Find(arg->pkgname, arg->id);
+        SysTryReturnResult(NID_APP, pLiveboxContext , 0, "[E_SYSTEM] pLiveboxContext is null for appId(%s), instanceId(%s)", arg->pkgname, arg->id);
 
         SysLog(NID_APP, "packageName(%s), id(%s)", arg->pkgname, arg->id);
-        pLivebox->OnBackground();
+        pLiveboxContext->OnBackground();
     return 0;
 }
 
@@ -372,11 +365,11 @@ LiveboxManagerService::OnLiveboxResume(struct event_arg *arg, void* data)
 {
        SysTryReturn(NID_APP, arg || arg->id || arg->pkgname, 0, E_SUCCESS, "arg is null!");
 
-       _Livebox* pLivebox = LiveboxManagerService::GetInstance()->Find(arg->pkgname, arg->id);
-       SysTryReturnResult(NID_APP, pLivebox , E_SYSTEM, "[E_SYSTEM] pLivebox is null for appId(%s), instanceId(%s)", arg->pkgname, arg->id);
+       _LiveboxContext* pLiveboxContext = LiveboxManagerService::GetInstance()->Find(arg->pkgname, arg->id);
+       SysTryReturnResult(NID_APP, pLiveboxContext , E_SYSTEM, "[E_SYSTEM] pLiveboxContext is null for appId(%s), instanceId(%s)", arg->pkgname, arg->id);
 
        SysLog(NID_APP, "packageName(%s), id(%s)", arg->pkgname, arg->id);
-       pLivebox->OnForeground();
+       pLiveboxContext->OnForeground();
     return 0;
 }
 
@@ -398,10 +391,10 @@ LiveboxManagerService::OnLiveboxResize(struct event_arg *arg, void* data)
 
        SysLog(NID_APP, "packageName(%s), id(%s), resize.w(%d), resize.h(%d)", arg->pkgname, arg->id, arg->info.resize.w, arg->info.resize.h);
 
-       _Livebox* pLivebox = LiveboxManagerService::GetInstance()->Find(arg->pkgname, arg->id);
-       SysTryReturnResult(NID_APP, pLivebox , E_SYSTEM, "[E_SYSTEM] pLivebox is null for appId(%s), instanceId(%s)", arg->pkgname, arg->id);
+       _LiveboxContext* pLiveboxContext = LiveboxManagerService::GetInstance()->Find(arg->pkgname, arg->id);
+       SysTryReturnResult(NID_APP, pLiveboxContext , E_SYSTEM, "[E_SYSTEM] pLiveboxContext is null for appId(%s), instanceId(%s)", arg->pkgname, arg->id);
 
-       pLivebox->OnResize(arg->info.resize.w, arg->info.resize.h);
+       pLiveboxContext->OnResize(arg->info.resize.w, arg->info.resize.h);
 
     return 0;
 }
@@ -420,7 +413,7 @@ LiveboxManagerService::InitializeMasterDaemonEventReceiver(const char *pServiceE
        SysTryReturnResult(NID_APP, pServiceExecutableName != null, E_INVALID_ARG, "");
        SysLog(NID_APP, "Enter.");
 
-       __liveboxes.Construct();
+       __liveboxContextList.Construct();
 
        /*!
         * \note
@@ -473,20 +466,20 @@ LiveboxManagerService::RequestUpdate(const Tizen::App::AppId& appId, const Tizen
        SysLog(NID_APP, "%ls, %ls", appId.GetPointer(), providerName.GetPointer() );
 
        bool found = false;
-       for( int i = 0; i < __liveboxes.GetCount(); i++ )
+       for( int i = 0; i < __liveboxContextList.GetCount(); i++ )
        {
-               _Livebox* pLivebox = null;
-               __liveboxes.GetAt(i, pLivebox);
+               _LiveboxContext* pLiveboxContext = null;
+               __liveboxContextList.GetAt(i, pLiveboxContext);
 
-               if ( pLivebox->__appId == appId && pLivebox->__providerName == providerName)
+               if ( pLiveboxContext->__appId == appId && pLiveboxContext->__providerName == providerName)
                {
                        SysLog(NID_APP, "OK");
 
-                       ArrayList* pArray = new ArrayList();
+                       ArrayList* pArray = new (std::nothrow) ArrayList();
                        SysTryReturnResult(NID_APP, pArray, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY]");
 
                        pArray->Construct();
-                       pArray->Add(pLivebox);
+                       pArray->Add(pLiveboxContext);
                        pArray->Add(new String(argument));
 
                        result r = __handlerThread.SendUserEvent(LOCAL_EVENT_REQUEST_UPDATE, pArray);
@@ -505,20 +498,20 @@ LiveboxManagerService::RequestUpdateInstance(const Tizen::Base::String& instance
 {
        SysLog(NID_APP, "%ls, %ls", instanceId.GetPointer(), argument.GetPointer() );
 
-       for( int i = 0; i < __liveboxes.GetCount(); i++ )
+       for( int i = 0; i < __liveboxContextList.GetCount(); i++ )
        {
-               _Livebox* pLivebox = null;
-               __liveboxes.GetAt(i, pLivebox);
+               _LiveboxContext* pLiveboxContext = null;
+               __liveboxContextList.GetAt(i, pLiveboxContext);
 
-               if ( pLivebox->__instanceId == instanceId)
+               if ( pLiveboxContext->__instanceId == instanceId)
                {
                        SysLog(NID_APP, "OK");
 
-                       ArrayList* pArray = new ArrayList();
+                       ArrayList* pArray = new (std::nothrow) ArrayList();
                        SysTryReturnResult(NID_APP, pArray, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY]");
 
                        pArray->Construct();
-                       pArray->Add(pLivebox);
+                       pArray->Add(pLiveboxContext);
                        pArray->Add(new String(argument));
 
                        result r = __handlerThread.SendUserEvent(LOCAL_EVENT_REQUEST_UPDATE, pArray);
@@ -534,27 +527,27 @@ LiveboxManagerService::RequestUpdateInstance(const Tizen::Base::String& instance
 result
 LiveboxManagerService::RequestSharedMemoryId(const Tizen::App::AppId& appId, const Tizen::Base::String& instanceId, int width, int height, int& shmId)
 {
-       _Livebox* pLivebox = this->Find(appId, instanceId);
-       SysTryReturnResult(NID_APP, pLivebox , E_SYSTEM, "[E_SYSTEM] pLivebox is null for (%ls) (%ls)", appId.GetPointer(), instanceId.GetPointer());
+       _LiveboxContext* pLiveboxContext = this->Find(appId, instanceId);
+       SysTryReturnResult(NID_APP, pLiveboxContext , E_SYSTEM, "[E_SYSTEM] pLiveboxContext is null for (%ls) (%ls)", appId.GetPointer(), instanceId.GetPointer());
 
-       if(pLivebox->HasValidClientId() == false)
+       if(pLiveboxContext->HasValidClientId() == false)
        {
                String fullAppId = __pIpcServer->GetClientAppId() + "." + __pIpcServer->GetClientAppExecutableName();
                this->SetClientIds(fullAppId, __pIpcServer->GetClientId());
        }
 
-       shmId = pLivebox->GetSharedMemId(width, height);
-       SysTryReturnResult(NID_APP, pLivebox , shmId != -1, "[E_SYSTEM] failed to GetSharedMemId for (%ls) (%ls)", appId.GetPointer(), instanceId.GetPointer());
+       shmId = pLiveboxContext->GetSharedMemId(width, height);
+       SysTryReturnResult(NID_APP, pLiveboxContext , shmId != -1, "[E_SYSTEM] failed to GetSharedMemId for (%ls) (%ls)", appId.GetPointer(), instanceId.GetPointer());
     return E_SUCCESS;
 }
 
 result
 LiveboxManagerService::RequestSharedMemoryIdForPD(const Tizen::App::AppId& appId, const Tizen::Base::String& instanceId, int width, int height, int& shmId)
 {
-       _Livebox* pLivebox = this->Find(appId, instanceId);
-       SysTryReturnResult(NID_APP, pLivebox , E_SYSTEM, "[E_SYSTEM] pLivebox is null for (%ls) (%ls)", appId.GetPointer(), instanceId.GetPointer());
+       _LiveboxContext* pLiveboxContext = this->Find(appId, instanceId);
+       SysTryReturnResult(NID_APP, pLiveboxContext , E_SYSTEM, "[E_SYSTEM] pLiveboxContext is null for (%ls) (%ls)", appId.GetPointer(), instanceId.GetPointer());
 
-       _LiveboxPopup* pPd = pLivebox->GetLiveboxPopup();
+       _LiveboxPopupContext* pPd = pLiveboxContext->GetLiveboxPopup();
        SysTryReturnResult(NID_APP, pPd , E_SYSTEM, "[E_SYSTEM] pPd is null for (%ls) (%ls)", appId.GetPointer(), instanceId.GetPointer());
 
        if(pPd->HasValidClientId() == false)
@@ -564,7 +557,7 @@ LiveboxManagerService::RequestSharedMemoryIdForPD(const Tizen::App::AppId& appId
        }
 
        shmId = pPd->GetSharedMemId(width, height);
-       SysTryReturnResult(NID_APP, pLivebox , shmId != -1, "[E_SYSTEM] failed to GetSharedMemId for (%ls) (%ls)", appId.GetPointer(), instanceId.GetPointer());
+       SysTryReturnResult(NID_APP, pLiveboxContext , shmId != -1, "[E_SYSTEM] failed to GetSharedMemId for (%ls) (%ls)", appId.GetPointer(), instanceId.GetPointer());
 
     return E_SUCCESS;
 }
@@ -572,20 +565,20 @@ LiveboxManagerService::RequestSharedMemoryIdForPD(const Tizen::App::AppId& appId
 result
 LiveboxManagerService::RequestSyncSharedMemory(const Tizen::App::AppId& appId, const Tizen::Base::String& instanceId, int width, int height)
 {
-       _Livebox* pLivebox = this->Find(appId, instanceId);
-       SysTryReturnResult(NID_APP, pLivebox , E_SYSTEM, "[E_SYSTEM] pLivebox is null for (%ls) (%ls)", appId.GetPointer(), instanceId.GetPointer());
+       _LiveboxContext* pLiveboxContext = this->Find(appId, instanceId);
+       SysTryReturnResult(NID_APP, pLiveboxContext , E_SYSTEM, "[E_SYSTEM] pLiveboxContext is null for (%ls) (%ls)", appId.GetPointer(), instanceId.GetPointer());
 
-       return pLivebox->RequestUpdateRemote(width, height);
+       return pLiveboxContext->RequestUpdateRemote(width, height);
 }
 
 result
 LiveboxManagerService::RequestSyncSharedMemoryForPD(const Tizen::App::AppId& appId, const Tizen::Base::String& instanceId)
 {
-       _Livebox* pLivebox = this->Find(appId, instanceId);
-       SysTryReturnResult(NID_APP, pLivebox , E_SYSTEM, "[E_SYSTEM] pLivebox is null for (%ls) (%ls)", appId.GetPointer(), instanceId.GetPointer());
-       SysTryReturnResult(NID_APP, pLivebox->GetLiveboxPopup(), E_SYSTEM, "[E_SYSTEM] GetLiveboxPopup() returns null for (%ls) (%ls)", appId.GetPointer(), instanceId.GetPointer());
+       _LiveboxContext* pLiveboxContext = this->Find(appId, instanceId);
+       SysTryReturnResult(NID_APP, pLiveboxContext , E_SYSTEM, "[E_SYSTEM] pLiveboxContext is null for (%ls) (%ls)", appId.GetPointer(), instanceId.GetPointer());
+       SysTryReturnResult(NID_APP, pLiveboxContext->GetLiveboxPopup(), E_SYSTEM, "[E_SYSTEM] GetLiveboxPopup() returns null for (%ls) (%ls)", appId.GetPointer(), instanceId.GetPointer());
 
-       return pLivebox->GetLiveboxPopup()->RequestUpdateRemote();
+       return pLiveboxContext->GetLiveboxPopup()->RequestUpdateRemote();
 }
 
 result
@@ -594,10 +587,10 @@ LiveboxManagerService::RequestReleaseSharedMemory(const Tizen::App::AppId& appId
        std::unique_ptr<char[]> pkgname(_StringConverter::CopyToCharArrayN(appId));
        std::unique_ptr<char[]> id(_StringConverter::CopyToCharArrayN(instanceId));
 
-       _Livebox* pLivebox = this->Find(appId, instanceId);
-       SysTryReturnResult(NID_APP, pLivebox , E_SYSTEM, "[E_SYSTEM] pLivebox is null for (%ls) (%ls)", appId.GetPointer(), instanceId.GetPointer());
+       _LiveboxContext* pLiveboxContext = this->Find(appId, instanceId);
+       SysTryReturnResult(NID_APP, pLiveboxContext , E_SYSTEM, "[E_SYSTEM] pLiveboxContext is null for (%ls) (%ls)", appId.GetPointer(), instanceId.GetPointer());
 
-       return pLivebox->ReleaseSharedMem();
+       return pLiveboxContext->ReleaseSharedMem();
 }
 
 result
@@ -606,11 +599,11 @@ LiveboxManagerService::RequestReleaseSharedMemoryForPD(const Tizen::App::AppId&
        std::unique_ptr<char[]> pkgname(_StringConverter::CopyToCharArrayN(appId));
        std::unique_ptr<char[]> id(_StringConverter::CopyToCharArrayN(instanceId));
 
-       _Livebox* pLivebox = this->Find(appId, instanceId);
-       SysTryReturnResult(NID_APP, pLivebox , E_SYSTEM, "[E_SYSTEM] pLivebox is null for (%ls) (%ls)", appId.GetPointer(), instanceId.GetPointer());
-       SysTryReturnResult(NID_APP, pLivebox->GetLiveboxPopup(), E_SYSTEM, "[E_SYSTEM] GetLiveboxPopup() returns null for (%ls) (%ls)", appId.GetPointer(), instanceId.GetPointer());
+       _LiveboxContext* pLiveboxContext = this->Find(appId, instanceId);
+       SysTryReturnResult(NID_APP, pLiveboxContext , E_SYSTEM, "[E_SYSTEM] pLiveboxContext is null for (%ls) (%ls)", appId.GetPointer(), instanceId.GetPointer());
+       SysTryReturnResult(NID_APP, pLiveboxContext->GetLiveboxPopup(), E_SYSTEM, "[E_SYSTEM] GetLiveboxPopup() returns null for (%ls) (%ls)", appId.GetPointer(), instanceId.GetPointer());
 
-//     return pLivebox->GetLiveboxPopup()->ReleaseSharedMem();
+//     return pLiveboxContext->GetLiveboxPopup()->ReleaseSharedMem();
        return E_SUCCESS;
 }
 
@@ -630,13 +623,13 @@ LiveboxManagerService::_TaskHandlerThread::OnUserEventReceivedN(RequestId reqId,
        {
        case LOCAL_EVENT_REQUEST_UPDATE:
        {
-               _Livebox* pLivebox = dynamic_cast<_Livebox*>( pArgs->GetAt(0) );
-               SysTryReturnVoidResult(NID_APP, pLivebox != null, E_INVALID_STATE, "_Livebox is null!.");
+               _LiveboxContext* pLiveboxContext = dynamic_cast<_LiveboxContext*>( pArgs->GetAt(0) );
+               SysTryReturnVoidResult(NID_APP, pLiveboxContext != null, E_INVALID_STATE, "_Livebox is null!.");
 
                String* pArgument = dynamic_cast<String*>( pArgs->GetAt(1) );
                SysTryReturnVoidResult(NID_APP, pArgument != null, E_INVALID_STATE, "pArgument is null!.");
 
-               pLivebox->OnUpdate(*pArgument);
+               pLiveboxContext->OnUpdate(*pArgument);
 
                delete pArgument;
                pArgs->RemoveAll();
index ad7747e..1b14470 100644 (file)
@@ -1,18 +1,23 @@
 //
 // Open Service Platform
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
-// All rights reserved.
 //
-// This software contains confidential and proprietary information
-// of Samsung Electronics Co., Ltd.
-// The user of this software agrees not to disclose, disseminate or copy such
-// Confidential Information and shall use the software only in accordance with
-// the terms of the license agreement the user entered into with Samsung.
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
 //
 
 /**
- * @file       FAppAppManager.cpp
- * @brief      This is the implementation for the AppManager class.
+ * @file       FShell_LiveboxManagerStub.cpp
+ * @brief      This is the implementation for the _LiveboxManagerStub class.
  */
 
 #include <FBase.h>
similarity index 68%
rename from src/FShell_LiveboxPopup.cpp
rename to src/FShell_LiveboxPopupContext.cpp
index e7860c8..ad16a00 100644 (file)
@@ -1,18 +1,23 @@
 //
 // Open Service Platform
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
-// All rights reserved.
 //
-// This software contains confidential and proprietary information
-// of Samsung Electronics Co., Ltd.
-// The user of this software agrees not to disclose, disseminate or copy such
-// Confidential Information and shall use the software only in accordance with
-// the terms of the license agreement the user entered into with Samsung.
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
 //
 
 /**
- * @file       FShell_Livebox.cpp
- * @brief      This is the implementation for the Livebox class.
+ * @file       FShell_LiveboxPopupContext.cpp
+ * @brief      This is the implementation for the _LiveboxPopupContext class.
  */
 
 #include <stdlib.h>
@@ -27,7 +32,7 @@
 #include <FApp_AppControlManager.h>
 
 #include "FShell_LiveboxManagerService.h"
-#include "FShell_LiveboxPopup.h"
+#include "FShell_LiveboxPopupContext.h"
 
 namespace Tizen { namespace Shell  { namespace App
 {
@@ -44,13 +49,13 @@ const String ARG_KEY_WIDTH = L"_Width";
 const String ARG_KEY_HEIGHT = L"_Height";
 
 
-_LiveboxPopup::_LiveboxPopup(const String& info, const String& appId, const String& instanceId, int width, int height, int priority)
-:_LiveboxBase(TYPE_PD, info, appId, instanceId, width, height, priority)
+_LiveboxPopupContext::_LiveboxPopupContext(const String& info, const String& appId, const String& instanceId, int width, int height, int priority)
+:_LiveboxContextBase(TYPE_PD, info, appId, instanceId, width, height, priority)
 {
        SysLog(NID_APP, "appId(%ls), instanceId(%ls), width(%d), height(%d)", __providerId.GetPointer(), __instanceId.GetPointer(), __width, __height);
 }
 
-_LiveboxPopup::~_LiveboxPopup()
+_LiveboxPopupContext::~_LiveboxPopupContext()
 {
        SysLog(NID_APP, "appId(%ls), instanceId(%ls), width(%d), height(%d))", __providerId.GetPointer(), __instanceId.GetPointer(), __width, __height);
        ReleaseSharedMem();
@@ -58,21 +63,21 @@ _LiveboxPopup::~_LiveboxPopup()
 
 
 void
-_LiveboxPopup::OnPopupCreated(int width, int height)
+_LiveboxPopupContext::OnPopupCreated(int width, int height)
 {
        SysLog(NID_APP, "width(%d), height(%d)", width, height);
        SendPopupCreateRequest(width, height);
 }
 
 void
-_LiveboxPopup::OnPopupDestoyed()
+_LiveboxPopupContext::OnPopupDestoyed()
 {
        SysLog(NID_APP, "");
        SendPopupDestroyRequest();
 }
 
 result
-_LiveboxPopup::SendPopupCreateRequest(int width, int height)
+_LiveboxPopupContext::SendPopupCreateRequest(int width, int height)
 {
        std::unique_ptr<HashMap, AllElementsDeleter> pArgs (CreateRequestArgs() );
 
@@ -83,7 +88,7 @@ _LiveboxPopup::SendPopupCreateRequest(int width, int height)
 }
 
 result
-_LiveboxPopup::SendPopupDestroyRequest()
+_LiveboxPopupContext::SendPopupDestroyRequest()
 {
        std::unique_ptr<HashMap, AllElementsDeleter> pArgs (CreateRequestArgs() );
 
@@ -91,7 +96,7 @@ _LiveboxPopup::SendPopupDestroyRequest()
 }
 
 result
-_LiveboxPopup::SendTouchEvent(buffer_event event, double timestamp, double x, double y)
+_LiveboxPopupContext::SendTouchEvent(buffer_event event, double timestamp, double x, double y)
 {
        SysLog(NID_APP, "");
        /*if( HasValidClientId() == false )
@@ -116,7 +121,7 @@ _LiveboxPopup::SendTouchEvent(buffer_event event, double timestamp, double x, do
 }
 
 result
-_LiveboxPopup::RequestUpdateRemote()
+_LiveboxPopupContext::RequestUpdateRemote()
 {
        std::unique_ptr<char[]> packageName(_StringConverter::CopyToCharArrayN(__providerId));
        std::unique_ptr<char[]> id(_StringConverter::CopyToCharArrayN(__instanceId));
index fb8cc5e..d3e71f7 100644 (file)
@@ -1,13 +1,18 @@
 //
 // Open Service Platform
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
-// All rights reserved.
 //
-// This software contains confidential and proprietary information
-// of Samsung Electronics Co., Ltd.
-// The user of this software agrees not to disclose, disseminate or copy such
-// Confidential Information and shall use the software only in accordance with
-// the terms of the license agreement the user entered into with Samsung.
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
 //
 
 /**
@@ -36,7 +41,7 @@ ServiceApp*
 OspLiveboxService::CreateInstance(void)
 {
        // Create the instance through the constructor.
-       return new OspLiveboxService();
+       return new (std::nothrow) OspLiveboxService();
 }
 
 bool
index 615a5d3..18e2cca 100644 (file)
@@ -1,13 +1,18 @@
 //
 // Open Service Platform
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
-// All rights reserved.
 //
-// This software contains confidential and proprietary information
-// of Samsung Electronics Co., Ltd.
-// The user of this software agrees not to disclose, disseminate or copy such
-// Confidential Information and shall use the software only in accordance with
-// the terms of the license agreement the user entered into with Samsung.
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
 //
 
 /**
@@ -44,7 +49,7 @@ OspMain(int argc, char *pArgv[])
        result r = E_SUCCESS;
 
        AppLog("Application started.");
-       ArrayList* pArgs = new ArrayList();
+       ArrayList* pArgs = new (std::nothrow) ArrayList();
        pArgs->Construct();
        for (int i = 0; i < argc; i++)
                pArgs->Add(*(new String(pArgv[i])));