mtpfws/mtpfw/dataproviders/dputility/inc/rmtpdpsingletons.h
changeset 0 d0791faffa3f
child 4 60a94a45d437
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 /**
       
    17  @file
       
    18  @internalComponent
       
    19 */
       
    20 
       
    21 #ifndef RMTPDPSINGLETONS_H
       
    22 #define RMTPDPSINGLETONS_H
       
    23 
       
    24 #include "mtpdebug.h"
       
    25 
       
    26 #include "rmtputility.h"
       
    27 
       
    28 class MMTPDataProviderFramework;
       
    29 class CMTPDpConfigMgr;
       
    30 class CMTPFSExclusionMgr;
       
    31 /** 
       
    32 Implements the MTP data processor singletons reference manager.
       
    33 @internalComponent
       
    34 */
       
    35 
       
    36 class RMTPDpSingletons
       
    37     {
       
    38 public:  
       
    39     IMPORT_C RMTPDpSingletons();  
       
    40 
       
    41     IMPORT_C void OpenL(MMTPDataProviderFramework& aFramework);
       
    42     IMPORT_C void Close();
       
    43     
       
    44     IMPORT_C CMTPFSExclusionMgr& ExclusionMgrL() const;
       
    45     IMPORT_C void SetExclusionMgrL(CMTPFSExclusionMgr& aExclusionMgr);
       
    46     
       
    47     IMPORT_C RMTPUtility& MTPUtility() const;
       
    48     
       
    49 private:
       
    50     class TExclusionMgrEntry
       
    51     	{
       
    52     public:
       
    53     	CMTPFSExclusionMgr* iExclusionMgr;
       
    54     	TInt iDpId;
       
    55     	
       
    56     	static TInt Compare(const TExclusionMgrEntry& aFirst, const TExclusionMgrEntry& aSecond);
       
    57     	};
       
    58     
       
    59     /**
       
    60     Implements the singletons reference block.
       
    61     */
       
    62     class CSingletons : public CObject
       
    63         {
       
    64     public: 
       
    65 
       
    66         static CSingletons& OpenL(MMTPDataProviderFramework& aFramework);
       
    67         void Close();
       
    68 
       
    69     private: // From CObject
       
    70 
       
    71     private:
       
    72 
       
    73         static CSingletons* NewL(MMTPDataProviderFramework& aFramework);
       
    74         virtual ~CSingletons();
       
    75         void ConstructL(MMTPDataProviderFramework& aFramework);
       
    76 
       
    77     public: // Owned
       
    78 
       
    79         /**
       
    80         FLOGGER debug trace member variable.
       
    81         */
       
    82         __FLOG_DECLARATION_MEMBER_MUTABLE;
       
    83             
       
    84     	
       
    85     	/**
       
    86     	The file system exclusion manager list. This list contains all the Data Providers'
       
    87     	file system exclusion manager associated with its Data Provider ID. only a single one will 
       
    88     	be used corresponding to the Data Provider ID.
       
    89     	*/
       
    90     	RArray<TExclusionMgrEntry>	iExclusionList;
       
    91     	
       
    92     	/*
       
    93     	 * The utility for DPutility 
       
    94     	 */
       
    95     	RMTPUtility					iMTPUtility;
       
    96       };
       
    97       
       
    98 private: //Not owned
       
    99 	/**
       
   100 	Reference to data provider framework.
       
   101 	*/
       
   102 	MMTPDataProviderFramework* iFramework;
       
   103     
       
   104 private: // Owned
       
   105     /**
       
   106     FLOGGER debug trace member variable.
       
   107     */
       
   108     __FLOG_DECLARATION_MEMBER_MUTABLE;
       
   109     
       
   110     /**
       
   111     The singletons reference block.
       
   112     */
       
   113     CSingletons*    iSingletons;
       
   114 };
       
   115 
       
   116 #endif // RMTPDPSINGLETONS_H