Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <SyncMLDataFilter.h>
Link against: smlfilter.lib
This item is not part of the S60 5th Edition SDK

Class CSyncMLFilter

class CSyncMLFilter : public CBase;

Description

Class representing a filter. It is created by the Data Provider and then used and modified by others as a copy of the original one - can be a copy comming from the filter directly or from a stream.

Derivation

Members

Defined in CSyncMLFilter:

Inherited from CBase:


Construction and destruction


NewL(const CSyncMLFilter &)

IMPORT_C static CSyncMLFilter* NewL(const CSyncMLFilter &aFilter);

Description

static Copy Constructor. Create an identical filter (including properties) from an existing object.

Parameters

const CSyncMLFilter &aFilter

The source filter to copy

Return value

CSyncMLFilter *

The copy of the filter object


NewL(RReadStream &)

IMPORT_C static CSyncMLFilter* NewL(RReadStream &aStream);

Description

static Symbian constructor taking in a previously externalised object either from a descriptor in RAM or a resource file. Any properties will also be internalised and instantiated.

Parameters

RReadStream &aStream

The externalised stream of bytes containing the information to produce this object

Return value

CSyncMLFilter *

The instantiated version of the externalised source


NewL(TSmlFilterId,TSyncMLFilterLevelType,const TDesC &,const TDesC &)

IMPORT_C static CSyncMLFilter* NewL(TSmlFilterId aId, TSyncMLFilterLevelType aFilterLevel, const TDesC &aDisplayName, const TDesC &aDisplayDescription);

Description

Static Symbian constructor producing an instantiated object from constituent parts which make up the minimum.

Parameters

TSmlFilterId aId

A unique identifier used to reference this particular filter

TSyncMLFilterLevelType aFilterLevel

Defines the filter as one that filters whole records or filters the fields

const TDesC16 &aDisplayName

User friendly display name for UI use

const TDesC16 &aDisplayDescription

User friendly description of the filter for UI use

Return value

CSyncMLFilter *

The filter object


~CSyncMLFilter()

IMPORT_C virtual ~CSyncMLFilter();

Description

C++ destructtor

[Top]


Member functions


ExternalizeL(RWriteStream &)const

IMPORT_C void ExternalizeL(RWriteStream &aStream) const;

Description

Method to produce an externalised string of bytes from which a CSyncMLFilter object can be recreated from. Used when objects need to be passed across IPC boundaries or stored on disk.

Parameters

RWriteStream &aStream

A stream that the externalised form of this object will append to


FilterId()const

IMPORT_C TSmlFilterId FilterId() const;

Description

Accessor returning the unique Id of this filter.

Return value

TSmlFilterId

The unique Id


DisplayName()const

IMPORT_C const TDesC& DisplayName() const;

Description

Accessor returning the User friendly display name of this filter.

Return value

const TDesC16 &

The display name


DisplayDescription()const

IMPORT_C const TDesC& DisplayDescription() const;

Description

Accessor returning the User friendly description of this filter.

Return value

const TDesC16 &

The description


Properties()const

IMPORT_C const RPointerArray< CSyncMLFilterProperty >& Properties() const;

Description

Accessor returning the array of properties owned by this filter that define it's behaviour. Note that the array is const and hence any additions to it must be done through the appropriate mutator's such as CSyncMLFilter::AddPropertyL(CSyncMLFilterProperty *).

Return value

const RPointerArray< CSyncMLFilterProperty > &

The property array


SetEnabledL(TBool)

IMPORT_C void SetEnabledL(TBool aEnabled);

Description

Enables the filter. Filters can be enabled or disabled depending on whether or not the user wishes them to be applied to the sync or not.

Parameters

TBool aEnabled

Set the filter enabled or disabled

Leave codes

KErrCorrupt

if the user attempts to enable an invalid filter


Enabled()const

IMPORT_C TBool Enabled() const;

Description

Accessor indicating the filter's enabled state.

Return value

TBool

Whether or not the filter is enabled


FilterLevel()const

IMPORT_C TSyncMLFilterLevelType FilterLevel() const;

Description

Indicates whether the filter is a field or record level filter.

Return value

TSyncMLFilterLevelType

Level of filter (field or record)


ClearPropertiesL()

IMPORT_C void ClearPropertiesL();

Description

Deletes all properties owned by this filter. This method must only be used at initial filter construction time in the data provider and should not be used from the User Interface code.


AddPropertyL(CSyncMLFilterProperty *)

IMPORT_C void AddPropertyL(CSyncMLFilterProperty *aProperty);

Description

Passes ownership of a filter property object to this filter. The property isn't necessarily enabled. This method must only be used at initial filter construction time in the data provider and should not be used from the User Interface code.

Parameters

CSyncMLFilterProperty *aProperty

The CSyncMLFilterProperty object that ownership is being passed for

Leave codes

KErrArgument

on a NULL pointer


PropertyCount()const

IMPORT_C TInt PropertyCount() const;

Description

Returns the number of properties that this filter owns.

Return value

TInt

The number of properties owned by this filter


PropertyL(TInt)const

IMPORT_C CSyncMLFilterProperty& PropertyL(TInt aIndex) const;

Description

Return a reference to a particular property in the field's property array.

Parameters

TInt aIndex

Index of the CSyncMLFilterProperty object that a reference is requested for

Return value

CSyncMLFilterProperty &

Reference to the CSyncMLFilterProperty object at index aIndex

Leave codes

KErrNotFound

If the index number is out of bounds


UnsetAllPropertyValuesL()

IMPORT_C void UnsetAllPropertyValuesL();

Description

Unsets all properties that may have previously been configured with values