classicui_pub/notifiers_api/tsrc/src/testsdknotifiersblocksaknglobalprogressdialog.cpp
changeset 0 2f259fa3e83a
equal deleted inserted replaced
-1:000000000000 0:2f259fa3e83a
       
     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:  Test aknglobalprogressdialog.h
       
    15 *
       
    16 */
       
    17 
       
    18 /*
       
    19  * Include files
       
    20  */
       
    21 
       
    22 #include <aknglobalprogressdialog.h>
       
    23 #include <avkon.mbg>
       
    24 #include <aknutils.h>
       
    25 #include <aknsddata.h>
       
    26 
       
    27 #include "testsdknotifiers.hrh"
       
    28 #include "activeexample.h"
       
    29 #include "testsdknotifiers.h"
       
    30 
       
    31 // -----------------------------------------------------------------------------
       
    32 // CTestSDKNotifiers::TestNotifiersPGDialogNewLL
       
    33 // -----------------------------------------------------------------------------
       
    34 //
       
    35 TInt CTestSDKNotifiers::TestNotifiersPGDialogNewLL( CStifItemParser& /*aItem*/ )
       
    36     {
       
    37     CAknGlobalProgressDialog* progressdialog = CAknGlobalProgressDialog::NewL();
       
    38     CleanupStack::PushL( progressdialog );
       
    39     STIF_ASSERT_NOT_NULL( progressdialog );
       
    40     CleanupStack::PopAndDestroy( progressdialog );
       
    41     
       
    42     return KErrNone;
       
    43     }
       
    44 
       
    45 // -----------------------------------------------------------------------------
       
    46 // CTestSDKNotifiers::TestNotifiersPGDialogNewLCL
       
    47 // -----------------------------------------------------------------------------
       
    48 //
       
    49 TInt CTestSDKNotifiers::TestNotifiersPGDialogNewLCL( CStifItemParser& /*aItem*/ )
       
    50     {
       
    51     CAknGlobalProgressDialog* progressdialog = CAknGlobalProgressDialog::NewLC();
       
    52     STIF_ASSERT_NOT_NULL( progressdialog );
       
    53     CleanupStack::PopAndDestroy( progressdialog );
       
    54     
       
    55     return KErrNone;
       
    56     }
       
    57 
       
    58 // -----------------------------------------------------------------------------
       
    59 // CTestSDKNotifiers::TestNotifiersPGDialogDestructorL
       
    60 // -----------------------------------------------------------------------------
       
    61 //
       
    62 TInt CTestSDKNotifiers::TestNotifiersPGDialogDestructorL( CStifItemParser& /*aItem*/ )
       
    63     {
       
    64     CAknGlobalProgressDialog* progressdialog = CAknGlobalProgressDialog::NewL();
       
    65     CleanupStack::PushL( progressdialog );
       
    66     STIF_ASSERT_NOT_NULL( progressdialog );
       
    67     CleanupStack::PopAndDestroy( progressdialog );
       
    68     
       
    69     return KErrNone;
       
    70     }
       
    71 
       
    72 // -----------------------------------------------------------------------------
       
    73 // CTestSDKNotifiers::TestNotifiersPGDialogSetIconLL
       
    74 // -----------------------------------------------------------------------------
       
    75 //
       
    76 TInt CTestSDKNotifiers::TestNotifiersPGDialogSetIconLL( CStifItemParser& /*aItem*/ )
       
    77     {
       
    78     CAknGlobalProgressDialog* progressdialog = CAknGlobalProgressDialog::NewL();
       
    79     CleanupStack::PushL( progressdialog );
       
    80     
       
    81     TFileName file( KMbmFile );
       
    82     User::LeaveIfError( CompleteWithAppPath( file ) );
       
    83     
       
    84     TBuf<KBufSize> buf( KTestString );
       
    85     progressdialog->SetIconL( buf, file, EMbmAvkonQgn_indi_mic, EMbmAvkonQgn_indi_mic_mask );
       
    86     
       
    87     CleanupStack::PopAndDestroy( progressdialog );
       
    88     return KErrNone;
       
    89     }
       
    90 
       
    91 // -----------------------------------------------------------------------------
       
    92 // CTestSDKNotifiers::TestNotifiersPGDialogSetImageLL
       
    93 // -----------------------------------------------------------------------------
       
    94 //
       
    95 TInt CTestSDKNotifiers::TestNotifiersPGDialogSetImageLL( CStifItemParser& /*aItem*/ )
       
    96     {
       
    97     CAknGlobalProgressDialog* progressdialog = CAknGlobalProgressDialog::NewL();
       
    98     CleanupStack::PushL( progressdialog );
       
    99     
       
   100     TFileName file( KMbmFile );
       
   101     User::LeaveIfError( CompleteWithAppPath( file ) );
       
   102     
       
   103     progressdialog->SetImageL( file, EMbmAvkonQgn_indi_mic, EMbmAvkonQgn_indi_mic_mask );
       
   104     
       
   105     CleanupStack::PopAndDestroy( progressdialog );
       
   106     return KErrNone;
       
   107     }
       
   108 
       
   109 // -----------------------------------------------------------------------------
       
   110 // CTestSDKNotifiers::TestNotifiersPGDialogShowProgressDialogLL
       
   111 // -----------------------------------------------------------------------------
       
   112 //
       
   113 TInt CTestSDKNotifiers::TestNotifiersPGDialogShowProgressDialogLL( CStifItemParser& /*aItem*/ )
       
   114     {
       
   115     TBuf<KBufSize> buf( KTestString );
       
   116     CActiveExample* observer = CActiveExample::NewLC();
       
   117     observer->ShowAndCancelProgressDialogLL( buf );
       
   118     CleanupStack::PopAndDestroy( observer );
       
   119     
       
   120     return KErrNone;
       
   121     }
       
   122 
       
   123 // -----------------------------------------------------------------------------
       
   124 // CTestSDKNotifiers::TestNotifiersPGDialogUpdateProgressDialogL
       
   125 // -----------------------------------------------------------------------------
       
   126 //
       
   127 TInt CTestSDKNotifiers::TestNotifiersPGDialogUpdateProgressDialogL( CStifItemParser& /*aItem*/ )
       
   128     {
       
   129     CAknGlobalProgressDialog* progressdialog = CAknGlobalProgressDialog::NewL();
       
   130     CleanupStack::PushL( progressdialog );
       
   131     
       
   132     progressdialog->UpdateProgressDialog( KZero, KHundred );
       
   133     
       
   134     CleanupStack::PopAndDestroy( progressdialog );
       
   135     return KErrNone;
       
   136     }
       
   137 
       
   138 // -----------------------------------------------------------------------------
       
   139 // CTestSDKNotifiers::TestNotifiersPGDialogProcessFinishedL
       
   140 // -----------------------------------------------------------------------------
       
   141 //
       
   142 TInt CTestSDKNotifiers::TestNotifiersPGDialogProcessFinishedL( CStifItemParser& /*aItem*/ )
       
   143     {
       
   144     CAknGlobalProgressDialog* progressdialog = CAknGlobalProgressDialog::NewL();
       
   145     CleanupStack::PushL( progressdialog );
       
   146     
       
   147     progressdialog->ProcessFinished();
       
   148     
       
   149     CleanupStack::PopAndDestroy( progressdialog );
       
   150     return KErrNone;
       
   151     }
       
   152 
       
   153 // -----------------------------------------------------------------------------
       
   154 // CTestSDKNotifiers::TestNotifiersPGDialogCancelProgressDialogL
       
   155 // -----------------------------------------------------------------------------
       
   156 //
       
   157 TInt CTestSDKNotifiers::TestNotifiersPGDialogCancelProgressDialogL( CStifItemParser& aItem )
       
   158     {
       
   159     TInt err = TestNotifiersPGDialogShowProgressDialogLL( aItem );
       
   160     return err;
       
   161     }
       
   162 
       
   163 // -----------------------------------------------------------------------------
       
   164 // CTestSDKNotifiers::TestNotifiersPGDialogSetImageSkinIdsL
       
   165 // -----------------------------------------------------------------------------
       
   166 //
       
   167 TInt CTestSDKNotifiers::TestNotifiersPGDialogSetImageSkinIdsL( CStifItemParser& /*aItem*/ )
       
   168     {
       
   169     CAknGlobalProgressDialog* progressdialog = CAknGlobalProgressDialog::NewL();
       
   170     CleanupStack::PushL( progressdialog );
       
   171     
       
   172     TAknsItemID testid = KAknsIIDNone;
       
   173     progressdialog->SetImageSkinIds( testid, testid );
       
   174     
       
   175     CleanupStack::PopAndDestroy( progressdialog );
       
   176     return KErrNone;
       
   177     }
       
   178 
       
   179 // -----------------------------------------------------------------------------
       
   180 // CTestSDKNotifiers::TestNotifiersPGDialogSetSecondaryDisplayDataL
       
   181 // -----------------------------------------------------------------------------
       
   182 //
       
   183 TInt CTestSDKNotifiers::TestNotifiersPGDialogSetSecondaryDisplayDataL( CStifItemParser& /*aItem*/ )
       
   184     {
       
   185     CAknGlobalProgressDialog* progressdialog = CAknGlobalProgressDialog::NewL();
       
   186     CleanupStack::PushL( progressdialog );
       
   187     
       
   188     CAknSDData* sddata = new( ELeave ) CAknSDData;
       
   189     progressdialog->SetSecondaryDisplayData( sddata );
       
   190     
       
   191     CleanupStack::PopAndDestroy( progressdialog );
       
   192     return KErrNone;
       
   193     }
       
   194 
       
   195 //End file