OpenNI 1.5.7
XnLogTypes.h
Go to the documentation of this file.
1/*****************************************************************************
2* *
3* OpenNI 1.x Alpha *
4* Copyright (C) 2012 PrimeSense Ltd. *
5* *
6* This file is part of OpenNI. *
7* *
8* Licensed under the Apache License, Version 2.0 (the "License"); *
9* you may not use this file except in compliance with the License. *
10* You may obtain a copy of the License at *
11* *
12* http://www.apache.org/licenses/LICENSE-2.0 *
13* *
14* Unless required by applicable law or agreed to in writing, software *
15* distributed under the License is distributed on an "AS IS" BASIS, *
16* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
17* See the License for the specific language governing permissions and *
18* limitations under the License. *
19* *
20*****************************************************************************/
21#ifndef __XN_LOG_TYPES_H__
22#define __XN_LOG_TYPES_H__
23
24//---------------------------------------------------------------------------
25// Includes
26//---------------------------------------------------------------------------
27#include "XnPlatform.h"
28#include "XnTypes.h"
29
30//---------------------------------------------------------------------------
31// Defines
32//---------------------------------------------------------------------------
33#define XN_LOG_DIR_NAME "Log"
34#define XN_MASK_LOG "Log"
35#define XN_LOG_MASK_ALL "ALL"
36#define XN_LOG_MAX_MASK_NAME 16
37
38//---------------------------------------------------------------------------
39// Enums
40//---------------------------------------------------------------------------
49
50//---------------------------------------------------------------------------
51// Structs
52//---------------------------------------------------------------------------
53typedef struct XnLogger
54{
56 void* pInternal;
58
59typedef struct XnLogEntry
60{
61 XnUInt64 nTimestamp;
63 const XnChar* strSeverity;
64 const XnChar* strMask;
65 const XnChar* strMessage;
66 const XnChar* strFile;
67 XnUInt32 nLine;
69
70typedef struct XnLogWriter
71{
72 void* pCookie;
73 void (XN_CALLBACK_TYPE* WriteEntry)(const XnLogEntry* pEntry, void* pCookie);
74 void (XN_CALLBACK_TYPE* WriteUnformatted)(const XnChar* strMessage, void* pCookie);
75 void (XN_CALLBACK_TYPE* OnConfigurationChanged)(void* pCookie);
76 void (XN_CALLBACK_TYPE* OnClosing)(void* pCookie);
78
79#endif // __XN_LOG_TYPES_H__
struct XnLogWriter XnLogWriter
struct XnLogger XnLogger
struct XnLogEntry XnLogEntry
XnLogSeverity
Definition XnLogTypes.h:42
@ XN_LOG_VERBOSE
Definition XnLogTypes.h:43
@ XN_LOG_INFO
Definition XnLogTypes.h:44
@ XN_LOG_ERROR
Definition XnLogTypes.h:46
@ XN_LOG_SEVERITY_NONE
Definition XnLogTypes.h:47
@ XN_LOG_WARNING
Definition XnLogTypes.h:45
Definition XnLogTypes.h:60
XnUInt64 nTimestamp
Definition XnLogTypes.h:61
XnLogSeverity nSeverity
Definition XnLogTypes.h:62
const XnChar * strFile
Definition XnLogTypes.h:66
const XnChar * strMessage
Definition XnLogTypes.h:65
const XnChar * strSeverity
Definition XnLogTypes.h:63
XnUInt32 nLine
Definition XnLogTypes.h:67
const XnChar * strMask
Definition XnLogTypes.h:64
Definition XnLogTypes.h:71
void(* WriteUnformatted)(const XnChar *strMessage, void *pCookie)
Definition XnLogTypes.h:74
void(* OnClosing)(void *pCookie)
Definition XnLogTypes.h:76
void(* OnConfigurationChanged)(void *pCookie)
Definition XnLogTypes.h:75
void * pCookie
Definition XnLogTypes.h:72
void(* WriteEntry)(const XnLogEntry *pEntry, void *pCookie)
Definition XnLogTypes.h:73
Definition XnLogTypes.h:54
volatile XnLogSeverity nMinSeverity
Definition XnLogTypes.h:55
void * pInternal
Definition XnLogTypes.h:56