2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 * @file FShell_LiveboxContext.h
20 * @brief This is the header file for the _LiveboxContext class.
22 * This header file contains the declarations of the _LiveboxContext class.
25 #ifndef _FSHELL_INTERNAL_LIVEBOX_CONTEXT_H_
26 #define _FSHELL_INTERNAL_LIVEBOX_CONTEXT_H_
29 #include <provider_buffer.h>
31 #include <FAppTypes.h>
32 #include <FBaseRtTimer.h>
33 #include <FBaseObject.h>
34 #include <FBaseColArrayList.h>
36 #include "FShell_LiveboxContextBase.h"
39 #define MAX_PACKAGENAME 512
42 namespace Tizen { namespace Shell { namespace App
44 class _LiveboxPopupContext;
47 : public _LiveboxContextBase
48 ,public Tizen::Base::Runtime::ITimerEventListener
51 _LiveboxContext(const Tizen::Base::String& name, const Tizen::Base::String& appId, const Tizen::Base::String& instanceId,
52 int width, int height, int period, int priority);
53 virtual ~_LiveboxContext();
55 void OnUpdate(const Tizen::Base::String& argument);
56 void OnResize(int width, int height);
60 virtual void OnPopupCreated(int x, int y, int width, int height);
61 virtual void OnPopupDestoyed(void);
63 result RequestUpdateRemote(int width, int height);
65 _LiveboxPopupContext* GetLiveboxPopup() const;
66 virtual result SendTouchEvent(buffer_event event, double timestamp, double x, double y);
68 void RestartLifeDurationTimer();
71 result SendAddRequest(int width, int height);
72 result SendUpdateRequest(int width, int height, const Tizen::Base::String& argument);
73 result SendResizeRequest(int width, int height);
74 result SendRemoveRequest();
76 result SendRequestToApp(const Tizen::App::AppId& appId, const Tizen::Base::String& operation, Tizen::Base::Collection::HashMap* pArgs);
78 virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);
81 _LiveboxPopupContext* __pLiveboxPopup;
82 Tizen::Base::Runtime::Timer __lifeDurationTimer;
83 Tizen::Base::Runtime::Timer __UpdateTimer;
89 } } } // Tizen::Shell::App {
92 #endif // _FSHELL_INTERNAL_LIVEBOX_CONTEXT_H_