CSenXmlProperties Class Reference

Link against: SenServConn.LIB SenUtils.LIB

Capability Information

Required Capabilities

NetworkServices ReadUserData WriteUserData


#include <SenXmlProperties.h>

Inherits MSenProperties.

Inherited by CSenTransportProperties.


Public Member Functions

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

Static Public Member Functions

static IMPORT_C CSenXmlProperties NewL ()
  Basic constructor.
static IMPORT_C CSenXmlProperties NewLC ()
  Basic constructor.
static IMPORT_C CSenXmlProperties NewL (const TDesC8 &aXmlUtf8, CSenXmlReader &aParser)
  Basic constructor.
static IMPORT_C CSenXmlProperties NewLC (const TDesC8 &aXmlUtf8, CSenXmlReader &aParser)
  Basic constructor.
static IMPORT_C CSenXmlProperties NewL (const CSenElement &aElement)
  Basic constructor.
static IMPORT_C CSenXmlProperties NewLC (const CSenElement &aElement)
  Basic constructor.

Protected Member Functions

virtual void  BaseConstructL (const TDesC8 &aLocalname, const TDesC8 &aXml, CSenXmlReader *aParser=NULL)
virtual void  BaseConstructL (const TDesC8 &aNamespace, const TDesC8 &aLocalname, const TDesC8 &aXml, CSenXmlReader *aParser=NULL)
virtual void  BaseConstructL (const TDesC8 &aNamespace, const TDesC8 &aLocalname, const TDesC8 &aQualifiedName, const TDesC8 &aXml, CSenXmlReader *aParser=NULL)
virtual void  BaseConstructL (const CSenElement &aElement)
  CSenXmlProperties ()
  Constructor.

Protected Attributes

CSenPropertiesFragment *  ipFragment
CSenXmlReader ipReader

Constructor & Destructor Documentation

virtual CSenXmlProperties::~CSenXmlProperties  )  [virtual]
 

Destructor.

CSenXmlProperties::CSenXmlProperties  )  [protected]
 

Constructor.


Member Function Documentation

virtual HBufC8* CSenXmlProperties::AsUtf8L  )  [virtual]
 

Get these properties as UTF-8 charset encoded descriptor.

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

Implements MSenProperties.

Reimplemented in CSenHttpTransportProperties, and CSenTransportProperties.

virtual HBufC8* CSenXmlProperties::AsUtf8LC  )  [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.

Implements MSenProperties.

Reimplemented in CSenHttpTransportProperties, and CSenTransportProperties.

virtual void CSenXmlProperties::BaseConstructL const CSenElement aElement  )  [protected, virtual]
 

Reimplemented in CSenHttpTransportProperties, and CSenTransportProperties.

virtual void CSenXmlProperties::BaseConstructL const TDesC8 &  aNamespace,
const TDesC8 &  aLocalname,
const TDesC8 &  aQualifiedName,
const TDesC8 &  aXml,
CSenXmlReader aParser = NULL
[protected, virtual]
 

Reimplemented in CSenHttpTransportProperties, and CSenTransportProperties.

virtual void CSenXmlProperties::BaseConstructL const TDesC8 &  aNamespace,
const TDesC8 &  aLocalname,
const TDesC8 &  aXml,
CSenXmlReader aParser = NULL
[protected, virtual]
 

Reimplemented in CSenHttpTransportProperties, and CSenTransportProperties.

virtual void CSenXmlProperties::BaseConstructL const TDesC8 &  aLocalname,
const TDesC8 &  aXml,
CSenXmlReader aParser = NULL
[protected, virtual]
 

Reimplemented in CSenHttpTransportProperties, and CSenTransportProperties.

virtual TInt CSenXmlProperties::BoolPropertyL const TDesC8 &  aName,
TBool &  aValue
[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.

Implements MSenProperties.

Reimplemented in CSenHttpTransportProperties, and CSenTransportProperties.

virtual MSenProperties* CSenXmlProperties::Clone TInt &  aOkOrError  )  const [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(!).

Implements MSenProperties.

Reimplemented in CSenTransportProperties.

virtual MSenProperties* CSenXmlProperties::CloneL  )  const [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(!).

Implements MSenProperties.

Reimplemented in CSenHttpTransportProperties, and CSenTransportProperties.

virtual TInt CSenXmlProperties::IntPropertyL const TDesC8 &  aName,
TInt &  aValue
[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.

Implements MSenProperties.

Reimplemented in CSenHttpTransportProperties, and CSenTransportProperties.

virtual TBool CSenXmlProperties::IsSafeToCast TSenPropertiesClassType  aClass  )  [virtual]
 

Reimplemented in CSenHttpTransportProperties, and CSenTransportProperties.

static IMPORT_C CSenXmlProperties* CSenXmlProperties::NewL const CSenElement aElement  )  [static]
 

Basic constructor.

Parameters:
aElement 
Returns:
a pointer to new CSenXmlProperties class instance.

Reimplemented in CSenHttpTransportProperties, and CSenTransportProperties.

static IMPORT_C CSenXmlProperties* CSenXmlProperties::NewL const TDesC8 &  aXmlUtf8,
CSenXmlReader aParser
[static]
 

Basic constructor.

Parameters:
aXmlUtf8 
aParser  It is a XML reader
Returns:
a pointer to new CSenTransportProperties class instance.

Reimplemented in CSenHttpTransportProperties, and CSenTransportProperties.

static IMPORT_C CSenXmlProperties* CSenXmlProperties::NewL  )  [static]
 

Basic constructor.

Returns:
a pointer to new CSenXmlProperties class instance.

Reimplemented in CSenHttpTransportProperties, and CSenTransportProperties.

static IMPORT_C CSenXmlProperties* CSenXmlProperties::NewLC const CSenElement aElement  )  [static]
 

Basic constructor.

Parameters:
aElement 
Returns:
a pointer to new CSenXmlProperties class instance.

Reimplemented in CSenHttpTransportProperties, and CSenTransportProperties.

static IMPORT_C CSenXmlProperties* CSenXmlProperties::NewLC const TDesC8 &  aXmlUtf8,
CSenXmlReader aParser
[static]
 

Basic constructor.

Parameters:
aXmlUtf8 
aParser  It is a XML reader
Returns:
a pointer to new CSenTransportProperties class instance.

Reimplemented in CSenHttpTransportProperties, and CSenTransportProperties.

static IMPORT_C CSenXmlProperties* CSenXmlProperties::NewLC  )  [static]
 

Basic constructor.

Returns:
a pointer to new CSenXmlProperties class instance.

Reimplemented in CSenHttpTransportProperties, and CSenTransportProperties.

virtual TSenPropertiesClassType CSenXmlProperties::PropertiesClassType  )  [virtual]
 

Get an integer identifying properties class type.

All subclasses MUST return use unique integer value.

Returns:
unique TInt identifying this properties class type

Implements MSenProperties.

Reimplemented in CSenHttpTransportProperties, and CSenTransportProperties.

virtual TInt CSenXmlProperties::PropertyL const TDesC8 &  aName,
TPtrC8 &  aValue,
TPtrC8 &  aType
[virtual]
 

Gets the value of the property behind certain name.

Since:
Series60
Parameters:
aName  The name identifying this property.
aValue  A TPtrC8 reference to be filled in with the value of the property.
aType  A TPtrC8 reference to be filled in with the type of the property.
Returns:
KErrNone if no error, or some of the system wide error codes.

Reimplemented in CSenHttpTransportProperties, and CSenTransportProperties.

virtual TInt CSenXmlProperties::PropertyL const TDesC8 &  aName,
TPtrC8 &  aValue
[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.

Implements MSenProperties.

Reimplemented in CSenHttpTransportProperties, and CSenTransportProperties.

virtual void CSenXmlProperties::ReadFromL const TDesC8 &  aBuffer  )  [virtual]
 

Reads this properties object from the descriptor.

UTF-8 charset encoding should be used.

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

Implements MSenProperties.

Reimplemented in CSenHttpTransportProperties, and CSenTransportProperties.

virtual TInt CSenXmlProperties::RemovePropertyL const TDesC8 &  aName  )  [virtual]
 

Reimplemented in CSenHttpTransportProperties, and CSenTransportProperties.

virtual TInt CSenXmlProperties::SetBoolPropertyL const TDesC8 &  aName,
const TBool  aValue
[virtual]
 
See also:
MSenProperties Leave codes: KErrSenInvalidCharacters if aName contains illegal characters. KErrSenZeroLengthDescriptor if aName is zero length.

Implements MSenProperties.

Reimplemented in CSenHttpTransportProperties, and CSenTransportProperties.

virtual TInt CSenXmlProperties::SetIntPropertyL const TDesC8 &  aName,
const TInt  aValue
[virtual]
 
See also:
MSenProperties Leave codes: KErrSenInvalidCharacters if aName contains illegal characters. KErrSenZeroLengthDescriptor if aName is zero length.

Implements MSenProperties.

Reimplemented in CSenHttpTransportProperties, and CSenTransportProperties.

virtual TInt CSenXmlProperties::SetOmittedL const TDesC8 &  aName,
TBool  aValue
[virtual]
 

Reimplemented in CSenHttpTransportProperties, and CSenTransportProperties.

virtual TInt CSenXmlProperties::SetPropertyL const TDesC8 &  aName,
const TDesC8 &  aValue,
const TDesC8 &  aType
[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.
aType  Is the type of this property.
Returns:
KErrNone if no error, or some of the system wide error codes.

Reimplemented in CSenHttpTransportProperties, and CSenTransportProperties.

virtual TInt CSenXmlProperties::SetPropertyL const TDesC8 &  aName,
const TDesC8 &  aValue
[virtual]
 
See also:
MSenProperties Leave codes: KErrSenInvalidCharacters if aName contains illegal characters. KErrSenZeroLengthDescriptor if aName is zero length.

Implements MSenProperties.

Reimplemented in CSenHttpTransportProperties, and CSenTransportProperties.

virtual void CSenXmlProperties::SetReader CSenXmlReader aReader  )  [virtual]
 

Sets the XML reader to be used for parsing.

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

Implements MSenProperties.

Reimplemented in CSenHttpTransportProperties, and CSenTransportProperties.

virtual void CSenXmlProperties::WriteToL RWriteStream &  aWriteStream  )  [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.

Implements MSenProperties.

Reimplemented in CSenHttpTransportProperties, and CSenTransportProperties.


Field Documentation

CSenPropertiesFragment* CSenXmlProperties::ipFragment [protected]
 
CSenXmlReader* CSenXmlProperties::ipReader [protected]
 

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

Copyright © Nokia Corporation 2001-2007
Back to top