mobilemessaging/smsui/viewersrc/MsgSmsViewerDoc.cpp
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     1 /*
       
     2 * Copyright (c) 2002-2008 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 *      Sms viewer
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 // INCLUDE FILES
       
    22 #include <cntdef.h>             // ContactField definitions
       
    23 #include <msvapi.h>             // CMsvOperation, CMsvEntry
       
    24 #include <msvuids.h>            // Msgs Uids
       
    25 #include <smut.h>               // Sms utilities
       
    26 #include <akninputblock.h>	    // CAknInputBlock
       
    27 #include "MsgSmsViewerDoc.h"    // CMsgSmsViewerDocument
       
    28 #include "MsgSmsViewerAppUi.h"  // CMsgSmsViewerAppUi
       
    29 #include "MsgSmsViewerGsmCdmaCreator.h"
       
    30 
       
    31 // ================= MEMBER FUNCTIONS =======================
       
    32 
       
    33 // C++ constructor can NOT contain any code, that
       
    34 // might leave.
       
    35 //
       
    36 CMsgSmsViewerDocument::CMsgSmsViewerDocument( 
       
    37     CEikApplication& aApp)
       
    38         : CMsgEditorDocument(aApp)
       
    39     {
       
    40     }
       
    41 
       
    42 // Two-phased constructor.
       
    43 CMsgSmsViewerDocument* CMsgSmsViewerDocument::NewL(
       
    44     CEikApplication& aApp)
       
    45     {
       
    46     CMsgSmsViewerDocument* sed = new (ELeave) CMsgSmsViewerDocument(aApp);
       
    47     CleanupStack::PushL(sed);
       
    48     sed->ConstructL();
       
    49     sed->PrepareMtmL( KUidMsgTypeSMS );
       
    50     CleanupStack::Pop();
       
    51     return sed;
       
    52     }
       
    53     
       
    54 // Destructor
       
    55 CMsgSmsViewerDocument::~CMsgSmsViewerDocument()
       
    56     {
       
    57     }
       
    58 
       
    59 // ---------------------------------------------------------
       
    60 // CMsgSmsViewerDocument::CreateAppUiL
       
    61 // (other items were commented in a header).
       
    62 // ---------------------------------------------------------
       
    63 CEikAppUi* CMsgSmsViewerDocument::CreateAppUiL()
       
    64     {
       
    65     return SmsViewerCreator::CreateAppUiL();
       
    66     }
       
    67 
       
    68 // ---------------------------------------------------------
       
    69 // CMsgSmsViewerDocument::CreateNewL
       
    70 // (other items were commented in a header).
       
    71 // ---------------------------------------------------------
       
    72 TMsvId CMsgSmsViewerDocument::CreateNewL(
       
    73     TMsvId /*aService*/,
       
    74     TMsvId /*aFolder*/)
       
    75     {
       
    76     __ASSERT_DEBUG( 0, Panic(EMsgSmsViewerTriesEditorFuncs ));
       
    77     return KMsvNullIndexEntryIdValue; 
       
    78     }
       
    79 
       
    80 // ---------------------------------------------------------
       
    81 // CMsgSmsViewerDocument::EntryChangedL
       
    82 // (other items were commented in a header).
       
    83 // ---------------------------------------------------------
       
    84 void CMsgSmsViewerDocument::EntryChangedL()
       
    85     {
       
    86 #ifdef RD_MSG_FAST_PREV_NEXT
       
    87     static_cast<CMsgSmsViewerAppUi*>(iAppUi)->EntryChangedL();
       
    88 #endif
       
    89     }
       
    90 
       
    91 // ---------------------------------------------------------
       
    92 // CMsgSmsViewerDocument::DefaultMsgFolder
       
    93 // (other items were commented in a header).
       
    94 // ---------------------------------------------------------
       
    95 TMsvId CMsgSmsViewerDocument::DefaultMsgFolder() const
       
    96     {
       
    97     return KMsvDraftEntryIdValue;
       
    98     }
       
    99 
       
   100 // ---------------------------------------------------------
       
   101 // CMsgSmsViewerDocument::DefaultMsgService
       
   102 // (other items were commented in a header).
       
   103 // ---------------------------------------------------------
       
   104 TMsvId CMsgSmsViewerDocument::DefaultMsgService() const
       
   105     {
       
   106     return KMsvLocalServiceIndexEntryId;
       
   107     }
       
   108 
       
   109 //  End of File