diff -r 608f67c22514 -r 896e9dbc5f19 internetradio2.0/datastructuressrc/irbrowsechannelitems.cpp --- a/internetradio2.0/datastructuressrc/irbrowsechannelitems.cpp Tue Jul 06 14:07:20 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,357 +0,0 @@ -/* -* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: ?Description -* -*/ - - -#include - -#include "irbrowsechannelitems.h" -#include "irdebug.h" - -// ======== LOCAL FUNCTIONS ======== - -// ======== MEMBER FUNCTIONS ======== - -// --------------------------------------------------------------------------- -//CIRBrowseChannelItems::NewLC() -//Static function -//standard two phased constructor -// --------------------------------------------------------------------------- -// -EXPORT_C CIRBrowseChannelItems* CIRBrowseChannelItems::NewLC() - { - IRLOG_DEBUG( "CIRBrowseChannelItems::NewLC - Entering" ); - CIRBrowseChannelItems* self = new (ELeave) CIRBrowseChannelItems; - CleanupStack::PushL(self); - self->ConstructL(); - IRLOG_DEBUG( "CIRBrowseChannelItems::NewLC - Exiting." ); - return self; - } - - -// --------------------------------------------------------------------------- -//CIRBrowseChannelItems::NewL() -//Static function -//standard two phased constructor -// --------------------------------------------------------------------------- -// -EXPORT_C CIRBrowseChannelItems* CIRBrowseChannelItems::NewL() - { - IRLOG_DEBUG( "CIRBrowseChannelItems::NewL - Entering" ); - CIRBrowseChannelItems* self = CIRBrowseChannelItems::NewLC(); - CleanupStack::Pop(self); - IRLOG_DEBUG( "CIRBrowseChannelItems::NewL - Exiting." ); - return self; - } - - -// --------------------------------------------------------------------------- -//CIRBrowseChannelItems::ConstructL() -//standard two phased constructor -// --------------------------------------------------------------------------- -// - void CIRBrowseChannelItems::ConstructL() const - { - IRLOG_DEBUG( "CIRBrowseChannelItems::ConstructL" ); - return; - } - - -// --------------------------------------------------------------------------- -//CIRBrowseChannelItems::~CIRBrowseChannelItems() -//standard C++ destructor -// --------------------------------------------------------------------------- -// - CIRBrowseChannelItems::~CIRBrowseChannelItems() - { - IRLOG_DEBUG( "CIRBrowseChannelItems::~CIRBrowseChannelItems - Entering" ); - delete iChannelName; - iChannelName=NULL; - delete iChannelGetOperation; - iChannelGetOperation=NULL; - delete iShortDescription; - iShortDescription=NULL; - iImgUrl.Close(); - - delete iBannerUrl; - iBannerUrl=NULL; - delete iClickThroughUrl; - iClickThroughUrl=NULL; - - IRLOG_DEBUG( "CIRBrowseChannelItems::~CIRBrowseChannelItems - Exiting." ); - } - - -// --------------------------------------------------------------------------- -//CIRBrowseChannelItems::SetTextL() -//Set data namely channelname,channelid,description -// --------------------------------------------------------------------------- -// -EXPORT_C void CIRBrowseChannelItems::SetTextL(const TDesC& aChannelName, - const TDesC& aChannelId,const TDesC& aDescription) - { - IRLOG_DEBUG( "CIRBrowseChannelItems::SetTextL - Entering" ); - iChannelName = aChannelName.Alloc(); - iShortDescription=aDescription.Alloc(); - TLex var(aChannelId); - var.Val(iChannelID); - IRLOG_DEBUG( "CIRBrowseChannelItems::SetTextL - Exiting." ); - } - - -// --------------------------------------------------------------------------- -//CIRBrowseChannelItems::SetGetOperationL() -//Set data get methord -// --------------------------------------------------------------------------- -// -EXPORT_C void CIRBrowseChannelItems::SetGetOperationL( - const TDesC& aChannelGetOperation) - { - IRLOG_DEBUG( "CIRBrowseChannelItems::SetGetOperationL - Entering" ); - iChannelGetOperation = aChannelGetOperation.Alloc(); - IRLOG_DEBUG( "CIRBrowseChannelItems::SetGetOperationL - Exiting." ); - } - - -// --------------------------------------------------------------------------- -//CIRBrowseChannelItems::SetSize() -//Set data size of data -// --------------------------------------------------------------------------- -// -EXPORT_C void CIRBrowseChannelItems::SetSize(const TDesC& aSize) - { - IRLOG_DEBUG( "CIRBrowseChannelItems::SetSize - Entering" ); - TLex var(aSize); - var.Val(iSize); - IRLOG_DEBUG( "CIRBrowseChannelItems::SetSize - Exiting." ); - } - - -// --------------------------------------------------------------------------- -//CIRBrowseChannelItems::SetImageUrl() -//Set the url for the iImgUrl -// --------------------------------------------------------------------------- -// -EXPORT_C void CIRBrowseChannelItems::SetImageUrl(const TDesC& aImgUrl) - { - IRLOG_DEBUG( "CIRBrowseChannelItems::SetImageUrl - Entering" ); - iImgUrl.Create(aImgUrl.Length()); - iImgUrl.Copy(aImgUrl); - IRLOG_DEBUG( "CIRBrowseChannelItems::SetImageUrl - Exiting." ); - } - - -// --------------------------------------------------------------------------- -//CIRBrowseChannelItems::ExternalizeL() -//Externalizes data into persistent storage -// --------------------------------------------------------------------------- -// -EXPORT_C void CIRBrowseChannelItems::ExternalizeL(RWriteStream& aStream) const - { - IRLOG_DEBUG( "CIRBrowseChannelItems::ExternalizeL - Entering" ); - if (iChannelName ) - { - aStream.WriteInt32L(iChannelName->Des().MaxLength()); - aStream << *iChannelName; - } - else - { - aStream.WriteInt32L(0); - } - if((iShortDescription) && (iShortDescription->Des().MaxLength() != 0)) - { - TInt a = iShortDescription->Des().MaxLength(); - aStream.WriteInt32L(iShortDescription->Des().MaxLength()); - aStream << *iShortDescription; - } - else - { - aStream.WriteInt32L(0); - } - if(iChannelGetOperation) - { - aStream.WriteInt32L(iChannelGetOperation->Des().MaxLength()); - aStream << *iChannelGetOperation; - } - else - { - aStream.WriteInt32L(0); - } - aStream.WriteInt32L(iBitrate1); - aStream.WriteInt32L(iBitrate2); - aStream.WriteInt32L(iBitrate3); - aStream.WriteUint32L(iChannelID); - if(iBannerUrl) - { - aStream.WriteInt32L(iBannerUrl->Des().MaxLength()); - aStream <<*iBannerUrl; - } - else - { - aStream.WriteInt32L(0); - } - - if(iClickThroughUrl) - { - aStream.WriteInt32L(iClickThroughUrl->Des().MaxLength()); - aStream <<*iClickThroughUrl; - } - else - { - aStream.WriteInt32L(0); - } - - if(iImgUrl.Length() != 0) - { - aStream.WriteInt32L(iImgUrl.MaxLength()); - aStream <