void CNcdNodeFolder::ExpireAndRemoveChildrenL()
    {
    DLTRACEIN((""));
    TInt count = iChildren.Count();
    
    CNcdNode* node = NULL;
    
    RPointerArray<CNcdExpiredNode> expiredNodes;
    CleanupResetAndDestroyPushL( expiredNodes );
    expiredNodes.ReserveL( count );
    
    while( count-- ) 
        {        
        node = NodeManager().NodePtrL( iChildren[ count ]->Identifier() );
        if ( node )
            {
            NodeManager().SetNodeExpiredL( *node, EFalse, EFalse, expiredNodes );
             
            }
        }
    CleanupStack::PopAndDestroy( &expiredNodes );
    // Delete child metadatas from disk cache
    NodeManager().RemoveChildrenMetadataL( *this );
    
    // Empty children lists
    RemoveChildren();    
    }
void CIAUpdateNodeDetails::GetDependenciesL( 
    RPointerArray< CIAUpdateNodeDependency >& aDependencies ) const
    {
    aDependencies.ReserveL( iDependencies.Count() );
    for( TInt i = 0; i < iDependencies.Count(); ++i )
        {
        aDependencies.AppendL( iDependencies[ i ] );
        }    
    }
void CActiveSocket::NewL(RSocketServ& aSocketServ, RPointerArray<CActiveSocket>& aActiveSockets, Wap::TBearer aBearer, TWapMessageType aType, MProgressNotify* aNotify, const TSockAddr& aRemoteAddr, RConnection* aConnection)
/**
The static new function instanciates corresponding Bearers in terms of the input bearer type.
This function is used by Fully specified Wap APIs which will open a socket with a single, named remote host. 
@internalComponent
@released
@since v8.0
@param aSocketServ the shared RSocketServ instance used in the Wap messaging API which owns this bearer
@param aActiveSockets the bearer array used in the Wap messaging API which owns the bearer
@param aBearer the bearer to listen on (use EAll for all bearers)
@param aType the type of the wap message that will received
@param aNotify the instance to be notified when a wap message is received
@param aRemoteAddr the remote host to be communicate with
@param aConnection the shared connection from Wap messaging API client
*/
	{
	//Instanciate the corresponding
	switch(aBearer)
		{
		case Wap::ESMS7:
		case Wap::ESMS:
		case Wap::EWAPSMS7:
		case Wap::EWAPSMS:
			{
			CActiveSocket* me = new(ELeave) CActiveSocketSMS(aSocketServ, aNotify, aBearer, aRemoteAddr);
			CleanupStack::PushL(me);
			me->ConstructL(aType);
            aActiveSockets.AppendL(me);
			CleanupStack::Pop(me);
			break;
			}
		case Wap::EIP:
			{
			CActiveSocket* me = new(ELeave) CActiveSocketUDP(aSocketServ, aNotify, aBearer, aRemoteAddr, aConnection);
			CleanupStack::PushL(me);
			me->ConstructL(aType);
            aActiveSockets.AppendL(me);
			CleanupStack::Pop(me);
			break;
			}
		case Wap::EAll:
			{
			CActiveSocket* me = new(ELeave) CActiveSocketUDP(aSocketServ, aNotify, aBearer, aRemoteAddr, aConnection);
			CleanupStack::PushL(me);
			me->ConstructL(aType);
			CActiveSocket* me1 = new(ELeave) CActiveSocketSMS(aSocketServ, aNotify, aBearer, aRemoteAddr);
			CleanupStack::PushL(me1);
			me1->ConstructL(aType);
            aActiveSockets.ReserveL(2); // pre-allocate the memory    
			aActiveSockets.AppendL(me1);
            CleanupStack::Pop(me1);
            aActiveSockets.AppendL(me);
            CleanupStack::Pop(me);
			break;
			}
		default:
		    {
		    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CACTIVESOCKET_NEWL_1_1, "CActiveSocket::NewL Unknown Bearer Type");
			User::Leave(Wap::EBearerError);
		    }
		}
	}