deviceupdatesui/omadmadapters/connmoadapter/src/ConnMoAdapter.cpp
changeset 45 0f9fc722d255
parent 44 137912d1a556
child 46 b9b00b134b0d
equal deleted inserted replaced
44:137912d1a556 45:0f9fc722d255
     1 /*
       
     2  * ==============================================================================
       
     3  * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     4  * All rights reserved.
       
     5  * This component and the accompanying materials are made available
       
     6  * under the terms of "Eclipse Public License v1.0"
       
     7  * which accompanies this distribution, and is available
       
     8  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     9  *
       
    10  * Initial Contributors:
       
    11  * Nokia Corporation - initial contribution.
       
    12  *
       
    13  * Contributors:
       
    14  * 
       
    15  * Description:
       
    16  * 
       
    17  * ==============================================================================
       
    18  */
       
    19 
       
    20 #include <e32base.h>
       
    21 #include <implementationproxy.h> // For TImplementationProxy definition
       
    22 #include <cmmanagerext.h> 
       
    23 
       
    24 #include "nsmldebug.h"
       
    25 #include "ConnMoAdapter.h"
       
    26 #include "Utils.h"
       
    27 #include "BranchBase.h"
       
    28 #include "NapBranch.h" 
       
    29 #include "ProxyBranch.h"
       
    30 #include "AddBuffer.h" 
       
    31 #include "OstTraceDefinitions.h"
       
    32 #ifdef OST_TRACE_COMPILER_IN_USE
       
    33 #include "ConnMoAdapterTraces.h"
       
    34 #endif
       
    35 
       
    36 // ------------------------------------------------------------------------------------------------
       
    37 // Constants
       
    38 // ------------------------------------------------------------------------------------------------
       
    39 // DDF version number
       
    40 _LIT8( KConnMoAdapterDDFversion,    "1.0");
       
    41 
       
    42 // URI base for ConnMo Nodes
       
    43 _LIT8( KConnMoBase,                 "");
       
    44 
       
    45 // ======== LOCAL FUNCTIONS =========
       
    46 
       
    47 CBranchBase* CConnMoAdapter::GetBranch( const TDesC8& aUri )
       
    48     {
       
    49     TDesC8 connMoBase( KConnMoBase );
       
    50     CBranchBase* retval = NULL;
       
    51         
       
    52     TPtrC8 connMoTree = 
       
    53         ( CUtils::GetEndOfURIFromSeg( aUri, KConnMoBase )).Mid( connMoBase.Size() );
       
    54         
       
    55     if ( CUtils::GetFirstURISeg( connMoTree ).Match( KCMDdfNAP )!= KErrNotFound )
       
    56         {
       
    57         retval = iNapBranch;
       
    58         }
       
    59     else if ( CUtils::GetFirstURISeg( connMoTree ).Match( KCMDdfProxy )!= KErrNotFound )
       
    60         {
       
    61         retval = iProxyBranch;
       
    62         }
       
    63     return retval;
       
    64     }
       
    65 
       
    66 // -------------------------------------------------------------------------------------
       
    67 // CConnMoAdapter::AddBaseUriL( )
       
    68 // Handles addition of possible base URI to ConnMO DDF structure
       
    69 // -------------------------------------------------------------------------------------
       
    70 MSmlDmDDFObject& CConnMoAdapter::AddBaseUriL( MSmlDmDDFObject& aRootDDF )
       
    71     {
       
    72     OstTraceFunctionEntry0( CCONNMOADAPTER_ADDBASEURIL_ENTRY );
       
    73     
       
    74     TDesC8 base(KConnMoBase);
       
    75     
       
    76     if ( base.Size() > 0)
       
    77         {
       
    78     
       
    79         // Set rest acceptable operations for data itself     
       
    80         TSmlDmAccessTypes aclTypesOnlyGet;
       
    81         aclTypesOnlyGet.SetGet();
       
    82         
       
    83         MSmlDmDDFObject& ddf = aRootDDF.AddChildObjectL( KConnMoBase ); // CMO
       
    84 
       
    85         _LIT8( KDescription, "ConnMo DDF description" );
       
    86         _LIT8( KDFTitle, "ConnMo Settings Base Node" );
       
    87     
       
    88         CUtils::FillNodeInfoL( ddf, 
       
    89                    aclTypesOnlyGet, 
       
    90                    MSmlDmDDFObject::EOne, 
       
    91                    MSmlDmDDFObject::EPermanent, 
       
    92                    MSmlDmDDFObject::ENode, 
       
    93                    KDescription );
       
    94                    
       
    95         ddf.SetDFTitleL( KDFTitle );
       
    96         ddf.SetDefaultValueL( KNullDesC8 );
       
    97         OstTraceFunctionExit0( CCONNMOADAPTER_ADDBASEURIL_EXIT );
       
    98         return ddf;
       
    99         }
       
   100     else
       
   101         {
       
   102         OstTraceFunctionExit0( CCONNMOADAPTER_ADDBASEURIL_EXIT_2 );
       
   103         return aRootDDF;
       
   104         }    
       
   105     
       
   106     }
       
   107 // -------------------------------------------------------------------------------------
       
   108 // CConnMoAdapter::AddBranchL( )
       
   109 // Adds dynamic branch to given root node with given name
       
   110 // -------------------------------------------------------------------------------------
       
   111 MSmlDmDDFObject& CConnMoAdapter::AddBranchL( MSmlDmDDFObject& aRootDDF, 
       
   112                                             const TDesC8& aNodeName )
       
   113     {
       
   114     OstTraceExt1( TRACE_NORMAL, CCONNMOADAPTER_ADDBRANCHL_ENTRY, "ENTRY: CConnMoAdapter::AddBranchL;aNodeName=%s", aNodeName );
       
   115     
       
   116     // Set rest acceptable operations for data itself     
       
   117     TSmlDmAccessTypes aclTypesOnlyGet;
       
   118     aclTypesOnlyGet.SetGet();
       
   119 
       
   120     TSmlDmAccessTypes aclTypesAll;
       
   121     aclTypesAll.SetGet();
       
   122     aclTypesAll.SetReplace();
       
   123     aclTypesAll.SetAdd();
       
   124     aclTypesAll.SetDelete();
       
   125     
       
   126     TSmlDmAccessTypes aclTypesNoDelete;
       
   127     aclTypesNoDelete.SetGet();
       
   128     aclTypesNoDelete.SetReplace();
       
   129     aclTypesNoDelete.SetAdd();
       
   130     
       
   131     MSmlDmDDFObject& nChildRootDdf = aRootDDF.AddChildObjectL( aNodeName ); // Node
       
   132     CUtils::FillNodeInfoL( nChildRootDdf, 
       
   133                            aclTypesOnlyGet, 
       
   134                            MSmlDmDDFObject::EOne,
       
   135                            MSmlDmDDFObject::EPermanent, 
       
   136                            MSmlDmDDFObject::ENode, 
       
   137                            KNullDesC8 );
       
   138     
       
   139     MSmlDmDDFObject& nChildDdf = nChildRootDdf.AddChildObjectGroupL();  // Node/<X>  
       
   140     if ( aNodeName == KCMDdfNAP )
       
   141         {      
       
   142         CUtils::FillNodeInfoL( nChildDdf, 
       
   143                                aclTypesAll, 
       
   144                                MSmlDmDDFObject::EZeroOrMore, 
       
   145                                MSmlDmDDFObject::EDynamic, 
       
   146                                MSmlDmDDFObject::ENode, 
       
   147                                KNullDesC8 );
       
   148         }
       
   149     else
       
   150         {  
       
   151         CUtils::FillNodeInfoL( nChildDdf, 
       
   152                                aclTypesNoDelete, 
       
   153                                MSmlDmDDFObject::EZeroOrMore, 
       
   154                                MSmlDmDDFObject::EDynamic, 
       
   155                                MSmlDmDDFObject::ENode, 
       
   156                                KNullDesC8 );
       
   157         }
       
   158     OstTrace0( TRACE_NORMAL, CCONNMOADAPTER_ADDBRANCHL_EXIT, "EXIT: CConnMoAdapter::AddBranchL" );
       
   159     return nChildDdf;
       
   160     }
       
   161 
       
   162 // ======== MEMBER FUNCTIONS ========
       
   163 //-----------------------------------------------------------------------------
       
   164 // CConnMoAdapter* CConnMoAdapter::NewL( )
       
   165 //-----------------------------------------------------------------------------
       
   166 CConnMoAdapter* CConnMoAdapter::NewL( MSmlDmCallback* aDmCallback )
       
   167     {
       
   168     OstTraceFunctionEntry0( CCONNMOADAPTER_NEWL_ENTRY );
       
   169 
       
   170     CConnMoAdapter* self = CConnMoAdapter::NewLC( aDmCallback );
       
   171     CleanupStack::Pop();
       
   172 
       
   173     OstTraceFunctionExit1( CCONNMOADAPTER_NEWL_EXIT, ( TUint )( self ) );
       
   174     return self;
       
   175     }
       
   176 
       
   177 //-----------------------------------------------------------------------------
       
   178 // CConnMoAdapter* CConnMoAdapter::NewLC( )
       
   179 //-----------------------------------------------------------------------------
       
   180 CConnMoAdapter* CConnMoAdapter::NewLC( MSmlDmCallback* aDmCallback )
       
   181     {
       
   182     OstTraceFunctionEntry0( CCONNMOADAPTER_NEWLC_ENTRY );
       
   183        
       
   184     CConnMoAdapter* self = new ( ELeave ) CConnMoAdapter( aDmCallback );
       
   185     CleanupStack::PushL( self );
       
   186 
       
   187     self->iCallBack = aDmCallback;
       
   188     self->ConstructL();
       
   189 
       
   190     OstTraceFunctionExit1( CCONNMOADAPTER_NEWLC_EXIT, ( TUint )( self ) );
       
   191     return self;
       
   192     }
       
   193 
       
   194 //------------------------------------------------------------------------------
       
   195 // CConnMoAdapter::CConnMoAdapter()
       
   196 //------------------------------------------------------------------------------
       
   197 CConnMoAdapter::CConnMoAdapter( TAny* aEcomArguments ) 
       
   198     : CSmlDmAdapter( aEcomArguments )
       
   199     {
       
   200     OstTraceFunctionEntry0( CCONNMOADAPTER_CCONNMOADAPTER_ENTRY );
       
   201     
       
   202     OstTraceFunctionExit0( CCONNMOADAPTER_CCONNMOADAPTER_EXIT );
       
   203     }
       
   204 
       
   205 //------------------------------------------------------------------------------
       
   206 // CConnMoAdapter::~CConnMoAdapter()
       
   207 //------------------------------------------------------------------------------
       
   208 CConnMoAdapter::~CConnMoAdapter()
       
   209     {
       
   210     OstTraceFunctionEntry0( CCONNMOADAPTER_DELETE_ENTRY );
       
   211     
       
   212     delete iBuffer;
       
   213     delete iNapBranch;
       
   214     delete iProxyBranch;
       
   215     iCmManager.Close();
       
   216 
       
   217     OstTraceFunctionExit0( CCONNMOADAPTER_DELETE_EXIT );
       
   218     }
       
   219 
       
   220 //=============================================
       
   221 //      CConnMoAdapter::ConstructL()
       
   222 //      Second phase constructor.
       
   223 //=============================================
       
   224 void CConnMoAdapter::ConstructL()
       
   225     {
       
   226     OstTraceFunctionEntry0( CCONNMOADAPTER_CONSTRUCTL_ENTRY );  
       
   227     
       
   228     iCmManager.OpenL();
       
   229        
       
   230     iBuffer = CAddBuffer::NewL();
       
   231     iNapBranch = CNapBranch::NewL( iCallBack, iBuffer, &iCmManager );
       
   232     iProxyBranch = CProxyBranch::NewL( iCallBack, iBuffer, &iCmManager );
       
   233     
       
   234     OstTraceFunctionExit0( CCONNMOADAPTER_CONSTRUCTL_EXIT );
       
   235     }
       
   236 
       
   237 void CConnMoAdapter::DDFVersionL( CBufBase& aDDFVersion )
       
   238     {
       
   239     OstTraceFunctionEntry0( CCONNMOADAPTER_DDFVERSIONL_ENTRY );
       
   240     
       
   241     aDDFVersion.InsertL( 0, KConnMoAdapterDDFversion );
       
   242     
       
   243     OstTraceFunctionExit0( CCONNMOADAPTER_DDFVERSIONL_EXIT );
       
   244     }
       
   245 
       
   246 //------------------------------------------------------------------------------
       
   247 //  void CConnMoAdapter::DDFStructureL()
       
   248 //------------------------------------------------------------------------------
       
   249 void CConnMoAdapter::DDFStructureL( MSmlDmDDFObject& aDDF )
       
   250     {
       
   251     OstTraceFunctionEntry0( CCONNMOADAPTER_DDFSTRUCTUREL_ENTRY );
       
   252     
       
   253     // Insert Base URI in the beginning of the tree
       
   254     MSmlDmDDFObject& ddf = AddBaseUriL( aDDF);
       
   255     
       
   256     // NAP Branch
       
   257     MSmlDmDDFObject& nNapDdf = AddBranchL( ddf, KCMDdfNAP );
       
   258     iNapBranch->DDFStructureL( nNapDdf );
       
   259     
       
   260     // Proxy Branch
       
   261     MSmlDmDDFObject& nProxyDdf = AddBranchL( ddf, KCMDdfProxy );
       
   262     iProxyBranch->DDFStructureL( nProxyDdf );
       
   263     
       
   264     OstTraceFunctionExit0( CCONNMOADAPTER_DDFSTRUCTUREL_EXIT );
       
   265     }
       
   266     
       
   267 void CConnMoAdapter::UpdateLeafObjectL( const TDesC8& aURI, 
       
   268                                         const TDesC8& aLUID,
       
   269                                         const TDesC8& aObject, 
       
   270                                         const TDesC8& aType,
       
   271                                         TInt aStatusRef )
       
   272     {
       
   273     OstTraceExt1( TRACE_NORMAL, CCONNMOADAPTER_UPDATELEAFOBJECTL_ENTRY, "ENTRY: CConnMoAdapter::UpdateLeafObjectL;aURI=%s", aURI );
       
   274     
       
   275     CBranchBase* implementation = GetBranch( aURI ); 
       
   276     
       
   277     implementation->UpdateLeafObjectL( aURI, aLUID, aObject, aType, aStatusRef );
       
   278 
       
   279     OstTrace0( TRACE_NORMAL, CCONNMOADAPTER_UPDATELEAFOBJECTL_EXIT, "EXIT: CConnMoAdapter::UpdateLeafObjectL" );
       
   280     }
       
   281 
       
   282 //------------------------------------------------------------------------------
       
   283 // void CConnMoAdapter::UpdateLeafObjectL
       
   284 //------------------------------------------------------------------------------
       
   285 void CConnMoAdapter::UpdateLeafObjectL( const TDesC8& /*aURI*/, 
       
   286                                         const TDesC8& /*aLUID*/,
       
   287                                         RWriteStream*& /*aStream*/, 
       
   288                                         const TDesC8& /*aType*/,
       
   289                                         TInt aStatusRef )
       
   290     {
       
   291     OstTraceFunctionEntry0( CCONNMOADAPTER_UPDATELEAFOBJECTL_STREAM_ENTRY );
       
   292     
       
   293     iCallBack->SetStatusL( aStatusRef, CSmlDmAdapter::EError );
       
   294     OstTrace0( TRACE_NORMAL, 
       
   295                CCONNMOADAPTER_UPDATELEAFOBJECTL_STREAM_UNSUPPORTED_METHOD_CALL, 
       
   296                "CConnMoAdapter::UpdateLeafObjectL;Unsupported method call. CSmlDmAdapter::EError." );
       
   297    
       
   298     OstTraceFunctionExit0( CCONNMOADAPTER_UPDATELEAFOBJECTL_STREAM_EXIT );
       
   299     }
       
   300 
       
   301 //------------------------------------------------------------------------------
       
   302 // void CConnMoAdapter::DeleteObjectL
       
   303 //------------------------------------------------------------------------------
       
   304 void CConnMoAdapter::DeleteObjectL( const TDesC8& aURI, 
       
   305                                     const TDesC8& aLUID,
       
   306                                     TInt aStatusRef )
       
   307     {
       
   308     OstTraceExt1( TRACE_NORMAL, CCONNMOADAPTER_DELETEOBJECTL_ENTRY, "ENTRY: CConnMoAdapter::DeleteObjectL;aURI=%s", aURI );
       
   309 
       
   310     CBranchBase* implementation = GetBranch( aURI ); 
       
   311     
       
   312     implementation->DeleteObjectL( aURI, aLUID, aStatusRef );
       
   313     
       
   314     OstTrace0( TRACE_NORMAL, CCONNMOADAPTER_DELETEOBJECTL_EXIT, "EXIT: CConnMoAdapter::DeleteObjectL" );
       
   315     }
       
   316 
       
   317 //------------------------------------------------------------------------------
       
   318 // void CConnMoAdapter::FetchLeafObjectL
       
   319 //------------------------------------------------------------------------------
       
   320 void CConnMoAdapter::FetchLeafObjectL( const TDesC8& aURI, 
       
   321                                        const TDesC8& aLUID,
       
   322                                        const TDesC8& aType, 
       
   323                                        TInt aResultsRef,
       
   324                                        TInt aStatusRef )
       
   325     {
       
   326     OstTraceExt1( TRACE_NORMAL, CCONNMOADAPTER_FETCHLEAFOBJECTL_ENTRY, "ENTRY: CConnMoAdapter::FetchLeafObjectL;aURI=%s", aURI );
       
   327     
       
   328     CBranchBase* implementation = GetBranch( aURI ); 
       
   329     
       
   330     implementation->FetchLeafObjectL( aURI, aLUID, aType, aResultsRef, aStatusRef );
       
   331        
       
   332     OstTrace0( TRACE_NORMAL, CCONNMOADAPTER_FETCHLEAFOBJECTL_EXIT, "EXIT: CConnMoAdapter::FetchLeafObjectL" );
       
   333     }
       
   334 
       
   335 //------------------------------------------------------------------------------
       
   336 // void CConnMoAdapter::FetchLeafObjectSizeL
       
   337 //------------------------------------------------------------------------------
       
   338 void CConnMoAdapter::FetchLeafObjectSizeL( const TDesC8& aURI, 
       
   339                                            const TDesC8& aLUID,
       
   340                                            const TDesC8& aType, 
       
   341                                            TInt aResultsRef,
       
   342                                            TInt aStatusRef )
       
   343     {
       
   344     OstTraceExt1( TRACE_NORMAL, CCONNMOADAPTER_FETCHLEAFOBJECTSIZEL_ENTRY, "ENTRY: CConnMoAdapter::FetchLeafObjectSizeL;aURI=%s", aURI );
       
   345     
       
   346     CBranchBase* implementation = GetBranch( aURI ); 
       
   347     
       
   348     implementation->FetchLeafObjectSizeL( aURI, 
       
   349                                           aLUID, 
       
   350                                           aType, 
       
   351                                           aResultsRef, 
       
   352                                           aStatusRef );
       
   353     
       
   354     OstTrace0( TRACE_NORMAL, CCONNMOADAPTER_FETCHLEAFOBJECTSIZEL_EXIT, "EXIT: CConnMoAdapter::FetchLeafObjectSizeL" );
       
   355     }
       
   356 
       
   357 //------------------------------------------------------------------------------
       
   358 // CConnMoAdapter::ChildURIListL
       
   359 // Return childs of the requested node.
       
   360 //------------------------------------------------------------------------------
       
   361 void CConnMoAdapter::ChildURIListL( const TDesC8& aURI, 
       
   362                         const TDesC8& aLUID,
       
   363                         const CArrayFix<TSmlDmMappingInfo>& aPreviousURISegmentList,
       
   364                         TInt aResultsRef,
       
   365 						TInt aStatusRef )
       
   366     {
       
   367     OstTraceExt1( TRACE_NORMAL, CCONNMOADAPTER_CHILDURILISTL_ENTRY, "ENTRY: CConnMoAdapter::ChildURIListL;aURI=%s", aURI );
       
   368     
       
   369     CBranchBase* implementation = GetBranch( aURI ); 
       
   370     
       
   371     implementation->ChildURIListL( aURI, aLUID, aPreviousURISegmentList, 
       
   372                                    aResultsRef, aStatusRef );
       
   373 
       
   374     
       
   375     OstTrace0( TRACE_NORMAL, CCONNMOADAPTER_CHILDURILISTL_EXIT, "EXIT: CConnMoAdapter::ChildURIListL" );
       
   376     }
       
   377     
       
   378 //------------------------------------------------------------------------------
       
   379 // CConnMoAdapter::AddNodeObjectL
       
   380 //------------------------------------------------------------------------------
       
   381 void CConnMoAdapter::AddNodeObjectL( const TDesC8& aURI, 
       
   382                                      const TDesC8& aParentLUID,
       
   383                                      TInt aStatusRef )
       
   384     {
       
   385     OstTraceExt1( TRACE_NORMAL, CCONNMOADAPTER_ADDNODEOBJECTL_ENTRY, "ENTRY: CConnMoAdapter::AddNodeObjectL;aURI=%s", aURI );
       
   386     
       
   387     CBranchBase* implementation = GetBranch( aURI ); 
       
   388     
       
   389     implementation->AddNodeObjectL( aURI, aParentLUID, aStatusRef );
       
   390 
       
   391     OstTrace0( TRACE_NORMAL, CCONNMOADAPTER_ADDNODEOBJECTL_EXIT, "EXIT: CConnMoAdapter::AddNodeObjectL" );
       
   392     }
       
   393 
       
   394 //------------------------------------------------------------------------------
       
   395 // CConnMoAdapter::ExecuteCommandL
       
   396 // Not supported. Returns EError.
       
   397 //------------------------------------------------------------------------------
       
   398 void CConnMoAdapter::ExecuteCommandL( const TDesC8& /*aURI*/, 
       
   399                                       const TDesC8& /*aLUID*/,
       
   400                                       const TDesC8& /*aArgument*/, 
       
   401                                       const TDesC8& /*aType*/,
       
   402                                       TInt aStatusRef )
       
   403     {
       
   404     OstTraceFunctionEntry0( CCONNMOADAPTER_EXECUTECOMMANDL_ENTRY );
       
   405     
       
   406     iCallBack->SetStatusL( aStatusRef, CSmlDmAdapter::EError );
       
   407 
       
   408     OstTrace0( TRACE_NORMAL, 
       
   409                CCONNMOADAPTER_EXECUTECOMMANDL_UNSUPPORTED_METHOD_CALL, 
       
   410                "CConnMoAdapter::ExecuteCommandL;Unsupported method call. CSmlDmAdapter::EError." );
       
   411 
       
   412     OstTraceFunctionExit0( CCONNMOADAPTER_EXECUTECOMMANDL_EXIT );
       
   413     }
       
   414 
       
   415 //------------------------------------------------------------------------------
       
   416 // CConnMoAdapter::ExecuteCommandL
       
   417 // Not supported. Returns EError.
       
   418 //------------------------------------------------------------------------------
       
   419 void CConnMoAdapter::ExecuteCommandL( const TDesC8& /*aURI*/, 
       
   420                                       const TDesC8& /*aLUID*/,
       
   421                                       RWriteStream*& /*aStream*/, 
       
   422                                       const TDesC8& /*aType*/,
       
   423                                       TInt aStatusRef )
       
   424     {
       
   425     OstTraceFunctionEntry0( CCONNMOADAPTER_EXECUTECOMMANDL_STREAM_ENTRY );
       
   426     
       
   427     iCallBack->SetStatusL( aStatusRef, CSmlDmAdapter::EError );
       
   428     
       
   429     OstTrace0( TRACE_NORMAL, 
       
   430                CCONNMOADAPTER_EXECUTECOMMANDL_STREAM_UNSUPPORTED_METHOD_CALL, 
       
   431                "CConnMoAdapter::ExecuteCommandL;Unsupported method call. CSmlDmAdapter::EError." );
       
   432     
       
   433     OstTraceFunctionExit0( CCONNMOADAPTER_EXECUTECOMMANDL_STREAM_EXIT );
       
   434     }
       
   435 
       
   436 //------------------------------------------------------------------------------
       
   437 // CConnMoAdapter::CopyCommandL
       
   438 // Not supported. Returns EError.
       
   439 //------------------------------------------------------------------------------
       
   440 void CConnMoAdapter::CopyCommandL( const TDesC8& /*aTargetURI*/, 
       
   441                                    const TDesC8& /*aTargetLUID*/,
       
   442                                    const TDesC8& /*aSourceURI*/, 
       
   443                                    const TDesC8& /*aSourceLUID*/,
       
   444                                    const TDesC8& /*aType*/, 
       
   445                                    TInt aStatusRef )
       
   446     {
       
   447     OstTraceFunctionEntry0( CCONNMOADAPTER_COPYCOMMANDL_ENTRY );
       
   448     
       
   449     iCallBack->SetStatusL( aStatusRef, CSmlDmAdapter::EError );
       
   450 
       
   451     OstTrace0( TRACE_NORMAL, 
       
   452                CCONNMOADAPTER_COPYCOMMANDL_UNSUPPORTED_METHOD_CALL, 
       
   453                "CConnMoAdapter::CopyCommandL;Unsupported method call. CSmlDmAdapter::EError." );
       
   454     
       
   455     OstTraceFunctionExit0( CCONNMOADAPTER_COPYCOMMANDL_EXIT );
       
   456     }
       
   457 
       
   458 //------------------------------------------------------------------------------
       
   459 // CConnMoAdapter::StartAtomicL
       
   460 // Not supported.
       
   461 //------------------------------------------------------------------------------
       
   462 void CConnMoAdapter::StartAtomicL()
       
   463     {
       
   464     OstTraceFunctionEntry0( CCONNMOADAPTER_STARTATOMICL_ENTRY );
       
   465     
       
   466     OstTrace0( TRACE_NORMAL, 
       
   467                CCONNMOADAPTER_STARTATOMICL_UNSUPPORTED_METHOD_CALL, 
       
   468                "CConnMoAdapter::StartAtomicL;Unsupported method call." );
       
   469 
       
   470     OstTraceFunctionExit0( CCONNMOADAPTER_STARTATOMICL_EXIT );
       
   471     }
       
   472 
       
   473 //------------------------------------------------------------------------------
       
   474 // CConnMoAdapter::CommitAtomicL
       
   475 // Not supported.
       
   476 //------------------------------------------------------------------------------
       
   477 void CConnMoAdapter::CommitAtomicL()
       
   478     {
       
   479     OstTraceFunctionEntry0( CCONNMOADAPTER_COMMITATOMICL_ENTRY );
       
   480 
       
   481     OstTrace0( TRACE_NORMAL, 
       
   482                CCONNMOADAPTER_COMMITATOMICL_UNSUPPORTED_METHOD_CALL, 
       
   483                "CConnMoAdapter::CommitAtomicL;Unsupported method call." );
       
   484     
       
   485     OstTraceFunctionExit0( CCONNMOADAPTER_COMMITATOMICL_EXIT );
       
   486     }
       
   487 
       
   488 //------------------------------------------------------------------------------
       
   489 // CConnMoAdapter::RollbackAtomicL
       
   490 // Not supported.
       
   491 //------------------------------------------------------------------------------
       
   492 void CConnMoAdapter::RollbackAtomicL()
       
   493     {
       
   494     OstTraceFunctionEntry0( CCONNMOADAPTER_ROLLBACKATOMICL_ENTRY );
       
   495 
       
   496     OstTrace0( TRACE_NORMAL, 
       
   497                CCONNMOADAPTER_ROLLBACKATOMICL_UNSUPPORTED_METHOD_CALL, 
       
   498                "CConnMoAdapter::RollbackAtomicL;Unsupported method call." );
       
   499     
       
   500     OstTraceFunctionExit0( CCONNMOADAPTER_ROLLBACKATOMICL_EXIT );
       
   501     }
       
   502 
       
   503 //------------------------------------------------------------------------------
       
   504 // CConnMoAdapter::StreamingSupport
       
   505 // Not supported. Returns EFalse.
       
   506 //------------------------------------------------------------------------------
       
   507 TBool CConnMoAdapter::StreamingSupport( TInt& /*aItemSize*/ )
       
   508     {
       
   509     OstTraceFunctionEntry0( CCONNMOADAPTER_STREAMINGSUPPORT_ENTRY );
       
   510 
       
   511     
       
   512     OstTrace0( TRACE_NORMAL, 
       
   513                CCONNMOADAPTER_STREAMINGSUPPORT_NOT_SUPPORTED, 
       
   514                "CConnMoAdapter::StreamingSupport;Not supported." );
       
   515     
       
   516     OstTraceFunctionExitExt( CCONNMOADAPTER_STREAMINGSUPPORT_EXIT, this, EFalse );
       
   517     return EFalse;
       
   518     }
       
   519 
       
   520 //------------------------------------------------------------------------------
       
   521 // CConnMoAdapter::StreamCommittedL
       
   522 // Not supported. Returns EError.
       
   523 //------------------------------------------------------------------------------
       
   524 void CConnMoAdapter::StreamCommittedL()
       
   525     {
       
   526     OstTraceFunctionEntry0( CCONNMOADAPTER_STREAMCOMMITTEDL_ENTRY);
       
   527     
       
   528     OstTrace0( TRACE_NORMAL, 
       
   529                CCONNMOADAPTER_STREAMCOMMMITTEDL_UNSUPPORTED_METHOD_CALL, 
       
   530                "CConnMoAdapter::StreamCommittedL;Unsupported method call." );
       
   531 
       
   532     OstTraceFunctionExit0( CCONNMOADAPTER_STREAMCOMMITTEDL_EXIT );
       
   533     }
       
   534 
       
   535 void CConnMoAdapter::CompleteOutstandingCmdsL()
       
   536     {
       
   537     OstTraceFunctionEntry0( CCONNMOADAPTER_COMPLETEOUTSTANDINGCMDSL_ENTRY );
       
   538     
       
   539     iNapBranch->ProcessBufferL();
       
   540     iProxyBranch->ProcessBufferL();
       
   541     
       
   542     iBuffer->Reset();
       
   543     
       
   544     OstTraceFunctionExit0( CCONNMOADAPTER_COMPLETEOUTSTANDINGCMDSL_EXIT );
       
   545     }
       
   546 
       
   547 // ======== GLOBAL FUNCTIONS ========
       
   548 //------------------------------------------------------------------------------
       
   549 //
       
   550 //------------------------------------------------------------------------------
       
   551 #ifndef IMPLEMENTATION_PROXY_ENTRY
       
   552 #define IMPLEMENTATION_PROXY_ENTRY( aUid, aFuncPtr )  {{aUid},(aFuncPtr)}
       
   553 #endif
       
   554 
       
   555 const TImplementationProxy ImplementationTable[] = 
       
   556     {
       
   557     IMPLEMENTATION_PROXY_ENTRY(KConnMoAdapterUid, CConnMoAdapter::NewL)
       
   558     };
       
   559 
       
   560 //------------------------------------------------------------------------------
       
   561 // TImplementationProxy* ImplementationGroupProxy()
       
   562 //------------------------------------------------------------------------------
       
   563 EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount )
       
   564     {
       
   565     OstTraceFunctionEntry1( CONNMOADAPTER_IMPLEMENTATIONGROUPPROXY_ENTRY, aTableCount );
       
   566 
       
   567     aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
       
   568 
       
   569     OstTraceFunctionExit0( CONNMOADAPTER_IMPLEMENTATIONGROUPPROXY_EXIT );
       
   570     return ImplementationTable;
       
   571     }