upnp/upnpstack/serviceframework/src/upnpdispatcherengine.cpp
branchRCL_3
changeset 10 594d15129e2c
parent 9 5c72fd91570d
equal deleted inserted replaced
9:5c72fd91570d 10:594d15129e2c
   172 void CUpnpDispatcherEngine::AddCustomer( const MUpnpDispatcherCustomer& aCustomer )
   172 void CUpnpDispatcherEngine::AddCustomer( const MUpnpDispatcherCustomer& aCustomer )
   173     {
   173     {
   174     // adds a new customer for CUpnpDispatcherEngine
   174     // adds a new customer for CUpnpDispatcherEngine
   175     if ( iCustomers.Find( &aCustomer ) == KErrNotFound )
   175     if ( iCustomers.Find( &aCustomer ) == KErrNotFound )
   176         {
   176         {
   177         TRAP_IGNORE(iCustomers.AppendL( &aCustomer ));
   177         iCustomers.Append( &aCustomer );
   178         }
   178         }
   179     }
   179     }
   180 // -----------------------------------------------------------------------------
   180 // -----------------------------------------------------------------------------
   181 // CUpnpDispatcherEngine::RemoveCustomer
   181 // CUpnpDispatcherEngine::RemoveCustomer
   182 // -----------------------------------------------------------------------------
   182 // -----------------------------------------------------------------------------
   350             {
   350             {
   351             RPointerArray<TUpnpService> currServs;
   351             RPointerArray<TUpnpService> currServs;
   352             CleanupClosePushL( currServs );
   352             CleanupClosePushL( currServs );
   353             for ( TInt j = 0; j < iDevs[i].iServiceCount; j++ )
   353             for ( TInt j = 0; j < iDevs[i].iServiceCount; j++ )
   354                 {
   354                 {
   355                 currServs.AppendL( (const TUpnpService*)&iServs[servIndex+j] );
   355                 currServs.Append( (const TUpnpService*)&iServs[servIndex+j] );
   356                 }
   356                 }
   357             CleanupStack::Check(&currServs);
   357             CleanupStack::Check(&currServs);
   358             servIndex += iDevs[i].iServiceCount;
   358             servIndex += iDevs[i].iServiceCount;
   359 
   359 
   360             // creating CUpnpDevice objects from this information.
   360             // creating CUpnpDevice objects from this information.
   364             device->SetAlive( iDevs[i].iAlive );
   364             device->SetAlive( iDevs[i].iAlive );
   365             CleanupStack::Check(&currServs);
   365             CleanupStack::Check(&currServs);
   366             currServs.Reset();
   366             currServs.Reset();
   367             CleanupStack::Pop( &currServs );
   367             CleanupStack::Pop( &currServs );
   368 
   368 
   369             iNewDevices.AppendL( device );
   369             iNewDevices.Append( device );
   370             }
   370             }
   371 
   371 
   372         delete[] iDevs;
   372         delete[] iDevs;
   373         iDevs = NULL;
   373         iDevs = NULL;
   374 
   374 
   540 
   540 
   541         CleanupStack::Pop(array);
   541         CleanupStack::Pop(array);
   542         request->AddServices(array);
   542         request->AddServices(array);
   543 
   543 
   544         CleanupStack::Pop(request);
   544         CleanupStack::Pop(request);
   545         iPendingRequests.AppendL(request);
   545         iPendingRequests.Append(request);
   546         }
   546         }
   547     }
   547     }
   548 
   548 
   549 // -----------------------------------------------------------------------------
   549 // -----------------------------------------------------------------------------
   550 // CUpnpDispatcherEngine::AddControlPointClientL
   550 // CUpnpDispatcherEngine::AddControlPointClientL
   691         CUpnpDispatcherRequest* request = CUpnpDispatcherRequest::NewLC( ESsdpSearch );
   691         CUpnpDispatcherRequest* request = CUpnpDispatcherRequest::NewLC( ESsdpSearch );
   692 
   692 
   693         request->AddArgumentL( aString );
   693         request->AddArgumentL( aString );
   694 
   694 
   695         CleanupStack::Pop(request);
   695         CleanupStack::Pop(request);
   696         iPendingRequests.AppendL(request);
   696         iPendingRequests.Append(request);
   697         }
   697         }
   698     }
   698     }
   699 
   699 
   700 // -----------------------------------------------------------------------------
   700 // -----------------------------------------------------------------------------
   701 // CUpnpDispatcherEngine::SsdpStopFilteringL
   701 // CUpnpDispatcherEngine::SsdpStopFilteringL
   835             {
   835             {
   836             request->AddArgumentL( KNullDesC8 );
   836             request->AddArgumentL( KNullDesC8 );
   837             }
   837             }
   838 
   838 
   839         CleanupStack::Pop(request);
   839         CleanupStack::Pop(request);
   840         iPendingRequests.AppendL(request);
   840         iPendingRequests.Append(request);
   841         }
   841         }
   842     }
   842     }
   843 
   843 
   844 // -----------------------------------------------------------------------------
   844 // -----------------------------------------------------------------------------
   845 // CUpnpDispatcherEngine::MacAddressL
   845 // CUpnpDispatcherEngine::MacAddressL