omads/omadsextensions/adapters/mediads/inc/mediadsprovider.h
branchRCL_3
changeset 52 4f0867e42d62
parent 51 8e7494275d3a
child 56 3e6957da2ff8
equal deleted inserted replaced
51:8e7494275d3a 52:4f0867e42d62
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Part of SyncML Data Synchronization Plug In Adapter
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef __MEDIADSPROVIDER_H__
       
    21 #define __MEDIADSPROVIDER_H__
       
    22 
       
    23 // INCLUDES
       
    24 #include <smldataprovider.h>
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class CMediaDsDataStore;
       
    28 class CSmlDataStoreFormat;
       
    29 
       
    30 /**
       
    31  * This class is derived from ECom Data Provider plugin-interface (CSmlDataProvider).
       
    32  * 
       
    33  */
       
    34 class CMediaDataProvider : public CSmlDataProvider
       
    35     {
       
    36 
       
    37 public:
       
    38     
       
    39     /**
       
    40     * Constructor.
       
    41 	*
       
    42 	* @return CMediaDataProvider*, a new CMediaDataProvider instance.
       
    43     */
       
    44     static CMediaDataProvider* NewL();
       
    45     
       
    46 	/**
       
    47     * Destructor.
       
    48     */
       
    49     virtual ~CMediaDataProvider();
       
    50 
       
    51     
       
    52 protected: // Inherited from CSmlDataProvider
       
    53 
       
    54 	virtual void DoOnFrameworkEvent( TSmlFrameworkEvent, TInt aParam1, TInt aParam2 );
       
    55 	
       
    56 	virtual TBool DoSupportsOperation( TUid aOpId ) const;
       
    57 	
       
    58 	virtual const CSmlDataStoreFormat& DoStoreFormatL();
       
    59 	
       
    60 	virtual CDesCArray* DoListStoresLC();
       
    61 	
       
    62 	virtual const TDesC& DoDefaultStoreL();
       
    63 	
       
    64 	virtual CSmlDataStore* DoNewStoreInstanceLC();
       
    65 	
       
    66     virtual void DoCheckSupportedServerFiltersL( const CSmlDataStoreFormat& aServerDataStoreFormat,
       
    67         RPointerArray<CSyncMLFilter>& aFilters, TSyncMLFilterChangeInfo& aChangeInfo );
       
    68         
       
    69     virtual void DoCheckServerFiltersL( RPointerArray<CSyncMLFilter>& aFilters,
       
    70         TSyncMLFilterChangeInfo& aChangeInfo ); 
       
    71         
       
    72 	virtual const RPointerArray<CSyncMLFilter>& DoSupportedServerFiltersL();
       
    73 	
       
    74 	virtual TBool DoSupportsUserSelectableMatchType() const;
       
    75 	
       
    76 	virtual HBufC* DoGenerateRecordFilterQueryLC( const RPointerArray<CSyncMLFilter>& aFilters,
       
    77 	    TSyncMLFilterMatchType aMatch, TDes& aFilterMimeType,
       
    78 	    TSyncMLFilterType& aFilterType, TDesC& aStoreName );
       
    79 	    
       
    80 	virtual void DoGenerateFieldFilterQueryL( const RPointerArray<CSyncMLFilter>& aFilters,
       
    81 	    TDes& aFilterMimeType, RPointerArray<CSmlDataProperty>& aProperties, TDesC& aStoreName );
       
    82 
       
    83 private:
       
    84 	
       
    85 	/**
       
    86     * C++ Constructor.
       
    87     */
       
    88     CMediaDataProvider();
       
    89     
       
    90 	/**
       
    91     * 2nd-phase Constructor.
       
    92     */
       
    93     void ConstructL();
       
    94    
       
    95 	/**
       
    96     * Creates new DataStore format.
       
    97     */
       
    98     CSmlDataStoreFormat* DoOwnStoreFormatL();
       
    99 
       
   100 private:
       
   101 
       
   102 	/**
       
   103     * String pool, used in store format creation.
       
   104     */
       
   105     RStringPool iStringPool;
       
   106 
       
   107 	/**
       
   108     * Data store format.
       
   109     */
       
   110     CSmlDataStoreFormat* iOwnStoreFormat;
       
   111 
       
   112 	/**
       
   113     * Supported filters (none supported at the moment).
       
   114     */
       
   115     RPointerArray<CSyncMLFilter> iFilters;
       
   116     
       
   117 	/**
       
   118     * File system handle.
       
   119     */
       
   120     RFs iFs;
       
   121     
       
   122     };
       
   123 
       
   124 #endif // __MEDIADSPROVIDER_H__