email/mail/UtilsSrc/MsgMailDocument.inl
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     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:  Document base class of Mail editor and viewer, inline functions
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MSGMAILDOCUMENT_INL
       
    20 #define MSGMAILDOCUMENT_INL
       
    21 
       
    22 // FORWARD DECLARATIONS
       
    23 class CImHeader;
       
    24 class CImEmailMessage;
       
    25 class CMailCRHandler;
       
    26 
       
    27 // INCLUDES
       
    28 #include <miuthdr.h>
       
    29 #include <miutset.h>
       
    30 
       
    31 #include "MsgMailPreferences.h"
       
    32 #include "MsgEditorDocument.h"
       
    33 
       
    34 
       
    35 // INLINE FUNCTIONS
       
    36 
       
    37 // -----------------------------------------------------------------------------
       
    38 // CMsgMailDocument::SetPreferences()
       
    39 // -----------------------------------------------------------------------------
       
    40 //
       
    41 inline void CMsgMailDocument::SetPreferences(CMsgMailPreferences* aPrefs) 
       
    42     { 
       
    43     iPrefs = aPrefs; 
       
    44     }
       
    45 
       
    46 // -----------------------------------------------------------------------------
       
    47 // CMsgMailDocument::HeaderL()
       
    48 // -----------------------------------------------------------------------------
       
    49 //
       
    50 inline CImHeader& CMsgMailDocument::HeaderL() const 
       
    51     {
       
    52     ASSERT( iHeader );
       
    53     return *iHeader;
       
    54     }
       
    55 
       
    56 // -----------------------------------------------------------------------------
       
    57 //  CMsgMailDocument::DefaultMsgFolder()
       
    58 //  Returns:    TMsvId of the default Draft folder
       
    59 // -----------------------------------------------------------------------------
       
    60 //
       
    61 inline TMsvId CMsgMailDocument::DefaultMsgFolder() const
       
    62     {
       
    63     return KMsvDraftEntryIdValue;
       
    64     }
       
    65 
       
    66 // -----------------------------------------------------------------------------
       
    67 // CMsgMailDocument::SMTPServiceTypeUid()
       
    68 // -----------------------------------------------------------------------------
       
    69 //
       
    70 inline TMsvId CMsgMailDocument::DefaultMsgService() const
       
    71     {
       
    72     return TUid(KUidMsgTypeSMTP).iUid;
       
    73     }
       
    74 
       
    75 
       
    76 // -----------------------------------------------------------------------------
       
    77 //  CMsgMailDocument::SendOptions
       
    78 // -----------------------------------------------------------------------------
       
    79 //
       
    80 inline CMsgMailPreferences& CMsgMailDocument::SendOptions() const
       
    81     {
       
    82     return *iPrefs;
       
    83     }
       
    84 
       
    85 // -----------------------------------------------------------------------------
       
    86 //  CMsgMailDocument::SetConfirmation()
       
    87 // -----------------------------------------------------------------------------
       
    88 //
       
    89 inline void CMsgMailDocument::SetConfirmation(TBool aConfNote)
       
    90     {
       
    91     iConfNote = aConfNote;
       
    92     }
       
    93 
       
    94 // -----------------------------------------------------------------------------
       
    95 //  CMsgMailDocument::ShowConfirmation()
       
    96 // -----------------------------------------------------------------------------
       
    97 //
       
    98 inline TBool CMsgMailDocument::ShowConfirmation() const
       
    99     {
       
   100     return iConfNote;
       
   101     }
       
   102 
       
   103 // -----------------------------------------------------------------------------
       
   104 // CMsgMailDocument::CreateNewL()
       
   105 // -----------------------------------------------------------------------------
       
   106 //
       
   107 inline TMsvId CMsgMailDocument::CreateNewL(TMsvId aService, TMsvId aTarget,
       
   108     TInt aTypeList)
       
   109     {
       
   110     return CreateNewL(aService, aTarget, aTypeList, KUidMsgTypeSMTP);
       
   111     }
       
   112 
       
   113 // -----------------------------------------------------------------------------
       
   114 // CMsgMailDocument::CreateNewL()
       
   115 // -----------------------------------------------------------------------------
       
   116 //
       
   117 inline TMsvId CMsgMailDocument::CreateNewL(TMsvId aService, TMsvId aTarget)
       
   118     {
       
   119     return CreateNewL(aService, aTarget, 0, KUidMsgTypeSMTP);
       
   120     }
       
   121 
       
   122 // -----------------------------------------------------------------------------
       
   123 // CMsgMailDocument::MailCRHandler()
       
   124 // -----------------------------------------------------------------------------
       
   125 //
       
   126 inline CMailCRHandler* CMsgMailDocument::MailCRHandler() const
       
   127     {
       
   128     return iMailCRHandler;
       
   129     }    
       
   130 
       
   131 #endif      // MSGMAILDOCUMENT_INL
       
   132 
       
   133 // End of File