4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Wonyoung Lee <wy1115.lee@samsung.com>, Tarun Kumar <tarun.kr@samsung.com>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
22 #ifndef _MYACCOUNT_UG_COMMON_H_
23 #define _MYACCOUNT_UG_COMMON_H_
29 #include <app_manager.h>
31 #include <package-manager.h>
32 #include <efl_assist.h>
38 MYACCOUNT_TYPE_EXCHANGE = 0,
39 MYACCOUNT_TYPE_GOOGLE,
40 // MYACCOUNT_TYPE_MSN,
41 // MYACCOUNT_TYPE_FACEBOOK,
42 MYACCOUNT_TYPE_PICASA,
43 MYACCOUNT_TYPE_YOUTUBE,
45 MYACCOUNT_TYPE_SAMSUNG,
48 MYACCOUNT_TYPE_UNKNOWN
49 }MyAccountProviderType;
52 MYACCOUNT_REQUEST_SIGNIN = 0,
53 MYACCOUNT_REQUEST_VIEW
54 }MyAccountRequestViewType;
56 void *myaccount_init_appdata();
58 void myaccount_destroy_appdata();
60 void *myaccount_get_appdata();
62 void myaccount_common_set_item_selected_state(bool val);
64 bool myaccount_common_get_item_selected_state();
66 void myaccount_common_get_icon_by_name(char *account_name,
69 MyAccountProviderType myaccount_common_get_provider_type(
72 void myaccount_common_lowercase(char* src, char* dest);
74 Evas_Object *myaccount_common_progress_add(Evas_Object *parent);
76 void myaccount_common_delete_modal_popup(Evas_Object *popup);
78 Eina_Bool myaccount_common_modal_popup_timer_cb(gpointer data);
80 bool myaccount_samsung_callback(char* result_code, char* user_id, void *user_data);
83 int myaccount_common_launch_application(MyAccountRequestViewType
89 MyAccountProviderType sp_type,
92 int myaccount_common_get_all_account_cnt(int *count);
94 int myaccount_common_get_account_cnt_by_capability(const char* capability_type, int *count);
96 int myaccount_common_get_account_cnt_by_appid(const char* appid, int *count);
98 void myaccount_common_handle_notification(const char* event_type);
100 void myaccount_common_listen_pkgmgr_for_pkg_uninstall();
102 int myaccount_common_get_csc_sp_count(const char* capability_filter);
104 int myaccount_common_get_account_type_count(const char* capability_filter);
107 #define MA_UG_NAME "setting-myaccount-efl"
109 #define MA_IMAGE_EDJ_NAME "/usr/apps/setting-myaccount-efl/res/edje/setting-myaccount-efl/myaccount_edc_images.edj"
111 #define MA_NO_ACCOUNT_EDJ_NAME "/usr/apps/setting-myaccount-efl/res/edje/setting-myaccount-efl/myaccount_nocontent.edj"
115 #define MA_SNPRINTF(dest,size,format,arg...) \
117 snprintf(dest,size-1,format,##arg); \
119 /* If the same pointer is passed to free twice, known as a double free. To avoid this, set pointers to
120 NULL after passing them to free: free(NULL) is safe (it does nothing).
123 #define MA_STRNCPY(dest,src,size) \
125 if(src != NULL && dest != NULL && size > 0) \
127 strncpy(dest,src,size-1); \
131 #define MA_MEMFREE(ptr) \
137 #endif /* _MYACCOUNT_UG_COMMON_H_ */