deviceupdatesui/adapters/devdetail/src/nsmldmdevdetailadapter.cpp
branchGCC_SURGE
changeset 48 751cd8585b82
parent 28 7d88c1eb7da3
parent 42 aa33c2cb9a50
child 50 b7aa21d67399
equal deleted inserted replaced
28:7d88c1eb7da3 48:751cd8585b82
     1 /*
       
     2 * Copyright (c) 2004 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:    DM DevDetail Adapter Source Code
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 // INCLUDE FILES
       
    22 #include <implementationproxy.h> // For TImplementationProxy definition
       
    23 
       
    24 #include "nsmldmimpluids.h"
       
    25 #include "nsmldmdevdetailadapter.h"
       
    26 #include "nsmldebug.h"
       
    27 #include "nsmlphoneinfo.h"
       
    28 #include "nsmlunicodeconverter.h"
       
    29 #include "nsmlconstants.h"
       
    30 
       
    31 
       
    32 // ------------------------------------------------------------------------------------------------
       
    33 // CNSmlDmDevDetailAdapter::NewL( )
       
    34 // ------------------------------------------------------------------------------------------------
       
    35 CNSmlDmDevDetailAdapter* CNSmlDmDevDetailAdapter::NewL(MSmlDmCallback* aDmCallback )
       
    36     {
       
    37     _DBG_FILE("CNSmlDmDevDetailAdapter::NewL(): begin");
       
    38     CNSmlDmDevDetailAdapter* self = NewLC( aDmCallback );
       
    39     CleanupStack::Pop();
       
    40     _DBG_FILE("CNSmlDmDevDetailAdapter::NewL(): end");
       
    41     return self;
       
    42     }
       
    43 
       
    44 // ------------------------------------------------------------------------------------------------
       
    45 // CNSmlDmDevDetailAdapter::NewLC( )
       
    46 // ------------------------------------------------------------------------------------------------
       
    47 CNSmlDmDevDetailAdapter* CNSmlDmDevDetailAdapter::NewLC(MSmlDmCallback* aDmCallback )
       
    48     {
       
    49     _DBG_FILE("CNSmlDmDevDetailAdapter::NewLC(): begin");
       
    50     CNSmlDmDevDetailAdapter* self = new (ELeave) CNSmlDmDevDetailAdapter(aDmCallback);
       
    51     CleanupStack::PushL(self);
       
    52     self->iDmCallback=aDmCallback;
       
    53     _DBG_FILE("CNSmlDmDevDetailAdapter::NewLC(): end");
       
    54     return self;
       
    55     }
       
    56 
       
    57     
       
    58 // ------------------------------------------------------------------------------------------------
       
    59 // CNSmlDmDevDetailAdapter::CNSmlDmDevDetailAdapter(TAny* aEcomArguments)
       
    60 // ------------------------------------------------------------------------------------------------
       
    61 CNSmlDmDevDetailAdapter::CNSmlDmDevDetailAdapter(TAny* aEcomArguments):CSmlDmAdapter(aEcomArguments)
       
    62     {
       
    63     _DBG_FILE("CNSmlDmDevDetailAdapter::CNSmlDmDevDetailAdapter(): begin");
       
    64     _DBG_FILE("CNSmlDmDevDetailAdapter::CNSmlDmDevDetailAdapter(): end");
       
    65     }
       
    66 
       
    67 // -----------------------------------------------------------------------------
       
    68 // CNSmlDmDevDetailAdapter::~CNSmlDmDevDetailAdapter()
       
    69 // -----------------------------------------------------------------------------
       
    70 CNSmlDmDevDetailAdapter::~CNSmlDmDevDetailAdapter()
       
    71     {
       
    72     _DBG_FILE("CNSmlDmDevDetailAdapter::~CNSmlDmDevDetailAdapter(): begin");
       
    73     _DBG_FILE("CNSmlDmDevDetailAdapter::~CNSmlDmDevDetailAdapter(): end");
       
    74     }
       
    75 
       
    76 // -----------------------------------------------------------------------------
       
    77 // CNSmlDmDevDetailAdapter::DevDetailValueCrcL()
       
    78 // -----------------------------------------------------------------------------
       
    79 TInt CNSmlDmDevDetailAdapter::DevDetailValueCrcL()
       
    80     {
       
    81     CBufBase* crcBuf = CBufFlat::NewL( 1 );
       
    82     CleanupStack::PushL( crcBuf );
       
    83     
       
    84     AddObjectToBufferL( *crcBuf, KNSmlDMDevDetailDevTypNodeName() );
       
    85     AddObjectToBufferL( *crcBuf, KNSmlDMDevDetailOEMNodeName() );
       
    86     AddObjectToBufferL( *crcBuf, KNSmlDMDevDetailFwVNodeName() );
       
    87     AddObjectToBufferL( *crcBuf, KNSmlDMDevDetailSwVNodeName() );
       
    88     AddObjectToBufferL( *crcBuf, KNSmlDMDevDetailHwVNodeName() );
       
    89     AddObjectToBufferL( *crcBuf, KNSmlDMDevDetailLrgObjNodeName() );
       
    90     AddObjectToBufferL( *crcBuf, KNSmlDMDevDetailMaxDepthNodeName() );
       
    91     AddObjectToBufferL( *crcBuf, KNSmlDMDevDetailMaxTotLenNodeName() );
       
    92     AddObjectToBufferL( *crcBuf, KNSmlDMDevDetailMaxSegLenNodeName() );
       
    93     
       
    94     TUint16 crc = 0;
       
    95     Mem::Crc( crc, crcBuf->Ptr(0).Ptr(), crcBuf->Size() );
       
    96     CleanupStack::PopAndDestroy();  // crcBuf
       
    97     return crc;
       
    98     }
       
    99 
       
   100 // -----------------------------------------------------------------------------
       
   101 // CNSmlDmDevDetailAdapter::AddObjectToBufferL()
       
   102 // -----------------------------------------------------------------------------
       
   103 void CNSmlDmDevDetailAdapter::AddObjectToBufferL( CBufBase& aCrcBuf, 
       
   104                                                   const TDesC8& aURI )
       
   105     {
       
   106     CBufBase* buf = CBufFlat::NewL( 1 );
       
   107     CleanupStack::PushL( buf );
       
   108     FetchLeafObjectL( aURI, *buf );
       
   109     aCrcBuf.InsertL( aCrcBuf.Size(), buf->Ptr(0) );
       
   110     _LIT8( KNSmlDmSeparator, ";" );
       
   111     aCrcBuf.InsertL( aCrcBuf.Size(), KNSmlDmSeparator );
       
   112     CleanupStack::PopAndDestroy(); //buf    
       
   113     }
       
   114 
       
   115 // -----------------------------------------------------------------------------
       
   116 // CNSmlDmDevDetailAdapter::FetchLeafObjectL()
       
   117 // -----------------------------------------------------------------------------
       
   118 CSmlDmAdapter::TError CNSmlDmDevDetailAdapter::FetchLeafObjectL( const TDesC8& aURI, 
       
   119                                                                  CBufBase& aObject )
       
   120     {
       
   121     _DBG_FILE("CNSmlDmDevDetailAdapter::FetchLeafObjectL(): begin");
       
   122     CSmlDmAdapter::TError retValue = CSmlDmAdapter::EOk;
       
   123 
       
   124     TInt ret = aURI.LocateReverse(KNSmlDMDevDetailSeparator()[0]);
       
   125     if ( ret == KErrNotFound ) 
       
   126         {
       
   127         ret = -1;
       
   128         }
       
   129     TInt len = aURI.Length() - ( ret + 1 );
       
   130     TPtrC8 segment = aURI.Right( len );
       
   131     if ( segment == KNSmlDMDevDetailDevTypNodeName )
       
   132         {
       
   133         aObject.InsertL( 0, KNSmlDMDevDetailDevTypValue );
       
   134         }
       
   135     else
       
   136     if ( segment == KNSmlDMDevDetailOEMNodeName )
       
   137         {
       
   138         CNSmlPhoneInfo* phoneInfo = CNSmlPhoneInfo::NewLC();
       
   139         HBufC* manufacturer = HBufC::NewLC( 50 );
       
   140         TPtr manufacturerPtr = manufacturer->Des();  
       
   141         phoneInfo->PhoneDataL( CNSmlPhoneInfo::EPhoneManufacturer, manufacturerPtr );
       
   142         HBufC8* manufacturerInUTF8 = NULL;
       
   143         NSmlUnicodeConverter::HBufC8InUTF8LC( *manufacturer, manufacturerInUTF8 );
       
   144         aObject.InsertL( 0, *manufacturerInUTF8 );
       
   145         CleanupStack::PopAndDestroy( 3 ); //manufacturerInUTF8, manufacturer, phoneInfo
       
   146         }
       
   147     else
       
   148     if ( segment == KNSmlDMDevDetailSwVNodeName )
       
   149         {
       
   150         // fetch software version
       
   151         GetDevDetailDataL( aObject, ESwVersion );
       
   152         }
       
   153     else
       
   154     if ( segment == KNSmlDMDevDetailHwVNodeName )
       
   155         {
       
   156         // fetch hardware version
       
   157         GetDevDetailDataL( aObject, EHwVersion );
       
   158         }
       
   159     else
       
   160     if ( segment == KNSmlDMDevDetailLrgObjNodeName )
       
   161         {
       
   162         aObject.InsertL( 0, KNSmlDMDevDetailLrgObjValue );
       
   163         }
       
   164     else
       
   165     if ( segment == KNSmlDMDevDetailMaxDepthNodeName )
       
   166         {
       
   167         aObject.InsertL( 0, KNSmlDMDevDetailMaxDepthValue );
       
   168         }
       
   169     else
       
   170     if ( segment == KNSmlDMDevDetailMaxTotLenNodeName )
       
   171         {
       
   172         aObject.InsertL( 0, KNSmlDMDevDetailMaxTotLenValue );
       
   173         }
       
   174     else
       
   175     if ( segment == KNSmlDMDevDetailMaxSegLenNodeName )
       
   176         {
       
   177         aObject.InsertL( 0, KNSmlDMDevDetailMaxSegLenValue );
       
   178         }
       
   179     else
       
   180     if ( segment != KNSmlDMDevDetailFwVNodeName )
       
   181         {
       
   182         retValue = CSmlDmAdapter::EError;
       
   183         }
       
   184         
       
   185     _DBG_FILE("CNSmlDmDevDetailAdapter::FetchLeafObjectL(): end");
       
   186     return retValue;
       
   187     }
       
   188 // -----------------------------------------------------------------------------
       
   189 // CNSmlDmDevDetailAdapter::SetLeafPropertiesL()
       
   190 // -----------------------------------------------------------------------------
       
   191 void CNSmlDmDevDetailAdapter::SetLeafPropertiesL( MSmlDmDDFObject& aObject, 
       
   192                                                   const TSmlDmAccessTypes& aAccessTypes,  
       
   193                                                   const TDesC8& aDescription ) const
       
   194     {
       
   195     aObject.SetAccessTypesL( aAccessTypes );
       
   196     aObject.SetScopeL( MSmlDmDDFObject::EPermanent );
       
   197     aObject.SetDFFormatL( MSmlDmDDFObject::EChr );
       
   198     aObject.AddDFTypeMimeTypeL( KNSmlDMDevDetailTextPlain );
       
   199     aObject.SetDescriptionL( aDescription );
       
   200     }
       
   201 
       
   202 
       
   203 
       
   204 // -----------------------------------------------------------------------------
       
   205 // CNSmlDmDevDetailAdapter::DDFVersionL()
       
   206 // -----------------------------------------------------------------------------
       
   207 void CNSmlDmDevDetailAdapter::DDFVersionL(CBufBase& aDDFVersion)
       
   208     {
       
   209     _DBG_FILE("CNSmlDmDevDetailAdapter::DDFVersionL(TDes& aDDFVersion): begin");
       
   210     aDDFVersion.InsertL(0,KNSmlDMDevDetailDDFVersion);
       
   211     _DBG_FILE("CNSmlDmDevDetailAdapter::DDFVersionL(TDes& aDDFVersion): end");
       
   212     }
       
   213 
       
   214 
       
   215 // -----------------------------------------------------------------------------
       
   216 // void CNSmlDmDevDetailAdapter::DDFStructureL()
       
   217 //
       
   218 // -----------------------------------------------------------------------------
       
   219 void CNSmlDmDevDetailAdapter::DDFStructureL( MSmlDmDDFObject& aDDF )
       
   220     {
       
   221     _DBG_FILE("CNSmlDmDevDetailAdapter::DDFStructureL(): begin");
       
   222     
       
   223     TSmlDmAccessTypes accessTypes;
       
   224     
       
   225     accessTypes.SetGet();
       
   226     // DevDetail
       
   227     MSmlDmDDFObject& devDetail = aDDF.AddChildObjectL( KNSmlDMDevDetailNodeName );
       
   228     devDetail.SetAccessTypesL( accessTypes ); 
       
   229     devDetail.SetScopeL( MSmlDmDDFObject::EPermanent );
       
   230     devDetail.SetDescriptionL( KNSmlDMDevDetailDescription );
       
   231 
       
   232     // DevTyp   
       
   233     MSmlDmDDFObject& devTyp = devDetail.AddChildObjectL(KNSmlDMDevDetailDevTypNodeName );
       
   234     SetLeafPropertiesL( devTyp, accessTypes, KNSmlDMDevDetailDevTypDescription );
       
   235     // OEM  
       
   236     MSmlDmDDFObject& oem = devDetail.AddChildObjectL(KNSmlDMDevDetailOEMNodeName);
       
   237     SetLeafPropertiesL( oem, accessTypes, KNSmlDMDevDetailOEMDescription );
       
   238     // FwV  
       
   239     MSmlDmDDFObject& fwv = devDetail.AddChildObjectL(KNSmlDMDevDetailFwVNodeName);
       
   240     SetLeafPropertiesL( fwv, accessTypes, KNSmlDMDevDetailFwVDescription );
       
   241     // SwV  
       
   242     MSmlDmDDFObject& swv = devDetail.AddChildObjectL( KNSmlDMDevDetailSwVNodeName );
       
   243     SetLeafPropertiesL( swv, accessTypes, KNSmlDMDevDetailSwVDescription );
       
   244     // HwV  
       
   245     MSmlDmDDFObject& hwv = devDetail.AddChildObjectL(KNSmlDMDevDetailHwVNodeName );
       
   246     SetLeafPropertiesL( hwv, accessTypes, KNSmlDMDevDetailHwVDescription );
       
   247     // LrgObj   
       
   248     MSmlDmDDFObject& lrgObj = devDetail.AddChildObjectL(KNSmlDMDevDetailLrgObjNodeName );
       
   249     SetLeafPropertiesL( lrgObj, accessTypes, KNSmlDMDevDetailLrgObjDescription );
       
   250     lrgObj.SetDFFormatL( MSmlDmDDFObject::EBool );
       
   251     // URI
       
   252     MSmlDmDDFObject& uri = devDetail.AddChildObjectL(KNSmlDMDevDetailURINodeName);
       
   253     uri.SetAccessTypesL( accessTypes );
       
   254     uri.SetScopeL( MSmlDmDDFObject::EPermanent );
       
   255     uri.SetDescriptionL( KNSmlDMDevDetailURIDescription );
       
   256     // MaxDepth
       
   257     MSmlDmDDFObject& maxDepth = uri.AddChildObjectL( KNSmlDMDevDetailMaxDepthNodeName);
       
   258     SetLeafPropertiesL( maxDepth, accessTypes, KNSmlDMDevDetailMaxDepthDescription );
       
   259     // MaxTotLen
       
   260     MSmlDmDDFObject& maxTotLen = uri.AddChildObjectL( KNSmlDMDevDetailMaxTotLenNodeName );
       
   261     SetLeafPropertiesL( maxTotLen, accessTypes, KNSmlDMDevDetailMaxTotLenDescription );
       
   262     // MaxSegLen
       
   263     MSmlDmDDFObject& maxSegLen = uri.AddChildObjectL( KNSmlDMDevDetailMaxSegLenNodeName);
       
   264     SetLeafPropertiesL( maxSegLen, accessTypes, KNSmlDMDevDetailMaxSegLenDescription );
       
   265         
       
   266     _DBG_FILE("CNSmlDmDevDetailAdapter::DDFStructureL(): end");
       
   267     }
       
   268 
       
   269 // -----------------------------------------------------------------------------
       
   270 // CNSmlDmDevDetailAdapter::UpdateLeafObjectL()
       
   271 // -----------------------------------------------------------------------------
       
   272 void  CNSmlDmDevDetailAdapter::UpdateLeafObjectL( const TDesC8& /*aURI*/, 
       
   273                                                   const TDesC8& /*aLUID*/, 
       
   274                                                   const TDesC8& /*aObject*/, 
       
   275                                                   const TDesC8& /*aType*/,
       
   276                                                   const TInt aStatusRef )
       
   277     {
       
   278     _DBG_FILE("CNSmlDmDevDetailAdapter::UpdateLeafObjectL(): begin");
       
   279     _DBG_FILE("CNSmlDmDevDetailAdapter::UpdateLeafObjectL(): end");
       
   280     iDmCallback->SetStatusL(aStatusRef,CSmlDmAdapter::EError);
       
   281     }
       
   282 
       
   283 
       
   284 // -----------------------------------------------------------------------------
       
   285 //  CNSmlDmDevDetailAdapter::DeleteObjectL()
       
   286 // -----------------------------------------------------------------------------
       
   287 void  CNSmlDmDevDetailAdapter::DeleteObjectL( const TDesC8& /*aURI*/, 
       
   288                                               const TDesC8& /*aLUID*/,
       
   289                                               const TInt aStatusRef )
       
   290     {
       
   291     _DBG_FILE("CNSmlDmDevDetailAdapter::DeleteLeafObjectL( ): begin");
       
   292     _DBG_FILE("CNSmlDmDevDetailAdapter::DeleteLeafObjectL( ): end");
       
   293     iDmCallback->SetStatusL(aStatusRef,CSmlDmAdapter::EError);
       
   294     }
       
   295 
       
   296 
       
   297 // -----------------------------------------------------------------------------
       
   298 // CNSmlDmDevDetailAdapter::FetchLeafObjectL()
       
   299 // -----------------------------------------------------------------------------
       
   300 void  CNSmlDmDevDetailAdapter::FetchLeafObjectL( const TDesC8& aURI, 
       
   301                                                  const TDesC8& /*aLUID*/, 
       
   302                                                  const TDesC8& aType, 
       
   303                                                  const TInt aResultsRef, 
       
   304                                                  const TInt aStatusRef )
       
   305     {
       
   306     _DBG_FILE("CNSmlDmDevDetailAdapter::FetchLeafObjectL(): begin");
       
   307     CBufBase *object = CBufFlat::NewL( 1 );
       
   308     CleanupStack::PushL( object );
       
   309     CSmlDmAdapter::TError retValue = FetchLeafObjectL( aURI, *object );
       
   310 
       
   311     iDmCallback->SetStatusL( aStatusRef, retValue );
       
   312     iDmCallback->SetResultsL( aResultsRef, *object, aType);
       
   313     CleanupStack::PopAndDestroy(); //object
       
   314         
       
   315     _DBG_FILE("CNSmlDmDevDetailAdapter::FetchLeafObjectL(): end");
       
   316     }
       
   317 
       
   318 
       
   319 // -----------------------------------------------------------------------------
       
   320 // CSmlDmAdapter::TError CNSmlDmDevDetailAdapter::ChildURIListL()
       
   321 // -----------------------------------------------------------------------------
       
   322 
       
   323 void  CNSmlDmDevDetailAdapter::ChildURIListL( const TDesC8& aURI, 
       
   324                                               const TDesC8& /*aLUID*/, 
       
   325                                               const CArrayFix<TSmlDmMappingInfo>& /*aPreviousURISegmentList*/, 
       
   326                                               const TInt aResultsRef, 
       
   327                                               const TInt aStatusRef )
       
   328     {
       
   329     _DBG_FILE("CNSmlDmDevDetailAdapter::ChildURIListL(): begin");
       
   330     CSmlDmAdapter::TError retValue = CSmlDmAdapter::EOk;
       
   331     CBufBase *currentURISegmentList = CBufFlat::NewL(64);
       
   332     CleanupStack::PushL(currentURISegmentList);
       
   333 
       
   334     TInt ret = aURI.LocateReverse(KNSmlDMDevDetailSeparator()[0]);
       
   335     if ( ret == KErrNotFound ) 
       
   336         {
       
   337         ret = -1;
       
   338         }
       
   339     TInt len = aURI.Length() - ( ret + 1 );
       
   340     TPtrC8 segment = aURI.Right( len );
       
   341 
       
   342     if ( segment == KNSmlDMDevDetailNodeName )
       
   343         {
       
   344         currentURISegmentList->InsertL( currentURISegmentList->Size(), KNSmlDMDevDetailDevTypNodeName() );
       
   345         currentURISegmentList->InsertL( currentURISegmentList->Size(), KNSmlDMDevDetailSeparator() );
       
   346         currentURISegmentList->InsertL( currentURISegmentList->Size(), KNSmlDMDevDetailOEMNodeName() );
       
   347         currentURISegmentList->InsertL( currentURISegmentList->Size(), KNSmlDMDevDetailSeparator() );
       
   348         currentURISegmentList->InsertL( currentURISegmentList->Size(), KNSmlDMDevDetailFwVNodeName() );
       
   349         currentURISegmentList->InsertL( currentURISegmentList->Size(), KNSmlDMDevDetailSeparator() );
       
   350         currentURISegmentList->InsertL( currentURISegmentList->Size(), KNSmlDMDevDetailSwVNodeName() );
       
   351         currentURISegmentList->InsertL( currentURISegmentList->Size(), KNSmlDMDevDetailSeparator() );
       
   352          currentURISegmentList->InsertL( currentURISegmentList->Size(), KNSmlDMDevDetailHwVNodeName() );
       
   353         currentURISegmentList->InsertL( currentURISegmentList->Size(), KNSmlDMDevDetailSeparator() );
       
   354         currentURISegmentList->InsertL( currentURISegmentList->Size(), KNSmlDMDevDetailLrgObjNodeName() );
       
   355         currentURISegmentList->InsertL( currentURISegmentList->Size(), KNSmlDMDevDetailSeparator() );
       
   356          currentURISegmentList->InsertL( currentURISegmentList->Size(), KNSmlDMDevDetailURINodeName() );
       
   357         }
       
   358     else
       
   359     if ( segment == KNSmlDMDevDetailURINodeName )
       
   360         {
       
   361         currentURISegmentList->InsertL( currentURISegmentList->Size(), KNSmlDMDevDetailMaxDepthNodeName() );
       
   362         currentURISegmentList->InsertL( currentURISegmentList->Size(), KNSmlDMDevDetailSeparator() );
       
   363         currentURISegmentList->InsertL( currentURISegmentList->Size(), KNSmlDMDevDetailMaxTotLenNodeName() );
       
   364         currentURISegmentList->InsertL( currentURISegmentList->Size(), KNSmlDMDevDetailSeparator() );
       
   365         currentURISegmentList->InsertL( currentURISegmentList->Size(), KNSmlDMDevDetailMaxSegLenNodeName() );
       
   366         }
       
   367     else
       
   368         {
       
   369         retValue = CSmlDmAdapter::EError;
       
   370         }
       
   371 
       
   372     iDmCallback->SetStatusL(aStatusRef,retValue);
       
   373     iDmCallback->SetResultsL(aResultsRef,*currentURISegmentList,KNullDesC8);
       
   374     CleanupStack::PopAndDestroy(); //currentURISegmentList;
       
   375     _DBG_FILE("CNSmlDmDevDetailAdapter::ChildURIListL(): end");
       
   376     }
       
   377 
       
   378 // -----------------------------------------------------------------------------
       
   379 // CNSmlDmDevDetailAdapter::AddNodeObjectL()
       
   380 // -----------------------------------------------------------------------------
       
   381 void  CNSmlDmDevDetailAdapter::AddNodeObjectL( const TDesC8& /*aURI*/, 
       
   382                                                const TDesC8& /*aParentLUID*/,
       
   383                                                const TInt aStatusRef )
       
   384     {
       
   385     _DBG_FILE("CNSmlDmDevDetailAdapter::AddNodeObjectL(): begin");
       
   386     _DBG_FILE("CNSmlDmDevDetailAdapter::AddNodeObjectL(): end");
       
   387     iDmCallback->SetStatusL(aStatusRef,CSmlDmAdapter::EError);
       
   388     }
       
   389 
       
   390 // -----------------------------------------------------------------------------
       
   391 //  CNSmlDmDevDetailAdapter::UpdateLeafObjectL(const TDesC8& aURI, 
       
   392 // const TDesC8& aLUID, RWriteStream*& aStream, const TDesC8& aType, 
       
   393 // const TInt aStatusRef)
       
   394 // -----------------------------------------------------------------------------
       
   395 void CNSmlDmDevDetailAdapter::UpdateLeafObjectL( const TDesC8& /*aURI*/, 
       
   396                                                  const TDesC8& /*aLUID*/, 
       
   397                                                  RWriteStream*& /*aStream*/, 
       
   398                                                  const TDesC8& /*aType*/, 
       
   399                                                  const TInt aStatusRef )
       
   400     {
       
   401     _DBG_FILE("CNSmlDmDevInfoAdapter::UpdateLeafObjectL(): stream: begin");
       
   402     iDmCallback->SetStatusL( aStatusRef, CSmlDmAdapter::EError );
       
   403     _DBG_FILE("CNSmlDmDevInfoAdapter::UpdateLeafObjectL(): stream: end");
       
   404     }
       
   405 
       
   406 // -----------------------------------------------------------------------------
       
   407 //  CNSmlDmDevDetailAdapter::FetchLeafObjectSizeL( const TDesC8& aURI, 
       
   408 // const TDesC8& aLUID, const TDesC8& aType, const TInt aResultsRef, 
       
   409 // const TInt aStatusRef )
       
   410 // -----------------------------------------------------------------------------
       
   411 void CNSmlDmDevDetailAdapter::FetchLeafObjectSizeL( const TDesC8& aURI, 
       
   412                                                     const TDesC8& /*aLUID*/, 
       
   413                                                     const TDesC8& aType, 
       
   414                                                     const TInt aResultsRef, 
       
   415                                                     const TInt aStatusRef )
       
   416     {
       
   417     _DBG_FILE("CNSmlDmDevDetailAdapter::FetchLeafObjectSizeL(): begin");
       
   418 
       
   419     CBufBase *object = CBufFlat::NewL( 1 );
       
   420     CleanupStack::PushL( object );
       
   421     CSmlDmAdapter::TError retValue = FetchLeafObjectL( aURI, *object );
       
   422 
       
   423     TInt objSizeInBytes = object->Size();
       
   424     TBuf8<KNSmlMaxSizeBufferLength> stringObjSizeInBytes;
       
   425     stringObjSizeInBytes.Num( objSizeInBytes );
       
   426     object->Reset();
       
   427     object->InsertL( 0, stringObjSizeInBytes );
       
   428     
       
   429     iDmCallback->SetStatusL( aStatusRef, retValue );
       
   430     iDmCallback->SetResultsL( aResultsRef, *object, aType);
       
   431     CleanupStack::PopAndDestroy(); //object 
       
   432 
       
   433             
       
   434     _DBG_FILE("CNSmlDmDevDetailAdapter::FetchLeafObjectSizeL(): end");
       
   435     }
       
   436     
       
   437 // -----------------------------------------------------------------------------
       
   438 //  CNSmlDmDevDetailAdapter::ExecuteCommandL( const TDesC8& aURI, 
       
   439 //  const TDesC8& aParentLUID, TDesC8& aArgument, const TDesC8& aType, 
       
   440 //  TInt aStatusRef )
       
   441 // -----------------------------------------------------------------------------
       
   442 void CNSmlDmDevDetailAdapter::ExecuteCommandL( const TDesC8& /*aURI*/, const TDesC8& /*aLUID*/, const TDesC8& /*aArgument*/, const TDesC8& /*aType*/, const TInt aStatusRef )
       
   443     {
       
   444     _DBG_FILE("CNSmlDmDevInfoAdapter::ExecuteCommandL(): begin");
       
   445     iDmCallback->SetStatusL( aStatusRef, CSmlDmAdapter::EError );
       
   446     _DBG_FILE("CNSmlDmDevInfoAdapter::ExecuteCommandL(): end");
       
   447     }
       
   448 
       
   449 // -----------------------------------------------------------------------------
       
   450 //  CNSmlDmDevDetailAdapter::ExecuteCommandL( const TDesC8& aURI, 
       
   451 //  const TDesC8& aParentLUID, RWriteStream*& aStream, const TDesC8& aType, 
       
   452 //  const TInt aStatusRef )
       
   453 // -----------------------------------------------------------------------------
       
   454 void CNSmlDmDevDetailAdapter::ExecuteCommandL( const TDesC8& /*aURI*/, 
       
   455                                                const TDesC8& /*aParentLUID*/, 
       
   456                                                RWriteStream*& /*aStream*/, 
       
   457                                                const TDesC8& /*aType*/, 
       
   458                                                const TInt aStatusRef )
       
   459     {
       
   460     _DBG_FILE("CNSmlDmDevInfoAdapter::ExecuteCommandL(): stream: begin");
       
   461     iDmCallback->SetStatusL( aStatusRef, CSmlDmAdapter::EError );
       
   462     _DBG_FILE("CNSmlDmDevInfoAdapter::ExecuteCommandL(): stream: end");
       
   463     }
       
   464 // -----------------------------------------------------------------------------
       
   465 //  CNSmlDmDevDetailAdapter::CopyCommandL( const TDesC8& aTargetURI, 
       
   466 //  const TDesC8& aSourceURI, const TDesC8& aSourceLUID, const TDesC8& aType, 
       
   467 //  const TInt aStatusRef )
       
   468 // -----------------------------------------------------------------------------
       
   469 void CNSmlDmDevDetailAdapter::CopyCommandL( const TDesC8& /*aTargetURI*/, 
       
   470                                             const TDesC8& /*aTargetLUID*/, 
       
   471                                             const TDesC8& /*aSourceURI*/, 
       
   472                                             const TDesC8& /*aSourceLUID*/, 
       
   473                                             const TDesC8& /*aType*/, 
       
   474                                             TInt aStatusRef )
       
   475     {
       
   476     _DBG_FILE("CNSmlDmDevInfoAdapter::CopyCommandL(): begin");
       
   477     iDmCallback->SetStatusL( aStatusRef, CSmlDmAdapter::EError );
       
   478     _DBG_FILE("CNSmlDmDevInfoAdapter::CopyCommandL(): end");
       
   479     }
       
   480 
       
   481 // ----------------------------------------
       
   482 //  CNSmlDmDevDetailAdapter::StartAtomicL()
       
   483 // ----------------------------------------
       
   484 void CNSmlDmDevDetailAdapter::StartAtomicL()
       
   485     {
       
   486     _DBG_FILE("CNSmlDmDevInfoAdapter::StartAtomicL(): begin");
       
   487     _DBG_FILE("CNSmlDmDevInfoAdapter::StartAtomicL(): end");
       
   488     }
       
   489     
       
   490 // -----------------------------------------
       
   491 //  CNSmlDmDevDetailAdapter::CommitAtomicL()
       
   492 // -----------------------------------------
       
   493 void CNSmlDmDevDetailAdapter::CommitAtomicL()
       
   494     {
       
   495     _DBG_FILE("CNSmlDmDevInfoAdapter::CommitAtomicL(): begin");
       
   496     _DBG_FILE("CNSmlDmDevInfoAdapter::CommitAtomicL(): end");
       
   497     }
       
   498 
       
   499 // -------------------------------------------
       
   500 //  CNSmlDmDevDetailAdapter::RollbackAtomicL()
       
   501 // -------------------------------------------
       
   502 void CNSmlDmDevDetailAdapter::RollbackAtomicL()
       
   503     {
       
   504     _DBG_FILE("CNSmlDmDevInfoAdapter::RollbackAtomicL(): begin");
       
   505     _DBG_FILE("CNSmlDmDevInfoAdapter::RollbackAtomicL(): end");
       
   506     }
       
   507 
       
   508 // -------------------------------------------------------------
       
   509 //  CNSmlDmDevDetailAdapter::StreamingSupport( TInt& aItemSize )
       
   510 // -------------------------------------------------------------    
       
   511 TBool CNSmlDmDevDetailAdapter::StreamingSupport( TInt& /*aItemSize*/ )
       
   512     {
       
   513     _DBG_FILE("CNSmlDmDevInfoAdapter::StreamingSupport(): begin");
       
   514     _DBG_FILE("CNSmlDmDevInfoAdapter::StreamingSupport(): end");
       
   515     return EFalse;
       
   516     }
       
   517 
       
   518 // --------------------------------------------
       
   519 //  CNSmlDmDevDetailAdapter::StreamCommittedL()
       
   520 // --------------------------------------------
       
   521 void CNSmlDmDevDetailAdapter::StreamCommittedL()
       
   522     {
       
   523     _DBG_FILE("CNSmlDmDevInfoAdapter::StreamCommittedL(): begin");
       
   524     _DBG_FILE("CNSmlDmDevInfoAdapter::StreamCommittedL(): end");
       
   525     }
       
   526 
       
   527 // ----------------------------------------------------
       
   528 //  CNSmlDmDevDetailAdapter::CompleteOutstandingCmdsL()
       
   529 // ---------------------------------------------------- 
       
   530 void CNSmlDmDevDetailAdapter::CompleteOutstandingCmdsL()
       
   531     {
       
   532     _DBG_FILE("CNSmlDmDevInfoAdapter::CompleteOutstandingCmdsL(): begin");
       
   533     _DBG_FILE("CNSmlDmDevInfoAdapter::CompleteOutstandingCmdsL(): end");
       
   534     }
       
   535 
       
   536 
       
   537 // -----------------------------------------------------------------------------
       
   538 //
       
   539 // -----------------------------------------------------------------------------
       
   540 
       
   541 #ifndef IMPLEMENTATION_PROXY_ENTRY
       
   542 #define IMPLEMENTATION_PROXY_ENTRY(aUid, aFuncPtr)  {{aUid},(aFuncPtr)}
       
   543 #endif
       
   544 
       
   545 const TImplementationProxy ImplementationTable[] = 
       
   546     {
       
   547         IMPLEMENTATION_PROXY_ENTRY(KNSmlDMDevDetailAdapterImplUid, 
       
   548                                    CNSmlDmDevDetailAdapter::NewL)
       
   549     };
       
   550 
       
   551 // -----------------------------------------------------------------------------
       
   552 //
       
   553 // -----------------------------------------------------------------------------
       
   554 EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount )
       
   555     {
       
   556     _DBG_FILE("ImplementationGroupProxy() for CNSmlDmDevDetailAdapter: begin");
       
   557     aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
       
   558     _DBG_FILE("ImplementationGroupProxy() for CNSmlDmDevDetailAdapter: end");
       
   559     return ImplementationTable;
       
   560     }
       
   561