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 //---------------------------------------------------------------------------
41 typedef enum XnLogSeverity
42 {
49 
50 //---------------------------------------------------------------------------
51 // Structs
52 //---------------------------------------------------------------------------
53 typedef struct XnLogger
54 {
56  void* pInternal;
57 } XnLogger;
58 
59 typedef 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;
68 } XnLogEntry;
69 
70 typedef 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);
77 } XnLogWriter;
78 
79 #endif // __XN_LOG_TYPES_H__
struct XnLogEntry XnLogEntry
volatile XnLogSeverity nMinSeverity
Definition: XnLogTypes.h:55
XnUInt64 nTimestamp
Definition: XnLogTypes.h:61
XnLogSeverity
Definition: XnLogTypes.h:41
XnLogSeverity nSeverity
Definition: XnLogTypes.h:62
Definition: XnLogTypes.h:44
Definition: XnLogTypes.h:46
const XnChar * strFile
Definition: XnLogTypes.h:66
Definition: XnLogTypes.h:59
Definition: XnLogTypes.h:47
void * pInternal
Definition: XnLogTypes.h:56
Definition: XnLogTypes.h:70
void * pCookie
Definition: XnLogTypes.h:72
const XnChar * strSeverity
Definition: XnLogTypes.h:63
struct XnLogWriter XnLogWriter
const XnChar * strMessage
Definition: XnLogTypes.h:65
Definition: XnLogTypes.h:43
Definition: XnLogTypes.h:45
Definition: XnLogTypes.h:53
struct XnLogger XnLogger
XnUInt32 nLine
Definition: XnLogTypes.h:67
const XnChar * strMask
Definition: XnLogTypes.h:64