natplugins/natptraversalcontroller/inc/ccrlfsender.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 CCRLFSENDER_H
       
    19 #define CCRLFSENDER_H
       
    20 
       
    21 //  INCLUDES
       
    22 #include <e32base.h>
       
    23 #include <es_sock.h>
       
    24 #include <securesocket.h>
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class MNATBindingRefresherObserver;
       
    28 
       
    29 
       
    30 // CLASS DECLARATION
       
    31 /**
       
    32 * A base class for sending CRLF bursts to network.
       
    33 */
       
    34 class CCRLFSender : public CActive
       
    35     {
       
    36     public:    // Constructors and destructor
       
    37 
       
    38         virtual ~CCRLFSender();
       
    39 
       
    40     public: // New functions
       
    41 
       
    42         virtual TBool PersistentConnectionRequired() const;
       
    43 
       
    44         virtual TBool HasSocket( const RSocket& aSocket ) const;
       
    45 
       
    46         virtual TBool HasSocket( const CSecureSocket& aSocket ) const;
       
    47 
       
    48         void Send();
       
    49 
       
    50     private: // From CActive
       
    51 
       
    52         void RunL();
       
    53 
       
    54     protected: // Constructors
       
    55 
       
    56         CCRLFSender( MNATBindingRefresherObserver& aObserver );
       
    57 
       
    58     protected: // New functions
       
    59 
       
    60         virtual void Send( const TDesC8& aData ) = 0;
       
    61 
       
    62         virtual TBool ReadyToSend();
       
    63 
       
    64         virtual void SendingCompleted();
       
    65 
       
    66     protected: // Data
       
    67 
       
    68         MNATBindingRefresherObserver& iObserver;
       
    69     };
       
    70 
       
    71 #endif // CCRLFSENDER_H
       
    72 
       
    73 // End of File