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__
XN_LOG_INFO
Definition: XnLogTypes.h:43
XnLogEntry::strFile
const XnChar * strFile
Definition: XnLogTypes.h:65
XnLogSeverity
XnLogSeverity
Definition: XnLogTypes.h:40
XnLogger
struct XnLogger XnLogger
XN_LOG_SEVERITY_NONE
Definition: XnLogTypes.h:46
XnLogger::pInternal
void * pInternal
Definition: XnLogTypes.h:55
XnLogger::nMinSeverity
volatile XnLogSeverity nMinSeverity
Definition: XnLogTypes.h:54
XnLogEntry
struct XnLogEntry XnLogEntry
XnLogWriter::WriteEntry
void(* WriteEntry)(const XnLogEntry *pEntry, void *pCookie)
Definition: XnLogTypes.h:72
XnLogEntry
Definition: XnLogTypes.h:58
XnLogWriter::OnClosing
void(* OnClosing)(void *pCookie)
Definition: XnLogTypes.h:75
XnLogEntry::strMask
const XnChar * strMask
Definition: XnLogTypes.h:63
XnLogEntry::nLine
XnUInt32 nLine
Definition: XnLogTypes.h:66
XnLogWriter::pCookie
void * pCookie
Definition: XnLogTypes.h:71
XnLogWriter
Definition: XnLogTypes.h:69
XnTypes.h
XnLogEntry::strMessage
const XnChar * strMessage
Definition: XnLogTypes.h:64
XnLogWriter::OnConfigurationChanged
void(* OnConfigurationChanged)(void *pCookie)
Definition: XnLogTypes.h:74
XN_LOG_WARNING
Definition: XnLogTypes.h:44
XnLogEntry::nSeverity
XnLogSeverity nSeverity
Definition: XnLogTypes.h:61
XnLogEntry::nTimestamp
XnUInt64 nTimestamp
Definition: XnLogTypes.h:60
XnLogEntry::strSeverity
const XnChar * strSeverity
Definition: XnLogTypes.h:62
XnLogWriter
struct XnLogWriter XnLogWriter
XN_LOG_VERBOSE
Definition: XnLogTypes.h:42
XnPlatform.h
XnLogWriter::WriteUnformatted
void(* WriteUnformatted)(const XnChar *strMessage, void *pCookie)
Definition: XnLogTypes.h:73
XN_LOG_ERROR
Definition: XnLogTypes.h:45
XnLogger
Definition: XnLogTypes.h:52