natplugins/natptraversalcontroller/inc/cnatbindingstunrefresher.h
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2007 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 #ifndef CNATBINDINGSTUNREFRESHER_H
       
    19 #define CNATBINDINGSTUNREFRESHER_H
       
    20 
       
    21 //  INCLUDES
       
    22 #include "cnatbindingrefresher.h"
       
    23 
       
    24 // FORWARD DECLARATIONS
       
    25 class CNATBinding;
       
    26 
       
    27 // CLASS DECLARATION
       
    28 /**
       
    29 * A class for STUN based NAT binding refresh.
       
    30 */
       
    31 class CNATBindingSTUNRefresher : public CNATBindingRefresher
       
    32     {
       
    33     public:  // Constructors and destructor
       
    34 
       
    35         CNATBindingSTUNRefresher(
       
    36             CDeltaTimer& aDeltaTimer,
       
    37             TInt aRefreshInterval,
       
    38             MNATBindingRefresherObserver& aObserver,
       
    39             CNATBinding& aNATBinding );
       
    40 
       
    41         ~CNATBindingSTUNRefresher();
       
    42 
       
    43     public: // From CNATBindingRefresher
       
    44 
       
    45         TBool HasSocket(const RSocket& aSocket) const;
       
    46 
       
    47     protected: // From CNATBindingRefresher
       
    48 
       
    49         TInt RefreshInterval();
       
    50 
       
    51         virtual void RefreshTimerExpiredL();
       
    52 
       
    53         virtual void CancelRefresh();
       
    54 
       
    55     protected: // Data
       
    56 
       
    57         CNATBinding& iNATBinding;
       
    58 
       
    59     private: // Data
       
    60 
       
    61         TInt iRefreshInterval;
       
    62         TInt64 iRandomSeed;
       
    63 
       
    64     friend class UT_CNATBindingSTUNRefresher;
       
    65     };
       
    66 
       
    67 #endif // CNATBINDINGSTUNREFRESHER_H
       
    68 
       
    69 // End of File