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_search_provider.h
22 * @brief Ssearch Provider. (http://www.whatwg.org/specs/web-apps/current-work/#the-external-interface)
25 #ifndef ewk_search_provider_h
26 #define ewk_search_provider_h
36 * \enum _Ewk_Search_Provider_Result
38 * @brief result of isSearchProviderInstalled API
40 enum _Ewk_Search_Provider_Installed_State {
41 /// None of the installed search engines match url.
42 EWK_SEARCH_PROVIDER_INSTALLED_STATE_NONE,
43 /// One or more installed search engines match url, but none are the user's default search engine.
44 EWK_SEARCH_PROVIDER_INSTALLED_STATE_MORE,
45 /// The user's default search engine matches url.
46 EWK_SEARCH_PROVIDER_INSTALLED_STATE_DEFAULT
49 /// Creates a type name for the _Ewk_Search_Provider_Result.
50 typedef enum _Ewk_Search_Provider_Installed_State Ewk_Search_Provider_Installed_State;
52 typedef struct _Ewk_Search_Provider_Data Ewk_Search_Provider_Data;
55 * Get base url of search provider.
57 * @param data search provider's structure
61 EAPI const char *ewk_search_provider_data_base_url_get(Ewk_Search_Provider_Data *data);
64 * Get engine url of search provider.
66 * @param data search provider's structure
68 * @return @c engine url
70 EAPI const char *ewk_search_provider_data_engine_url_get(Ewk_Search_Provider_Data *data);
73 * Set result of isSearchProviderInstalled API.
75 * @param data search provider's structure
76 * @param result(Ewk_Search_Provider_Result) of isSearchProviderInstalled API
78 EAPI void ewk_search_provider_data_result_set(Ewk_Search_Provider_Data *data, Ewk_Search_Provider_Installed_State result);
83 #endif // ewk_search_provider_h