mobilemessaging/mmsui/notviewersrc/NotViewerDocument.cpp
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     1 /*
       
     2 * Copyright (c) 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:  
       
    15 *       Provides CNotViewerDocument methods.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 // INCLUDES
       
    22 #include "NotViewerDocument.h"  // CNotViewerDocument
       
    23 #include "NotViewerAppUi.h"     // CNotViewerAppUi
       
    24 
       
    25 // ================= MEMBER FUNCTIONS =======================
       
    26 
       
    27 // ---------------------------------------------------------
       
    28 // C++ default constructor can NOT contain any code, that
       
    29 // might leave.
       
    30 // ---------------------------------------------------------
       
    31 //
       
    32 CNotViewerDocument::CNotViewerDocument( CEikApplication& aApp ) :
       
    33         CMsgEditorDocument( aApp ), iHeaderModified( 0 )
       
    34     {
       
    35     }
       
    36 
       
    37 // ---------------------------------------------------------
       
    38 // Symbian OS default constructor can leave.
       
    39 // ---------------------------------------------------------
       
    40 //
       
    41 void CNotViewerDocument::ConstructL( )
       
    42     {
       
    43     CMsgEditorDocument::ConstructL( );
       
    44 
       
    45     PrepareMtmL( KUidMsgMMSNotification );
       
    46     }
       
    47 
       
    48 // ---------------------------------------------------------
       
    49 // Two-phased constructor.
       
    50 // ---------------------------------------------------------
       
    51 //
       
    52 CNotViewerDocument* CNotViewerDocument::NewL( CEikApplication& aApp )
       
    53     {
       
    54     CNotViewerDocument* self = new ( ELeave ) CNotViewerDocument( aApp );
       
    55     CleanupStack::PushL( self );
       
    56     self->ConstructL( );
       
    57     CleanupStack::Pop( );
       
    58     return self;
       
    59     }
       
    60     
       
    61 // ---------------------------------------------------------
       
    62 // Destructor
       
    63 // ---------------------------------------------------------
       
    64 //
       
    65 CNotViewerDocument::~CNotViewerDocument( )
       
    66     {
       
    67     }
       
    68 
       
    69 // ---------------------------------------------------------
       
    70 // CNotViewerDocument::CreateAppUiL
       
    71 // ---------------------------------------------------------
       
    72 //
       
    73 CEikAppUi* CNotViewerDocument::CreateAppUiL( )
       
    74     {
       
    75     CMsgEditorAppUi* appui = new ( ELeave ) CNotViewerAppUi( );
       
    76     return appui;
       
    77     }
       
    78 
       
    79 
       
    80 // ---------------------------------------------------------
       
    81 // CNotViewerDocument::DefaultMsgFolder
       
    82 // ---------------------------------------------------------
       
    83 //
       
    84 TMsvId CNotViewerDocument::DefaultMsgFolder( ) const
       
    85     {
       
    86     return KMsvGlobalOutBoxIndexEntryIdValue;
       
    87     }
       
    88 
       
    89 // ---------------------------------------------------------
       
    90 // CNotViewerDocument::DefaultMsgService
       
    91 // ---------------------------------------------------------
       
    92 //
       
    93 TMsvId CNotViewerDocument::DefaultMsgService( ) const
       
    94     {
       
    95     return KMsvLocalServiceIndexEntryId;
       
    96     }
       
    97 
       
    98 // ---------------------------------------------------------
       
    99 // CNotViewerDocument::CreateNewL
       
   100 // ---------------------------------------------------------
       
   101 //
       
   102 TMsvId CNotViewerDocument::CreateNewL( TMsvId /*aService*/, TMsvId /*aFolder*/ )
       
   103     {
       
   104     TMsvId tmpId = 0;
       
   105     return tmpId;
       
   106     }
       
   107 
       
   108 // ---------------------------------------------------------
       
   109 // CNotViewerDocument::EntryChangedL
       
   110 // ---------------------------------------------------------
       
   111 //
       
   112 void CNotViewerDocument::EntryChangedL( )
       
   113     {
       
   114     if( iAppUi )
       
   115         {
       
   116         ( static_cast<CNotViewerAppUi*>( iAppUi ) )->EntryChangedL( );
       
   117         }
       
   118     }
       
   119 
       
   120 // ---------------------------------------------------------
       
   121 // CNotViewerDocument::Mtm
       
   122 // ---------------------------------------------------------
       
   123 //
       
   124 CMmsNotificationClientMtm& CNotViewerDocument::Mtm( ) const
       
   125     {
       
   126     return static_cast <CMmsNotificationClientMtm&> ( CMsgEditorDocument::Mtm( ) );
       
   127     }
       
   128 
       
   129 // ---------------------------------------------------------
       
   130 // CNotViewerDocument::MtmUi
       
   131 // ---------------------------------------------------------
       
   132 //
       
   133 CNotMtmUi& CNotViewerDocument::MtmUi( ) const
       
   134     {
       
   135     return static_cast <CNotMtmUi&> ( CMsgEditorDocument::MtmUi( ) );
       
   136     }
       
   137 
       
   138 // ---------------------------------------------------------
       
   139 // CNotViewerDocument::MtmUiDataL
       
   140 // ---------------------------------------------------------
       
   141 //
       
   142 CNotMtmUiData& CNotViewerDocument::MtmUiDataL( ) const
       
   143     {
       
   144     return static_cast <CNotMtmUiData&> ( CMsgEditorDocument::MtmUiDataL( ) );
       
   145     }
       
   146 
       
   147 //  End of File