forked from enlightenment/efl
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
This commit is contained in:
parent
6a144f5008
commit
7245567fe6
|
@ -114,7 +114,7 @@ lib_LTLIBRARIES += lib/efl/libefl.la
|
||||||
|
|
||||||
lib_efl_libefl_la_SOURCES = \
|
lib_efl_libefl_la_SOURCES = \
|
||||||
lib/efl/interfaces/efl_interfaces_main.c \
|
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_path.c \
|
||||||
lib/efl/interfaces/efl_gfx_shape.c \
|
lib/efl/interfaces/efl_gfx_shape.c \
|
||||||
lib/efl/interfaces/efl_input_device.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@
|
installed_eflheadersdir = $(includedir)/efl-@VMAJ@
|
||||||
dist_installed_eflheaders_DATA = \
|
dist_installed_eflheaders_DATA = \
|
||||||
lib/efl/Efl_Config.h \
|
lib/efl/Efl_Config.h \
|
||||||
lib/efl/Efl_Model_Common.h \
|
lib/efl/Efl_MVVM_Common.h \
|
||||||
lib/efl/Efl.h
|
lib/efl/Efl.h
|
||||||
|
|
||||||
installed_eflinterfacesdir = $(includedir)/efl-@VMAJ@/interfaces
|
installed_eflinterfacesdir = $(includedir)/efl-@VMAJ@/interfaces
|
||||||
|
|
|
@ -73,7 +73,7 @@ typedef struct _Efl_Text_Annotate_Annotation Efl_Text_Annotate_Annotation;
|
||||||
|
|
||||||
#include "interfaces/efl_types.eot.h"
|
#include "interfaces/efl_types.eot.h"
|
||||||
|
|
||||||
#include <Efl_Model_Common.h>
|
#include <Efl_MVVM_Common.h>
|
||||||
|
|
||||||
/* Data types */
|
/* Data types */
|
||||||
#include "interfaces/efl_gfx_types.eot.h"
|
#include "interfaces/efl_gfx_types.eot.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_PERMISSION_DENIED;
|
||||||
EAPI extern Eina_Error EFL_MODEL_ERROR_INVALID_OBJECT; /**< @since 1.19 */
|
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"
|
#include "interfaces/efl_model.eo.h"
|
||||||
|
|
||||||
EAPI int efl_model_init(void);
|
EAPI int efl_model_init(void);
|
|
@ -3,7 +3,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "Efl.h"
|
#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_UNKNOWN = 0;
|
||||||
EAPI Eina_Error EFL_MODEL_ERROR_NOT_SUPPORTED = 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_INCORRECT_VALUE = 0;
|
||||||
EAPI Eina_Error EFL_MODEL_ERROR_INVALID_OBJECT = 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_UNKNOWN_STR[] = "Unknown Error";
|
||||||
static const char EFL_MODEL_ERROR_NOT_SUPPORTED_STR[] = "Operation not supported";
|
static const char EFL_MODEL_ERROR_NOT_SUPPORTED_STR[] = "Operation not supported";
|
||||||
static const char EFL_MODEL_ERROR_NOT_FOUND_STR[] = "Value not found";
|
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_INCORRECT_VALUE_STR[] = "Incorrect value";
|
||||||
static const char EFL_MODEL_ERROR_INVALID_OBJECT_STR[] = "Object is invalid";
|
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
|
EAPI int
|
||||||
efl_model_init(void)
|
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(INCORRECT_VALUE);
|
||||||
_ERROR(UNKNOWN);
|
_ERROR(UNKNOWN);
|
||||||
_ERROR(NOT_SUPPORTED);
|
_ERROR(NOT_SUPPORTED);
|
||||||
|
@ -37,6 +40,10 @@ efl_model_init(void)
|
||||||
_ERROR(PERMISSION_DENIED);
|
_ERROR(PERMISSION_DENIED);
|
||||||
_ERROR(INVALID_OBJECT);
|
_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;
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -155,7 +155,7 @@ pub_eo_types_files = []
|
||||||
|
|
||||||
efl_src += files([
|
efl_src += files([
|
||||||
'efl_interfaces_main.c',
|
'efl_interfaces_main.c',
|
||||||
'efl_model_common.c',
|
'efl_mvvm_common.c',
|
||||||
'efl_gfx_path.c',
|
'efl_gfx_path.c',
|
||||||
'efl_gfx_shape.c',
|
'efl_gfx_shape.c',
|
||||||
'efl_gfx_color.c',
|
'efl_gfx_color.c',
|
||||||
|
|
|
@ -3,7 +3,7 @@ efl_pub_deps = [eo]
|
||||||
|
|
||||||
efl_header_src = [
|
efl_header_src = [
|
||||||
'Efl.h',
|
'Efl.h',
|
||||||
'Efl_Model_Common.h'
|
'Efl_MVVM_Common.h'
|
||||||
]
|
]
|
||||||
|
|
||||||
efl_src = []
|
efl_src = []
|
||||||
|
|
Loading…
Reference in New Issue