efl: add a factory Eina_Error and rename the file to be more on point with its purpose.
authorCedric BAIL <cedric.bail@free.fr>
Fri, 7 Dec 2018 22:39:42 +0000 (14:39 -0800)
committerJiyoun Park <jy0703.park@samsung.com>
Wed, 16 Jan 2019 02:13:22 +0000 (11:13 +0900)
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D7442

src/Makefile_Efl.am
src/lib/efl/Efl.h
src/lib/efl/Efl_MVVM_Common.h [moved from src/lib/efl/Efl_Model_Common.h with 92% similarity]
src/lib/efl/interfaces/efl_mvvm_common.c [moved from src/lib/efl/interfaces/efl_model_common.c with 92% similarity]
src/lib/efl/interfaces/meson.build
src/lib/efl/meson.build

index 4c775b8..6fe217a 100644 (file)
@@ -114,7 +114,7 @@ lib_LTLIBRARIES += lib/efl/libefl.la
 
 lib_efl_libefl_la_SOURCES = \
 lib/efl/interfaces/efl_interfaces_main.c \
-lib/efl/interfaces/efl_model_common.c \
+lib/efl/interfaces/efl_mvvm_common.c \
 lib/efl/interfaces/efl_gfx_path.c \
 lib/efl/interfaces/efl_gfx_shape.c \
 lib/efl/interfaces/efl_input_device.c \
@@ -140,7 +140,7 @@ lib_efl_libefl_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@
 installed_eflheadersdir = $(includedir)/efl-@VMAJ@
 dist_installed_eflheaders_DATA = \
               lib/efl/Efl_Config.h \
-              lib/efl/Efl_Model_Common.h \
+              lib/efl/Efl_MVVM_Common.h \
               lib/efl/Efl.h
 
 installed_eflinterfacesdir = $(includedir)/efl-@VMAJ@/interfaces
index 1ff6767..7da806c 100644 (file)
@@ -73,7 +73,7 @@ typedef struct _Efl_Text_Annotate_Annotation Efl_Text_Annotate_Annotation;
 
 #include "interfaces/efl_types.eot.h"
 
-#include <Efl_Model_Common.h>
+#include <Efl_MVVM_Common.h>
 
 /* Data types */
 #include "interfaces/efl_gfx_types.eot.h"
similarity index 92%
rename from src/lib/efl/Efl_Model_Common.h
rename to src/lib/efl/Efl_MVVM_Common.h
index 034d117..954163b 100644 (file)
@@ -12,6 +12,8 @@ EAPI extern Eina_Error EFL_MODEL_ERROR_INCORRECT_VALUE;
 EAPI extern Eina_Error EFL_MODEL_ERROR_PERMISSION_DENIED;
 EAPI extern Eina_Error EFL_MODEL_ERROR_INVALID_OBJECT; /**< @since 1.19 */
 
+EAPI extern Eina_Error EFL_FACTORY_ERROR_NOT_SUPPORTED; /**< Returned error when factory got a request that it can't fullfil due to a set of unsupported parameters @since 1.22 */
+
 #include "interfaces/efl_model.eo.h"
 
 EAPI int efl_model_init(void);
similarity index 92%
rename from src/lib/efl/interfaces/efl_model_common.c
rename to src/lib/efl/interfaces/efl_mvvm_common.c
index ecbbb59..2c95c76 100644 (file)
@@ -3,7 +3,7 @@
 #endif
 
 #include "Efl.h"
-#include "Efl_Model_Common.h"
+#include "Efl_MVVM_Common.h"
 
 EAPI Eina_Error EFL_MODEL_ERROR_UNKNOWN = 0;
 EAPI Eina_Error EFL_MODEL_ERROR_NOT_SUPPORTED = 0;
@@ -14,6 +14,8 @@ EAPI Eina_Error EFL_MODEL_ERROR_PERMISSION_DENIED = 0;
 EAPI Eina_Error EFL_MODEL_ERROR_INCORRECT_VALUE = 0;
 EAPI Eina_Error EFL_MODEL_ERROR_INVALID_OBJECT = 0;
 
+EAPI Eina_Error EFL_FACTORY_ERROR_NOT_SUPPORTED = 0;
+
 static const char EFL_MODEL_ERROR_UNKNOWN_STR[]           = "Unknown Error";
 static const char EFL_MODEL_ERROR_NOT_SUPPORTED_STR[]     = "Operation not supported";
 static const char EFL_MODEL_ERROR_NOT_FOUND_STR[]         = "Value not found";
@@ -23,11 +25,12 @@ static const char EFL_MODEL_ERROR_PERMISSION_DENIED_STR[] = "Permission denied";
 static const char EFL_MODEL_ERROR_INCORRECT_VALUE_STR[]   = "Incorrect value";
 static const char EFL_MODEL_ERROR_INVALID_OBJECT_STR[]    = "Object is invalid";
 
-#define _ERROR(Name) EFL_MODEL_ERROR_##Name = eina_error_msg_static_register(EFL_MODEL_ERROR_##Name##_STR);
+static const char EFL_FACTORY_ERROR_NOT_SUPPORTED_STR[]   = "Operation not supported";
 
 EAPI int
 efl_model_init(void)
 {
+#define _ERROR(Name) EFL_MODEL_ERROR_##Name = eina_error_msg_static_register(EFL_MODEL_ERROR_##Name##_STR);
    _ERROR(INCORRECT_VALUE);
    _ERROR(UNKNOWN);
    _ERROR(NOT_SUPPORTED);
@@ -37,6 +40,10 @@ efl_model_init(void)
    _ERROR(PERMISSION_DENIED);
    _ERROR(INVALID_OBJECT);
 
+#undef _ERROR
+#define _ERROR(Name) EFL_FACTORY_ERROR_##Name = eina_error_msg_static_register(EFL_FACTORY_ERROR_##Name##_STR);
+   _ERROR(NOT_SUPPORTED);
+
    return EINA_TRUE;
 }
 
index c263b05..a78cf4a 100644 (file)
@@ -155,7 +155,7 @@ pub_eo_types_files = []
 
 efl_src += files([
   'efl_interfaces_main.c',
-  'efl_model_common.c',
+  'efl_mvvm_common.c',
   'efl_gfx_path.c',
   'efl_gfx_shape.c',
   'efl_gfx_color.c',
index cadf14b..d5805be 100644 (file)
@@ -3,7 +3,7 @@ efl_pub_deps = [eo]
 
 efl_header_src = [
   'Efl.h',
-  'Efl_Model_Common.h'
+  'Efl_MVVM_Common.h'
 ]
 
 efl_src = []