diff options
author | Cedric BAIL <cedric.bail@free.fr> | 2018-12-07 14:39:42 -0800 |
---|---|---|
committer | Cedric BAIL <cedric.bail@free.fr> | 2019-01-09 11:02:10 -0800 |
commit | 7245567fe6b1ec4e7101b1c5d1a293366170cc72 (patch) | |
tree | 9a6cf057d6cc28bbc58c60e8dce48b92ec93298d /src | |
parent | 6a144f50083b2f66e47f7b6ccb75cfd01ab0e0a9 (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/Makefile_Efl.am | 4 | ||||
-rw-r--r-- | src/lib/efl/Efl.h | 2 | ||||
-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.build | 2 | ||||
-rw-r--r-- | src/lib/efl/meson.build | 2 |
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 | |||
114 | 114 | ||
115 | lib_efl_libefl_la_SOURCES = \ | 115 | lib_efl_libefl_la_SOURCES = \ |
116 | lib/efl/interfaces/efl_interfaces_main.c \ | 116 | lib/efl/interfaces/efl_interfaces_main.c \ |
117 | lib/efl/interfaces/efl_model_common.c \ | 117 | lib/efl/interfaces/efl_mvvm_common.c \ |
118 | lib/efl/interfaces/efl_gfx_path.c \ | 118 | lib/efl/interfaces/efl_gfx_path.c \ |
119 | lib/efl/interfaces/efl_gfx_shape.c \ | 119 | lib/efl/interfaces/efl_gfx_shape.c \ |
120 | lib/efl/interfaces/efl_input_device.c \ | 120 | lib/efl/interfaces/efl_input_device.c \ |
@@ -140,7 +140,7 @@ lib_efl_libefl_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@ | |||
140 | installed_eflheadersdir = $(includedir)/efl-@VMAJ@ | 140 | installed_eflheadersdir = $(includedir)/efl-@VMAJ@ |
141 | dist_installed_eflheaders_DATA = \ | 141 | dist_installed_eflheaders_DATA = \ |
142 | lib/efl/Efl_Config.h \ | 142 | lib/efl/Efl_Config.h \ |
143 | lib/efl/Efl_Model_Common.h \ | 143 | lib/efl/Efl_MVVM_Common.h \ |
144 | lib/efl/Efl.h | 144 | lib/efl/Efl.h |
145 | 145 | ||
146 | installed_eflinterfacesdir = $(includedir)/efl-@VMAJ@/interfaces | 146 | 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; | |||
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; | |||
12 | EAPI extern Eina_Error EFL_MODEL_ERROR_PERMISSION_DENIED; | 12 | EAPI extern Eina_Error EFL_MODEL_ERROR_PERMISSION_DENIED; |
13 | EAPI extern Eina_Error EFL_MODEL_ERROR_INVALID_OBJECT; /**< @since 1.19 */ | 13 | EAPI extern Eina_Error EFL_MODEL_ERROR_INVALID_OBJECT; /**< @since 1.19 */ |
14 | 14 | ||
15 | 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 */ | ||
16 | |||
15 | #include "interfaces/efl_model.eo.h" | 17 | #include "interfaces/efl_model.eo.h" |
16 | 18 | ||
17 | EAPI int efl_model_init(void); | 19 | 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 @@ | |||
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 | ||
8 | EAPI Eina_Error EFL_MODEL_ERROR_UNKNOWN = 0; | 8 | EAPI Eina_Error EFL_MODEL_ERROR_UNKNOWN = 0; |
9 | EAPI Eina_Error EFL_MODEL_ERROR_NOT_SUPPORTED = 0; | 9 | EAPI Eina_Error EFL_MODEL_ERROR_NOT_SUPPORTED = 0; |
@@ -14,6 +14,8 @@ EAPI Eina_Error EFL_MODEL_ERROR_PERMISSION_DENIED = 0; | |||
14 | EAPI Eina_Error EFL_MODEL_ERROR_INCORRECT_VALUE = 0; | 14 | EAPI Eina_Error EFL_MODEL_ERROR_INCORRECT_VALUE = 0; |
15 | EAPI Eina_Error EFL_MODEL_ERROR_INVALID_OBJECT = 0; | 15 | EAPI Eina_Error EFL_MODEL_ERROR_INVALID_OBJECT = 0; |
16 | 16 | ||
17 | EAPI Eina_Error EFL_FACTORY_ERROR_NOT_SUPPORTED = 0; | ||
18 | |||
17 | static const char EFL_MODEL_ERROR_UNKNOWN_STR[] = "Unknown Error"; | 19 | static const char EFL_MODEL_ERROR_UNKNOWN_STR[] = "Unknown Error"; |
18 | static const char EFL_MODEL_ERROR_NOT_SUPPORTED_STR[] = "Operation not supported"; | 20 | static const char EFL_MODEL_ERROR_NOT_SUPPORTED_STR[] = "Operation not supported"; |
19 | static const char EFL_MODEL_ERROR_NOT_FOUND_STR[] = "Value not found"; | 21 | 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"; | |||
23 | static const char EFL_MODEL_ERROR_INCORRECT_VALUE_STR[] = "Incorrect value"; | 25 | static const char EFL_MODEL_ERROR_INCORRECT_VALUE_STR[] = "Incorrect value"; |
24 | static const char EFL_MODEL_ERROR_INVALID_OBJECT_STR[] = "Object is invalid"; | 26 | static 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); | 28 | static const char EFL_FACTORY_ERROR_NOT_SUPPORTED_STR[] = "Operation not supported"; |
27 | 29 | ||
28 | EAPI int | 30 | EAPI int |
29 | efl_model_init(void) | 31 | efl_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 | ||
156 | efl_src += files([ | 156 | efl_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 | ||
4 | efl_header_src = [ | 4 | efl_header_src = [ |
5 | 'Efl.h', | 5 | 'Efl.h', |
6 | 'Efl_Model_Common.h' | 6 | 'Efl_MVVM_Common.h' |
7 | ] | 7 | ] |
8 | 8 | ||
9 | efl_src = [] | 9 | efl_src = [] |