summaryrefslogtreecommitdiff
path: root/src/lib/efl
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2018-04-18 15:49:14 -0700
committerCedric BAIL <cedric@osg.samsung.com>2018-05-01 10:39:01 -0700
commit550b14261ec5d50da46386a553d7a3a980a734f8 (patch)
tree15b40c4912778f47bce4b4a465df33642acf17b5 /src/lib/efl
parentb30587f5b03f7acb8554b7e32fe94858e6566e0b (diff)
efl: refactor model error creation.
Diffstat (limited to 'src/lib/efl')
-rw-r--r--src/lib/efl/interfaces/efl_model_common.c34
1 files changed, 11 insertions, 23 deletions
diff --git a/src/lib/efl/interfaces/efl_model_common.c b/src/lib/efl/interfaces/efl_model_common.c
index dabc388338..ecbbb59ecb 100644
--- a/src/lib/efl/interfaces/efl_model_common.c
+++ b/src/lib/efl/interfaces/efl_model_common.c
@@ -23,37 +23,25 @@ static const char EFL_MODEL_ERROR_PERMISSION_DENIED_STR[] = "Permission denied";
23static const char EFL_MODEL_ERROR_INCORRECT_VALUE_STR[] = "Incorrect value"; 23static const char EFL_MODEL_ERROR_INCORRECT_VALUE_STR[] = "Incorrect value";
24static const char EFL_MODEL_ERROR_INVALID_OBJECT_STR[] = "Object is invalid"; 24static const char EFL_MODEL_ERROR_INVALID_OBJECT_STR[] = "Object is invalid";
25 25
26#define _ERROR(Name) EFL_MODEL_ERROR_##Name = eina_error_msg_static_register(EFL_MODEL_ERROR_##Name##_STR);
26 27
27EAPI int 28EAPI int
28efl_model_init(void) 29efl_model_init(void)
29{ 30{
30 EFL_MODEL_ERROR_INCORRECT_VALUE = eina_error_msg_static_register( 31 _ERROR(INCORRECT_VALUE);
31 EFL_MODEL_ERROR_INCORRECT_VALUE_STR); 32 _ERROR(UNKNOWN);
32 33 _ERROR(NOT_SUPPORTED);
33 EFL_MODEL_ERROR_UNKNOWN = eina_error_msg_static_register( 34 _ERROR(NOT_FOUND);
34 EFL_MODEL_ERROR_UNKNOWN_STR); 35 _ERROR(READ_ONLY);
35 36 _ERROR(INIT_FAILED);
36 EFL_MODEL_ERROR_NOT_SUPPORTED = eina_error_msg_static_register( 37 _ERROR(PERMISSION_DENIED);
37 EFL_MODEL_ERROR_NOT_SUPPORTED_STR); 38 _ERROR(INVALID_OBJECT);
38
39 EFL_MODEL_ERROR_NOT_FOUND = eina_error_msg_static_register(
40 EFL_MODEL_ERROR_NOT_FOUND_STR);
41
42 EFL_MODEL_ERROR_READ_ONLY = eina_error_msg_static_register(
43 EFL_MODEL_ERROR_READ_ONLY_STR);
44
45 EFL_MODEL_ERROR_INIT_FAILED = eina_error_msg_static_register(
46 EFL_MODEL_ERROR_INIT_FAILED_STR);
47
48 EFL_MODEL_ERROR_PERMISSION_DENIED = eina_error_msg_static_register(
49 EFL_MODEL_ERROR_PERMISSION_DENIED_STR);
50
51 EFL_MODEL_ERROR_INVALID_OBJECT = eina_error_msg_static_register(
52 EFL_MODEL_ERROR_INVALID_OBJECT_STR);
53 39
54 return EINA_TRUE; 40 return EINA_TRUE;
55} 41}
56 42
43#undef _ERROR
44
57EAPI void 45EAPI void
58_efl_model_properties_changed_internal(const Efl_Model *model, ...) 46_efl_model_properties_changed_internal(const Efl_Model *model, ...)
59{ 47{