2 Copyright (C) 2012 Samsung Electronics
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
21 * @file ewk_custom_handlers.h
22 * @brief Custom scheme and content handlers. (http://www.w3.org/TR/html5/timers.html#custom-handlers)
25 #ifndef ewk_custom_handlers_h
26 #define ewk_custom_handlers_h
35 typedef struct _Ewk_Custom_Handlers_Data Ewk_Custom_Handlers_Data;
37 /// Defines the handler states.
38 enum _Ewk_Custom_Handlers_State {
39 /// Indicates that no attempt has been made to register the given handler.
40 EWK_CUSTOM_HANDLERS_NEW,
41 /// Indicates that the given handler has been registered or that the site is blocked from registering the handler.
42 EWK_CUSTOM_HANDLERS_REGISTERED,
43 /// Indicates that the given handler has been offered but was rejected.
44 EWK_CUSTOM_HANDLERS_DECLINED
47 /// Creates a type name for @a _Ewk_Custom_Handlers_State.
48 typedef enum _Ewk_Custom_Handlers_State Ewk_Custom_Handlers_State;
51 * Get target(scheme or mime type) of custom handlers.
53 * @param data custom handlers's structure.
55 * @return @c target (scheme or mime type).
57 EAPI const char* ewk_custom_handlers_data_target_get(Ewk_Custom_Handlers_Data* data);
60 * Get base url of custom handlers.
62 * @param data custom handlers's structure.
64 * @return @c base url.
66 EAPI const char* ewk_custom_handlers_data_base_url_get(Ewk_Custom_Handlers_Data* data);
69 * Get url of custom handlers.
71 * @param data custom handlers's structure.
75 EAPI const char* ewk_custom_handlers_data_url_get(Ewk_Custom_Handlers_Data* data);
78 * Get title of custom handlers.
80 * @param data custom handlers's structure.
84 EAPI const char* ewk_custom_handlers_data_title_get(Ewk_Custom_Handlers_Data* data);
87 * Set result of isProtocolRegistered API.
89 * @param data custom handlers's structure
90 * @param result(Ewk_Custom_Handlers_State) of isProtocolRegistered and isContentRegistered API
92 EAPI void ewk_custom_handlers_data_result_set(Ewk_Custom_Handlers_Data* data, Ewk_Custom_Handlers_State result);
96 #endif // ewk_custom_handlers_h