d586caf7a15e02f7d386fd86ed3620cf914b0cd7
[framework/osp/appwidget-service.git] / inc / FShell_AppWidgetRemoteBuffer.h
1 //
2 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
3 //
4 // Licensed under the Flora License, Version 1.1 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 //     http://floralicense.org/license/
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16
17 /**
18  * @file        FShell_AppWidgetRemoteBuffer.h
19  * @brief       This is the header file for the _AppWidgetRemoteBuffer class.
20  *
21  * This header file contains the declarations of the _AppWidgetRemoteBuffer class.
22  */
23
24 #ifndef _FSHELL_APPWIDGET_REMOTE_BUFFER_H_
25 #define _FSHELL_APPWIDGET_REMOTE_BUFFER_H_
26
27 #include <FBaseRtIEventListener.h>
28 #include <provider_buffer.h>
29
30 namespace Tizen { namespace Shell  { namespace App
31 {
32
33 class _IAppWidgetRemoteBufferEventListener
34         : virtual public Tizen::Base::Runtime::IEventListener
35 {
36 public:
37                 _IAppWidgetRemoteBufferEventListener(void){}
38                 ~_IAppWidgetRemoteBufferEventListener(void){}
39
40                 virtual void OnTouchEventReceived(buffer_event event, double timestamp, double x, double y) = 0;
41 };
42
43 class _AppWidgetRemoteBuffer
44         :public Tizen::Base::Object
45 {
46 public:
47         _AppWidgetRemoteBuffer(const Tizen::Base::String& providerId, const Tizen::Base::String& instanceId, target_type type, _IAppWidgetRemoteBufferEventListener* pListener);
48         ~_AppWidgetRemoteBuffer(void);
49
50         int Acquire(int w, int h);
51
52 private:
53         result Release(void);
54
55 private:
56         target_type __type;
57         Tizen::Base::String __providerId;
58         Tizen::Base::String __instanceId;
59         void* __buffer;
60         struct livebox_buffer* __buffer_info;
61         _IAppWidgetRemoteBufferEventListener* __pListener;
62
63 };      // class _AppWidgetRemoteBuffer
64
65 }}} // Tizen::Shell::App
66
67 #endif // _FSHELL_APPWIDGET_REMOTE_BUFFER_H_