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//---------------------------------------------------------------------------
50
51//---------------------------------------------------------------------------
52// Structs
53//---------------------------------------------------------------------------
54typedef struct XnLogger
55{
57 void* pInternal;
59
60typedef 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;
70
71typedef 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);
79
80#endif // __XN_LOG_TYPES_H__
struct XnLogWriter XnLogWriter
struct XnLogger XnLogger
struct XnLogEntry XnLogEntry
XnLogSeverity
Definition XnLogTypes.h:43
@ XN_LOG_VERBOSE
Definition XnLogTypes.h:44
@ XN_LOG_INFO
Definition XnLogTypes.h:45
@ XN_LOG_ERROR
Definition XnLogTypes.h:47
@ XN_LOG_SEVERITY_NONE
Definition XnLogTypes.h:48
@ XN_LOG_WARNING
Definition XnLogTypes.h:46
Definition XnLogTypes.h:61
XnUInt64 nTimestamp
Definition XnLogTypes.h:62
XnLogSeverity nSeverity
Definition XnLogTypes.h:63
const XnChar * strFile
Definition XnLogTypes.h:67
const XnChar * strMessage
Definition XnLogTypes.h:66
const XnChar * strSeverity
Definition XnLogTypes.h:64
XnUInt32 nLine
Definition XnLogTypes.h:68
const XnChar * strMask
Definition XnLogTypes.h:65
Definition XnLogTypes.h:72
void(* WriteUnformatted)(const XnChar *strMessage, void *pCookie)
Definition XnLogTypes.h:75
void(* OnClosing)(void *pCookie)
Definition XnLogTypes.h:77
void(* OnConfigurationChanged)(void *pCookie)
Definition XnLogTypes.h:76
void * pCookie
Definition XnLogTypes.h:73
void(* WriteEntry)(const XnLogEntry *pEntry, void *pCookie)
Definition XnLogTypes.h:74
Definition XnLogTypes.h:55
volatile XnLogSeverity nMinSeverity
Definition XnLogTypes.h:56
void * pInternal
Definition XnLogTypes.h:57