lib/efl/interfaces/efl_vpath.eo \
lib/efl/interfaces/efl_vpath_manager.eo \
lib/efl/interfaces/efl_vpath_file.eo \
- lib/efl/interfaces/efl_vpath_core.eo \
$(efl_eolian_legacy_files) \
$(NULL)
lib/efl/interfaces/efl_interfaces_main.c \
lib/efl/interfaces/efl_model_common.c \
lib/efl/interfaces/efl_gfx_shape.c \
+lib/efl/interfaces/efl_vpath.c \
lib/efl/interfaces/efl_vpath_file.c \
-lib/efl/interfaces/efl_vpath_manager.c \
-lib/efl/interfaces/efl_vpath_core.c
+lib/efl/interfaces/efl_vpath_manager.c
lib_efl_libefl_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl -I$(top_srcdir)/src/lib/efl @EFL_CFLAGS@ -DEFL_GFX_FILTER_BETA
lib_efl_libefl_la_LIBADD = @EFL_LIBS@
#include "interfaces/efl_vpath_file.eo.h"
#include "interfaces/efl_vpath.eo.h"
-#include "interfaces/efl_vpath_core.eo.h"
#include "interfaces/efl_vpath_manager.eo.h"
/* Data types */
#include "interfaces/efl_gfx_filter.eo.c"
-#include "interfaces/efl_vpath.eo.c"
-
EAPI const Eo_Event_Description _EFL_GFX_CHANGED =
EO_EVENT_DESCRIPTION("Graphics changed");
--- /dev/null
+#define EFL_BETA_API_SUPPORT
+
+#include "Efl.h"
+
+typedef struct _Efl_Vpath_Data Efl_Vpath_Data;
+
+struct _Efl_Vpath_Data
+{
+ int dummy;
+};
+
+EOLIAN static Efl_Vpath_File *
+_efl_vpath_fetch(Eo *obj EINA_UNUSED, Efl_Vpath_Data *pd EINA_UNUSED, const char *path EINA_UNUSED)
+{
+ return NULL;
+}
+
+#include "interfaces/efl_vpath.eo.c"
-interface Efl.Vpath (Eo.Base)
+class Efl.Vpath (Eo.Base)
{
legacy_prefix: null;
eo_prefix: efl_vpath;
}
return: own(Efl.Vpath_File *); [[ An object representing the file ]]
}
+ }
+ events {
}
}
+++ /dev/null
-#define EFL_BETA_API_SUPPORT
-
-#include "Efl.h"
-
-typedef struct _Efl_Vpath_Core_Data Efl_Vpath_Core_Data;
-
-struct _Efl_Vpath_Core_Data
-{
- Eina_Hash *meta;
-};
-
-static Efl_Vpath_Core *vpath_core = NULL;
-
-EOLIAN static Efl_Vpath_Core *
-_efl_vpath_core_get(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED)
-{
- return vpath_core;
-}
-
-EOLIAN static const char *
-_efl_vpath_core_meta_get(Eo *obj EINA_UNUSED, Efl_Vpath_Core_Data *pd, const char *key)
-{
- return eina_hash_find(pd->meta, key);
-}
-
-EOLIAN static void
-_efl_vpath_core_meta_set(Eo *obj EINA_UNUSED, Efl_Vpath_Core_Data *pd, const char *key, const char *path)
-{
- eina_hash_add(pd->meta, key, eina_stringshare_add(path));
-}
-
-EOLIAN static void
-_efl_vpath_core_eo_base_destructor(Eo *obj, Efl_Vpath_Core_Data *pd)
-{
- eina_hash_free(pd->meta);
- pd->meta = NULL;
- if (vpath_core == obj) vpath_core = NULL;
-}
-
-EOLIAN static Eo_Base *
-_efl_vpath_core_eo_base_constructor(Eo *obj, Efl_Vpath_Core_Data *pd)
-{
- if (vpath_core) return NULL;
- pd->meta = eina_hash_string_superfast_new
- ((Eina_Free_Cb)eina_stringshare_del);
- vpath_core = obj;
- return obj;
-}
-
-EOLIAN static Efl_Vpath_File *
-_efl_vpath_core_efl_vpath_fetch(Eo *obj EINA_UNUSED, Efl_Vpath_Core_Data *pd EINA_UNUSED, const char *path EINA_UNUSED)
-{
- // XXX: implement parsse of path then look up in hash if not just create
- // object where path and result are the same and return that
- return NULL;
-}
-
-#include "interfaces/efl_vpath_core.eo.c"
+++ /dev/null
-class Efl.Vpath.Core (Efl.Vpath)
-{
- legacy_prefix: null;
- eo_prefix: efl_vpath_core;
- methods {
- get @class {
- return: Efl.Vpath.Core *; [[ Get the singleton core vpath ]]
- }
- meta_set {
- params {
- key: const(char)*; [[ The magic path key being looked up ]]
- path: const(char)*; [[ The real path the key maps to ]]
- }
- }
- meta_get {
- params {
- key: const(char)*; [[ The magic path key being looked up ]]
- }
- return: const(char)*;
- }
- }
- implements {
- Eo.Base.destructor;
- Eo.Base.constructor;
- Efl.Vpath.fetch;
- }
-}
_efl_vpath_file_path_set(Eo *obj EINA_UNUSED, Efl_Vpath_File_Data *pd, const char *path)
{
eina_stringshare_replace(&(pd->path), path);
+ // XXX: begin resolve or fetch
}
EOLIAN static const char *
return pd->path;
}
-EOLIAN static void
-_efl_vpath_file_result_set(Eo *obj EINA_UNUSED, Efl_Vpath_File_Data *pd, const char *path)
-{
- eina_stringshare_replace(&(pd->result), path);
-}
-
EOLIAN static const char *
_efl_vpath_file_result_get(Eo *obj EINA_UNUSED, Efl_Vpath_File_Data *pd)
{
return pd->result;
}
-EOLIAN static void
-_efl_vpath_file_do(Eo *obj EINA_UNUSED, Efl_Vpath_File_Data *pd EINA_UNUSED)
-{
- // XXX: begin resolve or fetch for parent vpath object
-}
-
#include "interfaces/efl_vpath_file.eo.c"
}
}
@property result {
- set {}
get {}
values {
path: const(char)*; [[ The resulting destination file ]]
}
}
- do {
- [[ Actually begin the resolving here - emit event now or do later ]]
- }
}
events {
fetched; [[ File successfully mapped/fetched ]]
#include "Efl.h"
typedef struct _Efl_Vpath_Manager_Data Efl_Vpath_Manager_Data;
-typedef struct _Efl_Vpath_Manager_Entry Efl_Vpath_Manager_Entry;
struct _Efl_Vpath_Manager_Data
{
Eina_List *list;
};
-struct _Efl_Vpath_Manager_Entry
-{
- Efl_Vpath *vpath;
- int priority;
-};
-
-static Efl_Vpath_Manager_Data vpath_manager =
-{
- NULL
-};
-
EOLIAN static Efl_Vpath_File *
-_efl_vpath_manager_fetch(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, const char *path)
+_efl_vpath_manager_fetch(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, const char *path EINA_UNUSED)
{
- Efl_Vpath_Manager_Entry *entry;
- Eina_List *l;
- Efl_Vpath_File *file;
-
- EINA_LIST_FOREACH(vpath_manager.list, l, entry)
- {
- file = efl_vpath_fetch(entry->vpath, path);
- if (file) return file;
- }
return NULL;
}
EOLIAN static void
-_efl_vpath_manager_register(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, int priority, Efl_Vpath *vpath)
+_efl_vpath_manager_register(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, int priority EINA_UNUSED, Efl_Vpath *vpath EINA_UNUSED)
{
- Efl_Vpath_Manager_Entry *entry = malloc(sizeof(Efl_Vpath_Manager_Entry));
- entry->vpath = vpath;
- entry->priority = priority;
- // XXX: inset sorted
- vpath_manager.list = eina_lisst_prepend(vpath_manager.list, entry);
}
EOLIAN static void
-_efl_vpath_manager_unregister(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, Efl_Vpath *vpath)
+_efl_vpath_manager_unregister(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, Efl_Vpath *vpath EINA_UNUSED)
{
- Efl_Vpath_Manager_Entry *entry;
- Eina_List *l;
-
- EINA_LIST_FOREACH(vpath_manager.list, l, entry)
- {
- if (entry->vpath == vpath)
- {
- vpath_manager.list = eina_list_remove_list(vpath_manager.list, l);
- free(entry);
- return;
- }
- }
}
#include "interfaces/efl_vpath_manager.eo.c"