MSenProperties Class Reference

Link against: SenServConn.LIB SenUtils.LIB

Capability Information

Required Capabilities

NetworkServices ReadUserData WriteUserData


#include <
MSenProperties.h>

Inherited by CSenXmlProperties.


Public Types

enum  TSenPropertiesClassType {
  ENotInUse = 0, ESenXmlProperties = 1, ESenTransportProperties = 2, ESenHttpTransportProperties = 3,
  ESenVtcpTransportProperties = 4, ESenLayeredXmlProperties = 5, ESenLayeredTransportProperties = 6, ESenLayeredHttpTransportProperties = 7,
  ESenLayeredVtcpTransportProperties = 8
}
 PropertiesClassType enumeration. More...

Public Member Functions

virtual void SetReader (CSenXmlReader &aReader)=0
 Sets the XML reader to be used for parsing.
virtual TSenPropertiesClassType PropertiesClassType ()=0
 Get an integer identifying properties class type.
virtual void WriteToL (RWriteStream &aWriteStream)=0
 Writes this properties object as descriptor into a stream.
virtual void ReadFromL (const TDesC8 &aBuffer)=0
 Reads this properties object from the descriptor.
virtual HBufC8 * AsUtf8L ()=0
 Get these properties as UTF-8 charset encoded descriptor.
virtual HBufC8 * AsUtf8LC ()=0
 Get these properties as UTF-8 charset encoded descriptor.
virtual TInt SetPropertyL (const TDesC8 &aName, const TDesC8 &aValue)=0
 Sets new property.
virtual TInt PropertyL (const TDesC8 &aName, TPtrC8 &aValue)=0
 Gets the value of the property behind certain name.
virtual TInt SetIntPropertyL (const TDesC8 &aName, const TInt aValue)=0
 Sets new integer property.
virtual TInt IntPropertyL (const TDesC8 &aName, TInt &aValue)=0
 Gets the integer value of the property behind certain name.
virtual TInt SetBoolPropertyL (const TDesC8 &aName, const TBool aValue)=0
 Sets new boolean property.
virtual TInt BoolPropertyL (const TDesC8 &aName, TBool &aValue)=0
 Gets the boolean value of the property behind certain name.
virtual MSenPropertiesClone (TInt &aOkOrError) const =0
 Method creates exact copy of the properties, preserving the real, concrete subclass type (this can be resolved via PropertiesClassType() method.
virtual TBool IsSafeToCast (TSenPropertiesClassType aClass)=0
 Method provies reflection support for properties classes, enabling safe class-casts to concrete subclass objects.
virtual MSenPropertiesCloneL () const =0
 Method creates exact copy of the properties, preserving the real, concrete subclass type (this can be resolved via PropertiesClassType() method.

Member Enumeration Documentation

enum MSenProperties::TSenPropertiesClassType
 

PropertiesClassType enumeration.

Enumerator:
ENotInUse 
ESenXmlProperties 
ESenTransportProperties 
ESenHttpTransportProperties 
ESenVtcpTransportProperties 
ESenLayeredXmlProperties 
ESenLayeredTransportProperties 
ESenLayeredHttpTransportProperties 
ESenLayeredVtcpTransportProperties 

Member Function Documentation

virtual HBufC8* MSenProperties::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.

Implemented in CSenHttpTransportProperties, CSenTransportProperties, and CSenXmlProperties.

virtual HBufC8* MSenProperties::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.

Implemented in CSenHttpTransportProperties, CSenTransportProperties, and CSenXmlProperties.

virtual TInt MSenProperties::BoolPropertyL const TDesC8 &  aName,
TBool &  aValue
[pure virtual]
 

Gets the boolean value of the property behind certain name.

Since:
Series60
Parameters:
aName The name identifying this property.
aValue A 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.

Implemented in CSenHttpTransportProperties, CSenTransportProperties, and CSenXmlProperties.

virtual MSenProperties* 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.

Parameters:
aOkOrError is 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(!).

Implemented in CSenTransportProperties, and CSenXmlProperties.

virtual MSenProperties* 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(!).

Implemented in CSenHttpTransportProperties, CSenTransportProperties, and CSenXmlProperties.

virtual TInt MSenProperties::IntPropertyL const TDesC8 &  aName,
TInt &  aValue
[pure virtual]
 

Gets the integer value of the property behind certain name.

Since:
Series60
Parameters:
aName The name identifying this property.
aValue A 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.

Implemented in CSenHttpTransportProperties, CSenTransportProperties, and CSenXmlProperties.

virtual TBool MSenProperties::IsSafeToCast TSenPropertiesClassType  aClass  )  [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.
virtual TSenPropertiesClassType MSenProperties::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

Implemented in CSenHttpTransportProperties, CSenTransportProperties, and CSenXmlProperties.

virtual TInt MSenProperties::PropertyL const TDesC8 &  aName,
TPtrC8 &  aValue
[pure virtual]
 

Gets the value of the property behind certain name.

Since:
Series60
Parameters:
aName The name identifying this property.
aValue The 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.

Implemented in CSenHttpTransportProperties, CSenTransportProperties, and CSenXmlProperties.

virtual void MSenProperties::ReadFromL const TDesC8 &  aBuffer  )  [pure virtual]
 

Reads this properties object from the descriptor.

UTF-8 charset encoding should be used.

Since:
Series60
Parameters:
aBuffer The buffer to read from.

Implemented in CSenHttpTransportProperties, CSenTransportProperties, and CSenXmlProperties.

virtual TInt MSenProperties::SetBoolPropertyL const TDesC8 &  aName,
const TBool  aValue
[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
Parameters:
aName Name of the property, which can be later used to refer the given value.
aValue The boolean value of this property.
Returns:
KErrNone if no error, or some of the system wide error codes. Leave codes: According to implementing classes.

Implemented in CSenHttpTransportProperties, CSenTransportProperties, and CSenXmlProperties.

virtual TInt MSenProperties::SetIntPropertyL const TDesC8 &  aName,
const TInt  aValue
[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
Parameters:
aName Name of the property, which can be later used to refer the given value.
aValue Is 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.

Implemented in CSenHttpTransportProperties, CSenTransportProperties, and CSenXmlProperties.

virtual TInt MSenProperties::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
Parameters:
aName Name of the property, which can be later used to refer the given value.
aValue Is the value of this property.
Returns:
KErrNone if no error, or some of the system wide error codes. Leave codes: According to implementing classes.

Implemented in CSenHttpTransportProperties, CSenTransportProperties, and CSenXmlProperties.

virtual void MSenProperties::SetReader CSenXmlReader aReader  )  [pure virtual]
 

Sets the XML reader to be used for parsing.

Parameters:
aReader,: the reader to be used. Ownership is NOT transferred.

Implemented in CSenHttpTransportProperties, CSenTransportProperties, and CSenXmlProperties.

virtual void MSenProperties::WriteToL RWriteStream &  aWriteStream  )  [pure virtual]
 

Writes this properties object as descriptor into a stream.

UTF-8 charset encoding will be used.

Since:
Series60
Parameters:
aWriteStream The stream to write to.

Implemented in CSenHttpTransportProperties, CSenTransportProperties, and CSenXmlProperties.


The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2007
Back to top