epoc32/include/SyncMLDataFilter.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
child 4 837f303aceeb
permissions -rw-r--r--
Final list of Symbian^2 public API header files
williamr@2
     1
/*
williamr@2
     2
* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). 
williamr@2
     3
* All rights reserved.
williamr@2
     4
* This component and the accompanying materials are made available
williamr@2
     5
* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
williamr@2
     6
* which accompanies this distribution, and is available
williamr@2
     7
* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
williamr@2
     8
*
williamr@2
     9
* Initial Contributors:
williamr@2
    10
* Nokia Corporation - initial contribution.
williamr@2
    11
*
williamr@2
    12
* Contributors:
williamr@2
    13
*
williamr@2
    14
* Description: For adding content to be synchronized.
williamr@2
    15
*
williamr@2
    16
*/
williamr@2
    17
williamr@2
    18
williamr@2
    19
#ifndef __SYNCMLDATAFILTER_H__
williamr@2
    20
#define __SYNCMLDATAFILTER_H__
williamr@2
    21
williamr@2
    22
//-------------------------------------------------------------------------------------------------
williamr@2
    23
// Includes
williamr@2
    24
//-------------------------------------------------------------------------------------------------
williamr@2
    25
#include <e32base.h>
williamr@2
    26
#include <s32strm.h>
williamr@2
    27
#include <barsread.h>
williamr@2
    28
williamr@2
    29
//-------------------------------------------------------------------------------------------------
williamr@2
    30
// Enumerations
williamr@2
    31
//-------------------------------------------------------------------------------------------------
williamr@2
    32
williamr@2
    33
//  Filter type (inclusive/exclusive)
williamr@2
    34
enum TSyncMLFilterType
williamr@2
    35
	{
williamr@2
    36
	ESyncMLTypeInclusive,
williamr@2
    37
	ESyncMLTypeExclusive
williamr@2
    38
	};
williamr@2
    39
williamr@2
    40
// Logical operator of CGI script
williamr@2
    41
enum TSyncMLFilterMatchType
williamr@2
    42
	{
williamr@2
    43
	ESyncMLMatchDisabled,		// Value cannot be changed
williamr@2
    44
	ESyncMLMatchNotSelected,	// Value is not set yet
williamr@2
    45
	ESyncMLMatchAND,
williamr@2
    46
	ESyncMLMatchOR
williamr@2
    47
	};
williamr@2
    48
williamr@2
    49
// Data type of filter property
williamr@2
    50
enum TSyncMLFilterPropertyDataType
williamr@2
    51
	{
williamr@2
    52
	ESyncMLDataTypeNull,
williamr@2
    53
	ESyncMLDataTypeBool,
williamr@2
    54
	ESyncMLDataTypeNumber,
williamr@2
    55
	ESyncMLDataTypeDate,
williamr@2
    56
	ESyncMLDataTypeTime,
williamr@2
    57
	ESyncMLDataTypeText8,
williamr@2
    58
	ESyncMLDataTypeText16
williamr@2
    59
	};
williamr@2
    60
	
williamr@2
    61
// This is used when DataProvider makes some changes to dynamic filters
williamr@2
    62
// or removes/adds filter based on store format of remote server
williamr@2
    63
enum TSyncMLFilterChangeInfo
williamr@2
    64
	{							
williamr@2
    65
	ESyncMLDefault,
williamr@2
    66
	ESyncMLNoChanges,
williamr@2
    67
	ESyncMLDynamicFiltersUpdated,
williamr@2
    68
	ESyncMLFiltersMoreFiltersSupportedByServer,
williamr@2
    69
	ESyncMLFiltersLessFiltersSupportedByServer,
williamr@2
    70
	ESyncMLFiltersUpdated		// General if many changes
williamr@2
    71
	};
williamr@2
    72
williamr@2
    73
williamr@2
    74
/**
williamr@2
    75
* Filter Property Class.
williamr@2
    76
*
williamr@2
    77
* @lib syncmldatafilter.lib
williamr@2
    78
*/
williamr@2
    79
class CSyncMLFilterProperty : public CBase
williamr@2
    80
	{
williamr@2
    81
	public:
williamr@2
    82
		/**
williamr@2
    83
    	* Symbian two-phased constructor.
williamr@2
    84
    	*/
williamr@2
    85
		IMPORT_C static CSyncMLFilterProperty* NewLC();
williamr@2
    86
		
williamr@2
    87
		/**
williamr@2
    88
    	* Symbian two-phased constructor.
williamr@2
    89
    	* @param aReader TResourceReader for recource file that includes needed information to initialize filter property.
williamr@2
    90
    	*/
williamr@2
    91
		IMPORT_C static CSyncMLFilterProperty* NewLC( TResourceReader& aReader );
williamr@2
    92
		
williamr@2
    93
		/**
williamr@2
    94
    	* Symbian two-phased constructor.
williamr@2
    95
    	* @param aStream RReadStream for stream that includes needed information to initialize filter property.
williamr@2
    96
    	*/
williamr@2
    97
		IMPORT_C static CSyncMLFilterProperty* NewLC( RReadStream& aStream );
williamr@2
    98
		
williamr@2
    99
		/**
williamr@2
   100
		* Destructor.
williamr@2
   101
		*/
williamr@2
   102
		IMPORT_C ~CSyncMLFilterProperty();
williamr@2
   103
williamr@2
   104
		/**
williamr@2
   105
	    * Externalizes filter property.
williamr@2
   106
	    * @param aStream Specifies stream where filter property is externalized.
williamr@2
   107
	    */
williamr@2
   108
		IMPORT_C void ExternalizeL( RWriteStream& aStream ) const;
williamr@2
   109
williamr@2
   110
		/**
williamr@2
   111
	    * Name of filter property.
williamr@2
   112
	    * @return TDesC Name of the filter property.
williamr@2
   113
	    */
williamr@2
   114
		IMPORT_C const TDesC& DisplayName() const;
williamr@2
   115
		
williamr@2
   116
		/**
williamr@2
   117
	    * Data type of default values for filter property.
williamr@2
   118
	    * @return TSyncMLFilterPropertyDataType Data type.
williamr@2
   119
	    */
williamr@2
   120
		IMPORT_C TSyncMLFilterPropertyDataType DefaultValueDataType() const;
williamr@2
   121
		
williamr@2
   122
		/**
williamr@2
   123
	    * Data type of query value for filter property.
williamr@2
   124
	    * @return TSyncMLFilterPropertyDataType Data type.
williamr@2
   125
	    */
williamr@2
   126
		IMPORT_C TSyncMLFilterPropertyDataType QueryValueDataType() const;
williamr@2
   127
		
williamr@2
   128
		/**
williamr@2
   129
	    * Maximum text length of filter property. This is useful only if data type is text16 or text8.
williamr@2
   130
	    * @return TUint Maximum text length of the filter property.
williamr@2
   131
	    */
williamr@2
   132
		IMPORT_C TUint MaxTextLength() const;
williamr@2
   133
		
williamr@2
   134
		/**
williamr@2
   135
	    * Number of default values.
williamr@2
   136
	    * @return TInt Number of default values of the filter property.
williamr@2
   137
	    */
williamr@2
   138
		IMPORT_C TInt DefaultValueCount() const;
williamr@2
   139
		
williamr@2
   140
		/**
williamr@2
   141
	    * Default value from given index for text16 property. This is useful only if data type is text16.
williamr@2
   142
	    * @param aIndex Specifies index where default value is returned.
williamr@2
   143
	    * @return TDesC16 Default value from given index.
williamr@2
   144
	    */
williamr@2
   145
		IMPORT_C const TDesC16& DefaultValueText16L( TInt aIndex ) const;
williamr@2
   146
		
williamr@2
   147
		/**
williamr@2
   148
	    * Default value from given index for text8 property. This is useful only if data type is text8.
williamr@2
   149
	    * @param aIndex Specifies index where default value is returned.
williamr@2
   150
	    * @return TDesC8 Default value from given index.
williamr@2
   151
	    */
williamr@2
   152
		IMPORT_C const TDesC8& DefaultValueText8L( TInt aIndex ) const;
williamr@2
   153
		
williamr@2
   154
		/**
williamr@2
   155
	    * Default value from given index for number property. This is useful only if data type is number.
williamr@2
   156
	    * @param aIndex Specifies index where default value is returned.
williamr@2
   157
	    * @return TInt Default value from given index.
williamr@2
   158
	    */
williamr@2
   159
		IMPORT_C TInt DefaultValueIntL( TInt aIndex ) const;
williamr@2
   160
		
williamr@2
   161
		/**
williamr@2
   162
	    * Default value from given index for boolean property. This is useful only if data type is boolean.
williamr@2
   163
	    * @param aIndex Specifies index where default value is returned.
williamr@2
   164
	    * @return TBool Default value from given index.
williamr@2
   165
	    */
williamr@2
   166
		IMPORT_C TBool DefaultValueBoolL( TInt aIndex ) const;
williamr@2
   167
		
williamr@2
   168
		/**
williamr@2
   169
	    * Default value from given index for date property. This is useful only if data type is date.
williamr@2
   170
	    * @param aIndex Specifies index where default value is returned.
williamr@2
   171
	    * @return TTime Default value from given index.
williamr@2
   172
	    */
williamr@2
   173
		IMPORT_C const TTime& DefaultValueDateL( TInt aIndex ) const;
williamr@2
   174
		
williamr@2
   175
		/**
williamr@2
   176
	    * Default value from given index for time property. This is useful only if data type is time.
williamr@2
   177
	    * @param aIndex Specifies index where default value is returned.
williamr@2
   178
	    * @return TTime Default value from given index.
williamr@2
   179
	    */
williamr@2
   180
		IMPORT_C const TTime& DefaultValueTimeL( TInt aIndex ) const;
williamr@2
   181
		
williamr@2
   182
		/**
williamr@2
   183
	    * Clears all default values and value selections.
williamr@2
   184
	    */
williamr@2
   185
		IMPORT_C void ClearDefaultValuesL();
williamr@2
   186
		
williamr@2
   187
		/**
williamr@2
   188
	    * Adds default value for text16 property. This is useful only if data type is text16.
williamr@2
   189
	    * @param aNewDefaultValue Value of added default value.
williamr@2
   190
	    * @param aSelected Specifies if value is selected or not.
williamr@2
   191
	    */
williamr@2
   192
		IMPORT_C void AddDefaultValueText16L( TDesC16& aNewDefaultValue, const TBool aSelected );
williamr@2
   193
		
williamr@2
   194
		/**
williamr@2
   195
	    * Adds default value for text8 property. This is useful only if data type is text8.
williamr@2
   196
	    * @param aNewDefaultValue Value of added default value.
williamr@2
   197
	    * @param aSelected Specifies if value is selected or not.
williamr@2
   198
	    */
williamr@2
   199
		IMPORT_C void AddDefaultValueText8L( TDesC8& aNewDefaultValue, const TBool aSelected );
williamr@2
   200
		
williamr@2
   201
		/**
williamr@2
   202
	    * Adds default value for number property. This is useful only if data type is number.
williamr@2
   203
	    * @param aNewDefaultValue Value of added default value.
williamr@2
   204
	    * @param aSelected Specifies if value is selected or not.
williamr@2
   205
	    */
williamr@2
   206
		IMPORT_C void AddDefaultValueIntL( const TInt aNewDefaultValue, const TBool aSelected );
williamr@2
   207
		
williamr@2
   208
		/**
williamr@2
   209
	    * Adds default value for boolean property. This is useful only if data type is boolean.
williamr@2
   210
	    * @param aNewDefaultValue Value of added default value.
williamr@2
   211
	    * @param aSelected Specifies if value is selected or not.
williamr@2
   212
	    */
williamr@2
   213
		IMPORT_C void AddDefaultValueBoolL( const TBool aNewDefaultValue, const TBool aSelected );
williamr@2
   214
		
williamr@2
   215
		/**
williamr@2
   216
	    * Adds default value for date property. This is useful only if data type is date.
williamr@2
   217
	    * @param aNewDefaultValue Value of added default value.
williamr@2
   218
	    * @param aSelected Specifies if value is selected or not.
williamr@2
   219
	    */
williamr@2
   220
		IMPORT_C void AddDefaultValueDateL( const TTime& aNewDefaultValue, const TBool aSelected );
williamr@2
   221
		
williamr@2
   222
		/**
williamr@2
   223
	    * Adds default value for time property. This is useful only if data type is time.
williamr@2
   224
	    * @param aNewDefaultValue Value of added default value.
williamr@2
   225
	    * @param aSelected Specifies if value is selected or not.
williamr@2
   226
	    */
williamr@2
   227
		IMPORT_C void AddDefaultValueTimeL( const TTime& aNewDefaultValue, const TBool aSelected );
williamr@2
   228
		
williamr@2
   229
		/**
williamr@2
   230
	    * Can use query value with default values or not.
williamr@2
   231
	    * @return TBool Returns ETrue if query can be used. Otherwise EFalse is returned.
williamr@2
   232
	    */
williamr@2
   233
		IMPORT_C TBool CanUseQueryValue() const;
williamr@2
   234
		
williamr@2
   235
		/**
williamr@2
   236
	    * Does filter property support multiple selection.
williamr@2
   237
	    * @return TBool Returns ETrue if multiple values can be selected. Otherwise EFalse is returned.
williamr@2
   238
	    */
williamr@2
   239
		IMPORT_C TBool SupportsMultipleSelection() const;
williamr@2
   240
		
williamr@2
   241
		/**
williamr@2
   242
	    * Does filter property support empty selection.
williamr@2
   243
	    * @return TBool Returns ETrue if none of values can be selected. Otherwise EFalse is returned.
williamr@2
   244
	    */
williamr@2
   245
		IMPORT_C TBool SupportsEmptySelection() const;
williamr@2
   246
		
williamr@2
   247
		/**
williamr@2
   248
	    * Returns information about which default values are selected.
williamr@2
   249
	    * @param aIndex Specifies index where selection information is returned.
williamr@2
   250
	    * @return TBool Returns ETrue if default value in given index is selected. Otherwise EFalse is returned.
williamr@2
   251
	    */
williamr@2
   252
		IMPORT_C TBool IsDefaultValueSelected( TInt aIndex ) const;
williamr@2
   253
		
williamr@2
   254
		/**
williamr@2
   255
	    * Returns information about query value selection. This is useful only if query value can be used.
williamr@2
   256
	    * @return TBool Returns ETrue if query value is selected. Otherwise EFalse is returned.
williamr@2
   257
	    */
williamr@2
   258
		IMPORT_C TBool IsQueryValueSelected() const;
williamr@2
   259
		
williamr@2
   260
		/**
williamr@2
   261
	    * Selects default value from given index.
williamr@2
   262
	    * @param aIndex Specifies index which is selected.
williamr@2
   263
	    */
williamr@2
   264
		IMPORT_C void SelectDefaultValueL( TInt aIndex );
williamr@2
   265
		
williamr@2
   266
		/**
williamr@2
   267
	    * Unselects default value from given index.
williamr@2
   268
	    * @param aIndex Specifies index which is unselected.
williamr@2
   269
	    */
williamr@2
   270
		IMPORT_C void UnselectDefaultValueL( TInt aIndex );
williamr@2
   271
				
williamr@2
   272
		/**
williamr@2
   273
	    * Returns query value for text16 property. This is useful only if data type is text16 and if query value can be used.
williamr@2
   274
	    * @return TDesC16 Query value.
williamr@2
   275
	    */
williamr@2
   276
		IMPORT_C const TDesC16& QueryValueText16L() const;
williamr@2
   277
		
williamr@2
   278
		/**
williamr@2
   279
	    * Returns query value for text8 property. This is useful only if data type is text8 and if query value can be used.
williamr@2
   280
	    * @return TDesC8 Query value.
williamr@2
   281
	    */
williamr@2
   282
		IMPORT_C const TDesC8& QueryValueText8L() const;
williamr@2
   283
		
williamr@2
   284
		/**
williamr@2
   285
	    * Returns query value for number property. This is useful only if data type is number and if query value can be used.
williamr@2
   286
	    * @return TInt Query value.
williamr@2
   287
	    */
williamr@2
   288
		IMPORT_C TInt QueryValueIntL() const;
williamr@2
   289
		
williamr@2
   290
		/**
williamr@2
   291
	    * Returns query value for boolean property. This is useful only if data type is boolean and if query value can be used.
williamr@2
   292
	    * @return TBool Query value.
williamr@2
   293
	    */
williamr@2
   294
		IMPORT_C TBool QueryValueBoolL() const;
williamr@2
   295
		
williamr@2
   296
		/**
williamr@2
   297
	    * Returns query value for date property. This is useful only if data type is date and if query value can be used.
williamr@2
   298
	    * @return TTime Query value.
williamr@2
   299
	    */
williamr@2
   300
		IMPORT_C const TTime& QueryValueDateL() const;
williamr@2
   301
williamr@2
   302
		/**
williamr@2
   303
	    * Returns query value for time property. This is useful only if data type is time and if query value can be used.
williamr@2
   304
	    * @return TTime Query value.
williamr@2
   305
	    */
williamr@2
   306
		IMPORT_C const TTime& QueryValueTimeL() const;
williamr@2
   307
		
williamr@2
   308
		/**
williamr@2
   309
	    * Unselects query value. This is useful only if query value can be used.
williamr@2
   310
	    * This method still keeps the value
williamr@2
   311
	    */
williamr@2
   312
		IMPORT_C void UnselectQueryValueL();
williamr@2
   313
		
williamr@2
   314
		/**
williamr@2
   315
	    * Sets query value for text16 property. This is useful only if data type is text16 and if query value can be used.
williamr@2
   316
	    * This method also selects query value.
williamr@2
   317
	    * @param aValue Specifies new value for query value.
williamr@2
   318
	    */
williamr@2
   319
		IMPORT_C void SetQueryValueText16L( const TDesC16& aValue );
williamr@2
   320
		
williamr@2
   321
		/**
williamr@2
   322
	    * Sets query value for text8 property. This is useful only if data type is text8 and if query value can be used.
williamr@2
   323
	    * This method also selects query value.
williamr@2
   324
	    * @param aValue Specifies new value for query value.
williamr@2
   325
	    */
williamr@2
   326
		IMPORT_C void SetQueryValueText8L( const TDesC8& aValue );
williamr@2
   327
		
williamr@2
   328
		/**
williamr@2
   329
	    * Sets query value for number property. This is useful only if data type is number and if query value can be used.
williamr@2
   330
	    * This method also selects query value.
williamr@2
   331
	    * @param aValue Specifies new value for query value.
williamr@2
   332
	    */
williamr@2
   333
		IMPORT_C void SetQueryValueIntL( TInt aValue );
williamr@2
   334
		
williamr@2
   335
		/**
williamr@2
   336
	    * Sets query value for boolean property. This is useful only if data type is boolean and if query value can be used.
williamr@2
   337
	    * This method also selects query value.
williamr@2
   338
	    * @param aValue Specifies new value for query value.
williamr@2
   339
	    */
williamr@2
   340
		IMPORT_C void SetQueryValueBoolL( TBool aValue );
williamr@2
   341
		
williamr@2
   342
		/**
williamr@2
   343
	    * Sets query value for date property. This is useful only if data type is date and if query value can be used.
williamr@2
   344
	    * This method also selects query value.
williamr@2
   345
	    * @param aValue Specifies new value for query value.
williamr@2
   346
	    */
williamr@2
   347
		IMPORT_C void SetQueryValueDateL( const TTime& aValue );
williamr@2
   348
		
williamr@2
   349
		/**
williamr@2
   350
	    * Sets query value for time property. This is useful only if data type is time and if query value can be used.
williamr@2
   351
	    * This method also selects query value.
williamr@2
   352
	    * @param aValue Specifies new value for query value.
williamr@2
   353
	    */
williamr@2
   354
		IMPORT_C void SetQueryValueTimeL( const TTime& aValue );
williamr@2
   355
		
williamr@2
   356
		/**
williamr@2
   357
	    * Size of data
williamr@2
   358
	    * @return Size of internal data
williamr@2
   359
	    */
williamr@2
   360
		IMPORT_C TInt DataSize();
williamr@2
   361
			
williamr@2
   362
	private:
williamr@2
   363
		/**
williamr@2
   364
	    * Basic constructor.
williamr@2
   365
	    */
williamr@2
   366
		CSyncMLFilterProperty();
williamr@2
   367
		
williamr@2
   368
williamr@2
   369
	private:
williamr@2
   370
		HBufC* 							iDisplayName;
williamr@2
   371
		TSyncMLFilterPropertyDataType 	iDataTypeForDefaultValues;
williamr@2
   372
		TSyncMLFilterPropertyDataType 	iDataTypeForQueryValue;
williamr@2
   373
		TUint 							iMaxTextLength;
williamr@2
   374
		
williamr@2
   375
		RPointerArray<HBufC16>		 	iDefaultValueText16List;
williamr@2
   376
		RPointerArray<HBufC8> 			iDefaultValueText8List;
williamr@2
   377
		RArray<TInt>					iDefaultValueIntOrBoolList;
williamr@2
   378
		RPointerArray<TTime> 			iDefaultValueDateOrTimeList;
williamr@2
   379
		
williamr@2
   380
		TBool 							iCanUseQueryValue;
williamr@2
   381
		TBool 							iSupportsMultpleSelection;
williamr@2
   382
		TBool							iSupportsEmptySelection;
williamr@2
   383
		
williamr@2
   384
		RArray<TBool>					iDefaultValueSelected;
williamr@2
   385
		TBool							iQueryValueSelected;
williamr@2
   386
		
williamr@2
   387
		HBufC16*						iQueryValueText16;
williamr@2
   388
		HBufC8*							iQueryValueText8;
williamr@2
   389
  		TInt 							iQueryValueIntOrBool;
williamr@2
   390
	  	TTime 							iQueryValueDateOrTime;
williamr@2
   391
williamr@2
   392
	};
williamr@2
   393
	
williamr@2
   394
	
williamr@2
   395
/**
williamr@2
   396
* Filter Class.
williamr@2
   397
*
williamr@2
   398
* @lib syncmldatafilter.lib
williamr@2
   399
*/
williamr@2
   400
class CSyncMLFilter : public CBase
williamr@2
   401
	{
williamr@2
   402
	public:
williamr@2
   403
		/**
williamr@2
   404
    	* Symbian two-phased constructor.
williamr@2
   405
    	*/
williamr@2
   406
		IMPORT_C static CSyncMLFilter* NewLC();
williamr@2
   407
		
williamr@2
   408
		/**
williamr@2
   409
    	* Symbian two-phased constructor.
williamr@2
   410
    	* @param aReader TResourceReader for recource file that includes needed information to initialize filter.
williamr@2
   411
    	*/
williamr@2
   412
		IMPORT_C static CSyncMLFilter* NewLC( TResourceReader& aReader );
williamr@2
   413
		
williamr@2
   414
		/**
williamr@2
   415
    	* Symbian two-phased constructor.
williamr@2
   416
    	* @param aStream RReadStream for stream that includes needed information to initialize filter.
williamr@2
   417
    	*/
williamr@2
   418
		IMPORT_C static CSyncMLFilter* NewLC( RReadStream& aStream );
williamr@2
   419
		
williamr@2
   420
		/**
williamr@2
   421
		* Destructor.
williamr@2
   422
		*/		
williamr@2
   423
		IMPORT_C ~CSyncMLFilter();
williamr@2
   424
williamr@2
   425
		/**
williamr@2
   426
	    * Externalizes filter.
williamr@2
   427
	    * @param aStream Specifies stream where filter is externalized.
williamr@2
   428
	    */
williamr@2
   429
		IMPORT_C void ExternalizeL( RWriteStream& aStream ) const;
williamr@2
   430
		
williamr@2
   431
		/**
williamr@2
   432
	    * ID of filter.
williamr@2
   433
	    * @return TUint ID of the filter.
williamr@2
   434
	    */
williamr@2
   435
		IMPORT_C TUint FilterId() const;
williamr@2
   436
		
williamr@2
   437
		/**
williamr@2
   438
	    * Name of filter.
williamr@2
   439
	    * @return TDesC Name of the filter.
williamr@2
   440
	    */
williamr@2
   441
		IMPORT_C const TDesC& DisplayName() const
williamr@2
   442
		;
williamr@2
   443
		/**
williamr@2
   444
	    * Description of filter.
williamr@2
   445
	    * @return TDesC Description of the filter.
williamr@2
   446
	    */
williamr@2
   447
		IMPORT_C const TDesC& DisplayDescription() const;
williamr@2
   448
		
williamr@2
   449
		/**
williamr@2
   450
	    * Filter enable/disable information.
williamr@2
   451
	    * @return TBool ETrue if filter is enabled. Otherwise EFalse is returned.
williamr@2
   452
	    */
williamr@2
   453
		IMPORT_C TBool Enabled() const;
williamr@2
   454
		
williamr@2
   455
		/**
williamr@2
   456
	    * Set filter enable/disable information.
williamr@2
   457
	    * @param aEnabled ETrue if filter enabled and EFalse is filter is disabled
williamr@2
   458
	    */
williamr@2
   459
		IMPORT_C void SetEnabledL( const TBool aEnabled );
williamr@2
   460
		
williamr@2
   461
		/**
williamr@2
   462
	    * Information about server capabilities to support this filter.
williamr@2
   463
	    * @return TBool ETrue if filter is supported by server. Otherwise EFalse is returned.
williamr@2
   464
	    */
williamr@2
   465
		IMPORT_C TBool SupportedByServer() const;
williamr@2
   466
		
williamr@2
   467
		/**
williamr@2
   468
	    * Set information about server capabilities to support this filter.
williamr@2
   469
	    * @param aSupported ETrue if filter is supported by server and EFalse if it is not supported.
williamr@2
   470
	    */
williamr@2
   471
		IMPORT_C void SetSupportedByServerL( const TBool aSupported );
williamr@2
   472
		
williamr@2
   473
		/**
williamr@2
   474
	    * Information about match type effect to filter.
williamr@2
   475
	    * @return TBool ETrue if match type affect to filter. Otherwise EFalse is returned.
williamr@2
   476
	    */
williamr@2
   477
		IMPORT_C TBool MatchTypeSupported() const;
williamr@2
   478
		
williamr@2
   479
		/**
williamr@2
   480
	    * Set information about match type effect to filter.
williamr@2
   481
	    * @param aSupported ETrue if match type affect to filter and EFalse if it does not affect.
williamr@2
   482
	    */
williamr@2
   483
		IMPORT_C void SetMatchTypeSupported( const TBool aSupported );
williamr@2
   484
		
williamr@2
   485
		/**
williamr@2
   486
	    * Properties of filter.
williamr@2
   487
	    * @return RPointerArray Properties of filter.
williamr@2
   488
	    */
williamr@2
   489
		IMPORT_C RPointerArray<CSyncMLFilterProperty>& FilterProperties();
williamr@2
   490
		
williamr@2
   491
		/**
williamr@2
   492
	    * Size of data
williamr@2
   493
	    * @return Size of internal data
williamr@2
   494
	    */
williamr@2
   495
		IMPORT_C TInt DataSize();
williamr@2
   496
		
williamr@2
   497
	private:
williamr@2
   498
		/**
williamr@2
   499
	    * Basic constructor.
williamr@2
   500
	    */
williamr@2
   501
		CSyncMLFilter();
williamr@2
   502
	
williamr@2
   503
williamr@2
   504
	private:
williamr@2
   505
		TUint 									iFilterId;
williamr@2
   506
  		HBufC* 									iDisplayName;
williamr@2
   507
  		HBufC* 									iDisplayDescription;
williamr@2
   508
  		TBool 									iEnabled;
williamr@2
   509
  		TBool 									iSupportedByServer;
williamr@2
   510
  		TBool 									iMatchTypeSupported;
williamr@2
   511
  		RPointerArray<CSyncMLFilterProperty>	iProperties;
williamr@2
   512
	
williamr@2
   513
	};
williamr@2
   514
williamr@2
   515
#endif
williamr@2
   516
williamr@2
   517
// End of file