taskswitcher/server/tsrc/t_tsserializeddataprovider/t_tsmodel.cpp
changeset 117 c63ee96dbe5f
equal deleted inserted replaced
115:3ab5c078b490 117:c63ee96dbe5f
       
     1 /*
       
     2 * Copyright (c) 2009 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 *
       
    16 */
       
    17 #include "t_tsmodel.h"
       
    18 
       
    19 _LIT(KDisplayName, "TestName" );
       
    20 
       
    21 TBool T_TsModel::expectedBoolValue()
       
    22 {
       
    23     return ETrue;
       
    24 }
       
    25 
       
    26 const TDesC& T_TsModel::expectedDesCValue()
       
    27 {
       
    28     return KDisplayName();
       
    29 }
       
    30 
       
    31 TInt T_TsModel::expectedIntValue()
       
    32 {
       
    33     return 0;
       
    34 }
       
    35 
       
    36 T_TsModel::T_TsModel(int itemsCount)
       
    37 :
       
    38 mItemsCount(itemsCount)
       
    39 {}
       
    40 
       
    41 TInt T_TsModel::count() const
       
    42 {
       
    43     return mItemsCount;
       
    44 }
       
    45 
       
    46 TTime T_TsModel::expectedTimeValue()
       
    47 {
       
    48     return TTime(0);
       
    49 }
       
    50 
       
    51 
       
    52 void T_TsModel::setObserver(MTsModelObserver */*observer*/)
       
    53 {
       
    54 }
       
    55 
       
    56 const TDesC& T_TsModel::displayNameL(TInt /*offset*/) const
       
    57 {
       
    58     return T_TsModel::expectedDesCValue();
       
    59 }
       
    60 
       
    61 TInt T_TsModel::iconHandleL(TInt /*offset*/) const
       
    62 {
       
    63     return T_TsModel::expectedIntValue();
       
    64 }
       
    65 
       
    66 TTime T_TsModel::timestampL(TInt /*offset*/) const
       
    67 {
       
    68     return T_TsModel::expectedTimeValue();
       
    69 }
       
    70 
       
    71 TTsModelItemKey T_TsModel::keyL(TInt /*offset*/) const
       
    72 {
       
    73     return TTsModelItemKey(T_TsModel::expectedIntValue(), reinterpret_cast<TInt>(this));
       
    74 }
       
    75 
       
    76 TBool T_TsModel::isActiveL(TInt /*offset*/) const
       
    77 {
       
    78     return T_TsModel::expectedBoolValue();
       
    79 }
       
    80 
       
    81 TBool T_TsModel::isClosableL(TInt /*offset*/) const
       
    82 {
       
    83     return T_TsModel::expectedBoolValue();
       
    84 }
       
    85 
       
    86 TBool T_TsModel::closeL(TTsModelItemKey /*offset*/) const
       
    87 {
       
    88     return T_TsModel::expectedBoolValue();
       
    89 }
       
    90 
       
    91 TBool T_TsModel::launchL(TTsModelItemKey /*offset*/) const
       
    92 {
       
    93     return T_TsModel::expectedBoolValue();
       
    94 }