Msrp/MsrpServer/inc/CMSRPWriter.h
branchMSRP_FrameWork
changeset 25 505ad3f0ce5c
child 58 cdb720e67852
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 CMSRPWRITER_H
       
    18 #define CMSRPWRITER_H
       
    19 
       
    20 // INCLUDES
       
    21 #include <e32base.h>
       
    22 #include <in_sock.h>
       
    23 #include "MMSRPWriter.h"
       
    24 #include "MMSRPWriterObserver.h"
       
    25 
       
    26 
       
    27 class MMSRPWriterObserver;
       
    28 class MMSRPWriterErrorObserver;
       
    29 
       
    30 // CLASS DECLARATIONS
       
    31 /**
       
    32  * The socket reader request interface.
       
    33  */
       
    34 
       
    35 class CMSRPWriter : public CActive, public MMSRPWriter
       
    36     {
       
    37  public:
       
    38 
       
    39      // Constructors and destructor
       
    40      static MMSRPWriter* NewL(RSocket& aSocket, MMSRPWriterErrorObserver& aConnection );
       
    41      virtual ~CMSRPWriter();
       
    42       
       
    43      virtual void RequestSendL(MMSRPWriterObserver& aMsg);
       
    44      
       
    45  protected: // from CActive
       
    46      void DoCancel();
       
    47      void RunL();
       
    48      TInt RunError(TInt aError);
       
    49     
       
    50  private:
       
    51      CMSRPWriter(RSocket& aSocket, MMSRPWriterErrorObserver& aConnection);
       
    52      void ConstructL();
       
    53      void SendL();
       
    54 
       
    55  private: // data
       
    56      MMSRPWriterErrorObserver& iConnection;  
       
    57      RSocket& iSocket;     
       
    58      RPointerArray<MMSRPWriterObserver> iSendQueue;
       
    59      TBool iWriteIssued;
       
    60     };     
       
    61 
       
    62 #endif // CMSRPWRITER_H
       
    63 
       
    64 // End of file