From a40879cca5364991ddefb2dbb01715c695200f9a Mon Sep 17 00:00:00 2001 From: HyungKyu Song Date: Sat, 16 Feb 2013 00:55:18 +0900 Subject: Tizen 2.0 Release --- AUTHORS | 5 + CMakeLists.txt | 157 + LICENSE.APLv2.0 | 202 ++ NOTICE | 3 + inc/FWeb.h | 60 + inc/FWebControls.h | 61 + inc/FWebCtrlAuthenticationChallenge.h | 100 + inc/FWebCtrlGeolocationPermissionManager.h | 227 ++ inc/FWebCtrlHitElementResult.h | 166 + inc/FWebCtrlIJavaScriptBridge.h | 125 + inc/FWebCtrlILoadingListener.h | 267 ++ inc/FWebCtrlITextSearchListener.h | 87 + inc/FWebCtrlIWebDownloadListener.h | 153 + inc/FWebCtrlIWebKeypadEventListener.h | 148 + inc/FWebCtrlIWebUiEventListener.h | 147 + inc/FWebCtrlPageNavigationList.h | 140 + inc/FWebCtrlWeb.h | 771 ++++ inc/FWebCtrlWebSetting.h | 354 ++ inc/FWebHistoryItem.h | 130 + inc/FWebWebHistory.h | 133 + osp-web.manifest | 5 + osp-web.pc.in | 14 + packaging/osp-web.spec | 106 + src/FWebHistoryItem.cpp | 84 + src/FWebWebHistory.cpp | 110 + src/FWeb_HistoryItemImpl.cpp | 166 + src/FWeb_HistoryItemImpl.h | 68 + src/FWeb_WebHistoryImpl.cpp | 143 + src/FWeb_WebHistoryImpl.h | 61 + src/controls/FWebCtrlAuthenticationChallenge.cpp | 85 + .../FWebCtrlGeolocationPermissionManager.cpp | 195 + src/controls/FWebCtrlHitElementResult.cpp | 120 + src/controls/FWebCtrlPageNavigationList.cpp | 97 + src/controls/FWebCtrlWeb.cpp | 757 ++++ src/controls/FWebCtrlWebSetting.cpp | 323 ++ src/controls/FWebCtrl_AppControlListener.cpp | 163 + src/controls/FWebCtrl_AppControlListener.h | 106 + src/controls/FWebCtrl_AuthConfirmPopup.cpp | 292 ++ src/controls/FWebCtrl_AuthConfirmPopup.h | 95 + .../FWebCtrl_AuthenticationChallengeImpl.cpp | 105 + .../FWebCtrl_AuthenticationChallengeImpl.h | 65 + src/controls/FWebCtrl_EflWebkit.cpp | 230 ++ src/controls/FWebCtrl_EflWebkit.h | 76 + src/controls/FWebCtrl_GeolocationConfirmPopup.cpp | 327 ++ src/controls/FWebCtrl_GeolocationConfirmPopup.h | 96 + .../FWebCtrl_GeolocationPermissionManagerImpl.cpp | 214 ++ .../FWebCtrl_GeolocationPermissionManagerImpl.h | 78 + src/controls/FWebCtrl_GestureState.cpp | 639 ++++ src/controls/FWebCtrl_GestureState.h | 168 + src/controls/FWebCtrl_HitElementResultImpl.cpp | 154 + src/controls/FWebCtrl_HitElementResultImpl.h | 88 + src/controls/FWebCtrl_IWebEventListener.h | 54 + src/controls/FWebCtrl_InputPickerPopup.cpp | 676 ++++ src/controls/FWebCtrl_InputPickerPopup.h | 133 + src/controls/FWebCtrl_PageNavigationListImpl.cpp | 105 + src/controls/FWebCtrl_PageNavigationListImpl.h | 76 + src/controls/FWebCtrl_PromptPopup.cpp | 275 ++ src/controls/FWebCtrl_PromptPopup.h | 84 + src/controls/FWebCtrl_SelectBox.cpp | 581 +++ src/controls/FWebCtrl_SelectBox.h | 133 + src/controls/FWebCtrl_Utility.cpp | 120 + src/controls/FWebCtrl_Utility.h | 53 + src/controls/FWebCtrl_Web.cpp | 643 ++++ src/controls/FWebCtrl_Web.h | 176 + src/controls/FWebCtrl_WebDataHandler.cpp | 257 ++ src/controls/FWebCtrl_WebDataHandler.h | 72 + src/controls/FWebCtrl_WebEvent.cpp | 122 + src/controls/FWebCtrl_WebEvent.h | 76 + src/controls/FWebCtrl_WebEventArg.cpp | 317 ++ src/controls/FWebCtrl_WebEventArg.h | 234 ++ src/controls/FWebCtrl_WebImpl.cpp | 3823 ++++++++++++++++++++ src/controls/FWebCtrl_WebImpl.h | 408 +++ src/controls/FWebCtrl_WebMaker.cpp | 243 ++ src/controls/FWebCtrl_WebPresenter.cpp | 123 + src/controls/FWebCtrl_WebPresenter.h | 70 + src/controls/FWebCtrl_WebSettingImpl.cpp | 336 ++ src/controls/FWebCtrl_WebSettingImpl.h | 146 + .../js-bridge-plugin-deprecated/CMakeLists.txt | 41 + .../FWebCtrl_JsBridgePlugin.cpp | 327 ++ .../FWebCtrl_JsBridgePlugin.h | 68 + src/controls/js-bridge-plugin-tizen/CMakeLists.txt | 41 + .../FWebCtrl_JsBridgePlugin.cpp | 327 ++ .../FWebCtrl_JsBridgePlugin.h | 68 + 83 files changed, 18874 insertions(+) create mode 100644 AUTHORS create mode 100755 CMakeLists.txt create mode 100755 LICENSE.APLv2.0 create mode 100755 NOTICE create mode 100755 inc/FWeb.h create mode 100755 inc/FWebControls.h create mode 100755 inc/FWebCtrlAuthenticationChallenge.h create mode 100755 inc/FWebCtrlGeolocationPermissionManager.h create mode 100755 inc/FWebCtrlHitElementResult.h create mode 100644 inc/FWebCtrlIJavaScriptBridge.h create mode 100755 inc/FWebCtrlILoadingListener.h create mode 100755 inc/FWebCtrlITextSearchListener.h create mode 100755 inc/FWebCtrlIWebDownloadListener.h create mode 100755 inc/FWebCtrlIWebKeypadEventListener.h create mode 100644 inc/FWebCtrlIWebUiEventListener.h create mode 100755 inc/FWebCtrlPageNavigationList.h create mode 100755 inc/FWebCtrlWeb.h create mode 100755 inc/FWebCtrlWebSetting.h create mode 100755 inc/FWebHistoryItem.h create mode 100755 inc/FWebWebHistory.h create mode 100644 osp-web.manifest create mode 100755 osp-web.pc.in create mode 100755 packaging/osp-web.spec create mode 100755 src/FWebHistoryItem.cpp create mode 100755 src/FWebWebHistory.cpp create mode 100755 src/FWeb_HistoryItemImpl.cpp create mode 100755 src/FWeb_HistoryItemImpl.h create mode 100755 src/FWeb_WebHistoryImpl.cpp create mode 100755 src/FWeb_WebHistoryImpl.h create mode 100755 src/controls/FWebCtrlAuthenticationChallenge.cpp create mode 100755 src/controls/FWebCtrlGeolocationPermissionManager.cpp create mode 100755 src/controls/FWebCtrlHitElementResult.cpp create mode 100755 src/controls/FWebCtrlPageNavigationList.cpp create mode 100755 src/controls/FWebCtrlWeb.cpp create mode 100755 src/controls/FWebCtrlWebSetting.cpp create mode 100755 src/controls/FWebCtrl_AppControlListener.cpp create mode 100644 src/controls/FWebCtrl_AppControlListener.h create mode 100755 src/controls/FWebCtrl_AuthConfirmPopup.cpp create mode 100755 src/controls/FWebCtrl_AuthConfirmPopup.h create mode 100755 src/controls/FWebCtrl_AuthenticationChallengeImpl.cpp create mode 100644 src/controls/FWebCtrl_AuthenticationChallengeImpl.h create mode 100755 src/controls/FWebCtrl_EflWebkit.cpp create mode 100755 src/controls/FWebCtrl_EflWebkit.h create mode 100755 src/controls/FWebCtrl_GeolocationConfirmPopup.cpp create mode 100755 src/controls/FWebCtrl_GeolocationConfirmPopup.h create mode 100755 src/controls/FWebCtrl_GeolocationPermissionManagerImpl.cpp create mode 100755 src/controls/FWebCtrl_GeolocationPermissionManagerImpl.h create mode 100755 src/controls/FWebCtrl_GestureState.cpp create mode 100755 src/controls/FWebCtrl_GestureState.h create mode 100755 src/controls/FWebCtrl_HitElementResultImpl.cpp create mode 100755 src/controls/FWebCtrl_HitElementResultImpl.h create mode 100644 src/controls/FWebCtrl_IWebEventListener.h create mode 100755 src/controls/FWebCtrl_InputPickerPopup.cpp create mode 100755 src/controls/FWebCtrl_InputPickerPopup.h create mode 100755 src/controls/FWebCtrl_PageNavigationListImpl.cpp create mode 100755 src/controls/FWebCtrl_PageNavigationListImpl.h create mode 100755 src/controls/FWebCtrl_PromptPopup.cpp create mode 100644 src/controls/FWebCtrl_PromptPopup.h create mode 100755 src/controls/FWebCtrl_SelectBox.cpp create mode 100644 src/controls/FWebCtrl_SelectBox.h create mode 100755 src/controls/FWebCtrl_Utility.cpp create mode 100755 src/controls/FWebCtrl_Utility.h create mode 100755 src/controls/FWebCtrl_Web.cpp create mode 100755 src/controls/FWebCtrl_Web.h create mode 100755 src/controls/FWebCtrl_WebDataHandler.cpp create mode 100644 src/controls/FWebCtrl_WebDataHandler.h create mode 100755 src/controls/FWebCtrl_WebEvent.cpp create mode 100755 src/controls/FWebCtrl_WebEvent.h create mode 100755 src/controls/FWebCtrl_WebEventArg.cpp create mode 100755 src/controls/FWebCtrl_WebEventArg.h create mode 100755 src/controls/FWebCtrl_WebImpl.cpp create mode 100755 src/controls/FWebCtrl_WebImpl.h create mode 100755 src/controls/FWebCtrl_WebMaker.cpp create mode 100755 src/controls/FWebCtrl_WebPresenter.cpp create mode 100755 src/controls/FWebCtrl_WebPresenter.h create mode 100755 src/controls/FWebCtrl_WebSettingImpl.cpp create mode 100644 src/controls/FWebCtrl_WebSettingImpl.h create mode 100755 src/controls/js-bridge-plugin-deprecated/CMakeLists.txt create mode 100755 src/controls/js-bridge-plugin-deprecated/FWebCtrl_JsBridgePlugin.cpp create mode 100644 src/controls/js-bridge-plugin-deprecated/FWebCtrl_JsBridgePlugin.h create mode 100755 src/controls/js-bridge-plugin-tizen/CMakeLists.txt create mode 100755 src/controls/js-bridge-plugin-tizen/FWebCtrl_JsBridgePlugin.cpp create mode 100644 src/controls/js-bridge-plugin-tizen/FWebCtrl_JsBridgePlugin.h diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..f4eb641 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,5 @@ +Jaegyu Jung +Kyungeun Park +Seongjun Yim +Hyun Lee +Hyunseok Yang diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100755 index 0000000..a4e01fe --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,157 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 2.6) +SET(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/cmake_build_tmp/output) +ADD_SUBDIRECTORY(src/controls/js-bridge-plugin-deprecated) +ADD_SUBDIRECTORY(src/controls/js-bridge-plugin-tizen) + +SET (this_target osp-web) + +INCLUDE_DIRECTORIES( + inc + src + src/controls + /usr/include/appfw + /usr/include/glib-2.0 + /usr/lib/glib-2.0/include + /usr/include/curl + /usr/include/dbus-1.0 + /usr/lib/dbus-1.0/include + /usr/include/e_dbus-1 + /usr/include/ecore-1 + /usr/include/edje-1 + /usr/include/eet-1 + /usr/include/efreet-1 + /usr/include/eina-1 + /usr/include/eina-1/eina + /usr/include/elementary-1 + /usr/include/ethumb-1 + /usr/include/evas-1 + /usr/include/ewebkit2-0 + /usr/include/ewebkit2-0/WebKit2 + /usr/include/libsoup-2.4 + /usr/include/network + /usr/include/osp + /usr/include/osp/app + /usr/include/osp/base + /usr/include/osp/io + /usr/include/osp/net + /usr/include/osp/security + /usr/include/osp/system + /usr/include/osp/graphics + /usr/include/osp/content + /usr/include/osp/ui + /usr/include/web + /usr/include/vconf + ) + +SET (${this_target}_SOURCE_FILES + src/FWebHistoryItem.cpp + src/FWeb_HistoryItemImpl.cpp + src/FWebWebHistory.cpp + src/FWeb_WebHistoryImpl.cpp + src/controls/FWebCtrlWeb.cpp + src/controls/FWebCtrl_WebImpl.cpp + src/controls/FWebCtrl_AuthConfirmPopup.cpp + src/controls/FWebCtrl_Web.cpp + src/controls/FWebCtrl_EflWebkit.cpp + src/controls/FWebCtrl_WebEventArg.cpp + src/controls/FWebCtrl_WebEvent.cpp + src/controls/FWebCtrlPageNavigationList.cpp + src/controls/FWebCtrl_PageNavigationListImpl.cpp + src/controls/FWebCtrlWebSetting.cpp + src/controls/FWebCtrl_WebSettingImpl.cpp + src/controls/FWebCtrlHitElementResult.cpp + src/controls/FWebCtrl_HitElementResultImpl.cpp + src/controls/FWebCtrl_SelectBox.cpp + src/controls/FWebCtrlAuthenticationChallenge.cpp + src/controls/FWebCtrl_AuthenticationChallengeImpl.cpp + src/controls/FWebCtrl_WebMaker.cpp + src/controls/FWebCtrl_AppControlListener.cpp + src/controls/FWebCtrl_WebPresenter.cpp + src/controls/FWebCtrl_PromptPopup.cpp + src/controls/FWebCtrl_Utility.cpp + src/controls/FWebCtrl_GeolocationConfirmPopup.cpp + src/controls/FWebCtrl_GestureState.cpp + src/controls/FWebCtrl_WebDataHandler.cpp + src/controls/FWebCtrlGeolocationPermissionManager.cpp + src/controls/FWebCtrl_GeolocationPermissionManagerImpl.cpp + src/controls/FWebCtrl_InputPickerPopup.cpp +) +## Add Definitions +ADD_DEFINITIONS(${OSP_DEFINITIONS} -D_MODEL_RES_WVGA) + +SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -Wall" ) + +## SET C COMPILER FLAGS +SET(CMAKE_C_FLAGS "${OSP_DEBUG_FLAGS} ${OSP_OPT_FLAGS} ${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} ${OSP_COMPILER_FLAGS}") + +## SET CPP COMPILER FLAGS +SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden") +SET(CMAKE_CXX_FLAGS "${OSP_DEBUG_FLAGS} ${OSP_OPT_FLAGS} ${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS} ${OSP_COMPILER_FLAGS}") + +## Create Library +ADD_LIBRARY (${this_target} SHARED ${${this_target}_SOURCE_FILES}) + +## SET LINKER FLAGS +SET(CMAKE_SHARED_LINKER_FLAGS -Wl,--no-undefined) + +TARGET_LINK_LIBRARIES(${this_target} "-L/usr/lib/osp -losp-appfw" ) +TARGET_LINK_LIBRARIES(${this_target} "-losp-content" ) +TARGET_LINK_LIBRARIES(${this_target} "-losp-json" ) +TARGET_LINK_LIBRARIES(${this_target} "-losp-uifw" ) +TARGET_LINK_LIBRARIES(${this_target} "-losp-image" ) +TARGET_LINK_LIBRARIES(${this_target} "-losp-media" ) +TARGET_LINK_LIBRARIES(${this_target} "-losp-net" ) +TARGET_LINK_LIBRARIES(${this_target} "-lecore" ) +TARGET_LINK_LIBRARIES(${this_target} "-lelementary" ) +TARGET_LINK_LIBRARIES(${this_target} "-levas" ) +TARGET_LINK_LIBRARIES(${this_target} "-leina" ) +TARGET_LINK_LIBRARIES(${this_target} "-lewebkit2" ) +TARGET_LINK_LIBRARIES(${this_target} "-lcapi-web-favorites" ) +TARGET_LINK_LIBRARIES(${this_target} "-lcapi-network-connection" ) +TARGET_LINK_LIBRARIES(${this_target} "-lpthread" ) +TARGET_LINK_LIBRARIES(${this_target} "-lvconf" ) + +SET_TARGET_PROPERTIES(${this_target} + PROPERTIES + VERSION ${FULLVER} + SOVERSION ${MAJORVER} + CLEAN_DIRECT_OUTPUT 1 + ) + +ADD_CUSTOM_COMMAND(TARGET ${this_target} + POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy ${LIBRARY_OUTPUT_PATH}/${CMAKE_SHARED_LIBRARY_PREFIX}${this_target}${CMAKE_SHARED_LIBRARY_SUFFIX} ${LIBRARY_OUTPUT_PATH}/debug/${CMAKE_SHARED_LIBRARY_PREFIX}${this_target}${CMAKE_SHARED_LIBRARY_SUFFIX}.${FULLVER} + COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_SHARED_LIBRARY_PREFIX}${this_target}${CMAKE_SHARED_LIBRARY_SUFFIX}.${FULLVER} ${LIBRARY_OUTPUT_PATH}/debug/${CMAKE_SHARED_LIBRARY_PREFIX}${this_target}${CMAKE_SHARED_LIBRARY_SUFFIX}.${MAJORVER} + COMMAND ${CMAKE_STRIP} --strip-unneeded ${LIBRARY_OUTPUT_PATH}/${CMAKE_SHARED_LIBRARY_PREFIX}${this_target}${CMAKE_SHARED_LIBRARY_SUFFIX} + COMMENT "strip ${this_target}" + ) + +INSTALL(DIRECTORY ${LIBRARY_OUTPUT_PATH}/ DESTINATION lib/osp + FILES_MATCHING PATTERN "libosp-*" PATTERN + PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ + GROUP_EXECUTE GROUP_READ + WORLD_EXECUTE WORLD_READ) +INSTALL(DIRECTORY ${LIBRARY_OUTPUT_PATH}/ DESTINATION lib/osp/browser-plugin + FILES_MATCHING PATTERN "libweb-*" PATTERN + PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ + GROUP_EXECUTE GROUP_READ + WORLD_EXECUTE WORLD_READ) + +INSTALL(DIRECTORY ${LIBRARY_OUTPUT_PATH}/debug/ DESTINATION lib/osp/debug + FILES_MATCHING PATTERN "libosp-*" + PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ + GROUP_EXECUTE GROUP_READ + WORLD_EXECUTE WORLD_READ) +INSTALL(DIRECTORY ${LIBRARY_OUTPUT_PATH}/debug/ DESTINATION lib/osp/browser-plugin/debug + FILES_MATCHING PATTERN "libweb-*" + PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ + GROUP_EXECUTE GROUP_READ + WORLD_EXECUTE WORLD_READ) + + +INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/inc/ DESTINATION include/osp FILES_MATCHING PATTERN "*.h") + +# pkgconfig file +CONFIGURE_FILE(${this_target}.pc.in ${CMAKE_SOURCE_DIR}/${this_target}.pc @ONLY) +INSTALL(FILES ${CMAKE_SOURCE_DIR}/${this_target}.pc DESTINATION lib/pkgconfig) + diff --git a/LICENSE.APLv2.0 b/LICENSE.APLv2.0 new file mode 100755 index 0000000..d645695 --- /dev/null +++ b/LICENSE.APLv2.0 @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/NOTICE b/NOTICE new file mode 100755 index 0000000..ccdad52 --- /dev/null +++ b/NOTICE @@ -0,0 +1,3 @@ +Copyright (c) Samsung Electronics Co., Ltd. All rights reserved. +Except as noted, this software is licensed under Apache License, Version 2. +Please, see the LICENSE file for Apache License terms and conditions. diff --git a/inc/FWeb.h b/inc/FWeb.h new file mode 100755 index 0000000..d7f4157 --- /dev/null +++ b/inc/FWeb.h @@ -0,0 +1,60 @@ +// +// Open Service Platform +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FWeb.h + * @brief This is the header file for the %Web namespace. + * + * This header file contains the declarations and descriptions of the %Web namespace. + */ +#ifndef _FWEB_H_ +#define _FWEB_H_ + +#include +#include + +//Controls namespace +#include + +//Json namespace +#include + +/** + * @namespace Tizen::Web + * @brief This namespace contains classes to manage the history data. + * @since 2.0 + * + * @remarks @b Header @b %file: @b \#include @b @n + * @b Library : @b osp-web + * + * + * The %Web namespace contains classes and interfaces for browsing, tracking browsing history, downloading %Web content, and manipulating JSON documents. + * @n + * For more information on the %Web namespace features, see Web Guide. + * + * The following diagram illustrates the relationships between the classes belonging to the %Web namespace. + * + * @image html web_namespace_classdiagram.png + * + * + * + */ +namespace Tizen { namespace Web +{ + +}} // Tizen::Web +#endif diff --git a/inc/FWebControls.h b/inc/FWebControls.h new file mode 100755 index 0000000..450316a --- /dev/null +++ b/inc/FWebControls.h @@ -0,0 +1,61 @@ +// +// Open Service Platform +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FWebControls.h + * @brief This is the header file for the %Controls namespace. + * + * This header file contains the declarations and descriptions of the %Controls namespace. + */ +#ifndef _FWEB_CONTROLS_H_ +#define _FWEB_CONTROLS_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/** + * @namespace Tizen::Web::Controls + * @brief This namespace contains classes and interfaces to interact with the browser engine. + * @since 2.0 + * + * @remarks @b Header @b %file: @b \#include @b @n + * @b Library : @b osp-web + * + * The %Web::Controls namespace allows you to embed the %Web browser as a control within an application, to upload and download content, and retrieve the HyperText Markup Language (HTML) element and history details. + * @n + * For more information on the %Controls namespace features, see Web Controls Guide. + * + * The following diagram illustrates the relationships between the classes belonging to the %Controls namespace. + * + * @image html web_controls_namespace_classdiagram.png + * + */ +namespace Tizen { namespace Web { namespace Controls +{ + +}}} // Tizen::Web::Controls +#endif // _FWEB_CONTROLS_H_ diff --git a/inc/FWebCtrlAuthenticationChallenge.h b/inc/FWebCtrlAuthenticationChallenge.h new file mode 100755 index 0000000..69343db --- /dev/null +++ b/inc/FWebCtrlAuthenticationChallenge.h @@ -0,0 +1,100 @@ +// +// Open Service Platform +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FWebCtrlAuthenticationChallenge.h + * @brief This is the header file for the %AuthenticationChallenge class. + * + * This header file contains the declarations of the %AuthenticationChallenge class. + */ + +#ifndef _FWEB_CTRL_AUTHENTICATION_CHALLENGE_H_ +#define _FWEB_CTRL_AUTHENTICATION_CHALLENGE_H_ + +#include +#include +#include + +namespace Tizen { namespace Web { namespace Controls +{ + +/** + * + * @class AuthenticationChallenge + * @brief This class handles the HyperText Transfer Protocol (HTTP) authentication requests. + * + * @since 2.0 + * + * The %AuthenticationChallenge class sends the user ID and password to the server requesting user authentication. + * @n + * For more information on the class features, see Web Controls Guide. + */ +class _OSP_EXPORT_ AuthenticationChallenge + : public Tizen::Base::Object +{ +public: + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~AuthenticationChallenge(void); + + /** + * Sends the user ID and password to the host. + * + * @since 2.0 + * + * @privilege %http://tizen.org/privilege/web.privacy + * + * @param[in] userId The user ID for authentication + * @param[in] password The password for authentication + * @exception E_SUCCESS The method is successful. + * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + void Process(const UserId& userId, const Tizen::Base::String& password); + + /** + * Cancels the authentication request. + * + * @since 2.0 + * + * @privilege %http://tizen.org/privilege/web.privacy + * + * @exception E_SUCCESS The method is successful. + * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + void Cancel(void); + +private : + // + // This is the constructor for the %AuthenticationChallenge class. + // + // @remarks This constructor is hidden. + // + AuthenticationChallenge(void); + +private: + friend class _WebImpl; + friend class _AuthenticationChallengeImpl; + class _AuthenticationChallengeImpl* __pAuthenticationChallengeImpl; +}; // AuthenticationChallenge + +}}} // Tizen::Web::Controls +#endif // _FWEB_CTRL_AUTHENTICATION_CHALLENGE_H_ diff --git a/inc/FWebCtrlGeolocationPermissionManager.h b/inc/FWebCtrlGeolocationPermissionManager.h new file mode 100755 index 0000000..37dc548 --- /dev/null +++ b/inc/FWebCtrlGeolocationPermissionManager.h @@ -0,0 +1,227 @@ +// Open Service Platform +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @if VISPARTNER-MANUFACTURER + * @file FWebCtrlGeolocationPermissionManager.h + * @brief This is the header file for the %GeolocationPermissionManager class. + * @visibility partner-manufacturer + * + * This header file contains the declarations of the %GeolocationPermissionManager class. + * + * @endif + */ +#ifndef _FWEB_CTRL_GEOLOCATION_PERMISSION_MANAGER_H_ +#define _FWEB_CTRL_GEOLOCATION_PERMISSION_MANAGER_H_ + +#include +#include + +namespace Tizen { namespace Base { namespace Collection +{ +class IList; +}}} // Tizen::Base::Collection + +namespace Tizen { namespace Web { namespace Controls +{ + +class _GeolocationPermissionManagerImpl; + +/** + * @if VISPARTNER-MANUFACTURER + * @class GeolocationPermissionManager + * @brief This class provides methods to manage geolocation permissions. + * + * @since 2.0 + * + * @visibility partner-manufacturer + * @privilege %http://tizen.org/privilege/web.privacy + * + * The %GeolocationPermissionManager class provides methods to manage geolocation permissions decided by a user from origins using html5 JavaScript geolocation APIs. + * @n + * Origin consists of the scheme, host, and port. + * @endif + */ + +class _OSP_EXPORT_ GeolocationPermissionManager + : public Tizen::Base::Object +{ +public: + + /** + * @if VISPARTNER-MANUFACTURER + * Gets the origin list stored at the geolocation database. + * + * @since 2.0 + * + * @visibility partner-manufacturer + * @privilege %http://tizen.org/privilege/web.privacy + * + * @return A pointer to IList containing origin(Tizen::Base::String) list, @n + * else @c null if no geolocation permission data exists + * @exception E_SUCCESS The method is successful. + * @exception E_SERVICE_BUSY The dedicated service module is too busy to handle another request. + * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. + * @remarks The specific error code can be accessed using the GetLastResult() method. + * @endif + */ + Tizen::Base::Collection::IList* GetOriginListN(void) const; + + /** + * @if VISPARTNER-MANUFACTURER + * Checks whether geolocation permission is allowed or not for the specified @c origin. + * + * @since 2.0 + * + * @visibility partner-manufacturer + * @privilege %http://tizen.org/privilege/web.privacy + * + * @return @c true if geolocation permission is allowed, @n + * else @c false + * @param[in] origin The origin + * @exception E_SUCCESS The method is successful. + * @exception E_DATA_NOT_FOUND There is no permission data for the specified @c origin. + * @exception E_SERVICE_BUSY The dedicated service module is too busy to handle another request. + * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. + * @remarks The specific error code can be accessed using the GetLastResult() method. + * @endif + */ + bool IsPermissionAllowed(const Tizen::Base::String& origin) const; + + /** + * @if VISPARTNER-MANUFACTURER + * Removes the geolocation data for the specified @c origin. + * + * @since 2.0 + * + * @visibility partner-manufacturer + * @privilege %http://tizen.org/privilege/web.privacy + * + * @return An error code + * @param[in] origin The origin + * @exception E_SUCCESS The method is successful. + * @exception E_DATA_NOT_FOUND There is no permission data for the specified @c origin. + * @exception E_SERVICE_BUSY The dedicated service module is too busy to handle another request. + * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. + * @see RemoveAll() + * @endif + */ + result Remove(const Tizen::Base::String& origin); + + /** + * @if VISPARTNER-MANUFACTURER + * Removes all elements in the list. + * + * @since 2.0 + * + * @visibility partner-manufacturer + * @privilege %http://tizen.org/privilege/web.privacy + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SERVICE_BUSY The dedicated service module is too busy to handle another request. + * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. + * @see Remove() + * @endif + */ + result RemoveAll(void); + + /** + * @if VISPARTNER-MANUFACTURER + * Gets the geolocation permission manager instance. + * + * @since 2.0 + * + * @visibility partner-manufacturer + * @privilege %http://tizen.org/privilege/web.privacy + * + * @return A pointer to the %GeolocationPermissionManager instance, @n + * else @c null if it fails + * @exception E_SUCCESS The method is successful. + * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. + * @remarks The specific error code can be accessed using the GetLastResult() method. + * @endif + */ + static GeolocationPermissionManager* GetInstance(void); + +private: + // + // This default constructor is intentionally declared as private to implement the Singleton semantic. + // + // @remarks This constructor is hidden. + // + GeolocationPermissionManager(void); + + // + // This destructor is intentionally declared as private to implement the Singleton semantic. + // + // @remarks This destructor is hidden. + // + virtual ~GeolocationPermissionManager(void); + + /** + * Initializes this instance of the %Web control with the specified parameters. + * + * @since 2.0 + * + * @return An error code + */ + result Construct(void); + + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + // @param[in] rhs The instance of the % GeolocationPermissionManager class to copy from + // @remarks This constructor is hidden. + // + GeolocationPermissionManager(const GeolocationPermissionManager& rhs); + + // + // Initializes the geolocation permission manager instance. + // + // @since 2.0 + // + static void InitGeolocationPermissionManager(void); + + // + // Destroys the geolocation permission manager instance. + // + // @since 2.0 + // + static void DestroyGeolocationPermissionManager(void); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + // @param[in] rhs An instance of % GeolocationPermissionManager to assign from + // @remarks This operator is hidden. + // + GeolocationPermissionManager& operator=(const GeolocationPermissionManager& rhs); + +private: + + _GeolocationPermissionManagerImpl* __pGeolocationPermissionManagerImpl; + + static GeolocationPermissionManager* __pInstance; + + friend class _GeolocationPermissionManagerImpl; + + friend struct std::default_delete; +}; // GeolocationPermissionManager + +}}} // Tizen::Web::Controls + +#endif // _FWEB_CTRL_GEOLOCATION_PERMISSION_MANAGER_H_ diff --git a/inc/FWebCtrlHitElementResult.h b/inc/FWebCtrlHitElementResult.h new file mode 100755 index 0000000..171b658 --- /dev/null +++ b/inc/FWebCtrlHitElementResult.h @@ -0,0 +1,166 @@ +// +// Open Service Platform +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FWebCtrlHitElementResult.h + * @brief This is the header file for the %HitElementResult class. + * + * This header file contains the declarations of the %HitElementResult class. + */ +#ifndef _FWEB_CTRL_HIT_ELEMENT_RESULT_H_ +#define _FWEB_CTRL_HIT_ELEMENT_RESULT_H_ + +#include +#include +#include + +namespace Tizen { namespace Graphics +{ +class Bitmap; +}} // Tizen::Graphics + +namespace Tizen { namespace Web { namespace Controls +{ +class _HitElementResultImpl; +}}} // Tizen::Web::Controls + +namespace Tizen { namespace Web { namespace Controls +{ + +/** + * @class HitElementResult + * @brief This class provides methods to retrieve information from the HyperText Markup Language (HTML) element, pointed by the x and y coordinates. + * + * @since 2.0 + * + * The %HitElementResult class provides methods to retrieve information from the HTML element, such as tag name, attributes and content. + * @n + * For more information on the class features, see Web Controls Guide. + * + */ +class _OSP_EXPORT_ HitElementResult + : public Tizen::Base::Object +{ + +public: + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~HitElementResult(void); + + /** + * Gets the tag name of an element. + * + * @since 2.0 + * + * @return The tag name of the element + */ + Tizen::Base::String GetTagName(void) const; + + /** + * Gets the value of the specified attribute. + * + * @since 2.0 + * + * @return The value of the specified attribute + * @param[in] attributeName The name of attribute + */ + Tizen::Base::String GetAttributeValue(const Tizen::Base::String& attributeName) const; + + /** + * Gets the content of an element. + * + * @since 2.0 + * + * @return The content of the element + */ + Tizen::Base::String GetContent(void) const; + + /** + * Gets the Uniform Resource Locator (URL) linked to the element. + * + * @since 2.0 + * + * @return The URL linked to the element + */ + Tizen::Base::String GetUrl(void) const; + + /** + * Gets the image if the element is an image element. + * + * @since 2.0 + * + * @return The image + */ + const Tizen::Graphics::Bitmap* GetImage(void) const; + + /** + * Checks whether the element is an image element. + * + * @since 2.0 + * + * @return @c true if the element is an image element, @n + * else @c false + */ + bool HasImage(void) const; + + /** + * Checks whether the element has a URL linked to it. + * + * @since 2.0 + * + * @return @c true if there is a URL linked to the element, @n + * else @c false + */ + bool HasUrl(void) const; + +private: + // + // This constructor is intentionally declared as private so that only the platform can create an instance. + // + // @remarks This constructor is hidden. + // + HitElementResult(void); + + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + // @param[in] element The instance of the %HitElementResult class to copy from + // @remarks This constructor is hidden. + // + HitElementResult(const HitElementResult& element); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + // @param[in] source The instance of the %HitElementResult class to assign from + // @remarks This operator is hidden. + // + HitElementResult& operator =(const HitElementResult& source); + +private: + _HitElementResultImpl* __pHitElementResultImpl; + + friend class _HitElementResultImpl; + + friend class _WebImpl; +}; // HitElementResult + +}}} // Tizen::Web::Controls +#endif // _FWEB_CTRL_HIT_ELEMENT_RESULT_H_ diff --git a/inc/FWebCtrlIJavaScriptBridge.h b/inc/FWebCtrlIJavaScriptBridge.h new file mode 100644 index 0000000..f12b8d8 --- /dev/null +++ b/inc/FWebCtrlIJavaScriptBridge.h @@ -0,0 +1,125 @@ +// +// Open Service Platform +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FWebCtrlIJavaScriptBridge.h + * @brief This is the header file for the %IJavaScriptBridge interface. + * + * This header file contains the declarations of the %IJavaScriptBridge interface. + * @n + * For more information on the class features, see Web Controls Guide. + * + */ +#ifndef _FWEB_CTRL_IJAVA_SCRIPT_BRIDGE_H_ +#define _FWEB_CTRL_IJAVA_SCRIPT_BRIDGE_H_ + +#include + +namespace Tizen { namespace Web { namespace Json +{ +class IJsonValue; +}}} // Tizen::Web::Json + +namespace Tizen { namespace Web { namespace Controls +{ + +/** + * @interface IJavaScriptBridge + * @brief This interface provides a communication channel between JavaScript and native object. + * + * @since 2.0 + * + * The %IJavaScriptBridge interface provides a communication channel between JavaScript and C++ object. + */ +class _OSP_EXPORT_ IJavaScriptBridge +{ +public: + /** + * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called. + * + * @since 2.0 + */ + virtual ~IJavaScriptBridge(void) {} + + /** + * Called asynchronously on invocation request from JavaScript side through the requestToNative() method. + * + * @since 2.0 + * + * @param[in] pArg The parameters delivered by JavaScript + */ + virtual void HandleJavaScriptRequestN(Tizen::Web::Json::IJsonValue* pArg) = 0; + + /** + * Provides the name of %IJavaScriptBridge to identify each %IJavaScriptBridge + * + * @since 2.0 + * + * @return The name of %IJavaScriptBridge + */ + virtual Tizen::Base::String GetName(void) = 0; + +protected: + // + // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application. + // + // Gets the Impl instance. + // + // @since 2.0 + // + virtual void IJavaScriptBridge_Reserved1(void) {} + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application. + // + // Gets the Impl instance. + // + // @since 2.0 + // + virtual void IJavaScriptBridge_Reserved2(void) {} + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application. + // + // Gets the Impl instance. + // + // @since 2.0 + // + virtual void IJavaScriptBridge_Reserved3(void) {} + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application. + // + // Gets the Impl instance. + // + // @since 2.0 + // + virtual void IJavaScriptBridge_Reserved4(void) {} + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application. + // + // Gets the Impl instance. + // + // @since 2.0 + // + virtual void IJavaScriptBridge_Reserved5(void) {} + +}; // IJavaScriptBridge + +}}} // Tizen::Web::Controls +#endif // _FWEB_CTRL_IJAVA_SCRIPT_BRIDGE_H_ diff --git a/inc/FWebCtrlILoadingListener.h b/inc/FWebCtrlILoadingListener.h new file mode 100755 index 0000000..3c39c7d --- /dev/null +++ b/inc/FWebCtrlILoadingListener.h @@ -0,0 +1,267 @@ +// +// Open Service Platform +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FWebCtrlILoadingListener.h + * @brief This is the header file for the %ILoadingListener interface. + * + * This header file contains the declarations of the %ILoadingListener interface. + */ +#ifndef _FWEB_CTRL_ILOADING_LISTENER_H_ +#define _FWEB_CTRL_ILOADING_LISTENER_H_ + +#include +#include + +namespace Tizen { namespace Net { namespace Http +{ +class HttpHeader; +}}} // Tizen::Neb::Http + +namespace Tizen { namespace Web { namespace Controls +{ +class AuthenticationChallenge; +}}} // Tizen::Web::Controls + +namespace Tizen { namespace Web { namespace Controls +{ + +/** + * @enum WebNavigationType + * + * Defines the type of %Web navigation. + * + * @since 2.0 + */ +enum WebNavigationType +{ + WEB_NAVIGATION_LINK_CLICKED, /**< The clicking of a link on the page */ + WEB_NAVIGATION_FORM_SUBMITTED, /**< The submission of a form */ + WEB_NAVIGATION_BACKFORWARD, /**< The back and forward navigation*/ + WEB_NAVIGATION_RELOAD, /**< The reloading of the page */ + WEB_NAVIGATION_FORM_RESUBMITTED, /**< The resubmission of the form */ + WEB_NAVIGATION_OTHER /**< A navigation other than any of the above */ +}; + +/** + * @enum LoadingErrorType + * + * Defines the types of loading errors. + * + * @since 2.0 + */ +enum LoadingErrorType +{ + WEB_ERROR_UNKNOWN, /**< An unknown error*/ + WEB_REQUEST_TIMEOUT, /**< The request timeout */ + WEB_NO_CONNECTION, /**< The network is not in service */ + WEB_MIME_NOT_SUPPORTED, /**< The content type is not supported */ + WEB_BAD_URL, /**< The URL is invalid */ + WEB_HTTP_RESPONSE, /**< The hypertext transfer protocol (HTTP) response */ + WEB_OUT_OF_MEMORY, /**< The memory is not enough to load the page */ + WEB_FILE_ACCESS_FAILED, /**< The file access failed */ + WEB_REQUEST_MAX_EXCEEDED, /**< The request has failed because the total number of requests have exceeded the maximum limit */ + WEB_INVALID_CERTIFICATE /**< The hypertext transfer protocol secure (HTTPS) request has failed due to an invalid certificate or CA */ +}; + +/** + * @enum DecisionPolicy + * + * Defines the decision policy. + * + * @since 2.0 + */ +enum DecisionPolicy +{ + WEB_DECISION_DOWNLOAD, /**< The download policy*/ + WEB_DECISION_CONTINUE, /**< The usage policy*/ + WEB_DECISION_IGNORE, /**< The ignore policy*/ +}; + +/** + * @interface ILoadingListener + * @brief This interface is for receiving the events that occur during the loading of data. + * + * @since 2.0 + * + * The %ILoadingListener interface receives the events that occur during the loading of data. + * To listen to the events occurred during a data loading operation, implement this listener. If there is no + * registered load event listener, the browser engine handles these events according to its own settings. + * @n + * For more information on the class features, see Web Controls Guide. + */ +class _OSP_EXPORT_ ILoadingListener + : public virtual Tizen::Base::Runtime::IEventListener +{ +public: + /** + * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called. + * + * @since 2.0 + */ + virtual ~ILoadingListener(void) {} + + /** + * Called when an authentication is requested. + * + * @since 2.0 + * + * @return @c true if the ownership is taken by the application, @n + * else @c false, and a default dialog for the ID and password is displayed @n + * If this method returns @c true, the application must delete the AuthenticationChallenge instance. + * @param[in] host The host requiring the authentication + * @param[in] realm The description to help save the user credentials for future visits + * @param[in] authentication The handler to send a user response to the server that requested the authentication + */ + virtual bool OnHttpAuthenticationRequestedN(const Tizen::Base::String& host, const Tizen::Base::String& realm, const Tizen::Web::Controls::AuthenticationChallenge& authentication) = 0; + + /** + * Called when the authentication request is cancelled. + * + * @since 2.0 + */ + virtual void OnHttpAuthenticationCanceled(void) = 0; + + /** + * Called when the loading operation starts. + * + * @since 2.0 + */ + virtual void OnLoadingStarted(void) = 0; + + /** + * Called when the loading operation is cancelled. + * + * @since 2.0 + */ + virtual void OnLoadingCanceled(void) = 0; + + /** + * Called when the loading operation fails. + * + * @since 2.0 + * + * @param[in] error The error that occurred during loading + * @param[in] reason The reason for the loading failure, @n + * - WEB_HTTP_RESPONSE: The HTTP state code such as "404" @n + * - WEB_MIME_NOT_SUPPORTED: The Multipurpose Internet Mail Extensions (MIME) type such as "application/rdf+xml" is not supported @n + * - WEB_BAD_URL: The URL is incorrect + */ + virtual void OnLoadingErrorOccurred(LoadingErrorType error, const Tizen::Base::String& reason) = 0; + + /** + * Called when the loading operation is completed. + * + * @since 2.0 + */ + virtual void OnLoadingCompleted(void) = 0; + + /** + * Called when the loading progress for the current page is requested. @n + * The progress rate is displayed as a percentage. + * + * @since 2.0 + * + * @param[in] progress The progress rate ranging from [0~100] + */ + virtual void OnEstimatedProgress(int progress) = 0; + + /** + * Called when the title of the new page has been received. + * + * @since 2.0 + */ + virtual void OnPageTitleReceived(const Tizen::Base::String& title) = 0; + + /** + * Called to notify an application of the URL to be requested. @n + * If an application wants to handle the URL, it must return @c true. If an application returns @c false, the request of the URL continues with the + * browser engine. + * + * @since 2.0 + * + * @return @c true if the application handles the URL after the request is canceled in the browser engine, @n + * else @c false if the browser engine proceeds with the requested URL + * @param[in] url The URL that is requested + * @param[in] type The type indicating how the URL is triggered + */ + virtual bool OnLoadingRequested(const Tizen::Base::String& url, WebNavigationType type) = 0; + + /** + * Called to notify an application of the content type of the data to be downloaded. @n + * - To handle data by itself, the application must return WEB_DECISION_DOWNLOAD. The data is routed to IWebDownloadListener to be downloaded incrementally. @n + * - If an application returns WEB_DECISION_CONTINUE, the browser engine continues the downloading and tries to parse the data. @n + * - If an application returns WEB_DECISION_IGNORE, the browser engine cancels the downloading of the data. + * + * @since 2.0 + * + * @return DecisionPolicy A value of the enumerator DecisionPolicy + * @param[in] mime The content type of the data that is downloaded + * @param[in] httpHeader The HTTP header string + */ + virtual DecisionPolicy OnWebDataReceived(const Tizen::Base::String& mime, const Tizen::Net::Http::HttpHeader& httpHeader) = 0; + +protected: + // + // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application. + // + // Gets the Impl instance. + // + // @since 2.0 + // + virtual void ILoadingListener_Reserved1(void) {} + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application. + // + // Gets the Impl instance. + // + // @since 2.0 + // + virtual void ILoadingListener_Reserved2(void) {} + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application. + // + // Gets the Impl instance. + // + // @since 2.0 + // + virtual void ILoadingListener_Reserved3(void) {} + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application. + // + // Gets the Impl instance. + // + // @since 2.0 + // + virtual void ILoadingListener_Reserved4(void) {} + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application. + // + // Gets the Impl instance. + // + // @since 2.0 + // + virtual void ILoadingListener_Reserved5(void) {} + +}; // ILoadingListener + +}}} // Tizen::Web::Controls +#endif // _FWEB_CTRL_ILOADING_LISTENER_H_ diff --git a/inc/FWebCtrlITextSearchListener.h b/inc/FWebCtrlITextSearchListener.h new file mode 100755 index 0000000..a436dc9 --- /dev/null +++ b/inc/FWebCtrlITextSearchListener.h @@ -0,0 +1,87 @@ +// +// Open Service Platform +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FWebCtrlITextSearchListener.h + * @brief This is the header file for the %ITextSearchListener interface. + * + * This header file contains the declarations of the %ITextSearchListener interface. + */ +#ifndef _FWEB_CTRL_ITEXT_SEARCH_LISTENER_H_ +#define _FWEB_CTRL_ITEXT_SEARCH_LISTENER_H_ + +#include + +namespace Tizen { namespace Web { namespace Controls +{ + +/** + * @interface ITextSearchListener + * @brief This interface is for receiving the result of the search operation made by asynchronous methods. + * + * @since 2.0 + * + * The %ITextSearchListener interface receives the result of the search operation made by asynchronous methods. + */ +class _OSP_EXPORT_ ITextSearchListener + : public virtual Tizen::Base::Runtime::IEventListener + +{ + +public: + + /** + * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called. + * + * @since 2.0 + */ + virtual ~ITextSearchListener(void) {} + + /** + * Called when the text is found. + * + * @since 2.0 + * + * @param[in] totalCount The total count of matches + * @param[in] currentOrdinal The ordinal of currently selected match @n + * If there is no match, it will be set to zero. + */ + virtual void OnTextFound(int totalCount, int currentOrdinal) = 0; + +protected: + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application. + // + // Gets the Impl instance. + // + // @since 2.0 + // + virtual void ITextSearchListener_Reserved1(void) {}; + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application. + // + // Gets the Impl instance. + // + // @since 2.0 + // + virtual void ITextSearchListener_Reserved2(void) {}; +}; + +}}} // Tizen::Web::Controls +#endif // _FWEB_CTRL_ITEXT_SEARCH_LISTENER_H_ diff --git a/inc/FWebCtrlIWebDownloadListener.h b/inc/FWebCtrlIWebDownloadListener.h new file mode 100755 index 0000000..9336c5f --- /dev/null +++ b/inc/FWebCtrlIWebDownloadListener.h @@ -0,0 +1,153 @@ +// +// Open Service Platform +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FWebCtrlIWebDownloadListener.h + * @brief This is the header file for the %IWebDownloadListener interface. + * + * This header file contains the declarations of the %IWebDownloadListener interface. + */ +#ifndef _FWEB_CTRL_IWEB_DOWNLOAD_LISTENER_H_ +#define _FWEB_CTRL_IWEB_DOWNLOAD_LISTENER_H_ + +#include +#include +#include + +namespace Tizen { namespace Web { namespace Controls +{ + +/** + * @interface IWebDownloadListener + * @brief This interface downloads data from the internet. + * + * @since 2.0 + * + * The %IWebDownloadListener interface downloads data from the internet. + * An application receives content from a network incrementally + * when it decides to download the content after checking the Multipurpose Internet Mail Extensions (MIME). + * This is useful when the content is not supported by the framework itself and the application wants to handle it. + * @n + * For more information on the class features, see Web Controls Guide. + * + * The following examples demonstrate how to use the %IWebDownloadListener interface. + * @code + * #include + * #include + * + * using namespace Tizen::Web; + * using namespace Tizen::Ui::Controls; + * + * // Adds a Web control to the parent container + * result + * WebSample::CreateControl(Form* pParentForm) + * { + * result r = E_SUCCESS; + * + * pWeb = new Web(); + * r = pWeb->Construct( pParentForm->GetClientAreaBounds()); + * r = pParentForm->AddControl(*pWeb); + * + * // Sets a loading listener and a Web downloading listener + * pWeb->SetDownloadListener(pMyDownloadListener); + * pWeb->SetLoadingListener(pMyLoadingListener); + * + * return r; + * } + * @endcode + * + * As soon as the first chunk of data is received, OnWebDataReceived() is fired with the MIME type. + * If you want to download the data, return WEB_DECISION_DOWNLOAD. + * + * @code + * DecisionPolicy + * MyLoadingListener::OnWebDataReceived(const Tizen::Base::String& mime, const Tizen::Net::Http::HttpHeader& header) + * { + * return WEB_DECISION_DOWNLOAD; + * } + * @endcode + * + * Then, the data is routed to OnWebChunkedDataReceived(). + * + * @code + * void + * MyDownloadListener::OnWebChunkedDataReceived(Tizen::Base::ByteBuffer& chunk) + * { + * // .... + * } + * @endcode + */ +class _OSP_EXPORT_ IWebDownloadListener + : public virtual Tizen::Base::Runtime::IEventListener +{ +public: + /** + * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called. + * + * @since 2.0 + */ + virtual ~IWebDownloadListener(void) {} + + /** + * Called when the HyperText Transfer Protocol (HTTP) protocol receives the next chunked data. + * + * @since 2.0 + * + * @param[in] chunk The chunked data + * @remarks The received data size is less than the capacity of the specified Tizen::Base::ByteBuffer by @c 1. + */ + virtual void OnWebChunkedDataReceived(const Tizen::Base::ByteBuffer& chunk) = 0; + + /** + * Called when the downloading of the content is completed. + * + * @since 2.0 + */ + virtual void OnWebDataDownloadCompleted(void) = 0; + + /** + * Called when an error has occurred while downloading content. + * + * @since 2.0 + * + * @param[in] error The type of error that occurred while downloading data + */ + virtual void OnWebDownloadFailed(LoadingErrorType error) = 0; + +protected: + // + // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application. + // + // Gets the Impl instance. + // + // @since 2.0 + // + virtual void IWebDownloadListener_Reserved1(void) {} + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application. + // + // Gets the Impl instance. + // + // @since 2.0 + // + virtual void IWebDownloadListener_Reserved2(void) {} + +}; // IWebDownloadListener + +}}} // Tizen::Web::Controls +#endif // _FWEB_CTRL_IWEB_DOWNLOAD_LISTENER_H_ diff --git a/inc/FWebCtrlIWebKeypadEventListener.h b/inc/FWebCtrlIWebKeypadEventListener.h new file mode 100755 index 0000000..7318aa3 --- /dev/null +++ b/inc/FWebCtrlIWebKeypadEventListener.h @@ -0,0 +1,148 @@ +// +// Open Service Platform +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FWebCtrlIWebKeypadEventListener.h + * @brief This is the header file for the %IWebKeypadEventListener interface. + * + * This header file contains the declarations of the %IWebKeypadEventListener interface. + */ +#ifndef _FWEB_CTRL_IWEB_KEYPAD_EVENT_LISTENER_H_ +#define _FWEB_CTRL_IWEB_KEYPAD_EVENT_LISTENER_H_ + +#include + +namespace Tizen { namespace Web { namespace Controls +{ +class Web; +}}} // Tizen::Web::Controls + +namespace Tizen { namespace Web { namespace Controls +{ + +/** + * @interface IWebKeypadEventListener + * @brief This interface provides a listener for keypad events invoked by the