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.
32 * @addtogroup CAPI_UIX_AUTOFILL_COMMON_MODULE
36 #ifndef TIZEN_ERROR_AUTOFILL
37 #define TIZEN_ERROR_AUTOFILL -0x02FE10000
41 * @brief Enumeration for autofill function error.
46 AUTOFILL_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */
47 AUTOFILL_ERROR_IO_ERROR = TIZEN_ERROR_IO_ERROR, /**< I/O Error */
48 AUTOFILL_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
49 AUTOFILL_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */
50 AUTOFILL_ERROR_NOT_INITIALIZED = TIZEN_ERROR_ENDPOINT_NOT_CONNECTED, /**< Initialization is not set */
51 AUTOFILL_ERROR_NO_CALLBACK_FUNCTION = TIZEN_ERROR_IME | 0x0001, /**< Necessary callback function is not set */
52 AUTOFILL_ERROR_NOT_RUNNING = TIZEN_ERROR_IME | 0x0002, /**< IME main loop isn't started yet */
53 AUTOFILL_ERROR_OPERATION_FAILED = TIZEN_ERROR_IME | 0x0003, /**< Operation failed */
54 AUTOFILL_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< out of memory */
58 * @brief Enumeration for autofill hint.
64 AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATE, /**< Autofill hint for a credit card expiration date */
65 AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DAY, /**< Autofill hint for a credit card expiration day */
66 AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_MONTH, /**< Autofill hint for a credit card expiration month */
67 AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_YEAR, /**< Autofill hint for a credit card expiration year */
68 AUTOFILL_HINT_CREDIT_CARD_NUMBER, /**< Autofill hint for a credit card number */
69 AUTOFILL_HINT_EMAIL_ADDRESS, /**< Autofill hint for an email address */
70 AUTOFILL_HINT_NAME, /**< Autofill hint for a user's real name */
71 AUTOFILL_HINT_PHONE, /**< Autofill hint for a phone number */
72 AUTOFILL_HINT_POSTAL_ADDRESS, /**< Autofill hint for a postal address */
73 AUTOFILL_HINT_POSTAL_CODE, /**< Autofill hint for a postal code */
74 AUTOFILL_HINT_ID /**< Autofill hint for a user's ID */
78 * @brief The autofill item handle.
81 typedef struct autofill_item_s *autofill_item_h;
84 * @brief The autofill authentication information handle.
87 typedef struct autofill_auth_info_s *autofill_auth_info_h;
90 * @brief The autofill view information handle.
93 typedef struct autofill_view_info_s *autofill_view_info_h;
96 * @brief The autofill fill response handle.
99 typedef struct autofill_fill_response_s *autofill_fill_response_h;
102 * @brief The autofill fill response group handle.
105 typedef struct autofill_fill_response_group_s *autofill_fill_response_group_h;
108 * @brief The autofill fill response item handle.
111 typedef struct autofill_response_item_s *autofill_fill_response_item_h;
114 * @brief The autofill save item handle.
117 typedef struct autofill_save_item_s *autofill_save_item_h;
120 * @brief The autofill save view information handle.
123 typedef struct autofill_save_view_info_s *autofill_save_view_info_h;
126 * @brief Called for each autofill information in view info.
128 * @remarks @a item should not be freed and can be used only in the callback.
129 * @param[in] item The autofill item handle
130 * @param[in] user_data The user data to be passed to the callback function
131 * @return @c true to continue with the next iteration of the loop,
132 * otherwise @c false to break out of the loop
133 * @pre autofill_view_info_foreach_items() will invoke this callback.
134 * @see autofill_view_info_foreach_items()
136 typedef bool (*autofill_item_cb)(autofill_item_h item, void *user_data);
139 * @brief Called for each autofill information in save view info.
141 * @remarks @a item should not be freed and can be used only in the callback.
142 * @param[in] item The autofill item handle
143 * @param[in] user_data The user data to be passed to the callback function
144 * @return @c true to continue with the next iteration of the loop,
145 * otherwise @c false to break out of the loop
146 * @pre autofill_view_info_foreach_items() will invoke this callback.
147 * @see autofill_view_info_foreach_items()
149 typedef bool (*autofill_save_item_cb)(autofill_save_item_h item, void *user_data);
152 * @brief Called for each autofill fill response group information in fill response.
154 * @remarks @a item should not be freed and can be used only in the callback.
155 * @param[in] item The autofill fill response group handle
156 * @param[in] user_data The user data to be passed to the callback function
157 * @return @c true to continue with the next iteration of the loop,
158 * otherwise @c false to break out of the loop
159 * @pre autofill_fill_response_foreach_groups() will invoke this callback.
160 * @see autofill_fill_response_foreach_groups()
162 typedef bool (*autofill_fill_response_group_cb)(autofill_fill_response_group_h item, void *user_data);
165 * @brief Called for each autofill fill response information in fill response group.
167 * @remarks @a item should not be freed and can be used only in the callback.
168 * @param[in] item The autofill fill response item handle
169 * @param[in] user_data The user data to be passed to the callback function
170 * @return @c true to continue with the next iteration of the loop,
171 * otherwise @c false to break out of the loop
172 * @pre autofill_fill_response_group_foreach_items() will invoke this callback.
173 * @see autofill_view_info_foreach_items()
175 typedef bool (*autofill_fill_response_item_cb)(autofill_fill_response_item_h item, void *user_data);
178 * @brief Creates autofill item.
180 * @remarks If the function succeeds, @a it handle must be released with autofill_item_destroy().
181 * @param[out] it The autofill item handle
182 * @return 0 on success, otherwise a negative error value
183 * @retval #AUTOFILL_ERROR_NONE No error
184 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
185 * @retval #AUTOFILL_ERROR_OUT_OF_MEMORY Out of memory
186 * @see autofill_item_destroy()
188 int autofill_item_create(autofill_item_h *it);
191 * @brief Destroys autofill item.
193 * @param[in] it The autofill item handle
194 * @return 0 on success, otherwise a negative error value
195 * @retval #AUTOFILL_ERROR_NONE No error
196 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
198 int autofill_item_destroy(autofill_item_h it);
201 * @brief Clones autofill item.
203 * @remarks If the function succeeds, @a clone handle must be released with autofill_item_destroy().
204 * @param[in] it The autofill item handle
205 * @param[out] clone The autofill item handle to be cloned
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_clone(autofill_item_h it, autofill_item_h *clone);
213 * @brief Sets autofill hint (id (username), name, password, phone, credit card number, organization, so on) in autofill item.
215 * @param[in] it The autofill item handle
216 * @param[in] hint The autofill hint
217 * @return 0 on success, otherwise a negative error value
218 * @retval #AUTOFILL_ERROR_NONE No error
219 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
221 int autofill_item_set_autofill_hint(autofill_item_h it, autofill_hint_e hint);
224 * @brief Gets autofill hint in autofill item.
226 * @param[in] it The autofill item handle
227 * @param[out] hint The autofill hint
228 * @return 0 on success, otherwise a negative error value
229 * @retval #AUTOFILL_ERROR_NONE No error
230 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
232 int autofill_item_get_autofill_hint(autofill_item_h it, autofill_hint_e *hint);
235 * @brief Sets autofill ID in autofill item.
237 * @param[in] it The autofill item handle
238 * @param[in] id The autofill ID
239 * @return 0 on success, otherwise a negative error value
240 * @retval #AUTOFILL_ERROR_NONE No error
241 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
243 int autofill_item_set_id(autofill_item_h it, const char *id);
246 * @brief Gets autofill ID in autofill item.
248 * @remarks @a id must be released using free().
249 * @param[in] it The autofill item handle
250 * @param[out] id The autofill ID
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_id(autofill_item_h it, char **id);
258 * @brief Sets autofill Label in autofill item.
260 * @param[in] it The autofill item handle
261 * @param[in] label The autofill label
262 * @return 0 on success, otherwise a negative error value
263 * @retval #AUTOFILL_ERROR_NONE No error
264 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
266 int autofill_item_set_label(autofill_item_h it, const char *label);
269 * @brief Gets autofill Label in autofill item.
271 * @remarks @a label must be released using free().
272 * @param[in] it The autofill item handle
273 * @param[out] label The autofill label
274 * @return 0 on success, otherwise a negative error value
275 * @retval #AUTOFILL_ERROR_NONE No error
276 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
278 int autofill_item_get_label(autofill_item_h it, char **label);
281 * @brief Sets sensitive data in autofill item.
283 * @param[in] it The autofill item handle
284 * @param[in] sensitive The sensitive data or not
285 * @return 0 on success, otherwise a negative error value
286 * @retval #AUTOFILL_ERROR_NONE No error
287 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
289 int autofill_item_set_sensitive_data(autofill_item_h it, bool sensitive);
292 * @brief Gets sensitive data in autofill item.
294 * @param[in] it The autofill item handle
295 * @param[out] sensitive The sensitive data or not
296 * @return 0 on success, otherwise a negative error value
297 * @retval #AUTOFILL_ERROR_NONE No error
298 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
300 int autofill_item_get_sensitive_data(autofill_item_h it, bool *sensitive);
303 * @brief Sets autofill value in autofill item.
305 * @param[in] it The autofill item handle
306 * @param[in] value The autofill value
307 * @return 0 on success, otherwise a negative error value
308 * @retval #AUTOFILL_ERROR_NONE No error
309 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
311 int autofill_item_set_value(autofill_item_h it, const char *value);
314 * @brief Gets autofill value in autofill item.
316 * @remarks @a value must be released using free().
317 * @param[in] it The autofill item handle
318 * @param[out] value The autofill value
319 * @return 0 on success, otherwise a negative error value
320 * @retval #AUTOFILL_ERROR_NONE No error
321 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
323 int autofill_item_get_value(autofill_item_h it, char **value);
326 * @brief Creates autofill authentication info.
328 * @remarks If the function succeeds, @a ai handle must be released with autofill_auth_info_destroy().
329 * @param[out] ai The autofill authentication information handle
330 * @return 0 on success, otherwise a negative error value
331 * @retval #AUTOFILL_ERROR_NONE No error
332 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
333 * @retval #AUTOFILL_ERROR_OUT_OF_MEMORY Out of memory
335 int autofill_auth_info_create(autofill_auth_info_h *ai);
338 * @brief Destroys autofill authentication info.
340 * @param[in] ai The autofill authentication information handle
341 * @return 0 on success, otherwise a negative error value
342 * @retval #AUTOFILL_ERROR_NONE No error
343 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
345 int autofill_auth_info_destroy(autofill_auth_info_h ai);
348 * @brief Sets app id in autofill authentication information.
350 * @param[in] ai The autofill authentication information handle
351 * @param[in] app_id The app ID
352 * @return 0 on success, otherwise a negative error value
353 * @retval #AUTOFILL_ERROR_NONE No error
354 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
356 int autofill_auth_info_set_app_id(autofill_auth_info_h ai, const char *app_id);
359 * @brief Gets app id in autofill authentication information.
361 * @remarks @a app_id must be released using free().
362 * @param[in] ai The autofill authentication information handle
363 * @param[out] app_id The app ID
364 * @return 0 on success, otherwise a negative error value
365 * @retval #AUTOFILL_ERROR_NONE No error
366 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
368 int autofill_auth_info_get_app_id(autofill_auth_info_h ai, char **app_id);
371 * @brief Sets view id in autofill authentication information.
373 * @param[in] ai The autofill authentication information handle
374 * @param[in] view_id The view ID
375 * @return 0 on success, otherwise a negative error value
376 * @retval #AUTOFILL_ERROR_NONE No error
377 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
379 int autofill_auth_info_set_view_id(autofill_auth_info_h ai, const char *view_id);
382 * @brief Gets view id in autofill authentication information.
384 * @remarks @a view_id must be released using free().
385 * @param[in] ai The autofill authentication information handle
386 * @param[in] view_id The view ID
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_get_view_id(autofill_auth_info_h ai, char **view_id);
394 * @brief Sets exist autofill data in autofill authentication information.
396 * @param[in] ai The autofill authentication information handle
397 * @param[in] exist_autofill_data The autofill data existence
398 * @return 0 on success, otherwise a negative error value
399 * @retval #AUTOFILL_ERROR_NONE No error
400 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
402 int autofill_auth_info_set_exist_autofill_data(autofill_auth_info_h ai, bool exist_autofill_data);
405 * @brief Gets exist autofill data in autofill authentication information.
407 * @param[in] ai The autofill authentication information handle
408 * @param[out] exist_autofill_data The autofill data existence
409 * @return 0 on success, otherwise a negative error value
410 * @retval #AUTOFILL_ERROR_NONE No error
411 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
413 int autofill_auth_info_get_exist_autofill_data(autofill_auth_info_h ai, bool *exist_autofill_data);
416 * @brief Sets need authentication in autofill authentication information.
418 * @param[in] ai The autofill authentication information handle
419 * @param[in] need_authentication The authentication need
420 * @return 0 on success, otherwise a negative error value
421 * @retval #AUTOFILL_ERROR_NONE No error
422 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
424 int autofill_auth_info_set_need_authentication(autofill_auth_info_h ai, bool need_authentication);
427 * @brief Gets need authentication in autofill authentication information.
429 * @param[in] ai The autofill authentication information handle
430 * @param[out] need_authentication The authentication need
431 * @return 0 on success, otherwise a negative error value
432 * @retval #AUTOFILL_ERROR_NONE No error
433 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
435 int autofill_auth_info_get_need_authentication(autofill_auth_info_h ai, bool *need_authentication);
438 * @brief Sets service name in autofill authentication information.
440 * @param[in] ai The autofill authentication information handle
441 * @param[in] service_name The autofill service name
442 * @return 0 on success, otherwise a negative error value
443 * @retval #AUTOFILL_ERROR_NONE No error
444 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
446 int autofill_auth_info_set_service_name(autofill_auth_info_h ai, const char *service_name);
449 * @brief Gets service name in autofill authentication information.
451 * @remarks @a service_name must be released using free().
452 * @param[in] ai The autofill authentication information handle
453 * @param[out] service_name The autofill service name
454 * @return 0 on success, otherwise a negative error value
455 * @retval #AUTOFILL_ERROR_NONE No error
456 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
458 int autofill_auth_info_get_service_name(autofill_auth_info_h ai, char **service_name);
461 * @brief Sets service message in autofill authentication information.
463 * @param[in] ai The autofill authentication information handle
464 * @param[in] service_message The autofill service message
465 * @return 0 on success, otherwise a negative error value
466 * @retval #AUTOFILL_ERROR_NONE No error
467 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
469 int autofill_auth_info_set_service_message(autofill_auth_info_h ai, const char *service_message);
472 * @brief Gets service message in autofill authentication information.
474 * @remarks @a service_message must be released using free().
475 * @param[in] ai The autofill authentication information handle
476 * @param[out] service_message The autofill service message
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_get_service_message(autofill_auth_info_h ai, char **service_message);
484 * @brief Sets service logo image path in autofill authentication information.
486 * @param[in] ai The autofill authentication information handle
487 * @param[in] service_logo_image_path The autofill service logo image path
488 * @return 0 on success, otherwise a negative error value
489 * @retval #AUTOFILL_ERROR_NONE No error
490 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
492 int autofill_auth_info_set_service_logo_image_path(autofill_auth_info_h ai, const char *service_logo_image_path);
495 * @brief Gets service logo image path in autofill authentication information.
497 * @remarks @a service_logo_image_path must be released using free().
498 * @param[in] ai The autofill authentication information handle
499 * @param[out] service_logo_image_path The autofill service logo image path
500 * @return 0 on success, otherwise a negative error value
501 * @retval #AUTOFILL_ERROR_NONE No error
502 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
504 int autofill_auth_info_get_service_logo_image_path(autofill_auth_info_h ai, char **service_logo_image_path);
507 * @brief Creates autofill view info.
509 * @remarks If the function succeeds, @a vi handle must be released with autofill_view_info_destroy().
510 * @param[out] vi The autofill view info handle
511 * @return 0 on success, otherwise a negative error value
512 * @retval #AUTOFILL_ERROR_NONE No error
513 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
514 * @retval #AUTOFILL_ERROR_OUT_OF_MEMORY Out of memory
516 int autofill_view_info_create(autofill_view_info_h *vi);
519 * @brief Destroys autofill view info.
521 * @param[in] vi The autofill view info handle
522 * @return 0 on success, otherwise a negative error value
523 * @retval #AUTOFILL_ERROR_NONE No error
524 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
526 int autofill_view_info_destroy(autofill_view_info_h vi);
529 * @brief Sets app id in autofill view information.
531 * @param[in] vi The autofill view info handle
532 * @param[in] app_id The app ID
533 * @return 0 on success, otherwise a negative error value
534 * @retval #AUTOFILL_ERROR_NONE No error
535 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
537 int autofill_view_info_set_app_id(autofill_view_info_h vi, const char *app_id);
540 * @brief Gets app id in autofill view information.
542 * @remarks @a app_id must be released using free().
543 * @param[in] vi The autofill view info handle
544 * @param[out] app_id The app ID
545 * @return 0 on success, otherwise a negative error value
546 * @retval #AUTOFILL_ERROR_NONE No error
547 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
549 int autofill_view_info_get_app_id(const autofill_view_info_h vi, char **app_id);
552 * @brief Sets view id in autofill view information.
554 * @param[in] vi The autofill view info handle
555 * @param[in] view_id The view ID
556 * @return 0 on success, otherwise a negative error value
557 * @retval #AUTOFILL_ERROR_NONE No error
558 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
560 int autofill_view_info_set_view_id(autofill_view_info_h vi, const char *view_id);
563 * @brief Gets view id in autofill view information.
565 * @remarks @a view_id must be released using free().
566 * @param[in] vi The autofill view info handle
567 * @param[out] 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_get_view_id(autofill_view_info_h vi, char **view_id);
575 * @brief Adds autofill item in autofill view information.
577 * @param[in] vi The autofill view info handle
578 * @param[in] it The autofill item handle
579 * @return 0 on success, otherwise a negative error value
580 * @retval #AUTOFILL_ERROR_NONE No error
581 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
583 int autofill_view_info_add_item(const autofill_view_info_h vi, autofill_item_h it);
586 * @brief Retrieves all items in view info.
588 * @param[in] vi The autofill view info handle
589 * @param[in] callback The callback function to register
590 * @param[in] user_data The user data to be passed to the callback function
591 * @return 0 on success, otherwise a negative error value
592 * @retval #AUTOFILL_ERROR_NONE No error
593 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
595 int autofill_view_info_foreach_items(autofill_view_info_h vi, autofill_item_cb callback, void *user_data);
598 * @brief Creates autofill save view.
600 * @remarks If the function succeeds, @a vi handle must be released with autofill_save_view_info_destroy()
601 * @param[out] vi The autofill view info handle
602 * @return 0 on success, otherwise a negative error value
603 * @retval #AUTOFILL_ERROR_NONE No error
604 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
605 * @retval #AUTOFILL_ERROR_OUT_OF_MEMORY Out of memory
607 int autofill_save_view_info_create(autofill_save_view_info_h *vi);
610 * @brief Destroys autofill save view.
612 * @param[in] vi The autofill view info handle
613 * @return 0 on success, otherwise a negative error value
614 * @retval #AUTOFILL_ERROR_NONE No error
615 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
617 int autofill_save_view_info_destroy(autofill_save_view_info_h vi);
620 * @brief Sets app ID in autofill save view information.
622 * @param[in] vi The autofill view info handle
623 * @param[in] app_id The app ID
624 * @return 0 on success, otherwise a negative error value
625 * @retval #AUTOFILL_ERROR_NONE No error
626 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
628 int autofill_save_view_info_set_app_id(autofill_save_view_info_h vi, const char *app_id);
631 * @brief Gets app ID in autofill save view information.
633 * @remarks @a app_id must be released using free().
634 * @param[in] vi The autofill view info handle
635 * @param[out] app_id The app ID
636 * @return 0 on success, otherwise a negative error value
637 * @retval #AUTOFILL_ERROR_NONE No error
638 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
640 int autofill_save_view_info_get_app_id(const autofill_save_view_info_h vi, char **app_id);
643 * @brief Sets view ID in autofill save view information.
645 * @param[in] vi The autofill view info handle
646 * @param[in] view_id The view ID
647 * @return 0 on success, otherwise a negative error value
648 * @retval #AUTOFILL_ERROR_NONE No error
649 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
651 int autofill_save_view_info_set_view_id(autofill_save_view_info_h vi, const char *view_id);
654 * @brief Gets view ID in autofill save view information.
656 * @remarks @a view_id must be released using free().
657 * @param[in] vi The autofill view info handle
658 * @param[out] view_id The view 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_get_view_id(autofill_save_view_info_h vi, char **view_id);
666 * @brief Adds autofill save item in autofill save view information.
668 * @param[in] vi The autofill save view info handle
669 * @param[in] it The autofill save item handle
670 * @return 0 on success, otherwise a negative error value
671 * @retval #AUTOFILL_ERROR_NONE No error
672 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
674 int autofill_save_view_info_add_item(const autofill_save_view_info_h vi, autofill_save_item_h it);
677 * @brief Retrieves all items in save view info.
679 * @param[in] vi The autofill view info handle
680 * @param[in] callback The callback function to register
681 * @param[in] user_data The user data to be passed to the callback function
682 * @return 0 on success, otherwise a negative error value
683 * @retval #AUTOFILL_ERROR_NONE No error
684 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
686 int autofill_save_view_info_foreach_items(autofill_save_view_info_h vi, autofill_save_item_cb callback, void *user_data);
689 * @brief Creates autofill fill response.
691 * @remarks If the function succeeds, @a h handle must be released with autofill_fill_response_destroy().
692 * @param[out] h The autofill fill response handle
693 * @return 0 on success, otherwise a negative error value
694 * @retval #AUTOFILL_ERROR_NONE No error
695 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
697 int autofill_fill_response_create(autofill_fill_response_h *h);
700 * @brief Destroys autofill fill response.
702 * @param[in] h The autofill fill response handle
703 * @return 0 on success, otherwise a negative error value
704 * @retval #AUTOFILL_ERROR_NONE No error
705 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
707 int autofill_fill_response_destroy(autofill_fill_response_h h);
710 * @brief Sets app ID.
712 * @param[in] h The autofill fill response handle
713 * @param[in] app_id The app ID
714 * @return 0 on success, otherwise a negative error value
715 * @retval #AUTOFILL_ERROR_NONE No error
716 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
718 int autofill_fill_response_set_app_id(autofill_fill_response_h h, const char *app_id);
721 * @brief Gets app ID.
723 * @remarks @a app_id must be released using free().
724 * @param[in] h The autofill fill response handle
725 * @param[out] app_id The app ID
726 * @return 0 on success, otherwise a negative error value
727 * @retval #AUTOFILL_ERROR_NONE No error
728 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
730 int autofill_fill_response_get_app_id(autofill_fill_response_h h, char **app_id);
733 * @brief Sets view ID.
735 * @param[in] h The autofill fill response handle
736 * @param[in] view_id The view ID
737 * @return 0 on success, otherwise a negative error value
738 * @retval #AUTOFILL_ERROR_NONE No error
739 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
741 int autofill_fill_response_set_view_id(autofill_fill_response_h h, const char *view_id);
744 * @brief Gets view ID.
746 * @remarks @a view_id must be released using free().
747 * @param[in] h The autofill fill response handle
748 * @param[out] view_id The view ID
749 * @return 0 on success, otherwise a negative error value
750 * @retval #AUTOFILL_ERROR_NONE No error
751 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
753 int autofill_fill_response_get_view_id(autofill_fill_response_h h, char **view_id);
756 * @brief Adds autofill fill response group.
758 * @param[in] h The autofill fill response handle
759 * @param[in] it The autofill fill response group handle
760 * @return 0 on success, otherwise a negative error value
761 * @retval #AUTOFILL_ERROR_NONE No error
762 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
764 int autofill_fill_response_add_group(autofill_fill_response_h h, autofill_fill_response_group_h it);
768 * @brief Retrieves all groups of each fill response.
770 * @param[in] h The autofill fill response handle
771 * @param[in] callback The callback function to register
772 * @param[in] user_data The user data to be passed to the callback function
773 * @return 0 on success, otherwise a negative error value
774 * @retval #AUTOFILL_ERROR_NONE No error
775 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
777 int autofill_fill_response_foreach_groups(autofill_fill_response_h h, autofill_fill_response_group_cb callback, void *user_data);
780 * @brief Gets the number of fill response group.
782 * @param[in] h The autofill fill response handle
783 * @param[out] count The number of group
784 * @return 0 on success, otherwise a negative error value
785 * @retval #AUTOFILL_ERROR_NONE No error
786 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
788 int autofill_fill_response_get_group_count(autofill_fill_response_h h, int *count);
791 * @brief Creates autofill fill response group.
793 * @remarks If the function succeeds, @a h handle must be released with autofill_fill_response_group_destroy().
794 * @param[out] h The autofill fill response group handle
795 * @return 0 on success, otherwise a negative error value
796 * @retval #AUTOFILL_ERROR_NONE No error
797 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
798 * @retval #AUTOFILL_ERROR_OUT_OF_MEMORY Out of memory
800 int autofill_fill_response_group_create(autofill_fill_response_group_h *h);
803 * @brief Destroys autofill fill response group.
805 * @param[in] h The autofill fill response group handle
806 * @return 0 on success, otherwise a negative error value
807 * @retval #AUTOFILL_ERROR_NONE No error
808 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
810 int autofill_fill_response_group_destroy(autofill_fill_response_group_h h);
813 * @brief Clones autofill fill response group.
815 * @remarks If the function succeeds, @a clone handle must be released with autofill_fill_response_group_destroy().
816 * @param[in] h The autofill fill response group handle
817 * @param[in] clone The autofill fill response group handle to be cloned
818 * @return 0 on success, otherwise a negative error value
819 * @retval #AUTOFILL_ERROR_NONE No error
820 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
822 int autofill_fill_response_group_clone(autofill_fill_response_group_h h, autofill_fill_response_group_h *clone);
825 * @brief Adds autofill item in autofill fil response group.
827 * @param[in] h The autofill fill response group handle
828 * @param[in] it The autofill fill response item handle
829 * @return 0 on success, otherwise a negative error value
830 * @retval #AUTOFILL_ERROR_NONE No error
831 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
832 * @retval #AUTOFILL_ERROR_OUT_OF_MEMORY Out of memory
834 int autofill_fill_response_group_add_item(autofill_fill_response_group_h h, autofill_fill_response_item_h it);
837 * @brief Retrieves all fill response items of each group.
839 * @param[in] h The autofill fill response group handle
840 * @param[in] callback The callback function to register
841 * @param[in] user_data The user data to be passed to the callback function
842 * @return 0 on success, otherwise a negative error value
843 * @retval #AUTOFILL_ERROR_NONE No error
844 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
846 int autofill_fill_response_group_foreach_items(autofill_fill_response_group_h h, autofill_fill_response_item_cb callback, void *user_data);
849 * @brief Creates autofill response item.
851 * @remarks If the function succeeds, @a it handle must be released with autofill_fill_response_item_destroy().
852 * @param[out] it The autofill fill response item handle
853 * @return 0 on success, otherwise a negative error value
854 * @retval #AUTOFILL_ERROR_NONE No error
855 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
856 * @retval #AUTOFILL_ERROR_OUT_OF_MEMORY Out of memory
858 int autofill_fill_response_item_create(autofill_fill_response_item_h *it);
861 * @brief Destroys autofill fill response item.
863 * @param[in] it The autofill fill response item handle
864 * @return 0 on success, otherwise a negative error value
865 * @retval #AUTOFILL_ERROR_NONE No error
866 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
868 int autofill_fill_response_item_destroy(autofill_fill_response_item_h it);
871 * @brief Clones autofill fill response item.
875 * @param[in] it The autofill fill response item handle
876 * @param[in] clone The autofill fill response item handle to be cloned
877 * @return 0 on success, otherwise a negative error value
878 * @retval #AUTOFILL_ERROR_NONE No error
879 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
881 int autofill_fill_response_item_clone(autofill_fill_response_item_h it, autofill_fill_response_item_h *clone);
884 * @brief Sets autofill ID in autofill fill response item.
886 * @param[in] it The autofill fill response item handle
887 * @param[in] id The autofill fill response item ID
888 * @return 0 on success, otherwise a negative error value
889 * @retval #AUTOFILL_ERROR_NONE No error
890 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
892 int autofill_fill_response_item_set_id(autofill_fill_response_item_h it, const char *id);
895 * @brief Gets autofill ID in autofill fill response item.
897 * @remarks @a id must be released using free().
898 * @param[in] it The autofill fill response item handle
899 * @param[out] id The autofill fill response item ID
900 * @return 0 on success, otherwise a negative error value
901 * @retval #AUTOFILL_ERROR_NONE No error
902 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
904 int autofill_fill_response_item_get_id(autofill_fill_response_item_h it, char **id);
907 * @brief Sets autofill value in autofill fill response item.
909 * @param[in] it The autofill fill response item handle
910 * @param[in] value The autofill fill response item value
911 * @return 0 on success, otherwise a negative error value
912 * @retval #AUTOFILL_ERROR_NONE No error
913 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
915 int autofill_fill_response_item_set_value(autofill_fill_response_item_h it, const char *value);
918 * @brief Gets autofill value in autofill fill response item.
920 * @remarks @a value must be released using free().
921 * @param[in] it The autofill fill response item handle
922 * @param[out] value The autofill fill response item value
923 * @return 0 on success, otherwise a negative error value
924 * @retval #AUTOFILL_ERROR_NONE No error
925 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
927 int autofill_fill_response_item_get_value(autofill_fill_response_item_h it, char **value);
930 * @brief Sets presentation text in autofill fill response item.
932 * @param[in] it The autofill fill response item handle
933 * @param[in] presentation_text The presentation text
934 * @return 0 on success, otherwise a negative error value
935 * @retval #AUTOFILL_ERROR_NONE No error
936 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
938 int autofill_fill_response_item_set_presentation_text(autofill_fill_response_item_h it, const char *presentation_text);
941 * @brief Gets presentation text in autofill fill response item.
943 * @remarks @a presentation_text must be released using free().
944 * @param[in] it The autofill fill response item handle
945 * @param[out] presentation_text The presentation text
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_item_get_presentation_text(autofill_fill_response_item_h it, char **presentation_text);
953 * @brief Creates autofill save item.
955 * @remarks If the function succeeds, @a it handle must be released with autofill_save_item_destroy().
956 * @param[out] it The autofill save item handle
957 * @return 0 on success, otherwise a negative error value
958 * @retval #AUTOFILL_ERROR_NONE No error
959 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
961 int autofill_save_item_create(autofill_save_item_h *it);
964 * @brief Destroys autofill save item.
966 * @param[in] it The autofill save item handle
967 * @return 0 on success, otherwise a negative error value
968 * @retval #AUTOFILL_ERROR_NONE No error
969 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
971 int autofill_save_item_destroy(autofill_save_item_h it);
974 * @brief Clones autofill save item.
976 * @param[in] it The autofill save item handle
977 * @param[in] clone The autofill save item handle to be cloned
978 * @return 0 on success, otherwise a negative error value
979 * @retval #AUTOFILL_ERROR_NONE No error
980 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
982 int autofill_save_item_clone(autofill_save_item_h it, autofill_save_item_h *clone);
985 * @brief Sets autofill hint (id(username), name, password, phone, credit card number, organization, so on) in autofill save item.
987 * @param[in] it The autofill save item handle
988 * @param[in] hint The autofill hint
989 * @return 0 on success, otherwise a negative error value
990 * @retval #AUTOFILL_ERROR_NONE No error
991 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
993 int autofill_save_item_set_autofill_hint(autofill_save_item_h it, autofill_hint_e hint);
996 * @brief Gets autofill hint in autofill save item.
998 * @param[in] it The autofill save item handle
999 * @param[out] hint The autofill hint
1000 * @return 0 on success, otherwise a negative error value
1001 * @retval #AUTOFILL_ERROR_NONE No error
1002 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
1004 int autofill_save_item_get_autofill_hint(autofill_save_item_h it, autofill_hint_e *hint);
1007 * @brief Sets autofill ID in autofill save item.
1009 * @param[in] it The autofill save item handle
1010 * @param[in] id The autofill ID
1011 * @return 0 on success, otherwise a negative error value
1012 * @retval #AUTOFILL_ERROR_NONE No error
1013 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
1015 int autofill_save_item_set_id(autofill_save_item_h it, const char *id);
1018 * @brief Gets autofill ID in autofill save item.
1020 * @remarks @a id must be released using free().
1021 * @param[in] it The autofill save item handle
1022 * @param[out] id The autofill ID
1023 * @return 0 on success, otherwise a negative error value
1024 * @retval #AUTOFILL_ERROR_NONE No error
1025 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
1027 int autofill_save_item_get_id(autofill_save_item_h it, char **id);
1030 * @brief Sets autofill label in autofill save item.
1032 * @param[in] it The autofill save item handle
1033 * @param[out] label The autofill label
1034 * @return 0 on success, otherwise a negative error value
1035 * @retval #AUTOFILL_ERROR_NONE No error
1036 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
1038 int autofill_save_item_set_label(autofill_save_item_h it, const char *label);
1041 * @brief Gets autofill label in autofill save item.
1043 * @remarks @a label must be released using free().
1044 * @param[in] it The autofill save item handle
1045 * @param[out] label The autofill label
1046 * @return 0 on success, otherwise a negative error value
1047 * @retval #AUTOFILL_ERROR_NONE No error
1048 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
1050 int autofill_save_item_get_label(autofill_save_item_h it, char **label);
1053 * @brief Sets sensitive data in autofill save item.
1055 * @param[in] it The autofill save item handle
1056 * @param[in] sensitive The sensitive data or not
1057 * @return 0 on success, otherwise a negative error value
1058 * @retval #AUTOFILL_ERROR_NONE No error
1059 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
1061 int autofill_save_item_set_sensitive_data(autofill_save_item_h it, bool sensitive);
1064 * @brief Gets sensitive data in autofill save item.
1066 * @param[in] it The autofill save item handle
1067 * @param[out] sensitive The sensitive data or not
1068 * @return 0 on success, otherwise a negative error value
1069 * @retval #AUTOFILL_ERROR_NONE No error
1070 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
1072 int autofill_save_item_get_sensitive_data(autofill_save_item_h it, bool *sensitive);
1075 * @brief Sets autofill value in autofill save item.
1077 * @param[in] it The autofill save item handle
1078 * @param[in] value The autofill value
1079 * @return 0 on success, otherwise a negative error value
1080 * @retval #AUTOFILL_ERROR_NONE No error
1081 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
1083 int autofill_save_item_set_value(autofill_save_item_h it, const char *value);
1086 * @brief Gets autofill value in autofill save item.
1088 * @remarks @a value must be released using free().
1089 * @param[in] it The autofill save item handle
1090 * @param[out] value The autofill value
1091 * @return 0 on success, otherwise a negative error value
1092 * @retval #AUTOFILL_ERROR_NONE No error
1093 * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
1095 int autofill_save_item_get_value(autofill_save_item_h it, char **value);
1105 #endif /* __TIZEN_UIX_AUTOFILL_COMMON_H__ */