upnpmediaserver/avobjects/src/upnpcontainerlist.cpp
changeset 0 7f85d04be362
equal deleted inserted replaced
-1:000000000000 0:7f85d04be362
       
     1 /** @file
       
     2 * Copyright (c) 2005-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:  UPnP container class implementation
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include    <e32base.h>
       
    21 #include	"upnpobject.h"
       
    22 #include    "upnpcontainerlist.h"
       
    23 
       
    24 
       
    25 
       
    26 
       
    27 
       
    28 
       
    29 
       
    30 // ============================ MEMBER FUNCTIONS ===============================
       
    31 
       
    32 // ============================ MEMBER FUNCTIONS ===============================
       
    33 
       
    34 // -----------------------------------------------------------------------------
       
    35 // CUpnpContainerList::CUpnpContainerList
       
    36 // C++ default constructor can NOT contain any code, that
       
    37 // might leave.
       
    38 // -----------------------------------------------------------------------------
       
    39 //
       
    40 CUpnpContainerList::CUpnpContainerList()
       
    41     {
       
    42     }
       
    43 
       
    44 // -----------------------------------------------------------------------------
       
    45 // CUpnpContainerList::ConstructL
       
    46 // Symbian 2nd phase constructor can leave.
       
    47 // -----------------------------------------------------------------------------
       
    48 //
       
    49 void CUpnpContainerList::ConstructL( )
       
    50     {
       
    51     CUpnpObjectList::ConstructL();
       
    52     }
       
    53     
       
    54 // -----------------------------------------------------------------------------
       
    55 // CUpnpContainerList::NewL
       
    56 // Two-phased constructor.
       
    57 // -----------------------------------------------------------------------------
       
    58 //
       
    59 EXPORT_C CUpnpContainerList* CUpnpContainerList::NewL()
       
    60     {
       
    61     CUpnpContainerList* self = NewLC();
       
    62     CleanupStack::Pop(self);
       
    63 
       
    64     return self;
       
    65     }
       
    66 // -----------------------------------------------------------------------------
       
    67 // CUpnpContainerList::NewL
       
    68 // Two-phased constructor.
       
    69 // -----------------------------------------------------------------------------
       
    70 //
       
    71 EXPORT_C CUpnpContainerList* CUpnpContainerList::NewLC()
       
    72     {
       
    73     CUpnpContainerList* self = new( ELeave ) CUpnpContainerList;
       
    74 
       
    75     CleanupStack::PushL( self );
       
    76     self->ConstructL(  );
       
    77 
       
    78     return self;
       
    79     }
       
    80       
       
    81 // -----------------------------------------------------------------------------
       
    82 // CUpnpItemList::~CUpnpContainerList
       
    83 // -----------------------------------------------------------------------------
       
    84 //
       
    85 CUpnpContainerList::~CUpnpContainerList()
       
    86     {
       
    87     }
       
    88 // -----------------------------------------------------------------------------
       
    89 // CUpnpContainerList::AppendObjectL
       
    90 // -----------------------------------------------------------------------------
       
    91 //
       
    92 EXPORT_C void CUpnpContainerList::AppendObjectL( CUpnpObject& aNewObject )
       
    93     {
       
    94     // leave if not an item
       
    95     if(aNewObject.ObjectType() != EUPnPContainer)
       
    96         {
       
    97         User::Leave(KErrArgument);
       
    98         }
       
    99 
       
   100     CUpnpObjectList::AppendObjectL(aNewObject);
       
   101     }
       
   102 
       
   103 //  End of File