ncdengine/provider/protocol/src/ncd_pp_datablockimpl.cpp
changeset 0 ba25891c3a9e
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     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:  
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "ncdprotocolutils.h"
       
    20 #include "ncd_pp_datablockimpl.h"
       
    21 #include "catalogsdebug.h"
       
    22 
       
    23 CNcdPreminetProtocolDataBlockImpl* 
       
    24 CNcdPreminetProtocolDataBlockImpl::NewL() 
       
    25     {
       
    26     CNcdPreminetProtocolDataBlockImpl* self =
       
    27         new (ELeave) CNcdPreminetProtocolDataBlockImpl;
       
    28     CleanupStack::PushL( self );
       
    29     self->ConstructL();
       
    30     CleanupStack::Pop( self );
       
    31     return self;
       
    32     }
       
    33     
       
    34 CNcdPreminetProtocolDataBlockImpl* 
       
    35 CNcdPreminetProtocolDataBlockImpl::NewLC() 
       
    36     {
       
    37     CNcdPreminetProtocolDataBlockImpl* self =
       
    38         new (ELeave) CNcdPreminetProtocolDataBlockImpl;
       
    39     CleanupStack::PushL( self );
       
    40     self->ConstructL();
       
    41     return self;
       
    42     }
       
    43 
       
    44 void CNcdPreminetProtocolDataBlockImpl::ConstructL()
       
    45     {
       
    46     NcdProtocolUtils::AssignEmptyDesL( iId );
       
    47     NcdProtocolUtils::AssignEmptyDesL( iNameSpace );
       
    48     }
       
    49 
       
    50 CNcdPreminetProtocolDataBlockImpl::~CNcdPreminetProtocolDataBlockImpl()
       
    51     {
       
    52     delete iId;
       
    53     iId = 0;
       
    54     
       
    55     delete iNameSpace;
       
    56     iNameSpace = 0;
       
    57     
       
    58     delete iContent;
       
    59     iContent = 0;
       
    60     }
       
    61 
       
    62 const TDesC& CNcdPreminetProtocolDataBlockImpl::Id() const
       
    63     {
       
    64     return *iId;
       
    65     }
       
    66 
       
    67 const TDesC& CNcdPreminetProtocolDataBlockImpl::NameSpace() const
       
    68     {
       
    69     return *iNameSpace;
       
    70     }
       
    71 
       
    72 const TDesC8& CNcdPreminetProtocolDataBlockImpl::Content() const
       
    73     {
       
    74     return *iContent;
       
    75     }
       
    76