summaryrefslogtreecommitdiff
path: root/src/tests/eio/eio_model_test_file.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/eio/eio_model_test_file.c')
-rw-r--r--src/tests/eio/eio_model_test_file.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/tests/eio/eio_model_test_file.c b/src/tests/eio/eio_model_test_file.c
index 56e6dd6..5873d7a 100644
--- a/src/tests/eio/eio_model_test_file.c
+++ b/src/tests/eio/eio_model_test_file.c
@@ -84,26 +84,26 @@ _load_status_cb(void *data EINA_UNUSED, const Eo_Event *event)
84 char *str; 84 char *str;
85 85
86 printf("Model is Loaded\n"); 86 printf("Model is Loaded\n");
87 eo_do(event->obj, status = efl_model_property_get("filename", &value_prop)); 87 status = efl_model_property_get(event->obj, "filename", &value_prop);
88 str = eina_value_to_string(value_prop); 88 str = eina_value_to_string(value_prop);
89 printf("efl_model_loaded filename %s, status=%d\n", str, status); 89 printf("efl_model_loaded filename %s, status=%d\n", str, status);
90 free(str); 90 free(str);
91 91
92 eo_do(event->obj, status = efl_model_property_get("size", &value_prop)); 92 status = efl_model_property_get(event->obj, "size", &value_prop);
93 str = eina_value_to_string(value_prop); 93 str = eina_value_to_string(value_prop);
94 printf("efl_model_loaded size %s, status=%d\n", str, status); 94 printf("efl_model_loaded size %s, status=%d\n", str, status);
95 free(str); 95 free(str);
96 96
97 eo_do(event->obj, status = efl_model_property_get("mtime", &value_prop)); 97 status = efl_model_property_get(event->obj, "mtime", &value_prop);
98 str = eina_value_to_string(value_prop); 98 str = eina_value_to_string(value_prop);
99 printf("efl_model_loaded mtime %s, status=%d\n", str, status); 99 printf("efl_model_loaded mtime %s, status=%d\n", str, status);
100 free(str); 100 free(str);
101 101
102 eo_do(event->obj, efl_model_children_count_get(&total)); 102 efl_model_children_count_get(event->obj, &total);
103 printf("efl_model_test count %d\n", (int)total); 103 printf("efl_model_test count %d\n", (int)total);
104 104
105 /**< get full list */ 105 /**< get full list */
106 eo_do(event->obj, status = efl_model_children_slice_get(0 ,0 ,(Eina_Accessor **)&accessor)); 106 status = efl_model_children_slice_get(event->obj, 0, 0, (Eina_Accessor **)&accessor);
107 eina_accessor_free(accessor); 107 eina_accessor_free(accessor);
108 ecore_main_loop_quit(); 108 ecore_main_loop_quit();
109 } 109 }
@@ -143,7 +143,7 @@ _children_count_cb(void *data EINA_UNUSED, const Eo_Event *event)
143 fprintf(stdout, "Children count number=%d\n", *len); 143 fprintf(stdout, "Children count number=%d\n", *len);
144 reqs.children = *len; 144 reqs.children = *len;
145 145
146 eo_do(event->obj, efl_model_children_count_get(&total)); 146 efl_model_children_count_get(event->obj, &total);
147 fprintf(stdout, "New total children count number=%d\n", *len); 147 fprintf(stdout, "New total children count number=%d\n", *len);
148 148
149 return EINA_TRUE; 149 return EINA_TRUE;
@@ -165,27 +165,27 @@ START_TEST(eio_model_test_test_file)
165 fail_if(!ecore_init(), "ERROR: Cannot init Ecore!\n"); 165 fail_if(!ecore_init(), "ERROR: Cannot init Ecore!\n");
166 fail_if(!eio_init(), "ERROR: Cannot init EIO!\n"); 166 fail_if(!eio_init(), "ERROR: Cannot init EIO!\n");
167 167
168 filemodel = eo_add(EIO_MODEL_CLASS, NULL, eio_model_path_set(EFL_MODEL_TEST_FILENAME_PATH)); 168 filemodel = eo_add(EIO_MODEL_CLASS, NULL, eio_model_path_set(eoid, EFL_MODEL_TEST_FILENAME_PATH));
169 fail_if(!filemodel, "ERROR: Cannot init model!\n"); 169 fail_if(!filemodel, "ERROR: Cannot init model!\n");
170 170
171 eo_do(filemodel, eo_event_callback_add(EFL_MODEL_BASE_EVENT_LOAD_STATUS, _load_status_cb, NULL)); 171 eo_event_callback_add(filemodel, EFL_MODEL_BASE_EVENT_LOAD_STATUS, _load_status_cb, NULL);
172 eo_do(filemodel, eo_event_callback_add(EFL_MODEL_BASE_EVENT_PROPERTIES_CHANGED, _properties_change_cb, NULL)); 172 eo_event_callback_add(filemodel, EFL_MODEL_BASE_EVENT_PROPERTIES_CHANGED, _properties_change_cb, NULL);
173 eo_do(filemodel, eo_event_callback_add(EFL_MODEL_BASE_EVENT_CHILDREN_COUNT_CHANGED, _children_count_cb, NULL)); 173 eo_event_callback_add(filemodel, EFL_MODEL_BASE_EVENT_CHILDREN_COUNT_CHANGED, _children_count_cb, NULL);
174 174
175 eo_do(filemodel, efl_model_load()); 175 efl_model_load(filemodel);
176 176
177 handler = ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, exit_func, NULL); 177 handler = ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, exit_func, NULL);
178 178
179 ecore_main_loop_begin(); 179 ecore_main_loop_begin();
180 180
181 eo_do(filemodel, status = efl_model_property_get("filename", &value_prop)); 181 status = efl_model_property_get(filemodel, "filename", &value_prop);
182 str = eina_value_to_string(value_prop); 182 str = eina_value_to_string(value_prop);
183 printf("efl_model_test filename %s, load status %d\n", str, status); 183 printf("efl_model_test filename %s, load status %d\n", str, status);
184 184
185 free(str); 185 free(str);
186 186
187 i = 0; 187 i = 0;
188 eo_do(filemodel, efl_model_properties_get(&properties_list)); 188 efl_model_properties_get(filemodel, &properties_list);
189 EINA_ARRAY_ITER_NEXT(properties_list, i, str, iterator) 189 EINA_ARRAY_ITER_NEXT(properties_list, i, str, iterator)
190 { 190 {
191 fprintf(stdout, "Returned property list %d: %s\n", i, str); 191 fprintf(stdout, "Returned property list %d: %s\n", i, str);