plugins/networking/tcpcsy/src/connector.h
changeset 0 7f656887cf89
equal deleted inserted replaced
-1:000000000000 0:7f656887cf89
       
     1 // connector.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 __CONNECTOR_H__
       
    14 #define __CONNECTOR_H__
       
    15 
       
    16 #include <e32std.h>
       
    17 #include <e32base.h>
       
    18 #include <es_sock.h>
       
    19 
       
    20 
       
    21 class MConnectorObserver
       
    22 	{
       
    23 public:
       
    24 	virtual void ConnectionComplete(TInt aError) = 0;
       
    25 	};
       
    26 
       
    27 
       
    28 class CConnector : public CActive
       
    29 	{
       
    30 public:
       
    31 	static CConnector* NewL(RSocketServ& aSocketServ, RSocket& aSocket, TUint aProtocolFamily, TUint aProtocol, const TSockAddr& aSockAddr, MConnectorObserver& aObserver);
       
    32 	~CConnector();
       
    33 private:
       
    34 	CConnector(RSocket& aSocket, MConnectorObserver& aObserver);
       
    35 	void ConstructL(RSocketServ& aSocketServ, TUint aProtocolFamily, TUint aProtocol, const TSockAddr& aSockAddr);
       
    36 private: // From CActive.
       
    37 	void RunL();
       
    38 	void DoCancel();
       
    39 private:
       
    40 	RSocket& iSocket;
       
    41 	MConnectorObserver& iObserver;
       
    42 	};
       
    43 
       
    44 #endif // __CONNECTOR_H__
       
    45