|
1 /* |
|
2 * Copyright (c) 2005-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: Implements the import functionality of CESMRAgnVersit2 |
|
15 * |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef CESMRAGNVERSIT2_H |
|
20 #define CESMRAGNVERSIT2_H |
|
21 |
|
22 // User includes |
|
23 #include "cesmragnexternalinterface.h" //CESMRAgnExternalInterface |
|
24 |
|
25 // Forward class declarations. |
|
26 class CESMRAgnVersit2StringProvider; |
|
27 class CESMRAgnVersit2Exporter; |
|
28 class CESMRAgnVersit2Importer; |
|
29 class RReadStream; |
|
30 class RWriteStream; |
|
31 |
|
32 /** |
|
33 * Implementation of CESMRAgnExternalInterface for iCalendar files. Objects of this |
|
34 * type are instantiated through the ECOM plugin mechanism in response to a mime |
|
35 * type of text/calendar. |
|
36 * @internalTechnology |
|
37 */ |
|
38 class CESMRAgnVersit2 : public CESMRAgnExternalInterface |
|
39 { |
|
40 public: // Construction/destruction. |
|
41 /** |
|
42 * Two stage constructor for AgnVersit2 objects. This is used during plugin |
|
43 * instantiation and should not be called directly from client applications. |
|
44 * @return A new CESMRAgnVersit2 object. |
|
45 * @publishedAll |
|
46 */ |
|
47 static CESMRAgnVersit2* NewL(); |
|
48 |
|
49 /** |
|
50 * C++ Destructor. |
|
51 */ |
|
52 ~CESMRAgnVersit2(); |
|
53 |
|
54 public: // Methods. |
|
55 /** |
|
56 * Takes an array of agenda entries and a stream of iCalendar formatted text, and |
|
57 * adds entries to the array representing the components in the stream. This |
|
58 * implements CESMRAgnExternalInterface::ImportL. |
|
59 * @see CESMRAgnExternalInterface::ImportL() |
|
60 * @param aEntries An array onto which new entries will be appended. |
|
61 * @param aReadStream A stream from which to read the iCalendar information. The |
|
62 * client is responsible for opening the stream before calling this function, and |
|
63 * is also responsible for closing it again. |
|
64 * @param aFlags not used in this implementation. |
|
65 * @param aObserver A mechanism for error reporting and handling. |
|
66 * @publishedAll |
|
67 */ |
|
68 void ImportL(RPointerArray<CCalEntry>& aEntries, |
|
69 RReadStream& aReadStream, |
|
70 TUint aFlags, |
|
71 MESMRAgnImportObserver& aObserver); |
|
72 |
|
73 /** |
|
74 * This implements CESMRAgnExternalInterface::ExportL. |
|
75 * @see CESMRAgnExternalInterface::ExportL() |
|
76 * @param aEntry Calendar entry to be exported. |
|
77 * @param aWriteStream Stream to write output to. The client is responsible for |
|
78 * opening the stream before calling this function, and is also responsible for |
|
79 * closing it again. |
|
80 * @param aFlags Not used in this implementation. |
|
81 * @param aObserver Export observer to handle errors. |
|
82 * @publishedAll |
|
83 */ |
|
84 void ExportL(const CCalEntry& aEntry, |
|
85 RWriteStream& aWriteStream, |
|
86 TUint aFlags, |
|
87 MESMRAgnExportObserver& aObserver); |
|
88 |
|
89 /** |
|
90 * This implements CESMRAgnExternalInterface::ExportL. |
|
91 * @see CESMRAgnExternalInterface::ExportL() |
|
92 * @param aEntries array of Calendar entries to be exported. |
|
93 * @param aWriteStream Stream to write output to. The client is responsible for |
|
94 * opening the stream before calling this function, and is also responsible for |
|
95 * closing it again. |
|
96 * @param aFlags Not used in this implementation. |
|
97 * @param aObserver Export observer to handle errors. |
|
98 * @publishedAll |
|
99 */ |
|
100 void ExportL(RPointerArray<CCalEntry>& aEntries, |
|
101 RWriteStream& aWriteStream, |
|
102 TUint aFlags, |
|
103 MESMRAgnExportObserver& aObserver); |
|
104 |
|
105 private: // Construction/destruction. |
|
106 CESMRAgnVersit2(); |
|
107 void ConstructL(); |
|
108 |
|
109 private: // Members. |
|
110 CESMRAgnVersit2StringProvider* iStringProvider; |
|
111 CESMRAgnVersit2Exporter* iExporter; |
|
112 CESMRAgnVersit2Importer* iImporter; |
|
113 }; |
|
114 |
|
115 #endif |
|
116 |
|
117 // End of file. |