diff options
Diffstat (limited to 'hugin.h')
-rw-r--r-- | hugin.h | 88 |
1 files changed, 44 insertions, 44 deletions
@@ -28,49 +28,49 @@ #ifndef __HUGIN_HUGIN_H__ #define __HUGIN_HUGIN_H__ -enum DBG_FLAG { +enum HUG_FLAG { // Features -#ifdef WITH_DBG_THREAD - DBG_FLAG_USE_THREAD = 0x00000001, +#ifdef WITH_HUG_THREAD + HUG_FLAG_USE_THREAD = 0x00000001, #endif -#ifdef WITH_DBG_MUTEX - DBG_FLAG_USE_MUTEX = 0x00000002, +#ifdef WITH_HUG_MUTEX + HUG_FLAG_USE_MUTEX = 0x00000002, #endif -#ifdef WITH_DBG_FILTER - DBG_FLAG_USE_FILTER = 0x00000004, +#ifdef WITH_HUG_FILTER + HUG_FLAG_USE_FILTER = 0x00000004, #endif // Outputs - DBG_FLAG_OUTPUT_TO_STDOUT = 0x00010000, - DBG_FLAG_OUTPUT_TO_STDERR = 0x00020000, - DBG_FLAG_OUTPUT_TO_FD = 0x00040000, - DBG_FLAG_OUTPUT_TO_FILE = 0x00080000, -#ifdef WITH_DBG_SYSLOG - DBG_FLAG_OUTPUT_TO_SYSLOG = 0x00100000, + HUG_FLAG_OUTPUT_TO_STDOUT = 0x00010000, + HUG_FLAG_OUTPUT_TO_STDERR = 0x00020000, + HUG_FLAG_OUTPUT_TO_FD = 0x00040000, + HUG_FLAG_OUTPUT_TO_FILE = 0x00080000, +#ifdef WITH_HUG_SYSLOG + HUG_FLAG_OUTPUT_TO_SYSLOG = 0x00100000, #endif // Default value of flags - DBG_FLAG_DEFAULT = DBG_FLAG_OUTPUT_TO_STDOUT, // Output to stdout + HUG_FLAG_DEFAULT = HUG_FLAG_OUTPUT_TO_STDOUT, // Output to stdout }; -enum DBG_OPTION { +enum HUG_OPTION { /** * No more options / last option. This is used * to terminate the VARARGs list. */ - DBG_OPTION_END, + HUG_OPTION_END, /** * const char* argument containing a filename which will be used for log - * output. To be used with the DBG_FLAG_OUTPUT_TO_FILE flag. + * output. To be used with the HUG_FLAG_OUTPUT_TO_FILE flag. */ - DBG_OPTION_FILENAME, + HUG_OPTION_FILENAME, /** * Integer argument describing a file descriptor which will be used for log - * output. To be used with the DBG_FLAG_OUTPUT_TO_FD flag. + * output. To be used with the HUG_FLAG_OUTPUT_TO_FD flag. */ - DBG_OPTION_FD, + HUG_OPTION_FD, /** * Set this option to make the stdout output to be printed without any date @@ -80,22 +80,22 @@ enum DBG_OPTION { * 0 := use date * 1 := do not use date. */ - DBG_OPTION_STDOUT_NO_DATE, + HUG_OPTION_STDOUT_NO_DATE, /** * Host and port to use when logging on an external server. * Host is a const char* argument, port is an integer. - * To be used with the DBG_FLAG_USE_SYSLOG flag. - * Linux: If DBG_OPTION_SYSLOG_HOST is not supplied, the local syslog will be + * To be used with the HUG_FLAG_USE_SYSLOG flag. + * Linux: If HUG_OPTION_SYSLOG_HOST is not supplied, the local syslog will be * used. - * Windows: If DBG_OPTION_SYSLOG_HOST is not supplied an error will be + * Windows: If HUG_OPTION_SYSLOG_HOST is not supplied an error will be * returned by hugin_init. - * If DBG_OPTION_SYSLOG_PORT is not supplied, the default syslogd port will + * If HUG_OPTION_SYSLOG_PORT is not supplied, the default syslogd port will * be used (port 514). */ -#ifdef WITH_DBG_SYSLOG - DBG_OPTION_SYSLOG_HOST, - DBG_OPTION_SYSLOG_PORT, +#ifdef WITH_HUG_SYSLOG + HUG_OPTION_SYSLOG_HOST, + HUG_OPTION_SYSLOG_PORT, #endif /** @@ -105,36 +105,36 @@ enum DBG_OPTION { * | class[+-]channel * | [+-]all */ -#ifdef WITH_DBG_FILTER - DBG_OPTION_FILTER, +#ifdef WITH_HUG_FILTER + HUG_OPTION_FILTER, #endif }; typedef enum { - DBG_STATUS_OK = 0, - DBG_STATUS_UNKNOWN_OPTION, - DBG_STATUS_ERROR, -} dbg_status_t; + HUG_STATUS_OK = 0, + HUG_STATUS_UNKNOWN_OPTION, + HUG_STATUS_ERROR, +} hug_status_t; /** - * @param flags combination of DBG_FLAG values + * @param flags combination of HUG_FLAG values * @param ... list of options (type-value pairs, - * terminated with DBG_OPTION_END). + * terminated with HUG_OPTION_END). * @return 0 on success, 1 on error. */ -dbg_status_t dbg_init(unsigned int flags, ...); -void dbg_close(); +hug_status_t hug_init(unsigned int flags, ...); +void hug_close(); /** * Example of usage (use mutex protected calls, send output to file): * - * dbg_status_t status; - * status = hugin_init(DBG_FLAG_OUTPUT_TO_FILE | DBG_FLAG_USE_MUTEX, - * DBG_OPTION_FILENAME, "/tmp/my.log", - DBG_OPTION_END); - * if(status != DBG_STATUS_OK) exit(1); + * hug_status_t status; + * status = hugin_init(HUG_FLAG_OUTPUT_TO_FILE | HUG_FLAG_USE_MUTEX, + * HUG_OPTION_FILENAME, "/tmp/my.log", + HUG_OPTION_END); + * if(status != HUG_STATUS_OK) exit(1); * INFO(example, "We are up and running\n"); - * dbg_close(); + * hug_close(); */ /** |