summaryrefslogtreecommitdiff
path: root/lib/common/include/phone-common.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/common/include/phone-common.h')
-rwxr-xr-xlib/common/include/phone-common.h1181
1 files changed, 0 insertions, 1181 deletions
diff --git a/lib/common/include/phone-common.h b/lib/common/include/phone-common.h
deleted file mode 100755
index 3fbb06d..0000000
--- a/lib/common/include/phone-common.h
+++ /dev/null
@@ -1,1181 +0,0 @@
-/*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://floralicense.org/license/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __PHONE_COMMON_H__
-#define __PHONE_COMMON_H__
-
-#include <time.h>
-#include <libintl.h>
-#include <ui-gadget.h>
-#include <contacts.h>
-#include <unicode/udat.h>
-#include <bundle.h>
-#include "phone-ug.h"
-#include "phone-path.h"
-#include "phone-text.h"
-#include "contacts-ug.h"
-#include "View.h"
-
-extern "C" int appcore_set_open_cb(int (*cb) (void *), void *data);
-
-#if !defined(LOCALEDIR)
-# define LOCALEDIR "/usr/ug/res/locale"
-#endif
-
-#ifndef STRLEN
-#define STRLEN(str) (((str) == NULL) ? 0: strlen(str))
-#endif
-
-#define PH_TEXT_MAX_LEN 1024
-#define PH_TEXT_SHORT_LEN 256
-#define CT_EDITFIELD_MAX_CHAR 1000
-#define PH_BLOCK_MSG_MAX_LEN 40
-
-#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
-#define CONTACTS_LIST_FOREACH(list, record) \
- for(bool success = (contacts_list_get_current_record_p(list, &record) == CONTACTS_ERROR_NONE); \
- success; \
- success = ( \
- (contacts_list_next(list) == CONTACTS_ERROR_NONE) \
- && (contacts_list_get_current_record_p(list, &record) == CONTACTS_ERROR_NONE) \
- ) \
- )
-
-#define MSG_COMPOSER_UG "msg-composer-efl"
-#define MYFILES_UG "myfile-efl"
-#define VIBRATION_UG "setting-profile-efl"
-#define ACCOUNT_UG "setting-myaccount-efl"
-#define IMG_VIEWER_UG "image-viewer-efl"
-#define GALLERY_UG "gallery-efl"
-#define BLUETOOTH_UG "setting-bluetooth-efl"
-#define WIFI_DIRECT_UG "fileshare-efl"
-#define CALL_SETTINGS_UG "setting-call-efl"
-#define CONTACTS_SETTINGS_UG "contacts-settings-efl"
-
-#define EMAIL_COMPOSER_PKG "email-composer-efl"
-#define VOICECALL_PKG "org.tizen.call"
-#define VIDEOCALL_PKG "org.tizen.vtmain"
-#define DIALER_PKG "org.tizen.phone"
-#define CONTACTS_VIEWER_PKG "org.tizen.contacts-viewer"
-#define BROWSER_UI_PKG "org.tizen.browser"
-
-#define SETTING_MFC_PATH "/opt/usr/ug/data/ug-phone/mfc_option"
-#define VIEW_MODE_PATH "/opt/usr/ug/data/ug-phone/view_mode"
-
-#define CT_OPERATION_SOCIAL_ADD "http://tizen.org/appcontrol/operation/social/add"
-#define CT_OPERATION_SOCIAL_EDIT "http://tizen.org/appcontrol/operation/social/edit"
-#define CT_OPERATION_SOCIAL_CHOOSE "http://tizen.org/appcontrol/operation/social/choose"
-#define CT_OPERATION_SOCIAL_PICK "http://tizen.org/appcontrol/operation/social/pick"
-#define CT_OPERATION_SOCIAL_VIEW "http://tizen.org/appcontrol/operation/social/view"
-#define CT_OPERATION_VIEW "http://tizen.org/appcontrol/operation/view"
-
-#define CT_OPERATION_ITEM_TYPE "http://tizen.org/appcontrol/data/social/item_type"
-#define CT_OPERATION_PHONE "http://tizen.org/appcontrol/data/social/phone"
-#define CT_OPERATION_EMAIL "http://tizen.org/appcontrol/data/social/email"
-#define CT_OPERATION_URL "http://tizen.org/appcontrol/data/social/url"
-#define CT_OPERATION_ITEM_ID "http://tizen.org/appcontrol/data/social/item_id"
-#define CT_OPERATION_RESULT_TYPE "http://tizen.org/appcontrol/data/social/result_type"
-#define CT_OPERATION_PATH "http://tizen.org/appcontrol/data/path"
-#define CT_OPERATION_RETURN_RESULT "http://tizen.org/appcontrol/data/social/return_result"
-#define CT_OPERATION_SELECTION_MODE "http://tizen.org/appcontrol/data/selection_mode"
-
-#define CT_OPERATION_ITEM_TYPE_PERSON "person"
-#define CT_OPERATION_ITEM_TYPE_CONTACT "contact"
-#define CT_OPERATION_SELECTION_MODE_SINGLE "single"
-#define CT_OPERATION_SELECTION_MODE_MULTIPLE "multiple"
-#define CT_OPERATION_RESULT_TYPE_PHONE "phone"
-#define CT_OPERATION_RESULT_TYPE_EMAIL "email"
-#define CT_OPERATION_RESULT_TYPE_ITEM_ID "item_id"
-#define CT_OPERATION_RESULT_TYPE_VCARD "vcard"
-
-#define CT_GROUP_INDEX_TODAY -1
-#define CT_GROUP_INDEX_YESTERDAY -2
-
-#define TITLE_TEXT "title,text"
-#define BUTTON1 "button1"
-#define BUTTON2 "button2"
-#define CLICKED "clicked"
-
-const int incorrectId(-1);
-const int notRelatedToContactId(0);
-
-typedef enum date_style
-{
- PH_LOG_TIME_ONLY,
- PH_LOG_DATE_ONLY,
-} date_style;
-
-typedef enum
-{
- LOG_TYPE_CALL = 0,
- LOG_TYPE_VIDEO_CALL,
- LOG_TYPE_SMS_MESSAGE,
- LOG_TYPE_MMS_MESSAGE,
- LOG_TYPE_MAX
-} Log_Type;
-
-typedef enum
-{
- LOG_ACTION_DIALLED = 0,
- LOG_ACTION_MISSED,
- LOG_ACTION_RECEIVED,
- LOG_ACTION_REJECTED,
- LOG_ACTION_BLOCKED,
- LOG_ACTION_MAX
-} Log_Action;
-
-enum
-{
- CTTEXT_TYPE_CUSTOM,
- CTTEXT_TYPE_MOBILE,
- CTTEXT_TYPE_HOME,
- CTTEXT_TYPE_WORK,
- CTTEXT_TYPE_FAX_HOME,
- CTTEXT_TYPE_FAX_WORK,
- CTTEXT_TYPE_ASSISTANT,
- CTTEXT_TYPE_PAGER,
- CTTEXT_TYPE_OTHER,
- CTTEXT_TYPE_TELEPHONE,
- CTTEXT_TYPE_FAX,
- CTTEXT_TYPE_CAR,
- CTTEXT_TYPE_HOME2,
- CTTEXT_TYPE_WORK2,
- CTTEXT_TYPE_COMPANY_MAIN,
- CTTEXT_TYPE_RADIO,
-};
-//CT_GET_TEXT_NUM_TYPE
-
-enum
-{
- CT_VIEW_DETAIL,
- CT_VIEW_INPUT,
- CT_VIEW_ETC,
-};
-
-enum
-{
- CT_LIST_NORMAL = 0x00,
- CT_LIST_NORMAL_CONTACT = 0x01,
- CT_LIST_NORMAL_FAVORITE = 0x02,
- CT_LIST_NORMAL_MEMBER = 0x03,
- CT_LIST_NORMAL_SDN = 0x04,
-
- CT_LIST_SINGLE = 0x30,
- CT_LIST_SINGLE_LINK = 0x31,
- CT_LIST_SINGLE_RELATION = 0x32,
-
- CT_LIST_SINGLE_UG = 0x50,
-
- CT_LIST_MULTI = 0x70,
- CT_LIST_MULTI_DELETE = 0x71,
- CT_LIST_MULTI_ADD_MEMBER = 0x72,
- CT_LIST_MULTI_REMOVE_MEMBER = 0x73,
- CT_LIST_MULTI_ADD_FAVORITE = 0x74,
- CT_LIST_MULTI_REMOVE_FAVORITE = 0x75,
- CT_LIST_MULTI_EXPORT_TO_SIM = 0x76,
- CT_LIST_MULTI_EXPORT_TO_VCARD = 0x77,
- CT_LIST_MULTI_IMPORT_FROM_SIM = 0x78,
- CT_LIST_MULTI_IMPORT_FROM_VCARD = 0x79,
- CT_LIST_MULTI_RECIPIENT_MESSAGE_INGROUP = 0x7A,
- CT_LIST_MULTI_RECIPIENT_EMAIL_INGROUP = 0x7B,
- CT_LIST_MULTI_SHARE_MESSAGE = 0x7C,
- CT_LIST_MULTI_SHARE_EMAIL = 0x7D,
- CT_LIST_MULTI_SHARE_BT = 0x7E,
- CT_LIST_MULTI_REORDER_FAVORITE = 0x7F,
-
- CT_LIST_MULTI_UG = 0xA0,
-};
-
-enum
-{
- CTUG_MSG_INVALID = 0,
- CTUG_MSG_KEY_END = 1,
-};
-
-struct opq_msg_svc_s;
-typedef struct opq_msg_svc_s* msg_handle_t;
-
-typedef void* PTHREAD_FN;
-
-/**
- * A callback that used by filling list-control specified inside of passed data-param.
- * @param data that contains a reference to list-control to be filled
- * @param list a list of contact-id in contacts-db
- * @param cnt is a size of list.
- */
-typedef void (*ct_select_result_cb)(void *data, int *list, int cnt);
-
-typedef void (*ct_contact_add_cb)(Evas_Object *win, Evas_Object *navi, int cnt);
-typedef void (*ct_change_name_cb)(void *data, char *str);
-typedef void (*selectall_changed_cb)(void *data, Eina_Bool checked);
-typedef void (*ct_list_navi_item_update_fn)(void *data);
-typedef void (*ct_group_rename_update_cb)(void *data, bool changed);
-typedef void (*ct_person_changed_cb)(void *data);
-typedef void (*ct_group_input_result_cb)(int grp_id, void *data, bool changed);
-
-typedef struct
-{
- Evas_Object *win;
- Evas_Object *navi;
- ui_gadget_h ug;
- int ug_request;
- int ug_cnt_max;
- char *ug_data; // update contact info
-} ph_view_info;
-
-typedef struct
-{
- int cnt;
- int cnt_checked_total;
- int result;
- bool alive;
- bool completed;
- bool without_cancel_btn;
- pthread_t thread;
- Ecore_Timer *timer;
- Evas_Object *layout;
- Evas_Object *progressbar;
- Evas_Object *popup;
-
- int *update_ids;
- contacts_list_h update_list;
- bool next_job;
-} ph_progress_info;
-
-typedef struct
-{
- char *plog_display;
- char *plog_img_path;
- char *plog_number;
-
- int id;
- int plog_ct_id;
- int plog_num_type;
- int plog_log_time;
- int plog_log_type;
- int plog_duration;
-
- int grouped_count;
- Eina_Bool checked; //for check genlist
- int group_index; //it's used as group index value.
- int group_base_id;
- Elm_Object_Item *item;
-
-} ph_log_info;
-
-typedef struct
-{
- int id;
- char *img_path;
- char *display;
- char *number;
- char* numtype_label;
- int number_type;
- char *normal_name;
-} ph_contact_d;
-
-typedef struct
-{
- int person_id;
- int id_ret;
- int id_ret_type;
- char *display;
- char *img_path;
- char *number;
- bool img_loaded;
- bool number_loaded;
- Eina_List *contact_list;
- Eina_List *number_list;
- Eina_List *email_list;
-
- Eina_Bool checked;
- Elm_Object_Item *item;
-} ph_favor_info;
-
-typedef struct
-{
- char *display;
- char *img_path;
- char *ph_number;
- char *numtype_label;
- int number_type;
- int contact_id;
- int dial_number;
- Eina_Bool is_checked;
-} ph_speeddial_info;
-
-struct ug_priv_data
-{
- void (*result_cb)(void*, void*);
- void (*destroy_cb)(void*);
- void *cb_param;
-};
-
-typedef struct
-{
- int position;
- int skipped_count;
- char index[10];
- char prev_index[4];
- Elm_Object_Item *item;
-} ct_list_index_data;
-
-typedef struct
-{
- void *user_data;
- Evas_Smart_Cb cb;
- char *icon_path;
-} ctr_btn_info;
-
-typedef struct
-{
- Evas_Object *win;
- Evas_Object *entry;
- Elm_Object_Item *navi_it;
- Elm_Object_Item *btn_op;
- char *name_old;
- void *info;
- ct_group_rename_update_cb result_cb;
- void *fn_data;
-} ct_group_edit_data;
-
-typedef struct
-{
- int id;
- char *icon_path;
- char *addressbook_name;
- int account_id;
-} ct_ab_map;
-
-typedef struct
-{
- void *person;
- contacts_record_h contact;
- Elm_Object_Item *item;
- bool img_loaded;
- bool number_loaded;
- Eina_Bool checked;
- char *img_path;
- char *number;
- char *number_display;
- char *display;
- char *status_str;
- char *display_index;
- int id;
- int id_ret;
- int id_ret_type;
- int link_count;
- bool is_in_group;
- bool is_favourite;
- bool phone_number_found;
- int mode_ab;
- Eina_List *addressbook_id_list;
-
- Eina_List *number_list;
- Eina_List *email_list;
-} ct_person_list;
-
-typedef struct : public Common::View
-{
- Evas_Object *box;
- Evas_Object *base_layout;
- Evas_Object *content_layout;
- Evas_Object *search_layout;
- Evas_Object *nocontent;
- Evas_Object *searchbar;
- Evas_Object *genlist;
- Evas_Object *fast_index;
- Evas_Object *select_all_layout;
- Elm_Object_Item *count_item;
- Elm_Object_Item *last_sweep_item;
- Elm_Object_Item *search_group_item;
- Evas_Object *ctrl_button;
-
- Elm_Genlist_Item_Class itcs[5];
- void (*gl_sel)(void *data, Evas_Object *obj, void *event_info);
- void *gl_sel_data;
- void (*edit_sel_update)(void *data);
-
- char group_index[4];
- Elm_Object_Item *group_item;
-
- char *ug_data;
- service_h service_operation;
-
- bool updating;
- bool is_background;
- bool need_update;
- int list_mode; //will be removed.
- int view_id;
- int tab_mode;
- int ug_request;
- int list_op;
- int base_ab;
- int base_ab_mode;
- int base_grp;
- int readed_n;
- int selected_person_id;
- int cnt_list_total;
- int cnt_checked;
- int cnt_max_check;
- int cnt_import_total;
- int cnt_import;
- char *title;
- char *sub_title;
- char *search_str;
- contacts_name_display_order_e order_display;
- int acc_count;
- ct_ab_map *acc_types;
-
- ct_list_navi_item_update_fn list_navi_item_update_fn;
-
- contacts_list_h import_list;
- contacts_list_h update_add_list;
- contacts_list_h update_delete_list;
- Eina_List *list;
- Eina_List *list_index;
- Eina_List *list_check_info;
- Eina_List **list_grp_person;
- Eina_List *list_delete_records;
- Eina_List *list_import_records;
-
- Ecore_Idler *list_idler;
- Ecore_Timer *update_timer;
- Ecore_Timer *update_queue_timer;
-
- int idx_vcard;
- const char *vcard_path;
-
- ph_progress_info *p_info;
- ct_select_result_cb select_result_cb;
- ct_contact_add_cb contact_add_cb;
- void *select_result_cb_data;
-
- int current_rotate;
- int radioGroupValue;
- int personId;
-} ct_list_data;
-
-typedef struct : public Common::View
-{
- Elm_Object_Item *titem;
- Elm_Object_Item *prev_navi_item;
- Evas_Object *ctrl_button;
- Evas_Object *layout_link;
- Elm_Object_Item *base_info_item;
- Elm_Object_Item *base_item;
- Elm_Object_Item *util_item;
- Elm_Object_Item *number_util_item;
-
- Evas_Object *genlist;
- Evas_Object *genlist_link;
- Ecore_Idler *idler;
-
- Elm_Object_Item *link_item;
- Elm_Object_Item *group_item;
- Elm_Object_Item *ringtone_item;
- Elm_Object_Item *vibration_item;
-
- int order_display;
-
- Eina_List *list_number;
- Eina_List *list_email;
- Eina_List *list_postal;
- Eina_List *list_relationship;
- Eina_List *list_event;
- Eina_List *list_messenger;
- Eina_List *list_website;
- Eina_List *list_nickname;
- Eina_List *list_note;
-
- bool updated;
- bool updating;
- bool is_shortcut;
- bool has_detail;
- bool has_input;
- bool ug_detail;
- bool has_number;
- int touch_x;
- int touch_y;
- int base_grp;
- int base_ab;
- int base_ab_mode;
- int view_mode;
- char *base_ab_name;
- char* vcard_path;
- int ug_request;
- int view_create_version;
- service_h service_operation;
-
- int person_id;
- contacts_record_h person;
- contacts_record_h contact;
- Eina_List *list_contacts;
- Eina_List *list_activity;
- Eina_List *list_unlink;
-
- void *prev_view_data;
- UDateFormat* formatter;
- Evas_Object *genlist_unlink;
- ph_progress_info *p_info;
- bool only_input;
- bool view_destroying;
-
- bool touch_block;
-
-} ct_detail_data;
-
-typedef struct : public Common::View
-{
- Evas_Object *noc;
- Evas_Object *scroller;
- Evas_Object *history_genlist;
- Evas_Object *ctrl_button;
- Evas_Object* select_all_layout;
- Elm_Object_Item *select_all_item;
- Eina_List *list;
- Ecore_Idler *idler;
- int person_id;
- int list_count;
- int pre_date_type;
- UDateFormat* hformatter[5];
- UDateFormat* formatter;
- int cnt_checked;
- int view_mode;
- bool updated;
- bool updating;
- ph_progress_info *p_info;
-} ct_history_data;
-
-typedef struct
-{
- Elm_Theme *th;
- Evas_Object *win;
- Evas_Object *navi;
- Evas_Object *layout;
- Evas_Object *activity_genlist;
- Evas_Object *ctrl_button;
- Elm_Object_Item *navi_item;
- Eina_List *list;
- int person_id;
- int pre_date_type;
- UDateFormat* hformatter[5];
- UDateFormat* formatter;
- ct_ab_map *acc_types;
- int acc_cnt;
-} ct_activity_data;
-
-typedef struct : public Common::View
-{
- Evas_Object *box;
- Evas_Object *scroller;
- Evas_Object *save_button;
- Elm_Object_Item *pre_item;
- Ecore_Event_Handler* win_prop_change;
-
- bool add_job_title;
- bool add_department;
- bool add_organization;
-
- Evas_Object *ly_image;
- Evas_Object *ly_basic_info;
- Evas_Object *ly_basic_info_middle_name;
- Evas_Object *ly_basic_info_last_name;
- Evas_Object *ly_basic_info_suffix;
- Evas_Object *ly_basic_info_nickname;
- Evas_Object *ly_basic_info_job_title;
- Evas_Object *ly_basic_info_department;
- Evas_Object *ly_basic_info_company;
- Evas_Object *ly_number_first;
- Evas_Object *ly_number_last;
- Evas_Object *ly_number_default;
- Evas_Object *ly_number_set_default_separator_before;
- Evas_Object *ly_number_set_default;
- Evas_Object *ly_number_set_default_separator_after;
- Evas_Object *ly_number_base;
- Evas_Object *ly_email_first;
- Evas_Object *ly_email_last;
- Evas_Object *ly_email_default;
- Evas_Object *ly_email_set_default;
- Evas_Object *ly_email_base;
- Evas_Object *ly_addr_first;
- Evas_Object *ly_addr_last;
-
- Evas_Object *ly_seperator_more;
- Evas_Object *ly_seperator_basic_info;
- Evas_Object *ly_messenger_first;
- Evas_Object *ly_messenger_last;
- Evas_Object *ly_url_first;
- Evas_Object *ly_url_last;
- Evas_Object *ly_relationship_first;
- Evas_Object *ly_relationship_last;
- Evas_Object *ly_event_first;
- Evas_Object *ly_event_last;
- Evas_Object *ly_note;
-
- Evas_Object *ly_group;
- Evas_Object *ly_ringtone;
- Evas_Object *ly_vibration;
- Evas_Object *ly_address_book;
- Evas_Object *ly_moreinfo;
-
- bool saved;
- Eina_Bool save_disable;
- int view_create_ver;
- int cnt_addr;
- int cnt_num;
- int idx_append;
-
- int base_ab;
- int base_ab_mode;
- char *name_old;
- char *base_ab_name;
-
- int contact_id;
- contacts_record_h contact;
- ct_detail_data *cdetail_d;
-
- bool camera_service_launched;
- ui_gadget_h crop_ug;
- bool keypad_on;
-} ct_input_data;
-
-typedef struct
-{
- Evas_Object *ly_content;
- contacts_record_h record;
- Evas_Object *data;
- const char *view_uri;
-} ct_input_typed_data;
-
-typedef enum
-{
- CT_AB_POPUP_TYPE_INPUT_VIEW,
- CT_AB_POPUP_TYPE_GINPUT_VIEW,
- CT_AB_POPUP_TYPE_LIST_VIEW,
-} ct_addrbook_popup_type;
-
-typedef struct
-{
- int id;
- int mode;
- char *name;
- bool all_contacts_item;
- Elm_Object_Item *item;
-} ct_ab_popup_data;
-
-typedef struct
-{
- Evas_Object* parent;
- Evas_Object* popup;
- Evas_Object* button1;
- Evas_Object* button2;
- char* popup_label;
- char* button1_label;
- char* button2_label;
- Evas_Smart_Cb button1_cb;
- Evas_Smart_Cb button2_cb;
- void* button1_data;
- void* button2_data;
-} ct_confirm_popup_data;
-
-typedef struct
-{
- int contact_id;
- contacts_record_h contact_record;
- char** field_names;
- char** strings_of_data;
- bool* checked_items;
-
- ct_confirm_popup_data* p_popup_data;
- Evas_Object* box;
- Evas_Object* select_all_layout;
- Evas_Object* genlist;
- Elm_Genlist_Item_Class* genlist_item_class;
-
- UDateFormat* formatter;
- size_t fields_count;
-
- ui_gadget_h ug;
- ui_gadget_h child_ug;
-} ct_send_as_text_data;
-
-typedef struct
-{
- size_t current_index;
- ct_send_as_text_data* p_contact_text_data;
-} ct_send_as_text_with_additional_info;
-
-typedef struct
-{
- ct_confirm_popup_data* p_popup_data;
- msg_handle_t msg_handle;
-
- int contact_id;
-
- Evas_Object* genlist;
-
- //Previous values
- bool is_blocked_calls;
- bool is_blocked_messages;
- //Values related to check boxes
- bool block_calls;
- bool block_messages;
-} ct_contact_block_data;
-
-typedef struct
-{
- const char* item_caption;
- bool* is_checked;
-} ct_contact_block_item_data;
-
-/**
- * Typedef for function that add/delete number to/from spam list for messages
- */
-typedef bool (*number_handler_for_spam_messages)(msg_handle_t msg_handle, const char* number);
-
-/**
- * Typedef for functions that gets string from any child record of _contacts_contact
- */
-typedef char* p_get_str_from_child_record(ct_send_as_text_data* p_text_as_data, unsigned int child_table_id,
- int record_index, unsigned int str_field_id);
-
-/**
- * Typedef for functions that fill numbers, mails... etc. of contact
- */
-typedef bool ct_fill_function(ct_send_as_text_data* p_text_as_data,
- size_t* current_name_index, size_t* current_data_index);
-
-void phone_free_contacts(Eina_List *list);
-Eina_List * phone_load_speeddial_data(int *ref_count);
-void phone_free_speeddial_data(Eina_List *list);
-char *phone_get_voice_mail_number(void);
-int speed_set_speeddial(int spdial_num, int number_id);
-
-ui_gadget_h phone_launch_msg_composer_ug(ui_gadget_h parent_ug, char *data, int msg_id,
- void (*destroy_cb)(void*), void *cb_param);
-ui_gadget_h phone_launch_contact_list_ug(ui_gadget_h parent_ug, int request,
- void (*result_cb)(void*, void*), void (*destroy_cb)(void*),
- void *cb_param);
-ui_gadget_h phone_launch_contact_detail_ug(ui_gadget_h parent_ug, int contact_index,
- void (*destroy_cb)(void*), void *cb_param);
-ui_gadget_h phone_launch_contact_add_list_edit_ug(ui_gadget_h parent_ug, char *data,
- void (*destroy_cb)(void*), void *cb_param);
-
-/**
- * @brief launch contact edit UI gadget
- * @param[in] parent_ug parent's UI gadget.
- * @param[in] data person id.
- * @param[in] destroy_cb callback for destroying UI gadget.
- * @param[in] cb_param data for destroy_cb.
- * @return The pointer of UI gadget
- */
-ui_gadget_h phone_launch_contact_edit_ug(ui_gadget_h parent_ug, int data,
- void (*destroy_cb)(void *), void *cb_param);
-
-/**
- * @brief launch bluetooth UI gadget
- * @param[in] parent_ug parent's UI gadget.
- * @param[in] attach path of the file which will be attached.
- * @param[in] destroy_cb callback for destroying UI gadget.
- * @param[in] cb_param data for destroy_cb.
- * @return The pointer of UI gadget
- */
-ui_gadget_h phone_launch_bluetooth_ug(ui_gadget_h parent_ug, const char *attach,
- void (*destroy_cb)(void *), void *cb_param);
-
-ui_gadget_h phone_image_crop_ug(ui_gadget_h parent, const char *photo,
- struct ug_cbs *cbs);
-ui_gadget_h ctui_msg_ug(ui_gadget_h parent, const char *number,
- const char *attach, void (*destroy_cb)(void*), void *cb_param);
-ui_gadget_h ctui_predefined_body_msg_ug(ui_gadget_h parent, const char *number, const int idx,
- const char *attach, void (*destroy_cb)(void*), void *cb_param);
-ui_gadget_h ctui_account_ug(ui_gadget_h data, Evas_Object *obj, void *event_info,
- void (*destroy_cb)(void*), void *cb_param);
-ui_gadget_h phone_launch_settings_ug(ui_gadget_h parent_ug, const char* ug_name,
- void (*destroy_cb)(void*), void *cb_param);
-
-void ug_common_destroy_cb(ui_gadget_h ug, void *priv);
-void ug_common_layout_cb(ui_gadget_h ug, enum ug_mode mode, void *priv);
-void ctui_destroy_child_ug(void *data);
-
-void phone_launch_voice_call(const int id, const char* number);
-
-Evas_Object *phone_create_base_layout(Evas_Object *parent, bool is_fullview);
-Evas_Object *phone_show_popup(Evas_Object *parent, const char *desc,
- double timeout);
-Evas_Object *phone_create_confirm_popup(Evas_Object **popup, Evas_Object *win,
- const char* description,
- void (*btn_clicked_cb)(void *, Evas_Object *, void *), void *cb_data);
-Evas_Object *phone_create_list_sweep_btn(Evas_Object *parent, const char *fullpath);
-Evas_Object *phone_create_bg(Evas_Object *parent);
-Evas_Object *phone_create_icon_with_img(Evas_Object *parent, const char *full_path);
-Evas_Object *phone_create_navi_btn(Evas_Object *parent, const char *style);
-
-/**
- * Set visibility of add_button && searchbar.
- * * @param[in] clist_d Value to get searchbar && add_button.
- * @param[in] visible state of visibility.
- * */
-void phone_set_searchbar_add_button_visible(ct_list_data &clist_d, bool visible);
-
-Evas_Object *phone_progressbar_popup(Evas_Object *parent,
- ph_progress_info *p_info, const char *title);
-Evas_Object *phone_get_notify(Evas_Object *parent);
-void phone_show_notify(Evas_Object *parent, const char *msg);
-void phone_hide_notify(Evas_Object *parent);
-void phone_show_tickernoti(const char *);
-void phone_navi_item_reset(Elm_Object_Item *item, void *data);
-void phone_set_view_info(ph_view_info *view_info, Evas_Object *win,
- Evas_Object *navi, void *ug, int ug_request, int cnt_max,
- char *ug_data);
-
-void phone_service_reply_simple(service_h service, service_result_e result);
-void phone_list_ug_return_ids(ui_gadget_h ug, int *result_list, int cnt,
- const char *bd_key);
-void phone_list_ug_return_values(service_h service, int *result_list, int cnt,
- const char *result_type);
-void phone_list_ug_return_number_email_ids(ui_gadget_h ug,
- int *result_number_list, int number_list_count, int *result_email_list,
- int email_list_count);
-void phone_ug_return_id(ui_gadget_h ug, int ct_id, int num_id, int email_id);
-void phone_ug_return_value(service_h service, int ct_id, int num_id,
- int email_id, int result_id);
-void phone_ug_return_vcard(ui_gadget_h ug, int ct_id, char *vcard);
-void phone_ug_operation_return_vcard(service_h service, int ct_id, char *vcard);
-Evas_Object* phone_create_nocontents(Evas_Object *parent, const char* label);
-void phone_toolbar_disabled_item_append(Evas_Object *toolbar, int cnt);
-
-char* ctui_get_addressbook_icon_path(int addressbook_id);
-const char* ctui_get_default_contact_img(int view_type);
-void ctui_get_number_type_str(contacts_record_h record, int CTS_NUMBER_type,
- char *dest, int dest_len);
-void ctui_ld_to_dd(ct_list_data *clist_d, ct_detail_data *cdetail_d);
-
-Evas_Object* ctui_addrbook_popup(Evas_Object *parent, Evas_Smart_Cb item_sel_cb,
- void *sel_cb_data, ct_addrbook_popup_type ab_type);
-void ctui_entry_limit_size_set(Evas_Object *entry);
-Evas_Object* ctui_create_btn(Evas_Object *parent, const char *label);
-void ctui_genlist_append_separator_10px(Evas_Object *genlist);
-void ctui_genlist_append_separator_20px(Evas_Object *genlist);
-void ctui_navi_btn_disabled_set(Evas_Object *navi, Eina_Bool disabled);
-char* ctui_entry_markup_to_utf8(const char *s);
-char* ctui_entry_markup_to_utf8_without_spaces(const char *s);
-void ctui_entry_entry_set(Evas_Object *entry, const char *s);
-Evas_Object* ctui_create_editfield(Evas_Object *parent, const char *title,
- const char *guide, bool multiline);
-void ctui_genlist_append_separator_20px_with_line(Evas_Object *genlist);
-void ctui_genlist_append_separator_8px_with_line(Evas_Object *genlist);
-void ctui_list_ug_hide_cb(void *data, Evas_Object *obj, void *event_info);
-Evas_Object* phone_create_select_all(Evas_Object *box,
- const char *selectall_text, selectall_changed_cb cb, void *cb_data);
-void ctui_list_free_contacts(Eina_List* list);
-void ctui_list_refresh_genlist(ct_list_data *clist_d);
-void ctui_list_handle_search(ct_list_data *clist_d);
-int phone_detail_log_is_call_ing_type(int type);
-int phone_detail_log_is_mms_type(int type);
-int phone_detail_log_is_sms_type(int type);
-int phone_detail_log_is_email_type(int type);
-char* phone_detail_log_get_icon_type(int log_type);
-char* phone_detail_log_get_duration_from_number(int number);
-void phone_detail_log_init_time_format(void);
-void phone_detail_log_generate_date_format(UDateFormat **formatter);
-char* phone_detail_log_get_icon_path_with_action(int log_type);
-char* phone_detail_log_get_date(UDateFormat ** formatter, int log_time);
-char* phone_detail_log_get_time(UDateFormat ** formatter, int log_time);
-int phone_detail_log_get_date_type(int log_time, int log_duration);
-void phone_detail_log_delete_date_format(UDateFormat **formatter);
-int phone_detail_log_get_phonenumber_type(int CTS_NUMBER_type);
-char *ph_log_util_get_formatted_date(UDateFormat **formatter, int log_time,
- date_style style);
-void ct_list_clear_pdata(ct_list_data *clist_d);
-void phone_move_ctxpopup(Evas_Object *popup, Evas_Object *item);
-void phone_resize_notify(Evas_Object *parent, int rotate);
-void ctui_get_addressbook_name(int addressbook_id, char *dest, int dest_len);
-Eina_List* ctui_person_get_writable_contact_list(int person_id);
-Eina_List* ctui_person_get_number_list(Eina_List *contact_list);
-Eina_List* ctui_person_get_email_list(Eina_List *contact_list);
-Eina_List* ctui_person_get_contact_list(int person_id);
-void ctui_free_record_list(Eina_List *contact_list);
-int ctui_get_email_type_index(int type);
-int ctui_get_mfc_option(void);
-ct_person_list *find_info_in_list_by_id(Eina_List *check_list,int person_id);
-
-int ctui_get_view_mode(void);
-void ctui_set_view_mode(int addressbook_id);
-
-contacts_error_e phone_cts_get_list(const char *view_uri, int property_id,
- int match_value, contacts_list_h *out_list);
-void phone_cts_free_list(contacts_list_h list);
-contacts_error_e phone_cts_get_int_from_list(contacts_list_h list,
- int property_id, int *out_int);
-contacts_error_e phone_cts_get_str_from_list(contacts_list_h list,
- int property_id, char **out_str);
-contacts_error_e phone_cts_get_bool_from_list(contacts_list_h list,
- int property_id, bool *out_bool);
-contacts_error_e phone_cts_get_default_number(int person_id,
- contacts_record_h *record_clone);
-contacts_error_e phone_cts_get_default_email(int person_id,
- contacts_record_h *record_clone);
-void ctui_get_account_name_by_address_book_id(int address_book_id, char *dest,
- int dest_len);
-bool ctui_list_make_vcard(int contactid, char *path, int path_length);
-void ctui_list_lazy_update(const char *view_uri, void *data);
-char* ctui_list_get_highlight_text(ct_list_data *clist_d, const char *src);
-Evas_Object *phone_create_toolbar_btn(Evas_Object *parent, const char *text,
- Evas_Smart_Cb func, void *data);
-void ctui_input_data_popup_hide_cb(void *data, Evas_Object *obj, void *event_info);
-void ctui_detail_data_popup_hide_cb(void *data, Evas_Object *obj, void *event_info);
-void create_no_content_layout(ct_list_data *clist_d,Evas_Object *parent);
-
-int ctui_list_checked_cnt_get(Eina_List *list);
-void ctui_list_update_selection_info(void *data);
-void ctui_list_set_unsweep(ct_list_data *clist_d);
-
-/**
- * Removes badge if current package(DIALER_PKG) has it.
- * @return true if badge exists, false otherwise.
- * */
-bool removeBadge();
-
-/**
- * Checks if badge exists for current package(DIALER_PKG)
- * @return true if badge exists false otherwise
- * */
-bool hasBadge();
-
-inline bool is_unknown_contact(const char *pPhoneNumber)
-{
- return (NULL == pPhoneNumber || '\0' == pPhoneNumber[0]);
-}
-
-contacts_record_h ctui_get_record_image(contacts_record_h record_contact);
-
-int ctui_get_addressbook_id_by_index(Eina_List *list, unsigned int index);
-Eina_List* ctui_get_addressbook_id_list(const char *ori_string,
- const char *sep);
-void ctui_list_edit_navi_pop(void *data, Evas_Object *obj, void *event_info);
-int ctui_get_addressbook_id(char* addressbook_name);
-
-void ctui_create_contacts_error_popup(Evas_Object *parent, int err);
-
-void create_emergency_contacts_group();
-
-bool has_emergency_contacts();
-
-void ctui_list_searchbar_cancel_cb(void *data, Evas_Object *obj,
- void *event_info);
-
-/**
- * Create searchbar.
- * * @param[in] parent Layout to create searchbar.
- * @param[in] clist_d Value to keep searchbar.
- * */
-void ctui_list_create_searchbar(Evas_Object* parent,
- ct_list_data *clist_d);
-
-/**
- * @brief Convert string to bool
- * @param[in] strVal Value to be converted
- * @return Bool value
- */
-bool ct_list_str_to_bool(const std::string& strVal);
-
-/**
- * @brief Convert bool to string
- * @param[in] bVal Value to be converted
- * @return String value
- */
-std::string ct_list_bool_to_str(bool bVal);
-
-/**
- * @brief Insert a record in _contacts_extension table
- * @param[in] extensionRec Record associated to table
- * @param[in] extensionField Field to set the @a strValue
- * @param[in] contactId Id of contact with that need to be associated
- * @param[in] strValue String value that assigned
- * @return True if success, otherwise false
- */
-bool ct_list_insert_extension(contacts_record_h extensionRec, unsigned int extensionField, int contactId,
- const std::string& strValue);
-
-/**
- * @brief Updates a record in _contacts_extension table
- * @param[in] contactRec Record associated to _contacts_contact table
- * @param[in] extensionRec Record associated to _contacts_extension table
- * @return true if success, otherwise false
- */
-bool ct_list_toggle_blocked(contacts_record_h contactRec, contacts_record_h extensionRec);
-
-/**
- * @brief Convert string to uppercase
- * @param[in] str Incoming string
- * @return Uppercased string
- */
-std::string ct_make_uppercase_string(const std::string& str);
-
-/**
- * @brief Gets extension id related to @a contactId
- * @param contactId Id of contact
- * @return ID of extension related to @a contactId if exist, otherwise -1
- */
-int phone_get_extension_id(int contactId);
-
-/**
- * @brief Provides information if contact blocked or not base on id
- * @param[in] contact_id Id of contact
- * @return true if contact is blocked, otherwise false
- */
-bool phone_is_blocked_contact_for_calls(int contact_id);
-
-/**
- * @brief Gets list of records
- * @remarks If function returns true @a list must be destroyed with contacts_list_destroy() by you.
- * @tparam FilterFieldType Type of field for filter
- * @param[in] tableUri Uri to table to which the request is made
- * @param[in] filterField Field by the value which the search is conducted
- * @param[in] filterVal Value of filtered field
- * @param[out] list List of records that satisfy the query
- * @return true if success, otherwise false.
- */
-template < typename FilterFieldType>
-bool get_records_list(const std::string& tableUri, unsigned int filterField,
- FilterFieldType filterVal, contacts_list_h* list);
-
-/**
- * @brief This function makes blocked/unblocked contact
- * @param[in] contactId ID of contact
- * @return true if success, otherwise false
- */
-bool phone_toggle_blocked_contact_for_calls(int contactId);
-
-/**
- * @brief This function copy @a number to dialing screen
- * @param[in] number Tel. number
- * @return true if success, otherwise false
- */
-bool phone_copy_to_dialing_screen(const std::string& number);
-
-/**
- * @brief Gets date and time as string
- * @remark return value must be destroyed with free by you
- * @param[in] formatter Formatter of date and time
- * @param[in] year Year
- * @param[in] month Month
- * @param[in] day Day
- * @return date and time as string
- */
-char* phone_get_datetime_str(UDateFormat* formatter, int year, int month, int day);
-
-/**
- * @brief Initiatialise date and time formatter
- * @return formatter
- */
-UDateFormat* phone_init_time_formatter(void);
-
-/**
- * @brief Gets index of address types for localisation strings
- * @param[in] type Index of type
- * @return Index for localisation
- */
-int phone_get_address_type_index(int type);
-
-/**
- * @brief Gets index of website types for localisation strings
- * @param[in] type Index of type
- * @return Index for localisation
- */
-int phone_get_website_type_index(int type);
-
-/**
- * @brief Gets index of number types for localisation strings
- * @param[in] type Index of type
- * @return Index for localisation
- */
-int phone_get_number_type_index(int ct_num_type);
-
-/**
- * @brief Destroy @a ct_confirm_popup_data structure
- * @param[in] p_popup_data Popup data
- */
-void phone_destroy_confirm_popup_data(ct_confirm_popup_data* p_popup_data);
-
-/**
- * @brief Fill @a ct_confirm_popup_data structure
- * @param[in] p_popup_data Popup data
- * @return true if success, otherwise false
- */
-bool phone_fill_confirm_popup_data(ct_confirm_popup_data* p_popup_data);
-
-/**
- * @brief Gets contact ID by person ID
- * @param[in] personId ID of person
- * @return ID of contact on success, otherwise 0
- */
-int phone_get_contact_id_by_person_id(int personId);
-
-/**
- * @brief Get group localized name
- * @param[in] group_record _contacts_group view record
- * @return Group name or localized name for one of the default groups
- */
-const char * phone_get_group_name(contacts_record_h group_record);
-
-/**
- * @brief Add button to popup
- * @remarks Added button automatically hides popup when clicked so you don't
- * need to hide it in your callback and create callbacks for cancel buttons.
- * @param[in] popup Popup widget
- * @param[in] text Button text
- * @param[in] func Button click callback
- * @param[in] data Data to pass to func
- * @return true button on success, otherwise NULL
- */
-Evas_Object * phone_popup_add_button(Evas_Object *popup, const char *text,
- Evas_Smart_Cb func, void *data);
-
-/**
- * @brief Get contact name by ID
- * @remark return value must be destroy with free by you
- * @param[in] id Contact ID
- * @return contact name on success, otherwise false
- */
-char* phone_get_contact_name(int id);
-
-/**
- * @brief Create new class for genlist item
- * @remark return value must be destroyed with elm_genlist_item_class_free by you
- * @param[in] style Style of item
- * @param[in] decorate_style Style of item if item in decorate mode
- * @param[in] decoreate_all_style Style of item if genlist in decorate mode
- * @param[in] get_text Text fetching function for genlist item
- * @param[in] get_content Content fetching function for genlist item
- * @param[in] get_state State fetching function for genlist item
- * @param[in] del_func Deletion function for genlist item
- * @return new genlist item class if success, otherwise false
- */
-Elm_Genlist_Item_Class* phone_create_item_class(const char* style, const char* decorate_style, const char* decorate_all_style,
- Elm_Gen_Item_Text_Get_Cb get_text, Elm_Gen_Item_Content_Get_Cb get_content,
- Elm_Gen_Item_State_Get_Cb get_state, Elm_Gen_Item_Del_Cb del_func);
-
-/**
- *@brief Create block contact confirm popup
- *@param[in] parent Parent layout
- *@param[in] contact_id Contact ID
- *@return popup
- */
-Evas_Object* phone_create_block_contact_popup(Evas_Object* parent, int contact_id);
-#endif //__PHONE_COMMON_H__