OpenNI 1.5.4
XnLogTypes.h
Go to the documentation of this file.
1 /****************************************************************************
2 * *
3 * OpenNI 1.x Alpha *
4 * Copyright (C) 2011 PrimeSense Ltd. *
5 * *
6 * This file is part of OpenNI. *
7 * *
8 * OpenNI is free software: you can redistribute it and/or modify *
9 * it under the terms of the GNU Lesser General Public License as published *
10 * by the Free Software Foundation, either version 3 of the License, or *
11 * (at your option) any later version. *
12 * *
13 * OpenNI is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16 * GNU Lesser General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU Lesser General Public License *
19 * along with OpenNI. If not, see <http://www.gnu.org/licenses/>. *
20 * *
21 ****************************************************************************/
22 #ifndef __XN_LOG_TYPES_H__
23 #define __XN_LOG_TYPES_H__
24 
25 //---------------------------------------------------------------------------
26 // Includes
27 //---------------------------------------------------------------------------
28 #include "XnPlatform.h"
29 #include "XnTypes.h"
30 
31 //---------------------------------------------------------------------------
32 // Defines
33 //---------------------------------------------------------------------------
34 #define XN_LOG_DIR_NAME "Log"
35 #define XN_MASK_LOG "Log"
36 #define XN_LOG_MASK_ALL "ALL"
37 #define XN_LOG_MAX_MASK_NAME 16
38 
39 //---------------------------------------------------------------------------
40 // Enums
41 //---------------------------------------------------------------------------
42 typedef enum XnLogSeverity
43 {
50 
51 //---------------------------------------------------------------------------
52 // Structs
53 //---------------------------------------------------------------------------
54 typedef struct XnLogger
55 {
57  void* pInternal;
58 } XnLogger;
59 
60 typedef struct XnLogEntry
61 {
62  XnUInt64 nTimestamp;
64  const XnChar* strSeverity;
65  const XnChar* strMask;
66  const XnChar* strMessage;
67  const XnChar* strFile;
68  XnUInt32 nLine;
69 } XnLogEntry;
70 
71 typedef struct XnLogWriter
72 {
73  void* pCookie;
74  void (XN_CALLBACK_TYPE* WriteEntry)(const XnLogEntry* pEntry, void* pCookie);
75  void (XN_CALLBACK_TYPE* WriteUnformatted)(const XnChar* strMessage, void* pCookie);
76  void (XN_CALLBACK_TYPE* OnConfigurationChanged)(void* pCookie);
77  void (XN_CALLBACK_TYPE* OnClosing)(void* pCookie);
78 } XnLogWriter;
79 
80 #endif // __XN_LOG_TYPES_H__
struct XnLogEntry XnLogEntry
volatile XnLogSeverity nMinSeverity
Definition: XnLogTypes.h:56
XnUInt64 nTimestamp
Definition: XnLogTypes.h:62
XnLogSeverity
Definition: XnLogTypes.h:42
XnLogSeverity nSeverity
Definition: XnLogTypes.h:63
Definition: XnLogTypes.h:45
Definition: XnLogTypes.h:47
const XnChar * strFile
Definition: XnLogTypes.h:67
Definition: XnLogTypes.h:60
Definition: XnLogTypes.h:48
void * pInternal
Definition: XnLogTypes.h:57
Definition: XnLogTypes.h:71
void * pCookie
Definition: XnLogTypes.h:73
const XnChar * strSeverity
Definition: XnLogTypes.h:64
struct XnLogWriter XnLogWriter
const XnChar * strMessage
Definition: XnLogTypes.h:66
Definition: XnLogTypes.h:44
Definition: XnLogTypes.h:46
Definition: XnLogTypes.h:54
struct XnLogger XnLogger
XnUInt32 nLine
Definition: XnLogTypes.h:68
const XnChar * strMask
Definition: XnLogTypes.h:65