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
//
// 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>
#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);
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();
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;
} } } // Tizen::Shell::App {
-#endif /* FShell_Livebox_H_ */
+#endif // _FSHELL_INTERNAL_LIVEBOX_CONTEXT_H_
-/*
- * 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>
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;
} /* namespace App */
} /* namespace Livebox */
} /* namespace Samsung */
-#endif /* _FSHL_LIVEBOXBASE_H_ */
+#endif // _FSHELL_INTERNAL_LIVEBOX_CONTEXT_BASE_H_
//
// 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 {
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:
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);
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
};
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_
//
// 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>
}}}
-#endif//_FAPP_INTERNAL_APP_MANAGER_STUB_H_
+#endif//_FSHELL_INTERNAL_LIVEBOX_MANAGER_STUB_H_
+++ /dev/null
-/*
- * 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_ */
--- /dev/null
+//
+// 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_
* 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:
//
// 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>
#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
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);
}
}
-_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);
}
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);
}
void
-_Livebox::OnForeground()
+_LiveboxContext::OnForeground()
{
SysLog(NID_APP, "");
__isForeground = true;
}
void
-_Livebox::OnBackground()
+_LiveboxContext::OnBackground()
{
SysLog(NID_APP, "");
__isForeground = false;
}
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);
}
void
-_Livebox::OnPopupDestoyed(void)
+_LiveboxContext::OnPopupDestoyed(void)
{
if (__pLiveboxPopup)
{
}
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();
}
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() );
}
result
-_Livebox::SendResizeRequest(int width, int height)
+_LiveboxContext::SendResizeRequest(int width, int height)
{
std::unique_ptr<HashMap, AllElementsDeleter> pArgs (CreateRequestArgs() );
}
result
-_Livebox::SendRemoveRequest()
+_LiveboxContext::SendRemoveRequest()
{
std::unique_ptr<HashMap, AllElementsDeleter> pArgs (CreateRequestArgs() );
}
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 )
}
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)
{
}
void
-_Livebox::RestartLifeDurationTimer()
+_LiveboxContext::RestartLifeDurationTimer()
{
__lifeDurationTimer.Cancel();
__lifeDurationTimer.Start(LIVE_DURATION_MSEC);
}
void
-_Livebox::OnTimerExpired(Tizen::Base::Runtime::Timer& timer)
+_LiveboxContext::OnTimerExpired(Tizen::Base::Runtime::Timer& timer)
{
SysLog(NID_APP, "");
//
// 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>
#include <FShell_TemplateUtil.h>
#include <FShell_LiveboxManagerImpl.h>
-#include "FShell_LiveboxBase.h"
+#include "FShell_LiveboxContextBase.h"
// provider/src/fb.c
struct fb_info {
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)
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");
}
result
-_LiveboxBase::ReleaseSharedMem()
+_LiveboxContextBase::ReleaseSharedMem()
{
SysLog(NID_APP, "Enter");
}
Tizen::Base::Collection::HashMap*
-_LiveboxBase::CreateRequestArgs(void)
+_LiveboxContextBase::CreateRequestArgs(void)
{
HashMap* pArgs = new (std::nothrow) HashMap(SingleObjectDeleter);
pArgs->Construct();
}
result
-_LiveboxBase::SendRequestToApp(const AppId& appId, const String& operation, HashMap* pArgs)
+_LiveboxContextBase::SendRequestToApp(const AppId& appId, const String& operation, HashMap* pArgs)
{
if( __isForeground == false)
{
{
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);
//
// 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>
#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"
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;
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();
}
}
}
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
}
}
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();
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;
}
}
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;
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;
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;
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;
}
{
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;
}
{
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;
}
{
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;
}
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;
}
SysTryReturnResult(NID_APP, pServiceExecutableName != null, E_INVALID_ARG, "");
SysLog(NID_APP, "Enter.");
- __liveboxes.Construct();
+ __liveboxContextList.Construct();
/*!
* \note
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);
{
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);
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)
}
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;
}
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
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
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;
}
{
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();
//
// 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>
//
// 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>
#include <FApp_AppControlManager.h>
#include "FShell_LiveboxManagerService.h"
-#include "FShell_LiveboxPopup.h"
+#include "FShell_LiveboxPopupContext.h"
namespace Tizen { namespace Shell { namespace App
{
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();
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() );
}
result
-_LiveboxPopup::SendPopupDestroyRequest()
+_LiveboxPopupContext::SendPopupDestroyRequest()
{
std::unique_ptr<HashMap, AllElementsDeleter> pArgs (CreateRequestArgs() );
}
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 )
}
result
-_LiveboxPopup::RequestUpdateRemote()
+_LiveboxPopupContext::RequestUpdateRemote()
{
std::unique_ptr<char[]> packageName(_StringConverter::CopyToCharArrayN(__providerId));
std::unique_ptr<char[]> id(_StringConverter::CopyToCharArrayN(__instanceId));
//
// 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.
//
/**
OspLiveboxService::CreateInstance(void)
{
// Create the instance through the constructor.
- return new OspLiveboxService();
+ return new (std::nothrow) OspLiveboxService();
}
bool
//
// 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.
//
/**
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])));