upnpavcontroller/upnpavcontrollerserver/src/upnpavcontrollerimpl.cpp
author samhuttu
Mon, 01 Nov 2010 12:37:49 +0200
branchnew development branch with rendering state machine and other goodies
changeset 38 5360b7ddc251
parent 32 3785f754ee62
permissions -rw-r--r--
New development branch with e.g. rendering state machine and a simple Qt example application using it.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
38
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
     1
/*
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
     2
* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
     3
* All rights reserved.
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
     4
* This component and the accompanying materials are made available
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
     6
* which accompanies this distribution, and is available
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
     8
*
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
     9
* Initial Contributors:
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    10
* Nokia Corporation - initial contribution.
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    11
*
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    12
* Contributors:
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    13
*
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    14
* Description:      AVController server side root class
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    15
*
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    16
*/
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    17
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    18
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    19
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    20
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    21
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    22
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    23
// INCLUDE FILES
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    24
// upnp stack api
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    25
#include <upnpaction.h>
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    26
#include <upnpdevice.h>
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    27
#include <upnpservice.h>
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    28
#include <upnpstatevariable.h>
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    29
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    30
// dlnasrv / mediaserver api
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    31
#include <upnpcontainer.h>
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    32
#include <upnpobjectlist.h>
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    33
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    34
// dlnasrv / avcontroller api
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    35
#include "upnpavdeviceobserver.h"
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    36
#include "upnpavdevicelist.h"
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    37
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    38
// dlnasrv / avcontroller internal
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    39
#include "upnpavcontrollerimpl.h"
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    40
#include "upnpavcontrollerserver.h"
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    41
#include "upnpavdispatcher.h"
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    42
#include "upnpavdeviceextended.h"
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    43
#include "upnpdevicerepository.h"
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    44
#include "upnpaverrorhandler.h"
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    45
#include "upnpplaybacksession.h"
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    46
#include "upnpbrowsingsession.h"
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    47
#include "upnpdevicediscoverymessage.h"
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    48
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    49
#include "upnpuploadsession.h"
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    50
#include "upnpdownloadsession.h"
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    51
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    52
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    53
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    54
#include "upnpsecaccesscontroller.h"
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    55
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    56
_LIT( KComponentLogfile, "upnpavcontrollerserver.txt");
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    57
#include "upnplog.h"
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    58
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    59
// ======== MEMBER FUNCTIONS ========
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    60
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    61
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    62
// CUPnPAVControllerImpl::NewL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    63
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    64
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    65
CUPnPAVControllerImpl* CUPnPAVControllerImpl::NewL(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    66
    CUpnpAVControllerServer& aServer )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    67
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    68
    CUPnPAVControllerImpl* self = new (ELeave) CUPnPAVControllerImpl( 
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    69
        aServer );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    70
    CleanupStack::PushL( self );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    71
    self->ConstructL();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    72
    CleanupStack::Pop( self );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    73
    return self;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    74
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    75
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    76
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    77
// CUPnPAVControllerImpl::CUPnPAVControllerImpl
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    78
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    79
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    80
CUPnPAVControllerImpl::CUPnPAVControllerImpl(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    81
    CUpnpAVControllerServer& aServer ) :
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    82
    iServer( aServer ),
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    83
    iDeviceDiscoveryEnabled( EFalse),
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    84
    iDeviceMsgQue( CUpnpDeviceDiscoveryMessage::LinkOffset() ),
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    85
    iDeviceMsgQueIter( iDeviceMsgQue )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    86
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    87
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    88
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    89
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    90
// CUPnPAVControllerImpl::~CUPnPAVControllerImpl
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    91
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    92
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    93
CUPnPAVControllerImpl::~CUPnPAVControllerImpl()
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    94
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    95
    __LOG( "CUPnPAVControllerImpl::~CUPnPAVControllerImpl" );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    96
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    97
    delete iDeviceRespBuf;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    98
    delete iDeviceListRespBuf;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
    99
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   100
    iPlaybackSessions.ResetAndDestroy();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   101
    iBrowsingSessions.ResetAndDestroy();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   102
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   103
    iUploadSessions.ResetAndDestroy();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   104
    iDownloadSessions.ResetAndDestroy();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   105
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   106
    CUpnpDeviceDiscoveryMessage* devMsg = NULL;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   107
    iDeviceMsgQueIter.SetToFirst(); 
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   108
    while ( ( devMsg = iDeviceMsgQueIter++ ) != NULL )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   109
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   110
        iDeviceMsgQue.Remove( *devMsg );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   111
        delete devMsg;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   112
        };    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   113
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   114
    delete iConnectionMsg;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   115
    delete iDeviceDiscoveryMsg;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   116
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   117
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   118
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   119
// CUPnPAVControllerImpl::ConstructL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   120
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   121
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   122
void CUPnPAVControllerImpl::ConstructL()
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   123
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   124
    __LOG( "CUPnPAVControllerImpl::ConstructL" );    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   125
       
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   126
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   127
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   128
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   129
// CUPnPAVControllerImpl::ConnectionLost
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   130
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   131
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   132
void CUPnPAVControllerImpl::ConnectionLost()
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   133
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   134
    if( iConnectionMsg )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   135
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   136
        iConnectionMsg->Complete( EAVControllerConnectionLost );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   137
        delete iConnectionMsg; iConnectionMsg = NULL;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   138
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   139
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   140
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   141
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   142
// CUPnPAVControllerImpl::DeviceDiscoveredL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   143
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   144
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   145
void CUPnPAVControllerImpl::DeviceDiscoveredL(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   146
    CUpnpAVDeviceExtended& aDevice )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   147
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   148
    __LOG( "CUPnPAVControllerImpl::DeviceDiscoveredL" );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   149
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   150
    if( aDevice.DeviceType() == CUpnpAVDevice::EMediaServer &&
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   151
        ( aDevice.Local() ) )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   152
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   153
        TInt i;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   154
        TInt count = iPlaybackSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   155
        for( i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   156
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   157
            iPlaybackSessions[ i ]->SetLocalMSUuidL( aDevice.Uuid() );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   158
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   159
        
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   160
        count = iBrowsingSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   161
        for( i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   162
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   163
            iBrowsingSessions[ i ]->SetLocalMSUuidL( aDevice.Uuid() );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   164
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   165
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   166
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   167
    else if( iDeviceDiscoveryEnabled )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   168
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   169
        CUpnpAVDevice* tempDev = CUpnpAVDevice::NewL( aDevice ); 
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   170
                             
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   171
        if( iDeviceDiscoveryMsg )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   172
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   173
            CleanupStack::PushL( tempDev );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   174
            
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   175
            delete iDeviceRespBuf; iDeviceRespBuf = NULL;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   176
            iDeviceRespBuf = tempDev->ToDes8L();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   177
            
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   178
            CleanupStack::PopAndDestroy( tempDev );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   179
            
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   180
            // Write back to the client that a device was discovered
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   181
            // of the device and the size
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   182
            TPckgBuf<TAVControllerDeviceDiscovery> resp0( EAVDeviceDiscovered );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   183
            TPckgBuf<TInt> resp1( iDeviceRespBuf->Length() );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   184
            
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   185
            iDeviceDiscoveryMsg->WriteL( 0, resp0 );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   186
            iDeviceDiscoveryMsg->WriteL( 1, resp1 );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   187
            
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   188
            iDeviceDiscoveryMsg->Complete( EAVControllerDeviceCompleted );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   189
            delete iDeviceDiscoveryMsg; iDeviceDiscoveryMsg = NULL;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   190
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   191
        else
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   192
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   193
            // Msg not valid, client is still processing.. 
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   194
            //add the discovered device to queue
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   195
            CUpnpDeviceDiscoveryMessage* tmpDevMsg = 
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   196
                    CUpnpDeviceDiscoveryMessage::NewL( 
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   197
                    tempDev, EAVDeviceDiscovered );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   198
            iDeviceMsgQue.AddLast( *tmpDevMsg );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   199
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   200
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   201
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   202
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   203
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   204
// CUPnPAVControllerImpl::DeviceDisappearedL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   205
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   206
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   207
void CUPnPAVControllerImpl::DeviceDisappearedL(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   208
    CUpnpAVDeviceExtended& aDevice )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   209
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   210
    __LOG( "CUPnPAVControllerImpl::DeviceDisappearedL" );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   211
  
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   212
    // Go through browsing and rendering sessions and report if their
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   213
    // device or the local MS disappeared
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   214
    TBool localMs = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   215
    if( aDevice.DeviceType() == CUpnpAVDevice::EMediaServer &&
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   216
        ( aDevice.Local() ) )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   217
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   218
        __LOG( "CUPnPAVControllerImpl::DeviceDisappearedL\
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   219
        - Local MS disappeared!" );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   220
        
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   221
         // Local MS disappeared
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   222
         localMs = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   223
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   224
        
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   225
    TInt i;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   226
    TInt count = iPlaybackSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   227
    for( i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   228
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   229
        if( ( iPlaybackSessions[ i ]->Uuid() == aDevice.Uuid() ) ||
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   230
            ( localMs ) )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   231
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   232
            iPlaybackSessions[ i ]->DeviceDisappearedL( aDevice );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   233
            }     
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   234
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   235
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   236
    count = iBrowsingSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   237
    for( i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   238
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   239
        if( ( iBrowsingSessions[ i ]->Uuid() == aDevice.Uuid() ) ||
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   240
            ( localMs ) )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   241
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   242
            iBrowsingSessions[ i ]->DeviceDisappearedL( aDevice );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   243
            }     
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   244
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   245
        
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   246
    count = iUploadSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   247
    for( i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   248
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   249
        if( iUploadSessions[ i ]->Uuid() == aDevice.Uuid() )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   250
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   251
            iUploadSessions[ i ]->DeviceDisappearedL( aDevice );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   252
            }     
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   253
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   254
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   255
    count = iDownloadSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   256
    for( i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   257
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   258
        if( iDownloadSessions[ i ]->Uuid() == aDevice.Uuid() )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   259
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   260
            iDownloadSessions[ i ]->DeviceDisappearedL( aDevice );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   261
            }     
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   262
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   263
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   264
    if( iDeviceDiscoveryEnabled )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   265
        {       
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   266
        // Create a device (buffer)
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   267
        CUpnpAVDevice* tempDev = CUpnpAVDevice::NewL( aDevice );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   268
            
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   269
         if( iDeviceDiscoveryMsg )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   270
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   271
            CleanupStack::PushL( tempDev );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   272
                   
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   273
            delete iDeviceRespBuf; iDeviceRespBuf = NULL;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   274
            iDeviceRespBuf = tempDev->ToDes8L();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   275
            CleanupStack::PopAndDestroy( tempDev );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   276
            
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   277
            // Write back to the client that a device was discovered
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   278
            // and the size of the device
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   279
            TPckgBuf<TAVControllerDeviceDiscovery> resp0(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   280
                EAVDeviceDisappeared );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   281
            TPckgBuf<TInt> resp1( iDeviceRespBuf->Length() );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   282
            
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   283
            iDeviceDiscoveryMsg->WriteL( 0, resp0 );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   284
            iDeviceDiscoveryMsg->WriteL( 1, resp1 );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   285
            
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   286
            iDeviceDiscoveryMsg->Complete( EAVControllerDeviceCompleted );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   287
            delete iDeviceDiscoveryMsg; iDeviceDiscoveryMsg = NULL;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   288
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   289
        else
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   290
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   291
            // Msg not valid, client is still processing.. 
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   292
            //add the disappeared device to queue
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   293
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   294
            CUpnpDeviceDiscoveryMessage* tmpDevMsg = 
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   295
                    CUpnpDeviceDiscoveryMessage::NewL( 
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   296
                    tempDev, EAVDeviceDisappeared );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   297
            iDeviceMsgQue.AddLast( *tmpDevMsg );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   298
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   299
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   300
    }    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   301
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   302
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   303
// CUPnPAVControllerImpl::DeviceIconDownloadedL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   304
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   305
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   306
void CUPnPAVControllerImpl::DeviceIconDownloadedL( CUpnpAVDeviceExtended& aDevice )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   307
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   308
    if( iDeviceDiscoveryEnabled )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   309
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   310
        CUpnpAVDevice* tempDev = CUpnpAVDevice::NewL( aDevice );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   311
        if( iDeviceDiscoveryMsg )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   312
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   313
            CleanupStack::PushL( tempDev );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   314
            delete iDeviceRespBuf;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   315
            iDeviceRespBuf = NULL;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   316
            iDeviceRespBuf = tempDev->ToDes8L();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   317
            CleanupStack::PopAndDestroy( tempDev );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   318
            TPckgBuf<TAVControllerDeviceDiscovery> resp0( EAVDeviceIconDownloaded );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   319
            TPckgBuf<TInt> resp1( iDeviceRespBuf->Length() );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   320
            iDeviceDiscoveryMsg->WriteL( 0, resp0 );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   321
            iDeviceDiscoveryMsg->WriteL( 1, resp1 );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   322
            iDeviceDiscoveryMsg->Complete( EAVControllerDeviceCompleted );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   323
            delete iDeviceDiscoveryMsg;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   324
            iDeviceDiscoveryMsg = NULL;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   325
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   326
        else
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   327
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   328
            CUpnpDeviceDiscoveryMessage* tmpDevMsg = CUpnpDeviceDiscoveryMessage::NewL(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   329
                tempDev, EAVDeviceIconDownloaded );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   330
            iDeviceMsgQue.AddLast( *tmpDevMsg );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   331
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   332
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   333
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   334
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   335
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   336
// CUPnPAVControllerImpl::EnableDeviceDiscoveryL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   337
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   338
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   339
void CUPnPAVControllerImpl::EnableDeviceDiscoveryL(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   340
    const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   341
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   342
    __LOG( "CUPnPAVControllerImpl::EnableDeviceDiscoveryL" );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   343
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   344
    __ASSERT( !iDeviceDiscoveryMsg, __FILE__, __LINE__ );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   345
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   346
    if( !iDeviceDiscoveryEnabled )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   347
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   348
        //iDispatcher.RegisterForDeviceDiscoveryL( *this );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   349
        iDeviceDiscoveryEnabled = ETrue;    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   350
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   351
       
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   352
    iDeviceDiscoveryMsg = new (ELeave) RMessage2( aMessage );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   353
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   354
    // Check queu's
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   355
    if( !iDeviceMsgQue.IsEmpty() )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   356
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   357
        CUpnpDeviceDiscoveryMessage* devMsg = iDeviceMsgQue.First();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   358
        __ASSERTD( devMsg, __FILE__, __LINE__ );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   359
        CUpnpAVDevice* dev = devMsg->Device();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   360
        TAVControllerDeviceDiscovery devMsgType = devMsg->MsgType();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   361
        DequeDeviceL( *dev, devMsgType );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   362
        iDeviceMsgQue.Remove( *devMsg );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   363
        delete devMsg;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   364
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   365
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   366
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   367
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   368
// CUPnPAVControllerImpl::DequeDeviceL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   369
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   370
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   371
void CUPnPAVControllerImpl::DequeDeviceL( const CUpnpAVDevice& aDevice,
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   372
    TAVControllerDeviceDiscovery aType )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   373
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   374
    __LOG( "CUPnPAVControllerImpl::DequeDeviceL" );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   375
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   376
    TPckg<TAVControllerDeviceDiscovery> resp0( aType );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   377
    iDeviceDiscoveryMsg->WriteL( 0, resp0 );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   378
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   379
    HBufC8* tmp = aDevice.ToDes8L();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   380
    CleanupStack::PushL( tmp );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   381
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   382
    TPckgBuf<TInt> resp1( tmp->Length() );            
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   383
    iDeviceDiscoveryMsg->WriteL( 1, resp1 );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   384
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   385
    CleanupStack::Pop( tmp );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   386
     
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   387
    delete iDeviceRespBuf; iDeviceRespBuf = NULL;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   388
    iDeviceRespBuf = tmp;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   389
            
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   390
    iDeviceDiscoveryMsg->Complete( EAVControllerDeviceCompleted );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   391
    delete iDeviceDiscoveryMsg; iDeviceDiscoveryMsg = NULL;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   392
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   393
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   394
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   395
// CUPnPAVControllerImpl::GetDeviceL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   396
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   397
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   398
void CUPnPAVControllerImpl::GetDeviceL( const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   399
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   400
    __LOG1( "CUPnPAVControllerImpl::GetDeviceL, 0x%d", iDeviceRespBuf );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   401
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   402
    aMessage.WriteL( 0, *iDeviceRespBuf );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   403
    aMessage.Complete( KErrNone );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   404
    delete iDeviceRespBuf; iDeviceRespBuf = NULL;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   405
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   406
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   407
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   408
// CUPnPAVControllerImpl::DisableDeviceDiscoveryL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   409
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   410
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   411
void CUPnPAVControllerImpl::DisableDeviceDiscoveryL(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   412
    /*const RMessage2& aMessage*/ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   413
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   414
    __LOG( "CUPnPAVControllerImpl::DisableDeviceDiscoveryL" );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   415
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   416
    if( iDeviceDiscoveryEnabled )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   417
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   418
        //iDispatcher.UnRegisterDeviceDiscovery( *this );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   419
        iDeviceDiscoveryEnabled = EFalse;    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   420
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   421
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   422
    if( iDeviceDiscoveryMsg )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   423
        { 
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   424
        iDeviceDiscoveryMsg->Complete( KErrCancel );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   425
        delete iDeviceDiscoveryMsg; iDeviceDiscoveryMsg = NULL;        
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   426
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   427
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   428
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   429
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   430
// CUPnPAVControllerImpl::GetDeviceListSizeL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   431
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   432
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   433
void CUPnPAVControllerImpl::GetDeviceListSizeL( const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   434
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   435
    __LOG( "CUPnPAVControllerImpl::GetDeviceListSizeL" );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   436
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   437
    // Get the device list from the av control point, create a response buffer
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   438
    // and write the size of the list back to the client
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   439
    TAVControllerDeviceListType deviceListType;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   440
    TPckg<TAVControllerDeviceListType> resp0( deviceListType );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   441
    aMessage.ReadL( 0, resp0 );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   442
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   443
    delete iDeviceListRespBuf; iDeviceListRespBuf = NULL;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   444
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   445
    const RPointerArray<CUpnpAVDeviceExtended>& devList =
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   446
        iServer.DeviceRepository().DeviceList();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   447
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   448
    if( deviceListType == EAVMediaServer )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   449
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   450
        CUpnpAVDeviceList* tempList = CUpnpAVDeviceList::NewLC();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   451
                
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   452
        TInt count = devList.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   453
        for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   454
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   455
            if( devList[ i ]->DeviceType() == CUpnpAVDevice::EMediaServer )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   456
                {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   457
                if( devList[ i ]->PInfoReceived() &&
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   458
                    !devList[ i ]->Local() )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   459
                    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   460
                    CUpnpAVDevice* tempDev = CUpnpAVDevice::NewL(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   461
                        *devList[i] );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   462
                    CleanupStack::PushL( tempDev );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   463
                    // Ownership of tempDev transferred
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   464
                    tempList->AppendDeviceL( *tempDev );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   465
                    CleanupStack::Pop( tempDev );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   466
                    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   467
                }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   468
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   469
        __LOG1( "CUPnPAVControllerImpl::GetDeviceListSizeL servers: %d", tempList->Count() );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   470
        iDeviceListRespBuf = tempList->ToDes8L();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   471
        CleanupStack::PopAndDestroy( tempList );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   472
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   473
    else
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   474
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   475
        CUpnpAVDeviceList* tempList = CUpnpAVDeviceList::NewLC();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   476
                
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   477
        TInt count = devList.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   478
        for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   479
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   480
            if( devList[ i ]->DeviceType() == CUpnpAVDevice::EMediaRenderer )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   481
                {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   482
                if( devList[ i ]->PInfoReceived() )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   483
                    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   484
                    CUpnpAVDevice* tempDev = CUpnpAVDevice::NewL(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   485
                        *devList[i] );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   486
                    CleanupStack::PushL( tempDev );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   487
                    // Ownership of tempDev transferred
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   488
                    tempList->AppendDeviceL( *tempDev );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   489
                    CleanupStack::Pop( tempDev );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   490
                    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   491
                }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   492
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   493
        __LOG1( "CUPnPAVControllerImpl::GetDeviceListSizeL renderers: %d", tempList->Count() );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   494
        iDeviceListRespBuf = tempList->ToDes8L();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   495
        CleanupStack::PopAndDestroy( tempList ); 
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   496
        }    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   497
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   498
    // Write the size back to the client
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   499
    TPckgBuf<TInt> resp1( iDeviceListRespBuf->Length() );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   500
    aMessage.WriteL( 1, resp1 );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   501
    aMessage.Complete( KErrNone );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   502
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   503
    __LOG( "CUPnPAVControllerImpl::GetDeviceListSizeL end" );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   504
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   505
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   506
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   507
// CUPnPAVControllerImpl::GetDeviceListL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   508
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   509
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   510
void CUPnPAVControllerImpl::GetDeviceListL( const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   511
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   512
    __LOG1( "CUPnPAVControllerImpl::GetDeviceListL, 0x%d",
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   513
        iDeviceListRespBuf );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   514
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   515
    // Write the device list back to the client
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   516
    aMessage.WriteL( 0, *iDeviceListRespBuf );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   517
    aMessage.Complete( KErrNone );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   518
    delete iDeviceListRespBuf; iDeviceListRespBuf = NULL;    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   519
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   520
    __LOG( "CUPnPAVControllerImpl::GetDeviceListL end" );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   521
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   522
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   523
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   524
// CUPnPAVControllerImpl::GetDeviceIconRequestL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   525
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   526
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   527
void CUPnPAVControllerImpl::GetDeviceIconRequestL( const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   528
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   529
    __LOG( "CUPnPAVControllerImpl::GetDeviceIconRequestL" );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   530
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   531
    TInt uuidLen = aMessage.GetDesLengthL( 0 );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   532
    if ( uuidLen < 0 || uuidLen > KMaxTInt/2 ) // to avoid alloc panic
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   533
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   534
        User::Leave( KErrArgument );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   535
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   536
    HBufC8* uuid = HBufC8::NewLC( uuidLen );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   537
    TPtr8 uuidPtr = uuid->Des();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   538
    aMessage.ReadL( 0, uuidPtr );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   539
    // Message is completed by the transfer
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   540
    iServer.TransferDeviceIconFileToClientL( aMessage, 1, uuidPtr );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   541
    CleanupStack::PopAndDestroy( uuid );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   542
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   543
    __LOG( "CUPnPAVControllerImpl::GetDeviceIconRequestL end" );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   544
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   545
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   546
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   547
// CUPnPAVControllerImpl::CreateRenderingSessionL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   548
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   549
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   550
void CUPnPAVControllerImpl::CreateRenderingSessionL(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   551
    const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   552
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   553
    __LOG1( "CUPnPAVControllerImpl::CreateRenderingSessionL, 0x%d",
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   554
        aMessage.Int0() );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   555
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   556
    // Create a rendering session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   557
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   558
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   559
    // Read the device UID
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   560
    TInt len = aMessage.GetDesMaxLength( 1 );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   561
    HBufC8* buf = HBufC8::NewLC( len );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   562
    TPtr8 ptr( buf->Des() );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   563
    User::LeaveIfError( aMessage.Read( 1, ptr ) );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   564
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   565
    CUPnPPlaybackSession* tempPtr = CUPnPPlaybackSession::NewL(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   566
        iServer, id, *buf );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   567
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   568
    CleanupStack::PopAndDestroy( buf );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   569
    iPlaybackSessions.Append( tempPtr );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   570
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   571
    aMessage.Complete( KErrNone );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   572
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   573
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   574
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   575
// CUPnPAVControllerImpl::DestroyRenderingSessionL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   576
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   577
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   578
void CUPnPAVControllerImpl::DestroyRenderingSessionL(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   579
    const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   580
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   581
    __LOG1( "CUPnPAVControllerImpl::DestroyRenderingSessionL, 0x%d",
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   582
        aMessage.Int0() );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   583
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   584
    // Find and delete a rendering session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   585
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   586
    TInt count = iPlaybackSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   587
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   588
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   589
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   590
        if( iPlaybackSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   591
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   592
            delete iPlaybackSessions[ i ];
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   593
            iPlaybackSessions.Remove( i );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   594
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   595
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   596
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   597
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   598
    if( found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   599
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   600
        aMessage.Complete( KErrNone );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   601
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   602
    else
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   603
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   604
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   605
        }    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   606
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   607
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   608
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   609
// CUPnPAVControllerImpl::EventRequestL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   610
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   611
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   612
void CUPnPAVControllerImpl::EventRequestL( const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   613
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   614
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   615
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   616
    TInt count = iPlaybackSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   617
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   618
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   619
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   620
        if( iPlaybackSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   621
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   622
            iPlaybackSessions[ i ]->EventRequestL( aMessage );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   623
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   624
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   625
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   626
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   627
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   628
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   629
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   630
        }    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   631
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   632
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   633
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   634
// CUPnPAVControllerImpl::CancelEventRequestL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   635
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   636
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   637
void CUPnPAVControllerImpl::CancelEventRequestL( const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   638
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   639
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   640
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   641
    TInt count = iPlaybackSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   642
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   643
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   644
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   645
        if( iPlaybackSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   646
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   647
            iPlaybackSessions[ i ]->CancelEventRequestL();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   648
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   649
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   650
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   651
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   652
    if( found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   653
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   654
        aMessage.Complete( KErrNone );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   655
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   656
    else
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   657
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   658
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   659
        }        
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   660
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   661
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   662
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   663
// CUPnPAVControllerImpl::SetURIL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   664
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   665
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   666
void CUPnPAVControllerImpl::SetURIL( const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   667
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   668
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   669
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   670
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   671
    TInt count = iPlaybackSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   672
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   673
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   674
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   675
        if( iPlaybackSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   676
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   677
            iPlaybackSessions[ i ]->SetURIL( aMessage );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   678
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   679
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   680
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   681
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   682
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   683
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   684
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   685
        }        
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   686
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   687
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   688
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   689
// CUPnPAVControllerImpl::CancelSetURIL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   690
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   691
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   692
void CUPnPAVControllerImpl::CancelSetURIL( const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   693
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   694
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   695
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   696
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   697
    TInt count = iPlaybackSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   698
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   699
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   700
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   701
        if( iPlaybackSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   702
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   703
            iPlaybackSessions[ i ]->CancelSetURIL();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   704
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   705
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   706
            aMessage.Complete( KErrNone );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   707
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   708
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   709
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   710
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   711
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   712
        }            
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   713
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   714
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   715
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   716
// CUPnPAVControllerImpl::SetNextURIL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   717
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   718
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   719
void CUPnPAVControllerImpl::SetNextURIL( const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   720
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   721
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   722
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   723
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   724
    TInt count = iPlaybackSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   725
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   726
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   727
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   728
        if( iPlaybackSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   729
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   730
            iPlaybackSessions[ i ]->SetNextURIL( aMessage );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   731
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   732
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   733
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   734
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   735
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   736
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   737
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   738
        }            
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   739
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   740
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   741
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   742
// CUPnPAVControllerImpl::CancelSetNextURIL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   743
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   744
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   745
void CUPnPAVControllerImpl::CancelSetNextURIL( const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   746
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   747
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   748
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   749
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   750
    TInt count = iPlaybackSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   751
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   752
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   753
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   754
        if( iPlaybackSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   755
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   756
            iPlaybackSessions[ i ]->CancelSetNextURIL();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   757
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   758
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   759
            aMessage.Complete( KErrNone );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   760
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   761
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   762
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   763
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   764
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   765
        }            
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   766
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   767
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   768
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   769
// CUPnPAVControllerImpl::PlayL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   770
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   771
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   772
void CUPnPAVControllerImpl::PlayL( const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   773
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   774
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   775
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   776
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   777
    TInt count = iPlaybackSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   778
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   779
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   780
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   781
        if( iPlaybackSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   782
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   783
            iPlaybackSessions[ i ]->PlayL( aMessage );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   784
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   785
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   786
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   787
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   788
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   789
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   790
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   791
        }    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   792
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   793
   
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   794
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   795
// CUPnPAVControllerImpl::CancelPlayL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   796
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   797
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   798
void CUPnPAVControllerImpl::CancelPlayL( const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   799
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   800
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   801
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   802
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   803
    TInt count = iPlaybackSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   804
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   805
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   806
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   807
        if( iPlaybackSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   808
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   809
            iPlaybackSessions[ i ]->CancelPlayL();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   810
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   811
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   812
            aMessage.Complete( KErrNone );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   813
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   814
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   815
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   816
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   817
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   818
        }                
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   819
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   820
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   821
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   822
// CUPnPAVControllerImpl::StopL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   823
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   824
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   825
void CUPnPAVControllerImpl::StopL( const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   826
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   827
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   828
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   829
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   830
    TInt count = iPlaybackSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   831
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   832
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   833
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   834
        if( iPlaybackSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   835
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   836
            iPlaybackSessions[ i ]->StopL( aMessage );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   837
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   838
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   839
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   840
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   841
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   842
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   843
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   844
        }    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   845
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   846
   
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   847
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   848
// CUPnPAVControllerImpl::CancelStopL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   849
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   850
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   851
void CUPnPAVControllerImpl::CancelStopL( const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   852
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   853
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   854
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   855
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   856
    TInt count = iPlaybackSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   857
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   858
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   859
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   860
        if( iPlaybackSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   861
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   862
            iPlaybackSessions[ i ]->CancelStopL();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   863
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   864
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   865
            aMessage.Complete( KErrNone );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   866
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   867
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   868
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   869
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   870
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   871
        }                
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   872
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   873
   
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   874
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   875
// CUPnPAVControllerImpl::PauseL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   876
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   877
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   878
void CUPnPAVControllerImpl::PauseL( const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   879
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   880
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   881
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   882
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   883
    TInt count = iPlaybackSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   884
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   885
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   886
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   887
        if( iPlaybackSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   888
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   889
            iPlaybackSessions[ i ]->PauseL( aMessage );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   890
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   891
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   892
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   893
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   894
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   895
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   896
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   897
        }    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   898
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   899
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   900
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   901
// CUPnPAVControllerImpl::CancelPauseL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   902
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   903
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   904
void CUPnPAVControllerImpl::CancelPauseL( const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   905
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   906
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   907
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   908
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   909
    TInt count = iPlaybackSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   910
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   911
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   912
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   913
        if( iPlaybackSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   914
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   915
            iPlaybackSessions[ i ]->CancelPauseL();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   916
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   917
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   918
            aMessage.Complete( KErrNone );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   919
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   920
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   921
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   922
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   923
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   924
        }                
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   925
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   926
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   927
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   928
// CUPnPAVControllerImpl::SetVolumeL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   929
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   930
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   931
void CUPnPAVControllerImpl::SetVolumeL( const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   932
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   933
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   934
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   935
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   936
    TInt count = iPlaybackSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   937
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   938
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   939
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   940
        if( iPlaybackSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   941
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   942
            iPlaybackSessions[ i ]->SetVolumeL( aMessage );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   943
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   944
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   945
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   946
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   947
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   948
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   949
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   950
        }    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   951
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   952
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   953
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   954
// CUPnPAVControllerImpl::CancelSetVolumeL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   955
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   956
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   957
void CUPnPAVControllerImpl::CancelSetVolumeL( const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   958
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   959
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   960
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   961
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   962
    TInt count = iPlaybackSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   963
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   964
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   965
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   966
        if( iPlaybackSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   967
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   968
            iPlaybackSessions[ i ]->CancelSetVolumeL();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   969
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   970
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   971
            aMessage.Complete( KErrNone );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   972
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   973
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   974
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   975
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   976
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   977
        }                
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   978
    }  
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   979
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   980
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   981
// CUPnPAVControllerImpl::GetVolumeL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   982
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   983
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   984
void CUPnPAVControllerImpl::GetVolumeL( const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   985
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   986
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   987
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   988
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   989
    TInt count = iPlaybackSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   990
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   991
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   992
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   993
        if( iPlaybackSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   994
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   995
            iPlaybackSessions[ i ]->GetVolumeL( aMessage );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   996
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   997
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   998
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
   999
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1000
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1001
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1002
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1003
        }        
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1004
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1005
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1006
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1007
// CUPnPAVControllerImpl::CancelGetVolumeL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1008
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1009
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1010
void CUPnPAVControllerImpl::CancelGetVolumeL( const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1011
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1012
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1013
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1014
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1015
    TInt count = iPlaybackSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1016
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1017
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1018
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1019
        if( iPlaybackSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1020
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1021
            iPlaybackSessions[ i ]->CancelGetVolumeL();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1022
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1023
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1024
            aMessage.Complete( KErrNone );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1025
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1026
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1027
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1028
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1029
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1030
        }    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1031
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1032
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1033
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1034
// CUPnPAVControllerImpl::SetMuteL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1035
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1036
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1037
void CUPnPAVControllerImpl::SetMuteL( const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1038
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1039
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1040
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1041
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1042
    TInt count = iPlaybackSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1043
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1044
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1045
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1046
        if( iPlaybackSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1047
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1048
            iPlaybackSessions[ i ]->SetMuteL( aMessage );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1049
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1050
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1051
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1052
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1053
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1054
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1055
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1056
        }        
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1057
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1058
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1059
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1060
// CUPnPAVControllerImpl::CancelSetMuteL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1061
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1062
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1063
void CUPnPAVControllerImpl::CancelSetMuteL( const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1064
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1065
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1066
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1067
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1068
    TInt count = iPlaybackSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1069
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1070
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1071
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1072
        if( iPlaybackSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1073
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1074
            iPlaybackSessions[ i ]->CancelSetMuteL();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1075
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1076
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1077
            aMessage.Complete( KErrNone );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1078
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1079
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1080
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1081
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1082
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1083
        }                
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1084
    }  
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1085
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1086
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1087
// CUPnPAVControllerImpl::GetMuteL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1088
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1089
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1090
void CUPnPAVControllerImpl::GetMuteL( const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1091
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1092
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1093
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1094
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1095
    TInt count = iPlaybackSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1096
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1097
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1098
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1099
        if( iPlaybackSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1100
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1101
            iPlaybackSessions[ i ]->GetMuteL( aMessage );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1102
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1103
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1104
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1105
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1106
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1107
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1108
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1109
        }        
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1110
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1111
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1112
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1113
// CUPnPAVControllerImpl::CancelGetMuteL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1114
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1115
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1116
void CUPnPAVControllerImpl::CancelGetMuteL( const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1117
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1118
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1119
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1120
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1121
    TInt count = iPlaybackSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1122
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1123
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1124
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1125
        if( iPlaybackSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1126
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1127
            iPlaybackSessions[ i ]->CancelGetMuteL();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1128
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1129
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1130
            aMessage.Complete( KErrNone );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1131
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1132
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1133
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1134
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1135
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1136
        }    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1137
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1138
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1139
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1140
// CUPnPAVControllerImpl::GetPositionInfoL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1141
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1142
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1143
void CUPnPAVControllerImpl::GetPositionInfoL( const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1144
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1145
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1146
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1147
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1148
    TInt count = iPlaybackSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1149
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1150
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1151
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1152
        if( iPlaybackSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1153
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1154
            iPlaybackSessions[ i ]->GetPositionInfoL( aMessage );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1155
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1156
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1157
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1158
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1159
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1160
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1161
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1162
        }        
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1163
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1164
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1165
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1166
// CUPnPAVControllerImpl::CancelGetPositionInfoL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1167
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1168
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1169
void CUPnPAVControllerImpl::CancelGetPositionInfoL(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1170
    const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1171
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1172
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1173
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1174
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1175
    TInt count = iPlaybackSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1176
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1177
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1178
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1179
        if( iPlaybackSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1180
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1181
            iPlaybackSessions[ i ]->CancelGetPositionInfoL();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1182
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1183
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1184
            aMessage.Complete( KErrNone );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1185
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1186
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1187
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1188
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1189
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1190
        }                    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1191
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1192
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1193
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1194
// CUPnPAVControllerImpl::SeekRelTimeL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1195
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1196
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1197
void CUPnPAVControllerImpl::SeekRelTimeL( const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1198
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1199
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1200
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1201
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1202
    TInt count = iPlaybackSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1203
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1204
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1205
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1206
        if( iPlaybackSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1207
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1208
            iPlaybackSessions[ i ]->SeekRelTimeL( aMessage );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1209
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1210
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1211
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1212
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1213
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1214
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1215
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1216
        }        
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1217
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1218
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1219
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1220
// CUPnPAVControllerImpl::CancelSeekRelTimeL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1221
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1222
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1223
void CUPnPAVControllerImpl::CancelSeekRelTimeL(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1224
    const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1225
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1226
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1227
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1228
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1229
    TInt count = iPlaybackSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1230
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1231
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1232
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1233
        if( iPlaybackSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1234
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1235
            iPlaybackSessions[ i ]->CancelSeekRelTimeL();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1236
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1237
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1238
            aMessage.Complete( KErrNone );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1239
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1240
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1241
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1242
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1243
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1244
        }                    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1245
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1246
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1247
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1248
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1249
// CUPnPAVControllerImpl::GetRendererStateL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1250
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1251
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1252
void CUPnPAVControllerImpl::GetRendererStateL( const RMessage2& aMessage)
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1253
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1254
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1255
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1256
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1257
    TInt count = iPlaybackSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1258
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1259
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1260
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1261
        if( iPlaybackSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1262
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1263
            iPlaybackSessions[ i ]->GetRendererStateL( aMessage );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1264
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1265
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1266
            //aMessage.Complete( KErrNone );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1267
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1268
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1269
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1270
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1271
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1272
        }    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1273
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1274
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1275
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1276
// CUPnPAVControllerImpl::CreateBrowsingSessionL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1277
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1278
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1279
void CUPnPAVControllerImpl::CreateBrowsingSessionL(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1280
    const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1281
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1282
    __LOG1( "CUPnPAVControllerImpl::CreateBrowsingSessionL, 0x%d",
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1283
        aMessage.Int0() );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1284
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1285
    // Create a rendering session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1286
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1287
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1288
    // Read the device UID
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1289
    TInt len = aMessage.GetDesMaxLength( 1 );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1290
    HBufC8* buf = HBufC8::NewLC( len );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1291
    TPtr8 ptr( buf->Des() );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1292
    User::LeaveIfError( aMessage.Read( 1, ptr ) );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1293
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1294
    CUPnPBrowsingSession* tempPtr = CUPnPBrowsingSession::NewL(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1295
        iServer, id, *buf );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1296
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1297
    CleanupStack::PopAndDestroy( buf );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1298
    iBrowsingSessions.Append( tempPtr );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1299
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1300
    aMessage.Complete( KErrNone );    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1301
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1302
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1303
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1304
// CUPnPAVControllerImpl::DestroyBrowsingSessionL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1305
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1306
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1307
void CUPnPAVControllerImpl::DestroyBrowsingSessionL(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1308
    const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1309
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1310
    __LOG1( "CUPnPAVControllerImpl::DestroyBrowsingSessionL, 0x%d",
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1311
        aMessage.Int0() );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1312
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1313
    // Find and delete a rendering session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1314
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1315
    TInt count = iBrowsingSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1316
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1317
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1318
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1319
        if( iBrowsingSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1320
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1321
            delete iBrowsingSessions[ i ];
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1322
            iBrowsingSessions.Remove( i );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1323
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1324
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1325
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1326
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1327
    if( found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1328
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1329
        aMessage.Complete( KErrNone );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1330
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1331
    else
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1332
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1333
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1334
        }        
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1335
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1336
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1337
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1338
// CUPnPAVControllerImpl::GetBrowseResponseSizeL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1339
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1340
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1341
void CUPnPAVControllerImpl::GetBrowseResponseSizeL(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1342
    const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1343
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1344
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1345
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1346
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1347
    TInt count = iBrowsingSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1348
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1349
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1350
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1351
        if( iBrowsingSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1352
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1353
            iBrowsingSessions[ i ]->GetBrowseResponseSizeL( aMessage );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1354
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1355
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1356
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1357
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1358
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1359
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1360
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1361
        }    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1362
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1363
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1364
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1365
// CUPnPAVControllerImpl::CancelGetBrowseResponseSizeL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1366
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1367
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1368
void CUPnPAVControllerImpl::CancelGetBrowseResponseSizeL(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1369
    const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1370
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1371
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1372
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1373
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1374
    TInt count = iBrowsingSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1375
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1376
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1377
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1378
        if( iBrowsingSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1379
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1380
            iBrowsingSessions[ i ]->CancelGetBrowseResponseSizeL();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1381
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1382
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1383
            aMessage.Complete( KErrNone );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1384
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1385
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1386
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1387
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1388
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1389
        }    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1390
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1391
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1392
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1393
// CUPnPAVControllerImpl::GetBrowseResponseL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1394
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1395
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1396
void CUPnPAVControllerImpl::GetBrowseResponseL( const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1397
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1398
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1399
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1400
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1401
    TInt count = iBrowsingSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1402
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1403
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1404
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1405
        if( iBrowsingSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1406
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1407
            iBrowsingSessions[ i ]->GetBrowseResponseL( aMessage );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1408
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1409
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1410
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1411
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1412
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1413
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1414
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1415
        }    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1416
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1417
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1418
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1419
// CUPnPAVControllerImpl::GetSearchResponseSizeL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1420
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1421
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1422
void CUPnPAVControllerImpl::GetSearchResponseSizeL(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1423
    const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1424
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1425
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1426
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1427
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1428
    TInt count = iBrowsingSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1429
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1430
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1431
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1432
        if( iBrowsingSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1433
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1434
            iBrowsingSessions[ i ]->GetSearchResponseSizeL( aMessage );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1435
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1436
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1437
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1438
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1439
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1440
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1441
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1442
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1443
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1444
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1445
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1446
// CUPnPAVControllerImpl::CancelGetSearchResponseSizeL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1447
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1448
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1449
void CUPnPAVControllerImpl::CancelGetSearchResponseSizeL(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1450
    const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1451
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1452
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1453
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1454
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1455
    TInt count = iBrowsingSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1456
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1457
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1458
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1459
        if( iBrowsingSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1460
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1461
            iBrowsingSessions[ i ]->CancelGetSearchResponseSizeL();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1462
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1463
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1464
            aMessage.Complete( KErrNone );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1465
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1466
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1467
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1468
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1469
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1470
        }    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1471
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1472
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1473
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1474
// CUPnPAVControllerImpl::GetSearchResponseL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1475
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1476
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1477
void CUPnPAVControllerImpl::GetSearchResponseL(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1478
    const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1479
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1480
     TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1481
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1482
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1483
    TInt count = iBrowsingSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1484
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1485
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1486
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1487
        if( iBrowsingSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1488
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1489
            iBrowsingSessions[ i ]->GetSearchResponseL( aMessage );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1490
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1491
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1492
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1493
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1494
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1495
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1496
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1497
        }   
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1498
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1499
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1500
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1501
// CUPnPAVControllerImpl::GetSearchCapabitiesSizeL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1502
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1503
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1504
void CUPnPAVControllerImpl::GetSearchCapabitiesSizeL(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1505
    const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1506
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1507
     TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1508
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1509
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1510
    TInt count = iBrowsingSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1511
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1512
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1513
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1514
        if( iBrowsingSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1515
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1516
            iBrowsingSessions[ i ]->GetSearchCapabitiesSizeL( aMessage );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1517
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1518
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1519
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1520
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1521
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1522
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1523
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1524
        }       
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1525
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1526
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1527
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1528
// CUPnPAVControllerImpl::CancelGetSearchCapabitiesSizeL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1529
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1530
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1531
void CUPnPAVControllerImpl::CancelGetSearchCapabitiesSizeL(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1532
    const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1533
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1534
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1535
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1536
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1537
    TInt count = iBrowsingSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1538
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1539
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1540
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1541
        if( iBrowsingSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1542
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1543
            iBrowsingSessions[ i ]->CancelGetSearchCapabitiesSizeL();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1544
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1545
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1546
            aMessage.Complete( KErrNone );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1547
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1548
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1549
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1550
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1551
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1552
        }    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1553
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1554
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1555
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1556
// CUPnPAVControllerImpl::GetSearchCapabitiesL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1557
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1558
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1559
void CUPnPAVControllerImpl::GetSearchCapabitiesL( const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1560
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1561
     TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1562
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1563
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1564
    TInt count = iBrowsingSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1565
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1566
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1567
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1568
        if( iBrowsingSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1569
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1570
            iBrowsingSessions[ i ]->GetSearchCapabitiesL( aMessage );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1571
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1572
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1573
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1574
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1575
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1576
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1577
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1578
        }           
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1579
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1580
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1581
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1582
// CUPnPAVControllerImpl::CreateContainerL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1583
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1584
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1585
void CUPnPAVControllerImpl::CreateContainerL( const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1586
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1587
     TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1588
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1589
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1590
    TInt count = iBrowsingSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1591
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1592
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1593
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1594
        if( iBrowsingSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1595
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1596
            iBrowsingSessions[ i ]->CreateContainerL( aMessage );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1597
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1598
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1599
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1600
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1601
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1602
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1603
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1604
        }               
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1605
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1606
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1607
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1608
// CUPnPAVControllerImpl::CancelCreateContainerL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1609
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1610
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1611
void CUPnPAVControllerImpl::CancelCreateContainerL(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1612
    const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1613
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1614
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1615
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1616
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1617
    TInt count = iBrowsingSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1618
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1619
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1620
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1621
        if( iBrowsingSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1622
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1623
            iBrowsingSessions[ i ]->CancelCreateContainerL();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1624
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1625
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1626
            aMessage.Complete( KErrNone );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1627
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1628
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1629
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1630
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1631
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1632
        }            
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1633
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1634
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1635
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1636
// CUPnPAVControllerImpl::DeleteObjectL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1637
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1638
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1639
void CUPnPAVControllerImpl::DeleteObjectL( const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1640
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1641
     TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1642
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1643
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1644
    TInt count = iBrowsingSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1645
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1646
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1647
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1648
        if( iBrowsingSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1649
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1650
            iBrowsingSessions[ i ]->DeleteObjectL( aMessage );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1651
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1652
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1653
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1654
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1655
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1656
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1657
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1658
        }                   
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1659
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1660
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1661
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1662
// CUPnPAVControllerImpl::CancelDeleteObjectL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1663
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1664
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1665
void CUPnPAVControllerImpl::CancelDeleteObjectL( const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1666
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1667
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1668
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1669
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1670
    TInt count = iBrowsingSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1671
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1672
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1673
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1674
        if( iBrowsingSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1675
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1676
            iBrowsingSessions[ i ]->CancelDeleteObjectL();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1677
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1678
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1679
            aMessage.Complete( KErrNone );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1680
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1681
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1682
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1683
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1684
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1685
        }                
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1686
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1687
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1688
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1689
// CUPnPAVControllerImpl::DeviceDisappearedRequestL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1690
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1691
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1692
void CUPnPAVControllerImpl::DeviceDisappearedRequestL(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1693
    const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1694
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1695
     TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1696
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1697
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1698
    TInt count = iBrowsingSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1699
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1700
    TInt i;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1701
    for( i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1702
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1703
        if( iBrowsingSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1704
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1705
            iBrowsingSessions[ i ]->DeviceDisappearedRequestL( aMessage );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1706
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1707
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1708
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1709
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1710
        
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1711
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1712
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1713
        count = iPlaybackSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1714
        for( i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1715
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1716
            if( iPlaybackSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1717
                {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1718
                iPlaybackSessions[ i ]->DeviceDisappearedRequestL(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1719
                    aMessage );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1720
                found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1721
                i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1722
                }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1723
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1724
        }                       
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1725
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1726
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1727
        {  
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1728
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1729
        }                       
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1730
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1731
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1732
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1733
// CUPnPAVControllerImpl::CancelDeviceDisappearedRequestL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1734
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1735
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1736
void CUPnPAVControllerImpl::CancelDeviceDisappearedRequestL(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1737
    const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1738
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1739
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1740
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1741
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1742
    TInt count = iBrowsingSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1743
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1744
    TInt i;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1745
    for( i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1746
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1747
        if( iBrowsingSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1748
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1749
            iBrowsingSessions[ i ]->CancelDeviceDisappearedRequestL();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1750
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1751
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1752
            aMessage.Complete( KErrNone );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1753
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1754
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1755
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1756
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1757
        count = iPlaybackSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1758
        for( i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1759
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1760
            if( iPlaybackSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1761
                {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1762
                iPlaybackSessions[ i ]->CancelDeviceDisappearedRequestL();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1763
                found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1764
                i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1765
                aMessage.Complete( KErrNone );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1766
                }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1767
            }        
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1768
        }                    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1769
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1770
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1771
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1772
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1773
        }                    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1774
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1775
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1776
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1777
// CUPnPAVControllerImpl::MonitorConnectionL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1778
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1779
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1780
void CUPnPAVControllerImpl::MonitorConnectionL( const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1781
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1782
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1783
    if( iConnectionMsg )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1784
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1785
        User::Leave( KErrInUse );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1786
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1787
    else
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1788
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1789
        iConnectionMsg = new (ELeave) RMessage2( aMessage );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1790
        }  
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1791
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1792
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1793
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1794
// CUPnPAVControllerImpl::CancelMonitorConnectionL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1795
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1796
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1797
void CUPnPAVControllerImpl::CancelMonitorConnectionL(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1798
    const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1799
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1800
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1801
    if( iConnectionMsg )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1802
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1803
        iConnectionMsg->Complete( KErrCancel );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1804
        delete iConnectionMsg; iConnectionMsg = NULL;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1805
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1806
    aMessage.Complete( KErrNone );       
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1807
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1808
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1809
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1810
// CUPnPAVControllerImpl::CreateDownloadSessionL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1811
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1812
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1813
void CUPnPAVControllerImpl::CreateDownloadSessionL(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1814
    const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1815
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1816
    __LOG1( "CUPnPAVControllerImpl::CreateDownloadSessionL, 0x%d",
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1817
        aMessage.Int0() );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1818
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1819
    // Create a downloading session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1820
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1821
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1822
    // Read the device UID
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1823
    TInt len = aMessage.GetDesMaxLength( 1 );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1824
    HBufC8* buf = HBufC8::NewLC( len );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1825
    TPtr8 ptr( buf->Des() );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1826
    User::LeaveIfError( aMessage.Read( 1, ptr ) );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1827
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1828
    CUPnPDownloadSession* tempPtr = CUPnPDownloadSession::NewL(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1829
        iServer, id, *buf );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1830
    CleanupStack::PopAndDestroy( buf );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1831
    iDownloadSessions.Append( tempPtr );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1832
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1833
    aMessage.Complete( KErrNone );    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1834
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1835
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1836
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1837
// CUPnPAVControllerImpl::DestroyDownloadSessionL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1838
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1839
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1840
void CUPnPAVControllerImpl::DestroyDownloadSessionL(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1841
    const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1842
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1843
    __LOG1( "CUPnPAVControllerImpl::DestroyDownloadSessionL, 0x%d",
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1844
        aMessage.Int0() );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1845
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1846
    // Find and delete a downloading session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1847
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1848
    TInt count = iDownloadSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1849
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1850
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1851
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1852
        if( iDownloadSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1853
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1854
            delete iDownloadSessions[ i ];
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1855
            iDownloadSessions.Remove( i );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1856
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1857
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1858
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1859
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1860
    if( found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1861
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1862
        aMessage.Complete( KErrNone );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1863
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1864
    else
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1865
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1866
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1867
        }        
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1868
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1869
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1870
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1871
// CUPnPAVControllerImpl::StartDownloadL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1872
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1873
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1874
void CUPnPAVControllerImpl::StartDownloadL( const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1875
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1876
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1877
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1878
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1879
    TInt count = iDownloadSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1880
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1881
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1882
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1883
        if( iDownloadSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1884
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1885
            iDownloadSessions[ i ]->StartDownloadL( aMessage );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1886
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1887
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1888
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1889
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1890
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1891
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1892
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1893
        }                       
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1894
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1895
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1896
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1897
// CUPnPAVControllerImpl::StartDownloadFHL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1898
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1899
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1900
void CUPnPAVControllerImpl::StartDownloadFHL( const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1901
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1902
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1903
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1904
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1905
    TInt count = iDownloadSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1906
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1907
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1908
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1909
        if( iDownloadSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1910
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1911
            iDownloadSessions[ i ]->StartDownloadFHL( aMessage );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1912
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1913
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1914
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1915
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1916
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1917
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1918
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1919
        }                       
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1920
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1921
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1922
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1923
// CUPnPAVControllerImpl::CancelDownloadL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1924
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1925
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1926
void CUPnPAVControllerImpl::CancelDownloadL( const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1927
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1928
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1929
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1930
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1931
    TInt count = iDownloadSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1932
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1933
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1934
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1935
        if( iDownloadSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1936
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1937
            iDownloadSessions[ i ]->CancelDownloadL( aMessage );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1938
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1939
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1940
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1941
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1942
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1943
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1944
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1945
        }                           
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1946
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1947
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1948
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1949
// CUPnPAVControllerImpl::CancelAllDownloadsL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1950
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1951
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1952
void CUPnPAVControllerImpl::CancelAllDownloadsL( const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1953
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1954
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1955
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1956
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1957
    TInt count = iDownloadSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1958
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1959
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1960
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1961
        if( iDownloadSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1962
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1963
            iDownloadSessions[ i ]->CancelAllDownloadsL( aMessage );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1964
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1965
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1966
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1967
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1968
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1969
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1970
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1971
        }                           
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1972
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1973
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1974
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1975
// CUPnPAVControllerImpl::StartTrackingDownloadProgressL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1976
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1977
// --------------------------------------------------------------------------    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1978
void CUPnPAVControllerImpl::StartTrackingDownloadProgressL(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1979
    const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1980
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1981
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1982
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1983
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1984
    TInt count = iDownloadSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1985
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1986
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1987
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1988
        if( iDownloadSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1989
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1990
            iDownloadSessions[ i ]->StartTrackingDownloadProgressL(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1991
                aMessage );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1992
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1993
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1994
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1995
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1996
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1997
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1998
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  1999
        }                           
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2000
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2001
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2002
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2003
// CUPnPAVControllerImpl::StopTrackingDownloadProgressL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2004
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2005
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2006
void CUPnPAVControllerImpl::StopTrackingDownloadProgressL(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2007
    const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2008
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2009
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2010
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2011
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2012
    TInt count = iDownloadSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2013
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2014
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2015
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2016
        if( iDownloadSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2017
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2018
            iDownloadSessions[ i ]->StopTrackingDownloadProgressL(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2019
                aMessage );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2020
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2021
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2022
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2023
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2024
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2025
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2026
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2027
        }                           
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2028
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2029
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2030
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2031
// CUPnPAVControllerImpl::GetDownloadEventL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2032
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2033
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2034
void CUPnPAVControllerImpl::GetDownloadEventL( const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2035
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2036
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2037
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2038
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2039
    TInt count = iDownloadSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2040
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2041
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2042
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2043
        if( iDownloadSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2044
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2045
            iDownloadSessions[ i ]->GetDownloadEventL(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2046
                aMessage );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2047
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2048
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2049
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2050
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2051
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2052
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2053
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2054
        }                               
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2055
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2056
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2057
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2058
// CUPnPAVControllerImpl::CancelGetDownloadEventL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2059
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2060
// --------------------------------------------------------------------------    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2061
void CUPnPAVControllerImpl::CancelGetDownloadEventL(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2062
    const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2063
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2064
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2065
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2066
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2067
    TInt count = iDownloadSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2068
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2069
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2070
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2071
        if( iDownloadSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2072
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2073
            iDownloadSessions[ i ]->CancelGetDownloadEventL(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2074
                aMessage );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2075
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2076
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2077
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2078
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2079
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2080
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2081
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2082
        }    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2083
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2084
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2085
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2086
// CUPnPAVControllerImpl::DestroyUploadSessionL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2087
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2088
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2089
void CUPnPAVControllerImpl::CreateUploadSessionL(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2090
    const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2091
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2092
    __LOG1( "CUPnPAVControllerImpl::CreateUploadSessionL, 0x%d",
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2093
        aMessage.Int0() );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2094
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2095
    // Create a downloading session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2096
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2097
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2098
    // Read the device UID
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2099
    TInt len = aMessage.GetDesMaxLength( 1 );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2100
    HBufC8* buf = HBufC8::NewLC( len );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2101
    TPtr8 ptr( buf->Des() );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2102
    User::LeaveIfError( aMessage.Read( 1, ptr ) );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2103
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2104
    CUPnPUploadSession* tempPtr = CUPnPUploadSession::NewL(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2105
        iServer, id, *buf );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2106
    CleanupStack::PopAndDestroy( buf );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2107
    iUploadSessions.Append( tempPtr );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2108
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2109
    aMessage.Complete( KErrNone );        
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2110
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2111
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2112
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2113
// CUPnPAVControllerImpl::DestroyUploadSessionL
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2114
// See upnpavcontrollerimpl.h
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2115
// --------------------------------------------------------------------------
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2116
void CUPnPAVControllerImpl::DestroyUploadSessionL(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2117
    const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2118
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2119
    __LOG1( "CUPnPAVControllerImpl::DestroyUploadSessionL, 0x%d",
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2120
        aMessage.Int0() );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2121
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2122
    // Find and delete an uploading session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2123
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2124
    TInt count = iUploadSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2125
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2126
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2127
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2128
        if( iUploadSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2129
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2130
            delete iUploadSessions[ i ];
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2131
            iUploadSessions.Remove( i );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2132
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2133
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2134
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2135
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2136
    if( found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2137
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2138
        aMessage.Complete( KErrNone );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2139
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2140
    else
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2141
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2142
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2143
        }        
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2144
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2145
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2146
void CUPnPAVControllerImpl::StartUploadL( const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2147
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2148
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2149
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2150
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2151
    TInt count = iUploadSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2152
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2153
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2154
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2155
        if( iUploadSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2156
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2157
            iUploadSessions[ i ]->StartUploadL(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2158
                aMessage );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2159
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2160
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2161
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2162
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2163
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2164
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2165
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2166
        }        
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2167
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2168
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2169
void CUPnPAVControllerImpl::CancelUploadL( const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2170
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2171
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2172
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2173
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2174
    TInt count = iUploadSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2175
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2176
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2177
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2178
        if( iUploadSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2179
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2180
            iUploadSessions[ i ]->CancelUploadL(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2181
                aMessage );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2182
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2183
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2184
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2185
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2186
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2187
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2188
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2189
        }            
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2190
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2191
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2192
void CUPnPAVControllerImpl::CancelAllUploadsL( const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2193
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2194
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2195
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2196
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2197
    TInt count = iUploadSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2198
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2199
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2200
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2201
        if( iUploadSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2202
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2203
            iUploadSessions[ i ]->CancelAllUploadsL(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2204
                aMessage );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2205
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2206
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2207
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2208
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2209
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2210
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2211
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2212
        }                
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2213
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2214
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2215
void CUPnPAVControllerImpl::StartTrackingUploadProgressL( const RMessage2&
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2216
    aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2217
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2218
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2219
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2220
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2221
    TInt count = iUploadSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2222
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2223
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2224
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2225
        if( iUploadSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2226
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2227
            iUploadSessions[ i ]->StartTrackingUploadProgressL(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2228
                aMessage );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2229
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2230
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2231
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2232
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2233
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2234
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2235
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2236
        }                    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2237
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2238
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2239
void CUPnPAVControllerImpl::StopTrackingUploadProgressL( const RMessage2&
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2240
    aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2241
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2242
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2243
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2244
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2245
    TInt count = iUploadSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2246
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2247
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2248
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2249
        if( iUploadSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2250
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2251
            iUploadSessions[ i ]->StopTrackingUploadProgressL(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2252
                aMessage );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2253
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2254
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2255
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2256
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2257
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2258
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2259
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2260
        }                        
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2261
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2262
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2263
void CUPnPAVControllerImpl::GetUploadEventL( const RMessage2& aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2264
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2265
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2266
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2267
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2268
    TInt count = iUploadSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2269
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2270
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2271
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2272
        if( iUploadSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2273
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2274
            iUploadSessions[ i ]->GetUploadEventL(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2275
                aMessage );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2276
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2277
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2278
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2279
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2280
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2281
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2282
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2283
        }                            
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2284
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2285
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2286
void CUPnPAVControllerImpl::CancelGetUploadEventL( const RMessage2&
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2287
    aMessage )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2288
    {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2289
    TInt id = aMessage.Int0();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2290
    
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2291
    // Find the session
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2292
    TInt count = iUploadSessions.Count();
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2293
    TBool found = EFalse;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2294
    for( TInt i = 0; i < count; i++ )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2295
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2296
        if( iUploadSessions[ i ]->SessionId() == id )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2297
            {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2298
            iUploadSessions[ i ]->CancelGetUploadEventL(
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2299
                aMessage );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2300
            found = ETrue;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2301
            i = count;
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2302
            }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2303
        }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2304
    if( !found )
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2305
        {
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2306
        aMessage.Complete( KErrNotFound );
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2307
        }                                
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2308
    }
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2309
5360b7ddc251 New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents: 32
diff changeset
  2310
// end of file