summaryrefslogtreecommitdiff
path: root/src/lib
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 /src/lib
parent6a144f50083b2f66e47f7b6ccb75cfd01ab0e0a9 (diff)
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
Diffstat (limited to '')
-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
5 files changed, 14 insertions, 5 deletions
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;
73 73
74#include "interfaces/efl_types.eot.h" 74#include "interfaces/efl_types.eot.h"
75 75
76#include <Efl_Model_Common.h> 76#include <Efl_MVVM_Common.h>
77 77
78/* Data types */ 78/* Data types */
79#include "interfaces/efl_gfx_types.eot.h" 79#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;
12EAPI extern Eina_Error EFL_MODEL_ERROR_PERMISSION_DENIED; 12EAPI extern Eina_Error EFL_MODEL_ERROR_PERMISSION_DENIED;
13EAPI extern Eina_Error EFL_MODEL_ERROR_INVALID_OBJECT; /**< @since 1.19 */ 13EAPI extern Eina_Error EFL_MODEL_ERROR_INVALID_OBJECT; /**< @since 1.19 */
14 14
15EAPI 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 */
16
15#include "interfaces/efl_model.eo.h" 17#include "interfaces/efl_model.eo.h"
16 18
17EAPI int efl_model_init(void); 19EAPI 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 @@
3#endif 3#endif
4 4
5#include "Efl.h" 5#include "Efl.h"
6#include "Efl_Model_Common.h" 6#include "Efl_MVVM_Common.h"
7 7
8EAPI Eina_Error EFL_MODEL_ERROR_UNKNOWN = 0; 8EAPI Eina_Error EFL_MODEL_ERROR_UNKNOWN = 0;
9EAPI Eina_Error EFL_MODEL_ERROR_NOT_SUPPORTED = 0; 9EAPI Eina_Error EFL_MODEL_ERROR_NOT_SUPPORTED = 0;
@@ -14,6 +14,8 @@ EAPI Eina_Error EFL_MODEL_ERROR_PERMISSION_DENIED = 0;
14EAPI Eina_Error EFL_MODEL_ERROR_INCORRECT_VALUE = 0; 14EAPI Eina_Error EFL_MODEL_ERROR_INCORRECT_VALUE = 0;
15EAPI Eina_Error EFL_MODEL_ERROR_INVALID_OBJECT = 0; 15EAPI Eina_Error EFL_MODEL_ERROR_INVALID_OBJECT = 0;
16 16
17EAPI Eina_Error EFL_FACTORY_ERROR_NOT_SUPPORTED = 0;
18
17static const char EFL_MODEL_ERROR_UNKNOWN_STR[] = "Unknown Error"; 19static const char EFL_MODEL_ERROR_UNKNOWN_STR[] = "Unknown Error";
18static const char EFL_MODEL_ERROR_NOT_SUPPORTED_STR[] = "Operation not supported"; 20static const char EFL_MODEL_ERROR_NOT_SUPPORTED_STR[] = "Operation not supported";
19static const char EFL_MODEL_ERROR_NOT_FOUND_STR[] = "Value not found"; 21static 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";
23static const char EFL_MODEL_ERROR_INCORRECT_VALUE_STR[] = "Incorrect value"; 25static const char EFL_MODEL_ERROR_INCORRECT_VALUE_STR[] = "Incorrect value";
24static const char EFL_MODEL_ERROR_INVALID_OBJECT_STR[] = "Object is invalid"; 26static const char EFL_MODEL_ERROR_INVALID_OBJECT_STR[] = "Object is invalid";
25 27
26#define _ERROR(Name) EFL_MODEL_ERROR_##Name = eina_error_msg_static_register(EFL_MODEL_ERROR_##Name##_STR); 28static const char EFL_FACTORY_ERROR_NOT_SUPPORTED_STR[] = "Operation not supported";
27 29
28EAPI int 30EAPI int
29efl_model_init(void) 31efl_model_init(void)
30{ 32{
33#define _ERROR(Name) EFL_MODEL_ERROR_##Name = eina_error_msg_static_register(EFL_MODEL_ERROR_##Name##_STR);
31 _ERROR(INCORRECT_VALUE); 34 _ERROR(INCORRECT_VALUE);
32 _ERROR(UNKNOWN); 35 _ERROR(UNKNOWN);
33 _ERROR(NOT_SUPPORTED); 36 _ERROR(NOT_SUPPORTED);
@@ -37,6 +40,10 @@ efl_model_init(void)
37 _ERROR(PERMISSION_DENIED); 40 _ERROR(PERMISSION_DENIED);
38 _ERROR(INVALID_OBJECT); 41 _ERROR(INVALID_OBJECT);
39 42
43#undef _ERROR
44#define _ERROR(Name) EFL_FACTORY_ERROR_##Name = eina_error_msg_static_register(EFL_FACTORY_ERROR_##Name##_STR);
45 _ERROR(NOT_SUPPORTED);
46
40 return EINA_TRUE; 47 return EINA_TRUE;
41} 48}
42 49
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 = []
155 155
156efl_src += files([ 156efl_src += files([
157 'efl_interfaces_main.c', 157 'efl_interfaces_main.c',
158 'efl_model_common.c', 158 'efl_mvvm_common.c',
159 'efl_gfx_path.c', 159 'efl_gfx_path.c',
160 'efl_gfx_shape.c', 160 'efl_gfx_shape.c',
161 'efl_gfx_color.c', 161 '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]
3 3
4efl_header_src = [ 4efl_header_src = [
5 'Efl.h', 5 'Efl.h',
6 'Efl_Model_Common.h' 6 'Efl_MVVM_Common.h'
7] 7]
8 8
9efl_src = [] 9efl_src = []