Main Page | Modules | Namespace List | Class Hierarchy | Data Structures | Directories | File List | Namespace Members | Data Fields | Globals

traces.h

Go to the documentation of this file.
00001 /********************************************************************
00002 
00003 Copyright 2006, ACCESS Systems Americas, Inc. All rights reserved.
00004 
00005 The contents of this file are subject to the Mozilla Public License Version
00006 1.1 (the "License"); you may not use this file except in compliance with
00007 the License. You may obtain a copy of the License at
00008 http://www.mozilla.org/MPL/
00009 
00010 Software distributed under the License is distributed on an "AS IS" basis,
00011 WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012 for the specific language governing rights and limitations under the
00013 License.
00014 
00015 The Original Code is the entire contents of this file.
00016 
00017 The Initial Developer of the Original Code is ACCESS Systems Americas, Inc.
00018 
00019 Portions created by ACCESS Systems Americas, Inc. are Copyright © 2006. All
00020 Rights Reserved.
00021 
00022 Contributor(s): none.
00023 
00024 ********************************************************************/
00032 #ifndef __ALP_TRACES_H__
00033 #define __ALP_TRACES_H__
00034 
00035 #include <stdio.h>
00036 #include <stdarg.h>
00037 #include <hiker/config.h>
00038 #include <hiker/sysclass.h>
00039 #include <hiker/fail.h>
00040 
00041 #ifdef __cplusplus
00042 extern "C" {
00043 #endif
00044 
00045 
00046 /* ---- Prototyping ---------------------- */ 
00047 /* These functions should not be called directly */
00048 
00049 void alp_prv_trace_outputVT     (int traceModule, const char* aFormatString, va_list arglist);
00050 void alp_prv_trace_outputTL     (int traceModule, const char* aFormatString, ...);
00051 void alp_prv_trace_outputVTL    (int traceModule, const char* aFormatString, va_list arglist);
00052 void alp_prv_trace_outputT              (int traceModule, const char* aFormatString, ...);
00053 void alp_prv_trace_outputB      (int traceModule, unsigned char* aBuffer, size_t aBufferLen);
00054 
00055 // New apis 
00056 void alp_trace_init(unsigned long anInstance, const char* aTracerKind, const char* config);
00057 void alp_trace_close(void);
00058 void alp_trace_local_add(int traceModule);
00059 void alp_trace_local_remove(int traceModule);
00060 void alp_trace_reload(void);
00061 
00062 void alp_trace_setoutput(const char* aTracerKind, const char* config) ;
00063 void alp_trace_getoutput(char* aOutput,  int nBufferLen);
00064 void alp_trace_get_capabilities(char *buffer, size_t* len);
00065 long alp_trace_getoutputport_status(void);
00066 
00067 
00068 /* ------------------------------------------------------------------- */
00069 #if ALP_TRACE == ALP_TRACE_ON
00070         #define ALP_TM(X)                       alp_prv_trace_output##X
00071 #else
00072         #define ALP_TM(X)
00073 #endif
00074 
00075 /* ------------------------------------------------------------------- */
00076 /*  Used for custom error classes       */
00077 #define ALP_TRACE_DEFINE(x,y) (x+y)                     
00078 
00079 #ifdef __cplusplus
00080 }
00081 #endif
00082 
00083 #endif  /* __ALP_TRACES_H__ */

Generated on Sat Dec 16 20:29:47 2006 for hiker-0.9 by  doxygen 1.4.4