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 FWebCtrl_WebEventArg.h
20 * @brief The file contains the declaration of _WebEventArg class.
22 * The file contains the declaration of _WebEvent class.
24 #ifndef _FWEB_CTRL_INTERNAL_WEB_EVENT_ARG_H_
25 #define _FWEB_CTRL_INTERNAL_WEB_EVENT_ARG_H_
27 #include <unique_ptr.h>
28 #include <FBaseColAllElementsDeleter.h>
29 #include <FBaseColHashMap.h>
30 #include <FBaseObject.h>
31 #include <FBaseByteBuffer.h>
32 #include <FBaseString.h>
33 #include <FBaseRtIEventArg.h>
38 namespace Tizen { namespace Web { namespace Controls
43 WEB_EVENT_REQUEST_SERVICE = 0x000,
44 WEB_EVENT_REQUEST_RTSP,
45 WEB_EVENT_REQUEST_EMAIL,
46 WEB_EVENT_REQUEST_TEL,
47 WEB_EVENT_REQUEST_SMS,
48 WEB_EVENT_REQUEST_MMS,
49 WEB_EVENT_REQUEST_UNKNOWN,
51 WEB_EVENT_DELIVER_JSBRIDGE_REQUEST = 0x100,
53 WEB_EVENT_LOADINGLISTENER = 0x200,
54 WEB_EVENT_LOADINGLISTENER_STARTED,
55 WEB_EVENT_LOADINGLISTENER_PROGRESS,
56 WEB_EVENT_LOADINGLISTENER_PAGETITLE_RECEIVED,
57 WEB_EVENT_LOADINGLISTENER_CANCELED,
58 WEB_EVENT_LOADINGLISTENER_ERROR_OCCURRED,
59 WEB_EVENT_LOADINGLISTENER_COMPLETED,
60 WEB_EVENT_LOADINGLISTENER_AUTHENTICATION_REQUESTED,
61 WEB_EVENT_LOADINGLISTENER_AUTHENTICATION_CANCELED,
63 WEB_EVENT_WEBDOWNLOADLISTENER = 0x300,
64 WEB_EVENT_WEBDOWNLOADLISTENER_DATA_RECEIVED,
65 WEB_EVENT_WEBDOWNLOADLISTENER_COMPLETED,
66 WEB_EVENT_WEBDOWNLOADLISTENER_FAILED,
68 WEB_EVENT_WEBUIEVENTLISTENER = 0x400,
69 WEB_EVENT_WEBUIEVENTLISTENER_PAGE_BLOCK_SELECTED,
70 WEB_EVENT_WEBUIEVENTLISTENER_PAGE_SHOW_REQUESTED,
71 WEB_EVENT_WEBUIEVENTLISTENER_WINDOW_CLOSE_REQUSTED,
73 WEB_EVENT_TEXTSEARCHLISTENER = 0x500,
74 WEB_EVENT_TEXTSEARCHLISTENER_TEXT_FOUND
78 : public Tizen::Base::Object
79 , public Tizen::Base::Runtime::IEventArg
82 _WebEventArg(int eventType, const Tizen::Base::String& message);
83 virtual ~_WebEventArg(void);
85 int GetEventType(void) const;
86 int GetEventGroup(void) const;
87 Tizen::Base::String GetEventMessage(void) const;
91 Tizen::Base::String __message;
99 virtual ~_JsBridgeArg(void);
101 result Construct(const char* pJsonText);
103 const Tizen::Base::ByteBuffer* GetJsonData(void) const;
107 _JsBridgeArg(const _JsBridgeArg& bridge);
109 // Assignment operator
110 _JsBridgeArg& operator =(const _JsBridgeArg& bridge);
113 std::unique_ptr<Tizen::Base::ByteBuffer> __pJsonText;
116 class _LoadingEventArg
117 : public _WebEventArg
120 _LoadingEventArg(int loadingEvent);
121 virtual ~_LoadingEventArg(void);
130 AUTHENTICATION_REALM,
131 AUTHENTICATION_CHALLENGE
134 result SetEventInfo(EventInfoKey key, const Tizen::Base::Object& value);
135 const Tizen::Base::Object* GetEventInfo(EventInfoKey key) const;
139 _LoadingEventArg(const _LoadingEventArg& rhs);
141 // Assignment operator
142 _LoadingEventArg& operator =(const _LoadingEventArg& rhs);
145 std::unique_ptr<Tizen::Base::Collection::HashMap, Tizen::Base::Collection::AllElementsDeleter> __pEventInfo;
147 }; // _LoadingEventArg
149 class _WebDownloadEventArg
150 : public _WebEventArg
153 _WebDownloadEventArg(int webDownloadEvent);
154 virtual ~_WebDownloadEventArg(void);
162 result SetEventInfo(EventInfoKey key, const Tizen::Base::Object& value);
163 const Tizen::Base::Object* GetEventInfo(EventInfoKey key) const;
167 _WebDownloadEventArg(const _WebDownloadEventArg& rhs);
169 // Assignment operator
170 _WebDownloadEventArg& operator =(const _WebDownloadEventArg& rhs);
173 std::unique_ptr<Tizen::Base::Collection::HashMap, Tizen::Base::Collection::AllElementsDeleter> __pEventInfo;
175 }; // _WebDownloadEventArg
178 : public _WebEventArg
181 _WebUiEventArg(int webUiEvent);
182 virtual ~_WebUiEventArg(void);
190 result SetEventInfo(EventInfoKey key, const Tizen::Base::Object& value);
191 const Tizen::Base::Object* GetEventInfo(EventInfoKey key) const;
195 _WebUiEventArg(const _WebUiEventArg& rhs);
197 // Assignment operator
198 _WebUiEventArg& operator =(const _WebUiEventArg& rhs);
201 std::unique_ptr<Tizen::Base::Collection::HashMap, Tizen::Base::Collection::AllElementsDeleter> __pEventInfo;
205 class _TextSearchEventArg
206 : public _WebEventArg
209 _TextSearchEventArg(int textFoundEvent);
210 virtual ~_TextSearchEventArg(void);
218 result SetEventInfo(EventInfoKey key, const Tizen::Base::Object& value);
219 const Tizen::Base::Object* GetEventInfo(EventInfoKey key) const;
223 _TextSearchEventArg(const _TextSearchEventArg& rhs);
225 // Assignment operator
226 _TextSearchEventArg& operator =(const _TextSearchEventArg& rhs);
229 std::unique_ptr<Tizen::Base::Collection::HashMap, Tizen::Base::Collection::AllElementsDeleter> __pEventInfo;
231 }; // _TextSearchEventArg
233 }}} // Tizen::Web::Controls
234 #endif // _FWEB_CTRL_INTERNAL_WEB_EVENT_ARG_H_