64
|
1 |
/*
|
|
2 |
* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "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 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description: ESMR imap calendar entry retriever definition
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef CESMRIMAPICALRETRIEVER_H
|
|
20 |
#define CESMRIMAPICALRETRIEVER_H
|
|
21 |
|
|
22 |
#include <e32base.h>
|
|
23 |
//<cmail>
|
|
24 |
#include "mesmragnimportobserver.h"
|
|
25 |
#include "cfsmailcommon.h"
|
|
26 |
//</cmail>
|
|
27 |
#include "cesmricalviewerasynccommand.h"
|
|
28 |
|
|
29 |
class CFSMailClient;
|
|
30 |
class CCalEntry;
|
|
31 |
class CESMRAgnExternalInterface;
|
|
32 |
class CFSMailMessagePart;
|
|
33 |
class CESMRImapMailFetcherCmd;
|
|
34 |
class TESMRInputParams;
|
|
35 |
class CESMRAttachmentInfo;
|
|
36 |
|
|
37 |
/**
|
|
38 |
* CESMRImapIcalRetriever is responsible for parsing iCal information
|
|
39 |
* from email message and importing it to calendar entry.
|
|
40 |
*/
|
|
41 |
NONSHARABLE_CLASS( CESMRImapIcalRetrieverCmd ) :
|
|
42 |
public CESMRIcalViewerAsyncCommand,
|
|
43 |
public MESMRAgnImportObserver,
|
|
44 |
public MESMRIcalViewerObserver
|
|
45 |
{
|
|
46 |
public: // Construction and destruction
|
|
47 |
/**
|
|
48 |
* Creates and initializes new CESMRInfoIcalRetriever object. Ownership
|
|
49 |
* is transferred to caller.
|
|
50 |
* @param aCalSession Reference to calendar database session.
|
|
51 |
* @param aMailClient Reference to mail client.
|
|
52 |
* @param aInputParametes Reference to input parameter structure.
|
|
53 |
* @return Pointer to CESMRInfoIcalRetriever object.
|
|
54 |
*/
|
|
55 |
static CESMRImapIcalRetrieverCmd* NewL(
|
|
56 |
CCalSession& aCalSession,
|
|
57 |
CFSMailClient& aMailClient,
|
|
58 |
TESMRInputParams& aInputParameters );
|
|
59 |
|
|
60 |
/**
|
|
61 |
* C++ destructor.
|
|
62 |
*/
|
|
63 |
~CESMRImapIcalRetrieverCmd();
|
|
64 |
|
|
65 |
public: // From MESMRIcalViewerAsyncCommand
|
|
66 |
void ExecuteAsyncCommandL();
|
|
67 |
void CancelAsyncCommand();
|
|
68 |
|
|
69 |
public: // From MAgnImportObserver
|
|
70 |
MESMRAgnImportObserver::TImpResponse AgnImportErrorL(
|
|
71 |
MESMRAgnImportObserver::TImpError aType,
|
|
72 |
const TDesC8& aUid,
|
|
73 |
const TDesC& aContext);
|
|
74 |
|
|
75 |
public: // From MESMRAgnImportObserver
|
|
76 |
void OperationCompleted(
|
|
77 |
MESMRIcalViewerObserver::TIcalViewerOperationResult aResult );
|
|
78 |
void OperationError(
|
|
79 |
MESMRIcalViewerObserver::TIcalViewerOperationResult aResult );
|
|
80 |
|
|
81 |
private: // Implementation
|
|
82 |
CESMRImapIcalRetrieverCmd(
|
|
83 |
CCalSession& aCalSession,
|
|
84 |
CFSMailClient& aMailClient,
|
|
85 |
TESMRInputParams& aInputParameters );
|
|
86 |
void ConstructL();
|
|
87 |
void CreateEntryL(
|
|
88 |
CFSMailMessagePart& aMessagePart,
|
|
89 |
CFSMailMessage& aMsg);
|
|
90 |
void HandleMailContentL();
|
|
91 |
|
|
92 |
private: // Data
|
|
93 |
/// Own: Calendar entry object
|
|
94 |
CCalEntry* iConvertedEntry;
|
|
95 |
/// Own: ICal importer object
|
|
96 |
CESMRAgnExternalInterface* iCalImporter;
|
|
97 |
/// Own: Mail fetcher
|
|
98 |
CESMRImapMailFetcherCmd* iMailFetcher;
|
|
99 |
/// Ref: Reference to mail client object
|
|
100 |
CFSMailClient& iMailClient;
|
|
101 |
/// Ref: Reference to input parameter structure
|
|
102 |
TESMRInputParams& iInputParameters;
|
|
103 |
/// Own: Command result
|
|
104 |
MESMRIcalViewerObserver::TIcalViewerOperationResult iResult;
|
|
105 |
/// Own: ICS filename
|
|
106 |
HBufC* iIcsFilename;
|
|
107 |
/// Own: Calendar part message id
|
|
108 |
TFSMailMsgId iCalendarPartId;
|
|
109 |
};
|
|
110 |
|
|
111 |
#endif // CESMRIMAPICALRETRIEVER_H
|
|
112 |
|
|
113 |
// EOF
|