cmmanager/cmmgr/Framework/Src/cmmanager.cpp
branchRCL_3
changeset 58 83ca720e2b9a
parent 0 5a93021fdf25
equal deleted inserted replaced
57:05bc53fe583b 58:83ca720e2b9a
       
     1 /*
       
     2 * Copyright (c) 2006 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:  Implementation of RCmManager.
       
    15 *
       
    16 */
       
    17 
       
    18 #include <cmmanager.h>
       
    19 #include <cmconnectionmethod.h>
       
    20 #include <cmdestination.h>
       
    21 #include "cmlogger.h"
       
    22 #include "cmmanagerimpl.h"
       
    23 #include "cmdestinationimpl.h"
       
    24 #include "cmmanager.hrh"
       
    25 #include <cmcommonconstants.h>
       
    26 #include <cmpluginbaseeng.h>
       
    27 #include <cmpluginbase.h>
       
    28 
       
    29 //-----------------------------------------------------------------------------
       
    30 //  RCmManager::Close()
       
    31 //-----------------------------------------------------------------------------
       
    32 //
       
    33 EXPORT_C void RCmManager::Close()
       
    34     {
       
    35     CLOG_WRITE( "RCmManagerExt::Close()" );
       
    36     delete iImplementation;
       
    37     iImplementation = NULL;
       
    38     
       
    39     CLOG_CLOSE;
       
    40     }
       
    41 
       
    42 //-----------------------------------------------------------------------------
       
    43 //  RCmManager::OpenL()
       
    44 //-----------------------------------------------------------------------------
       
    45 //
       
    46 EXPORT_C void RCmManager::OpenL()
       
    47     {
       
    48     CLOG_CREATE;
       
    49     CLOG_NAME_1( _L("Manager_0x%x"), this );
       
    50     iImplementation = CCmManagerImpl::NewL(EFalse);
       
    51     CLOG_ATTACH( iImplementation, this );
       
    52     }
       
    53 
       
    54 //-----------------------------------------------------------------------------
       
    55 //  RCmManagerExt::CreateTablesAndOpenL()
       
    56 //-----------------------------------------------------------------------------
       
    57 //
       
    58 EXPORT_C void RCmManager::CreateTablesAndOpenL()
       
    59     {
       
    60     CLOG_CREATE;
       
    61     CLOG_NAME_1( _L("Manager_0x%x"), this );
       
    62     iImplementation = CCmManagerImpl::NewL();
       
    63     CLOG_ATTACH( iImplementation, this );
       
    64     }
       
    65 
       
    66 //-----------------------------------------------------------------------------
       
    67 //  RCmManager::OpenLC()
       
    68 //-----------------------------------------------------------------------------
       
    69 //
       
    70 EXPORT_C void RCmManager::OpenLC()
       
    71     {
       
    72     CLOG_CREATE;
       
    73     CLOG_NAME_1( _L("Manager_0x%x"), this );
       
    74     CleanupClosePushL(*this);
       
    75     iImplementation = NULL;
       
    76     iImplementation = CCmManagerImpl::NewL();
       
    77     CLOG_ATTACH( iImplementation, this );
       
    78     }
       
    79 
       
    80 //-----------------------------------------------------------------------------
       
    81 //  RCmManager::ConnectionMethodL( TUint aId )
       
    82 //-----------------------------------------------------------------------------
       
    83 //
       
    84 EXPORT_C RCmConnectionMethod RCmManager::ConnectionMethodL( 
       
    85                                                     TUint32 aIapId ) const
       
    86     {
       
    87     RCmConnectionMethod cm;
       
    88     CCmPluginBase* cM =  iImplementation->GetConnectionMethodL( aIapId );
       
    89     cm.iImplementation = cM->Plugin();
       
    90     cm.iImplementation->IncrementRefCounter();
       
    91     delete cM;
       
    92     
       
    93     return cm;
       
    94     }
       
    95 
       
    96 //-----------------------------------------------------------------------------
       
    97 //  RCmManager::GetBearerInfoIntL()
       
    98 //-----------------------------------------------------------------------------
       
    99 //
       
   100 EXPORT_C TUint32 RCmManager::GetBearerInfoIntL( TUint32 aBearerType,
       
   101                                                 TUint32 aAttribute ) const
       
   102     {
       
   103     return iImplementation->GetBearerInfoIntL( aBearerType,
       
   104                                                        aAttribute );
       
   105     }
       
   106 
       
   107 //-----------------------------------------------------------------------------
       
   108 //  RCmManager::GetBearerInfoBoolL()
       
   109 //-----------------------------------------------------------------------------
       
   110 //
       
   111 EXPORT_C TBool RCmManager::GetBearerInfoBoolL( TUint32 aBearerType,
       
   112                                                TUint32 aAttribute ) const
       
   113     {
       
   114     return iImplementation->GetBearerInfoBoolL( aBearerType,
       
   115                                                        aAttribute );
       
   116     }
       
   117 
       
   118 //-----------------------------------------------------------------------------
       
   119 //  RCmManager::GetBearerInfoStringL()
       
   120 //-----------------------------------------------------------------------------
       
   121 //
       
   122 EXPORT_C HBufC* RCmManager::GetBearerInfoStringL( TUint32 aBearerType,
       
   123                                                   TUint32 aAttribute ) const
       
   124     {
       
   125     return iImplementation->GetBearerInfoStringL( aBearerType,
       
   126                                                        aAttribute );
       
   127     }
       
   128 
       
   129 //-----------------------------------------------------------------------------
       
   130 //  RCmManager::GetBearerInfoStringL()
       
   131 //-----------------------------------------------------------------------------
       
   132 //
       
   133 EXPORT_C HBufC8* RCmManager::GetBearerInfoString8L( TUint32 aBearerType,
       
   134                                                     TUint32 aAttribute ) const
       
   135     {
       
   136     return iImplementation->GetBearerInfoString8L( aBearerType,
       
   137                                                        aAttribute );
       
   138     }
       
   139 
       
   140 // -----------------------------------------------------------------------------
       
   141 // RCmManager::GetConnectionMethodInfoIntL()
       
   142 // -----------------------------------------------------------------------------
       
   143 //
       
   144 EXPORT_C TUint32 RCmManager::GetConnectionMethodInfoIntL( 
       
   145                                                     TUint32 aIapId,
       
   146                                                     TUint32 aAttribute ) const
       
   147     {
       
   148     return iImplementation->GetConnectionMethodInfoIntL( aIapId, aAttribute );
       
   149     }
       
   150     
       
   151 // -----------------------------------------------------------------------------
       
   152 // RCmManager::GetConnectionMethodInfoBoolL()
       
   153 // -----------------------------------------------------------------------------
       
   154 //
       
   155 EXPORT_C TBool RCmManager::GetConnectionMethodInfoBoolL( 
       
   156                                                     TUint32 aIapId,
       
   157                                                     TUint32 aAttribute ) const
       
   158     {
       
   159     return iImplementation->GetConnectionMethodInfoBoolL( aIapId, aAttribute );
       
   160     }
       
   161     
       
   162 // -----------------------------------------------------------------------------
       
   163 // RCmManager::GetConnectionMethodInfoStringL()
       
   164 // -----------------------------------------------------------------------------
       
   165 //
       
   166 EXPORT_C HBufC* RCmManager::GetConnectionMethodInfoStringL( 
       
   167                                                     TUint32 aIapId,
       
   168                                                     TUint32 aAttribute ) const
       
   169     {
       
   170     return iImplementation->GetConnectionMethodInfoStringL( aIapId, aAttribute );
       
   171     }
       
   172     
       
   173 // -----------------------------------------------------------------------------
       
   174 // RCmManager::GetConnectionMethodInfoString8L()
       
   175 // -----------------------------------------------------------------------------
       
   176 //
       
   177 EXPORT_C HBufC8* RCmManager::GetConnectionMethodInfoString8L( 
       
   178                                                     TUint32 aIapId,
       
   179                                                     TUint32 aAttribute ) const
       
   180     {
       
   181     return iImplementation->GetConnectionMethodInfoString8L( aIapId, aAttribute );
       
   182     }
       
   183     
       
   184 //=============================================================================
       
   185 // CREATION / DELETION API
       
   186 //=============================================================================
       
   187 //
       
   188 
       
   189 //-----------------------------------------------------------------------------
       
   190 //  RCmManager::CreateDestinationL( const TDesC& aName )
       
   191 //-----------------------------------------------------------------------------
       
   192 //
       
   193 EXPORT_C RCmDestination RCmManager::CreateDestinationL( const TDesC& aName )
       
   194     {
       
   195     LOGGER_ENTERFN( "RCmManager::CreateDestinationL" );
       
   196 
       
   197     RCmDestination dest;
       
   198     
       
   199     CCmDestinationImpl* destImp = iImplementation->CreateDestinationL( aName );
       
   200     dest.iDestinatonData = destImp->GetData();
       
   201     dest.iDestinatonData->IncrementRefCounter();
       
   202     delete destImp;
       
   203     
       
   204     return dest;
       
   205     }
       
   206 
       
   207 // -----------------------------------------------------------------------------
       
   208 // RCmManager::CreateConnectionMethodL()
       
   209 // -----------------------------------------------------------------------------
       
   210 //  
       
   211 EXPORT_C RCmConnectionMethod RCmManager::CreateConnectionMethodL(
       
   212     TUint32 aImplementationUid )
       
   213     {
       
   214     LOGGER_ENTERFN( "RCmManager::CreateConnectionMethodL" );
       
   215 
       
   216     RCmConnectionMethod cm;
       
   217         
       
   218     CCmPluginBase* cM =  
       
   219         iImplementation->CreateConnectionMethodL( aImplementationUid );
       
   220     cm.iImplementation = cM->Plugin();
       
   221     cm.iImplementation->IncrementRefCounter();
       
   222     delete cM;
       
   223 
       
   224     return cm;
       
   225     }
       
   226 
       
   227 //-----------------------------------------------------------------------------
       
   228 // RCmManager::CopyL()
       
   229 //-----------------------------------------------------------------------------
       
   230 //
       
   231 EXPORT_C TInt RCmManager::CopyConnectionMethodL(
       
   232     RCmDestination& aTargetDestination,
       
   233     RCmConnectionMethod& aConnectionMethod )
       
   234     {
       
   235     LOGGER_ENTERFN( "RCmManager::CopyConnectionMethodL" );
       
   236 
       
   237     CCmDestinationImpl* aImplementation = 
       
   238             CCmDestinationImpl::NewLC(aTargetDestination.iDestinatonData);
       
   239     // Deleting aImplementation will decrement the ref counter
       
   240     aImplementation->IncrementRefCounter();
       
   241     CCmPluginBase* connMethod = new (ELeave) 
       
   242                             CCmPluginBase(aConnectionMethod.iImplementation);
       
   243     connMethod->IncrementRefCounter();    
       
   244     CleanupStack::PushL( connMethod );        
       
   245     TInt retVal = iImplementation->CopyConnectionMethodL( 
       
   246                                            *aImplementation, 
       
   247                                            *connMethod );
       
   248     CleanupStack::PopAndDestroy(connMethod);
       
   249     CleanupStack::PopAndDestroy(aImplementation);
       
   250     return retVal;
       
   251     }
       
   252 
       
   253 //-----------------------------------------------------------------------------
       
   254 // RCmManager::MoveConnMethodL()
       
   255 //-----------------------------------------------------------------------------
       
   256 //
       
   257 EXPORT_C TInt RCmManager::MoveConnectionMethodL( 
       
   258     RCmDestination& aSourceDestination,
       
   259     RCmDestination& aTargetDestination,
       
   260     RCmConnectionMethod& aConnectionMethod )
       
   261     {
       
   262     LOGGER_ENTERFN( "RCmManager::MoveConnectionMethodL" );
       
   263 
       
   264     CCmDestinationImpl* aSourceImpl = 
       
   265             CCmDestinationImpl::NewLC(aSourceDestination.iDestinatonData);
       
   266     aSourceImpl->IncrementRefCounter();
       
   267     CCmDestinationImpl* aTargetImpl = 
       
   268             CCmDestinationImpl::NewLC(aTargetDestination.iDestinatonData);
       
   269     aTargetImpl->IncrementRefCounter();
       
   270     CCmPluginBase* connMethod = new (ELeave) 
       
   271                             CCmPluginBase(aConnectionMethod.iImplementation);
       
   272     connMethod->IncrementRefCounter();    
       
   273     CleanupStack::PushL( connMethod );        
       
   274     TInt retVal = iImplementation->MoveConnectionMethodL( 
       
   275                     *aSourceImpl, 
       
   276                     *aTargetImpl, 
       
   277                     *connMethod );
       
   278     CleanupStack::PopAndDestroy(connMethod);
       
   279     CleanupStack::PopAndDestroy(aTargetImpl);
       
   280     CleanupStack::PopAndDestroy(aSourceImpl);
       
   281     return retVal;
       
   282     }
       
   283 
       
   284 //-----------------------------------------------------------------------------
       
   285 // RCmManager::RemoveConnectionMethodL()
       
   286 //-----------------------------------------------------------------------------
       
   287 //
       
   288 EXPORT_C void RCmManager::RemoveConnectionMethodL( 
       
   289     RCmDestination& aDestination,
       
   290     RCmConnectionMethod& aConnectionMethod )
       
   291     {
       
   292     LOGGER_ENTERFN( "RCmManager::RemoveConnectionMethodL" );
       
   293 
       
   294     CCmDestinationImpl* aDestImpl = 
       
   295             CCmDestinationImpl::NewLC(aDestination.iDestinatonData);
       
   296     aDestImpl->IncrementRefCounter();
       
   297     CCmPluginBase* connMethod = new (ELeave) 
       
   298                             CCmPluginBase(aConnectionMethod.iImplementation);
       
   299     connMethod->IncrementRefCounter();    
       
   300     CleanupStack::PushL( connMethod );        
       
   301 
       
   302     iImplementation->RemoveConnectionMethodL( *aDestImpl, *connMethod );
       
   303 
       
   304     CleanupStack::PopAndDestroy(connMethod);
       
   305     CleanupStack::PopAndDestroy(aDestImpl);
       
   306     }
       
   307 
       
   308 //-----------------------------------------------------------------------------
       
   309 // RCmManager::RemoveAllReferencesL()
       
   310 //-----------------------------------------------------------------------------
       
   311 //
       
   312 EXPORT_C void RCmManager::RemoveAllReferencesL( 
       
   313     RCmConnectionMethod& aConnectionMethod )
       
   314     {
       
   315     LOGGER_ENTERFN( "RCmManager::RemoveAllReferencesL" );
       
   316 
       
   317     iImplementation->RemoveAllReferencesL( *aConnectionMethod.iImplementation );
       
   318     }
       
   319 
       
   320 //-----------------------------------------------------------------------------
       
   321 //  RCmManager::ConnectionMethodL()
       
   322 //-----------------------------------------------------------------------------
       
   323 //
       
   324 EXPORT_C void RCmManager::ConnectionMethodL( RArray<TUint32>& aCMArray,
       
   325                                              TBool aCheckBearerType,
       
   326                                              TBool aLegacyOnly,
       
   327                                              TBool aEasyWlan ) const
       
   328     {
       
   329     LOGGER_ENTERFN( "RCmManager::ConnectionMethodL" );
       
   330 
       
   331     return iImplementation->ConnectionMethodL( aCMArray, 
       
   332                                                aCheckBearerType, 
       
   333                                                aLegacyOnly,
       
   334                                                aEasyWlan );
       
   335     }
       
   336 
       
   337 //-----------------------------------------------------------------------------
       
   338 //  RCmManager::AllDestinationsL()
       
   339 //-----------------------------------------------------------------------------
       
   340 //
       
   341 EXPORT_C void RCmManager::AllDestinationsL( RArray<TUint32>& aDestArray ) const
       
   342     {
       
   343     LOGGER_ENTERFN( "RCmManager::AllDestinationsL" );
       
   344 
       
   345     return iImplementation->AllDestinationsL( aDestArray );
       
   346     }
       
   347 
       
   348 
       
   349 //-----------------------------------------------------------------------------
       
   350 //  RCmManager::DestinationL()
       
   351 //-----------------------------------------------------------------------------
       
   352 //  
       
   353 EXPORT_C RCmDestination RCmManager::DestinationL( TUint32 aId ) const
       
   354     {
       
   355     LOGGER_ENTERFN( "RCmManager::DestinationL" );
       
   356 
       
   357     RCmDestination dest;
       
   358     
       
   359     CCmDestinationImpl* aDestImpl = iImplementation->DestinationL( aId );
       
   360     dest.iDestinatonData = aDestImpl->GetData( );
       
   361     dest.iDestinatonData->IncrementRefCounter();
       
   362     delete aDestImpl;
       
   363     
       
   364     return dest;
       
   365     }
       
   366 
       
   367 //-----------------------------------------------------------------------------
       
   368 //  RCmManager::BearerPriorityArrayL()
       
   369 //-----------------------------------------------------------------------------
       
   370 //
       
   371 EXPORT_C void RCmManager::BearerPriorityArrayL( 
       
   372                                         RArray<TBearerPriority>& aArray ) const
       
   373     {
       
   374     LOGGER_ENTERFN( "RCmManager::BearerPriorityArray" );
       
   375 
       
   376     iImplementation->BearerPriorityArrayL( aArray ); 
       
   377     }
       
   378 
       
   379 //-----------------------------------------------------------------------------
       
   380 //  RCmManager::UpdateBearerPriorityArrayL()
       
   381 //-----------------------------------------------------------------------------
       
   382 //
       
   383 EXPORT_C void RCmManager::UpdateBearerPriorityArrayL( 
       
   384     const RArray<TBearerPriority>& aArray )
       
   385     {
       
   386     LOGGER_ENTERFN( "RCmManager::UpdateBearerPriorityArray" );    
       
   387 
       
   388     iImplementation->UpdateBearerPriorityArrayL( aArray );
       
   389     }
       
   390 
       
   391 //-----------------------------------------------------------------------------
       
   392 //  RCmManager::CleanupGlobalPriorityArray()
       
   393 //-----------------------------------------------------------------------------
       
   394 //
       
   395 EXPORT_C void RCmManager::CleanupGlobalPriorityArray( 
       
   396     RArray<TBearerPriority>& aArray ) const
       
   397     {
       
   398     LOGGER_ENTERFN( "RCmManager::CleanupGlobalPriorityArray" );
       
   399 
       
   400     iImplementation->CleanupGlobalPriorityArray( aArray ); 
       
   401     }
       
   402 
       
   403 //-----------------------------------------------------------------------------
       
   404 //  RCmManager::SupportedBearers()
       
   405 //-----------------------------------------------------------------------------
       
   406 //
       
   407 EXPORT_C void RCmManager::SupportedBearersL( RArray<TUint32>& aArray ) const
       
   408     {
       
   409     LOGGER_ENTERFN( "RCmManager::SupportedBearersL" );
       
   410 
       
   411     return iImplementation->SupportedBearersL( aArray );        
       
   412     }
       
   413 
       
   414 //-----------------------------------------------------------------------------
       
   415 //  RCmManagerExt::UncategorizedIconL()
       
   416 //-----------------------------------------------------------------------------
       
   417 //    
       
   418 EXPORT_C CGulIcon* RCmManager::UncategorizedIconL() const
       
   419     {
       
   420     LOGGER_ENTERFN( "RCmManager::UncategorizedIconL" );
       
   421 
       
   422     return iImplementation->UncategorizedIconL();        
       
   423     }
       
   424 
       
   425 //-----------------------------------------------------------------------------
       
   426 //  RCmManager::EasyWlanIdL()
       
   427 //-----------------------------------------------------------------------------
       
   428 //    
       
   429 EXPORT_C TUint32 RCmManager::EasyWlanIdL() const
       
   430     {
       
   431     LOGGER_ENTERFN( "RCmManager::EasyWlanIdL" );
       
   432 
       
   433     return iImplementation->EasyWlanIdL();        
       
   434     }
       
   435     
       
   436 //-----------------------------------------------------------------------------
       
   437 //  RCmManagerExt::ReadDefConnL()
       
   438 //-----------------------------------------------------------------------------
       
   439 //    
       
   440 EXPORT_C void RCmManager::ReadDefConnL( TCmDefConnValue& aDCSetting )
       
   441     {
       
   442     LOGGER_ENTERFN( "RCmManager::ReadDefConnL" );
       
   443 
       
   444     return iImplementation->ReadDefConnL( aDCSetting );        
       
   445     }
       
   446     
       
   447 //-----------------------------------------------------------------------------
       
   448 //  RCmManager::WriteDefConnL()
       
   449 //-----------------------------------------------------------------------------
       
   450 //    
       
   451 EXPORT_C void RCmManager::WriteDefConnL( const  TCmDefConnValue& aDCSetting )
       
   452     {
       
   453     LOGGER_ENTERFN( "RCmManager::WriteDefConnL" );
       
   454 
       
   455     return iImplementation->WriteDefConnL( aDCSetting );        
       
   456     }
       
   457 
       
   458 //-----------------------------------------------------------------------------
       
   459 //  RCmManager::ReadGenConnSettingsL()
       
   460 //-----------------------------------------------------------------------------
       
   461 //  
       
   462 EXPORT_C void RCmManager::ReadGenConnSettingsL( TCmGenConnSettings& aGenConnSettings )
       
   463 {
       
   464     LOGGER_ENTERFN( "RCmManager::ReadGenConnSettingsL" );
       
   465 
       
   466     return iImplementation->ReadGenConnSettingsL( aGenConnSettings ); 
       
   467 }
       
   468 
       
   469 //-----------------------------------------------------------------------------
       
   470 //  RCmManager::WriteGenConnSettingsL()
       
   471 //-----------------------------------------------------------------------------
       
   472 //  
       
   473 EXPORT_C void RCmManager::WriteGenConnSettingsL( const TCmGenConnSettings& aGenConnSettings )
       
   474 {
       
   475     LOGGER_ENTERFN( "RCmManager::WriteGenConnSettingsL" );
       
   476 
       
   477     return iImplementation->WriteGenConnSettingsL( aGenConnSettings ); 
       
   478 }
       
   479 
       
   480 //-----------------------------------------------------------------------------
       
   481 //  RCmManager::CreateDestinationL( const TDesC& aName,
       
   482 //                                     TUint32 aDestId )
       
   483 //-----------------------------------------------------------------------------
       
   484 //
       
   485 EXPORT_C RCmDestination RCmManager::CreateDestinationL(
       
   486     const TDesC& aName,
       
   487     TUint32 aDestId )
       
   488     {
       
   489     LOGGER_ENTERFN( "RCmManager::CreateDestinationL" );
       
   490 
       
   491     if ( aDestId == 0 )
       
   492         {
       
   493         return CreateDestinationL( aName );
       
   494         }
       
   495 
       
   496     // Check if there already exists a destination with the same Id
       
   497     RArray<TUint32> destIdArray = RArray<TUint32>( KCmArrayBigGranularity );
       
   498     iImplementation->AllDestinationsL( destIdArray );
       
   499     for ( TInt i = 0; i < destIdArray.Count(); i++ )
       
   500         {
       
   501         if ( aDestId > 0 && aDestId < 255 )
       
   502             {
       
   503             aDestId = aDestId + KCmDefaultDestinationAPTagId;
       
   504             }
       
   505         else if ( aDestId < KCmDefaultDestinationAPTagId+1 
       
   506                   && ( aDestId > ( KCmDefaultDestinationAPTagId+255 ) ) )
       
   507             {
       
   508             User::Leave( KErrArgument );
       
   509             }
       
   510         if ( aDestId == destIdArray[i] )
       
   511             {
       
   512             destIdArray.Close();
       
   513             User::Leave( KErrAlreadyExists );
       
   514             }
       
   515         }
       
   516     destIdArray.Close();
       
   517 
       
   518     RCmDestination dest;
       
   519 
       
   520     CCmDestinationImpl* destImp =
       
   521                         iImplementation->CreateDestinationL( aName,
       
   522                                                              aDestId );
       
   523     dest.iDestinatonData = destImp->GetData();
       
   524     dest.iDestinatonData->IncrementRefCounter();
       
   525     delete destImp;
       
   526 
       
   527     return dest;
       
   528     }
       
   529 
       
   530 // -----------------------------------------------------------------------------
       
   531 // RCmManager::CreateConnectionMethodL()
       
   532 // -----------------------------------------------------------------------------
       
   533 //  
       
   534 EXPORT_C RCmConnectionMethod RCmManager::CreateConnectionMethodL(
       
   535     TUint32 aImplementationUid,
       
   536     TUint32 aConnMethodId )
       
   537     {
       
   538     LOGGER_ENTERFN( "RCmManager::CreateConnectionMethodL" );
       
   539 
       
   540     if ( aConnMethodId == 0 )
       
   541         {
       
   542         return CreateConnectionMethodL( aImplementationUid );
       
   543         }
       
   544 
       
   545     RCmConnectionMethod cm;
       
   546 
       
   547     CCmPluginBase* cM =
       
   548                    iImplementation->CreateConnectionMethodL( aImplementationUid,
       
   549                                                              aConnMethodId );
       
   550     cm.iImplementation = cM->Plugin();
       
   551     cm.iImplementation->IncrementRefCounter();
       
   552     delete cM;
       
   553 
       
   554     return cm;
       
   555     }