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,
62 WEB_EVENT_LOADINGLISTENER_FAVICON_RECEIVED,
64 WEB_EVENT_WEBDOWNLOADLISTENER = 0x300,
65 WEB_EVENT_WEBDOWNLOADLISTENER_DATA_RECEIVED,
66 WEB_EVENT_WEBDOWNLOADLISTENER_COMPLETED,
67 WEB_EVENT_WEBDOWNLOADLISTENER_FAILED,
69 WEB_EVENT_WEBUIEVENTLISTENER = 0x400,
70 WEB_EVENT_WEBUIEVENTLISTENER_PAGE_BLOCK_SELECTED,
71 WEB_EVENT_WEBUIEVENTLISTENER_PAGE_SHOW_REQUESTED,
72 WEB_EVENT_WEBUIEVENTLISTENER_WINDOW_CLOSE_REQUSTED,
73 WEB_EVENT_WEBUIEVENTLISTENER_PREVENT_DEFAULT_TRIGGERED,
75 WEB_EVENT_WEBUIEVENTLISTENER_FLOAT = 0x500,
76 WEB_EVENT_WEBUIEVENTLISTENER_PAGE_BLOCK_SELECTED_FLOAT,
77 WEB_EVENT_WEBUIEVENTLISTENER_PAGE_SHOW_REQUESTED_FLOAT,
78 WEB_EVENT_WEBUIEVENTLISTENER_WINDOW_CLOSE_REQUSTED_FLOAT,
79 WEB_EVENT_WEBUIEVENTLISTENER_PREVENT_DEFAULT_TRIGGERED_FLOAT,
81 WEB_EVENT_TEXTSEARCHLISTENER = 0x600,
82 WEB_EVENT_TEXTSEARCHLISTENER_TEXT_FOUND
86 : public Tizen::Base::Object
87 , public Tizen::Base::Runtime::IEventArg
90 _WebEventArg(int eventType, const Tizen::Base::String& message);
91 virtual ~_WebEventArg(void);
93 int GetEventType(void) const;
94 int GetEventGroup(void) const;
95 Tizen::Base::String GetEventMessage(void) const;
99 Tizen::Base::String __message;
103 : public _WebEventArg
107 virtual ~_JsBridgeArg(void);
109 result Construct(const char* pJsonText);
111 const Tizen::Base::ByteBuffer* GetJsonData(void) const;
115 _JsBridgeArg(const _JsBridgeArg& bridge);
117 // Assignment operator
118 _JsBridgeArg& operator =(const _JsBridgeArg& bridge);
121 std::unique_ptr<Tizen::Base::ByteBuffer> __pJsonText;
124 class _LoadingEventArg
125 : public _WebEventArg
128 _LoadingEventArg(int loadingEvent);
129 virtual ~_LoadingEventArg(void);
138 AUTHENTICATION_REALM,
139 AUTHENTICATION_CHALLENGE
142 result SetEventInfo(EventInfoKey key, const Tizen::Base::Object& value);
143 const Tizen::Base::Object* GetEventInfo(EventInfoKey key) const;
147 _LoadingEventArg(const _LoadingEventArg& rhs);
149 // Assignment operator
150 _LoadingEventArg& operator =(const _LoadingEventArg& rhs);
153 std::unique_ptr<Tizen::Base::Collection::HashMap, Tizen::Base::Collection::AllElementsDeleter> __pEventInfo;
155 }; // _LoadingEventArg
157 class _WebDownloadEventArg
158 : public _WebEventArg
161 _WebDownloadEventArg(int webDownloadEvent);
162 virtual ~_WebDownloadEventArg(void);
170 result SetEventInfo(EventInfoKey key, const Tizen::Base::Object& value);
171 const Tizen::Base::Object* GetEventInfo(EventInfoKey key) const;
175 _WebDownloadEventArg(const _WebDownloadEventArg& rhs);
177 // Assignment operator
178 _WebDownloadEventArg& operator =(const _WebDownloadEventArg& rhs);
181 std::unique_ptr<Tizen::Base::Collection::HashMap, Tizen::Base::Collection::AllElementsDeleter> __pEventInfo;
183 }; // _WebDownloadEventArg
186 : public _WebEventArg
189 _WebUiEventArg(int webUiEvent);
190 virtual ~_WebUiEventArg(void);
199 result SetEventInfo(EventInfoKey key, const Tizen::Base::Object& value);
200 const Tizen::Base::Object* GetEventInfo(EventInfoKey key) const;
204 _WebUiEventArg(const _WebUiEventArg& rhs);
206 // Assignment operator
207 _WebUiEventArg& operator =(const _WebUiEventArg& rhs);
210 std::unique_ptr<Tizen::Base::Collection::HashMap, Tizen::Base::Collection::AllElementsDeleter> __pEventInfo;
214 class _TextSearchEventArg
215 : public _WebEventArg
218 _TextSearchEventArg(int textFoundEvent);
219 virtual ~_TextSearchEventArg(void);
227 result SetEventInfo(EventInfoKey key, const Tizen::Base::Object& value);
228 const Tizen::Base::Object* GetEventInfo(EventInfoKey key) const;
232 _TextSearchEventArg(const _TextSearchEventArg& rhs);
234 // Assignment operator
235 _TextSearchEventArg& operator =(const _TextSearchEventArg& rhs);
238 std::unique_ptr<Tizen::Base::Collection::HashMap, Tizen::Base::Collection::AllElementsDeleter> __pEventInfo;
240 }; // _TextSearchEventArg
242 }}} // Tizen::Web::Controls
243 #endif // _FWEB_CTRL_INTERNAL_WEB_EVENT_ARG_H_