OpenNI 1.5.4
|
XnLogTypes.h
Go to the documentation of this file.
00001 /**************************************************************************** 00002 * * 00003 * OpenNI 1.x Alpha * 00004 * Copyright (C) 2011 PrimeSense Ltd. * 00005 * * 00006 * This file is part of OpenNI. * 00007 * * 00008 * OpenNI is free software: you can redistribute it and/or modify * 00009 * it under the terms of the GNU Lesser General Public License as published * 00010 * by the Free Software Foundation, either version 3 of the License, or * 00011 * (at your option) any later version. * 00012 * * 00013 * OpenNI is distributed in the hope that it will be useful, * 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00016 * GNU Lesser General Public License for more details. * 00017 * * 00018 * You should have received a copy of the GNU Lesser General Public License * 00019 * along with OpenNI. If not, see <http://www.gnu.org/licenses/>. * 00020 * * 00021 ****************************************************************************/ 00022 #ifndef __XN_LOG_TYPES_H__ 00023 #define __XN_LOG_TYPES_H__ 00024 00025 //--------------------------------------------------------------------------- 00026 // Includes 00027 //--------------------------------------------------------------------------- 00028 #include "XnPlatform.h" 00029 #include "XnTypes.h" 00030 00031 //--------------------------------------------------------------------------- 00032 // Defines 00033 //--------------------------------------------------------------------------- 00034 #define XN_LOG_DIR_NAME "Log" 00035 #define XN_MASK_LOG "Log" 00036 #define XN_LOG_MASK_ALL "ALL" 00037 #define XN_LOG_MAX_MASK_NAME 16 00038 00039 //--------------------------------------------------------------------------- 00040 // Enums 00041 //--------------------------------------------------------------------------- 00042 typedef enum XnLogSeverity 00043 { 00044 XN_LOG_VERBOSE = 0, 00045 XN_LOG_INFO = 1, 00046 XN_LOG_WARNING = 2, 00047 XN_LOG_ERROR = 3, 00048 XN_LOG_SEVERITY_NONE = 10, 00049 } XnLogSeverity; 00050 00051 //--------------------------------------------------------------------------- 00052 // Structs 00053 //--------------------------------------------------------------------------- 00054 typedef struct XnLogger 00055 { 00056 volatile XnLogSeverity nMinSeverity; 00057 void* pInternal; 00058 } XnLogger; 00059 00060 typedef struct XnLogEntry 00061 { 00062 XnUInt64 nTimestamp; 00063 XnLogSeverity nSeverity; 00064 const XnChar* strSeverity; 00065 const XnChar* strMask; 00066 const XnChar* strMessage; 00067 const XnChar* strFile; 00068 XnUInt32 nLine; 00069 } XnLogEntry; 00070 00071 typedef struct XnLogWriter 00072 { 00073 void* pCookie; 00074 void (XN_CALLBACK_TYPE* WriteEntry)(const XnLogEntry* pEntry, void* pCookie); 00075 void (XN_CALLBACK_TYPE* WriteUnformatted)(const XnChar* strMessage, void* pCookie); 00076 void (XN_CALLBACK_TYPE* OnConfigurationChanged)(void* pCookie); 00077 void (XN_CALLBACK_TYPE* OnClosing)(void* pCookie); 00078 } XnLogWriter; 00079 00080 #endif // __XN_LOG_TYPES_H__
Generated on Wed May 16 2012 10:16:05 for OpenNI 1.5.4 by 1.7.5.1