classicui_plat/ganes_api/tsrc/src/testplatganeblockshgitem.cpp
changeset 47 2f0c06423c72
parent 46 0e1e0022bd03
child 53 3c67ea82fafc
equal deleted inserted replaced
46:0e1e0022bd03 47:2f0c06423c72
     1 /*
       
     2 * Copyright (c) 2002 - 2007 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:  ganes_api
       
    15 *
       
    16 */
       
    17 
       
    18 // [INCLUDE FILES]
       
    19 #include "testplatgane.h"
       
    20 
       
    21 // ============================ MEMBER FUNCTIONS =========================
       
    22 
       
    23 
       
    24 // --------------------------------------------------------------------------
       
    25 // CTestPlatGane::TestCHgItemNewL
       
    26 // --------------------------------------------------------------------------
       
    27 //
       
    28 TInt CTestPlatGane::TestCHgItemNewL( CStifItemParser& /*aItem*/ )
       
    29     {
       
    30     _LIT(Kctestplatgane, "CTestPlatGane");
       
    31     _LIT(Ktestchgitemnewl, "In TestCHgItemNewL");
       
    32     TestModuleIf().Printf(0, Kctestplatgane, Ktestchgitemnewl);
       
    33     iLog->Log(Ktestchgitemnewl);
       
    34 
       
    35     CHgItem* temp = CHgItem::NewL();
       
    36     CleanupStack::PushL( temp );
       
    37     CleanupStack::PopAndDestroy( temp );
       
    38 
       
    39     return KErrNone;
       
    40     }
       
    41 
       
    42 // --------------------------------------------------------------------------
       
    43 // CTestPlatGane::TestCHgItemNewLCL
       
    44 // --------------------------------------------------------------------------
       
    45 //
       
    46 TInt CTestPlatGane::TestCHgItemNewLCL( CStifItemParser& /*aItem*/ )
       
    47     {
       
    48     _LIT(Kctestplatgane, "CTestPlatGane");
       
    49     _LIT(Ktestchgitemnewlcl, "In TestCHgItemNewLCL");
       
    50     TestModuleIf().Printf(0, Kctestplatgane, Ktestchgitemnewlcl);
       
    51     iLog->Log(Ktestchgitemnewlcl);
       
    52 
       
    53     CHgItem* temp = CHgItem::NewLC();
       
    54     CleanupStack::PopAndDestroy( temp );
       
    55 
       
    56     return KErrNone;
       
    57     }
       
    58 
       
    59 // --------------------------------------------------------------------------
       
    60 // CTestPlatGane::TestCHgItemIconL
       
    61 // --------------------------------------------------------------------------
       
    62 //
       
    63 TInt CTestPlatGane::TestCHgItemIconL( CStifItemParser& /*aItem*/ )
       
    64     {
       
    65     _LIT(Kctestplatgane, "CTestPlatGane");
       
    66     _LIT(Ktestchgitemiconl, "In TestCHgItemIconL");
       
    67     TestModuleIf().Printf(0, Kctestplatgane, Ktestchgitemiconl);
       
    68     iLog->Log(Ktestchgitemiconl);
       
    69 
       
    70     CHgItem* temp = CHgItem::NewL();
       
    71     CleanupStack::PushL( temp );
       
    72     temp->Icon();
       
    73     CleanupStack::PopAndDestroy( temp );
       
    74 
       
    75     return KErrNone;
       
    76     }
       
    77 
       
    78 // --------------------------------------------------------------------------
       
    79 // CTestPlatGane::TestCHgItemTitleL
       
    80 // --------------------------------------------------------------------------
       
    81 //
       
    82 TInt CTestPlatGane::TestCHgItemTitleL( CStifItemParser& /*aItem*/ )
       
    83     {
       
    84     _LIT(Kctestplatgane, "CTestPlatGane");
       
    85     _LIT(Ktestchgitemtitlel, "In TestCHgItemTitleL");
       
    86     TestModuleIf().Printf(0, Kctestplatgane, Ktestchgitemtitlel);
       
    87     iLog->Log(Ktestchgitemtitlel);
       
    88 
       
    89     CHgItem* temp = CHgItem::NewL();
       
    90     CleanupStack::PushL( temp );
       
    91     temp->Title();
       
    92     CleanupStack::PopAndDestroy( temp );
       
    93 
       
    94     return KErrNone;
       
    95     }
       
    96 
       
    97 // --------------------------------------------------------------------------
       
    98 // CTestPlatGane::TestCHgItemTextL
       
    99 // --------------------------------------------------------------------------
       
   100 //
       
   101 TInt CTestPlatGane::TestCHgItemTextL( CStifItemParser& /*aItem*/ )
       
   102     {
       
   103     _LIT(Kctestplatgane, "CTestPlatGane");
       
   104     _LIT(Ktestchgitemtextl, "In TestCHgItemTextL");
       
   105     TestModuleIf().Printf(0, Kctestplatgane, Ktestchgitemtextl);
       
   106     iLog->Log(Ktestchgitemtextl);
       
   107 
       
   108     CHgItem* temp = CHgItem::NewL();
       
   109     CleanupStack::PushL( temp );
       
   110     temp->Text();
       
   111     CleanupStack::PopAndDestroy( temp );
       
   112 
       
   113     return KErrNone;
       
   114     }
       
   115 
       
   116 // --------------------------------------------------------------------------
       
   117 // CTestPlatGane::TestCHgItemTimeL
       
   118 // --------------------------------------------------------------------------
       
   119 //
       
   120 TInt CTestPlatGane::TestCHgItemTimeL( CStifItemParser& /*aItem*/ )
       
   121     {
       
   122     _LIT(Kctestplatgane, "CTestPlatGane");
       
   123     _LIT(Ktestchgitemtimel, "In TestCHgItemTimeL");
       
   124     TestModuleIf().Printf(0, Kctestplatgane, Ktestchgitemtimel);
       
   125     iLog->Log(Ktestchgitemtimel);
       
   126 
       
   127     CHgItem* temp = CHgItem::NewL();
       
   128     CleanupStack::PushL( temp );
       
   129     temp->Time();
       
   130     CleanupStack::PopAndDestroy( temp );
       
   131 
       
   132     return KErrNone;
       
   133     }
       
   134 
       
   135 // --------------------------------------------------------------------------
       
   136 // CTestPlatGane::TestCHgItemSetIconL
       
   137 // --------------------------------------------------------------------------
       
   138 //
       
   139 TInt CTestPlatGane::TestCHgItemSetIconL( CStifItemParser& /*aItem*/ )
       
   140     {
       
   141     _LIT(Kctestplatgane, "CTestPlatGane");
       
   142     _LIT(Ktestchgitemseticonl, "In TestCHgItemSetIconL");
       
   143     TestModuleIf().Printf(0, Kctestplatgane, Ktestchgitemseticonl);
       
   144     iLog->Log(Ktestchgitemseticonl);
       
   145 
       
   146     CHgItem* temp = CHgItem::NewL();
       
   147     CleanupStack::PushL( temp );
       
   148     temp->SetIcon( NULL );
       
   149     CleanupStack::PopAndDestroy( temp );
       
   150 
       
   151     return KErrNone;
       
   152     }
       
   153 
       
   154 // --------------------------------------------------------------------------
       
   155 // CTestPlatGane::TestCHgItemSetTitleL
       
   156 // --------------------------------------------------------------------------
       
   157 //
       
   158 TInt CTestPlatGane::TestCHgItemSetTitleL( CStifItemParser& /*aItem*/ )
       
   159     {
       
   160     _LIT(Kctestplatgane, "CTestPlatGane");
       
   161     _LIT(Ktestchgitemsettitlel, "In TestCHgItemSetTitleL");
       
   162     TestModuleIf().Printf(0, Kctestplatgane, Ktestchgitemsettitlel);
       
   163     iLog->Log(Ktestchgitemsettitlel);
       
   164 
       
   165     CHgItem* temp = CHgItem::NewL();
       
   166     CleanupStack::PushL( temp );
       
   167     temp->SetTitleL( _L( "SetTile" ) );
       
   168     CleanupStack::PopAndDestroy( temp );
       
   169 
       
   170     return KErrNone;
       
   171     }
       
   172 
       
   173 // --------------------------------------------------------------------------
       
   174 // CTestPlatGane::TestCHgItemSetTextL
       
   175 // --------------------------------------------------------------------------
       
   176 //
       
   177 TInt CTestPlatGane::TestCHgItemSetTextL( CStifItemParser& /*aItem*/ )
       
   178     {
       
   179     _LIT(Kctestplatgane, "CTestPlatGane");
       
   180     _LIT(Ktestchgitemsettextl, "In TestCHgItemSetTextL");
       
   181     TestModuleIf().Printf(0, Kctestplatgane, Ktestchgitemsettextl);
       
   182     iLog->Log(Ktestchgitemsettextl);
       
   183 
       
   184     CHgItem* temp = CHgItem::NewL();
       
   185     CleanupStack::PushL( temp );
       
   186     temp->SetTextL( _L( "SetText" ) );
       
   187     CleanupStack::PopAndDestroy( temp );
       
   188 
       
   189     return KErrNone;
       
   190     }
       
   191 
       
   192 // --------------------------------------------------------------------------
       
   193 // CTestPlatGane::TestCHgItemSetTimeL
       
   194 // --------------------------------------------------------------------------
       
   195 //
       
   196 TInt CTestPlatGane::TestCHgItemSetTimeL( CStifItemParser& /*aItem*/ )
       
   197     {
       
   198     _LIT(Kctestplatgane, "CTestPlatGane");
       
   199     _LIT(Ktestchgitemsettimel, "In TestCHgItemSetTimeL");
       
   200     TestModuleIf().Printf(0, Kctestplatgane, Ktestchgitemsettimel);
       
   201     iLog->Log(Ktestchgitemsettimel);
       
   202 
       
   203     CHgItem* temp = CHgItem::NewL();
       
   204     CleanupStack::PushL( temp );
       
   205     TInt tp = 10;
       
   206     TTime time(tp);
       
   207     
       
   208     temp->SetTime( time );
       
   209     CleanupStack::PopAndDestroy( temp );
       
   210 
       
   211     return KErrNone;
       
   212     }
       
   213 
       
   214 // --------------------------------------------------------------------------
       
   215 // CTestPlatGane::TestCHgItemFlagsL
       
   216 // --------------------------------------------------------------------------
       
   217 //
       
   218 TInt CTestPlatGane::TestCHgItemFlagsL( CStifItemParser& /*aItem*/ )
       
   219     {
       
   220     _LIT(Kctestplatgane, "CTestPlatGane");
       
   221     _LIT(Ktestchgitemflagsl, "In TestCHgItemFlagsL");
       
   222     TestModuleIf().Printf(0, Kctestplatgane, Ktestchgitemflagsl);
       
   223     iLog->Log(Ktestchgitemflagsl);
       
   224 
       
   225     CHgItem* temp = CHgItem::NewL();
       
   226     CleanupStack::PushL( temp );
       
   227     temp->Flags();
       
   228     CleanupStack::PopAndDestroy( temp );
       
   229     
       
   230     return KErrNone;
       
   231     }
       
   232 
       
   233 // --------------------------------------------------------------------------
       
   234 // CTestPlatGane::TestCHgItemSetFlagsL
       
   235 // --------------------------------------------------------------------------
       
   236 //
       
   237 TInt CTestPlatGane::TestCHgItemSetFlagsL( CStifItemParser& /*aItem*/ )
       
   238     {
       
   239     _LIT(Kctestplatgane, "CTestPlatGane");
       
   240     _LIT(Ktestchgitemsetflagsl, "In TestCHgItemSetFlagsL");
       
   241     TestModuleIf().Printf(0, Kctestplatgane, Ktestchgitemsetflagsl);
       
   242     iLog->Log(Ktestchgitemsetflagsl);
       
   243 
       
   244     CHgItem* temp = CHgItem::NewL();
       
   245     CleanupStack::PushL( temp );
       
   246     TInt flag = 0;
       
   247     temp->SetFlags( flag );
       
   248     CleanupStack::PopAndDestroy( temp );
       
   249     
       
   250     return KErrNone;
       
   251     }
       
   252 
       
   253 // --------------------------------------------------------------------------
       
   254 // CTestPlatGane::TestCHgItemClearFlagsL
       
   255 // --------------------------------------------------------------------------
       
   256 //
       
   257 TInt CTestPlatGane::TestCHgItemClearFlagsL( CStifItemParser& /*aItem*/ )
       
   258     {
       
   259     _LIT(Kctestplatgane, "CTestPlatGane");
       
   260     _LIT(Ktestchgitemclearflagsl, "In TestCHgItemClearFlagsL");
       
   261     TestModuleIf().Printf(0, Kctestplatgane, Ktestchgitemclearflagsl);
       
   262     iLog->Log(Ktestchgitemclearflagsl);
       
   263 
       
   264     CHgItem* temp = CHgItem::NewL();
       
   265     CleanupStack::PushL( temp );
       
   266     TInt flag = 0 ;
       
   267     temp->ClearFlags( flag );
       
   268     CleanupStack::PopAndDestroy( temp );
       
   269     
       
   270     return KErrNone;
       
   271     }
       
   272