File: direct_result.c

package info (click to toggle)
directfb 1.7.7-11
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 32,212 kB
  • sloc: ansic: 306,760; cpp: 46,357; sh: 11,720; makefile: 5,620; perl: 662; asm: 507; xml: 116
file content (79 lines) | stat: -rw-r--r-- 4,358 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#include <config.h>

#include <direct/types.h>


/*
 * Generated by mkresult.sh
 */

#include <direct/result.h>

static const char *DirectResult__strings[DR__RESULT_END - DR__RESULT_BASE];

static DirectResultType DirectResult__type = {
     0, 0,
     DR__RESULT_BASE,
     DirectResult__strings,
     sizeof(DirectResult__strings) / sizeof(char*)
};

void
DirectResult__init(void);

void
DirectResult__init(void)
{
     DirectResult__strings[0] = "DirectResult";

     DirectResult__strings[D_RESULT_INDEX(DR_FAILURE)] = "A general or unknown error occured";
     DirectResult__strings[D_RESULT_INDEX(DR_INIT)] = "A general initialization error occured";
     DirectResult__strings[D_RESULT_INDEX(DR_BUG)] = "Internal bug or inconsistency has been detected";
     DirectResult__strings[D_RESULT_INDEX(DR_DEAD)] = "Interface has a zero reference counter (available in debug mode)";
     DirectResult__strings[D_RESULT_INDEX(DR_UNSUPPORTED)] = "The requested operation or an argument is (currently) not supported";
     DirectResult__strings[D_RESULT_INDEX(DR_UNIMPLEMENTED)] = "The requested operation is not implemented, yet";
     DirectResult__strings[D_RESULT_INDEX(DR_ACCESSDENIED)] = "Access to the resource is denied";
     DirectResult__strings[D_RESULT_INDEX(DR_INVAREA)] = "An invalid area has been specified or detected";
     DirectResult__strings[D_RESULT_INDEX(DR_INVARG)] = "An invalid argument has been specified";
     DirectResult__strings[D_RESULT_INDEX(DR_NOLOCALMEMORY)] = "There's not enough local system memory";
     DirectResult__strings[D_RESULT_INDEX(DR_NOSHAREDMEMORY)] = "There's not enough shared system memory";
     DirectResult__strings[D_RESULT_INDEX(DR_LOCKED)] = "The resource is (already) locked";
     DirectResult__strings[D_RESULT_INDEX(DR_BUFFEREMPTY)] = "The buffer is empty";
     DirectResult__strings[D_RESULT_INDEX(DR_FILENOTFOUND)] = "The specified file has not been found";
     DirectResult__strings[D_RESULT_INDEX(DR_IO)] = "A general I/O error occured";
     DirectResult__strings[D_RESULT_INDEX(DR_BUSY)] = "The resource or device is busy";
     DirectResult__strings[D_RESULT_INDEX(DR_NOIMPL)] = "No implementation for this interface or content type has been found";
     DirectResult__strings[D_RESULT_INDEX(DR_TIMEOUT)] = "The operation timed out";
     DirectResult__strings[D_RESULT_INDEX(DR_THIZNULL)] = "'thiz' pointer is NULL";
     DirectResult__strings[D_RESULT_INDEX(DR_IDNOTFOUND)] = "No resource has been found by the specified id";
     DirectResult__strings[D_RESULT_INDEX(DR_DESTROYED)] = "The requested object has been destroyed";
     DirectResult__strings[D_RESULT_INDEX(DR_FUSION)] = "Internal fusion error detected, most likely related to IPC resources";
     DirectResult__strings[D_RESULT_INDEX(DR_BUFFERTOOLARGE)] = "Buffer is too large";
     DirectResult__strings[D_RESULT_INDEX(DR_INTERRUPTED)] = "The operation has been interrupted";
     DirectResult__strings[D_RESULT_INDEX(DR_NOCONTEXT)] = "No context available";
     DirectResult__strings[D_RESULT_INDEX(DR_TEMPUNAVAIL)] = "Temporarily unavailable";
     DirectResult__strings[D_RESULT_INDEX(DR_LIMITEXCEEDED)] = "Attempted to exceed limit, i.e. any kind of maximum size, count etc";
     DirectResult__strings[D_RESULT_INDEX(DR_NOSUCHMETHOD)] = "Requested method is not known";
     DirectResult__strings[D_RESULT_INDEX(DR_NOSUCHINSTANCE)] = "Requested instance is not known";
     DirectResult__strings[D_RESULT_INDEX(DR_ITEMNOTFOUND)] = "No such item found";
     DirectResult__strings[D_RESULT_INDEX(DR_VERSIONMISMATCH)] = "Some versions didn't match";
     DirectResult__strings[D_RESULT_INDEX(DR_EOF)] = "Reached end of file";
     DirectResult__strings[D_RESULT_INDEX(DR_SUSPENDED)] = "The requested object is suspended";
     DirectResult__strings[D_RESULT_INDEX(DR_INCOMPLETE)] = "The operation has been executed, but not completely";
     DirectResult__strings[D_RESULT_INDEX(DR_NOCORE)] = "Core part not available";
     DirectResult__strings[D_RESULT_INDEX(DR_SIGNALLED)] = "Received a signal, e.g. while waiting";
     DirectResult__strings[D_RESULT_INDEX(DR_TASK_NOT_FOUND)] = "The corresponding task has not been found";

     DirectResultTypeRegister( &DirectResult__type );
}

void
DirectResult__deinit(void);

void
DirectResult__deinit(void)
{
     DirectResultTypeUnregister( &DirectResult__type );
}