email/imap4mtm/imapservermtm/inc/cimapupsresponsewaiter.h
changeset 0 72b543305e3a
child 33 94cccd85bd25
child 40 224522e33db9
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     1 // cimapupsresponsewaiter.h
       
     2 
       
     3 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     4 // All rights reserved.
       
     5 // This component and the accompanying materials are made available
       
     6 // under the terms of "Eclipse Public License v1.0"
       
     7 // which accompanies this distribution, and is available
       
     8 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     9 //
       
    10 // Initial Contributors:
       
    11 // Nokia Corporation - initial contribution.
       
    12 //
       
    13 // Contributors:
       
    14 //
       
    15 // Description:
       
    16 //
       
    17 
       
    18 #ifndef __CIMAPUPSRESPONSEWAITER_H__
       
    19 #define __CIMAPUPSRESPONSEWAITER_H__
       
    20 
       
    21 #include <e32base.h>
       
    22 #include <mentact.h>
       
    23 #include <ups/upsclient.h>
       
    24 
       
    25 using namespace UserPromptService;
       
    26 
       
    27 class CMsvServerEntry;
       
    28 class CImapProtocolController;
       
    29 class CMsgActive;
       
    30 class CMsvEntrySelection;
       
    31 
       
    32 /**
       
    33 An class that is used for connect to the UPS server and check if the client is authorised
       
    34 to connect to the remote server.
       
    35 @internalComponent
       
    36 @released
       
    37 */
       
    38 
       
    39 NONSHARABLE_CLASS (CImapUpsResponseWaiter) : public CMsgActive
       
    40 	{
       
    41 public:
       
    42 	static CImapUpsResponseWaiter* NewL(CMsvServerEntry& aServerEntry, CImapProtocolController& aImapProtocolController);
       
    43 	~CImapUpsResponseWaiter();
       
    44 	void AuthoriseAndConnectL(CMsvEntrySelection& aEntrySelection, TInt aCommand, TThreadId aClientThreadId, TBool aHasCapability, TRequestStatus& aStatus);
       
    45 	
       
    46 protected:
       
    47 	CImapUpsResponseWaiter(CMsvServerEntry& aServerEntry, CImapProtocolController& aImapProtocolController);
       
    48 
       
    49 	// from CMsgActive;
       
    50 	void DoRunL();
       
    51 	void DoCancel();
       
    52 private:
       
    53 	CMsvServerEntry& 			iServerEntry;
       
    54 	CImapProtocolController& 	iImapProtocolController;
       
    55 	CMsvEntrySelection* 		iEntrySelection;
       
    56 	/** For interaction with UPS server */
       
    57 	RUpsSession 				iUpsSession;
       
    58 	RUpsSubsession 				iUpsSubsession;
       
    59 	TUpsDecision 				iDecision;
       
    60 	enum TImapConnectState
       
    61 		{
       
    62 		EIMAP4MTMDisConnected,
       
    63 		EIMAP4MTMConnect, 
       
    64 		EIMAP4MTMConnectAndSynchronise, 
       
    65 		EIMAP4MTMConnected
       
    66 		}iState;
       
    67 	};
       
    68 
       
    69 #endif// __CIMAPUPSRESPONSEWAITER_H__