email/mail/PluginSrc/icalviewer/uisrc/CICalViewer.h
branchRCL_3
changeset 60 7fdbb852d323
parent 0 72b543305e3a
equal deleted inserted replaced
57:ebe688cedc25 60:7fdbb852d323
       
     1 /*
       
     2 * Copyright (c) 2002-2004 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:  Message Vcal view
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __CMAILMESSAGEICALVIEW_H
       
    20 #define __CMAILMESSAGEICALVIEW_H
       
    21 
       
    22 #include <coedef.h>
       
    23 #include <w32std.h>
       
    24 #include <bldvariant.hrh>
       
    25 #include <MSVSTD.H>
       
    26 #include <CMailMessageView.h>
       
    27 #include <MMailAppUiInterface.h>
       
    28 #include <MAgnEntryUi.h>
       
    29 #include <CMailMessage.h>
       
    30 
       
    31 // FORWARD DECLARATIONS
       
    32 class CEikMenuPane;
       
    33 class CICalEngine;
       
    34 class CMailMessage;
       
    35 class CMailMessageView;
       
    36 class MMailMessageView;
       
    37 class MMailAppUiInterface;
       
    38 class CIdle;
       
    39 class TMsvEmailEntry;
       
    40 class CCalenImporter;
       
    41 class CICalViewerView;
       
    42 class CICalAttaLoader;
       
    43 
       
    44 // CLASS DECLARATION
       
    45 
       
    46 /**
       
    47 *  Mail message ical viewer
       
    48 *  ICal message viewer plug-in.
       
    49 *  @since Series 60 3.0
       
    50 */
       
    51 class CICalViewer : public CMailMessageView, MAgnEntryUiCallback
       
    52     {
       
    53     public:  // Constructors and destructor
       
    54 
       
    55         /**
       
    56         * NewL
       
    57         * Called from the ECOM plug-in framework.
       
    58         */
       
    59         static CICalViewer* NewL();
       
    60 
       
    61         /**
       
    62         * Destructor.
       
    63         */
       
    64         ~CICalViewer();
       
    65 
       
    66 
       
    67    private: // constructors
       
    68 
       
    69         void ConstructL();
       
    70         CICalViewer();
       
    71 
       
    72     public: // from MMailMessageView
       
    73 
       
    74         void ViewMessageL(
       
    75 			RFileReadStream& aReadStream,
       
    76 			MMailAppUiInterface& aUICallBack);
       
    77         void ViewMessageL(
       
    78 			CMailMessage& aMessage,
       
    79             MMailAppUiInterface& aUICallBack,
       
    80             TUint& aParam);
       
    81         void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane);
       
    82         TBool HandleCommandL(TInt aCommand);
       
    83         TKeyResponse HandleKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
       
    84         const TDesC& ResourceFile();
       
    85 
       
    86         void MessageLoadL(TInt aState, CMailMessage& aMessage);
       
    87 
       
    88 	private: // From MAgnEntryUiCallback		
       
    89 		
       
    90 		TBool IsCommandAvailable( TInt aCommandId );
       
    91 		
       
    92 		TInt ProcessCommandWithResultL( TInt aCommandId );
       
    93 
       
    94 		void ProcessCommandL( TInt aCommandId );
       
    95 
       
    96    private:
       
    97         void CreateControlsL();
       
    98         void CreateListBoxL();
       
    99 		void DoOMRViewerLaunchL();
       
   100 		void DoViewMessageL( TUid aMtmUid );
       
   101 		void DoGetCorrectDllDriveL( TFileName& aDriveName );
       
   102         void ParseMessageToCalEntryL(CMailMessage& aMessage);
       
   103         static TInt IdleTimerCallbackL(TAny* iCalViewer);
       
   104 
       
   105     private:
       
   106     	// Ref to app UI
       
   107         MMailAppUiInterface* iAppUi;
       
   108 
       
   109 		// own: readstream for ical message
       
   110         RReadStream iStream;
       
   111 
       
   112         // own: idle callback to launch omr viewers
       
   113         CIdle* iIdleLauncher;
       
   114 
       
   115         // own: MR View control
       
   116         CICalViewerView* iICalView;
       
   117         
       
   118         // own: attachment loader
       
   119         CICalAttaLoader* iAttaLoad;
       
   120 
       
   121         // own: parsed Meeting Request entry
       
   122         RPointerArray<CCalEntry> iEntries;
       
   123 
       
   124         // own: entry ui in params for MAgnEntryUI
       
   125         MAgnEntryUi::TAgnEntryUiInParams* iEntryUiInParams;
       
   126         
       
   127         // own: entry ui out params for MAgnEntryUI
       
   128         MAgnEntryUi::TAgnEntryUiOutParams* iEntryUiOutParams;
       
   129         
       
   130         // own: resource file, placed in heap due to large size
       
   131         HBufC* iResourceFile;
       
   132 
       
   133         // For parameter parsing to entry ui params
       
   134         TMsvEmailEntry iMsg;
       
   135 
       
   136         // Calender session
       
   137         CCalSession* iSession;
       
   138 
       
   139         // CAgnEntryUI return value
       
   140         TInt iRetVal;
       
   141 
       
   142         // CalenImporter
       
   143         CCalenImporter* iImporter;
       
   144         
       
   145         // Internal status flag
       
   146         TUint32 iFlags;
       
   147 
       
   148     };
       
   149 
       
   150 #endif      // CMailMessageVcalView_H
       
   151 
       
   152 // End of File