summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2015-04-05 15:19:59 +0200
committerCedric BAIL <cedric@osg.samsung.com>2015-04-05 16:23:38 +0200
commit7928609a2945d2aef038b1e97a6d800d864d6f1a (patch)
treea66dd4a9bc24ff2a33ebb6ed9b76cbe08bb08aa5
parent2f5383333196004f9113952c864bf9848025a04b (diff)
efl: move emodel to be an efl interfaces.
Diffstat (limited to '')
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac11
-rw-r--r--src/Makefile.am3
-rw-r--r--src/Makefile_Efl.am4
-rw-r--r--src/Makefile_Eio.am11
-rw-r--r--src/Makefile_Emodel.am78
-rw-r--r--src/Makefile_Emodel_Cxx.am22
-rw-r--r--src/lib/efl/Efl.h3
-rw-r--r--src/lib/efl/Efl_Model_Common.h92
-rw-r--r--src/lib/efl/interfaces/efl_interfaces_main.c2
-rw-r--r--src/lib/efl/interfaces/efl_model_base.eo (renamed from src/lib/emodel/emodel.eo)173
-rw-r--r--src/lib/eio/eio_model.c164
-rw-r--r--src/lib/eio/eio_model.eo26
-rw-r--r--src/lib/eio/eio_model.h2
-rw-r--r--src/lib/eio/eio_model_private.h2
-rw-r--r--src/lib/emodel/Emodel.h127
-rw-r--r--src/lib/emodel/Emodel_Common.h92
-rw-r--r--src/lib/emodel/emodel.c6
-rw-r--r--src/tests/eio/eio_model_test_file.c (renamed from src/tests/emodel/emodel_test_file.c)70
-rw-r--r--src/tests/eio/eio_model_test_monitor_add.c (renamed from src/tests/emodel/emodel_test_monitor_add.c)42
-rw-r--r--src/tests/eio/eio_suite.c2
-rw-r--r--src/tests/eio/eio_suite.h2
-rw-r--r--src/tests/emodel/emodel_suite.c138
23 files changed, 351 insertions, 723 deletions
diff --git a/Makefile.am b/Makefile.am
index 14b8572bb1..6278e421b9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -143,7 +143,6 @@ pc/ecore-evas.pc \
143pc/ecore-avahi.pc \ 143pc/ecore-avahi.pc \
144pc/ector.pc \ 144pc/ector.pc \
145pc/embryo.pc \ 145pc/embryo.pc \
146pc/emodel.pc \
147pc/eio.pc \ 146pc/eio.pc \
148pc/eldbus.pc \ 147pc/eldbus.pc \
149pc/efreet.pc \ 148pc/efreet.pc \
@@ -164,7 +163,6 @@ pc/eolian-cxx.pc \
164pc/edje-cxx.pc \ 163pc/edje-cxx.pc \
165pc/eet-cxx.pc \ 164pc/eet-cxx.pc \
166pc/eo-cxx.pc \ 165pc/eo-cxx.pc \
167pc/emodel-cxx.pc \
168pc/eio-cxx.pc 166pc/eio-cxx.pc
169endif 167endif
170 168
diff --git a/configure.ac b/configure.ac
index da6abf853a..a8948f9a53 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3944,14 +3944,6 @@ EFL_EVAL_PKGS([ECORE_EVAS])
3944EFL_LIB_END([Ecore_Evas]) 3944EFL_LIB_END([Ecore_Evas])
3945#### End of Ecore_Evas 3945#### End of Ecore_Evas
3946 3946
3947#### Emodel
3948EFL_LIB_START([Emodel])
3949EFL_ADD_LIBS([EMODEL], [])
3950EFL_INTERNAL_DEPEND_PKG([EMODEL], [eo])
3951EFL_INTERNAL_DEPEND_PKG([EMODEL], [eina])
3952EFL_LIB_END([Emodel])
3953#### End of Emodel
3954
3955#### Eio 3947#### Eio
3956EFL_LIB_START([Eio]) 3948EFL_LIB_START([Eio])
3957 3949
@@ -3965,7 +3957,6 @@ EFL_LIB_START([Eio])
3965EFL_PLATFORM_DEPEND([EIO], [evil]) 3957EFL_PLATFORM_DEPEND([EIO], [evil])
3966 3958
3967### Checks for libraries 3959### Checks for libraries
3968EFL_INTERNAL_DEPEND_PKG([EIO], [emodel])
3969EFL_INTERNAL_DEPEND_PKG([EIO], [ecore]) 3960EFL_INTERNAL_DEPEND_PKG([EIO], [ecore])
3970EFL_INTERNAL_DEPEND_PKG([EIO], [eet]) 3961EFL_INTERNAL_DEPEND_PKG([EIO], [eet])
3971EFL_INTERNAL_DEPEND_PKG([EIO], [eo]) 3962EFL_INTERNAL_DEPEND_PKG([EIO], [eo])
@@ -4543,8 +4534,6 @@ pc/eolian.pc
4543pc/eolian-cxx.pc 4534pc/eolian-cxx.pc
4544pc/efl.pc 4535pc/efl.pc
4545pc/efl-cxx.pc 4536pc/efl-cxx.pc
4546pc/emodel.pc
4547pc/emodel-cxx.pc
4548pc/evas-fb.pc 4537pc/evas-fb.pc
4549pc/evas-opengl-x11.pc 4538pc/evas-opengl-x11.pc
4550pc/evas-opengl-sdl.pc 4539pc/evas-opengl-sdl.pc
diff --git a/src/Makefile.am b/src/Makefile.am
index 8462c3a589..5041799c65 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -11,7 +11,6 @@ EOLIAN_FLAGS = -I$(srcdir)\
11 -I$(srcdir)/lib/ecore_audio \ 11 -I$(srcdir)/lib/ecore_audio \
12 -I$(srcdir)/lib/ecore \ 12 -I$(srcdir)/lib/ecore \
13 -I$(srcdir)/lib/ecore_con \ 13 -I$(srcdir)/lib/ecore_con \
14 -I$(srcdir)/lib/emodel \
15 -I$(srcdir)/lib/eio 14 -I$(srcdir)/lib/eio
16 15
17DIST_SUBDIRS = 16DIST_SUBDIRS =
@@ -67,7 +66,6 @@ include Makefile_Eeze.am
67include Makefile_EPhysics.am 66include Makefile_EPhysics.am
68include Makefile_Edje.am 67include Makefile_Edje.am
69include Makefile_Emotion.am 68include Makefile_Emotion.am
70include Makefile_Emodel.am
71include Makefile_Ethumb.am 69include Makefile_Ethumb.am
72include Makefile_Ethumb_Client.am 70include Makefile_Ethumb_Client.am
73 71
@@ -80,7 +78,6 @@ include Makefile_Eo_Cxx.am
80include Makefile_Efl_Cxx.am 78include Makefile_Efl_Cxx.am
81include Makefile_Edje_Cxx.am 79include Makefile_Edje_Cxx.am
82include Makefile_Evas_Cxx.am 80include Makefile_Evas_Cxx.am
83include Makefile_Emodel_Cxx.am
84include Makefile_Eio_Cxx.am 81include Makefile_Eio_Cxx.am
85 82
86include Makefile_Elua.am 83include Makefile_Elua.am
diff --git a/src/Makefile_Efl.am b/src/Makefile_Efl.am
index b65dafc406..5a14d7e028 100644
--- a/src/Makefile_Efl.am
+++ b/src/Makefile_Efl.am
@@ -12,7 +12,8 @@ efl_eolian_files = \
12 lib/efl/interfaces/efl_gfx_shape.eo \ 12 lib/efl/interfaces/efl_gfx_shape.eo \
13 lib/efl/interfaces/efl_gfx_gradient_base.eo \ 13 lib/efl/interfaces/efl_gfx_gradient_base.eo \
14 lib/efl/interfaces/efl_gfx_gradient_linear.eo \ 14 lib/efl/interfaces/efl_gfx_gradient_linear.eo \
15 lib/efl/interfaces/efl_gfx_gradient_radial.eo 15 lib/efl/interfaces/efl_gfx_gradient_radial.eo \
16 lib/efl/interfaces/efl_model_base.eo
16 17
17efl_eolian_files_h = $(efl_eolian_files:%.eo=%.eo.h) 18efl_eolian_files_h = $(efl_eolian_files:%.eo=%.eo.h)
18efl_eolian_files_c = $(efl_eolian_files:%.eo=%.eo.c) 19efl_eolian_files_c = $(efl_eolian_files:%.eo=%.eo.c)
@@ -28,6 +29,7 @@ CLEANFILES += \
28EXTRA_DIST += \ 29EXTRA_DIST += \
29 lib/efl/Efl_Config.h \ 30 lib/efl/Efl_Config.h \
30 lib/efl/Efl.h \ 31 lib/efl/Efl.h \
32 lib/efl/Efl_Model_Common.h \
31 $(efl_eolian_files) 33 $(efl_eolian_files)
32 34
33efleolianfilesdir = $(datadir)/eolian/include/efl-@VMAJ@ 35efleolianfilesdir = $(datadir)/eolian/include/efl-@VMAJ@
diff --git a/src/Makefile_Eio.am b/src/Makefile_Eio.am
index 52ac3c51f6..03f1d1389a 100644
--- a/src/Makefile_Eio.am
+++ b/src/Makefile_Eio.am
@@ -46,9 +46,9 @@ endif
46endif 46endif
47endif 47endif
48 48
49lib_eio_libeio_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl @EIO_CFLAGS@ @EMODEL_CFLAGS@ 49lib_eio_libeio_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl @EIO_CFLAGS@ @EFL_CFLAGS@
50lib_eio_libeio_la_LIBADD = @EIO_LIBS@ @EMODEL_LIBS@ 50lib_eio_libeio_la_LIBADD = @EIO_LIBS@ @EFL_LIBS@
51lib_eio_libeio_la_DEPENDENCIES = @EIO_INTERNAL_LIBS@ @EMODEL_INTERNAL_LIBS@ 51lib_eio_libeio_la_DEPENDENCIES = @EIO_INTERNAL_LIBS@ @EFL_INTERNAL_LIBS@
52lib_eio_libeio_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@ 52lib_eio_libeio_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@
53if HAVE_NOTIFY_COCOA 53if HAVE_NOTIFY_COCOA
54lib_eio_libeio_la_LDFLAGS += -framework CoreServices 54lib_eio_libeio_la_LDFLAGS += -framework CoreServices
@@ -61,6 +61,8 @@ TESTS += tests/eio/eio_suite
61 61
62tests_eio_eio_suite_SOURCES = \ 62tests_eio_eio_suite_SOURCES = \
63tests/eio/eio_suite.c \ 63tests/eio/eio_suite.c \
64tests/eio/eio_model_test_file.c \
65tests/eio/eio_model_test_monitor_add.c \
64tests/eio/eio_test_monitor.c 66tests/eio/eio_test_monitor.c
65 67
66tests_eio_eio_suite_CPPFLAGS = -I$(top_builddir)/src/lib/efl \ 68tests_eio_eio_suite_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
@@ -68,12 +70,13 @@ tests_eio_eio_suite_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
68-DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/eio\" \ 70-DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/eio\" \
69@CHECK_CFLAGS@ \ 71@CHECK_CFLAGS@ \
70@ECORE_FILE_CFLAGS@ \ 72@ECORE_FILE_CFLAGS@ \
71@EIO_CFLAGS@ 73@EIO_CFLAGS@ @EFL_CFLAGS@
72 74
73tests_eio_eio_suite_LDADD = \ 75tests_eio_eio_suite_LDADD = \
74@CHECK_LIBS@ \ 76@CHECK_LIBS@ \
75@USE_ECORE_FILE_LIBS@ \ 77@USE_ECORE_FILE_LIBS@ \
76@USE_EIO_LIBS@ 78@USE_EIO_LIBS@
79@USE_EFL_LIBS@
77 80
78tests_eio_eio_suite_DEPENDENCIES = \ 81tests_eio_eio_suite_DEPENDENCIES = \
79@USE_EIO_INTERNAL_LIBS@ 82@USE_EIO_INTERNAL_LIBS@
diff --git a/src/Makefile_Emodel.am b/src/Makefile_Emodel.am
deleted file mode 100644
index 4585af429f..0000000000
--- a/src/Makefile_Emodel.am
+++ /dev/null
@@ -1,78 +0,0 @@
1
2### Library
3
4EMODEL_EOS = lib/emodel/emodel.eo
5
6EMODEL_EOS_H = $(EMODEL_EOS:%.eo=%.eo.h)
7EMODEL_EOS_C = $(EMODEL_EOS:%.eo=%.eo.c)
8
9BUILT_SOURCES += $(EMODEL_EOS_C) $(EMODEL_EOS_H)
10
11dist_installed_emodelmainheaders_DATA = \
12lib/emodel/Emodel.h \
13lib/emodel/Emodel_Common.h
14
15nodist_installed_emodelmainheaders_DATA = $(EMODEL_EOS_H)
16
17emodeleolianfilesdir = $(datadir)/eolian/include/emodel-@VMAJ@
18emodeleolianfiles_DATA = $(EMODEL_EOS)
19
20lib_LTLIBRARIES += lib/emodel/libemodel.la
21EXTRA_DIST += $(emodeleolianfiles_DATA)
22
23installed_emodelmainheadersdir = $(includedir)/emodel-@VMAJ@
24
25lib_emodel_libemodel_la_SOURCES = \
26lib/emodel/emodel.c
27
28lib_emodel_libemodel_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
29-I$(top_builddir)/src/lib/emodel \
30-I$(top_srcdir)/src/lib/emodel \
31-I$(top_builddir)/src/lib/eo \
32-I$(top_srcdir)/src/lib/eo \
33-I$(top_builddir)/src/lib/ecore \
34-I$(top_srcdir)/src/lib/ecore \
35-I$(top_builddir)/src/lib/eina \
36-I$(top_srcdir)/src/lib/eina \
37-DPACKAGE_BIN_DIR=\"$(bindir)\" \
38-DPACKAGE_LIB_DIR=\"$(libdir)\" \
39-DPACKAGE_DATA_DIR=\"$(datadir)/edje\" \
40-DPACKAGE_BUILD_DIR=\"`pwd`/$(top_builddir)\" \
41-DPACKAGE_SRC_DIR=\"`pwd`/$(top_srcdir)\" \
42@EMODEL_CFLAGS@
43lib_emodel_libemodel_la_LIBADD = @EMODEL_LIBS@
44lib_emodel_libemodel_la_DEPENDENCIES = @EMODEL_INTERNAL_LIBS@ @EINA_INTERNAL_LIBS@ @EO_INTERNAL_LIBS@ @ECORE_INTERNAL_LIBS@
45
46if EFL_ENABLE_TESTS
47EXTRA_DIST += $(emodeleolianfiles_DATA)
48
49check_PROGRAMS += tests/emodel/emodel_suite
50TESTS += tests/emodel/emodel_suite
51
52tests_emodel_emodel_suite_SOURCES = \
53tests/emodel/emodel_suite.c \
54tests/emodel/emodel_test_file.c \
55tests/emodel/emodel_test_monitor_add.c
56
57tests_emodel_emodel_suite_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
58-I$(top_builddir)/src/lib/emodel \
59-I$(top_srcdir)/src/lib/emodel \
60-I$(top_builddir)/src/lib/ecore \
61-I$(top_srcdir)/src/lib/ecore \
62-I$(top_builddir)/src/lib/eio \
63-I$(top_srcdir)/src/lib/eio \
64-I$(top_builddir)/src/lib/eina \
65-I$(top_srcdir)/src/lib/eina \
66-DTESTS_WD=\"`pwd`\" \
67-DTESTS_SRC_DIR=\"$(top_srcdir)/src/tests/emodel\" \
68-DPACKAGE_BUILD_DIR=\"`pwd`/$(top_builddir)/src/tests/emodel\" \
69-DTESTS_BUILD_DIR=PACKAGE_BUILD_DIR \
70@CHECK_CFLAGS@ \
71@EINA_CFLAGS@ \
72@EMODEL_CFLAGS@ \
73@EO_CFLAGS@ \
74@EIO_CFLAGS@
75tests_emodel_emodel_suite_LDADD = @CHECK_LIBS@ @USE_EMODEL_LIBS@ @USE_EINA_LIBS@ @USE_EO_LIBS@ @USE_EIO_LIBS@ @USE_ECORE_LIBS@
76tests_emodel_emodel_suite_DEPENDENCIES = @USE_EMODEL_INTERNAL_LIBS@ @USE_EINA_INTERNAL_LIBS@ @USE_EO_INTERNAL_LIBS@ @USE_EIO_INTERNAL_LIBS@ @USE_ECORE_INTERNAL_LIBS@
77
78endif
diff --git a/src/Makefile_Emodel_Cxx.am b/src/Makefile_Emodel_Cxx.am
deleted file mode 100644
index f6984b48a9..0000000000
--- a/src/Makefile_Emodel_Cxx.am
+++ /dev/null
@@ -1,22 +0,0 @@
1if HAVE_CXX11
2
3### Generated headers
4
5generated_emodel_cxx_bindings = lib/emodel/emodel.eo.hh
6
7lib/emodel/Emodel.hh: $(generated_emodel_cxx_bindings)
8 @echo @ECHO_E@ "#ifndef EFL_CXX_EMODEL_HH\n#define EFL_CXX_EMODEL_HH\n" > $(top_builddir)/src/lib/emodel/Emodel.hh
9 @echo @ECHO_E@ "#ifdef EFL_BETA_API_SUPPORT" >> $(top_builddir)/src/lib/emodel/Emodel.hh
10 @for i in $(generated_emodel_cxx_bindings); do echo "#include <$$(basename $$i)>" >> $(top_builddir)/src/lib/emodel/Emodel.hh; done
11 @echo @ECHO_E@ "#endif\n\n#endif\n" >> $(top_builddir)/src/lib/emodel/Emodel.hh
12
13generated_emodel_cxx_all = \
14 $(generated_emodel_cxx_bindings) \
15 lib/emodel/Emodel.hh
16
17CLEANFILES += $(generated_emodel_cxx_all)
18
19installed_emodelcxxmainheadersdir = $(includedir)/emodel-cxx-@VMAJ@/
20nodist_installed_emodelcxxmainheaders_DATA = $(generated_emodel_cxx_all)
21
22endif
diff --git a/src/lib/efl/Efl.h b/src/lib/efl/Efl.h
index 5a0b3eb949..2de76807d2 100644
--- a/src/lib/efl/Efl.h
+++ b/src/lib/efl/Efl.h
@@ -139,6 +139,8 @@ typedef enum _Efl_Gfx_Fill_Spread
139 139
140#ifdef EFL_BETA_API_SUPPORT 140#ifdef EFL_BETA_API_SUPPORT
141 141
142#include <Efl_Model_Common.h>
143
142/* Interfaces */ 144/* Interfaces */
143#include "interfaces/efl_control.eo.h" 145#include "interfaces/efl_control.eo.h"
144#include "interfaces/efl_file.eo.h" 146#include "interfaces/efl_file.eo.h"
@@ -146,6 +148,7 @@ typedef enum _Efl_Gfx_Fill_Spread
146#include "interfaces/efl_player.eo.h" 148#include "interfaces/efl_player.eo.h"
147#include "interfaces/efl_text.eo.h" 149#include "interfaces/efl_text.eo.h"
148#include "interfaces/efl_text_properties.eo.h" 150#include "interfaces/efl_text_properties.eo.h"
151#include "interfaces/efl_model_base.eo.h"
149 152
150EAPI extern const Eo_Event_Description _EFL_GFX_CHANGED; 153EAPI extern const Eo_Event_Description _EFL_GFX_CHANGED;
151EAPI extern const Eo_Event_Description _EFL_GFX_PATH_CHANGED; 154EAPI extern const Eo_Event_Description _EFL_GFX_PATH_CHANGED;
diff --git a/src/lib/efl/Efl_Model_Common.h b/src/lib/efl/Efl_Model_Common.h
new file mode 100644
index 0000000000..bd9ab62e5f
--- /dev/null
+++ b/src/lib/efl/Efl_Model_Common.h
@@ -0,0 +1,92 @@
1#ifndef _EFL_MODEL_COMMON_H
2#define _EFL_MODEL_COMMON_H
3
4#ifdef __cplusplus
5extern "C" {
6#endif
7
8/**
9 * @enum _Efl_Model_Load_Status
10 * XXX/TODO/FIXME: Remove this enum (and possibly other data) from here
11 * as soon as eolian translates these data types in .eo's.
12 */
13enum _Efl_Model_Load_Status
14 {
15 EFL_MODEL_LOAD_STATUS_ERROR = 0,
16 EFL_MODEL_LOAD_STATUS_LOADING_PROPERTIES = (1 << 0),
17 EFL_MODEL_LOAD_STATUS_LOADING_CHILDREN = (1 << 1),
18 EFL_MODEL_LOAD_STATUS_LOADING = (1 << 0) | (1 << 1),
19
20 EFL_MODEL_LOAD_STATUS_LOADED_PROPERTIES = (1 << 2),
21 EFL_MODEL_LOAD_STATUS_LOADED_CHILDREN = (1 << 3),
22 EFL_MODEL_LOAD_STATUS_LOADED = (1 << 2) | (1 << 3),
23
24 EFL_MODEL_LOAD_STATUS_UNLOADING = (1 << 4),
25 EFL_MODEL_LOAD_STATUS_UNLOADED = (1 << 5)
26 };
27/**
28 * @typedef Efl_Model_Load_Status
29 */
30typedef enum _Efl_Model_Load_Status Efl_Model_Load_Status;
31
32/**
33 * @struct _Efl_Model_Load
34 * Structure to hold Efl_Model_Load_Status enum
35 * (and possible other data) to avoid ABI break.
36 */
37struct _Efl_Model_Load
38 {
39 Efl_Model_Load_Status status;
40 /* add more data below here if necessary */
41 };
42
43/**
44 * @typedef Efl_Model_Load
45 */
46typedef struct _Efl_Model_Load Efl_Model_Load;
47
48/**
49 * @struct _Efl_Model_Property_Event
50 */
51struct _Efl_Model_Property_Event
52{
53 const Eina_Array *changed_properties; /**< array of property name */
54 const Eina_Array *invalidated_properties; /**< array of property name */
55};
56
57/**
58 * @typedef Efl_Model_Property_Event
59 */
60typedef struct _Efl_Model_Property_Event Efl_Model_Property_Event;
61
62/**
63 * @struct _Efl_Model_Children_Event
64 * Every time a child id added the event
65 * EFL_MODEL_EVENT_CHILD_ADDED is dispatched
66 * passing along this structure.
67 */
68struct _Efl_Model_Children_Event
69{
70 Eo *child; /**< child, for child_add */
71 /**
72 * index is a hint and is intended
73 * to provide a way for applications
74 * to control/know children relative
75 * positions through listings.
76 *
77 * NOTE: If listing is performed asynchronously
78 * exact order may not be guaranteed.
79 */
80 unsigned int index;
81};
82
83/**
84 * @struct Efl_Model_Children_Event
85 */
86typedef struct _Efl_Model_Children_Event Efl_Model_Children_Event;
87
88
89#ifdef __cplusplus
90}
91#endif
92#endif
diff --git a/src/lib/efl/interfaces/efl_interfaces_main.c b/src/lib/efl/interfaces/efl_interfaces_main.c
index 6ae1cb3ea4..31a3aae616 100644
--- a/src/lib/efl/interfaces/efl_interfaces_main.c
+++ b/src/lib/efl/interfaces/efl_interfaces_main.c
@@ -25,3 +25,5 @@ EAPI const Eo_Event_Description _EFL_GFX_CHANGED =
25 25
26EAPI const Eo_Event_Description _EFL_GFX_PATH_CHANGED = 26EAPI const Eo_Event_Description _EFL_GFX_PATH_CHANGED =
27 EO_EVENT_DESCRIPTION("Graphics path changed", "The path of a shape object changed"); 27 EO_EVENT_DESCRIPTION("Graphics path changed", "The path of a shape object changed");
28
29#include "interfaces/efl_model_base.eo.c"
diff --git a/src/lib/emodel/emodel.eo b/src/lib/efl/interfaces/efl_model_base.eo
index 9aba5a9ee7..75e280ebd4 100644
--- a/src/lib/emodel/emodel.eo
+++ b/src/lib/efl/interfaces/efl_model_base.eo
@@ -1,46 +1,47 @@
1/* 1/*
2 * type Emodel_Load_Status: enum _Emodel_Load_Status 2 * type Efl_Model_Load_Status: enum _Efl_Model_Load_Status
3 * { 3 * {
4 * EMODEL_LOAD_STATUS_ERROR = 0, /*@ Error in Load Model * 4 * EFL_MODEL_LOAD_STATUS_ERROR = 0, /*@ Error in Load Model *
5 * EMODEL_LOAD_STATUS_LOADING_PROPERTIES = (1 << 0), /*@ properties load in progress * 5 * EFL_MODEL_LOAD_STATUS_LOADING_PROPERTIES = (1 << 0), /*@ properties load in progress *
6 * EMODEL_LOAD_STATUS_LOADING_CHILDREN = (1 << 1), /*@ children load in progress * 6 * EFL_MODEL_LOAD_STATUS_LOADING_CHILDREN = (1 << 1), /*@ children load in progress *
7 * EMODEL_LOAD_STATUS_LOADING = (1 << 0) | (1 << 1), /*@ children and properties load in progress * 7 * EFL_MODEL_LOAD_STATUS_LOADING = (1 << 0) | (1 << 1), /*@ children and properties load in progress *
8 * 8 *
9 * EMODEL_LOAD_STATUS_LOADED_PROPERTIES = (1 << 2), /*@ Model as ready to fetch properties * 9 * EFL_MODEL_LOAD_STATUS_LOADED_PROPERTIES = (1 << 2), /*@ Model as ready to fetch properties *
10 * EMODEL_LOAD_STATUS_LOADED_CHILDREN = (1 << 3), /*@ Model as ready to fetch children * 10 * EFL_MODEL_LOAD_STATUS_LOADED_CHILDREN = (1 << 3), /*@ Model as ready to fetch children *
11 * EMODEL_LOAD_STATUS_LOADED = (1 << 2) | (1 << 3), /*@ Model as ready to fetch properties and children * 11 * EFL_MODEL_LOAD_STATUS_LOADED = (1 << 2) | (1 << 3), /*@ Model as ready to fetch properties and children *
12 * 12 *
13 * EMODEL_LOAD_STATUS_UNLOADING = (1 << 4), /*@ Model Unload in progress * 13 * EFL_MODEL_LOAD_STATUS_UNLOADING = (1 << 4), /*@ Model Unload in progress *
14 * EMODEL_LOAD_STATUS_UNLOADED = (1 << 5) /*@ Model Unloaded * 14 * EFL_MODEL_LOAD_STATUS_UNLOADED = (1 << 5) /*@ Model Unloaded *
15 * } 15 * }
16 * 16 *
17 * 17 *
18 * type Emodel_Property_Event: struct _Emodel_Property_Event 18 * type Efl_Model_Property_Event: struct _Efl_Model_Property_Event
19 * { 19 * {
20 * changed_properties: Eina_Array* <const(char)*>; /*@ List of changed properties * 20 * changed_properties: Eina_Array* <const(char)*>; /*@ List of changed properties *
21 * invalidated_properties: Eina_Array* <const(char)*>; /*@ Removed properties identified by name * 21 * invalidated_properties: Eina_Array* <const(char)*>; /*@ Removed properties identified by name *
22 * } 22 * }
23 */ 23 */
24 24
25interface Emodel () 25interface Efl.Model.Base ()
26{ 26{
27 legacy_prefix: null; 27 legacy_prefix: null;
28 eo_prefix: efl_model;
28 properties { 29 properties {
29 load_status { 30 load_status {
30 get { 31 get {
31 /*@ 32 /*@
32 Get a load emodel current status. 33 Get a load emodel current status.
33 34
34 @return: @c Emodel_Load_Status 35 @return: @c Efl_Model_Load_Status
35 36
36 By convention this means get the current model status. 37 By convention this means get the current model status.
37 Possible values are defined Emodel_Load_Status enumerator. 38 Possible values are defined Efl_Model_Load_Status enumerator.
38 39
39 @see Emodel_Load_Status 40 @see Efl_Model_Load_Status
40 @see emodel_load 41 @see efl_model_load
41 42
42 @since 1.11 */ 43 @since 1.14 */
43 return: Emodel_Load_Status; 44 return: Efl_Model_Load_Status;
44 } 45 }
45 } 46 }
46 properties { 47 properties {
@@ -48,17 +49,17 @@ interface Emodel ()
48 /*@ 49 /*@
49 Get properties from model. 50 Get properties from model.
50 51
51 @return: @c Emodel_Load_Status 52 @return: @c Efl_Model_Load_Status
52 53
53 properties_get is due to provide callers a way the fetch the current 54 properties_get is due to provide callers a way the fetch the current
54 properties implemented/used by the model. 55 properties implemented/used by the model.
55 The event EMODEL_EVENT_PROPERTIES_CHANGE will be raised to notify listeners 56 The event EFL_MODEL_EVENT_PROPERTIES_CHANGE will be raised to notify listeners
56 of any modifications in the properties. 57 of any modifications in the properties.
57 58
58 @see EMODEL_EVENT_PROPERTIES_CHANGE 59 @see EFL_MODEL_EVENT_PROPERTIES_CHANGE
59 @since 1.11 */ 60 @since 1.14 */
60 61
61 return: Emodel_Load_Status; 62 return: Efl_Model_Load_Status;
62 } 63 }
63 values { 64 values {
64 const(array<const(char*)>*) properties; /*@ array of current properties */ 65 const(array<const(char*)>*) properties; /*@ array of current properties */
@@ -71,40 +72,40 @@ interface Emodel ()
71 72
72 @return: @c EINA_TRUE, on success, @c EINA_FALSE in readonly property or error 73 @return: @c EINA_TRUE, on success, @c EINA_FALSE in readonly property or error
73 74
74 The caller must ensure to call at least emodel_prop_list before being 75 The caller must ensure to call at least efl_model_prop_list before being
75 able to see/set properties. 76 able to see/set properties.
76 This function sets a new property value into given property name. Once 77 This function sets a new property value into given property name. Once
77 the operation is completed the concrete implementation should raise 78 the operation is completed the concrete implementation should raise
78 EMODEL_EVENT_PROPERTIES_CHANGE event in order to notify listeners of the 79 EFL_MODEL_EVENT_PROPERTIES_CHANGE event in order to notify listeners of the
79 new value of the property. 80 new value of the property.
80 81
81 If the model doesn't have the property then there are two possibilities, 82 If the model doesn't have the property then there are two possibilities,
82 either raise an error or create the new property in model 83 either raise an error or create the new property in model
83 84
84 @see emodel_property_get 85 @see efl_model_property_get
85 @see EMODEL_EVENT_PROPERTIES_CHANGE 86 @see EFL_MODEL_EVENT_PROPERTIES_CHANGE
86 @since 1.11 */ 87 @since 1.14 */
87 88
88 return: Emodel_Load_Status; 89 return: Efl_Model_Load_Status;
89 } 90 }
90 get { 91 get {
91 /*@ 92 /*@
92 Retrieve the value of a given property name. 93 Retrieve the value of a given property name.
93 94
94 @return: @c Load Status, on success, @c EMODEL_LOAD_STATUS_ERROR otherwise 95 @return: @c Load Status, on success, @c EFL_MODEL_LOAD_STATUS_ERROR otherwise
95 96
96 property_get will only be available when load status is equal to 97 property_get will only be available when load status is equal to
97 EMODEL_LOAD_STATUS_LOADED. 98 EFL_MODEL_LOAD_STATUS_LOADED.
98 99
99 At this point the caller is free to get values from properties. 100 At this point the caller is free to get values from properties.
100 The event EMODEL_EVENT_PROPERTIES_CHANGE may be raised to notify 101 The event EFL_MODEL_EVENT_PROPERTIES_CHANGE may be raised to notify
101 listeners of the property/value. 102 listeners of the property/value.
102 103
103 @see emodel_properties_get 104 @see efl_model_properties_get
104 @see EMODEL_EVENT_PROPERTIES_CHANGE 105 @see EFL_MODEL_EVENT_PROPERTIES_CHANGE
105 106
106 @since 1.11 */ 107 @since 1.14 */
107 return: Emodel_Load_Status; 108 return: Efl_Model_Load_Status;
108 } 109 }
109 keys { 110 keys {
110 const(char)* property; /*@ Property name */ 111 const(char)* property; /*@ Property name */
@@ -118,14 +119,14 @@ interface Emodel ()
118 /*@ 119 /*@
119 Get children slice OR full range. 120 Get children slice OR full range.
120 121
121 @return: @c Emodel_Load_Status. See below for more info. 122 @return: @c Efl_Model_Load_Status. See below for more info.
122 123
123 Before being able to get the children list the model status must be 124 Before being able to get the children list the model status must be
124 on loaded status (EMODEL_LOAD_STATUS_LOADED). 125 on loaded status (EFL_MODEL_LOAD_STATUS_LOADED).
125 However there may be circunstancies where the model could be 126 However there may be circunstancies where the model could be
126 in a different state, in such cases it is advisable 127 in a different state, in such cases it is advisable
127 to simply return: its current state, which will be 128 to simply return: its current state, which will be
128 of course, different than @c EMODEL_LOAD_STATUS_LOADED_CHILDREN. 129 of course, different than @c EFL_MODEL_LOAD_STATUS_LOADED_CHILDREN.
129 When children accessor is return:ed as NULL one should then 130 When children accessor is return:ed as NULL one should then
130 test the current load status return:ed by @children_slice_get 131 test the current load status return:ed by @children_slice_get
131 in order to check against an empty list or real error. 132 in order to check against an empty list or real error.
@@ -154,20 +155,20 @@ interface Emodel ()
154 @code 155 @code
155 156
156 // Returns full list 157 // Returns full list
157 eo_do(obj, emodel_children_slice_get(0, 0, &children_accessor)); 158 eo_do(obj, efl_model_children_slice_get(0, 0, &children_accessor));
158 159
159 // Returns 5 items, counting from item #5 160 // Returns 5 items, counting from item #5
160 eo_do(obj, emodel_children_slice_get(5, 5, &children_accessor)); 161 eo_do(obj, efl_model_children_slice_get(5, 5, &children_accessor));
161 162
162 @endcode 163 @endcode
163 164
164 @see emodel_children_get 165 @see efl_model_children_get
165 @see emodel_children_count_get 166 @see efl_model_children_count_get
166 @see emodel_load 167 @see efl_model_load
167 @see emodel_load_status_get 168 @see efl_model_load_status_get
168 @since 1.11 */ 169 @since 1.14 */
169 170
170 return: Emodel_Load_Status; 171 return: Efl_Model_Load_Status;
171 } 172 }
172 keys { 173 keys {
173 unsigned start; /*@ Range begin - start from here. If start and count are 0 slice is ignored.*/ 174 unsigned start; /*@ Range begin - start from here. If start and count are 0 slice is ignored.*/
@@ -184,18 +185,18 @@ interface Emodel ()
184 185
185 @return: @c EINA_TRUE, on success, @c EINA_FALSE otherwise 186 @return: @c EINA_TRUE, on success, @c EINA_FALSE otherwise
186 187
187 When emodel_load is completed emodel_coildren_count_get can be use 188 When efl_model_load is completed efl_model_coildren_count_get can be use
188 to get the number of children. children_count_get can also be used 189 to get the number of children. children_count_get can also be used
189 before calling children_slice_get so a valid range is known. 190 before calling children_slice_get so a valid range is known.
190 Event EMODEL_CHILDREN_COUNT_CHANGED is emitted when count is finished. 191 Event EFL_MODEL_CHILDREN_COUNT_CHANGED is emitted when count is finished.
191 192
192 @see emodel_children_get 193 @see efl_model_children_get
193 @see emodel_children_slice_get 194 @see efl_model_children_slice_get
194 @see emodel_load 195 @see efl_model_load
195 @see emodel_load_status_get 196 @see efl_model_load_status_get
196 @since 1.11 */ 197 @since 1.14 */
197 198
198 return: Emodel_Load_Status; 199 return: Efl_Model_Load_Status;
199 } 200 }
200 values { 201 values {
201 unsigned children_count; 202 unsigned children_count;
@@ -211,21 +212,21 @@ interface Emodel ()
211 the models properties and children with it. For example in the case of file 212 the models properties and children with it. For example in the case of file
212 system backed model, this means opening the relevant files and reading the 213 system backed model, this means opening the relevant files and reading the
213 data from them(creating the properties and children from it). 214 data from them(creating the properties and children from it).
214 the model emit EMODEL_EVENT_LOAD_STATUS after end with Emodel_Load_Status 215 the model emit EFL_MODEL_EVENT_LOAD_STATUS after end with Efl_Model_Load_Status
215 @warning This convention should be followed, but no guarantees of behaviour 216 @warning This convention should be followed, but no guarantees of behaviour
216 by user defined types can be given. 217 by user defined types can be given.
217 218
218 Alternatively is possible to use properties_load to load only properties 219 Alternatively is possible to use properties_load to load only properties
219 and children_load to load only children. If emodel_load is called then 220 and children_load to load only children. If efl_model_load is called then
220 calling properties_load and/or children_load is not necessary. 221 calling properties_load and/or children_load is not necessary.
221 222
222 @see Emodel_Load_Status 223 @see Efl_Model_Load_Status
223 @see emodel_properties_load 224 @see efl_model_properties_load
224 @see emodel_children_load 225 @see efl_model_children_load
225 @see emodel_unload 226 @see efl_model_unload
226 @see emodel_load_status_get 227 @see efl_model_load_status_get
227 228
228 @since 1.11 */ 229 @since 1.14 */
229 } 230 }
230 unload { 231 unload {
231 /*@ 232 /*@
@@ -234,42 +235,42 @@ interface Emodel ()
234 By convention this means releasing data received/read from an external source. For 235 By convention this means releasing data received/read from an external source. For
235 example of a database backed model this might mean releasing the iterator for 236 example of a database backed model this might mean releasing the iterator for
236 the currently loaded data or deleting a temporary table. 237 the currently loaded data or deleting a temporary table.
237 the model emit EMODEL_EVENT_LOAD_STATUS after end with model load status 238 the model emit EFL_MODEL_EVENT_LOAD_STATUS after end with model load status
238 @warning This convention should be followed, but no guarantees of behaviour 239 @warning This convention should be followed, but no guarantees of behaviour
239 by user defined types can be given. 240 by user defined types can be given.
240 241
241 @see Emodel_Load_Status 242 @see Efl_Model_Load_Status
242 @see emodel_load 243 @see efl_model_load
243 @see emodel_load_status_get 244 @see efl_model_load_status_get
244 245
245 @since 1.11 */ 246 @since 1.14 */
246 } 247 }
247 properties_load { 248 properties_load {
248 /*@ 249 /*@
249 Properties emodel load. 250 Properties emodel load.
250 251
251 By convention this means loading data from an external source and populating 252 By convention this means loading data from an external source and populating
252 the models properties only. This method is a subset of emodel_load, meaning that 253 the models properties only. This method is a subset of efl_model_load, meaning that
253 it won't load children, it is a hint. 254 it won't load children, it is a hint.
254 For loadind both properties and children use emodel_load 255 For loadind both properties and children use efl_model_load
255 instead. 256 instead.
256 257
257 @see emodel_load 258 @see efl_model_load
258 259
259 @since 1.11 */ 260 @since 1.14 */
260 } 261 }
261 children_load { 262 children_load {
262 /*@ 263 /*@
263 Children emodel load. 264 Children emodel load.
264 265
265 By convention this means loading data from an external source and populating 266 By convention this means loading data from an external source and populating
266 the models children only. This method is a subset of emodel_load, meaning that 267 the models children only. This method is a subset of efl_model_load, meaning that
267 it won't load properties. For loadind both properties and children use emodel_load 268 it won't load properties. For loadind both properties and children use efl_model_load
268 instead. 269 instead.
269 270
270 @see emodel_load 271 @see efl_model_load
271 272
272 @since 1.11 */ 273 @since 1.14 */
273 } 274 }
274 child_add { 275 child_add {
275 /*@ 276 /*@
@@ -279,13 +280,13 @@ interface Emodel ()
279 280
280 Add a new child, possibly dummy, depending on the implementation, 281 Add a new child, possibly dummy, depending on the implementation,
281 of a internal keeping. When the child is effectively 282 of a internal keeping. When the child is effectively
282 added the event EMODEL_EVENT_CHILD_ADD is then raised and the new child 283 added the event EFL_MODEL_EVENT_CHILD_ADD is then raised and the new child
283 is kept along with other children. 284 is kept along with other children.
284 285
285 @see EMODEL_EVENT_CHILD_ADD 286 @see EFL_MODEL_EVENT_CHILD_ADD
286 @see load_status_get 287 @see load_status_get
287 288
288 @since 1.11 */ 289 @since 1.14 */
289 290
290 return: Eo *; 291 return: Eo *;
291 } 292 }
@@ -293,16 +294,16 @@ interface Emodel ()
293 /*@ 294 /*@
294 Remove a child. 295 Remove a child.
295 296
296 @return: @c Emodel_Load_Status on success, @c EMODEL_LOAD_STATUS_ERROR otherwise. 297 @return: @c Efl_Model_Load_Status on success, @c EFL_MODEL_LOAD_STATUS_ERROR otherwise.
297 298
298 Remove a child of a internal keeping. When the child is effectively 299 Remove a child of a internal keeping. When the child is effectively
299 removed the event EMODEL_EVENT_CHILD_REMOVED is then raised to give a 300 removed the event EFL_MODEL_EVENT_CHILD_REMOVED is then raised to give a
300 chance for listeners to perform any cleanup and/or update references. 301 chance for listeners to perform any cleanup and/or update references.
301 302
302 @see EMODEL_EVENT_CHILD_REMOVED 303 @see EFL_MODEL_EVENT_CHILD_REMOVED
303 @since 1.11 */ 304 @since 1.14 */
304 305
305 return: Emodel_Load_Status; 306 return: Efl_Model_Load_Status;
306 307
307 params { 308 params {
308 @in Eo* child; /*@ Child to be removed */ 309 @in Eo* child; /*@ Child to be removed */
@@ -311,8 +312,8 @@ interface Emodel ()
311 } 312 }
312 313
313 events { 314 events {
314 load,status: Emodel_Load_Status; /*@ Event dispatch when load status changes */ 315 load,status: Efl_Model_Load_Status; /*@ Event dispatch when load status changes */
315 properties,changed: Emodel_Properties_Evt; /*@ Event dispatched when properties list is available. */ 316 properties,changed: Efl_Model_Properties_Evt; /*@ Event dispatched when properties list is available. */
316 child,added; /*@ Event dispatched when new child is added. */ 317 child,added; /*@ Event dispatched when new child is added. */
317 child,removed; /*@ Event dispatched when child is removed. */ 318 child,removed; /*@ Event dispatched when child is removed. */
318 children,count,changed; /*@ Event dispatched when children count is finished. */ 319 children,count,changed; /*@ Event dispatched when children count is finished. */
diff --git a/src/lib/eio/eio_model.c b/src/lib/eio/eio_model.c
index 72d5bb04af..0a93658331 100644
--- a/src/lib/eio/eio_model.c
+++ b/src/lib/eio/eio_model.c
@@ -4,7 +4,7 @@
4 4
5#include <stdint.h> 5#include <stdint.h>
6 6
7#include <Emodel.h> 7#include <Efl.h>
8#include <Eina.h> 8#include <Eina.h>
9#include <eio_model.h> 9#include <eio_model.h>
10#include <Eio.h> 10#include <Eio.h>
@@ -18,32 +18,32 @@
18#define MY_CLASS_NAME "Eio_Model" 18#define MY_CLASS_NAME "Eio_Model"
19 19
20static void _eio_prop_set_error_cb(void *, Eio_File *, int); 20static void _eio_prop_set_error_cb(void *, Eio_File *, int);
21static void _eio_model_emodel_properties_load(Eo *, Eio_Model_Data *); 21static void _eio_model_efl_model_base_properties_load(Eo *, Eio_Model_Data *);
22static void _eio_model_emodel_children_load(Eo *, Eio_Model_Data *); 22static void _eio_model_efl_model_base_children_load(Eo *, Eio_Model_Data *);
23 23
24static void 24static void
25_load_set(Eio_Model_Data *priv, Emodel_Load_Status status) 25_load_set(Eio_Model_Data *priv, Efl_Model_Load_Status status)
26{ 26{
27 Emodel_Load load; 27 Efl_Model_Load load;
28 28
29 load.status = status; 29 load.status = status;
30 if ((priv->load.status & (EMODEL_LOAD_STATUS_LOADED | EMODEL_LOAD_STATUS_LOADING)) && 30 if ((priv->load.status & (EFL_MODEL_LOAD_STATUS_LOADED | EFL_MODEL_LOAD_STATUS_LOADING)) &&
31 (load.status & (EMODEL_LOAD_STATUS_LOADED | EMODEL_LOAD_STATUS_LOADING))) 31 (load.status & (EFL_MODEL_LOAD_STATUS_LOADED | EFL_MODEL_LOAD_STATUS_LOADING)))
32 { 32 {
33 load.status = priv->load.status | status; 33 load.status = priv->load.status | status;
34 switch (status) 34 switch (status)
35 { 35 {
36 case EMODEL_LOAD_STATUS_LOADED_PROPERTIES: 36 case EFL_MODEL_LOAD_STATUS_LOADED_PROPERTIES:
37 load.status &= ~EMODEL_LOAD_STATUS_LOADING_PROPERTIES; 37 load.status &= ~EFL_MODEL_LOAD_STATUS_LOADING_PROPERTIES;
38 break; 38 break;
39 case EMODEL_LOAD_STATUS_LOADING_PROPERTIES: 39 case EFL_MODEL_LOAD_STATUS_LOADING_PROPERTIES:
40 load.status &= ~EMODEL_LOAD_STATUS_LOADED_PROPERTIES; 40 load.status &= ~EFL_MODEL_LOAD_STATUS_LOADED_PROPERTIES;
41 break; 41 break;
42 case EMODEL_LOAD_STATUS_LOADED_CHILDREN: 42 case EFL_MODEL_LOAD_STATUS_LOADED_CHILDREN:
43 load.status &= ~EMODEL_LOAD_STATUS_LOADING_CHILDREN; 43 load.status &= ~EFL_MODEL_LOAD_STATUS_LOADING_CHILDREN;
44 break; 44 break;
45 case EMODEL_LOAD_STATUS_LOADING_CHILDREN: 45 case EFL_MODEL_LOAD_STATUS_LOADING_CHILDREN:
46 load.status &= ~EMODEL_LOAD_STATUS_LOADED_CHILDREN; 46 load.status &= ~EFL_MODEL_LOAD_STATUS_LOADED_CHILDREN;
47 break; 47 break;
48 default: break; 48 default: break;
49 } 49 }
@@ -52,7 +52,7 @@ _load_set(Eio_Model_Data *priv, Emodel_Load_Status status)
52 if (priv->load.status != load.status) 52 if (priv->load.status != load.status)
53 { 53 {
54 priv->load.status = load.status; 54 priv->load.status = load.status;
55 eo_do(priv->obj, eo_event_callback_call(EMODEL_EVENT_LOAD_STATUS, &load)); 55 eo_do(priv->obj, eo_event_callback_call(EFL_MODEL_BASE_EVENT_LOAD_STATUS, &load));
56 } 56 }
57} 57}
58 58
@@ -63,12 +63,12 @@ _load_set(Eio_Model_Data *priv, Emodel_Load_Status status)
63static void 63static void
64_eio_stat_done_cb(void *data, Eio_File *handler EINA_UNUSED, const Eina_Stat *stat) 64_eio_stat_done_cb(void *data, Eio_File *handler EINA_UNUSED, const Eina_Stat *stat)
65{ 65{
66 Emodel_Property_Event evt; 66 Efl_Model_Property_Event evt;
67 Eio_Model_Data *priv = data; 67 Eio_Model_Data *priv = data;
68 EINA_SAFETY_ON_FALSE_RETURN(eo_ref_get(priv->obj)); 68 EINA_SAFETY_ON_FALSE_RETURN(eo_ref_get(priv->obj));
69 69
70 priv->is_dir = eio_file_is_dir(stat); 70 priv->is_dir = eio_file_is_dir(stat);
71 memset(&evt, 0, sizeof(Emodel_Property_Event)); 71 memset(&evt, 0, sizeof(Efl_Model_Property_Event));
72 72
73 eina_value_set(priv->properties_value[EIO_MODEL_PROP_IS_DIR], eio_file_is_dir(stat)); 73 eina_value_set(priv->properties_value[EIO_MODEL_PROP_IS_DIR], eio_file_is_dir(stat));
74 eina_value_set(priv->properties_value[EIO_MODEL_PROP_IS_LNK], eio_file_is_lnk(stat)); 74 eina_value_set(priv->properties_value[EIO_MODEL_PROP_IS_LNK], eio_file_is_lnk(stat));
@@ -76,12 +76,12 @@ _eio_stat_done_cb(void *data, Eio_File *handler EINA_UNUSED, const Eina_Stat *st
76 eina_value_set(priv->properties_value[EIO_MODEL_PROP_SIZE], eio_file_size(stat)); 76 eina_value_set(priv->properties_value[EIO_MODEL_PROP_SIZE], eio_file_size(stat));
77 77
78 evt.changed_properties = priv->properties_name; 78 evt.changed_properties = priv->properties_name;
79 eo_do(priv->obj, eo_event_callback_call(EMODEL_EVENT_PROPERTIES_CHANGED, &evt)); 79 eo_do(priv->obj, eo_event_callback_call(EFL_MODEL_BASE_EVENT_PROPERTIES_CHANGED, &evt));
80 80
81 _load_set(priv, EMODEL_LOAD_STATUS_LOADED_PROPERTIES); 81 _load_set(priv, EFL_MODEL_LOAD_STATUS_LOADED_PROPERTIES);
82 82
83 if (priv->load_pending & EMODEL_LOAD_STATUS_LOADED_CHILDREN) 83 if (priv->load_pending & EFL_MODEL_LOAD_STATUS_LOADED_CHILDREN)
84 _eio_model_emodel_children_load(priv->obj, priv); 84 _eio_model_efl_model_base_children_load(priv->obj, priv);
85} 85}
86 86
87static void 87static void
@@ -93,13 +93,13 @@ _eio_progress_cb(void *data EINA_UNUSED, Eio_File *handler EINA_UNUSED, const Ei
93static void 93static void
94_eio_move_done_cb(void *data, Eio_File *handler EINA_UNUSED) 94_eio_move_done_cb(void *data, Eio_File *handler EINA_UNUSED)
95{ 95{
96 Emodel_Property_Event evt; 96 Efl_Model_Property_Event evt;
97 Eio_Model_Data *priv = data; 97 Eio_Model_Data *priv = data;
98 Eina_Array *properties; 98 Eina_Array *properties;
99 99
100 EINA_SAFETY_ON_FALSE_RETURN(eo_ref_get(priv->obj)); 100 EINA_SAFETY_ON_FALSE_RETURN(eo_ref_get(priv->obj));
101 101
102 memset(&evt, 0, sizeof(Emodel_Property_Event)); 102 memset(&evt, 0, sizeof(Efl_Model_Property_Event));
103 103
104 /** 104 /**
105 * When mv is executed we update our values and 105 * When mv is executed we update our values and
@@ -113,7 +113,7 @@ _eio_move_done_cb(void *data, Eio_File *handler EINA_UNUSED)
113 eina_array_push(properties, _eio_model_prop_names[EIO_MODEL_PROP_FILENAME]); 113 eina_array_push(properties, _eio_model_prop_names[EIO_MODEL_PROP_FILENAME]);
114 evt.changed_properties = properties; 114 evt.changed_properties = properties;
115 115
116 eo_do(priv->obj, eo_event_callback_call(EMODEL_EVENT_PROPERTIES_CHANGED, &evt)); 116 eo_do(priv->obj, eo_event_callback_call(EFL_MODEL_BASE_EVENT_PROPERTIES_CHANGED, &evt));
117 eina_array_free(properties); 117 eina_array_free(properties);
118} 118}
119 119
@@ -141,11 +141,11 @@ _eio_prop_set_error_cb(void *data EINA_UNUSED, Eio_File *handler EINA_UNUSED, in
141 * Ecore Events 141 * Ecore Events
142 */ 142 */
143static Eina_Bool 143static Eina_Bool
144_emodel_evt_added_ecore_cb(void *data EINA_UNUSED, int type EINA_UNUSED, void *event EINA_UNUSED) 144_efl_model_evt_added_ecore_cb(void *data EINA_UNUSED, int type EINA_UNUSED, void *event EINA_UNUSED)
145{ 145{
146 Eio_Monitor_Event *evt = (Eio_Monitor_Event*)event; 146 Eio_Monitor_Event *evt = (Eio_Monitor_Event*)event;
147 Eio_Model_Data *priv = data; 147 Eio_Model_Data *priv = data;
148 Emodel_Children_Event cevt; 148 Efl_Model_Children_Event cevt;
149 Eina_Value path; 149 Eina_Value path;
150 150
151 if (priv->children_list) 151 if (priv->children_list)
@@ -159,14 +159,14 @@ _emodel_evt_added_ecore_cb(void *data EINA_UNUSED, int type EINA_UNUSED, void *e
159 eo_do(cevt.child, eio_model_children_filter_set(priv->filter_cb, priv->filter_userdata)); 159 eo_do(cevt.child, eio_model_children_filter_set(priv->filter_cb, priv->filter_userdata));
160 eina_value_flush(&path); 160 eina_value_flush(&path);
161 161
162 eo_do(priv->obj, eo_event_callback_call(EMODEL_EVENT_CHILD_ADDED, &cevt)); 162 eo_do(priv->obj, eo_event_callback_call(EFL_MODEL_BASE_EVENT_CHILD_ADDED, &cevt));
163 } 163 }
164 164
165 return EINA_TRUE; 165 return EINA_TRUE;
166} 166}
167 167
168static Eina_Bool 168static Eina_Bool
169_emodel_evt_deleted_ecore_cb(void *data EINA_UNUSED, int type EINA_UNUSED, void *event EINA_UNUSED) 169_efl_model_evt_deleted_ecore_cb(void *data EINA_UNUSED, int type EINA_UNUSED, void *event EINA_UNUSED)
170{ 170{
171 Eio_Monitor_Event *evt = (Eio_Monitor_Event*)event; 171 Eio_Monitor_Event *evt = (Eio_Monitor_Event*)event;
172 Eio_Model_Data *priv = data; 172 Eio_Model_Data *priv = data;
@@ -185,11 +185,11 @@ _emodel_evt_deleted_ecore_cb(void *data EINA_UNUSED, int type EINA_UNUSED, void
185 185
186 if (cur) 186 if (cur)
187 { 187 {
188 Emodel_Children_Event cevt; 188 Efl_Model_Children_Event cevt;
189 cevt.index = i; 189 cevt.index = i;
190 cevt.child = cur->data; 190 cevt.child = cur->data;
191 191
192 eo_do(priv->obj, eo_event_callback_call(EMODEL_EVENT_CHILD_REMOVED, &cevt)); 192 eo_do(priv->obj, eo_event_callback_call(EFL_MODEL_BASE_EVENT_CHILD_REMOVED, &cevt));
193 193
194 priv->children_list = eina_list_remove_list(priv->children_list, cur); 194 priv->children_list = eina_list_remove_list(priv->children_list, cur);
195 eo_unref(cevt.child); 195 eo_unref(cevt.child);
@@ -249,8 +249,8 @@ _eio_error_unlink_cb(void *data EINA_UNUSED, Eio_File *handler EINA_UNUSED, int
249/** 249/**
250 * Interfaces impl. 250 * Interfaces impl.
251 */ 251 */
252static Emodel_Load_Status 252static Efl_Model_Load_Status
253_eio_model_emodel_properties_get(Eo *obj EINA_UNUSED, 253_eio_model_efl_model_base_properties_get(Eo *obj EINA_UNUSED,
254 Eio_Model_Data *_pd, Eina_Array * const* properties) 254 Eio_Model_Data *_pd, Eina_Array * const* properties)
255{ 255{
256 Eio_Model_Data *priv = _pd; 256 Eio_Model_Data *priv = _pd;
@@ -266,15 +266,15 @@ _eio_model_emodel_properties_get(Eo *obj EINA_UNUSED,
266/** 266/**
267 * Property Get 267 * Property Get
268 */ 268 */
269static Emodel_Load_Status 269static Efl_Model_Load_Status
270_eio_model_emodel_property_get(Eo *obj EINA_UNUSED, Eio_Model_Data *priv, const char *property, const Eina_Value **value) 270_eio_model_efl_model_base_property_get(Eo *obj EINA_UNUSED, Eio_Model_Data *priv, const char *property, const Eina_Value **value)
271{ 271{
272 unsigned int i; 272 unsigned int i;
273 EINA_SAFETY_ON_NULL_RETURN_VAL(property, EMODEL_LOAD_STATUS_ERROR); 273 EINA_SAFETY_ON_NULL_RETURN_VAL(property, EFL_MODEL_LOAD_STATUS_ERROR);
274 EINA_SAFETY_ON_NULL_RETURN_VAL(priv, EMODEL_LOAD_STATUS_ERROR); 274 EINA_SAFETY_ON_NULL_RETURN_VAL(priv, EFL_MODEL_LOAD_STATUS_ERROR);
275 275
276 *value = NULL; 276 *value = NULL;
277 if (priv->load.status & EMODEL_LOAD_STATUS_LOADED_PROPERTIES) 277 if (priv->load.status & EFL_MODEL_LOAD_STATUS_LOADED_PROPERTIES)
278 { 278 {
279 for (i = 0; i < EIO_MODEL_PROP_LAST; ++i) 279 for (i = 0; i < EIO_MODEL_PROP_LAST; ++i)
280 { 280 {
@@ -294,8 +294,8 @@ _eio_model_emodel_property_get(Eo *obj EINA_UNUSED, Eio_Model_Data *priv, const
294/** 294/**
295 * Property Set 295 * Property Set
296 */ 296 */
297static Emodel_Load_Status 297static Efl_Model_Load_Status
298_eio_model_emodel_property_set(Eo *obj EINA_UNUSED, Eio_Model_Data *priv, const char * property, const Eina_Value *value) 298_eio_model_efl_model_base_property_set(Eo *obj EINA_UNUSED, Eio_Model_Data *priv, const char * property, const Eina_Value *value)
299{ 299{
300 char *dest; 300 char *dest;
301 301
@@ -318,10 +318,10 @@ _eio_model_emodel_property_set(Eo *obj EINA_UNUSED, Eio_Model_Data *priv, const
318 318
319 _eio_move_done_cb(priv, NULL); 319 _eio_move_done_cb(priv, NULL);
320 320
321 if (priv->load_pending & EMODEL_LOAD_STATUS_LOADED_PROPERTIES) 321 if (priv->load_pending & EFL_MODEL_LOAD_STATUS_LOADED_PROPERTIES)
322 _eio_model_emodel_properties_load(obj, priv); 322 _eio_model_efl_model_base_properties_load(obj, priv);
323 else if (priv->load_pending & EMODEL_LOAD_STATUS_LOADED_CHILDREN) 323 else if (priv->load_pending & EFL_MODEL_LOAD_STATUS_LOADED_CHILDREN)
324 _eio_model_emodel_children_load(obj, priv); 324 _eio_model_efl_model_base_children_load(obj, priv);
325 325
326 return priv->load.status; 326 return priv->load.status;
327 } 327 }
@@ -335,8 +335,8 @@ _eio_model_emodel_property_set(Eo *obj EINA_UNUSED, Eio_Model_Data *priv, const
335/** 335/**
336 * Children Count Get 336 * Children Count Get
337 */ 337 */
338static Emodel_Load_Status 338static Efl_Model_Load_Status
339_eio_model_emodel_children_count_get(Eo *obj EINA_UNUSED, Eio_Model_Data *priv, unsigned int *children_count) 339_eio_model_efl_model_base_children_count_get(Eo *obj EINA_UNUSED, Eio_Model_Data *priv, unsigned int *children_count)
340{ 340{
341 /**< eina_list_count returns 'unsigned int' */ 341 /**< eina_list_count returns 'unsigned int' */
342 *children_count = eina_list_count(priv->children_list); 342 *children_count = eina_list_count(priv->children_list);
@@ -347,24 +347,24 @@ _eio_model_emodel_children_count_get(Eo *obj EINA_UNUSED, Eio_Model_Data *priv,
347 * Properties Load 347 * Properties Load
348 */ 348 */
349static void 349static void
350_eio_model_emodel_properties_load(Eo *obj EINA_UNUSED, Eio_Model_Data *priv) 350_eio_model_efl_model_base_properties_load(Eo *obj EINA_UNUSED, Eio_Model_Data *priv)
351{ 351{
352 if (priv->path == NULL) 352 if (priv->path == NULL)
353 { 353 {
354 priv->load_pending |= EMODEL_LOAD_STATUS_LOADED_PROPERTIES; 354 priv->load_pending |= EFL_MODEL_LOAD_STATUS_LOADED_PROPERTIES;
355 return; 355 return;
356 } 356 }
357 priv->load_pending &= ~EMODEL_LOAD_STATUS_LOADED_PROPERTIES; 357 priv->load_pending &= ~EFL_MODEL_LOAD_STATUS_LOADED_PROPERTIES;
358 358
359 if (!(priv->load.status & (EMODEL_LOAD_STATUS_LOADED_PROPERTIES | EMODEL_LOAD_STATUS_LOADING_PROPERTIES))) 359 if (!(priv->load.status & (EFL_MODEL_LOAD_STATUS_LOADED_PROPERTIES | EFL_MODEL_LOAD_STATUS_LOADING_PROPERTIES)))
360 { 360 {
361 _load_set(priv, EMODEL_LOAD_STATUS_LOADING_PROPERTIES); 361 _load_set(priv, EFL_MODEL_LOAD_STATUS_LOADING_PROPERTIES);
362 priv->file = eio_file_direct_stat(priv->path, _eio_stat_done_cb, _eio_error_cb, priv); 362 priv->file = eio_file_direct_stat(priv->path, _eio_stat_done_cb, _eio_error_cb, priv);
363 } 363 }
364} 364}
365 365
366static void 366static void
367_eio_model_emodel_monitor_add(Eio_Model_Data *priv) 367_eio_model_efl_model_base_monitor_add(Eio_Model_Data *priv)
368{ 368{
369 if (!priv->monitor) 369 if (!priv->monitor)
370 { 370 {
@@ -373,11 +373,11 @@ _eio_model_emodel_monitor_add(Eio_Model_Data *priv)
373 373
374 for (i = 0; priv->mon.mon_event_child_add[i] != EIO_MONITOR_ERROR ; ++i) 374 for (i = 0; priv->mon.mon_event_child_add[i] != EIO_MONITOR_ERROR ; ++i)
375 priv->mon.ecore_child_add_handler[i] = 375 priv->mon.ecore_child_add_handler[i] =
376 ecore_event_handler_add(priv->mon.mon_event_child_add[i], _emodel_evt_added_ecore_cb, priv); 376 ecore_event_handler_add(priv->mon.mon_event_child_add[i], _efl_model_evt_added_ecore_cb, priv);
377 377
378 for (i = 0; priv->mon.mon_event_child_del[i] != EIO_MONITOR_ERROR ; ++i) 378 for (i = 0; priv->mon.mon_event_child_del[i] != EIO_MONITOR_ERROR ; ++i)
379 priv->mon.ecore_child_add_handler[i] = 379 priv->mon.ecore_child_add_handler[i] =
380 ecore_event_handler_add(priv->mon.mon_event_child_del[i], _emodel_evt_deleted_ecore_cb, priv); 380 ecore_event_handler_add(priv->mon.mon_event_child_del[i], _efl_model_evt_deleted_ecore_cb, priv);
381 } 381 }
382} 382}
383 383
@@ -421,9 +421,9 @@ _eio_done_children_load_cb(void *data, Eio_File *handler EINA_UNUSED)
421 EINA_SAFETY_ON_NULL_RETURN(priv); 421 EINA_SAFETY_ON_NULL_RETURN(priv);
422 422
423 count = eina_list_count(priv->children_list); 423 count = eina_list_count(priv->children_list);
424 _load_set(priv, EMODEL_LOAD_STATUS_LOADED_CHILDREN); 424 _load_set(priv, EFL_MODEL_LOAD_STATUS_LOADED_CHILDREN);
425 425
426 eo_do(priv->obj, eo_event_callback_call(EMODEL_EVENT_CHILDREN_COUNT_CHANGED, &count)); 426 eo_do(priv->obj, eo_event_callback_call(EFL_MODEL_BASE_EVENT_CHILDREN_COUNT_CHANGED, &count));
427} 427}
428 428
429static void 429static void
@@ -437,29 +437,29 @@ _eio_error_children_load_cb(void *data, Eio_File *handler EINA_UNUSED, int error
437 EINA_LIST_FREE(priv->children_list, child) 437 EINA_LIST_FREE(priv->children_list, child)
438 eo_unref(child); 438 eo_unref(child);
439 439
440 _load_set(priv, EMODEL_LOAD_STATUS_LOADED_CHILDREN); 440 _load_set(priv, EFL_MODEL_LOAD_STATUS_LOADED_CHILDREN);
441} 441}
442 442
443/** 443/**
444 * Children Load 444 * Children Load
445 */ 445 */
446static void 446static void
447_eio_model_emodel_children_load(Eo *obj EINA_UNUSED, Eio_Model_Data *priv) 447_eio_model_efl_model_base_children_load(Eo *obj EINA_UNUSED, Eio_Model_Data *priv)
448{ 448{
449 if (priv->path == NULL) 449 if (priv->path == NULL)
450 { 450 {
451 priv->load_pending |= EMODEL_LOAD_STATUS_LOADED_CHILDREN; 451 priv->load_pending |= EFL_MODEL_LOAD_STATUS_LOADED_CHILDREN;
452 return; 452 return;
453 } 453 }
454 454
455 priv->load_pending &= ~EMODEL_LOAD_STATUS_LOADED_CHILDREN; 455 priv->load_pending &= ~EFL_MODEL_LOAD_STATUS_LOADED_CHILDREN;
456 456
457 if (priv->children_list == NULL && priv->is_dir && 457 if (priv->children_list == NULL && priv->is_dir &&
458 !(priv->load.status & (EMODEL_LOAD_STATUS_LOADED_CHILDREN | EMODEL_LOAD_STATUS_LOADING_CHILDREN))) 458 !(priv->load.status & (EFL_MODEL_LOAD_STATUS_LOADED_CHILDREN | EFL_MODEL_LOAD_STATUS_LOADING_CHILDREN)))
459 { 459 {
460 _eio_model_emodel_monitor_add(priv); 460 _eio_model_efl_model_base_monitor_add(priv);
461 461
462 _load_set(priv, EMODEL_LOAD_STATUS_LOADING_CHILDREN); 462 _load_set(priv, EFL_MODEL_LOAD_STATUS_LOADING_CHILDREN);
463 eio_file_direct_ls(priv->path, _eio_filter_children_load_cb, 463 eio_file_direct_ls(priv->path, _eio_filter_children_load_cb,
464 _eio_main_children_load_cb, _eio_done_children_load_cb, 464 _eio_main_children_load_cb, _eio_done_children_load_cb,
465 _eio_error_children_load_cb, priv); 465 _eio_error_children_load_cb, priv);
@@ -470,17 +470,17 @@ _eio_model_emodel_children_load(Eo *obj EINA_UNUSED, Eio_Model_Data *priv)
470 * Load 470 * Load
471 */ 471 */
472static void 472static void
473_eio_model_emodel_load(Eo *obj, Eio_Model_Data *priv) 473_eio_model_efl_model_base_load(Eo *obj, Eio_Model_Data *priv)
474{ 474{
475 priv->load_pending |= EMODEL_LOAD_STATUS_LOADED_CHILDREN; 475 priv->load_pending |= EFL_MODEL_LOAD_STATUS_LOADED_CHILDREN;
476 _eio_model_emodel_properties_load(obj, priv); 476 _eio_model_efl_model_base_properties_load(obj, priv);
477} 477}
478 478
479/** 479/**
480 * Load status get 480 * Load status get
481 */ 481 */
482static Emodel_Load_Status 482static Efl_Model_Load_Status
483_eio_model_emodel_load_status_get(Eo *obj EINA_UNUSED, Eio_Model_Data *priv) 483_eio_model_efl_model_base_load_status_get(Eo *obj EINA_UNUSED, Eio_Model_Data *priv)
484{ 484{
485 return priv->load.status; 485 return priv->load.status;
486} 486}
@@ -489,9 +489,9 @@ _eio_model_emodel_load_status_get(Eo *obj EINA_UNUSED, Eio_Model_Data *priv)
489 * Unload 489 * Unload
490 */ 490 */
491static void 491static void
492_eio_model_emodel_unload(Eo *obj EINA_UNUSED, Eio_Model_Data *priv) 492_eio_model_efl_model_base_unload(Eo *obj EINA_UNUSED, Eio_Model_Data *priv)
493{ 493{
494 if (!(priv->load.status & EMODEL_LOAD_STATUS_UNLOADED)) 494 if (!(priv->load.status & EFL_MODEL_LOAD_STATUS_UNLOADED))
495 { 495 {
496 Eo *child; 496 Eo *child;
497 EINA_LIST_FREE(priv->children_list, child) 497 EINA_LIST_FREE(priv->children_list, child)
@@ -499,7 +499,7 @@ _eio_model_emodel_unload(Eo *obj EINA_UNUSED, Eio_Model_Data *priv)
499 eo_unref(child); 499 eo_unref(child);
500 } 500 }
501 501
502 _load_set(priv, EMODEL_LOAD_STATUS_UNLOADED); 502 _load_set(priv, EFL_MODEL_LOAD_STATUS_UNLOADED);
503 } 503 }
504} 504}
505 505
@@ -514,13 +514,13 @@ _eio_model_children_filter_set(Eo *obj EINA_UNUSED, Eio_Model_Data *priv, Eio_Fi
514 * Child Add 514 * Child Add
515 */ 515 */
516static Eo * 516static Eo *
517_eio_model_emodel_child_add(Eo *obj EINA_UNUSED, Eio_Model_Data *priv EINA_UNUSED) 517_eio_model_efl_model_base_child_add(Eo *obj EINA_UNUSED, Eio_Model_Data *priv EINA_UNUSED)
518{ 518{
519 return eo_add(EIO_MODEL_CLASS, obj); 519 return eo_add(EIO_MODEL_CLASS, obj);
520} 520}
521 521
522static void 522static void
523_eio_model_emodel_child_del_stat(void* data, Eio_File* handler EINA_UNUSED, const Eina_Stat* stat) 523_eio_model_efl_model_base_child_del_stat(void* data, Eio_File* handler EINA_UNUSED, const Eina_Stat* stat)
524{ 524{
525 Eo* child = data; 525 Eo* child = data;
526 Eio_Model_Data *child_priv = eo_data_scope_get(child, MY_CLASS); 526 Eio_Model_Data *child_priv = eo_data_scope_get(child, MY_CLASS);
@@ -539,11 +539,11 @@ _eio_model_emodel_child_del_stat(void* data, Eio_File* handler EINA_UNUSED, cons
539/** 539/**
540 * Child Remove 540 * Child Remove
541 */ 541 */
542static Emodel_Load_Status 542static Efl_Model_Load_Status
543_eio_model_emodel_child_del(Eo *obj EINA_UNUSED, Eio_Model_Data *priv, Eo *child) 543_eio_model_efl_model_base_child_del(Eo *obj EINA_UNUSED, Eio_Model_Data *priv, Eo *child)
544{ 544{
545 Eio_Model_Data *child_priv; 545 Eio_Model_Data *child_priv;
546 EINA_SAFETY_ON_NULL_RETURN_VAL(child, EMODEL_LOAD_STATUS_ERROR); 546 EINA_SAFETY_ON_NULL_RETURN_VAL(child, EFL_MODEL_LOAD_STATUS_ERROR);
547 547
548 if (priv->children_list != NULL) 548 if (priv->children_list != NULL)
549 { 549 {
@@ -551,10 +551,10 @@ _eio_model_emodel_child_del(Eo *obj EINA_UNUSED, Eio_Model_Data *priv, Eo *child
551 } 551 }
552 552
553 child_priv = eo_data_scope_get(child, MY_CLASS); 553 child_priv = eo_data_scope_get(child, MY_CLASS);
554 EINA_SAFETY_ON_NULL_RETURN_VAL(child_priv, EMODEL_LOAD_STATUS_ERROR); 554 EINA_SAFETY_ON_NULL_RETURN_VAL(child_priv, EFL_MODEL_LOAD_STATUS_ERROR);
555 555
556 eio_file_direct_stat(child_priv->path, 556 eio_file_direct_stat(child_priv->path,
557 &_eio_model_emodel_child_del_stat, 557 &_eio_model_efl_model_base_child_del_stat,
558 &_eio_error_unlink_cb, 558 &_eio_error_unlink_cb,
559 child); 559 child);
560 eo_ref(child); 560 eo_ref(child);
@@ -564,8 +564,8 @@ _eio_model_emodel_child_del(Eo *obj EINA_UNUSED, Eio_Model_Data *priv, Eo *child
564/** 564/**
565 * Children Slice Get 565 * Children Slice Get
566 */ 566 */
567static Emodel_Load_Status 567static Efl_Model_Load_Status
568_eio_model_emodel_children_slice_get(Eo *obj EINA_UNUSED, Eio_Model_Data *priv, 568_eio_model_efl_model_base_children_slice_get(Eo *obj EINA_UNUSED, Eio_Model_Data *priv,
569 unsigned start, unsigned count, Eina_Accessor **children_accessor) 569 unsigned start, unsigned count, Eina_Accessor **children_accessor)
570{ 570{
571 Eo *child; 571 Eo *child;
@@ -576,7 +576,7 @@ _eio_model_emodel_children_slice_get(Eo *obj EINA_UNUSED, Eio_Model_Data *priv,
576 * and parameter is set to NULL. 576 * and parameter is set to NULL.
577 */ 577 */
578 578
579 if (!(priv->load.status & EMODEL_LOAD_STATUS_LOADED_CHILDREN)) 579 if (!(priv->load.status & EFL_MODEL_LOAD_STATUS_LOADED_CHILDREN))
580 { 580 {
581 /** 581 /**
582 * Status should be in either unloaded state or unitialized 582 * Status should be in either unloaded state or unitialized
@@ -640,7 +640,7 @@ _eio_model_eo_base_constructor(Eo *obj, Eio_Model_Data *priv)
640 priv->properties_value[EIO_MODEL_PROP_IS_LNK] = eina_value_new(EINA_VALUE_TYPE_INT); 640 priv->properties_value[EIO_MODEL_PROP_IS_LNK] = eina_value_new(EINA_VALUE_TYPE_INT);
641 priv->properties_value[EIO_MODEL_PROP_SIZE] = eina_value_new(EINA_VALUE_TYPE_INT64); 641 priv->properties_value[EIO_MODEL_PROP_SIZE] = eina_value_new(EINA_VALUE_TYPE_INT64);
642 642
643 priv->load.status = EMODEL_LOAD_STATUS_UNLOADED; 643 priv->load.status = EFL_MODEL_LOAD_STATUS_UNLOADED;
644 priv->monitor = NULL; 644 priv->monitor = NULL;
645} 645}
646 646
diff --git a/src/lib/eio/eio_model.eo b/src/lib/eio/eio_model.eo
index 83e4aa3b8a..67890fa1a2 100644
--- a/src/lib/eio/eio_model.eo
+++ b/src/lib/eio/eio_model.eo
@@ -1,4 +1,4 @@
1class Eio.Model (Eo.Base, Emodel) 1class Eio.Model (Eo.Base, Efl.Model.Base)
2{ 2{
3 legacy_prefix: null; 3 legacy_prefix: null;
4 methods { 4 methods {
@@ -33,17 +33,17 @@ class Eio.Model (Eo.Base, Emodel)
33 implements { 33 implements {
34 Eo.Base.constructor; 34 Eo.Base.constructor;
35 Eo.Base.destructor; 35 Eo.Base.destructor;
36 Emodel.properties.get; 36 Efl.Model.Base.properties.get;
37 Emodel.properties_load; 37 Efl.Model.Base.properties_load;
38 Emodel.property.set; 38 Efl.Model.Base.property.set;
39 Emodel.property.get; 39 Efl.Model.Base.property.get;
40 Emodel.load; 40 Efl.Model.Base.load;
41 Emodel.load_status.get; 41 Efl.Model.Base.load_status.get;
42 Emodel.unload; 42 Efl.Model.Base.unload;
43 Emodel.child_add; 43 Efl.Model.Base.child_add;
44 Emodel.child_del; 44 Efl.Model.Base.child_del;
45 Emodel.children_slice.get; 45 Efl.Model.Base.children_slice.get;
46 Emodel.children_count.get; 46 Efl.Model.Base.children_count.get;
47 Emodel.children_load; 47 Efl.Model.Base.children_load;
48 } 48 }
49} 49}
diff --git a/src/lib/eio/eio_model.h b/src/lib/eio/eio_model.h
index e0510702a7..1c46d77c45 100644
--- a/src/lib/eio/eio_model.h
+++ b/src/lib/eio/eio_model.h
@@ -30,7 +30,7 @@
30#define _EMODEL_EIO_H 30#define _EMODEL_EIO_H
31 31
32#include <Eo.h> 32#include <Eo.h>
33#include <Emodel.h> 33#include <Efl.h>
34#include <Eio.h> 34#include <Eio.h>
35 35
36#ifdef __cplusplus 36#ifdef __cplusplus
diff --git a/src/lib/eio/eio_model_private.h b/src/lib/eio/eio_model_private.h
index e88cd0fd0d..0aed0d6a4a 100644
--- a/src/lib/eio/eio_model_private.h
+++ b/src/lib/eio/eio_model_private.h
@@ -40,7 +40,7 @@ struct _Eio_Model_Data
40 char *path; 40 char *path;
41 Eina_Array *properties_name; 41 Eina_Array *properties_name;
42 Eina_Value *properties_value[EIO_MODEL_PROP_LAST]; 42 Eina_Value *properties_value[EIO_MODEL_PROP_LAST];
43 Emodel_Load load; 43 Efl_Model_Load load;
44 int load_pending; 44 int load_pending;
45 Eina_List *children_list; 45 Eina_List *children_list;
46 /**< EIO data */ 46 /**< EIO data */
diff --git a/src/lib/emodel/Emodel.h b/src/lib/emodel/Emodel.h
deleted file mode 100644
index 43c0b9c9b9..0000000000
--- a/src/lib/emodel/Emodel.h
+++ /dev/null
@@ -1,127 +0,0 @@
1/**
2 @brief Emodel Library Public API Calls
3 These routines are used for MVC (Model View Controller) Library interaction.
4 */
5/**
6 * @page emodel_main Emodel
7 *
8 * @date 2014 (created)
9 * @section toc Table of Contents
10 *
11 * @li @ref emodel_main_intro
12 * @li @ref emodel_main_intro_example
13 *
14 * @section emodel_main_intro Introduction
15 *
16 * The Emodel(model) generic object system for Emodel View Controller.
17 *
18 * @section emodel_main_work How does Emodel work?
19 *
20 * The Model notifies Views and Controllers when there is a change in its state.
21 * The other way around is also true and the Model can be passive and be poolled
22 * for update rather than generating output representations.
23 *
24 * Concrete objects can implement functionalities by overriding Emodel's API, abstracting its complexities from
25 * applications that can keep focus on higher level implementation.
26 *
27 * Examples of concrete implementations that can make use Emodel:
28 *
29 * Filesystem and I/O operations;
30 * Database management;
31 * GUI forms, lists and trees.
32 *
33 * Application code tends to be small in number of lines,
34 * more simple and code readability is improved.
35 *
36 * Emodel use EO Events. Views and Controllers must register
37 * in events to be able to recieve notifications about state changes in Emodel.
38 * Some of currently available events are:
39 *
40 * EMODEL_EVENT_LOAD_STATUS
41 * EMODEL_EVENT_PROPERTIES_CHANGED
42 * EMODEL_EVENT_CHILD_ADDED
43 * EMODEL_EVENT_CHILD_REMOVED
44 * EMODEL_EVENT_CHILDREN_COUNT_CHANGED
45 *
46 * Example code using Emodel_Eio that returns the number of files in '/tmp' directory:
47 *
48 * @code
49 * static Eina_Bool
50 * _children_count_cb(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info)
51 * {
52 * size_t *len = event_info;
53 * fprintf(stdout, "Children count len=%lu\n", *len);
54 * return EINA_TRUE;
55 * }
56 *
57 * int
58 * main(int argc, const char **argv)
59 * {
60 * size_t total;
61 * Eo *model;
62 * if(!ecore_init())
63 * {
64 * fprintf(stderr, "ERROR: Cannot init Ecore!\n");
65 * return 1;
66 * }
67 * if(!eio_init())
68 * {
69 * fprintf(stderr, "ERROR: Cannot init Eio!\n");
70 * return 1;
71 * }
72 *
73 * model = eo_add_custom(EIO_MODEL_CLASS, NULL, eio_model_constructor("/tmp"));
74 * eo_do(model, eo_event_callback_add(EMODEL_EVENT_CHILDREN_COUNT_CHANGED, _children_count_cb, NULL));
75 * eo_do(model, emodel_children_count_get(&total));
76 * fprintf(stdout, "total=%lu\n", total);
77 *
78 * ecore_main_loop_begin();
79 * eo_unref(model);
80 * eio_shutdown();
81 * ecore_shutdown();
82 * return 0;
83 * }
84 * @endcode
85 *
86 * In previous example the concrete Emodel_Eio counts, asynchronously, the number of files in given directory,
87 * emodel_children_count_get() returns into 'total' pointer the last known number of children. In the meantime
88 * when background count is finished _children_count_cb() is invoked receiving the number of files as event_info data.
89 * This is achieved by registering the Model as EMODEL_EVENT_CHILDREN_COUNT_CHANGED event listener and every time
90 * the count (number of children) changes, the event is disptached to listeners.
91 *
92 * The principles may remain the same for different events and the logic remains.
93 *
94 * @li @ref emodel_main_intro_example
95 *
96 * @include emodel_test_file.c
97 *
98 * Recommended reading:
99 *
100 * @li @ref Eo, where you'll understand how Eo Events work.
101 * @li @ref Eio, where you'll find EFL Eio implementation and interfaces.
102 * @li @ref Emodel_Eio, the concrete EIO implementation using both Emodel and Eio.
103 * @li @ref Ecore, You'll get more information about I/O filesystem events.
104 *
105 * @defgroup Emodel
106 *
107 * @addtogroup Emodel
108 * @{
109 */
110
111#ifndef _EMODEL_H
112#define _EMODEL_H
113
114#include <Efl_Config.h>
115#include <Eo.h>
116#include <Emodel_Common.h>
117
118#ifdef __cplusplus
119extern "C" {
120#endif
121
122#include <emodel.eo.h>
123
124#ifdef __cplusplus
125}
126#endif
127#endif //_EMODEL_H
diff --git a/src/lib/emodel/Emodel_Common.h b/src/lib/emodel/Emodel_Common.h
deleted file mode 100644
index 2f2effc6d3..0000000000
--- a/src/lib/emodel/Emodel_Common.h
+++ /dev/null
@@ -1,92 +0,0 @@
1#ifndef _EMODEL_COMMON_H
2#define _EMODEL_COMMON_H
3
4#ifdef __cplusplus
5extern "C" {
6#endif
7
8/**
9 * @enum _Emodel_Load_Status
10 * XXX/TODO/FIXME: Remove this enum (and possibly other data) from here
11 * as soon as eolian translates these data types in .eo's.
12 */
13enum _Emodel_Load_Status
14 {
15 EMODEL_LOAD_STATUS_ERROR = 0,
16 EMODEL_LOAD_STATUS_LOADING_PROPERTIES = (1 << 0),
17 EMODEL_LOAD_STATUS_LOADING_CHILDREN = (1 << 1),
18 EMODEL_LOAD_STATUS_LOADING = (1 << 0) | (1 << 1),
19
20 EMODEL_LOAD_STATUS_LOADED_PROPERTIES = (1 << 2),
21 EMODEL_LOAD_STATUS_LOADED_CHILDREN = (1 << 3),
22 EMODEL_LOAD_STATUS_LOADED = (1 << 2) | (1 << 3),
23
24 EMODEL_LOAD_STATUS_UNLOADING = (1 << 4),
25 EMODEL_LOAD_STATUS_UNLOADED = (1 << 5)
26 };
27/**
28 * @typedef Emodel_Load_Status
29 */
30typedef enum _Emodel_Load_Status Emodel_Load_Status;
31
32/**
33 * @struct _Emodel_Load
34 * Structure to hold Emodel_Load_Status enum
35 * (and possible other data) to avoid ABI break.
36 */
37struct _Emodel_Load
38 {
39 Emodel_Load_Status status;
40 /* add more data below here if necessary */
41 };
42
43/**
44 * @typedef Emodel_Load
45 */
46typedef struct _Emodel_Load Emodel_Load;
47
48/**
49 * @struct _Emodel_Property_Event
50 */
51struct _Emodel_Property_Event
52{
53 const Eina_Array *changed_properties; /**< array of property name */
54 const Eina_Array *invalidated_properties; /**< array of property name */
55};
56
57/**
58 * @typedef Emodel_Property_Event
59 */
60typedef struct _Emodel_Property_Event Emodel_Property_Event;
61
62/**
63 * @struct _Emodel_Children_Event
64 * Every time a child id added the event
65 * EMODEL_EVENT_CHILD_ADDED is dispatched
66 * passing along this structure.
67 */
68struct _Emodel_Children_Event
69{
70 Eo *child; /**< child, for child_add */
71 /**
72 * index is a hint and is intended
73 * to provide a way for applications
74 * to control/know children relative
75 * positions through listings.
76 *
77 * NOTE: If listing is performed asynchronously
78 * exact order may not be guaranteed.
79 */
80 unsigned int index;
81};
82
83/**
84 * @struct Emodel_Children_Event
85 */
86typedef struct _Emodel_Children_Event Emodel_Children_Event;
87
88
89#ifdef __cplusplus
90}
91#endif
92#endif
diff --git a/src/lib/emodel/emodel.c b/src/lib/emodel/emodel.c
deleted file mode 100644
index c8df075bc5..0000000000
--- a/src/lib/emodel/emodel.c
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#include "Emodel.h"
6#include "emodel.eo.c"
diff --git a/src/tests/emodel/emodel_test_file.c b/src/tests/eio/eio_model_test_file.c
index e3a3b65530..af5269d033 100644
--- a/src/tests/emodel/emodel_test_file.c
+++ b/src/tests/eio/eio_model_test_file.c
@@ -7,14 +7,14 @@
7#include <Eo.h> 7#include <Eo.h>
8#include <Eio.h> 8#include <Eio.h>
9#include <Ecore.h> 9#include <Ecore.h>
10#include <Emodel.h> 10#include <Efl.h>
11#include <eio_model.h> 11#include <eio_model.h>
12#include <stdio.h> 12#include <stdio.h>
13 13
14#include <check.h> 14#include <check.h>
15 15
16#define EMODEL_TEST_FILENAME_PATH "/tmp" 16#define EFL_MODEL_TEST_FILENAME_PATH "/tmp"
17#define EMODEL_MAX_TEST_CHILDS 16 17#define EFL_MODEL_MAX_TEST_CHILDS 16
18 18
19/** 19/**
20 * The following test works however 20 * The following test works however
@@ -65,46 +65,46 @@ static Eina_Bool
65static Eina_Bool 65static Eina_Bool
66_load_status_cb(void *data EINA_UNUSED, Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info) 66_load_status_cb(void *data EINA_UNUSED, Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info)
67{ 67{
68 Emodel_Load *st = event_info; 68 Efl_Model_Load *st = event_info;
69 printf("Load CHANGE\n"); 69 printf("Load CHANGE\n");
70 70
71 if (st->status & EMODEL_LOAD_STATUS_LOADED_CHILDREN) 71 if (st->status & EFL_MODEL_LOAD_STATUS_LOADED_CHILDREN)
72 printf("Children is Loaded\n"); 72 printf("Children is Loaded\n");
73 73
74 if (st->status & EMODEL_LOAD_STATUS_LOADED_PROPERTIES) 74 if (st->status & EFL_MODEL_LOAD_STATUS_LOADED_PROPERTIES)
75 printf("Properties is Loaded\n"); 75 printf("Properties is Loaded\n");
76 76
77 if ((st->status & EMODEL_LOAD_STATUS_LOADED) == EMODEL_LOAD_STATUS_LOADED) 77 if ((st->status & EFL_MODEL_LOAD_STATUS_LOADED) == EFL_MODEL_LOAD_STATUS_LOADED)
78 { 78 {
79 Eina_Accessor *accessor; 79 Eina_Accessor *accessor;
80 const Eina_Value *value_prop; 80 const Eina_Value *value_prop;
81 Emodel_Load_Status status; 81 Efl_Model_Load_Status status;
82 unsigned int total; 82 unsigned int total;
83 char *str; 83 char *str;
84 84
85 printf("Model is Loaded\n"); 85 printf("Model is Loaded\n");
86 eo_do(obj, status = emodel_property_get("filename", &value_prop)); 86 eo_do(obj, status = efl_model_property_get("filename", &value_prop));
87 str = eina_value_to_string(value_prop); 87 str = eina_value_to_string(value_prop);
88 printf("emodel_loaded filename %s, status=%d\n", str, status); 88 printf("efl_model_loaded filename %s, status=%d\n", str, status);
89 free(str); 89 free(str);
90 90
91 eo_do(obj, status = emodel_property_get("size", &value_prop)); 91 eo_do(obj, status = efl_model_property_get("size", &value_prop));
92 str = eina_value_to_string(value_prop); 92 str = eina_value_to_string(value_prop);
93 printf("emodel_loaded size %s, status=%d\n", str, status); 93 printf("efl_model_loaded size %s, status=%d\n", str, status);
94 free(str); 94 free(str);
95 95
96 eo_do(obj, status = emodel_property_get("mtime", &value_prop)); 96 eo_do(obj, status = efl_model_property_get("mtime", &value_prop));
97 str = eina_value_to_string(value_prop); 97 str = eina_value_to_string(value_prop);
98 printf("emodel_loaded mtime %s, status=%d\n", str, status); 98 printf("efl_model_loaded mtime %s, status=%d\n", str, status);
99 free(str); 99 free(str);
100 100
101 eo_do(obj, emodel_children_count_get(&total)); 101 eo_do(obj, efl_model_children_count_get(&total));
102 printf("emodel_test count %d\n", (int)total); 102 printf("efl_model_test count %d\n", (int)total);
103 103
104 /**< get full list */ 104 /**< get full list */
105 eo_do(obj, status = emodel_children_slice_get(0 ,0 ,(Eina_Accessor **)&accessor)); 105 eo_do(obj, status = efl_model_children_slice_get(0 ,0 ,(Eina_Accessor **)&accessor));
106 eina_accessor_free(accessor); 106 eina_accessor_free(accessor);
107 eo_do(obj, status = emodel_children_slice_get(5 ,5 ,(Eina_Accessor **)&accessor)); 107 eo_do(obj, status = efl_model_children_slice_get(5 ,5 ,(Eina_Accessor **)&accessor));
108 eina_accessor_free(accessor); 108 eina_accessor_free(accessor);
109 ecore_main_loop_quit(); 109 ecore_main_loop_quit();
110 } 110 }
@@ -114,7 +114,7 @@ _load_status_cb(void *data EINA_UNUSED, Eo *obj, const Eo_Event_Description *des
114static Eina_Bool 114static Eina_Bool
115_properties_change_cb(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info) 115_properties_change_cb(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info)
116{ 116{
117 const Emodel_Property_Event *evt = (Emodel_Property_Event *)event_info; 117 const Efl_Model_Property_Event *evt = (Efl_Model_Property_Event *)event_info;
118 const char *prop; 118 const char *prop;
119 Eina_Array_Iterator it; 119 Eina_Array_Iterator it;
120 unsigned int i; 120 unsigned int i;
@@ -144,17 +144,17 @@ _children_count_cb(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_D
144 fprintf(stdout, "Children count number=%d\n", *len); 144 fprintf(stdout, "Children count number=%d\n", *len);
145 reqs.children = *len; 145 reqs.children = *len;
146 146
147 eo_do(obj, emodel_children_count_get(&total)); 147 eo_do(obj, efl_model_children_count_get(&total));
148 fprintf(stdout, "New total children count number=%d\n", *len); 148 fprintf(stdout, "New total children count number=%d\n", *len);
149 149
150 return EINA_TRUE; 150 return EINA_TRUE;
151} 151}
152 152
153START_TEST(emodel_test_test_file) 153START_TEST(eio_model_test_test_file)
154{ 154{
155 Eo *filemodel = NULL; 155 Eo *filemodel = NULL;
156 const Eina_Value *value_prop; 156 const Eina_Value *value_prop;
157 Emodel_Load_Status status; 157 Efl_Model_Load_Status status;
158#ifdef _RUN_LOCAL_TEST 158#ifdef _RUN_LOCAL_TEST
159 Eina_Value nameset_value; 159 Eina_Value nameset_value;
160#endif 160#endif
@@ -169,25 +169,25 @@ START_TEST(emodel_test_test_file)
169 fail_if(!ecore_init(), "ERROR: Cannot init Ecore!\n"); 169 fail_if(!ecore_init(), "ERROR: Cannot init Ecore!\n");
170 fail_if(!eio_init(), "ERROR: Cannot init EIO!\n"); 170 fail_if(!eio_init(), "ERROR: Cannot init EIO!\n");
171 171
172 filemodel = eo_add(EIO_MODEL_CLASS, NULL, eio_model_path_set(EMODEL_TEST_FILENAME_PATH)); 172 filemodel = eo_add(EIO_MODEL_CLASS, NULL, eio_model_path_set(EFL_MODEL_TEST_FILENAME_PATH));
173 fail_if(!filemodel, "ERROR: Cannot init model!\n"); 173 fail_if(!filemodel, "ERROR: Cannot init model!\n");
174 174
175 eo_do(filemodel, eo_event_callback_add(EMODEL_EVENT_LOAD_STATUS, _load_status_cb, NULL)); 175 eo_do(filemodel, eo_event_callback_add(EFL_MODEL_BASE_EVENT_LOAD_STATUS, _load_status_cb, NULL));
176 eo_do(filemodel, eo_event_callback_add(EMODEL_EVENT_PROPERTIES_CHANGED, _properties_change_cb, NULL)); 176 eo_do(filemodel, eo_event_callback_add(EFL_MODEL_BASE_EVENT_PROPERTIES_CHANGED, _properties_change_cb, NULL));
177 eo_do(filemodel, eo_event_callback_add(EMODEL_EVENT_CHILDREN_COUNT_CHANGED, _children_count_cb, NULL)); 177 eo_do(filemodel, eo_event_callback_add(EFL_MODEL_BASE_EVENT_CHILDREN_COUNT_CHANGED, _children_count_cb, NULL));
178 178
179 eo_do(filemodel, emodel_load()); 179 eo_do(filemodel, efl_model_load());
180 180
181 handler = ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, exit_func, NULL); 181 handler = ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, exit_func, NULL);
182 182
183 eo_do(filemodel, status = emodel_property_get("filename", &value_prop)); 183 eo_do(filemodel, status = efl_model_property_get("filename", &value_prop));
184 str = eina_value_to_string(value_prop); 184 str = eina_value_to_string(value_prop);
185 printf("emodel_test filename %s, load status %d\n", str, status); 185 printf("efl_model_test filename %s, load status %d\n", str, status);
186 186
187 free(str); 187 free(str);
188 188
189 i = 0; 189 i = 0;
190 eo_do(filemodel, emodel_properties_get(&properties_list)); 190 eo_do(filemodel, efl_model_properties_get(&properties_list));
191 EINA_ARRAY_ITER_NEXT(properties_list, i, str, iterator) 191 EINA_ARRAY_ITER_NEXT(properties_list, i, str, iterator)
192 { 192 {
193 fprintf(stdout, "Returned property list %d: %s\n", i, str); 193 fprintf(stdout, "Returned property list %d: %s\n", i, str);
@@ -210,10 +210,10 @@ START_TEST(emodel_test_test_file)
210#ifdef _RUN_LOCAL_TEST 210#ifdef _RUN_LOCAL_TEST
211 eina_value_setup(&nameset_value, EINA_VALUE_TYPE_STRING); 211 eina_value_setup(&nameset_value, EINA_VALUE_TYPE_STRING);
212 eina_value_setup(&value_prop, EINA_VALUE_TYPE_STRING); 212 eina_value_setup(&value_prop, EINA_VALUE_TYPE_STRING);
213 eina_value_set(&nameset_value, "/tmp/emodel_test"); 213 eina_value_set(&nameset_value, "/tmp/efl_model_test");
214 eo_do(filemodel, emodel_property_set("path", &nameset_value)); 214 eo_do(filemodel, efl_model_property_set("path", &nameset_value));
215 eina_value_flush(&nameset_value); 215 eina_value_flush(&nameset_value);
216 eo_do(filemodel, status = emodel_property_get("path", &value_prop)); 216 eo_do(filemodel, status = efl_model_property_get("path", &value_prop));
217#endif 217#endif
218 218
219 sleep(1); /**< EIO is asynchrounous so I must give some time for deletions to execute */ 219 sleep(1); /**< EIO is asynchrounous so I must give some time for deletions to execute */
@@ -225,8 +225,8 @@ START_TEST(emodel_test_test_file)
225END_TEST 225END_TEST
226 226
227void 227void
228emodel_test_file(TCase *tc) 228eio_model_test_file(TCase *tc)
229{ 229{
230 tcase_add_test(tc, emodel_test_test_file); 230 tcase_add_test(tc, eio_model_test_test_file);
231} 231}
232 232
diff --git a/src/tests/emodel/emodel_test_monitor_add.c b/src/tests/eio/eio_model_test_monitor_add.c
index ee8bb49021..af95ae8f75 100644
--- a/src/tests/emodel/emodel_test_monitor_add.c
+++ b/src/tests/eio/eio_model_test_monitor_add.c
@@ -7,28 +7,28 @@
7#include <Eo.h> 7#include <Eo.h>
8#include <Eio.h> 8#include <Eio.h>
9#include <Ecore.h> 9#include <Ecore.h>
10#include <Emodel.h> 10#include <Efl.h>
11#include <eio_model.h> 11#include <eio_model.h>
12#include <stdio.h> 12#include <stdio.h>
13 13
14#include <check.h> 14#include <check.h>
15 15
16#define EMODEL_TEST_FILENAME_PATH "/tmp" 16#define EFL_MODEL_TEST_FILENAME_PATH "/tmp"
17 17
18Eina_Bool children_added = EINA_FALSE; 18Eina_Bool children_added = EINA_FALSE;
19 19
20static Eina_Bool 20static Eina_Bool
21_load_monitor_status_cb(void *data, Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info) 21_load_monitor_status_cb(void *data, Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info)
22{ 22{
23 Emodel_Load* st = event_info; 23 Efl_Model_Load* st = event_info;
24 Eo* parent = data; 24 Eo* parent = data;
25 const Eina_Value* value_prop = NULL; 25 const Eina_Value* value_prop = NULL;
26 const char* str = NULL; 26 const char* str = NULL;
27 27
28 if (!(st->status & EMODEL_LOAD_STATUS_LOADED_PROPERTIES)) 28 if (!(st->status & EFL_MODEL_LOAD_STATUS_LOADED_PROPERTIES))
29 return EINA_TRUE; 29 return EINA_TRUE;
30 30
31 eo_do(obj, emodel_property_get("filename", &value_prop)); 31 eo_do(obj, efl_model_property_get("filename", &value_prop));
32 fail_if(!value_prop, "ERROR: Cannot get property!\n"); 32 fail_if(!value_prop, "ERROR: Cannot get property!\n");
33 33
34 str = eina_value_to_string(value_prop); 34 str = eina_value_to_string(value_prop);
@@ -37,9 +37,9 @@ _load_monitor_status_cb(void *data, Eo *obj, const Eo_Event_Description *desc EI
37 if(strcmp(str, "test_file_monitor_add") == 0) 37 if(strcmp(str, "test_file_monitor_add") == 0)
38 { 38 {
39 fprintf(stderr, "is child that we want\n"); 39 fprintf(stderr, "is child that we want\n");
40 eo_do(obj, eo_event_callback_del(EMODEL_EVENT_LOAD_STATUS, _load_monitor_status_cb, data)); 40 eo_do(obj, eo_event_callback_del(EFL_MODEL_BASE_EVENT_LOAD_STATUS, _load_monitor_status_cb, data));
41 children_added = EINA_TRUE; 41 children_added = EINA_TRUE;
42 eo_do(parent, emodel_child_del(obj)); 42 eo_do(parent, efl_model_child_del(obj));
43 ecore_main_loop_quit(); 43 ecore_main_loop_quit();
44 } 44 }
45 45
@@ -49,12 +49,12 @@ _load_monitor_status_cb(void *data, Eo *obj, const Eo_Event_Description *desc EI
49static Eina_Bool 49static Eina_Bool
50_children_added_cb(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info) 50_children_added_cb(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info)
51{ 51{
52 Emodel_Children_Event* evt = event_info; 52 Efl_Model_Children_Event* evt = event_info;
53 if (evt == NULL) 53 if (evt == NULL)
54 return EINA_TRUE; 54 return EINA_TRUE;
55 55
56 eo_do(evt->child, eo_event_callback_add(EMODEL_EVENT_LOAD_STATUS, _load_monitor_status_cb, obj)); 56 eo_do(evt->child, eo_event_callback_add(EFL_MODEL_BASE_EVENT_LOAD_STATUS, _load_monitor_status_cb, obj));
57 eo_do(evt->child, emodel_load()); 57 eo_do(evt->child, efl_model_load());
58 58
59 return EINA_TRUE; 59 return EINA_TRUE;
60} 60}
@@ -64,42 +64,42 @@ _children_count_cb(void *data EINA_UNUSED, Eo *obj, const Eo_Event_Description *
64{ 64{
65 unsigned int *len = event_info; 65 unsigned int *len = event_info;
66 Eina_Accessor *accessor; 66 Eina_Accessor *accessor;
67 Emodel_Load_Status status; 67 Efl_Model_Load_Status status;
68 Eo *child; 68 Eo *child;
69 unsigned int i = 0; 69 unsigned int i = 0;
70 70
71 fprintf(stderr, "Children count number=%d\n", *len); 71 fprintf(stderr, "Children count number=%d\n", *len);
72 72
73 /**< get full list */ 73 /**< get full list */
74 eo_do(obj, status = emodel_children_slice_get(0 ,0 ,(Eina_Accessor **)&accessor)); 74 eo_do(obj, status = efl_model_children_slice_get(0 ,0 ,(Eina_Accessor **)&accessor));
75 if(accessor != NULL) 75 if(accessor != NULL)
76 { 76 {
77 EINA_ACCESSOR_FOREACH(accessor, i, child) {} 77 EINA_ACCESSOR_FOREACH(accessor, i, child) {}
78 fprintf(stdout, "Got %d childs from Accessor. status=%d\n", i, status); 78 fprintf(stdout, "Got %d childs from Accessor. status=%d\n", i, status);
79 } 79 }
80 80
81 fclose(fopen(EMODEL_TEST_FILENAME_PATH "/test_file_monitor_add", "w+")); 81 fclose(fopen(EFL_MODEL_TEST_FILENAME_PATH "/test_file_monitor_add", "w+"));
82 82
83 return EINA_TRUE; 83 return EINA_TRUE;
84} 84}
85 85
86START_TEST(emodel_test_test_monitor_add) 86START_TEST(eio_model_test_test_monitor_add)
87{ 87{
88 Eo *filemodel = NULL; 88 Eo *filemodel = NULL;
89 89
90 fprintf(stderr, "emodel_test_test_monitor_add\n"); 90 fprintf(stderr, "efl_model_test_test_monitor_add\n");
91 91
92 fail_if(!eina_init(), "ERROR: Cannot init Eina!\n"); 92 fail_if(!eina_init(), "ERROR: Cannot init Eina!\n");
93 fail_if(!ecore_init(), "ERROR: Cannot init Ecore!\n"); 93 fail_if(!ecore_init(), "ERROR: Cannot init Ecore!\n");
94 fail_if(!eio_init(), "ERROR: Cannot init EIO!\n"); 94 fail_if(!eio_init(), "ERROR: Cannot init EIO!\n");
95 95
96 filemodel = eo_add(EIO_MODEL_CLASS, NULL, eio_model_path_set(EMODEL_TEST_FILENAME_PATH)); 96 filemodel = eo_add(EIO_MODEL_CLASS, NULL, eio_model_path_set(EFL_MODEL_TEST_FILENAME_PATH));
97 fail_if(!filemodel, "ERROR: Cannot init model!\n"); 97 fail_if(!filemodel, "ERROR: Cannot init model!\n");
98 98
99 eo_do(filemodel, eo_event_callback_add(EMODEL_EVENT_CHILD_ADDED, _children_added_cb, NULL)); 99 eo_do(filemodel, eo_event_callback_add(EFL_MODEL_BASE_EVENT_CHILD_ADDED, _children_added_cb, NULL));
100 eo_do(filemodel, eo_event_callback_add(EMODEL_EVENT_CHILDREN_COUNT_CHANGED, _children_count_cb, NULL)); 100 eo_do(filemodel, eo_event_callback_add(EFL_MODEL_BASE_EVENT_CHILDREN_COUNT_CHANGED, _children_count_cb, NULL));
101 101
102 eo_do(filemodel, emodel_load()); 102 eo_do(filemodel, efl_model_load());
103 103
104 ecore_main_loop_begin(); 104 ecore_main_loop_begin();
105 105
@@ -118,8 +118,8 @@ START_TEST(emodel_test_test_monitor_add)
118END_TEST 118END_TEST
119 119
120void 120void
121emodel_test_monitor_add(TCase *tc) 121eio_model_test_monitor_add(TCase *tc)
122{ 122{
123 tcase_add_test(tc, emodel_test_test_monitor_add); 123 tcase_add_test(tc, eio_model_test_test_monitor_add);
124} 124}
125 125
diff --git a/src/tests/eio/eio_suite.c b/src/tests/eio/eio_suite.c
index 08deb05803..ecc52247b3 100644
--- a/src/tests/eio/eio_suite.c
+++ b/src/tests/eio/eio_suite.c
@@ -19,6 +19,8 @@ struct _Eio_Test_Case
19 19
20static const Eio_Test_Case etc[] = { 20static const Eio_Test_Case etc[] = {
21 {"Eio_Monitor", eio_test_monitor}, 21 {"Eio_Monitor", eio_test_monitor},
22 {"Eio Model", eio_model_test_file},
23 {"Eio Model Monitor", eio_model_test_monitor_add},
22 {NULL, NULL} 24 {NULL, NULL}
23}; 25};
24 26
diff --git a/src/tests/eio/eio_suite.h b/src/tests/eio/eio_suite.h
index 2212f8eafb..d59a2ab6c0 100644
--- a/src/tests/eio/eio_suite.h
+++ b/src/tests/eio/eio_suite.h
@@ -4,5 +4,7 @@
4#include <check.h> 4#include <check.h>
5 5
6void eio_test_monitor(TCase *tc); 6void eio_test_monitor(TCase *tc);
7void eio_model_test_file(TCase *tc);
8void eio_model_test_monitor_add(TCase *tc);
7 9
8#endif /* _EIO_SUITE_H */ 10#endif /* _EIO_SUITE_H */
diff --git a/src/tests/emodel/emodel_suite.c b/src/tests/emodel/emodel_suite.c
deleted file mode 100644
index 33b61e0e34..0000000000
--- a/src/tests/emodel/emodel_suite.c
+++ /dev/null
@@ -1,138 +0,0 @@
1
2#ifdef HAVE_CONFIG_H
3# include "config.h"
4#endif
5
6#include <Eina.h>
7#include <stdio.h>
8#include <string.h>
9
10#include <check.h>
11
12void emodel_test_file(TCase* tc);
13void emodel_test_monitor_add(TCase* tc);
14
15typedef struct _Emodel_Test_Case Emodel_Test_Case;
16struct _Emodel_Test_Case
17{
18 const char *test_case;
19 void (*build)(TCase *tc);
20};
21
22static const Emodel_Test_Case etc[] = {
23 { "File", emodel_test_file },
24 { "Monitor Add", emodel_test_monitor_add },
25 { NULL, NULL }
26};
27
28static void
29_list_tests(void)
30{
31 const Emodel_Test_Case *itr = etc;
32 fputs("Available Test Cases:\n", stderr);
33 for (; itr->test_case; itr++)
34 fprintf(stderr, "\t%s\n", itr->test_case);
35}
36
37static Eina_Bool
38_use_test(int argc, const char **argv, const char *test_case)
39{
40 if (argc < 1)
41 return 1;
42
43 for (; argc > 0; argc--, argv++)
44 if (strcmp(test_case, *argv) == 0)
45 return 1;
46
47 return 0;
48}
49
50Suite *
51emodel_build_suite(int argc, const char **argv)
52{
53 TCase *tc;
54 Suite *s;
55 int i;
56
57 s = suite_create("Emodel");
58
59 for (i = 0; etc[i].test_case; ++i)
60 {
61 if (!_use_test(argc, argv, etc[i].test_case))
62 continue;
63
64 tc = tcase_create(etc[i].test_case);
65 tcase_set_timeout(tc, 0);
66
67 etc[i].build(tc);
68 suite_add_tcase(s, tc);
69 }
70
71 return s;
72}
73
74/* FIXME this is a copy from eina_test_mempool
75 * we should remove the duplication
76 */
77static Eina_Array *_modules;
78static void _mempool_init(void)
79{
80 eina_init();
81 /* force modules to be loaded in case they are not installed */
82 _modules = eina_module_list_get(NULL,
83 PACKAGE_BUILD_DIR "/src/modules",
84 EINA_TRUE,
85 NULL,
86 NULL);
87 eina_module_list_load(_modules);
88}
89
90static void _mempool_shutdown(void)
91{
92 eina_module_list_free(_modules);
93 if (_modules)
94 eina_array_free(_modules);
95 /* TODO delete the list */
96 eina_shutdown();
97}
98
99int
100main(int argc, char **argv)
101{
102 Suite *s;
103 SRunner *sr;
104 int i, failed_count;
105
106 for (i = 1; i < argc; i++)
107 if ((strcmp(argv[i], "-h") == 0) ||
108 (strcmp(argv[i], "--help") == 0))
109 {
110 fprintf(stderr, "Usage:\n\t%s [test_case1 .. [test_caseN]]\n",
111 argv[0]);
112 _list_tests();
113 return 0;
114 }
115 else if ((strcmp(argv[i], "-l") == 0) ||
116 (strcmp(argv[i], "--list") == 0))
117 {
118 _list_tests();
119 return 0;
120 }
121
122 putenv("EFL_RUN_IN_TREE=1");
123
124 s = emodel_build_suite(argc - 1, (const char **)argv + 1);
125 sr = srunner_create(s);
126
127 srunner_set_xml(sr, TESTS_BUILD_DIR "/check-results.xml");
128
129 _mempool_init();
130
131 srunner_run_all(sr, CK_ENV);
132 failed_count = srunner_ntests_failed(sr);
133 srunner_free(sr);
134
135 _mempool_shutdown();
136
137 return (failed_count == 0) ? 0 : 255;
138}