OpenNI 1.3.2
XnLogTypes.h
Go to the documentation of this file.
1 /****************************************************************************
2 * *
3 * OpenNI 1.1 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_LOG_MASKS_STRING_LEN 600
36 #define XN_MASK_LOG "Log"
37 #define XN_LOG_MASK_ALL "ALL"
38 
39 //---------------------------------------------------------------------------
40 // Enums
41 //---------------------------------------------------------------------------
42 typedef enum XnLogSeverity
43 {
49 
50 typedef enum XnLogFilteringType
51 {
56 
57 //---------------------------------------------------------------------------
58 // Structs
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__