upnpsharing/upnpcontentserver/src/upnpsharingrequest.cpp
author Sampo Huttunen <sampo.huttunen@nokia.com>
Wed, 24 Nov 2010 09:39:46 +0200
branchIOP_Improvements
changeset 45 a6c41ca11adf
parent 38 5360b7ddc251
permissions -rw-r--r--
Updated the SIS package, there was some BC issue with the earlier version. Also updated the platform UID to S^3 version.

/*
* 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:      CUpnpSharingRequest class implementation
*
*/

// INCLUDE FILES
#include "upnpsharingrequest.h"
#include "upnpcontentserverdefs.h"


using namespace UpnpContentServer;

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

// --------------------------------------------------------------------------
// CUpnpSharingRequest::CUpnpSharingRequest
// C++ default constructor can NOT contain any code, that
// might leave.
// --------------------------------------------------------------------------
//

CUpnpSharingRequest::CUpnpSharingRequest( 
    TUpnpMediaType aMediaType, 
    TInt aSharingType ) :
    iMediaType( aMediaType ),
    iSharingType( aSharingType )
    {
    // empty
    }

// --------------------------------------------------------------------------
// CUpnpSharingRequest::NewL
// Two-phased constructor.
// --------------------------------------------------------------------------
//
CUpnpSharingRequest* CUpnpSharingRequest::NewL( 
    TUpnpMediaType aMediaType, 
    TInt aSharingType )
    {
    CUpnpSharingRequest* self = 
        new (ELeave) CUpnpSharingRequest( aMediaType, aSharingType );
    CleanupStack::PushL( self );
    self->ConstructL();
    CleanupStack::Pop( self );
    return self;
    }

// --------------------------------------------------------------------------
// CUpnpSharingRequest::SetSharingRequestInfoL
// Sets sharing request information arrays
// --------------------------------------------------------------------------
// 
void CUpnpSharingRequest::SetSharingRequestInfo( 
    RArray<TFileName>* aShareArr,
    RArray<TFileName>* aUnshareArr,
    CDesCArray* aClfIds )
    {
    // take ownership of the arrays
    iShareArr = aShareArr;
    iUnshareArr = aUnshareArr;
    iClfIds = aClfIds;
    }

// --------------------------------------------------------------------------
// CUpnpSharingRequest::~CUpnpSharingRequest
// Destructor
// --------------------------------------------------------------------------
// 
CUpnpSharingRequest::~CUpnpSharingRequest()
    {
    // Destructor
    if ( iShareArr )
        {
        iShareArr->Close();
        delete iShareArr;
        }
    if ( iUnshareArr )
        {
        iUnshareArr->Close();
        delete iUnshareArr;
        }
    if ( iClfIds )
        {
        delete iClfIds;
        }
    }


//  End of File