summaryrefslogtreecommitdiffabout
path: root/include/sitecing/magic.h
blob: 4802fccfc113713263eb1a9a0fecd4292baba990 (plain)
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
#ifndef	__SITECING_MAGIC_H
#define __SITECING_MAGIC_H

/**
 * @file
 * @brief The magic numbers globally defined.
 */

namespace sitecing {

    /**
     * The magic numbers enumeration.
     */
    enum {
	/**
	 * There is no magic.
	 */
	__magic_none = 0,
	/**
	 * Here is where user-defined magic starts.
	 */
	__user_magical_numbers_start = 1,
	/**
	 * Here is where site-C-ing defined magic starts.
	 */
	__sitecing_magical_numbers_start = 0x8000,
	/**
	 * The compiler error occured. The parameters passed are:
	 *
	 * char *message, char *root_source, char *root_intermediate, char *root_so, char *component
	 */
	__magic_compile_error,
	/**
	 * The preprocessor error occured. The parameters passed are:
	 *
	 * char *message, char *root_source, char *root_intermediate, char *root_so, char *component,
	 * int line_number
	 */
	__magic_preprocess_error,
	/**
	 * Exception caught while executing the component. The parameters passed are:
	 *
	 * char *message, char *root_source, char *root_intermediate, char *root_so, char *component,
	 * const exception *exception_caught
	 */
	__magic_generic_exception,
	/**
	 * The component called as an action handler. The parameters passed are:
	 *
	 * char *root_source, char *root_intermediate, char *root_so, list<string>* args
	 */
	__magic_action,
	/**
	 * The component called as an HTTP status handler. The parameters passed are:
	 *
	 * char *root_source, char *root_intermediate, char *root_so, char *component,
	 * const http_status *http_status_caught
	 */
	__magic_http_status
    };
}

#endif /* __SITECING_MAGIC_H */