2 * Copyright 2012 Samsung Electronics Co., Ltd
\r
4 * Licensed under the Flora License, Version 1.0 (the License);
\r
5 * you may not use this file except in compliance with the License.
\r
6 * You may obtain a copy of the License at
\r
8 * http://floralicense.org/license/
\r
10 * Unless required by applicable law or agreed to in writing, software
\r
11 * distributed under the License is distributed on an AS IS BASIS,
\r
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
13 * See the License for the specific language governing permissions and
\r
14 * limitations under the License.
\r
17 #ifndef _MYACCOUNT_UG_COMMON_H_
\r
18 #define _MYACCOUNT_UG_COMMON_H_
\r
20 #include <Ecore_X.h>
\r
22 #include <account.h>
\r
24 #include <app_manager.h>
\r
26 #include <package-manager.h>
\r
31 MYACCOUNT_TYPE_ANONYMOUS,
\r
32 MYACCOUNT_TYPE_OTHER
\r
33 }MyAccountProviderType;
\r
36 MYACCOUNT_REQUEST_SIGNIN = 0,
\r
37 MYACCOUNT_REQUEST_VIEW
\r
38 }MyAccountRequestViewType;
\r
40 void *myaccount_init_appdata();
\r
42 void myaccount_destroy_appdata();
\r
44 void *myaccount_get_appdata();
\r
46 void myaccount_common_get_icon_by_name(char *account_name,
\r
49 void myaccount_common_lowercase(char* src, char* dest);
\r
51 Evas_Object *myaccount_common_progress_add(Evas_Object *parent);
\r
53 Evas_Object *myaccount_common_create_modal_popup(Evas_Object *parent);
\r
55 void myaccount_common_delete_modal_popup(Evas_Object *popup);
\r
57 Eina_Bool myaccount_common_modal_popup_timer_cb(gpointer data);
\r
59 bool myaccount_samsung_callback(char* result_code, char* user_id, void *user_data);
\r
62 int myaccount_common_launch_application(MyAccountRequestViewType
\r
70 int myaccount_common_get_all_account_cnt(int *count);
\r
72 void myaccount_common_handle_notification();
\r
74 void myaccount_common_vconf_notification_cb(keynode_t *key, void *user_data);
\r
76 void myaccount_common_listen_pkgmgr_for_pkg_uninstall();
\r
78 #define MA_UG_NAME "ug-setting-myaccount-efl"
\r
80 #define MA_IMAGE_EDJ_NAME "/usr/ug/res/edje/ug-setting-myaccount-efl/myaccount_edc_images.edj"
\r
82 #define BUFSIZE 1024
\r
84 #define MA_SNPRINTF(dest,size,format,arg...) \
\r
86 snprintf(dest,size-1,format,##arg); \
\r
88 /* If the same pointer is passed to free twice, known as a double free. To avoid this, set pointers to
\r
89 NULL after passing them to free: free(NULL) is safe (it does nothing).
\r
92 #define MA_STRNCPY(dest,src,size) \
\r
94 if(src != NULL && dest != NULL && size > 0) \
\r
96 strncpy(dest,src,size-1); \
\r
100 #define MA_MEMFREE(ptr) \
\r
101 if (ptr != NULL) { \
\r
106 #endif /* _MYACCOUNT_UG_COMMON_H_ */
\r