|
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 __CALATTACHMENTMANAGERIMPL_H__ |
|
17 #define __CALATTACHMENTMANAGERIMPL_H__ |
|
18 |
|
19 #include "calattachmentmanager.h" |
|
20 #include "agmattachment.h" |
|
21 |
|
22 class CAgnAttachment; |
|
23 class CCalAttachmentIteratorImpl; |
|
24 class CCalSessionImpl; |
|
25 |
|
26 /** |
|
27 Implementation of the CCalAttachmentManager. |
|
28 @internalComponent |
|
29 */ |
|
30 class CCalAttachmentManagerImpl : public CBase |
|
31 { |
|
32 public: |
|
33 static CCalAttachmentManagerImpl* NewL(CCalSession& aSession, MCalProgressCallBack& aProgressCallBack); |
|
34 ~CCalAttachmentManagerImpl(); |
|
35 |
|
36 CCalAttachmentIteratorImpl* FetchAttachmentsL(CCalAttachmentManager::TSortOrder aSortType) const; |
|
37 |
|
38 void EntriesReferencingFileAttachmentL(RArray<TCalLocalUid>& aUids, const CAgnAttachment& aAttachment); |
|
39 private: |
|
40 CCalAttachmentManagerImpl(CCalSession& aSession); |
|
41 void ConstructL(MCalProgressCallBack& aProgressCallBack); |
|
42 |
|
43 private: |
|
44 CCalSessionImpl& iCalSessionImpl; |
|
45 }; |
|
46 |
|
47 /** |
|
48 Implementation of the CCalAttachmentIterator. |
|
49 @internalComponent |
|
50 */ |
|
51 class CCalAttachmentIteratorImpl : public CBase |
|
52 { |
|
53 public: |
|
54 CCalAttachmentIteratorImpl(CCalSessionImpl& aSession); |
|
55 ~CCalAttachmentIteratorImpl(); |
|
56 |
|
57 TBool HasMore() const; |
|
58 CCalAttachment* NextL(); |
|
59 TInt Count() const; |
|
60 |
|
61 void AppendL(TCalAttachmentUid aId); |
|
62 |
|
63 private: |
|
64 RArray<TCalAttachmentUid> iArray; |
|
65 TInt iTotalAttachments; |
|
66 CCalSessionImpl& iCalSessionImpl; |
|
67 }; |
|
68 |
|
69 #endif // __CALATTACHMENTMANAGERIMPL_H__ |
|
70 |