Create string tightly when retrive string from cbhm callback event
[framework/web/webkit-efl.git] / Source / WebKit2 / UIProcess / API / efl / ewk_search_provider.h
1 /*
2     Copyright (C) 2012 Samsung Electronics
3
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.
8
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.
13
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.
18 */
19
20 /**
21  * @file    ewk_search_provider.h
22  * @brief   Ssearch Provider. (http://www.whatwg.org/specs/web-apps/current-work/#the-external-interface)
23  */
24
25 #ifndef ewk_search_provider_h
26 #define ewk_search_provider_h
27
28 #include <Eina.h>
29 #include <Evas.h>
30
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34
35 /**
36  * \enum    _Ewk_Search_Provider_Result
37  *
38  * @brief    result of isSearchProviderInstalled API
39  */
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
47 };
48
49 /// Creates a type name for the _Ewk_Search_Provider_Result.
50 typedef enum _Ewk_Search_Provider_Installed_State Ewk_Search_Provider_Installed_State;
51
52 typedef struct _Ewk_Search_Provider_Data Ewk_Search_Provider_Data;
53
54 /**
55  * Get base url of search provider.
56  *
57  * @param data search provider's structure
58  *
59  * @return @c base url
60  */
61 EAPI const char *ewk_search_provider_data_base_url_get(Ewk_Search_Provider_Data *data);
62
63 /**
64  * Get engine url of search provider.
65  *
66  * @param data search provider's structure
67  *
68  * @return @c engine url
69  */
70 EAPI const char *ewk_search_provider_data_engine_url_get(Ewk_Search_Provider_Data *data);
71
72 /**
73  * Set result of isSearchProviderInstalled API.
74  *
75  * @param data search provider's structure
76  * @param result(Ewk_Search_Provider_Result) of isSearchProviderInstalled API
77  */
78 EAPI void ewk_search_provider_data_result_set(Ewk_Search_Provider_Data *data, Ewk_Search_Provider_Installed_State result);
79
80 #ifdef __cplusplus
81 }
82 #endif
83 #endif // ewk_search_provider_h