mobilemessaging/mmsui/viewerinc/UniMmsViewerDocument.inl
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     1 /*
       
     2 * Copyright (c) 2002-2006 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 *           MMS Viewer Document class. File of inline functions
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 // ----------------------------------------------------
       
    22 // CMmsViewerDocument::DataModel
       
    23 // ----------------------------------------------------
       
    24 //
       
    25 inline CUniDataModel& CMmsViewerDocument::DataModel() const
       
    26     {
       
    27     return *iDataModel;
       
    28     }
       
    29    
       
    30 // ----------------------------------------------------
       
    31 // CMmsViewerDocument::SmilModel
       
    32 // ----------------------------------------------------
       
    33 //
       
    34 inline CUniSmilModel* CMmsViewerDocument::SmilModel() const
       
    35     {
       
    36     return &( iDataModel->SmilModel() );
       
    37     }
       
    38     
       
    39 // ----------------------------------------------------
       
    40 // CMmsViewerDocument::DataUtils
       
    41 // ----------------------------------------------------
       
    42 //
       
    43 inline CUniDataUtils* CMmsViewerDocument::DataUtils() const
       
    44     {
       
    45     return &( iDataModel->DataUtils() );
       
    46     }
       
    47 
       
    48     
       
    49 // ----------------------------------------------------
       
    50 // CMmsViewerDocument::CurrentSlide
       
    51 // ----------------------------------------------------
       
    52 //
       
    53 inline TInt CMmsViewerDocument::CurrentSlide()
       
    54     {
       
    55     return iCurrentSlide;
       
    56     }
       
    57 
       
    58 // ----------------------------------------------------
       
    59 // CMmsViewerDocument::SetCurrentSlide
       
    60 // ----------------------------------------------------
       
    61 //
       
    62 inline void CMmsViewerDocument::SetCurrentSlide( TInt aSlideNum )
       
    63     {
       
    64     iCurrentSlide = aSlideNum;
       
    65     }
       
    66 
       
    67 // ----------------------------------------------------
       
    68 // CMmsViewerDocument::SmilType
       
    69 // ----------------------------------------------------
       
    70 //
       
    71 inline TUniSmilType CMmsViewerDocument::SmilType()
       
    72     {
       
    73     return iSmilType;
       
    74     }
       
    75 
       
    76 // ---------------------------------------------------------
       
    77 // CMmsEditorDocument::CreationMode
       
    78 //
       
    79 // Accessor.
       
    80 // ---------------------------------------------------------
       
    81 //
       
    82 inline TInt CMmsViewerDocument::CreationMode() const
       
    83     {
       
    84     return iCreationMode;
       
    85     }
       
    86 
       
    87 // ---------------------------------------------------------
       
    88 // CMmsEditorDocument::MaxMessageSize
       
    89 //
       
    90 // Accessor.
       
    91 // ---------------------------------------------------------
       
    92 //
       
    93 inline TUint32 CMmsViewerDocument::MaxMessageSize() const
       
    94     {
       
    95     return iMaxMessageSize;
       
    96     }
       
    97     
       
    98 // ---------------------------------------------------------
       
    99 // CMmsEditorDocument::ParseResult
       
   100 //
       
   101 // ---------------------------------------------------------
       
   102 //
       
   103 inline TInt CMmsViewerDocument::ParseResult() const
       
   104     {
       
   105     return iParseResult;
       
   106     }
       
   107        
       
   108 
       
   109 // ---------------------------------------------------------
       
   110 // IsUpload
       
   111 // ---------------------------------------------------------
       
   112 inline TBool CMmsViewerDocument::IsUpload() const
       
   113     {
       
   114     return ( CMmsMtmUi::IsUpload( Entry() ) );
       
   115     }
       
   116 
       
   117 inline CUniObjectList* CMmsViewerDocument::ObjectList() const
       
   118     {    
       
   119     return & ( iDataModel->ObjectList() );
       
   120     }
       
   121 inline CUniObjectList* CMmsViewerDocument::AttachmentList() const
       
   122     {    
       
   123     return & ( iDataModel->AttachmentList() );
       
   124     }
       
   125 inline CUniSmilList* CMmsViewerDocument::SmilList() const
       
   126     {    
       
   127     return & ( iDataModel->SmilList() );
       
   128     }
       
   129 
       
   130 inline RFile CMmsViewerDocument::GetAttachmentFileL( CUniObject& aUniObject )
       
   131     {
       
   132     return iDataModel->DataUtils( ).GetAttachmentFileL( Mtm(), aUniObject.AttachmentId() );
       
   133     }
       
   134 
       
   135 inline void CMmsViewerDocument::DeleteModel( )
       
   136     {
       
   137     delete iDataModel;  
       
   138     iDataModel = NULL;  
       
   139     }
       
   140