upnpavcontroller/upnpavcontrollerhelper/src/upnpresourceselector.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) 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:      Interface for selecting a resource within an item
*
*/






// INCLUDE FILES
// dlnasrv / mediaserver api
#include <upnpitem.h>
#include <upnpelement.h>

// dlnasrv / avcontroller helper api
#include "upnpitemutility.h" // ResourceFromItemL, GetResElements
#include "upnpconstantdefs.h" // KElementRes
#include "upnpresourceselector.h"






// ==========================================================================
// METHODS for TUPnPSelectDefaultResource
// ==========================================================================

// --------------------------------------------------------------------------
// TUPnPSelectDefaultResource::SelectResourceL
// this algorithm works BEST
//---------------------------------------------------------------------------
EXPORT_C const CUpnpElement& TUPnPSelectDefaultResource::
    SelectResourceL(
    const CUpnpItem& aItem )
    {
    return UPnPItemUtility::ResourceFromItemL( aItem );
    }


// ==========================================================================
// METHODS for TUPnPSelectFirstResource
// ==========================================================================

// --------------------------------------------------------------------------
// TUPnPSelectFirstResource::SelectResourceL
// this algorithm works FAST
//---------------------------------------------------------------------------
EXPORT_C const CUpnpElement& TUPnPSelectFirstResource::
    SelectResourceL(
    const CUpnpItem& aItem )
    {
    return UPnPItemUtility::FindElementByNameL( aItem, KElementRes );
    }