summaryrefslogtreecommitdiff
path: root/lib-contact/ct-common/inc/CtCommon.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib-contact/ct-common/inc/CtCommon.h')
-rw-r--r--lib-contact/ct-common/inc/CtCommon.h83
1 files changed, 83 insertions, 0 deletions
diff --git a/lib-contact/ct-common/inc/CtCommon.h b/lib-contact/ct-common/inc/CtCommon.h
new file mode 100644
index 0000000..bf9fced
--- /dev/null
+++ b/lib-contact/ct-common/inc/CtCommon.h
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _CT_COMMON_H_
+#define _CT_COMMON_H_
+
+#include <app.h>
+#include <Elementary.h>
+#include <contacts.h>
+#include <string>
+
+#include "CtString.h"
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+//#define ELM_SCALE_SIZE(x) (x / elm_app_base_scale_get() * elm_config_scale_get())
+
+#define _EDJ(obj) (Evas_Object *)elm_layout_edje_get(obj)
+
+//App control launch
+//void ctCommonTerminateAppservice(Evas_Object *navi);
+//void ctCommonResetAppservice(Evas_Object *navi, app_control_h service);
+//void ctCommonUnlockUiForAppsvc(Evas_Object *navi);
+//int ctCommonServiceSendLaunchRequest(Evas_Object *navi, app_control_h service, app_control_reply_cb callback, void *user_data);
+//bool ctCommonIsUiLockedForAppsvc(Evas_Object *navi);
+
+enum DefaultIconType
+{
+ LIST_ICON,
+ DETAIL_ICON
+};
+
+//utils
+char* ctCommonMarkupToUtf8(const char *string);
+bool ctCommonCheckDirtyPhoneNumber(const std::string& str);
+void ctCommonRemoveNewline(char *src);
+Eina_List* ctCommonGetContactsList(int personId);
+Eina_List* ctCommonGetWritableContactList(int personId);
+void ctCommonDestroyRecordList(Eina_List *list);
+
+void ctCommonCleanNumber(const char *src, char *dest, int destSize);
+int ctCommonCheckUtf8(char c);
+
+void ctCommonGetProviderNameByAddressbookId(contacts_record_h recordAddressBook, int addressbookId ,char** providerName, char**userName);
+bool ctCommonIsValidPerson(const int personId);
+
+void ctCommonSendSimpleAppControlResult(app_control_h appControl, const char *key, const char *value, app_control_result_e result);
+
+int ctCommonGetEasDefaultGroupId(int addressbook_id);
+
+void* ctGetDllHandle(const char* dllName);
+int ctCommonGetAddressBookId(char* addressbookName);
+char* ctCommonGetAddressBookName(int addressbookId);
+
+Eina_List* ctCommonGetChekedDuplicatedNumberList(Eina_List *sourceList);
+Eina_List* ctCommonGetChekedDuplicatedEmailList(Eina_List *sourceList);
+
+char *getOtherDirectoryPath();
+std::string createVcardFile(contacts_record_h record);
+void sharePerson(int personId, bool isMyProfile);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _CT_COMMON_H_