upnp/upnpstack/controlpointbase/src/upnpcpbinitialeventretry.cpp
changeset 0 f5a58ecadc66
equal deleted inserted replaced
-1:000000000000 0:f5a58ecadc66
       
     1 /** @file
       
     2 * Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies  this distribution, and is available 
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  
       
    15 *
       
    16 */
       
    17 
       
    18 #include "upnpcpbinitialeventretry.h"
       
    19 #include "upnpcpbinitialeventretryhandler.h"
       
    20 #include "upnpgenamessage.h"
       
    21 
       
    22 // -----------------------------------------------------------------------------
       
    23 // CUpnpCpbInitialEventRetry::NewLC
       
    24 // Ownership of aMessage is passed through 
       
    25 // -----------------------------------------------------------------------------
       
    26 //
       
    27 CUpnpCpbInitialEventRetry* CUpnpCpbInitialEventRetry::NewLC( 
       
    28         CUpnpGenaMessage* aMessage, CUpnpCpbInitialEventRetryHandler& iOwner )
       
    29     {
       
    30     CleanupStack::PushL( aMessage );
       
    31     //ownership is passed through
       
    32     CUpnpCpbInitialEventRetry* self = new ( ELeave ) CUpnpCpbInitialEventRetry( aMessage, iOwner );
       
    33     CleanupStack::Pop( aMessage );
       
    34     CleanupStack::PushL( self ); 
       
    35     self->ConstructL();
       
    36     return self;
       
    37     }
       
    38 
       
    39         
       
    40 // -----------------------------------------------------------------------------
       
    41 // CUpnpCpbInitialEventRetry::CUpnpCpbInitialEventRetry
       
    42 //
       
    43 // -----------------------------------------------------------------------------
       
    44 //
       
    45 CUpnpCpbInitialEventRetry::CUpnpCpbInitialEventRetry( 
       
    46             CUpnpGenaMessage* aMessage, CUpnpCpbInitialEventRetryHandler& iOwner ): 
       
    47             CTimer(CActive::EPriorityStandard), iMessage( aMessage ), iOwner( iOwner )
       
    48     {   
       
    49     CActiveScheduler::Add( this );
       
    50     }        
       
    51 
       
    52 // -----------------------------------------------------------------------------
       
    53 // CUpnpCpbInitialEventRetry::ConstrucL
       
    54 //
       
    55 // -----------------------------------------------------------------------------
       
    56 //
       
    57 void CUpnpCpbInitialEventRetry::ConstrucL()
       
    58     {
       
    59     CTimer::ConstructL();
       
    60     }
       
    61 
       
    62 // -----------------------------------------------------------------------------
       
    63 // CUpnpCpbInitialEventRetry::RunL
       
    64 //
       
    65 // -----------------------------------------------------------------------------
       
    66 //
       
    67 void CUpnpCpbInitialEventRetry::RunL()
       
    68    {           
       
    69    iOwner.TimerExpired( this );
       
    70    }
       
    71 
       
    72 // -----------------------------------------------------------------------------
       
    73 // CUpnpCpbInitialEventRetry::Message
       
    74 //
       
    75 // -----------------------------------------------------------------------------
       
    76 //
       
    77 CUpnpGenaMessage& CUpnpCpbInitialEventRetry::Message()
       
    78     {
       
    79     return *iMessage;
       
    80     }
       
    81 
       
    82 // -----------------------------------------------------------------------------
       
    83 // CUpnpCpbInitialEventRetry::~CUpnpCpbInitialEventRetry
       
    84 //
       
    85 // -----------------------------------------------------------------------------
       
    86 //
       
    87 CUpnpCpbInitialEventRetry::~CUpnpCpbInitialEventRetry()
       
    88     { 
       
    89     delete iMessage;
       
    90     }
       
    91 
       
    92 
       
    93