videofeeds/clientapi/src/TIptvVodDlDownloadId.cpp
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Mon, 18 Jan 2010 20:21:12 +0200
changeset 0 96612d01cf9f
permissions -rw-r--r--
Revision: 201001 Kit: 201003

/*
* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "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:    Encapsulates data which identifies VOD download.*
*/





// INCLUDE FILES
#include "TIptvVodDlDownloadId.h"

// ============================= LOCAL FUNCTIONS ===============================

// ============================ MEMBER FUNCTIONS ===============================

// -----------------------------------------------------------------------------
// TIptvVodDlDownloadId::InternalizeL
// -----------------------------------------------------------------------------
//
EXPORT_C void TIptvVodDlDownloadId::InternalizeL(RReadStream& aStream)
    {
    iServiceIdAndContentIdAreValid = static_cast<TBool>(aStream.ReadUint8L());
    iServiceId                     = aStream.ReadUint32L();
    iContentId                     = aStream.ReadUint32L();
    iFileIdAndDriveAreValid        = static_cast<TBool>(aStream.ReadUint8L());
    iFileId                        = aStream.ReadUint32L();
    iDrive                         = aStream.ReadUint32L();
    }

// -----------------------------------------------------------------------------
// TIptvVodDlDownloadId::ExternalizeL
// -----------------------------------------------------------------------------
//
EXPORT_C void TIptvVodDlDownloadId::ExternalizeL(RWriteStream& aStream)
    {
    aStream.WriteUint8L(static_cast<TUint8>(iServiceIdAndContentIdAreValid));
    aStream.WriteUint32L(iServiceId);
    aStream.WriteUint32L(iContentId);
    aStream.WriteUint8L(static_cast<TUint8>(iFileIdAndDriveAreValid));
    aStream.WriteUint32L(iFileId);
    aStream.WriteUint32L(iDrive);
    }

// -----------------------------------------------------------------------------
// TIptvVodDlDownloadId::CountExternalizeSize
// -----------------------------------------------------------------------------
//
EXPORT_C TUint32 TIptvVodDlDownloadId::CountExternalizeSize()
    {
    const TInt KExternalizeSize = 1+4+4+1+4+4;
    return KExternalizeSize; 
    }

// -----------------------------------------------------------------------------
// TIptvVodDlDownloadId::Set
// -----------------------------------------------------------------------------
//
EXPORT_C void TIptvVodDlDownloadId::Set(TIptvVodDlDownloadId& aDownloadId)
    {
    iServiceIdAndContentIdAreValid = aDownloadId.iServiceIdAndContentIdAreValid;
    iServiceId                     = aDownloadId.iServiceId;
    iContentId                     = aDownloadId.iContentId;
    iFileIdAndDriveAreValid        = aDownloadId.iFileIdAndDriveAreValid;
    iFileId                        = aDownloadId.iFileId;
    iDrive                         = aDownloadId.iDrive;    
    }

// ========================== OTHER EXPORTED FUNCTIONS =========================

//  End of File