email/imap4mtm/imaptransporthandler/inc/csecuresocketcontroller.h
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef __CSECURESOCKETCONTROLLER_H__
       
    17 #define __CSECURESOCKETCONTROLLER_H__
       
    18 
       
    19 #include <e32base.h>
       
    20 #include <securesocket.h>
       
    21 
       
    22 // Forward declarations
       
    23 class MCommsInfoProvider;
       
    24 
       
    25 /**
       
    26 The CSecureSocketController class provides an implementation of a secure 
       
    27 socket controller for a socket to use.
       
    28 
       
    29 @internalTechnology
       
    30 @prototype
       
    31 */
       
    32 class CSecureSocketController : public CBase
       
    33 	{
       
    34 public:
       
    35 	static CSecureSocketController* NewL(RSocket& aSocket, MCommsInfoProvider& aCommsInfoProvider);
       
    36 	virtual ~CSecureSocketController();
       
    37 
       
    38 	void StartSecureHandshakeL(TRequestStatus& aStatus, const TDesC8& aSSLDomainName);
       
    39 	void RecvOneOrMore(TDes8& aBuffer, TRequestStatus& aStatus, TSockXfrLength& aLength);
       
    40 	void CancelRecv();
       
    41 	void Send(const TDesC8& aBuffer, TRequestStatus& aStatus);
       
    42 	void CancelSend();
       
    43 	void CancelHandshake();
       
    44 
       
    45 private:
       
    46 	CSecureSocketController(RSocket& aSocket, MCommsInfoProvider& aCommsInfoProvider);
       
    47 
       
    48 private:
       
    49 	RSocket& iSocket;
       
    50 	MCommsInfoProvider& iCommsInfoProvider;
       
    51 	CSecureSocket* iTlsSocket;
       
    52 	};
       
    53 
       
    54 #endif	// __CSECURESOCKETCONTROLLER_H__