2008-08-06 11:15:24 -07:00
|
|
|
/* EINA - EFL data type library
|
|
|
|
* Copyright (C) 2007-2008 Jorge Luis Zapata Muga, Cedric Bail
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library;
|
|
|
|
* if not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2008-07-30 05:46:55 -07:00
|
|
|
#ifndef EINA_ERROR_H_
|
|
|
|
#define EINA_ERROR_H_
|
|
|
|
|
2008-08-08 03:39:47 -07:00
|
|
|
#include <stdarg.h>
|
|
|
|
|
2008-07-30 06:35:49 -07:00
|
|
|
#include "eina_types.h"
|
|
|
|
|
2008-09-17 11:55:54 -07:00
|
|
|
/**
|
2008-09-18 22:22:43 -07:00
|
|
|
* @addtogroup Eina_Tools_Group Tools
|
2008-09-17 11:55:54 -07:00
|
|
|
*
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
|
2008-09-05 00:58:38 -07:00
|
|
|
/**
|
2008-09-18 22:22:43 -07:00
|
|
|
* @defgroup Eina_Error_Group Error
|
2008-09-05 00:58:38 -07:00
|
|
|
*
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @typedef Eina_Error
|
|
|
|
* Error type.
|
|
|
|
*/
|
2008-08-04 10:00:30 -07:00
|
|
|
typedef int Eina_Error;
|
2008-09-05 00:58:38 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @var EINA_ERROR_OUT_OF_MEMORY
|
|
|
|
* Error identifier corresponding to a lack of memory.
|
|
|
|
*/
|
2008-08-13 02:25:22 -07:00
|
|
|
EAPI extern Eina_Error EINA_ERROR_OUT_OF_MEMORY;
|
2008-08-07 06:09:09 -07:00
|
|
|
|
2010-08-15 23:14:19 -07:00
|
|
|
EAPI Eina_Error eina_error_msg_register(const char *msg) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
|
|
|
|
EAPI Eina_Error eina_error_msg_static_register(const char *msg) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
|
|
|
|
EAPI Eina_Bool eina_error_msg_modify(Eina_Error error,
|
2010-10-01 05:18:04 -07:00
|
|
|
const char *msg) EINA_ARG_NONNULL(2);
|
2010-08-15 23:14:19 -07:00
|
|
|
EAPI Eina_Error eina_error_get(void);
|
|
|
|
EAPI void eina_error_set(Eina_Error err);
|
|
|
|
EAPI const char * eina_error_msg_get(Eina_Error error) EINA_PURE;
|
2008-07-30 05:46:55 -07:00
|
|
|
|
2008-09-17 11:55:54 -07:00
|
|
|
/**
|
|
|
|
* @}
|
|
|
|
*/
|
|
|
|
|
2008-09-05 00:58:38 -07:00
|
|
|
/**
|
|
|
|
* @}
|
|
|
|
*/
|
|
|
|
|
|
|
|
#endif /* EINA_ERROR_H_ */
|