mmappcomponents/mmmtpdataprovider/src/cmmmtpdpaccesssingleton.cpp
branchRCL_3
changeset 11 780c925249c1
parent 0 a2952bb97e68
child 17 6f9f6e99a23e
equal deleted inserted replaced
10:d240f0a77280 11:780c925249c1
    48 // -----------------------------------------------------------------------------
    48 // -----------------------------------------------------------------------------
    49 // CMmMtpDpAccessSingleton::CreateL
    49 // CMmMtpDpAccessSingleton::CreateL
    50 // create singleton instance
    50 // create singleton instance
    51 // -----------------------------------------------------------------------------
    51 // -----------------------------------------------------------------------------
    52 //
    52 //
    53 EXPORT_C void CMmMtpDpAccessSingleton::CreateL( RFs& aRfs,
    53 EXPORT_C void CMmMtpDpAccessSingleton::CreateL( MMTPDataProviderFramework& aFramework )
    54     MMTPDataProviderFramework& aFramework )
       
    55     {
    54     {
    56     CMmMtpDpAccessSingleton* self = reinterpret_cast<CMmMtpDpAccessSingleton*>( Dll::Tls() );
    55     CMmMtpDpAccessSingleton* self = reinterpret_cast<CMmMtpDpAccessSingleton*>( Dll::Tls() );
    57 
    56 
    58     if ( self == NULL )
    57     if ( self == NULL )
    59         {
    58         {
    60         self = CMmMtpDpAccessSingleton::NewL( aRfs, aFramework );
    59         self = CMmMtpDpAccessSingleton::NewL( aFramework );
    61         Dll::SetTls( reinterpret_cast<TAny*>( self ) );
    60         Dll::SetTls( reinterpret_cast<TAny*>( self ) );
    62         }
    61         }
    63     else
    62     else
    64         {
    63         {
    65         self->Inc();
    64         self->Inc();
   133 // -----------------------------------------------------------------------------
   132 // -----------------------------------------------------------------------------
   134 // CMmMtpDpAccessSingleton::NewL
   133 // CMmMtpDpAccessSingleton::NewL
   135 // two-phase construction
   134 // two-phase construction
   136 // -----------------------------------------------------------------------------
   135 // -----------------------------------------------------------------------------
   137 //
   136 //
   138 CMmMtpDpAccessSingleton* CMmMtpDpAccessSingleton::NewL( RFs& aRfs,
   137 CMmMtpDpAccessSingleton* CMmMtpDpAccessSingleton::NewL( MMTPDataProviderFramework& aFramework )
   139     MMTPDataProviderFramework& aFramework )
       
   140     {
   138     {
   141     CMmMtpDpAccessSingleton* self = new(ELeave) CMmMtpDpAccessSingleton;
   139     CMmMtpDpAccessSingleton* self = new(ELeave) CMmMtpDpAccessSingleton;
   142     CleanupStack::PushL( self );
   140     CleanupStack::PushL( self );
   143     self->ConstructL(aRfs, aFramework);
   141     self->ConstructL( aFramework );
   144     CleanupStack::Pop( self );
   142     CleanupStack::Pop( self );
   145     return self;
   143     return self;
   146     }
   144     }
   147 
   145 
   148 // -----------------------------------------------------------------------------
   146 // -----------------------------------------------------------------------------
   149 // CMmMtpDpAccessSingleton::ConstructL
   147 // CMmMtpDpAccessSingleton::ConstructL
   150 // two-phase construction
   148 // two-phase construction
   151 // -----------------------------------------------------------------------------
   149 // -----------------------------------------------------------------------------
   152 //
   150 //
   153 void CMmMtpDpAccessSingleton::ConstructL( RFs& aRfs,
   151 void CMmMtpDpAccessSingleton::ConstructL( MMTPDataProviderFramework& aFramework )
   154     MMTPDataProviderFramework& aFramework )
       
   155     {
   152     {
   156     iWrapper = CMmMtpDpMetadataAccessWrapper::NewL( aRfs, aFramework );
   153     iWrapper = CMmMtpDpMetadataAccessWrapper::NewL( aFramework );
   157     }
   154     }
   158 
   155 
   159 
   156 
   160 // end of file
   157 // end of file