examples/PIPS/OpenCStringUtilitiesEx/library/inc/stringutils.h

Go to the documentation of this file.
00001 /*
00002 * ==============================================================================
00003 *  Name        :        stringutils.h
00004 *  Part of     :        OpenCStringUtilsEx
00005 *  Interface   : 
00006 *  Description :        Header file for stringutils
00007 *  Version     : 
00008 *
00009 *  Copyright (c) 2005-2007 Nokia Corporation.
00010 *  This material, including documentation and any related 
00011 *  computer programs, is protected by copyright controlled by 
00012 *  Nokia Corporation.
00013 * ==============================================================================
00014 */
00015 #ifndef __STRINGUTILS_H__
00016 #define __STRINGUTILS_H__
00017 
00025 //Symbian Headers
00026 #include <e32cmn.h>
00027 #include <wchar.h>
00028 
00040 #define hbufC16towchar  tbufC16towchar
00041 
00044 #define hbufC16tochar   tbufC16tochar
00045 
00048 #define hbufC8towchar   tbufC8towchar
00049 
00052 #define hbufC8tochar    tbufC8tochar
00053 
00054                 
00055 //Function prototypes
00056 
00066 IMPORT_C wchar_t* tbuf16towchar(TDes& aArg);
00067 
00073 IMPORT_C char* tbuf8tochar(TDes8& aArg);
00074 
00085 IMPORT_C int tbuf16tochar(TDes& aSrc, char* aDes);
00086         
00097 IMPORT_C int tbuf8towchar(TDes8& aSrc, wchar_t* aDes);
00098         
00108 IMPORT_C void tbufC16towchar(TDesC& aSrc ,wchar_t* aDes);
00109 
00110   
00121 IMPORT_C void tbufC8tochar(TDesC8& aSrc, char* aDes);
00122 
00133 IMPORT_C int tbufC16tochar(TDesC& aSrc, char* aDes);
00134         
00135         
00146 IMPORT_C int tbufC8towchar(TDesC8& aSrc, wchar_t* aDes);
00147 
00148 
00162 IMPORT_C void wchartotbuf16(const wchar_t *aSrc, TDes16& aDes);
00163         
00164 
00174 IMPORT_C int chartotbuf16(const char* aSrc, TDes16& aDes);
00175         
00186 IMPORT_C int wchartotbuf8(const wchar_t* aSrc, TDes8& aDes);
00187 
00188 
00189  /*
00190   * This Api converts the character string to a TBuf8. It is user 
00191   *     responsibality to allocate a required size of TBuf8 object. Api may     
00192   * resulting in crash, if the destination object size is smaller than
00193   * that of the source.
00194   * @param              aSrc character pointer.
00195   * @param              aDes TBuf8 object, to which the resultant string will be copied.
00196   *     @return         none
00197   */
00198 IMPORT_C void chartotbuf8(const char* aSrc, TDes8& aDes);
00199 
00200 
00209 IMPORT_C void wchartohbufc16(const wchar_t* aSrc, HBufC16& aDes);
00210         
00211 
00221 IMPORT_C int chartohbufc16(const char* aSrc, HBufC16& aDes);
00222         
00232 IMPORT_C int wchartohbufc8(const wchar_t* aSrc, HBufC8& aDes);
00233 
00234   
00235  /*
00236   * This Api converts the char to a HBufC8. It is user responsibality 
00237   * to allocate a required size of HBufC8 object. Api may resulting in crash,
00238   * if the destination object size is smaller than      that of the source.
00239   * @param              aSrc character pointer.
00240   * @param              aDes HBufC8 object, to which the resultant string will be copied.
00241   * @return             none
00242   */
00243 IMPORT_C void chartohbufc8(const char* aSrc, HBufC8& aDes);
00244         
00245 #endif /*__STRINGUTILS_H__*/

Generated by  doxygen 1.6.2