videofeeds/vcnsuiengine/src/vcxnscontentaccess.cpp
changeset 0 96612d01cf9f
equal deleted inserted replaced
-1:000000000000 0:96612d01cf9f
       
     1 /*
       
     2 * Copyright (c) 2008 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 the License "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 
       
    20 #include <mpxmedia.h>
       
    21 #include <mpxmediageneraldefs.h>
       
    22 
       
    23 #include "vcxnscontent.h"
       
    24 #include "vcxnscontentaccess.h"
       
    25 #include "IptvDebug.h"
       
    26 
       
    27 // -----------------------------------------------------------------------------
       
    28 // CVcxNsContentAccess::CVcxNsContentAccess()
       
    29 // -----------------------------------------------------------------------------
       
    30 //
       
    31 CVcxNsContentAccess::CVcxNsContentAccess()
       
    32     {
       
    33     }
       
    34 
       
    35 // -----------------------------------------------------------------------------
       
    36 // CVcxNsContentAccess::Newl
       
    37 // -----------------------------------------------------------------------------
       
    38 //
       
    39 CVcxNsContentAccess* CVcxNsContentAccess::NewL()
       
    40     { 
       
    41     return new (ELeave) CVcxNsContentAccess; 
       
    42     }
       
    43 // -----------------------------------------------------------------------------
       
    44 // CVcxNsContentAccess::~CVcxNsContentAccess()
       
    45 // -----------------------------------------------------------------------------
       
    46 //
       
    47 CVcxNsContentAccess::~CVcxNsContentAccess( )
       
    48     {
       
    49     delete iUrl;
       
    50     delete iMpxMedia;
       
    51     }
       
    52 
       
    53 // -----------------------------------------------------------------------------
       
    54 // CVcxNsContentAccess::SetUrlL()
       
    55 // -----------------------------------------------------------------------------
       
    56 //
       
    57 void CVcxNsContentAccess::SetUrlL(  const TDesC& aUrl )
       
    58     {
       
    59     delete iUrl;
       
    60     iUrl = NULL;
       
    61     
       
    62     if( aUrl.Length() > 0 )
       
    63         {
       
    64         iUrl = aUrl.AllocL();
       
    65         } 
       
    66     }
       
    67 
       
    68 // -----------------------------------------------------------------------------
       
    69 // CVcxNsContentAccess::GetUrl()
       
    70 // -----------------------------------------------------------------------------
       
    71 //
       
    72 const TDesC& CVcxNsContentAccess::GetUrl()
       
    73     {
       
    74     if( iUrl && iUrl->Length() > 0 )
       
    75         {
       
    76         return *iUrl;
       
    77         }
       
    78     
       
    79     return KNullDesC;
       
    80     }
       
    81 
       
    82 // -----------------------------------------------------------------------------
       
    83 // CVcxNsContentAccess::SetMpxMediaL()
       
    84 // -----------------------------------------------------------------------------
       
    85 //
       
    86 void CVcxNsContentAccess::SetMpxMediaL( CMPXMedia* aMpxMedia )
       
    87     {
       
    88     delete iMpxMedia;
       
    89     iMpxMedia = NULL;
       
    90 
       
    91     if( aMpxMedia )
       
    92         {
       
    93         iMpxMedia = CMPXMedia::NewL( *aMpxMedia );
       
    94         }
       
    95     }
       
    96 
       
    97 // -----------------------------------------------------------------------------
       
    98 // CVcxNsContentAccess::GetMpxMedia()
       
    99 // -----------------------------------------------------------------------------
       
   100 //
       
   101 CMPXMedia* CVcxNsContentAccess::GetMpxMedia()
       
   102     {
       
   103     return iMpxMedia;
       
   104     }