ncdengine/provider/client/src/ncdnodecontentinfoproxy.cpp
branchRCL_3
changeset 18 3ba40be8e484
parent 0 ba25891c3a9e
equal deleted inserted replaced
15:51c0f5edf5ef 18:3ba40be8e484
     1 /*
     1 /*
     2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    25 #include "ncdnodeclassids.h"
    25 #include "ncdnodeclassids.h"
    26 #include "catalogsinterfaceidentifier.h"
    26 #include "catalogsinterfaceidentifier.h"
    27 #include "catalogsutils.h"
    27 #include "catalogsutils.h"
    28 #include "catalogsdebug.h"
    28 #include "catalogsdebug.h"
    29 #include "ncderrors.h"
    29 #include "ncderrors.h"
       
    30 #include "catalogsconstants.h"
    30 
    31 
    31 
    32 
    32 // ======== PUBLIC MEMBER FUNCTIONS ========
    33 // ======== PUBLIC MEMBER FUNCTIONS ========
    33 
    34 
    34 CNcdNodeContentInfoProxy::CNcdNodeContentInfoProxy(
    35 CNcdNodeContentInfoProxy::CNcdNodeContentInfoProxy(
    84     // So, the interface list is up to date when this class object is deleted.
    85     // So, the interface list is up to date when this class object is deleted.
    85     RemoveInterface( MNcdNodeContentInfo::KInterfaceUid );
    86     RemoveInterface( MNcdNodeContentInfo::KInterfaceUid );
    86 
    87 
    87     delete iMimeType;
    88     delete iMimeType;
    88     iMimeType = NULL;
    89     iMimeType = NULL;
    89 
    90     
       
    91     delete iIdentifier;
       
    92     iIdentifier = NULL;
       
    93     
    90     delete iVersion;
    94     delete iVersion;
    91     iVersion = NULL;
    95     iVersion = NULL;
    92     }
    96     }
    93 
    97 
    94 
    98 
   164     {
   168     {
   165     DASSERT( iMimeType );
   169     DASSERT( iMimeType );
   166     return *iMimeType;
   170     return *iMimeType;
   167     }
   171     }
   168 
   172 
       
   173 const TDesC& CNcdNodeContentInfoProxy::Identifier() const
       
   174     {
       
   175     return *iIdentifier;
       
   176     }
       
   177 
   169 TUid CNcdNodeContentInfoProxy::Uid() const
   178 TUid CNcdNodeContentInfoProxy::Uid() const
   170     {
   179     {
   171     return iUid;
   180     return iUid;
   172     }
   181     }
   173 
   182 
   207     DLINFO(( "Purpose: %u", iPurpose ));
   216     DLINFO(( "Purpose: %u", iPurpose ));
   208     
   217     
   209     InternalizeDesL( iMimeType, aStream );    
   218     InternalizeDesL( iMimeType, aStream );    
   210     DLINFO(( _L("Mime: %S"), iMimeType ));
   219     DLINFO(( _L("Mime: %S"), iMimeType ));
   211     
   220     
   212     iUid.iUid = aStream.ReadInt32L();    
   221     //The Internalization here must be consistant with the externalization in CNcdNodeContentInfo
   213     DLINFO(( "Uid: %x", iUid.iUid ));
   222     if ( iMimeType->Compare( KMimeTypeMatchWidget ) == 0 )
   214     
   223         {
       
   224         //widget
       
   225         InternalizeDesL( iIdentifier, aStream );
       
   226         }
       
   227     else
       
   228         {
       
   229         //sis
       
   230         iUid.iUid = aStream.ReadInt32L();   
       
   231         DLINFO(( "Uid: %x", iUid.iUid )); 
       
   232         }
       
   233    
   215     InternalizeDesL( iVersion, aStream );    
   234     InternalizeDesL( iVersion, aStream );    
   216     DLINFO(( _L("Version: %S"), iVersion ));
   235     DLINFO(( _L("Version: %S"), iVersion ));
   217 
   236 
   218     iSize = aStream.ReadInt32L();
   237     iSize = aStream.ReadInt32L();
   219     DLINFO(( _L("Size: %d"), iSize ));
   238     DLINFO(( _L("Size: %d"), iSize ));