email/mail/inc/MMailAppUiInterface.h
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     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 App UI call back interface.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef MMAILAPPUIINTERFACE_H
       
    21 #define MMAILAPPUIINTERFACE_H
       
    22 
       
    23 #include <badesca.h>
       
    24 #include <e32const.h>
       
    25 
       
    26 // DATA TYPES
       
    27 enum TMailUiParams
       
    28 	{
       
    29 	EMailUseDefaultNaviPane = KBit0
       
    30 	};
       
    31 
       
    32 // FORWARD DECLARATIONS
       
    33 class CCoeControl;
       
    34 class MMailMsgBaseControl;
       
    35 class CMsvAttachment;
       
    36 class CEikStatusPane;
       
    37 class CRichText;
       
    38 
       
    39 // CLASS DECLARATION
       
    40 
       
    41 /**
       
    42 *  MMailAppUiInterface interface.
       
    43 *
       
    44 *  @since Series 60 3.0
       
    45 */
       
    46 class MMailAppUiInterface
       
    47     {
       
    48     public:  // destructor
       
    49         /**
       
    50         * Destructor.
       
    51         */
       
    52         virtual ~MMailAppUiInterface(){};
       
    53 
       
    54     public: // New functions
       
    55         /**
       
    56         * AddAttachmentsL.
       
    57         * Add attachment to mail UI application.
       
    58         * @since Series 60 3.0
       
    59         * @param aAttachmentInfo attachment info.
       
    60         * @param aCanBeRemoved ETrue if attachment can be removed via
       
    61         * attachment view. 
       
    62         */
       
    63         virtual void AddAttachmentL(
       
    64         	CMsvAttachment& aAttachmentInfo,
       
    65         	TBool aCanBeRemoved = ETrue ) = 0;
       
    66         
       
    67         /**
       
    68         * AddControlL.
       
    69         * @since Series 60 3.0
       
    70         * @param aControlType controls to be created.
       
    71         * See TMailControlType.
       
    72         */
       
    73         virtual void AddControlL(TInt aControlType) = 0;
       
    74 
       
    75         /**
       
    76         * AddControlL.
       
    77         * @since Series 60 3.0
       
    78         * @param aControl Replaces default body control with custom control.
       
    79         * This can  be called only once. Leaves with KErrAlreadyExists if
       
    80         * body control is already replaced with custom control.
       
    81         */
       
    82         virtual void AddControlL(CCoeControl& aControl) = 0;
       
    83 
       
    84         /**
       
    85         * AddControlL.
       
    86         * @since Series 60 3.0
       
    87         * @param aControl Replaces default body control with custom control.
       
    88         * This can  be called only once. Leaves with KErrAlreadyExists if
       
    89         * body control is already replaced with custom control.
       
    90         */
       
    91         virtual void AddControlL(MMailMsgBaseControl& aControl) = 0;
       
    92 
       
    93         /**
       
    94         * ParentControl.
       
    95         * @since Series 60 3.0
       
    96         * @param aText wait note text.
       
    97         * @return message view control. << window-owning >>
       
    98         */
       
    99         virtual CCoeControl& ParentControl() = 0;
       
   100         
       
   101         /**
       
   102         * StatusPane.
       
   103         * @since Series 60 3.0
       
   104         * @return pointer to status pane or NULL.
       
   105         */        
       
   106         virtual CEikStatusPane* StatusPane() = 0;
       
   107 
       
   108         /**
       
   109         * StartWaitNoteL.
       
   110         * @since Series 60 3.0
       
   111         * Start Mail viewer "Opening" wait note.
       
   112         */
       
   113         virtual void StartWaitNoteL(/*const TDesC& aText*/) = 0;
       
   114 
       
   115         /**
       
   116         * StopWaitNote.
       
   117         * @since Series 60 3.0
       
   118         * Stop the wait note.
       
   119         */
       
   120         virtual void StopWaitNote() = 0;
       
   121 
       
   122         /**
       
   123         * SetTitleTextL.
       
   124         * @since Series 60 3.0
       
   125         * @param aResourceId title text resource id
       
   126         * See <avkon.rh> "STRUCT TITLE_PANE"
       
   127         */
       
   128         virtual void SetTitleTextL(TInt aResourceId) = 0;
       
   129 
       
   130         /**
       
   131         * SetFromFieldTextL.
       
   132         * @since Series 60 3.0
       
   133         * @param aControlType header control type.
       
   134         * @param aText Recipient array.
       
   135         * Does nothing if used control type is not created with AddControlL
       
   136         */
       
   137         virtual void SetAddressFieldTextL(TInt aControlType, CDesCArray& aText) = 0;
       
   138         
       
   139         /**
       
   140         * SetFromFieldTextL.
       
   141         * @since Series 60 3.0
       
   142         * @param aControlType header control type.
       
   143         * @param aText recipient text
       
   144         * Does nothing if used control type is not created with AddControlL
       
   145         */
       
   146         virtual void SetAddressFieldTextL(TInt aControlType, const TDesC& aText) = 0;
       
   147 
       
   148         /**
       
   149         * SetBodyTextL.
       
   150         * @since Series 60 3.0
       
   151         * @param aText Body text.
       
   152         */
       
   153         virtual void SetBodyTextL(CRichText& aText) = 0;
       
   154 
       
   155         /**
       
   156         * SetSubjectFieldTextL.
       
   157         * @since Series 60 3.0
       
   158         * @param aControlType header control type.
       
   159         * Does nothing if used control type is not created with AddControlL
       
   160         */
       
   161         virtual void SetSubjectL(const TDesC& aText) = 0;
       
   162         
       
   163         /**
       
   164         * MsgViewRect.
       
   165         * @since Series 60 3.0
       
   166         * @param aPane View part id.
       
   167         * @return reserved size for selected view.
       
   168         */
       
   169         virtual TRect MsgViewRect(TInt aPane) = 0;        
       
   170         
       
   171         /**
       
   172         * AppUiHandleCommandL.
       
   173         * @since Series 60 3.0
       
   174         * @param aCommand AppUi command ID.
       
   175         */        
       
   176         virtual void AppUiHandleCommandL(TInt aCommand) = 0;
       
   177         
       
   178         /**
       
   179         * Checks if next or previous message is available.
       
   180         * @param aForward  direction: ETrue = next, EFalse = previous.
       
   181         * @return ETrue if next message is available in desired direction.
       
   182         */
       
   183         virtual TBool IsNextMessageAvailableL( TBool aForward ) = 0;
       
   184         
       
   185         /**
       
   186         * Launch editor/viewer for next/previous message.
       
   187         * @param aForward  direction: ETrue = next, EFalse = previous.
       
   188         */
       
   189         virtual void NextMessageL( TBool aForward ) = 0;
       
   190         
       
   191         /**
       
   192          * View plugin notifies when the message is ready to be shown
       
   193          * @since S60 5.0
       
   194          */
       
   195         virtual void ViewMessageComplete() = 0;
       
   196         
       
   197     };
       
   198 
       
   199 #endif      // MMAILAPPUIINTERFACE_H
       
   200 
       
   201 // End of File