rtxPrint.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2003-2010 Objective Systems, Inc.
00003  *
00004  * This software is furnished under a license and may be used and copied
00005  * only in accordance with the terms of such license and with the
00006  * inclusion of the above copyright notice. This software or any other
00007  * copies thereof may not be provided or otherwise made available to any
00008  * other person. No title to and ownership of the software is hereby
00009  * transferred.
00010  *
00011  * The information in this software is subject to change without notice
00012  * and should not be construed as a commitment by Objective Systems, Inc.
00013  *
00014  * PROPRIETARY NOTICE
00015  *
00016  * This software is an unpublished work subject to a confidentiality agreement
00017  * and is protected by copyright and trade secret law.  Unauthorized copying,
00018  * redistribution or other use of this work is prohibited.
00019  *
00020  * The above notice of copyright on this source code product does not indicate
00021  * any actual or intended publication of such source code.
00022  *
00023  *****************************************************************************/
00024 
00028 #ifndef _RTXPRINT_H_
00029 #define _RTXPRINT_H_
00030 
00031 #include <stdio.h>
00032 #include "rtxsrc/osSysTypes.h"
00033 #include "rtxsrc/rtxExternDefs.h"
00034 #include "rtxsrc/rtxDList.h"
00035 
00036 #define OSRTINDENTSPACES        3       /* number of spaces for indent  */
00037 
00038 #ifdef __cplusplus
00039 extern "C" {
00040 #endif
00041 
00042 /* Run-time print utility functions */
00043 
00059 EXTERNRT int rtxByteToHexChar (OSOCTET byte, char* buf, size_t bufsize);
00060 
00067 EXTERNRT void rtxPrintBoolean (const char* name, OSBOOL value);
00068 
00076 EXTERNRT void rtxPrintDate
00077    (const char* name, const OSNumDateTime *pvalue);
00078 
00086 EXTERNRT void rtxPrintTime
00087    (const char* name, const OSNumDateTime *pvalue);
00088 
00096 EXTERNRT void rtxPrintDateTime
00097    (const char* name, const OSNumDateTime *pvalue);
00098 
00099 EXTERNRT void rtxPrintGYear
00100    (const char* name, const OSNumDateTime* pvalue);
00101 
00102 EXTERNRT void rtxPrintGYearMonth
00103    (const char* name, const OSNumDateTime* pvalue);
00104 
00105 EXTERNRT void rtxPrintGMonth
00106    (const char* name, const OSNumDateTime* pvalue);
00107 
00108 EXTERNRT void rtxPrintGMonthDay
00109    (const char* name, const OSNumDateTime* pvalue);
00110 
00111 EXTERNRT void rtxPrintGDay
00112    (const char* name, const OSNumDateTime* pvalue);
00113 
00120 EXTERNRT void rtxPrintInteger (const char* name, OSINT32 value);
00121 
00128 EXTERNRT void rtxPrintInt64 (const char* name, OSINT64 value);
00129 
00136 EXTERNRT void rtxPrintUnsigned (const char* name, OSUINT32 value);
00137 
00144 EXTERNRT void rtxPrintUInt64 (const char* name, OSUINT64 value);
00145 
00156 EXTERNRT void rtxPrintHexStr
00157 (const char* name, OSUINT32 numocts, const OSOCTET* data);
00158 
00166 EXTERNRT void rtxPrintHexBinary
00167 (const char* name, OSUINT32 numocts, const OSOCTET* data);
00168 
00175 EXTERNRT void rtxPrintCharStr (const char* name, const char* cstring);
00176 
00183 EXTERNRT void rtxPrintUTF8CharStr
00184 (const char* name, const OSUTF8CHAR* cstring);
00185 
00199 EXTERNRT void rtxPrintUnicodeCharStr
00200 (const char* name, const OSUNICHAR* str, int nchars);
00201 
00208 EXTERNRT void rtxPrintReal (const char* name, OSREAL value);
00209 
00215 EXTERNRT void rtxPrintNull (const char* name);
00216 
00223 EXTERNRT void rtxPrintNVP (const char* name, const OSUTF8NVP* value);
00224 
00231 EXTERNRT int rtxPrintFile (const char* filename);
00232 
00233 #ifndef __SYMBIAN32__
00234 
00238 EXTERNRT void rtxPrintIndent (void);
00239 
00243 EXTERNRT void rtxPrintIncrIndent (void);
00244 
00248 EXTERNRT void rtxPrintDecrIndent (void);
00249 
00254 EXTERNRT void rtxPrintCloseBrace (void);
00255 
00260 EXTERNRT void rtxPrintOpenBrace (const char*);
00261 
00262 #endif
00263 
00273 EXTERNRT void rtxHexDumpToNamedFile
00274 (const char* filename, const OSOCTET* data, OSUINT32 numocts);
00275 
00285 EXTERNRT void rtxHexDumpToFile
00286 (FILE* fp, const OSOCTET* data, OSUINT32 numocts);
00287 
00299 EXTERNRT void rtxHexDumpToFileEx
00300 (FILE* fp, const OSOCTET* data, OSUINT32 numocts, int bytesPerUnit);
00301 
00309 EXTERNRT void rtxHexDump (const OSOCTET* data, OSUINT32 numocts);
00310 
00321 EXTERNRT void rtxHexDumpEx
00322 (const OSOCTET* data, OSUINT32 numocts, int bytesPerUnit);
00323 
00336 EXTERNRT int rtxHexDumpToString
00337 (const OSOCTET* data, OSUINT32 numocts, char* buffer, int bufferIndex,
00338  int bufferSize);
00339 
00355 EXTERNRT int rtxHexDumpToStringEx
00356 (const OSOCTET* data, OSUINT32 numocts, char* buffer,
00357  int bufferIndex, int bufferSize, int bytesPerUnit);
00358 
00365 EXTERNRT void rtxHexDumpFileContents (const char* inFilePath);
00366 
00374 EXTERNRT void rtxHexDumpFileContentsToFile 
00375 (const char* inFilePath, const char* outFilePath);
00376 
00380 #ifdef __cplusplus
00381 }
00382 #endif
00383 
00384 #endif