mtpfws/mtpfw/inc/cmtpdpidstore.h
changeset 0 d0791faffa3f
equal deleted inserted replaced
-1:000000000000 0:d0791faffa3f
       
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef CMTPDPIDSTORE_H
       
    17 #define CMTPDPIDSTORE_H  
       
    18 /** 
       
    19 Implements the MTP object manager interface.
       
    20 @internalComponent
       
    21  
       
    22 */
       
    23 #include <d32dbms.h>
       
    24 #include "mtpframeworkconst.h"
       
    25 
       
    26 class RDbDatabase;
       
    27 
       
    28 class CMTPDPIDStore :  public CBase        
       
    29     {
       
    30 public:   
       
    31  
       
    32     static CMTPDPIDStore* NewL(RDbDatabase& aDatabase);    
       
    33     ~CMTPDPIDStore();
       
    34 
       
    35 public:     
       
    36     void InsertDPIDObjectL(TUint aDpId, TUint aUid);    
       
    37     TUint DPIDL(TUint32 aUid, TBool& aFlag) const;
       
    38 
       
    39 private: 
       
    40 	enum TDPIDStore
       
    41         {
       
    42         EDPIDStoreDataProviderId         = 1,
       
    43         EDPIDStoreUid                    = 2        
       
    44         };   
       
    45 	CMTPDPIDStore(RDbDatabase& aDatabase);
       
    46     void CreateDPIDStoteTableL();
       
    47     void ConstructL();   
       
    48 private:
       
    49 	RDbDatabase&                    iDatabase;	
       
    50 	mutable TBuf<KMTPMaxSqlStatementLen>    iSqlStatement;   
       
    51 	RArray<TInt64> iDPIDs;
       
    52 	RArray<TInt64> iDPUIDs;
       
    53     };
       
    54 #endif // CMTPDPIDSTORE_H