vpnengine/ikesocket/inc/receiver.h
changeset 19 c29f8e059978
parent 0 33413c0669b9
--- a/vpnengine/ikesocket/inc/receiver.h	Fri Apr 16 16:02:48 2010 +0300
+++ b/vpnengine/ikesocket/inc/receiver.h	Mon May 03 13:28:39 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -68,7 +68,7 @@
  *  
  *  @lib ikesocket.lib
  */
-NONSHARABLE_CLASS( CReceiver ) : private CActive
+NONSHARABLE_CLASS( CReceiver ) : private CTimer
     {
 public:
     /**
@@ -113,9 +113,10 @@
 
     enum TReceiverState
         {
-        EIdle,          // Idle
-        EWaitingData,   // Waiting data to become available for reading
-        EReceiving      // Receiving data
+        EIdle,                   // Idle
+        EWaitingData,            // Waiting data to become available for reading
+        EReceiving,              // Receiving data
+        EWaitingAfterSocketError // Waiting after socket error 
         };    
 
     CReceiver( RSocket& aSocket,
@@ -141,8 +142,11 @@
     
     /**
      * Handles error in receiving.
+     * @param aStatus Error status
+     * @param aSocket Informs if delay needed
      */
-    void HandleError( const TInt aStatus );
+    void HandleError( const TInt aStatus,
+                      const TBool aDelayNeeded = EFalse );
     
     /**
      * Notifies client that data has been received.
@@ -180,7 +184,13 @@
      * Own.
      */
     TReceiverState      iState;
-        
+       
+    /**
+     * Maximum error count.
+     * Own.
+     */
+    TInt                iErrorCount;
+    
     /**
      * Message data.
      * Own.