upnpavcontroller/upnpavcontrollerserver/src/upnpdevicediscoverymessage.cpp
author Sampo Huttunen <sampo.huttunen@nokia.com>
Wed, 03 Nov 2010 11:45:09 +0200
branchIOP_Improvements
changeset 40 08b5eae9f9ff
parent 0 7f85d04be362
permissions -rw-r--r--
merge from Nokia's internal development branch

/*
* Copyright (c) 2008 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:      Device message class
*
*/






// include files
#include <e32base.h>

// avcontroller internal
#include "upnpdevicediscoverymessage.h"
#include "upnpavdevice.h"

// --------------------------------------------------------------------------
// CUpnpDeviceDiscoveryMessage::CUpnpDeviceDiscoveryMessage
// constructor
// --------------------------------------------------------------------------
CUpnpDeviceDiscoveryMessage::CUpnpDeviceDiscoveryMessage()
    {
    // none implement
    }

// --------------------------------------------------------------------------
// CUpnpDeviceDiscoveryMessage::NewL
// Two-phased constructor.
// --------------------------------------------------------------------------
CUpnpDeviceDiscoveryMessage* CUpnpDeviceDiscoveryMessage::NewL(
        const CUpnpAVDevice* aDevice, TAVControllerDeviceDiscovery aType )
    {
    CUpnpDeviceDiscoveryMessage* self = NewLC( aDevice, aType );
    CleanupStack::Pop( self );
    return self;
    }

// --------------------------------------------------------------------------
// CUpnpDeviceDiscoveryMessage::NewLC
// Two-phased constructor.
// --------------------------------------------------------------------------
CUpnpDeviceDiscoveryMessage* CUpnpDeviceDiscoveryMessage::NewLC( 
        const CUpnpAVDevice* aDevice, TAVControllerDeviceDiscovery aType )
    {
    CUpnpDeviceDiscoveryMessage* self = new( ELeave )
            CUpnpDeviceDiscoveryMessage;    
    CleanupStack::PushL( self );
    self->iUpnpAVDevice = ( CUpnpAVDevice* )aDevice;
    self->iMsgType = aType;
    return self;
    }
    
// --------------------------------------------------------------------------
// CUpnpDeviceDiscoveryMessage::~CUpnpDeviceDiscoveryMessage
// Destructor
// --------------------------------------------------------------------------
CUpnpDeviceDiscoveryMessage::~CUpnpDeviceDiscoveryMessage()
    {
    delete iUpnpAVDevice;
    }

// --------------------------------------------------------------------------
// CUpnpDeviceDiscoveryMessage::LinkOffset
// See upnpdevicediscoverymessage.h
// --------------------------------------------------------------------------
TInt CUpnpDeviceDiscoveryMessage::LinkOffset()
    {
    return _FOFF( CUpnpDeviceDiscoveryMessage, iSlink );
    }

// --------------------------------------------------------------------------
// CUpnpDeviceDiscoveryMessage::Device
// See upnpdevicediscoverymessage.h
// --------------------------------------------------------------------------
CUpnpAVDevice* CUpnpDeviceDiscoveryMessage::Device()
    {
    return iUpnpAVDevice;
    }

// --------------------------------------------------------------------------
// CUpnpDeviceDiscoveryMessage::MsgType
// See upnpdevicediscoverymessage.h
// --------------------------------------------------------------------------
TAVControllerDeviceDiscovery& CUpnpDeviceDiscoveryMessage::MsgType()
    {
    return iMsgType;
    }