2
* Copyright (C) 2012 Intel Corporation. All rights reserved.
4
* Redistribution and use in source and binary forms, with or without
5
* modification, are permitted provided that the following conditions
7
* 1. Redistributions of source code must retain the above copyright
8
* notice, this list of conditions and the following disclaimer.
9
* 2. Redistributions in binary form must reproduce the above copyright
10
* notice, this list of conditions and the following disclaimer in the
11
* documentation and/or other materials provided with the distribution.
13
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23
* THE POSSIBILITY OF SUCH DAMAGE.
27
* @file ewk_form_submission_request.h
28
* @brief Describes the Ewk Form Submission Request API.
30
* @note Ewk_Form_Submission_Request provides information regarding
31
* a form about the be submitted, in particular its text fields.
34
#ifndef ewk_form_submission_request_h
35
#define ewk_form_submission_request_h
44
* Declare Ewk_Form_Submission_Request as Ewk_Object.
48
typedef struct EwkObject Ewk_Form_Submission_Request;
51
* Returns the list of field names contained in the form associated to @a request.
53
* @param request the request object to query.
55
* @return a #Eina_List with the form text fields names, or @c NULL in case of error.
56
* The items of the list are guaranteed to be stringshared so use eina_stringshare_add()
57
* instead of strdup() to copy them and free them using eina_stringshare_del().
59
* @see ewk_form_submission_request_field_value_get()
61
EAPI Eina_List *ewk_form_submission_request_field_names_get(Ewk_Form_Submission_Request *request);
64
* Returns the value of specific field contained in the form associated to @a request.
66
* @param request the request object to query.
67
* @param name name of the field to query the value for.
69
* @return a #Eina_List with the form text fields names, or @c NULL in case of error.
70
* The string returned is guaranteed to be stringshared. You need to call
71
* eina_stringshare_del() on the returned value once you are done with it.
73
* @see ewk_form_submission_request_field_names_get()
75
EAPI const char *ewk_form_submission_request_field_value_get(Ewk_Form_Submission_Request *request, const char *name);
78
* Continues the form request submission.
80
* If you don't call this function explicitly, the form request will be submitted
81
* upon @a request object destruction.
83
* @param request the request object to submit.
85
* @return @c EINA_TRUE is if successful, @c EINA_FALSE otherwise.
87
EAPI Eina_Bool ewk_form_submission_request_submit(Ewk_Form_Submission_Request *request);
93
#endif // ewk_form_submission_request_h