email/mail/ViewerSrc/CMailViewManager.h
branchRCL_3
changeset 27 7fdbb852d323
parent 0 72b543305e3a
equal deleted inserted replaced
26:ebe688cedc25 27: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:  Plug-in view manager
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CMAILVIEWMANAGER_H
       
    21 #define CMAILVIEWMANAGER_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32base.h>
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class CMailMessage;
       
    28 class CMailMessageView;
       
    29 class CMailBaseControlAdapter;
       
    30 class CCoeControl;
       
    31 class CMsgEditorView;
       
    32 class MMailMsgBaseControl;
       
    33 class CMsgBaseControl;
       
    34 
       
    35 // CLASS DECLARATION
       
    36 
       
    37 /**
       
    38 *  Manages mail viewer ECOM plug-in view components.
       
    39 *
       
    40 *  @lib MailUtils.lib
       
    41 *  @since Series 60 3.0
       
    42 */
       
    43 class CMailViewManager : public CBase
       
    44     {
       
    45     public:  // Constructors and destructor
       
    46         
       
    47         /**
       
    48         * Two-phased constructor.
       
    49         */
       
    50         static CMailViewManager* NewL();
       
    51         
       
    52         /**
       
    53         * Destructor.
       
    54         */
       
    55         virtual ~CMailViewManager();
       
    56 
       
    57     public: // New functions
       
    58         
       
    59         /**
       
    60         * MessageLoadL.
       
    61         * @since Series 60 3.0
       
    62         * @param aStatus loading status
       
    63         * @param aMessage message to be loaded.
       
    64         */
       
    65         void MessageLoadL( TInt aStatus, CMailMessage& aMessage );
       
    66         
       
    67         /**
       
    68         * AddBodyControlL.
       
    69         * @since Series 60 3.0
       
    70         * @param aParent Mail parent view.
       
    71         * @param aControl Control to be set as message body.
       
    72         */        
       
    73         void AddBodyControlL( 
       
    74 				CMsgEditorView* aParent, CCoeControl& aControl );
       
    75 
       
    76         /**
       
    77         * AddBodyControlL.
       
    78         * @since Series 60 3.0
       
    79         * @param aParent Mail parent view.
       
    80         * @param aControl Control to be set as message body.
       
    81         */        
       
    82         void AddBodyControlL( 
       
    83 				CMsgEditorView* aParent, MMailMsgBaseControl& aControl );				
       
    84 				
       
    85 		/**
       
    86 		* ViewPlugin
       
    87 		* @since Series 60 3.0
       
    88 		* @return Mail view plug-in or NULL if can't load any plug-in. 
       
    89 		*/				
       
    90 		CMailMessageView* ViewPlugin();
       
    91 		
       
    92 		/**
       
    93 		* PluginCount
       
    94 		* @since Series 60 3.0
       
    95 		* @return number of loaded plugins.
       
    96 		*/
       
    97 		TInt PluginCount();
       
    98 		
       
    99 		/**
       
   100 		* RemovePlugin
       
   101 		* @since Series 60 3.0
       
   102 		* Removes first plugin from the array.
       
   103 		*/
       
   104 		void RemovePlugin();
       
   105     
       
   106     private: // implementation
       
   107         void AddBodyControlL( 
       
   108             CMsgEditorView* aParent, 
       
   109             CMsgBaseControl& aControl );
       
   110 				
       
   111     private:
       
   112 
       
   113         /**
       
   114         * C++ default constructor.
       
   115         */
       
   116         CMailViewManager();
       
   117 
       
   118         /**
       
   119         * By default Symbian 2nd phase constructor is private.
       
   120         */
       
   121         void ConstructL();
       
   122 
       
   123     private:    // Data
       
   124         
       
   125         /// Own: message view array
       
   126         CArrayPtr<CMailMessageView>* iMailViewArray;
       
   127         /// Own: View adapter
       
   128         CMailBaseControlAdapter* iAdapter; 
       
   129 
       
   130     };
       
   131 
       
   132 #endif      // CMAILVIEWMANAGER_H   
       
   133             
       
   134 // End of File