1 #ifndef _IMAGES_ERROR_H
2 #define _IMAGES_ERROR_H
4 #ifdef CONFIG_UCW_CLEAN_ABI
5 #define image_trace ucw_image_trace
8 extern uint image_trace; /* ImageLib.Trace */
13 IMAGE_MSG_TYPE = 0xff000000,
14 IMAGE_MSG_TRACE = (L_DEBUG << 24),
15 IMAGE_MSG_WARN = (L_WARN << 24),
16 IMAGE_MSG_ERROR = (L_ERROR << 24),
17 IMAGE_TRACE_LEVEL = 0x0000ffff,
18 IMAGE_WARN_TYPE = 0x0000ffff,
19 IMAGE_WARN_SUBTYPE = 0x00ff0000,
20 IMAGE_ERROR_TYPE = 0x0000ffff,
21 IMAGE_ERROR_SUBTYPE = 0x00ff0000,
22 IMAGE_ERROR_NOT_IMPLEMENTED = 1,
23 IMAGE_ERROR_INVALID_DIMENSIONS = 2,
24 IMAGE_ERROR_INVALID_FILE_FORMAT = 3,
25 IMAGE_ERROR_INVALID_PIXEL_FORMAT = 4,
26 IMAGE_ERROR_READ_FAILED = 5,
27 IMAGE_ERROR_WRITE_FAILED = 6,
32 #define IMAGE_WARN(ctx, type, msg...) image_context_msg((ctx), IMAGE_MSG_WARN | (type), msg)
33 #define IMAGE_ERROR(ctx, type, msg...) image_context_msg((ctx), IMAGE_MSG_ERROR | (type), msg)
35 #define IMAGE_TRACE(ctx, level, msg...) do { \
36 struct image_context *_ctx = (ctx); uint _level = (level); \
37 if (_level < _ctx->tracing_level) image_context_msg(_ctx, IMAGE_MSG_TRACE | _level, msg); } while (0)