2 * Copyright (c) 2018 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef __TIZEN_UIX_AUTOFILL_COMMON_H__
18 #define __TIZEN_UIX_AUTOFILL_COMMON_H__
21 * @file autofill_common.h
22 * @brief This file contains autofill APIs and related enumeration.
26 #include "autofill_enum.h"
33 * @addtogroup CAPI_UIX_AUTOFILL_COMMON_MODULE
38 * @brief Enumeration for autofill function error
43 AUTOFILL_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */
44 AUTOFILL_ERROR_IO_ERROR = TIZEN_ERROR_IO_ERROR, /**< I/O Error */
45 AUTOFILL_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
46 AUTOFILL_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */
47 AUTOFILL_ERROR_NOT_INITIALIZED = TIZEN_ERROR_ENDPOINT_NOT_CONNECTED, /**< Initialization is not set */
48 AUTOFILL_ERROR_NO_CALLBACK_FUNCTION = TIZEN_ERROR_IME | 0x0001, /**< Necessary callback function is not set */
49 AUTOFILL_ERROR_NOT_RUNNING = TIZEN_ERROR_IME | 0x0002, /**< IME main loop isn't started yet */
50 AUTOFILL_ERROR_OPERATION_FAILED = TIZEN_ERROR_IME | 0x0003, /**< Operation failed */
51 AUTOFILL_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< out of memory */
54 typedef struct autofill_item_s *autofill_item_h;
55 typedef struct autofill_auth_info_s *autofill_auth_info_h;
56 typedef struct autofill_view_info_s *autofill_view_info_h;
57 typedef struct autofill_fill_response_s *autofill_fill_response_h;
58 typedef struct autofill_fill_response_group_s *autofill_fill_response_group_h;
59 typedef struct autofill_response_item_s *autofill_fill_response_item_h;
60 typedef struct autofill_save_item_s *autofill_save_item_h;
61 typedef struct autofill_save_view_info_s *autofill_save_view_info_h;
64 * @brief Create autofill item
70 * @param[out] it The autofill item handle
71 * @return 0 on success, otherwise a negative error value
72 * @retval #AUTOFILL_ERROR_NONE No error
73 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
74 * @retval #AUTOFILL_ERROR_OUT_OF_MEMORY Out of memory
76 int autofill_item_create(autofill_item_h *it);
79 * @brief Destroy autofill item
85 * @param[in] it The autofill item handle
86 * @return 0 on success, otherwise a negative error value
87 * @retval #AUTOFILL_ERROR_NONE No error
88 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
90 int autofill_item_destroy(autofill_item_h it);
93 * @brief Clone autofill item
99 * @param[in] it The autofill item handle
100 * @param[out] clone The autofill item handle to be cloned
101 * @return 0 on success, otherwise a negative error value
102 * @retval #AUTOFILL_ERROR_NONE No error
103 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
105 int autofill_item_clone(autofill_item_h h, autofill_item_h *clone);
108 * @brief Set autofill hint (id (username), name, password, phone, credit card number, organization, so on)
114 * @param[in] it The autofill item handle
115 * @param[in] hint The autofill hint
116 * @return 0 on success, otherwise a negative error value
117 * @retval #AUTOFILL_ERROR_NONE No error
118 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
120 int autofill_item_set_autofill_hint(autofill_item_h it, autofill_hint_e hint);
123 * @brief Get autofill hint
129 * @param[in] it The autofill item handle
130 * @param[out] hint The autofill hint
131 * @return 0 on success, otherwise a negative error value
132 * @retval #AUTOFILL_ERROR_NONE No error
133 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
135 int autofill_item_get_autofill_hint(autofill_item_h it, autofill_hint_e *hint);
138 * @brief Set autofill ID
144 * @param[in] it The autofill item handle
145 * @param[in] id The autofill ID
146 * @return 0 on success, otherwise a negative error value
147 * @retval #AUTOFILL_ERROR_NONE No error
148 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
150 int autofill_item_set_id(autofill_item_h it, const char *id);
153 * @brief Set autofill ID
159 * @param[in] it The autofill item handle
160 * @param[out] id The autofill ID
161 * @return 0 on success, otherwise a negative error value
162 * @retval #AUTOFILL_ERROR_NONE No error
163 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
165 int autofill_item_get_id(autofill_item_h it, char **id);
168 * @brief Set autofill Label
174 * @param[in] it The autofill item handle
175 * @param[in] label The autofill label
176 * @return 0 on success, otherwise a negative error value
177 * @retval #AUTOFILL_ERROR_NONE No error
178 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
180 int autofill_item_set_label(autofill_item_h it, const char *label);
183 * @brief Get autofill Label
189 * @param[in] it The autofill item handle
190 * @param[out] label The autofill label
191 * @return 0 on success, otherwise a negative error value
192 * @retval #AUTOFILL_ERROR_NONE No error
193 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
195 int autofill_item_get_label(autofill_item_h it, char **label);
198 * @brief Set sensitive data
204 * @param[in] it The autofill item handle
205 * @param[in] sensitive The sensitive data or not
206 * @return 0 on success, otherwise a negative error value
207 * @retval #AUTOFILL_ERROR_NONE No error
208 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
210 int autofill_item_set_sensitive_data(autofill_item_h it, bool sensitive);
213 * @brief Get sensitive data
219 * @param[in] it The autofill item handle
220 * @param[out] sensitive The sensitive data or not
221 * @return 0 on success, otherwise a negative error value
222 * @retval #AUTOFILL_ERROR_NONE No error
223 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
225 int autofill_item_get_sensitive_data(autofill_item_h it, bool *sensitive);
228 * @brief Set autofill value
234 * @param[in] it The autofill item handle
235 * @param[in] value The autofill value
236 * @return 0 on success, otherwise a negative error value
237 * @retval #AUTOFILL_ERROR_NONE No error
238 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
240 int autofill_item_set_value(autofill_item_h it, const char *value);
243 * @brief Get autofill value
249 * @param[in] it The autofill item handle
250 * @param[out] value The autofill value
251 * @return 0 on success, otherwise a negative error value
252 * @retval #AUTOFILL_ERROR_NONE No error
253 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
255 int autofill_item_get_value(autofill_item_h it, char **value);
260 * @brief Create autofill auth info
266 * @param[out] ai The autofill authentication information handle
267 * @return 0 on success, otherwise a negative error value
268 * @retval #AUTOFILL_ERROR_NONE No error
269 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
270 * @retval #AUTOFILL_ERROR_OUT_OF_MEMORY Out of memory
272 int autofill_auth_info_create(autofill_auth_info_h *ai);
275 * @brief Destroy autofill view info
281 * @param[in] ai The autofill authentication information handle
282 * @return 0 on success, otherwise a negative error value
283 * @retval #AUTOFILL_ERROR_NONE No error
284 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
286 int autofill_auth_info_destroy(autofill_auth_info_h ai);
295 * @param[in] ai The autofill authentication information handle
296 * @param[in] app_id The app ID
297 * @return 0 on success, otherwise a negative error value
298 * @retval #AUTOFILL_ERROR_NONE No error
299 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
301 int autofill_auth_info_set_app_id(autofill_auth_info_h ai, const char *app_id);
310 * @param[in] ai The autofill authentication information handle
311 * @param[out] app_id The app ID
312 * @return 0 on success, otherwise a negative error value
313 * @retval #AUTOFILL_ERROR_NONE No error
314 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
316 int autofill_auth_info_get_app_id(autofill_auth_info_h ai, char **app_id);
325 * @param[in] ai The autofill authentication information handle
326 * @param[in] view_id The view ID
327 * @return 0 on success, otherwise a negative error value
328 * @retval #AUTOFILL_ERROR_NONE No error
329 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
331 int autofill_auth_info_set_view_id(autofill_auth_info_h ai, const char *view_id);
340 * @param[in] ai The autofill authentication information handle
341 * @param[in] view_id The view ID
342 * @return 0 on success, otherwise a negative error value
343 * @retval #AUTOFILL_ERROR_NONE No error
344 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
346 int autofill_auth_info_get_view_id(autofill_auth_info_h ai, char **view_id);
349 * @brief Set exist autofill data
355 * @param[in] ai The autofill authentication information handle
356 * @param[in] exist_autofill_data The autofill data existence
357 * @return 0 on success, otherwise a negative error value
358 * @retval #AUTOFILL_ERROR_NONE No error
359 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
361 int autofill_auth_info_set_exist_autofill_data(autofill_auth_info_h ai, bool exist_autofill_data);
364 * @brief Get exist autofill data
370 * @param[in] ai The autofill authentication information handle
371 * @param[out] exist_autofill_data The autofill data existence
372 * @return 0 on success, otherwise a negative error value
373 * @retval #AUTOFILL_ERROR_NONE No error
374 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
376 int autofill_auth_info_get_exist_autofill_data(autofill_auth_info_h ai, bool *exist_autofill_data);
379 * @brief Set need authentication
385 * @param[in] ai The autofill authentication information handle
386 * @param[in] need_authentication The authentication need
387 * @return 0 on success, otherwise a negative error value
388 * @retval #AUTOFILL_ERROR_NONE No error
389 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
391 int autofill_auth_info_set_need_authentication(autofill_auth_info_h ai, bool need_authentication);
394 * @brief Get need authentication
400 * @param[in] ai The autofill authentication information handle
401 * @param[out] need_authentication The authentication need
402 * @return 0 on success, otherwise a negative error value
403 * @retval #AUTOFILL_ERROR_NONE No error
404 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
406 int autofill_auth_info_get_need_authentication(autofill_auth_info_h ai, bool *need_authentication);
409 * @brief Set service name
415 * @param[in] ai The autofill authentication information handle
416 * @param[in] service_name The autofill service name
417 * @return 0 on success, otherwise a negative error value
418 * @retval #AUTOFILL_ERROR_NONE No error
419 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
421 int autofill_auth_info_set_service_name(autofill_auth_info_h ai, const char *service_name);
424 * @brief Get service name
430 * @param[in] ai The autofill authentication information handle
431 * @param[out] service_name The autofill service name
432 * @return 0 on success, otherwise a negative error value
433 * @retval #AUTOFILL_ERROR_NONE No error
434 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
436 int autofill_auth_info_get_service_name(autofill_auth_info_h ai, char **service_name);
439 * @brief Set service message
445 * @param[in] ai The autofill authentication information handle
446 * @param[in] service_name The autofill service message
447 * @return 0 on success, otherwise a negative error value
448 * @retval #AUTOFILL_ERROR_NONE No error
449 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
451 int autofill_auth_info_set_service_message(autofill_auth_info_h ai, const char *service_message);
454 * @brief Get service message
460 * @param[in] ai The autofill authentication information handle
461 * @param[out] service_name The autofill service message
462 * @return 0 on success, otherwise a negative error value
463 * @retval #AUTOFILL_ERROR_NONE No error
464 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
466 int autofill_auth_info_get_service_message(autofill_auth_info_h ai, char **service_message);
469 * @brief Set service logo image path
475 * @param[in] ai The autofill authentication information handle
476 * @param[in] service_logo_image_path The autofill service logo image path
477 * @return 0 on success, otherwise a negative error value
478 * @retval #AUTOFILL_ERROR_NONE No error
479 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
481 int autofill_auth_info_set_service_logo_image_path(autofill_auth_info_h ai, const char *service_logo_image_path);
484 * @brief Get service logo image path
490 * @param[in] ai The autofill authentication information handle
491 * @param[out] service_logo_image_path The autofill service logo image path
492 * @return 0 on success, otherwise a negative error value
493 * @retval #AUTOFILL_ERROR_NONE No error
494 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
496 int autofill_auth_info_get_service_logo_image_path(autofill_auth_info_h ai, char **service_logo_image_path);
500 * @brief Create autofill view info
506 * @param[out] vi The autofill view info handle
507 * @return 0 on success, otherwise a negative error value
508 * @retval #AUTOFILL_ERROR_NONE No error
509 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
510 * @retval #AUTOFILL_ERROR_OUT_OF_MEMORY Out of memory
512 int autofill_view_info_create(autofill_view_info_h *vi);
515 * @brief Destroy autofill view info
521 * @param[in] vi The autofill view info handle
522 * @param[in] app_id The app ID
523 * @return 0 on success, otherwise a negative error value
524 * @retval #AUTOFILL_ERROR_NONE No error
525 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
527 int autofill_view_info_destroy(autofill_view_info_h vi);
536 * @param[in] vi The autofill view info handle
537 * @param[in] app_id The app ID
538 * @return 0 on success, otherwise a negative error value
539 * @retval #AUTOFILL_ERROR_NONE No error
540 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
542 int autofill_view_info_set_app_id(autofill_view_info_h vi, const char *app_id);
551 * @param[in] vi The autofill view info handle
552 * @param[out] app_id The app ID
553 * @return 0 on success, otherwise a negative error value
554 * @retval #AUTOFILL_ERROR_NONE No error
555 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
557 int autofill_view_info_get_app_id(const autofill_view_info_h vi, char **app_id);
566 * @param[in] vi The autofill view info handle
567 * @param[in] view_id The view ID
568 * @return 0 on success, otherwise a negative error value
569 * @retval #AUTOFILL_ERROR_NONE No error
570 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
572 int autofill_view_info_set_view_id(autofill_view_info_h vi, const char *view_id);
581 * @param[in] vi The autofill view info handle
582 * @param[out] view_id The view ID
583 * @return 0 on success, otherwise a negative error value
584 * @retval #AUTOFILL_ERROR_NONE No error
585 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
587 int autofill_view_info_get_view_id(autofill_view_info_h vi, char **view_id);
590 * @brief Add autofill item
596 * @param[in] vi The autofill view info handle
597 * @param[in] it The autofill item handle
598 * @return 0 on success, otherwise a negative error value
599 * @retval #AUTOFILL_ERROR_NONE No error
600 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
602 int autofill_view_info_add_item(const autofill_view_info_h vi, autofill_item_h it);
605 * @brief Retrieve all items in view info
611 * @param[in] vi The autofill view info handle
612 * @param[in] callback The callback function to register
613 * @param[in] user_data The user data to be passed to the callback function
614 * @return 0 on success, otherwise a negative error value
615 * @retval #AUTOFILL_ERROR_NONE No error
616 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
618 int autofill_view_info_foreach_items(autofill_view_info_h vi, bool (*callback)(autofill_item_h item, void *user_data), void *user_data);
622 * @brief Create autofill save view
628 * @param[out] vi The autofill view info handle
629 * @return 0 on success, otherwise a negative error value
630 * @retval #AUTOFILL_ERROR_NONE No error
631 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
632 * @retval #AUTOFILL_ERROR_OUT_OF_MEMORY Out of memory
634 int autofill_save_view_info_create(autofill_save_view_info_h *vi);
637 * @brief Destroy autofill save view
643 * @param[in] vi The autofill view info handle
644 * @return 0 on success, otherwise a negative error value
645 * @retval #AUTOFILL_ERROR_NONE No error
646 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
648 int autofill_save_view_info_destroy(autofill_save_view_info_h vi);
657 * @param[in] vi The autofill view info handle
658 * @param[in] app_id The app ID
659 * @return 0 on success, otherwise a negative error value
660 * @retval #AUTOFILL_ERROR_NONE No error
661 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
663 int autofill_save_view_info_set_app_id(autofill_save_view_info_h vi, const char *app_id);
672 * @param[in] vi The autofill view info handle
673 * @param[out] app_id The app ID
674 * @return 0 on success, otherwise a negative error value
675 * @retval #AUTOFILL_ERROR_NONE No error
676 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
678 int autofill_save_view_info_get_app_id(const autofill_save_view_info_h vi, char **app_id);
687 * @param[in] vi The autofill view info handle
688 * @param[in] view_id The view ID
689 * @return 0 on success, otherwise a negative error value
690 * @retval #AUTOFILL_ERROR_NONE No error
691 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
693 int autofill_save_view_info_set_view_id(autofill_save_view_info_h vi, const char *view_id);
702 * @param[in] vi The autofill view info handle
703 * @param[out] app_id The view ID
704 * @return 0 on success, otherwise a negative error value
705 * @retval #AUTOFILL_ERROR_NONE No error
706 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
708 int autofill_save_view_info_get_view_id(autofill_save_view_info_h vi, char **view_id);
711 * @brief Add autofill save item
717 * @param[in] vi The autofill save view info handle
718 * @param[in] it The autofill save item handle
719 * @return 0 on success, otherwise a negative error value
720 * @retval #AUTOFILL_ERROR_NONE No error
721 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
723 int autofill_save_view_info_add_item(const autofill_save_view_info_h vi, autofill_save_item_h it);
726 * @brief Retrieve all items in save view info
732 * @param[in] vi The autofill view info handle
733 * @param[in] callback The callback function to register
734 * @param[in] user_data The user data to be passed to the callback function
735 * @return 0 on success, otherwise a negative error value
736 * @retval #AUTOFILL_ERROR_NONE No error
737 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
739 int autofill_save_view_info_foreach_items(autofill_save_view_info_h vi, bool (*callback)(autofill_save_item_h item, void *user_data), void *user_data);
743 * @brief Create autofill fill response
749 * @param[out] h The autofill fill response handle
750 * @return 0 on success, otherwise a negative error value
751 * @retval #AUTOFILL_ERROR_NONE No error
752 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
754 int autofill_fill_response_create(autofill_fill_response_h *h);
757 * @brief Destroy autofill fill response
763 * @param[in] h The autofill fill response handle
764 * @return 0 on success, otherwise a negative error value
765 * @retval #AUTOFILL_ERROR_NONE No error
766 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
768 int autofill_fill_response_destroy(autofill_fill_response_h h);
777 * @param[in] h The autofill fill response handle
778 * @param[in] app_id The app ID
779 * @return 0 on success, otherwise a negative error value
780 * @retval #AUTOFILL_ERROR_NONE No error
781 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
783 int autofill_fill_response_set_app_id(autofill_fill_response_h h, const char *app_id);
792 * @param[in] h The autofill fill response handle
793 * @param[out] app_id The app ID
794 * @return 0 on success, otherwise a negative error value
795 * @retval #AUTOFILL_ERROR_NONE No error
796 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
798 int autofill_fill_response_get_app_id(autofill_fill_response_h h, char **app_id);
807 * @param[in] h The autofill fill response handle
808 * @param[in] view_id The view ID
809 * @return 0 on success, otherwise a negative error value
810 * @retval #AUTOFILL_ERROR_NONE No error
811 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
813 int autofill_fill_response_set_view_id(autofill_fill_response_h h, const char *view_id);
822 * @param[in] h The autofill fill response handle
823 * @param[out] view_id The view ID
824 * @return 0 on success, otherwise a negative error value
825 * @retval #AUTOFILL_ERROR_NONE No error
826 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
828 int autofill_fill_response_get_view_id(autofill_fill_response_h h, char **view_id);
831 * @brief Add autofill fill response group
837 * @param[in] h The autofill fill response handle
838 * @param[in] it The autofill fill response group handle
839 * @return 0 on success, otherwise a negative error value
840 * @retval #AUTOFILL_ERROR_NONE No error
841 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
843 int autofill_fill_response_add_group(autofill_fill_response_h h, autofill_fill_response_group_h it);
846 * @brief Retrieve all groups of each fill response
852 * @param[in] h The autofill fill response handle
853 * @param[in] callback The callback function to register
854 * @param[in] user_data The user data to be passed to the callback function
855 * @return 0 on success, otherwise a negative error value
856 * @retval #AUTOFILL_ERROR_NONE No error
857 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
859 int autofill_fill_response_foreach_groups(autofill_fill_response_h h, bool (*callback)(autofill_fill_response_group_h item, void *user_data), void *user_data);
862 * @brief Get the number of fill response group
868 * @param[in] h The autofill fill response handle
869 * @param[out] count The number of group
870 * @return 0 on success, otherwise a negative error value
871 * @retval #AUTOFILL_ERROR_NONE No error
872 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
874 int autofill_fill_response_get_group_count(autofill_fill_response_h h, int *count);
877 * @brief Create autofill fill response group
883 * @param[out] h The autofill fill response group handle
884 * @return 0 on success, otherwise a negative error value
885 * @retval #AUTOFILL_ERROR_NONE No error
886 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
887 * @retval #AUTOFILL_ERROR_OUT_OF_MEMORY Out of memory
889 int autofill_fill_response_group_create(autofill_fill_response_group_h *h);
892 * @brief Destroy autofill fill response group
898 * @param[in] h The autofill fill response group handle
899 * @return 0 on success, otherwise a negative error value
900 * @retval #AUTOFILL_ERROR_NONE No error
901 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
903 int autofill_fill_response_group_destroy(autofill_fill_response_group_h h);
906 * @brief Clone autofill fill response group
912 * @param[in] h The autofill fill response group handle
913 * @param[in] clone The autofill fill response group handle to be cloned
914 * @return 0 on success, otherwise a negative error value
915 * @retval #AUTOFILL_ERROR_NONE No error
916 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
918 int autofill_fill_response_group_clone(autofill_fill_response_group_h h, autofill_fill_response_group_h *clone);
921 * @brief Add autofill item
927 * @param[in] h The autofill fill response group handle
928 * @param[in] it The autofill fill response item handle
929 * @return 0 on success, otherwise a negative error value
930 * @retval #AUTOFILL_ERROR_NONE No error
931 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
932 * @retval #AUTOFILL_ERROR_OUT_OF_MEMORY Out of memory
934 int autofill_fill_response_group_add_item(autofill_fill_response_group_h h, autofill_fill_response_item_h it);
937 * @brief Retrieve all fill response items of each group
943 * @param[in] h The autofill fill response group handle
944 * @param[in] callback The callback function to register
945 * @param[in] user_data The user data to be passed to the callback function
946 * @return 0 on success, otherwise a negative error value
947 * @retval #AUTOFILL_ERROR_NONE No error
948 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
950 int autofill_fill_response_group_foreach_items(autofill_fill_response_group_h h, bool (*callback)(autofill_fill_response_item_h item, void *user_data), void *user_data);
952 // fill response item
954 * @brief Create autofill response item
960 * @param[out] it The autofill fill response item handle
961 * @return 0 on success, otherwise a negative error value
962 * @retval #AUTOFILL_ERROR_NONE No error
963 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
964 * @retval #AUTOFILL_ERROR_OUT_OF_MEMORY Out of memory
966 int autofill_fill_response_item_create(autofill_fill_response_item_h *it);
969 * @brief Destroy autofill fill response item
975 * @param[in] it The autofill fill response item handle
976 * @return 0 on success, otherwise a negative error value
977 * @retval #AUTOFILL_ERROR_NONE No error
978 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
980 int autofill_fill_response_item_destroy(autofill_fill_response_item_h it);
983 * @brief Clone autofill fill response item
989 * @param[in] it The autofill fill response item handle
990 * @param[in] clone The autofill fill response item handle to be cloned
991 * @return 0 on success, otherwise a negative error value
992 * @retval #AUTOFILL_ERROR_NONE No error
993 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
995 int autofill_fill_response_item_clone(autofill_fill_response_item_h it, autofill_fill_response_item_h *clone);
998 * @brief Set autofill ID
1004 * @param[in] it The autofill fill response item handle
1005 * @param[in] id The autofill fill response item ID
1006 * @return 0 on success, otherwise a negative error value
1007 * @retval #AUTOFILL_ERROR_NONE No error
1008 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
1010 int autofill_fill_response_item_set_id(autofill_fill_response_item_h it, const char *id);
1013 * @brief Get autofill ID
1019 * @param[in] it The autofill fill response item handle
1020 * @param[out] id The autofill fill response item ID
1021 * @return 0 on success, otherwise a negative error value
1022 * @retval #AUTOFILL_ERROR_NONE No error
1023 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
1025 int autofill_fill_response_item_get_id(autofill_fill_response_item_h it, char **id);
1028 * @brief Set autofill value
1034 * @param[in] it The autofill fill response item handle
1035 * @param[in] value The autofill fill response item value
1036 * @return 0 on success, otherwise a negative error value
1037 * @retval #AUTOFILL_ERROR_NONE No error
1038 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
1040 int autofill_fill_response_item_set_value(autofill_fill_response_item_h it, const char *value);
1043 * @brief Get autofill value
1049 * @param[in] it The autofill fill response item handle
1050 * @param[out] value The autofill fill response item value
1051 * @return 0 on success, otherwise a negative error value
1052 * @retval #AUTOFILL_ERROR_NONE No error
1053 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
1055 int autofill_fill_response_item_get_value(autofill_fill_response_item_h it, char **value);
1058 * @brief Set presentation text
1064 * @param[in] it The autofill fill response item handle
1065 * @param[in] presentation_text The presentation text
1066 * @return 0 on success, otherwise a negative error value
1067 * @retval #AUTOFILL_ERROR_NONE No error
1068 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
1070 int autofill_fill_response_item_set_presentation_text(autofill_fill_response_item_h it, const char *presentation_text);
1073 * @brief Get presentation text
1079 * @param[in] it The autofill fill response item handle
1080 * @param[out] presentation_text The presentation text
1081 * @return 0 on success, otherwise a negative error value
1082 * @retval #AUTOFILL_ERROR_NONE No error
1083 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
1085 int autofill_fill_response_item_get_presentation_text(autofill_fill_response_item_h it, char ** presentation_text);
1089 * @brief Create autofill save item
1095 * @param[out] it The autofill save item handle
1096 * @return 0 on success, otherwise a negative error value
1097 * @retval #AUTOFILL_ERROR_NONE No error
1098 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
1100 int autofill_save_item_create(autofill_save_item_h *it);
1103 * @brief Destroy autofill save item
1109 * @param[in] it The autofill save item handle
1110 * @return 0 on success, otherwise a negative error value
1111 * @retval #AUTOFILL_ERROR_NONE No error
1112 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
1114 int autofill_save_item_destroy(autofill_save_item_h it);
1117 * @brief Clone autofill item
1123 * @param[in] it The autofill save item handle
1124 * @param[in] clone The autofill save item handle to be cloned
1125 * @return 0 on success, otherwise a negative error value
1126 * @retval #AUTOFILL_ERROR_NONE No error
1127 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
1129 int autofill_save_item_clone(autofill_save_item_h h, autofill_save_item_h *clone);
1132 * @brief Set autofill hint (id(username), name, password, phone, credit card number, organization, so on)
1138 * @param[in] it The autofill save item handle
1139 * @param[in] hint The autofill hint
1140 * @return 0 on success, otherwise a negative error value
1141 * @retval #AUTOFILL_ERROR_NONE No error
1142 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
1144 int autofill_save_item_set_autofill_hint(autofill_save_item_h it, autofill_hint_e hint);
1147 * @brief Get autofill hint
1153 * @param[in] it The autofill save item handle
1154 * @param[out] hint The autofill hint
1155 * @return 0 on success, otherwise a negative error value
1156 * @retval #AUTOFILL_ERROR_NONE No error
1157 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
1159 int autofill_save_item_get_autofill_hint(autofill_save_item_h it, autofill_hint_e *hint);
1162 * @brief Set autofill ID
1168 * @param[in] it The autofill save item handle
1169 * @param[in] id The autofill ID
1170 * @return 0 on success, otherwise a negative error value
1171 * @retval #AUTOFILL_ERROR_NONE No error
1172 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
1174 int autofill_save_item_set_id(autofill_save_item_h it, const char *id);
1177 * @brief Get autofill ID
1183 * @param[in] it The autofill save item handle
1184 * @param[out] id The autofill ID
1185 * @return 0 on success, otherwise a negative error value
1186 * @retval #AUTOFILL_ERROR_NONE No error
1187 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
1189 int autofill_save_item_get_id(autofill_save_item_h it, char **id);
1192 * @brief Set autofill label
1198 * @param[in] it The autofill save item handle
1199 * @param[out] label The autofill label
1200 * @return 0 on success, otherwise a negative error value
1201 * @retval #AUTOFILL_ERROR_NONE No error
1202 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
1204 int autofill_save_item_set_label(autofill_save_item_h it, const char *label);
1207 * @brief Get autofill label
1213 * @param[in] it The autofill save item handle
1214 * @param[out] label The autofill label
1215 * @return 0 on success, otherwise a negative error value
1216 * @retval #AUTOFILL_ERROR_NONE No error
1217 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
1219 int autofill_save_item_get_label(autofill_save_item_h it, char **label);
1222 * @brief Set sensitive data
1228 * @param[in] it The autofill save item handle
1229 * @param[in] sensitive The sensitive data or not
1230 * @return 0 on success, otherwise a negative error value
1231 * @retval #AUTOFILL_ERROR_NONE No error
1232 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
1234 int autofill_save_item_set_sensitive_data(autofill_save_item_h it, bool sensitive);
1237 * @brief Get sensitive data
1243 * @param[in] it The autofill save item handle
1244 * @param[out] sensitive The sensitive data or not
1245 * @return 0 on success, otherwise a negative error value
1246 * @retval #AUTOFILL_ERROR_NONE No error
1247 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
1249 int autofill_save_item_get_sensitive_data(autofill_save_item_h it, bool *sensitive);
1252 * @brief Set autofill value
1258 * @param[in] it The autofill save item handle
1259 * @param[in] value The autofill value
1260 * @return 0 on success, otherwise a negative error value
1261 * @retval #AUTOFILL_ERROR_NONE No error
1262 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
1264 int autofill_save_item_set_value(autofill_save_item_h it, const char *value);
1267 * @brief Get autofill value
1273 * @param[in] it The autofill save item handle
1274 * @param[out] value The autofill value
1275 * @return 0 on success, otherwise a negative error value
1276 * @retval #AUTOFILL_ERROR_NONE No error
1277 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
1279 int autofill_save_item_get_value(autofill_save_item_h it, char **value);
1289 #endif /* __TIZEN_UIX_AUTOFILL_COMMON_H__ */