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

Go to the source code of this file.

Defines

#define hbufC16towchar   tbufC16towchar
#define hbufC16tochar   tbufC16tochar
#define hbufC8towchar   tbufC8towchar
#define hbufC8tochar   tbufC8tochar

Functions

IMPORT_C wchar_t * tbuf16towchar (TDes &aArg)
IMPORT_C char * tbuf8tochar (TDes8 &aArg)
IMPORT_C int tbuf16tochar (TDes &aSrc, char *aDes)
IMPORT_C int tbuf8towchar (TDes8 &aSrc, wchar_t *aDes)
IMPORT_C void tbufC16towchar (TDesC &aSrc, wchar_t *aDes)
IMPORT_C void tbufC8tochar (TDesC8 &aSrc, char *aDes)
IMPORT_C int tbufC16tochar (TDesC &aSrc, char *aDes)
IMPORT_C int tbufC8towchar (TDesC8 &aSrc, wchar_t *aDes)
IMPORT_C void wchartotbuf16 (const wchar_t *aSrc, TDes16 &aDes)
IMPORT_C int chartotbuf16 (const char *aSrc, TDes16 &aDes)
IMPORT_C int wchartotbuf8 (const wchar_t *aSrc, TDes8 &aDes)
IMPORT_C void chartotbuf8 (const char *aSrc, TDes8 &aDes)
IMPORT_C void wchartohbufc16 (const wchar_t *aSrc, HBufC16 &aDes)
IMPORT_C int chartohbufc16 (const char *aSrc, HBufC16 &aDes)
IMPORT_C int wchartohbufc8 (const wchar_t *aSrc, HBufC8 &aDes)
IMPORT_C void chartohbufc8 (const char *aSrc, HBufC8 &aDes)

Detailed Description

stringutils is a DLL that exports some set of genaralized APIs using which user can convert the SYMBIAN descriptors to standard C character/wide-character strings and vice-versa

Definition in file stringutils.h.


Define Documentation

#define hbufC16towchar   tbufC16towchar

Aliases : Cconverting HBufC variants to char/wchar_t strings involves similiar procedure to that of converting TBufC variants to char/wchar_t strings. Hence HBufC to char/wchar_t conversion Apis are aliased to their corresponding TBufC counterparts Alias to the function tbufC16towchar

Definition at line 55 of file stringutils.h.

#define hbufC16tochar   tbufC16tochar

Alias to the function tbufC16tochar

Definition at line 59 of file stringutils.h.

#define hbufC8towchar   tbufC8towchar

Alias to the function tbufC8towchar

Definition at line 63 of file stringutils.h.

#define hbufC8tochar   tbufC8tochar

Alias to the function tbufC8tochar

Definition at line 67 of file stringutils.h.


Function Documentation

IMPORT_C wchar_t* tbuf16towchar ( TDes &  aArg  ) 

Functions to convert SYMBIAN descriptors to C character and Wide-Character strings This Api converts the tbuf16 to a wide-character string

Parameters:
aArg TDes object
Returns:
a pointer to a wide-character string

Definition at line 43 of file stringutils.cpp.

IMPORT_C char* tbuf8tochar ( TDes8 &  aArg  ) 

This Api converts the tbuf8 to a character string

Parameters:
aArg TDes8 object
Returns:
a pointer to a character string

Definition at line 48 of file stringutils.cpp.

IMPORT_C int tbuf16tochar ( TDes &  aSrc,
char *  aDes 
)

This Api converts the tbuf16 to a character string. It is user responsibality to allocate a required size of char object. Api may resulting in crash, if the destination object size is smaller than that of the source.

Parameters:
aSrc TDes16 object
aDes character pointer, to which the resultant string will be copied.
Returns:
returns an integer value.
Api returns -1 in case of any error.

Definition at line 53 of file stringutils.cpp.

IMPORT_C int tbuf8towchar ( TDes8 &  aSrc,
wchar_t *  aDes 
)

This Api converts the tbuf8 to a wide-character string. It is user responsibality to allocate a required size of wide-char object. Api may resulting in crash, if the destination object size is smaller than that of the source.

Parameters:
aSrc TDes8 object
aDes wide-character pointer, to which the resultant string will be copied.
Returns:
returns an integer value.
Api returns -1 in case of any error.

Definition at line 62 of file stringutils.cpp.

IMPORT_C void tbufC16towchar ( TDesC &  aSrc,
wchar_t *  aDes 
)

This Api converts the tbuf16 to a wide-character string. It is user responsibality to allocate a required size of wide-char object. Api may resulting in crash, if the destination object size is smaller than that of the source.

Parameters:
aSrc TDes16 object
aDes wide-character pointer, to which the resultant string will be copied.
Returns:
none

Definition at line 72 of file stringutils.cpp.

IMPORT_C void tbufC8tochar ( TDesC8 &  aSrc,
char *  aDes 
)

This Api converts the tbufC8 to a character string. It is user responsibality to allocate a required size of wide-char object. Api may resulting in crash, if the destination object size is smaller than that of the source.

Parameters:
aSrc TDesC8 object
aDes character pointer, to which the resultant string will be copied.
Returns:
none

Definition at line 80 of file stringutils.cpp.

IMPORT_C int tbufC16tochar ( TDesC &  aSrc,
char *  aDes 
)

This Api converts the TBufC16 to a character string. It is user responsibality to allocate a required size of wide-char object. Api may resulting in crash, if the destination object size is smaller than that of the source.

Parameters:
aSrc TDesC object
aDes character pointer, to which the resultant string will be copied.
Returns:
returns an integer value.
Api returns -1 in case of any error.

Definition at line 88 of file stringutils.cpp.

IMPORT_C int tbufC8towchar ( TDesC8 &  aSrc,
wchar_t *  aDes 
)

This Api converts the TBufC8 to a wide-character string. It is user responsibality to allocate a required size of wide-char object. Api may resulting in crash, if the destination object size is smaller than that of the source.

Parameters:
aSrc TDesC8 object
aDes wide-character pointer, to which the resultant string will be copied.
Returns:
returns an integer value.
Api returns -1 in case of any error.

Definition at line 100 of file stringutils.cpp.

IMPORT_C void wchartotbuf16 ( const wchar_t *  aSrc,
TDes16 &  aDes 
)

Functions to convert C character and Wide-Character strings to SYMBIAN descriptors This Api converts the wide-char to a TBuf16. It is user responsibality to allocate a required size of TBuf16 object. Api may resulting in crash, if the destination object size is smaller than that of the source.

Parameters:
aSrc wide-character pointer.
aDes TBuf16 object, to which the resultant string will be copied.
Returns:
none

Definition at line 110 of file stringutils.cpp.

IMPORT_C int chartotbuf16 ( const char *  aSrc,
TDes16 &  aDes 
)

This Api converts the char to a TBuf16. It is user responsibality to allocate a required size of TBuf16 object. Api may resulting in crash, if the destination object size is smaller than that of the source.

Parameters:
aSrc character pointer.
aDes TBuf16 object, to which the resultant string will be copied.
Returns:
returns an integer value.
Api returns -1 in case of any error.

Definition at line 115 of file stringutils.cpp.

IMPORT_C int wchartotbuf8 ( const wchar_t *  aSrc,
TDes8 &  aDes 
)

This Api converts the wide-char string to a TBuf8. It is user responsibality to allocate a required size of TBuf8 object. Api may resulting in crash, if the destination object size is smaller than that of the source.

Parameters:
aSrc wide-character pointer.
aDes TBuf8 object, to which the resultant string will be copied.
Returns:
returns an integer value.
Api returns -1 in case of any error.

Definition at line 129 of file stringutils.cpp.

IMPORT_C void wchartohbufc16 ( const wchar_t *  aSrc,
HBufC16 &  aDes 
)

This Api converts the wide-char to a HBufC16. It is user responsibality to allocate a required size of HBufC16 object. Api may resulting in crash, if the destination object size is smaller than that of the source.

Parameters:
aSrc wide-character pointer.
aDes HBufC16 object, to which the resultant string will be copied.
Returns:
none

Definition at line 148 of file stringutils.cpp.

IMPORT_C int chartohbufc16 ( const char *  aSrc,
HBufC16 &  aDes 
)

This Api converts the char to a HBufC16. It is user responsibality to allocate a required size of HBufC16 object. Api may resulting in crash, if the destination object size is smaller than that of the source.

Parameters:
aSrc character pointer.
aDes HBufC16 object, to which the resultant string will be copied.
Returns:
returns an integer value.
Api returns -1 in case of any error.

Definition at line 153 of file stringutils.cpp.

IMPORT_C int wchartohbufc8 ( const wchar_t *  aSrc,
HBufC8 &  aDes 
)

This Api converts the wide-char to a HBufC8. It is user responsibality to allocate a required size of HBufC8 object. Api may resulting in crash, if the destination object size is smaller than that of the source.

Parameters:
aSrc wide-character pointer.
aDes HBufC8 object, to which the resultant string will be copied.
Returns:
returns an integer value.
Api returns -1 in case of any error.

Definition at line 172 of file stringutils.cpp.


Generated by  doxygen 1.6.2