aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2018-12-07 14:39:42 -0800
committerCedric BAIL <cedric.bail@free.fr>2019-01-09 11:02:10 -0800
commit7245567fe6b1ec4e7101b1c5d1a293366170cc72 (patch)
tree9a6cf057d6cc28bbc58c60e8dce48b92ec93298d
parenteo: add a test to enforce the upper limit of our base object size. (diff)
downloadefl-7245567fe6b1ec4e7101b1c5d1a293366170cc72.tar.gz
efl: add a factory Eina_Error and rename the file to be more on point with its purpose.
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es> Differential Revision: https://phab.enlightenment.org/D7442
-rw-r--r--src/Makefile_Efl.am4
-rw-r--r--src/lib/efl/Efl.h2
-rw-r--r--src/lib/efl/Efl_MVVM_Common.h (renamed from src/lib/efl/Efl_Model_Common.h)2
-rw-r--r--src/lib/efl/interfaces/efl_mvvm_common.c (renamed from src/lib/efl/interfaces/efl_model_common.c)11
-rw-r--r--src/lib/efl/interfaces/meson.build2
-rw-r--r--src/lib/efl/meson.build2
6 files changed, 16 insertions, 7 deletions
diff --git a/src/Makefile_Efl.am b/src/Makefile_Efl.am
index 4c775b8085..6fe217a956 100644
--- a/src/Makefile_Efl.am
+++ b/src/Makefile_Efl.am
@@ -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
diff --git a/src/lib/efl/Efl.h b/src/lib/efl/Efl.h
index 1ff6767e6c..7da806c779 100644
--- a/src/lib/efl/Efl.h
+++ b/src/lib/efl/Efl.h
@@ -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"
diff --git a/src/lib/efl/Efl_Model_Common.h b/src/lib/efl/Efl_MVVM_Common.h
index 034d1170c1..954163b4cf 100644
--- a/src/lib/efl/Efl_Model_Common.h
+++ b/src/lib/efl/Efl_MVVM_Common.h
@@ -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);
diff --git a/src/lib/efl/interfaces/efl_model_common.c b/src/lib/efl/interfaces/efl_mvvm_common.c
index ecbbb59ecb..2c95c76eaa 100644
--- a/src/lib/efl/interfaces/efl_model_common.c
+++ b/src/lib/efl/interfaces/efl_mvvm_common.c
@@ -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;
}
diff --git a/src/lib/efl/interfaces/meson.build b/src/lib/efl/interfaces/meson.build
index c263b05b70..a78cf4a209 100644
--- a/src/lib/efl/interfaces/meson.build
+++ b/src/lib/efl/interfaces/meson.build
@@ -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',
diff --git a/src/lib/efl/meson.build b/src/lib/efl/meson.build
index cadf14bdab..d5805be9b3 100644
--- a/src/lib/efl/meson.build
+++ b/src/lib/efl/meson.build
@@ -3,7 +3,7 @@ efl_pub_deps = [eo]
efl_header_src = [
'Efl.h',
- 'Efl_Model_Common.h'
+ 'Efl_MVVM_Common.h'
]
efl_src = []