nds2-client - ClientAdministrator  0.16.8
 All Functions Typedefs Enumerations Enumerator Groups Pages
nds_logging.h
1 /* -*- tab-width:8 c-basic-offset:4 indent-tabs-mode:nil -*- */
2 /* set vi: ts=8:softtabstop=4,shiftwidth=4,expandtab */
3 
4 #ifndef NDS_LOGGING_H
5 #define NDS_LOGGING_H
6 
7 #ifdef __cplusplus
8 extern "C" {
9 /* } */
10 #endif
11 
12 #ifndef DLL_EXPORT
13 #if defined _WIN32 || defined _WIN64
14 #define DLL_EXPORT __declspec( dllexport )
15 #else
16 #define DLL_EXPORT
17 #endif /* WIN32 || WIN64 */
18 #endif /* DLL_EXPORT */
19 
20 #define NDS_LOG_BAD_GROUP -1
21 #define NDS_LOG_GROUP_CONNECTION 0
22 #define NDS_LOG_GROUP_VERBOSE_ERRORS 1
23 #define NDS_LOG_GROUP_TRACE_ENTRY_EXIT 2
24 #define NDS_LOG_GROUP_STATUS_UPDATE 3
25 #define NDS_LOG_GROUP_USER 4
26 #define NDS_LOG_GROUP_SIZE_MAX 5
27 
28 #define NDS_LOGGING_HELPER_ENTRY nds_logging_helper_init
29 #define STRING_IT( x ) #x
30 #define XSTRING_IT( x ) STRING_IT( x )
31 #define NDS_LOGGING_HELPER_ENTRY_STRING XSTRING_IT( NDS_LOGGING_HELPER_ENTRY )
32 
33 typedef void ( *nds_flush_function_type )( );
34 
35 typedef void ( *nds_logging_function_type )( const char* Message );
36 
37 typedef void ( *nds_logging_helper_entry_type )( );
38 
39 DLL_EXPORT void nds_function_flush( nds_flush_function_type Func );
40 
41 DLL_EXPORT void nds_function_logging( nds_logging_function_type Func );
42 
43 DLL_EXPORT int nds_logging_check( int Group, int Level );
44 
45 DLL_EXPORT void nds_logging_enable( int Group );
46 
47 DLL_EXPORT void nds_logging_disable( int Group );
48 
49 DLL_EXPORT int nds_logging_debug_level( int Group, int Level );
50 
51 DLL_EXPORT void nds_logging_flush( );
52 
53 DLL_EXPORT int nds_logging_group_from_string( const char* GroupString );
54 
55 DLL_EXPORT void nds_logging_init( );
56 
57 DLL_EXPORT void nds_logging_printf( const char* MessageFormat, ... );
58 
59 DLL_EXPORT void nds_logging_print_errno( const char* Leader );
60 
61 #ifdef __cplusplus
62 /* { */
63 }
64 #endif
65 
66 #endif /* NDS_LOGGING_H */