libraries/clogger/inc/SessionWriter.h
changeset 0 7f656887cf89
equal deleted inserted replaced
-1:000000000000 0:7f656887cf89
       
     1 // SessionWriter.h
       
     2 // 
       
     3 // Copyright (c) 2008 - 2010 Accenture. All rights reserved.
       
     4 // This component and the accompanying materials are made available
       
     5 // under the terms of the "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 // Accenture - Initial contribution
       
    11 //
       
    12 
       
    13 #ifndef SESSIONWRITER_H
       
    14 #define SESSIONWRITER_H
       
    15 
       
    16 #include <e32base.h>
       
    17 
       
    18 class CSessionWriter;
       
    19 class CSessionWriterServer;
       
    20 class CCloggerServer;
       
    21 
       
    22 class CSessionWriterSession : public CSession2
       
    23 	{
       
    24 public:
       
    25 	TBool WaitingForClient();
       
    26 	void WriteBuffer(const TDesC8& aBuf);
       
    27 
       
    28 private:
       
    29 	void ServiceL(const RMessage2 &aMessage);
       
    30 	CSessionWriterServer& Server();
       
    31 	~CSessionWriterSession();
       
    32 
       
    33 private:
       
    34 	TAny* iClientSharedChunkBase;
       
    35 	RMessagePtr2 iSessionWriterMessage;
       
    36 	CSessionWriter* iSessionWriter;
       
    37 	TBool iWaitingForClient;
       
    38 	};
       
    39 
       
    40 class CSessionWriterServer : public CServer2
       
    41 	{
       
    42 public:
       
    43 	CSessionWriterServer(CCloggerServer& aCloggerServer);
       
    44 	void ConstructL();
       
    45 	CCloggerServer& CloggerServer() { return iCloggerServer; }
       
    46 
       
    47 private:
       
    48 	CSession2* NewSessionL(const TVersion &aVersion, const RMessage2 &aMessage) const;
       
    49 
       
    50 private:
       
    51 	CCloggerServer& iCloggerServer;
       
    52 	};
       
    53 
       
    54 #endif