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 CSyncMLFilterProperty

class CSyncMLFilterProperty : public CBase;

Description

Class that defines a particular property of a filter. A filter may have between none and many properties.

Derivation

Members

Defined in CSyncMLFilterProperty:

Inherited from CBase:


Construction and destruction


NewL(RReadStream &)

IMPORT_C static CSyncMLFilterProperty* NewL(RReadStream &aStream);

Description

Symbian constructor. Internalises a property object from a previously externalised stream. Possibly file based or from an IPC transfer for example.

Parameters

RReadStream &aStream

The externalised stream containing the representation of this object

Return value

CSyncMLFilterProperty *

An instance of this class configured as per the externalised version


NewL(const TDesC &,TSyncMLFilterPropertyDataType)

IMPORT_C static CSyncMLFilterProperty* NewL(const TDesC &aName, TSyncMLFilterPropertyDataType aDataType);

Description

Symbian constructor. Creates an instance of a filter property from constituent parts. In practice only a data provider would use this constructor.

Parameters

const TDesC16 &aName

The user displayable name of this property

TSyncMLFilterPropertyDataType aDataType

The type of data this property represents

Return value

CSyncMLFilterProperty *

An instance of this class configured using the arguments passed in

See also:


NewL(const CSyncMLFilterProperty &)

IMPORT_C static CSyncMLFilterProperty* NewL(const CSyncMLFilterProperty &aProperty);

Description

Symbian copy constructor. Used to create a copy of this property object.

Parameters

const CSyncMLFilterProperty &aProperty

The source property object to replicate

Return value

CSyncMLFilterProperty *

An identical instance to the object passed through aProperty


~CSyncMLFilterProperty()

IMPORT_C virtual ~CSyncMLFilterProperty();

Description

C++ destructor

[Top]


Member functions


ExternalizeL(RWriteStream &)const

IMPORT_C void ExternalizeL(RWriteStream &aStream) const;

Description

Externalises this class into a byte stream (aStream). Used when saving the state of an object or when intending to pass across IPC. This method will probably only be called from CSyncMLFilter::ExternalizeL(RWriteStream &)const.

Parameters

RWriteStream &aStream

The stream to externalise into

See also:


Name()const

IMPORT_C const TDesC& Name() const;

Description

Accessor for the user displayable property name.

Return value

const TDesC16 &

User meaningful name of the property


DataType()const

IMPORT_C TSyncMLFilterPropertyDataType DataType() const;

Description

Accessor that returns the data type that this property represents.

Return value

TSyncMLFilterPropertyDataType

The data type


MaxTextLength()const

IMPORT_C TUint MaxTextLength() const;

Description

Accessor returning the maximum allowable text length for this property if it's a text based object.

Return value

TUint

Max text length


PresetValueCount()const

IMPORT_C TInt PresetValueCount() const;

Description

Returns the number of presets available for a particular data type.

Return value

TInt

The number of presets available for the user to choose from


PresetValueText16L(TInt)const

IMPORT_C const TDesC16& PresetValueText16L(TInt aIndex) const;

Description

Returns the preset 16-bit unicode string at position aIndex.

Parameters

TInt aIndex

The index of the preset to return the string for

Return value

const TDesC16 &

The preset string

Leave codes

KErrNotFound

If the requested preset cannot be accessed (array out of bounds, wrong data type etc)


PresetValueText8L(TInt)const

IMPORT_C const TDesC8& PresetValueText8L(TInt aIndex) const;

Description

Returns the preset 8-bit unicode string at position aIndex.

Parameters

TInt aIndex

The index of the preset to return the string for

Return value

const TDesC8 &

The preset string

Leave codes

KErrNotFound

If the requested preset cannot be accessed (array out of bounds, wrong data type etc)


PresetValueIntL(TInt)const

IMPORT_C TInt PresetValueIntL(TInt aIndex) const;

Description

Returns the preset int at index aIndex.

Parameters

TInt aIndex

The index

Return value

TInt

The preset value

Leave codes

KErrNotFound

If the requested preset cannot be accessed (array out of bounds, wrong data type etc)


PresetValueBoolL(TInt)const

IMPORT_C TBool PresetValueBoolL(TInt aIndex) const;

Description

Returns the preset TBool at index aIndex.

Parameters

TInt aIndex

The index

Return value

TBool

The preset value

Leave codes

KErrNotFound

If the requested preset cannot be accessed (array out of bounds, wrong data type etc)


PresetValueDateTimeL(TInt)const

IMPORT_C TTime PresetValueDateTimeL(TInt aIndex) const;

Description

Returns the preset TTime at index aIndex.

Parameters

TInt aIndex

The index

Return value

TTime

The preset value

Leave codes

KErrNotFound

If the requested preset cannot be accessed (array out of bounds, wrong data type etc)


MustUsePresetValue()const

IMPORT_C TBool MustUsePresetValue() const;

Description

Returns whether or not the value the user inputs must be one of the preset's or not.

Return value

TBool

ETrue If the user must select a value from the list of preset's


DefaultPresetIndices()const

IMPORT_C const RArray< TInt >& DefaultPresetIndices() const;

Description

Returns the indices of the preset's that the UI should have as user defaults.

Return value

const RArray< TInt > &

Array of indices that the UI should display as defaults to the user


SupportsMultipleSelection()const

IMPORT_C TBool SupportsMultipleSelection() const;

Description

Returns whether or not the user is allowed to select multiple preset's from the preset list.

Return value

TBool

ETrue if multiple preset selection's allowed


SetMaxTextLengthL(TUint)

IMPORT_C void SetMaxTextLengthL(TUint);

Description

Sets the maximum length of free-text input Text8/Text16 values.

Parameters

TUint

The maximum length of text that can be entered for presets and text values


ClearPresetValuesL()

IMPORT_C void ClearPresetValuesL();

Description

Clears the preset's from the corresponding array.


AddPresetValueText16L(const TDesC16 &)

IMPORT_C void AddPresetValueText16L(const TDesC16 &aValue);

Description

Adds a preset to the array. This method should only be called by the creator of a filter property from scratch.

Parameters

const TDesC16 &aValue

Leave codes

KErrNotSupported

If the data type of this property object doesn't match the preset being added

KErrPermissionDenied

If a property is being added to an object not constructed from constituent parts

KErrAlreadyExists

If the preset has already been added


AddPresetValueText8L(const TDesC8 &)

IMPORT_C void AddPresetValueText8L(const TDesC8 &aValue);

Description

Adds a preset to the array. This method should only be called by the creator of a filter property from scratch.

Parameters

const TDesC8 &aValue

Leave codes

KErrNotSupported

If the data type of this property object doesn't match the preset being added

KErrPermissionDenied

If a property is being added to an object not constructed from constituent parts

KErrAlreadyExists

If the preset has already been added


AddPresetValueIntL(TInt)

IMPORT_C void AddPresetValueIntL(TInt aValue);

Description

Adds a preset to the array. This method should only be called by the creator of a filter property from scratch.

Parameters

TInt aValue

Leave codes

KErrNotSupported

If the data type of this property object doesn't match the preset being added

KErrPermissionDenied

If a property is being added to an object not constructed from constituent parts

KErrAlreadyExists

If the preset has already been added


AddPresetValueBoolL(TBool)

IMPORT_C void AddPresetValueBoolL(TBool aValue);

Description

Adds a preset to the array. This method should only be called by the creator of a filter property from scratch.

Parameters

TBool aValue

Leave codes

KErrNotSupported

If the data type of this property object doesn't match the preset being added

KErrPermissionDenied

If a property is being added to an object not constructed from constituent parts

KErrAlreadyExists

If the preset has already been added


AddPresetValueTTimeL(TTime)

IMPORT_C void AddPresetValueTTimeL(TTime aValue);

Description

Adds a preset to the array. This method should only be called by the creator of a filter property from scratch.

Parameters

TTime aValue

Leave codes

KErrNotSupported

If the data type of this property object doesn't match the preset being added

KErrPermissionDenied

If a property is being added to an object not constructed from constituent parts

KErrAlreadyExists

If the preset has already been added


SetMustUsePresetValue(TBool)

IMPORT_C void SetMustUsePresetValue(TBool aValue);

Description

Stipulates if the user must use one of the preset values as opposed to being able to enter free data. This method will clear any free input value previously set.

Parameters

TBool aValue

ETrue if the user must pick one of the presets


ClearDefaultPresetIndicesL()

IMPORT_C void ClearDefaultPresetIndicesL();

Description

Clears the list of defaults relating to the presets.

Leave codes

KErrPermissionDenied

If this isn't an object created from scratch


AddDefaultPresetIndexL(TInt)

IMPORT_C void AddDefaultPresetIndexL(TInt aIndex);

Description

Adds a default to the preset array with the intention that the user is presented with a recommended choice from the array of preset's.

Parameters

TInt aIndex

The index of the preset to become a default

Leave codes

KErrPermissionDenied

If this object was not created from scratch

KErrNotFound

If the index specified is outside the range of the preset


SetSupportMultipleSelectionL(TBool)

IMPORT_C void SetSupportMultipleSelectionL(TBool aValue);

Description

Allows the user of this object to select multiple presets at once.

Parameters

TBool aValue

ETrue if multiple selection's permitted


PropertyValueText16L()const

IMPORT_C const TDesC16& PropertyValueText16L() const;

Description

Returns the property value for a 16-bit unicode text property.

Return value

const TDesC16 &

The value

Leave codes

KErrNotFound

If the property data type does not match this call or hasn't yet been set


PropertyValueText8L()const

IMPORT_C const TDesC8& PropertyValueText8L() const;

Description

Returns the property value for a 8-bit unicode text property.

Return value

const TDesC8 &

The value

Leave codes

KErrNotFound

If the property data type does not match this call or hasn't yet been set


PropertyValueIntL()const

IMPORT_C TInt PropertyValueIntL() const;

Description

Returns the property value for a integer property.

Return value

TInt

The value

Leave codes

KErrNotFound

If the property data type does not match this call or hasn't yet been set


PropertyValueBoolL()const

IMPORT_C TBool PropertyValueBoolL() const;

Description

Returns the property value for a TBool property.

Return value

TBool

The value

Leave codes

KErrNotFound

If the property data type does not match this call or hasn't yet been set


PropertyValueDateTimeL()const

IMPORT_C TTime PropertyValueDateTimeL() const;

Description

Returns the property value for a Date Time property.

Return value

TTime

The value

Leave codes

KErrNotFound

If the property data type does not match this call or hasn't yet been set


SetPropertyValueText16L(const TDesC16 &)

IMPORT_C void SetPropertyValueText16L(const TDesC16 &aValue);

Description

Sets the value of this property.

Parameters

const TDesC16 &aValue

The new value to set

Leave codes

KErrNotFound

If the data type of this property doesn't match the type of the value being set

KErrNotFound

If this object only supports selection of multiple values

KErrOverflow

If the length of the string exceeds the maximum allowed string length


SetPropertyValueText8L(const TDesC8 &)

IMPORT_C void SetPropertyValueText8L(const TDesC8 &aValue);

Description

Sets the value of this property.

Parameters

const TDesC8 &aValue

The new value to set

Leave codes

KErrNotFound

If the data type of this property doesn't match the type of the value being set

KErrNotFound

If this object only supports selection of multiple values

KErrOverflow

If the length of the string exceeds the maximum allowed string length


SetPropertyValueIntL(TInt)

IMPORT_C void SetPropertyValueIntL(TInt aValue);

Description

Sets the value of this property.

Parameters

TInt aValue

The new value to set

Leave codes

KErrNotFound

If the data type of this property doesn't match the type of the value being set

KErrNotFound

If this object only supports selection of multiple values


SetPropertyValueBoolL(TBool)

IMPORT_C void SetPropertyValueBoolL(TBool aValue);

Description

Sets the value of this property.

Parameters

TBool aValue

The new value to set

Leave codes

KErrNotFound

If the data type of this property doesn't match the type of the value being set

KErrNotFound

If this object only supports selection of multiple values


SetPropertyValueDateTimeL(TTime)

IMPORT_C void SetPropertyValueDateTimeL(TTime aValue);

Description

Sets the value of this property.

Parameters

TTime aValue

The new value to set

Leave codes

KErrNotFound

If the data type of this property doesn't match the type of the value being set

KErrNotFound

If this object only supports selection of multiple values


ClearPropertyValueL()

IMPORT_C void ClearPropertyValueL();

Description

Clears the set property value, attempting to retrieve the property value after this will result in a leave.


SelectedValueIndicesCount()const

IMPORT_C TInt SelectedValueIndicesCount() const;

Description

Gets the number of preset values selected by the user.

Return value

TInt

The number of preset values selected by the user


SelectedValueIndex(TInt)const

IMPORT_C TInt SelectedValueIndex(TInt aIndex) const;

Description

Gets the index of the selected preset at position aIndex in the user selected index array.

Parameters

TInt aIndex

The position in the user selection array that points to the selected preset index

Return value

TInt

Position in array of presets of the user selection if positive, KErrNotFound if aIndex is out of range or KErrNotSupported if this method is called on a property that doesn't support multiple selection


ClearSelectedValueIndices()

IMPORT_C void ClearSelectedValueIndices();

Description

Clears all of the preset values selected by the user.


ClearSelectedValueIndexL(TInt)

IMPORT_C void ClearSelectedValueIndexL(TInt aIndex);

Description

Clears the user selection at position aIndex in the user preset selection array. Values stored in the array after this index will be shifted down so that the array remains contiguous.

Parameters

TInt aIndex

The position in the user selection array of the selection to remove

Leave codes

KErrNotSupported

If this property doesn't support multiple selection

KErrNotFound

If the index is out of range


AddSelectedValueIndexL(TInt)

IMPORT_C void AddSelectedValueIndexL(TInt aIndex);

Description

Adds a user preset selection to the list of multiple selections.

Parameters

TInt aIndex

The index in the preset array that the user has selected

Leave codes

KErrNotSupported

If this property doesn't support multiple selection


PresetValueSet()const

IMPORT_C TBool PresetValueSet() const;

Description

Accessor returning whether or not a preset value has been set.

Return value

TBool

ETrue if one of the presets has been chosen


PropertyValueSet()const

IMPORT_C TBool PropertyValueSet() const;

Description

Accessor returning whether or not a property value has been set.

Return value

TBool

ETrue if a free input value has been input