|
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 __CIMAPLOGIN_H__ |
|
17 #define __CIMAPLOGIN_H__ |
|
18 |
|
19 #include <e32std.h> |
|
20 #include "cimapcommand.h" |
|
21 #include "cimapcapability.h" |
|
22 |
|
23 |
|
24 /** |
|
25 The CImapLogin class encapsulates the sending of the IMAP LOGIN |
|
26 command to the remote server. Some servers might also send back CAPABILITY response |
|
27 along with the LOGIN response. The class will parse the response data from the remote server. |
|
28 @internalTechnology |
|
29 @prototype |
|
30 */ |
|
31 class CImapLogin : public CImapCapability |
|
32 { |
|
33 public: |
|
34 // Construction and Destruction |
|
35 static CImapLogin* NewL(CImapFolderInfo* aSelectedFolderData, TInt aLogId, const TDesC8& aUserName, const TDesC8& aPassword, CImapCapabilityInfo& aCapabilityInfo); |
|
36 ~CImapLogin(); |
|
37 |
|
38 private: |
|
39 CImapLogin(CImapFolderInfo* aSelectedFolderData, TInt aLogId, CImapCapabilityInfo& aCapabilityInfo); |
|
40 void ConstructL(const TDesC8& aUserName, const TDesC8& aPassword); |
|
41 |
|
42 void CheckLiteralInUserNameAndPassword(); |
|
43 |
|
44 // Implements CImapCommand |
|
45 void SendMessageL(TInt aTagId, MOutputStream& aStream); |
|
46 void ParseContinuationResponseL(); |
|
47 |
|
48 TBool ParseTaggedResponseL(TInt aTagId); |
|
49 |
|
50 private: |
|
51 HBufC8* iUserName; |
|
52 HBufC8* iPassword; |
|
53 TBool iLiteralUsername; |
|
54 TBool iLiteralPassword; |
|
55 MOutputStream* iStream; |
|
56 TBool iSentUserNameLength; |
|
57 }; |
|
58 |
|
59 #endif // __CIMAPLOGIN_H__ |