|
1 /* |
|
2 * Copyright (c) 2002 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: Declaration of class CMsgAttachmentVerifier |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MSGATTACHMENTVERIFIER_H |
|
20 #define MSGATTACHMENTVERIFIER_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include <MMGFetchVerifier.h> |
|
25 #include <MAknFileSelectionObserver.h> |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class MsgMailDRMHandler; |
|
29 class CMsvSession; |
|
30 |
|
31 // CLASS DECLARATION |
|
32 |
|
33 /** |
|
34 * Attachment verifier for MG fetch |
|
35 * @since 2.5 |
|
36 */ |
|
37 class CMsgAttachmentVerifier: public CBase, |
|
38 public MMGFetchVerifier, public MAknFileSelectionObserver |
|
39 { |
|
40 |
|
41 public: // Constructors and destructor |
|
42 |
|
43 /** |
|
44 * Two-phased constructor. |
|
45 */ |
|
46 static CMsgAttachmentVerifier* NewLC( CMsvSession& aMsvSession ); |
|
47 |
|
48 /** |
|
49 * Destructor. |
|
50 */ |
|
51 ~CMsgAttachmentVerifier(); |
|
52 |
|
53 private: |
|
54 // From MMGFetchVerifier |
|
55 TBool VerifySelectionL( const MDesCArray* aSelectedFiles ); |
|
56 // From MAknFileSelectionObserver |
|
57 TBool OkToExitL( const TDesC& aDriveAndPath, const TEntry& aEntry ); |
|
58 |
|
59 private: |
|
60 |
|
61 /** |
|
62 * C++ default constructor. |
|
63 */ |
|
64 CMsgAttachmentVerifier( CMsvSession& aMsvSession ); |
|
65 |
|
66 /** |
|
67 * 2nd phase constructor. |
|
68 */ |
|
69 void ConstructL(); |
|
70 |
|
71 private: // implementation |
|
72 |
|
73 TBool VerifyFileL( const TDesC& aFilename, |
|
74 TInt& aFileByteSize ); |
|
75 |
|
76 TBool VerifyDiskSpaceL( TInt aAttachmentsByteSize ); |
|
77 |
|
78 protected: // Data |
|
79 |
|
80 CMsvSession& iMsvSession; |
|
81 |
|
82 MsgMailDRMHandler* iDRMHandler; |
|
83 }; |
|
84 |
|
85 #endif // MSGATTACHMENTVERIFIER_H |
|
86 |
|
87 // End of File |