mtpfws/mtpfw/dataproviders/devdp/inc/rmtpdevicedpsingletons.h
changeset 0 d0791faffa3f
child 1 f8e15b44d440
equal deleted inserted replaced
-1:000000000000 0:d0791faffa3f
       
     1 // Copyright (c) 2006-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 RMTPDEVICEDPSINGLETONS_H
       
    22 #define RMTPDEVICEDPSINGLETONS_H
       
    23 
       
    24 #include <e32def.h>
       
    25 
       
    26 #include "mtpdebug.h"
       
    27 
       
    28 class CMTPDeviceDataStore;
       
    29 class CMTPDeviceDpConfigMgr;
       
    30 
       
    31 /** 
       
    32 Implements the MTP device data processor singletons reference manager.
       
    33 @internalComponent
       
    34 */
       
    35 class RMTPDeviceDpSingletons
       
    36     {
       
    37     
       
    38 public:  
       
    39 
       
    40     RMTPDeviceDpSingletons();  
       
    41 
       
    42     void OpenL(MMTPDataProviderFramework& aFramework);
       
    43     void Close();
       
    44     
       
    45     CMTPDeviceDataStore& DeviceDataStore();
       
    46     CMTPDeviceDpConfigMgr& ConfigMgr();
       
    47     
       
    48 private:
       
    49     
       
    50     /**
       
    51     Implements the singletons reference block.
       
    52     */
       
    53     class CSingletons : public CObject
       
    54         {
       
    55     public: 
       
    56 
       
    57         static CSingletons& OpenL(MMTPDataProviderFramework& aFramework);
       
    58         void Close();
       
    59 
       
    60     private:
       
    61 
       
    62         static CSingletons* NewL(MMTPDataProviderFramework& aFramework);
       
    63         virtual ~CSingletons();
       
    64         void ConstructL(MMTPDataProviderFramework& aFramework);
       
    65 
       
    66     public: // Owned
       
    67 
       
    68         /**
       
    69         FLOGGER debug trace member variable.
       
    70         */
       
    71         __FLOG_DECLARATION_MEMBER_MUTABLE;
       
    72             
       
    73         /**
       
    74         The device information data manager.
       
    75         */
       
    76         CMTPDeviceDataStore*    iDeviceDataStore;
       
    77         
       
    78         /**
       
    79         The device dp config manager.
       
    80         */
       
    81         CMTPDeviceDpConfigMgr*	iConfigMgr;
       
    82     };
       
    83     
       
    84 private: // Owned
       
    85 
       
    86     /**
       
    87     FLOGGER debug trace member variable.
       
    88     */
       
    89     __FLOG_DECLARATION_MEMBER_MUTABLE;
       
    90 
       
    91     /**
       
    92     The singletons reference block.
       
    93     */
       
    94     CSingletons*    iSingletons;
       
    95 };
       
    96 
       
    97 #endif // RMTPDEVICEDPSINGLETONS_H