diff -r 3785f754ee62 -r 5360b7ddc251 upnpavcontroller/upnpavcontrollerserver/inc/upnpdevicerepository.h --- a/upnpavcontroller/upnpavcontrollerserver/inc/upnpdevicerepository.h Fri Sep 17 08:31:21 2010 +0300 +++ b/upnpavcontroller/upnpavcontrollerserver/inc/upnpdevicerepository.h Mon Nov 01 12:37:49 2010 +0200 @@ -1,158 +1,165 @@ -/* -* Copyright (c) 2005-2006 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: a list of devices with extended information -* -*/ - - - - - - -#ifndef C_UPNPDEVICEREPOSITORY_H_ -#define C_UPNPDEVICEREPOSITORY_H_ - -// Include files -#include - -// FORWARD DECLARATIONS -class CUpnpAVDevice; -class CUpnpAVDeviceExtended; -class CUpnpDevice; -class CUpnpAVControlPoint; - -/** - * UPnP Device Repository. Stores UPnP devices with additional (protocolinfo) - * information. - */ -class CUPnPDeviceRepository: public CBase - { - -public: - - /** - * Static 1st phase constructor - * - * @param aControlPoint AV Control Point instance - * @return new instance - */ - static CUPnPDeviceRepository* NewL - ( - CUpnpAVControlPoint& aControlPoint - ); - - /** - * Destructor - */ - virtual ~CUPnPDeviceRepository(); - -private: - - /** - * Private constructor - */ - CUPnPDeviceRepository - ( - CUpnpAVControlPoint& aControlPoint - ); - - /** - * 2nd phase constructor - */ - void ConstructL(); - -public: // New functions - - /** - * Adds a new device to repository - * - * @param aDevice UPnP Device - */ - void AddDeviceL( CUpnpDevice& aDevice ); - - /** - * Adds protoconinfo to a device - * - * @param aUuid device uuid - * @param aSource source protocolinfo - * @param aSink sink protocolinfo - * @return UPnP device with protocolinfo - */ - CUpnpAVDeviceExtended& AddProtocolInfoL( const TDesC8& aUuid, - const TDesC8& aSource, const TDesC8& aSink ); - - /** - * Removes a device from repository - * - * @param aUuid device Uuid - */ - void Remove( const TDesC8& aUuid ); - - /** - * Finds and return a device - * - * @param aUuid device Uuid - * @return device reference - */ - CUpnpAVDeviceExtended& FindDeviceL( const TDesC8& aUuid ); - - /** - * Return a list of devices - * - * @return list of device - */ - const RPointerArray& DeviceList() const; - - /** - * Subscibe device for events (sends subscribe action) - * - * @param aUuid device Uuid - */ - void SubscribeDeviceL( const TDesC8& aUuid ); - - /** - * Unsubscibe device for events (sends unsubscribe action) - * - * @param aUuid device Uuid - */ - void UnSubscribeDeviceL( const TDesC8& aUuid ); - - void ConnectionLost(); - - TBool IsWlanActive(); - -private: - - /** - * Parses devices services (goes through actions and determines what's - * supported. - * - * @param aSource source device - * @param aTarget target device - */ - void ParseDeviceServicesL( CUpnpDevice& aSource, - CUpnpAVDeviceExtended& aTarget ); - - -private: - - CUpnpAVControlPoint& iControlPoint; // Not own - - RPointerArray iDevices; // Own - - TBool iIsWlanActive; - }; - - +/* +* Copyright (c) 2005-2006 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: a list of devices with extended information +* +*/ + + + + + + +#ifndef C_UPNPDEVICEREPOSITORY_H_ +#define C_UPNPDEVICEREPOSITORY_H_ + +// Include files +#include + +// FORWARD DECLARATIONS +class CUpnpAVDevice; +class CUpnpAVDeviceExtended; +class CUpnpDevice; +class CUpnpAVControlPoint; +class CUpnpStateVariable; + +/** + * UPnP Device Repository. Stores UPnP devices with additional (protocolinfo) + * information. + */ +class CUPnPDeviceRepository: public CBase + { + +public: + + /** + * Static 1st phase constructor + * + * @param aControlPoint AV Control Point instance + * @return new instance + */ + static CUPnPDeviceRepository* NewL + ( + CUpnpAVControlPoint& aControlPoint + ); + + /** + * Destructor + */ + virtual ~CUPnPDeviceRepository(); + +private: + + /** + * Private constructor + */ + CUPnPDeviceRepository + ( + CUpnpAVControlPoint& aControlPoint + ); + + /** + * 2nd phase constructor + */ + void ConstructL(); + +public: // New functions + + /** + * Adds a new device to repository + * + * @param aDevice UPnP Device + */ + CUpnpAVDeviceExtended& AddDeviceL( CUpnpDevice& aDevice ); + + /** + * Adds protoconinfo to a device + * + * @param aUuid device uuid + * @param aSource source protocolinfo + * @param aSink sink protocolinfo + * @return UPnP device with protocolinfo + */ + CUpnpAVDeviceExtended& AddProtocolInfoL( const TDesC8& aUuid, + const TDesC8& aSource, const TDesC8& aSink ); + + /** + * Removes a device from repository + * + * @param aUuid device Uuid + */ + void Remove( const TDesC8& aUuid ); + + /** + * Finds and return a device + * + * @param aUuid device Uuid + * @return device reference + */ + CUpnpAVDeviceExtended& FindDeviceL( const TDesC8& aUuid ); + + /** + * Return a list of devices + * + * @return list of device + */ + const RPointerArray& DeviceList() const; + + /** + * Subscibe device for events (sends subscribe action) + * + * @param aUuid device Uuid + */ + void SubscribeDeviceL( const TDesC8& aUuid ); + + /** + * Unsubscibe device for events (sends unsubscribe action) + * + * @param aUuid device Uuid + */ + void UnSubscribeDeviceL( const TDesC8& aUuid ); + + void ConnectionLost(); + + TBool IsWlanActive(); + +private: + + /** + * Parses devices services (goes through actions and determines what's + * supported. + * + * @param aSource source device + * @param aTarget target device + */ + void ParseDeviceServicesL( CUpnpDevice& aSource, + CUpnpAVDeviceExtended& aTarget ); + + void SetMaxVolume(CUpnpStateVariable* aVolumeState, CUpnpAVDeviceExtended& aTarget); + + void SetSeekCapabilityL(CUpnpStateVariable* seekModeStateVariable, + CUpnpAVDeviceExtended& aTarget); + + void SelectDeviceIconL( CUpnpDevice& aSource, CUpnpAVDeviceExtended& aTarget ); + +private: + + CUpnpAVControlPoint& iControlPoint; // Not own + + RPointerArray iDevices; // Own + + TBool iIsWlanActive; + }; + + #endif // C_UPNPDEVICEREPOSITORY_H_ \ No newline at end of file