|
1 /* |
|
2 * Copyright (c) 2002-2006 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: This class handles send functionality in calendar application. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CALENSEND_H |
|
21 #define CALENSEND_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class CCalSession; |
|
28 class CCalEntry; |
|
29 class CEikMenuPane; |
|
30 class CSendUi; |
|
31 class TParse; |
|
32 class RFile; |
|
33 class CCalenGlobalData; |
|
34 |
|
35 |
|
36 NONSHARABLE_CLASS( CCalenSend ) : public CBase |
|
37 { |
|
38 public: // Factory method and destructor |
|
39 /** |
|
40 * Two phased constructor |
|
41 */ |
|
42 IMPORT_C static CCalenSend* NewL(TInt aMenuCommandId, |
|
43 CCalSession& aCalSession); |
|
44 /** |
|
45 * Desctructor |
|
46 */ |
|
47 IMPORT_C virtual ~CCalenSend(); |
|
48 |
|
49 public: // API |
|
50 /** |
|
51 * Send validity check. If one of the send method is selected |
|
52 * e.g. bluetooth/ infrared/ mesage, send is available. |
|
53 * @return ETrue if one of the send method is selected, EFalse |
|
54 * otherwise |
|
55 */ |
|
56 IMPORT_C TBool CanSendL(TInt aCommandId); |
|
57 |
|
58 /** |
|
59 * Add send menu item to the menu pan at position given |
|
60 */ |
|
61 IMPORT_C void DisplaySendMenuItemL(CEikMenuPane& aMenuPane, TInt aIndex); |
|
62 |
|
63 /** |
|
64 * Show send query and prompt user to select one of send option |
|
65 */ |
|
66 IMPORT_C void DisplaySendCascadeMenuL(); |
|
67 |
|
68 /** |
|
69 * Send an entry a vCal through sendui |
|
70 */ |
|
71 IMPORT_C void SendAsVCalendarL(TInt aCommand, CCalEntry& aEntry); |
|
72 |
|
73 private: // utility functions |
|
74 /** |
|
75 * Process "Send As" for attachment file |
|
76 */ |
|
77 void DoSendAsAttachmentFileL(TInt aCommand, TParse& aFilename); |
|
78 |
|
79 /** |
|
80 * Send attachment by passing file handle to the sendui |
|
81 */ |
|
82 void DoSendAsAttachmentHandleL(const RFile& aHandle); |
|
83 |
|
84 private: // constrution |
|
85 CCalenSend(CCalSession& aCalSession); |
|
86 void ConstructL(TInt aMenuCommandId); |
|
87 |
|
88 private: // data |
|
89 CSendUi* iSendUi; |
|
90 TInt iSendAsCmdId; |
|
91 TUid iSelectedMtmUid; |
|
92 |
|
93 CArrayFixFlat<TUid>* iSendMtmsToDim; |
|
94 CCalSession& iSession; |
|
95 |
|
96 }; |
|
97 |
|
98 #endif // CALENSEND_H |
|
99 |
|
100 |
|
101 // End of File |