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_LiveboxContextBase.h
20 * @brief This is the header file for the _LiveboxContextBase class.
22 * This header file contains the declarations of the _LiveboxContextBase class.
25 #ifndef _FSHELL_INTERNAL_LIVEBOX_CONTEXT_BASE_H_
26 #define _FSHELL_INTERNAL_LIVEBOX_CONTEXT_BASE_H_
30 #include <FAppTypes.h>
31 #include <FBaseObject.h>
32 #include <FBaseColHashMap.h>
34 #define LIVEBOX_PROVIDER_ID_ENABLE true
36 typedef struct _bundle_t bundle;//TODO move code to osp-appfw
38 namespace Tizen { namespace Shell { namespace App
41 class _LiveboxContextBase:
42 public Tizen::Base::Object
45 _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);
46 virtual ~_LiveboxContextBase();
48 virtual void OnPopupCreated(int width, int height) = 0;
49 virtual void OnPopupDestoyed(void) = 0;
51 virtual result SendTouchEvent(buffer_event event, double timestamp, double x, double y) = 0;
53 void SetClientId(int clientId);
54 bool HasValidClientId() const;
55 // for buffered livebox
56 int GetSharedMemId(int w, int h);
57 result ReleaseSharedMem();
61 Tizen::Base::Collection::HashMap* CreateRequestArgs(void);
62 result SendRequestToApp(const Tizen::App::AppId& appId, const Tizen::Base::String& operation, Tizen::Base::Collection::HashMap* pArgs);
66 Tizen::Base::String __userInfo;
67 Tizen::Base::String __appId;
68 Tizen::Base::String __providerName;
69 Tizen::Base::String __providerId;
70 Tizen::Base::String __instanceId;
76 bool __isForeground;// LB only?
81 struct livebox_buffer *__buffer_info;
84 class _LiveboxRequestHelper
87 static result SendRequestToApp(const Tizen::App::AppId& appId, const Tizen::Base::String& operation, Tizen::Base::Collection::HashMap* pArgs);
88 // static result AddStrArrayToBundle(bundle* b, const char* key, const Tizen::Base::Collection::IList* pList);
89 // static result ExtractPackageIdAndExecutableName(Tizen::App::AppId inAppId, Tizen::Base::String& outPackageId, Tizen::Base::String& outExecutableName);
93 } /* namespace Livebox */
94 } /* namespace Samsung */
95 #endif // _FSHELL_INTERNAL_LIVEBOX_CONTEXT_BASE_H_