summaryrefslogtreecommitdiff
path: root/inc/worldclock_util.h
diff options
context:
space:
mode:
Diffstat (limited to 'inc/worldclock_util.h')
-rw-r--r--inc/worldclock_util.h90
1 files changed, 90 insertions, 0 deletions
diff --git a/inc/worldclock_util.h b/inc/worldclock_util.h
new file mode 100644
index 0000000..40f3dac
--- /dev/null
+++ b/inc/worldclock_util.h
@@ -0,0 +1,90 @@
+/*
+ * Copyright 2016 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 __DEF_WORLDCLOCK_UTIL_H_
+#define __DEF_WORLDCLOCK_UTIL_H_
+
+#include <Elementary.h>
+#include <unicode/umachine.h>
+#include "worldclock.h"
+
+/**
+ * Compare the city name of two cities
+ *
+ * @param[in] data1 record data of city1
+ * @param[in] data2 record data of city2
+ *
+ * @return -1 if city name of city2 is bigger than city1's
+ * 1 if city name of city1 is bigger than city2's
+ * 0 if city name of city2 is equal to city1, or meet error
+ */
+int worldclock_city_compare_cb(const void *data1, const void *data2);
+
+/**
+ * Compare timezone of two cities
+ *
+ * @param[in] data1 recorder of city1
+ * @param[in] data2 recorder of city2
+ *
+ * @return -1 if timezone of city2 is bigger than city1's
+ * 1 if timezone of city1 is bigger than city2's
+ * 0 if timezone of city2 is equal to city1, or meet error
+ */
+int worldclock_time_compare_cb(const void *data1, const void *data2);
+
+/**
+ * Remove all items in eina_list
+ *
+ * @param[in] glist given eina list
+ * @param[in] is_free_element flag to define if free data in every item is needed
+ *
+ * @return EINA_TRUE if remove successfully
+ */
+Eina_Bool worldclock_util_glist_remove_all(Eina_List * glist, Eina_Bool is_free_element);
+#if 0
+/**
+ * Creat new popup window, and show it
+ *
+ * @param[in] parent Parent for such popup
+ * @param[in] data Data used in this function
+ * @param[in] info String displayed on popup
+ *
+ * @return
+ */
+void worldclock_show_popup(Evas_Object * parent, Evas_Object ** p_popup, char *info);
+#endif
+
+/**
+ * Create layout by load edj according group name from edj file
+ *
+ * @param[in] parent Parent of new layout
+ * @param[in] file EDJE file
+ * @param[in] group name of group
+ *
+ * @return NULL if meet error
+ * Pointer to new layout
+ */
+Evas_Object *worldclock_load_edj(Evas_Object * parent, const char *file,
+ const char *group);
+
+int worldclock_dst_get(const Wcl_CitySet * cs);
+
+const char *worldclock_get_egje_path();
+const char *worldclock_get_locale_path();
+
+void worldclock_path_util_free();
+
+#endif /* __DEF_WORLDCLOCK_UTIL_H_ */