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