MSenProperties Class Reference

#include <mw/MSenProperties.h>

Link against: SenHostConn.lib

class MSenProperties
Public Member Enumerations
enumTSenPropertiesClassType { ENotInUse, ESenXmlProperties, ESenTransportProperties, ESenHttpTransportProperties, ..., ESenLayeredVtcpTransportProperties }
Public Member Functions
pure virtual HBufC8 *AsUtf8L()
pure virtual HBufC8 *AsUtf8LC()
pure virtual TInt BoolPropertyL(const TDesC8 &, TBool &)
pure virtual MSenProperties *Clone(TInt &)
pure virtual MSenProperties *CloneL()
pure virtual TInt IntPropertyL(const TDesC8 &, TInt &)
pure virtual TBool IsSafeToCast(TSenPropertiesClassType)
pure virtual TSenPropertiesClassType PropertiesClassType()
pure virtual TInt PropertyL(const TDesC8 &, TPtrC8 &)
pure virtual voidReadFromL(const TDesC8 &)
pure virtual TInt SetBoolPropertyL(const TDesC8 &, const TBool)
pure virtual TInt SetIntPropertyL(const TDesC8 &, const TInt)
pure virtual TInt SetPropertyL(const TDesC8 &, const TDesC8 &)
pure virtual voidSetReader(CSenXmlReader &)
pure virtual voidWriteToL(RWriteStream &)

Member Enumeration Documentation

Member Function Documentation

AsUtf8L ( )

HBufC8 *AsUtf8L()[pure virtual]
Get these properties as UTF-8 charset encoded descriptor.
Since
Series60

Returns: a pointer to UTF-8 encoded descriptor. Caller takes ownership.

AsUtf8LC ( )

HBufC8 *AsUtf8LC()[pure virtual]
Get these properties as UTF-8 charset encoded descriptor.
Since
Series60

Returns: a pointer to UTF-8 encoded descriptor, which is has been left on cleanup stack. Caller takes ownership.

BoolPropertyL ( const TDesC8 &, TBool & )

TInt BoolPropertyL(const TDesC8 &aName,
TBool &aValue
)[pure virtual]
Gets the boolean value of the property behind certain name.
Since
Series60
ParameterDescription
aNameThe name identifying this property.
aValueA TBool reference to be filled in with the value of the property.

Returns: KErrNone on success, KErrSenOmitted if property has been omitted, or some of the system-wide error codes otherwise.

Clone ( TInt & )

MSenProperties *Clone(TInt &aOkOrError)const [pure virtual]

Method creates exact copy of the properties, preserving the real, concrete subclass type (this can be resolved via PropertiesClassType() method. Furthermore, the IsSafeToCast() method can be used to reflect the returned pointer to a concrete class. NOTE: one must cast the returned pointer to concrete class in order to safely de-allocate any memory allocated by this method.

ParameterDescription
aOkOrErroris KErrNone when clone is successfully allocated, or some system-wide error otherwise.

Returns: pointer to *concrete* properties object, which MUST be class cast to known subclass(!).

CloneL ( )

MSenProperties *CloneL()const [pure virtual]

Method creates exact copy of the properties, preserving the real, concrete subclass type (this can be resolved via PropertiesClassType() method. Furthermore, the IsSafeToCast() method can be used to reflect the returned pointer to a concrete class. NOTE: one must cast the returned pointer to concrete class in order to safely de-allocate any memory allocated by this method.

Returns: pointer to *concrete* properties object, which MUST be class cast to known subclass(!).

IntPropertyL ( const TDesC8 &, TInt & )

TInt IntPropertyL(const TDesC8 &aName,
TInt &aValue
)[pure virtual]
Gets the integer value of the property behind certain name.
Since
Series60
ParameterDescription
aNameThe name identifying this property.
aValueA TInt reference to be filled in with the value of the property.

Returns: KErrNone on success, KErrSenOmitted if property has been omitted, or some of the system-wide error codes otherwise.

IsSafeToCast ( TSenPropertiesClassType )

TBool IsSafeToCast(TSenPropertiesClassTypeaClass)[pure virtual]

Method provies reflection support for properties classes, enabling safe class-casts to concrete subclass objects.

Returns: ETrue, if object is of a known subclass type EFalse, if the object cannot be cast to given type.

PropertiesClassType ( )

TSenPropertiesClassType PropertiesClassType()[pure virtual]

Get an integer identifying properties class type. All subclasses MUST return use unique integer value.

Returns: unique TInt identifying this properties class type

PropertyL ( const TDesC8 &, TPtrC8 & )

TInt PropertyL(const TDesC8 &aName,
TPtrC8 &aValue
)[pure virtual]
Gets the value of the property behind certain name.
Since
Series60
ParameterDescription
aNameThe name identifying this property.
aValueThe value of the property, or KNullDesC8 if property is not found.

Returns: KErrNone on success, KErrSenOmitted if property has been omitted, or some of the system-wide error codes otherwise.

ReadFromL ( const TDesC8 & )

voidReadFromL(const TDesC8 &aBuffer)[pure virtual]
Reads this properties object from the descriptor. UTF-8 charset encoding should be used.
Since
Series60
ParameterDescription
aBufferThe buffer to read from.

SetBoolPropertyL ( const TDesC8 &, const TBool )

TInt SetBoolPropertyL(const TDesC8 &aName,
const TBoolaValue
)[pure virtual]

Sets new boolean property.

If property with given name does not exist, new property with given value will be added. Otherwise the value of existing property will be updated.

Since
Series60
ParameterDescription
aNameName of the property, which can be later used to refer the given value.
aValueThe boolean value of this property.

Returns: KErrNone if no error, or some of the system wide error codes. Leave codes: According to implementing classes.

SetIntPropertyL ( const TDesC8 &, const TInt )

TInt SetIntPropertyL(const TDesC8 &aName,
const TIntaValue
)[pure virtual]

Sets new integer property.

If property with given name does not exist, new property with given value will be added. Otherwise the value of existing property will be updated.

Since
Series60
ParameterDescription
aNameName of the property, which can be later used to refer the given value.
aValueIs the integer value of this property.

Returns: KErrNone if no error, or some of the system wide error codes. Leave codes: According to implementing classes.

SetPropertyL ( const TDesC8 &, const TDesC8 & )

TInt SetPropertyL(const TDesC8 &aName,
const TDesC8 &aValue
)[pure virtual]

Sets new property.

If property with given name does not exist, new property with given value will be added. Otherwise the value of existing property will be updated.

Since
Series60
ParameterDescription
aNameName of the property, which can be later used to refer the given value.
aValueIs the value of this property.

Returns: KErrNone if no error, or some of the system wide error codes. Leave codes: According to implementing classes.

SetReader ( CSenXmlReader & )

voidSetReader(CSenXmlReader &aReader)[pure virtual]

Sets the XML reader to be used for parsing.

WriteToL ( RWriteStream & )

voidWriteToL(RWriteStream &aWriteStream)[pure virtual]
Writes this properties object as descriptor into a stream. UTF-8 charset encoding will be used.
Since
Series60
ParameterDescription
aWriteStreamThe stream to write to.