#include <app/vstaticutils.h>
class VersitUtils |
A utility class which provides functions for handling character set conversions, and for the parsing of character strings.
IMPORT_C void | AddEscapedString | ( | TDes & | aDestination, |
const TDesC & | aTextToEscape, | |||
Versit::TVersitCharSet | aCharSet | |||
) | [static] |
Adds an escape character before the semi-colons in a given text string.
Parameter | Description |
---|---|
aDestination | On return, the escaped text. |
aTextToEscape | Text to be escaped. |
aCharSet | A Versit character set identifier. |
IMPORT_C void | AddEscapedString | ( | TDes & | aDestination, |
const TDesC & | aTextToEscape, | |||
TUint | aCharSetId | |||
) | [static] |
Adds an escape character before the semi-colons in a given text string.
Parameter | Description |
---|---|
aDestination | On return, the escaped text. |
aTextToEscape | Text to be escaped. |
aCharSetId | A character set ID. These are defined in charconv.h. |
IMPORT_C CParserPropertyValue * | AdditionalPropertyValueFromStorageL | ( | const CParserProperty & | aProperty | ) | [static] |
Retrieves any additional storage property value associated with the specified property.
Parameter | Description |
---|---|
aProperty | The property that may have additional associated data. |
Returns: Additional storage property value associated with the specified property.
IMPORT_C void | AllocateAdditionalPropertyStorageL | ( | CVersitTlsData & | aTlsData, |
CParserProperty & | aProperty, | |||
TPtr16 & | aStringValue, | |||
TUint | aLineCharacterSetId | |||
) | [static] |
Allocates an additional property value object for certain CParserProperty objects.
This is needed to support the parsing and storage of Japanese pronunciation SOUND properties. Due to the existing Symbian Versit architecture, it was not possible to change the underlying storage type of the SOUND property to an array data type. Therefore, this method provides a means of storing the array-based value which can be retrieved when necessary.
It is called by CParserVCard::MakePropertyValueSoundL().
Parameter | Description |
---|---|
aTlsData | The CVersitParser::iStaticUtils member. |
aProperty | A SOUND property. |
aStringValue | A 16-bit raw property value string. |
aLineCharacterSetId | The character set ID of the current line. This is required to identify the escape character. |
IMPORT_C TUid | CharConvCharSetUid | ( | Versit::TVersitCharSet | aVersitSet | ) | [static] |
Returns the character converter UID associated with the specified Versit character set identifier.
Parameter | Description |
---|---|
aVersitSet | A character set identifier. |
Returns: The character converter UID associated with the specified Versit character set identifier. These UIDs are defined in charconv.h.
Versit::TVersitCharSet | CharSet | ( | TUint | aCharConvCharSetUid | ) | [static] |
Returns the Versit character set identifier associated with the specified character converter UID.
Parameter | Description |
---|---|
aCharConvCharSetUid | A character converter UID. These UIDs are defined in charconv.h. |
Returns: A Versit character set identifier associated with the specified character converter UID.
IMPORT_C void | ConArcEncodeL | ( | RReadStream & | aSource, |
CBufBase & | aTarget, | |||
TUid | aConArcEncodingUid | |||
) | [static] |
Encodes a buffer using the specified character set converter.
Parameter | Description |
---|---|
aSource | Buffer to be encoded. |
aTarget | On return, the encoded buffer. |
aConArcEncodingUid | Converter UID, as returned by VersitUtils::ConArcEncodingUid(). |
IMPORT_C TUid | ConArcEncodingUid | ( | Versit::TVersitEncoding | aEncoding | ) | [static] |
Returns the UID of a character set converter suitable for the specified encoding.
See also: CCnaConverterList::NewConverterL()
Parameter | Description |
---|---|
aEncoding | An encoding type. |
Returns: The UID of a character set converter.
Tests whether all of the characters in the specified text can be represented in 7-bit ASCII.
Parameter | Description |
---|---|
aText | Text to be tested. |
Returns: ETrue if all of the characters in the specified text can be represented in 7 bit ASCII, otherwise EFalse.
IMPORT_C TBool | EightBitEncoding | ( | Versit::TVersitCharSet | aCharSet | ) | [static] |
Tests whether the specified character set is encoded using 8 bits or not. For instance ASCII is 7-bit; ISO-8859-1 is 8-bit.
Parameter | Description |
---|---|
aCharSet | A character set. |
Returns: ETrue if the character set uses 8 bits; EFalse if it uses 7 bits.
IMPORT_C void | FreeAdditionalPropertyStorageL | ( | const CParserProperty & | aProperty | ) | [static] |
Frees any additional storage associated with the specified property.
Additional storage may have previously been allocated using AllocateAdditionalPropertyStorageL().
This is called by CParserProperty's destructor.
Parameter | Description |
---|---|
aProperty | The property which may have additional storage associated with it. |
IMPORT_C const TDesC8 & | IANACharacterSetName | ( | Versit::TVersitCharSet | aCharSet | ) | [static] |
Returns the IANA character set name corresponding to the specified character set identifier.
Parameter | Description |
---|---|
aCharSet | A character set. |
Returns: An IANA character set name.
IMPORT_C const TDesC8 & | IANAEncodingName | ( | Versit::TVersitEncoding | aEncoding | ) | [static] |
Returns the MIME encoding type corresponding to the specified encoding.
Parameter | Description |
---|---|
aEncoding | An encoding type. |
Returns: The MIME encoding type corresponding to the specified encoding.
Tests whether the specified 8 bit string contains no white spaces.
Any CR/LF pair at the end of the string is disregarded.
Parameter | Description |
---|---|
aString | The string to test. |
Returns: ETrue if the string contains no white spaces, otherwise EFalse.
Tests whether the specified 16 bit string contains no white spaces.
Any CR/LF pair at the end of the string is disregarded.
Parameter | Description |
---|---|
aString | The string to test. |
Returns: ETrue if the string contains no white spaces, otherwise EFalse.
IMPORT_C CDesCArray * | ParseForArrayPropertiesL | ( | TPtr16 | aStringValue, |
TUint | aLineCharacterSetId | |||
) | [static] |
Parses a compound property value string.
The sub-values found are appended to an array, after removal of escape characters. The array is returned, and ownership is transferred to the caller.
Parameter | Description |
---|---|
aStringValue | Compound property value string to parse for array elements. |
aLineCharacterSetId | The character set of the current line. This is required in order to identify the escape character. |
Returns: Array of property values found in the string.
IMPORT_C void | RemoveEscapeChars | ( | TPtr8 & | aText | ) | [static] |
Removes escape characters (backslashes) from the specified 8-bit string.
Parameter | Description |
---|---|
aText | A raw 8-bit string value. |
IMPORT_C void | RemoveEscapeChars | ( | HBufC16 & | aText | ) | [static] |
Removes escape characters (backslashes) from the specified 16-bit string.
Parameter | Description |
---|---|
aText | A raw 16-bit string value. |
Removes escape characters (backslashes or for the Shift-JIS character set, Yen-symbols/backslashes, Shift-JIS behaviour is platform dependent) from the specified 16-bit string.
Parameter | Description |
---|---|
aText | A raw 16-bit string value. |
aCharSetUid | The character set UID of the given 16-bit string; these are defined in charconv.h. This is needed to identify whether or not the character set is Shift-JIS. |
Removes escape characters (backslashes or for the Shift-JIS character set, Yen-symbols/backslashes, Shift-JIS behaviour is platform dependent) from the specified 16-bit string.
Parameter | Description |
---|---|
aText | A raw 16 bit string value. |
aCharSetUid | The character set UID of the aText parameter. This is required to identify the escape character. |
IMPORT_C void | StripWhiteSpace | ( | TPtr8 & | aString | ) | [static] |
Strips white space from the beginning and end of the specified 8-bit string.
Parameter | Description |
---|---|
aString | A 8-bit string. |
IMPORT_C void | StripWhiteSpace | ( | TPtr16 & | aString | ) | [static] |
Strips white space from the beginning and end of the specified 16-bit string.
Parameter | Description |
---|---|
aString | A 16-bit string. |
IMPORT_C void | UncodeToNarrowL | ( | const TDesC & | aUnicode, |
TDes8 & | aNarrow, | |||
const Versit::TEncodingAndCharset & | aEncodingCharset | |||
) | [static] |
Converts Unicode text to 8-bit, using the specified character set converter.
Parameter | Description |
---|---|
aUnicode | The Unicode text to be converted. |
aNarrow | On return, the converted text. |
aEncodingCharset | Specifies the character set converter to use. |