imstutils/imconversationview/imcvuiapp/src/cimcvappmessagewrapper.cpp
changeset 0 5e5d6b214f4f
equal deleted inserted replaced
-1:000000000000 0:5e5d6b214f4f
       
     1 /*
       
     2 * Copyright (c) 2007-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:  wrapper for message container
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 // INCLUDE FILES
       
    22 #include    "cimcvappmessagewrapper.h"
       
    23 #include    "mimcvenginemessage.h"
       
    24 #include    "mimcvenginemessagecontainer.h"
       
    25 #include 	"imcvlogger.h"
       
    26 
       
    27 // ============================ MEMBER FUNCTIONS ===============================
       
    28 
       
    29 // -----------------------------------------------------------------------------
       
    30 // CIMCVAppMessageWrapper::CIMCVAppMessageWrapper
       
    31 // C++ default constructor can NOT contain any code, that
       
    32 // might leave.
       
    33 // -----------------------------------------------------------------------------
       
    34 //
       
    35 CIMCVAppMessageWrapper::CIMCVAppMessageWrapper( MIMCVEngineMessage& aWrappedMessage
       
    36                                        )
       
    37     : iMessage( aWrappedMessage ),
       
    38      iInserted( EFalse )
       
    39     {
       
    40     }
       
    41 
       
    42 // -----------------------------------------------------------------------------
       
    43 // CIMCVAppMessageWrapper::NewL
       
    44 // Two-phased constructor.
       
    45 // -----------------------------------------------------------------------------
       
    46 //
       
    47 CIMCVAppMessageWrapper* CIMCVAppMessageWrapper::NewL( MIMCVEngineMessage& aWrappedMessage )
       
    48     {
       
    49     IM_CV_LOGS(TXT("CIMCVAppMessageWrapper::NewL()	start" ));
       
    50     CIMCVAppMessageWrapper* self = 
       
    51         new( ELeave ) CIMCVAppMessageWrapper( aWrappedMessage );
       
    52     IM_CV_LOGS(TXT("CIMCVAppMessageWrapper::NewL()	end" ));
       
    53     return self;
       
    54     }
       
    55 
       
    56 
       
    57 // Destructor
       
    58 CIMCVAppMessageWrapper::~CIMCVAppMessageWrapper()
       
    59     {
       
    60        
       
    61     iHighlights.Reset();
       
    62     iTypes.Reset();
       
    63     }
       
    64 
       
    65 
       
    66 
       
    67 // -----------------------------------------------------------------------------
       
    68 // CIMCVAppMessageWrapper::ThumbPos
       
    69 // (other items were commented in a header).
       
    70 // -----------------------------------------------------------------------------
       
    71 //
       
    72 TCursorSelection& CIMCVAppMessageWrapper::ThumbPos()
       
    73     {
       
    74     return iThumbPosition;
       
    75     }
       
    76     
       
    77 // -----------------------------------------------------------------------------
       
    78 // CIMCVAppMessageWrapper::Selection
       
    79 // (other items were commented in a header).
       
    80 // -----------------------------------------------------------------------------
       
    81 //
       
    82 TCursorSelection& CIMCVAppMessageWrapper::Selection()
       
    83     {
       
    84     return iSelection;
       
    85     }
       
    86 
       
    87 // -----------------------------------------------------------------------------
       
    88 // CIMCVAppMessageWrapper::WholeSelection
       
    89 // (other items were commented in a header).
       
    90 // -----------------------------------------------------------------------------
       
    91 //
       
    92 TCursorSelection& CIMCVAppMessageWrapper::WholeSelection()
       
    93     {
       
    94     return iWholeSelection;
       
    95     }
       
    96 
       
    97 // -----------------------------------------------------------------------------
       
    98 // CIMCVAppMessageWrapper::WholeSelection
       
    99 // (other items were commented in a header).
       
   100 // -----------------------------------------------------------------------------
       
   101 //
       
   102 TCursorSelection& CIMCVAppMessageWrapper::MessageSelection()
       
   103     {
       
   104     return iMessageSelection;
       
   105     }
       
   106         
       
   107 // -----------------------------------------------------------------------------
       
   108 // CIMCVAppMessageWrapper::Highlights
       
   109 // (other items were commented in a header).
       
   110 // -----------------------------------------------------------------------------
       
   111 //
       
   112 RArray<TCursorSelection>& CIMCVAppMessageWrapper::Highlights()
       
   113     {
       
   114     return iHighlights;
       
   115     }
       
   116     
       
   117 // -----------------------------------------------------------------------------
       
   118 // CIMCVAppMessageWrapper::HighlightTypes
       
   119 // (other items were commented in a header).
       
   120 // -----------------------------------------------------------------------------
       
   121 //
       
   122 RArray<TInt>& CIMCVAppMessageWrapper::HighlightTypes()
       
   123     {
       
   124     return iTypes;
       
   125     }
       
   126 
       
   127 // -----------------------------------------------------------------------------
       
   128 // CIMCVAppMessageWrapper::Message
       
   129 // (other items were commented in a header).
       
   130 // -----------------------------------------------------------------------------
       
   131 //
       
   132 MIMCVEngineMessage& CIMCVAppMessageWrapper::Message()
       
   133     {
       
   134     return iMessage;    
       
   135     }
       
   136 
       
   137 // -----------------------------------------------------------------------------
       
   138 // CIMCVAppMessageWrapper::SetInserted
       
   139 // (other items were commented in a header).
       
   140 // -----------------------------------------------------------------------------
       
   141 //
       
   142 void CIMCVAppMessageWrapper::SetInserted( TBool aInserted )
       
   143     {
       
   144     iInserted = aInserted;
       
   145     }
       
   146 
       
   147 // -----------------------------------------------------------------------------
       
   148 // CIMCVAppMessageWrapper::IsInserted
       
   149 // (other items were commented in a header).
       
   150 // -----------------------------------------------------------------------------
       
   151 //
       
   152 TBool CIMCVAppMessageWrapper::IsInserted() const
       
   153     {
       
   154     return iInserted;
       
   155     }
       
   156     
       
   157 //  End of File