classicui_plat/sounds_api/tsrc/inc/testsdksounds.h
changeset 45 667edd0b8678
equal deleted inserted replaced
37:89c890c70182 45:667edd0b8678
       
     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 sounds_api 
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_TESTSDKSOUNDS_H
       
    20 #define C_TESTSDKSOUNDS_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <stiflogger.h>
       
    24 #include <testscripterinternal.h>
       
    25 #include <stiftestmodule.h>
       
    26 #include <testclassassert.h>
       
    27 
       
    28 #include <aknsoundinfo.h>
       
    29 #include <coemain.h>
       
    30 #include <coeaui.h>
       
    31 
       
    32 #include <aknsoundsystem.h>
       
    33 
       
    34 // MACROS
       
    35 #define TEST_CLASS_VERSION_MAJOR 0
       
    36 #define TEST_CLASS_VERSION_MINOR 0
       
    37 #define TEST_CLASS_VERSION_BUILD 0
       
    38 
       
    39 // Logging path
       
    40 _LIT( KtestsdksoundsLogPath, "\\logs\\testframework\\testsdksounds\\" );
       
    41 // Log file
       
    42 _LIT( KtestsdksoundsLogFile, "testsdksounds.txt" );
       
    43 _LIT( KtestsdksoundsLogFileWithTitle, "testsdksounds_[%S].txt" );
       
    44 
       
    45 /**
       
    46  *  Ctestsdksounds test class for STIF Test Framework TestScripter.
       
    47  *  @since S60 5.0
       
    48  */
       
    49 NONSHARABLE_CLASS(CTestSDKSounds) : public CScriptBase
       
    50     {
       
    51 public: // Constructors and destructor
       
    52 
       
    53     /**
       
    54      * Two-phased constructor.
       
    55      */
       
    56     static CTestSDKSounds* NewL( CTestModuleIf& aTestModuleIf );
       
    57 
       
    58     /**
       
    59      * Destructor.
       
    60      */
       
    61     virtual ~CTestSDKSounds();
       
    62 
       
    63 public: // Functions from base classes
       
    64 
       
    65     /**
       
    66      * From CScriptBase Runs a script line.
       
    67      * @since S60 5.0
       
    68      * @param aItem Script line containing method name and parameters
       
    69      * @return Symbian OS error code
       
    70      */
       
    71     virtual TInt RunMethodL( CStifItemParser& aItem );
       
    72 
       
    73 private:
       
    74 
       
    75     /**
       
    76      * C++ default constructor.
       
    77      */
       
    78     CTestSDKSounds( CTestModuleIf& aTestModuleIf );
       
    79 
       
    80     /**
       
    81      * By default Symbian 2nd phase constructor is private.
       
    82      */
       
    83     void ConstructL();
       
    84 
       
    85     /**
       
    86      * Frees all resources allocated from test methods.
       
    87      * @since S60 5.0
       
    88      */
       
    89     void Delete();
       
    90 
       
    91     /**
       
    92      * Method used to log version of test class
       
    93      */
       
    94     void SendTestClassVersion();
       
    95 
       
    96 private: // Test AknSoundInfo.h
       
    97     /**
       
    98      * TestSINewL test function for testing the NewL function
       
    99      * @since S60 5.0
       
   100      * @param aItem never used
       
   101      * @return Symbian OS error code.
       
   102      */
       
   103     virtual TInt TestSINewL( CStifItemParser& aItem );
       
   104     /*
       
   105      * TestSIInternalizeL test function for testing the NewL function with Resource
       
   106      * @since S60 5.0
       
   107      * @param aItem never used
       
   108      * @return Symbian OS error code.
       
   109      */
       
   110     virtual TInt TestSIInternalizeL( CStifItemParser& aItem );
       
   111     /**
       
   112      * TestSIExternalizeL test function for testing the NewL function with Medias
       
   113      * @since S60 5.0
       
   114      * @param aItem never used
       
   115      * @return Symbian OS error code.
       
   116      */
       
   117     virtual TInt TestSIExternalizeL( CStifItemParser& aItem );
       
   118 
       
   119 private: // Test AknSoundSystem.h
       
   120     /**
       
   121      * TestSSNewL test function for testing the NewL function
       
   122      * @since S60 5.0
       
   123      * @param aItem never used
       
   124      * @return Symbian OS error code.
       
   125      */
       
   126     virtual TInt TestSSNewL( CStifItemParser& aItem );
       
   127     /*
       
   128      * TestSSPushContextL test function for testing the NewL function with Resource
       
   129      * @since S60 5.0
       
   130      * @param aItem never used
       
   131      * @return Symbian OS error code.
       
   132      */
       
   133     virtual TInt TestSSPushContextL( CStifItemParser& aItem );
       
   134     /**
       
   135      * TestSSPopContextL test function for testing the NewL function with Medias
       
   136      * @since S60 5.0
       
   137      * @param aItem never used
       
   138      * @return Symbian OS error code.
       
   139      */
       
   140     virtual TInt TestSSPopContextL( CStifItemParser& aItem );
       
   141     /**
       
   142      * TestSSPlaySoundWithTKeyEventL test function for testing the NewL function with Medias
       
   143      * @since S60 5.0
       
   144      * @param aItem never used
       
   145      * @return Symbian OS error code.
       
   146      */
       
   147     virtual TInt TestSSPlaySoundWithTKeyEventL(CStifItemParser& aItem);
       
   148     /**
       
   149      * TestSSPlaySoundWithTIntL test function for testing the NewL function with Medias
       
   150      * @since S60 5.0
       
   151      * @param aItem never used
       
   152      * @return Symbian OS error code.
       
   153      */
       
   154     virtual TInt TestSSPlaySoundWithTIntL(CStifItemParser& aItem);
       
   155     /**
       
   156      * TestSSAddAppSoundInfoListL test function for testing the NewL function with Medias
       
   157      * @since S60 5.0
       
   158      * @param aItem never used
       
   159      * @return Symbian OS error code.
       
   160      */
       
   161     virtual TInt TestSSAddAppSoundInfoListL(CStifItemParser& aItem);
       
   162     /**
       
   163      * TestSSBringToForegroundL test function for testing the NewL function with Medias
       
   164      * @since S60 5.0
       
   165      * @param aItem never used
       
   166      * @return Symbian OS error code.
       
   167      */
       
   168     virtual TInt TestSSBringToForegroundL(CStifItemParser& aItem);
       
   169     /**
       
   170      * TestSSStopSoundL test function for testing the NewL function with Medias
       
   171      * @since S60 5.0
       
   172      * @param aItem never used
       
   173      * @return Symbian OS error code.
       
   174      */
       
   175     virtual TInt TestSSStopSoundL(CStifItemParser& aItem);
       
   176     /**
       
   177      * TestSSLockContextL test function for testing the NewL function with Medias
       
   178      * @since S60 5.0
       
   179      * @param aItem never used
       
   180      * @return Symbian OS error code.
       
   181      */
       
   182     virtual TInt TestSSLockContextL( CStifItemParser& aItem );
       
   183     /**
       
   184      * TestSSReleaseContextL test function for testing the NewL function with Medias
       
   185      * @since S60 5.0
       
   186      * @param aItem never used
       
   187      * @return Symbian OS error code.
       
   188      */
       
   189     virtual TInt TestSSReleaseContextL(CStifItemParser& aItem);
       
   190     /**
       
   191      * TestSSRequestSoundInfoL test function for testing the NewL function with Medias
       
   192      * @since S60 5.0
       
   193      * @param aItem never used
       
   194      * @return Symbian OS error code.
       
   195      */
       
   196     virtual TInt TestSSRequestSoundInfoL(CStifItemParser& aItem);
       
   197     /**
       
   198      * TestSSTopContextL test function for testing the NewL function with Medias
       
   199      * @since S60 5.0
       
   200      * @param aItem never used
       
   201      * @return Symbian OS error code.
       
   202      */
       
   203     virtual TInt TestSSTopContextL(CStifItemParser& aItem);
       
   204 
       
   205 private: // Data
       
   206 
       
   207     /**
       
   208      * ScreenSaver Property
       
   209      */
       
   210     TInt iOldScreenSaverProperty;
       
   211 
       
   212     // Resource file offset
       
   213     TInt iOffset;
       
   214     };
       
   215 
       
   216 #endif      // C_TESTSDKSOUNDS_H
       
   217 // End of File