Msrp/MsrpServer/inc/CMSRPReader.h
branchMSRP_FrameWork
changeset 25 505ad3f0ce5c
equal deleted inserted replaced
22:f1578314b8da 25:505ad3f0ce5c
       
     1 /*
       
     2 * Copyright (c) 2009-2010 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 * Initial Contributors:
       
     9 * Nokia Corporation - initial contribution.
       
    10 * Contributors:
       
    11 *
       
    12 * Description:
       
    13 * MSRP Implementation
       
    14 *
       
    15 */
       
    16 
       
    17 #ifndef CMSRPREADER_H
       
    18 #define CMSRPREADER_H
       
    19 
       
    20 // INCLUDES
       
    21 #include <e32base.h>
       
    22 #include <in_sock.h>
       
    23 #include "MMSRPReader.h"
       
    24 #include "MMSRPReaderObserver.h"
       
    25 #include "MSRPBuffer.h"
       
    26 
       
    27 class MMSRPReaderObserver;
       
    28 // CLASS DECLARATIONS
       
    29 /**
       
    30  * The socket reader request interface.
       
    31  */
       
    32 
       
    33 class CMSRPReader : public CActive, public MMSRPReader
       
    34     {
       
    35  public:
       
    36 
       
    37      // Constructors and destructor
       
    38      static MMSRPReader* NewL(RSocket& aSocket, MMSRPReaderObserver& aConnection);
       
    39      virtual ~CMSRPReader();
       
    40       
       
    41      virtual void StartReceivingL(RMsrpBuf aBuf);
       
    42      
       
    43  protected: // from CActive
       
    44      void DoCancel();
       
    45      void RunL();
       
    46      TInt RunError(TInt aError);
       
    47     
       
    48  private:
       
    49      CMSRPReader(RSocket& aSocket, MMSRPReaderObserver& aConnection);
       
    50      void ConstructL();     
       
    51 
       
    52  private: // data
       
    53      MMSRPReaderObserver& iConnection;  
       
    54      RSocket& iSocket;    
       
    55      TSockXfrLength iNumberOfBytesRead;
       
    56      RMsrpBuf* iBuf;
       
    57     };
       
    58      
       
    59  
       
    60 
       
    61 #endif // CMSRPREADER_H
       
    62 
       
    63 // End of file