common/tools/ats/smoketest/mediamgmt/src/MediaMgmtSmokeTestModuleBlocks.cpp
author victorp@symbian.org
Wed, 03 Feb 2010 16:06:24 +0000
changeset 872 17498133d9ad
parent 811 08dbc9b99fd2
permissions -rw-r--r--
adding EPL headers to smoke test
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
811
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
     1
/*
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
     2
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
     3
* All rights reserved.
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
     4
* This component and the accompanying materials are made available
872
17498133d9ad adding EPL headers to smoke test
victorp@symbian.org
parents: 811
diff changeset
     5
* under the terms of the License "Eclipse Public License v1.0"
811
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
     6
* which accompanies this distribution, and is available
872
17498133d9ad adding EPL headers to smoke test
victorp@symbian.org
parents: 811
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
811
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
     8
*
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
     9
* Initial Contributors:
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    11
*
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    12
* Contributors:
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    13
* 
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    14
* Description: This file contains testclass implementation.
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    15
*
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    16
*/
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    17
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    18
// [INCLUDE FILES] - do not remove
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    19
#include <e32svr.h>
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    20
#include <StifParser.h>
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    21
#include <Stiftestinterface.h>
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    22
#include <MGFetch.h>
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    23
#include <mediafiletypes.hrh>
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    24
#include "MediaMgmtSmokeTestModule.h"
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    25
#include "MediaMgmtObserver.h"
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    26
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    27
// EXTERNAL DATA STRUCTURES
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    28
//extern  ?external_data;
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    29
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    30
// EXTERNAL FUNCTION PROTOTYPES  
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    31
//extern ?external_function( ?arg_type,?arg_type );
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    32
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    33
// CONSTANTS
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    34
//const ?type ?constant_var = ?constant;
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    35
_LIT(KTypeImage, "Images");
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    36
_LIT(KTypeAudio, "Audio");
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    37
_LIT(KTypeVideo, "Video");
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    38
_LIT(KTypeAny,	 "Any");
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    39
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    40
// MACROS
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    41
//#define ?macro ?macro_def
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    42
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    43
// LOCAL CONSTANTS AND MACROS
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    44
//const ?type ?constant_var = ?constant;
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    45
//#define ?macro_name ?macro_def
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    46
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    47
// MODULE DATA STRUCTURES
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    48
//enum ?declaration
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    49
//typedef ?declaration
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    50
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    51
// LOCAL FUNCTION PROTOTYPES
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    52
//?type ?function_name( ?arg_type, ?arg_type );
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    53
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    54
// FORWARD DECLARATIONS
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    55
//class ?FORWARD_CLASSNAME;
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    56
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    57
// ============================= LOCAL FUNCTIONS ===============================
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    58
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    59
// -----------------------------------------------------------------------------
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    60
// ?function_name ?description.
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    61
// ?description
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    62
// Returns: ?value_1: ?description
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    63
//          ?value_n: ?description_line1
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    64
//                    ?description_line2
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    65
// -----------------------------------------------------------------------------
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    66
//
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    67
/*
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    68
?type ?function_name(
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    69
    ?arg_type arg,  // ?description
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    70
    ?arg_type arg)  // ?description
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    71
    {
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    72
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    73
    ?code  // ?comment
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    74
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    75
    // ?comment
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    76
    ?code
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    77
    }
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    78
*/
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    79
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    80
// ============================ MEMBER FUNCTIONS ===============================
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    81
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    82
// -----------------------------------------------------------------------------
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    83
// CMediaMgmtSmokeTestModule::Delete
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    84
// Delete here all resources allocated and opened from test methods. 
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    85
// Called from destructor. 
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    86
// -----------------------------------------------------------------------------
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    87
//
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    88
void CMediaMgmtSmokeTestModule::Delete() 
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    89
    {
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    90
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    91
    }
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    92
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    93
// -----------------------------------------------------------------------------
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    94
// CMediaMgmtSmokeTestModule::RunMethodL
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    95
// Run specified method. Contains also table of test mothods and their names.
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    96
// -----------------------------------------------------------------------------
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    97
//
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    98
TInt CMediaMgmtSmokeTestModule::RunMethodL( 
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
    99
    CStifItemParser& aItem ) 
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   100
    {
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   101
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   102
    static TStifFunctionInfo const KFunctions[] =
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   103
        {  
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   104
        // Copy this line for every implemented function.
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   105
        // First string is the function name used in TestScripter script file.
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   106
        // Second is the actual implementation member function. 
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   107
        ENTRY( "ListMediaItems", CMediaMgmtSmokeTestModule::ListMediaItemsL ),
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   108
        //ADD NEW ENTRY HERE
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   109
        // [test cases entries] - Do not remove
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   110
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   111
        };
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   112
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   113
    const TInt count = sizeof( KFunctions ) / 
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   114
                        sizeof( TStifFunctionInfo );
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   115
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   116
    return RunInternalL( KFunctions, count, aItem );
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   117
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   118
    }
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   119
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   120
// -----------------------------------------------------------------------------
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   121
// CMediaMgmtSmokeTestModule::ExampleL
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   122
// Example test method function.
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   123
// (other items were commented in a header).
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   124
// -----------------------------------------------------------------------------
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   125
//
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   126
TInt CMediaMgmtSmokeTestModule::ListMediaItemsL( CStifItemParser& aItem )
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   127
    {
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   128
    CPtrCArray* expectedItems = new (ELeave) CPtrCArray(5);
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   129
    CleanupArrayDeletePushL(expectedItems);
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   130
    
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   131
    // Print to UI
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   132
    _LIT( KMediaMgmtSmokeTestModule, "MediaMgmtSmokeTestModule" );
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   133
    _LIT( KListImages, "In ListMediaItemsL" );
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   134
    TestModuleIf().Printf( 0, KMediaMgmtSmokeTestModule, KListImages );
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   135
    // Print to log file
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   136
    iLog->Log( KListImages );
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   137
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   138
    TInt i = 0;
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   139
    TPtrC type;
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   140
    _LIT( KParam, "Param[%i]: %S" );
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   141
    if ( aItem.GetNextString( type ) == KErrNone )
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   142
    	{
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   143
    	TPtrC itemPath;
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   144
    	while ( aItem.GetNextString ( itemPath ) == KErrNone )
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   145
    		{
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   146
    		TestModuleIf().Printf( i, KMediaMgmtSmokeTestModule, 
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   147
									KParam, i, &itemPath );
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   148
    		expectedItems->AppendL( itemPath );
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   149
    		i++;
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   150
    		}
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   151
    
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   152
    	CDesCArrayFlat* media = new (ELeave) CDesCArrayFlat(5);
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   153
    	CleanupArrayDeletePushL(media);
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   154
    	
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   155
    	// work out the file type we are looking for
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   156
    	TMediaFileType mediaType;
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   157
    	if (type == KTypeImage)
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   158
    		{
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   159
    		mediaType = EImageFile;
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   160
    		}
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   161
    	else if (type == KTypeAudio)
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   162
    		{
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   163
    		mediaType = EAudioFile;
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   164
    		}
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   165
    	else if (type == KTypeVideo)
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   166
    		{
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   167
    		mediaType = EVideoFile;
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   168
    		}
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   169
    	else
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   170
    		{
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   171
    		User::Leave(KErrArgument);
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   172
    		}
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   173
    	
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   174
    	MediaMgmtObserver* observer = new (ELeave) MediaMgmtObserver;
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   175
    
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   176
    	if (MGFetch::RunL(*media, mediaType, EFalse, observer))
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   177
    		{
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   178
    		//compare the two
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   179
    		TInt total = media->Count();
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   180
    		}
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   181
    
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   182
    	CleanupStack::PopAndDestroy(media);
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   183
    	}
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   184
    
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   185
    CleanupStack::PopAndDestroy(expectedItems);
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   186
    return KErrNone;
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   187
    }
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   188
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   189
// -----------------------------------------------------------------------------
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   190
// CMediaMgmtSmokeTestModule::?member_function
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   191
// ?implementation_description
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   192
// (other items were commented in a header).
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   193
// -----------------------------------------------------------------------------
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   194
//
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   195
/*
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   196
TInt CMediaMgmtSmokeTestModule::?member_function(
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   197
   CItemParser& aItem )
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   198
   {
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   199
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   200
   ?code
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   201
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   202
   }
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   203
*/
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   204
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   205
// ========================== OTHER EXPORTED FUNCTIONS =========================
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   206
// None
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   207
08dbc9b99fd2 Test: Add MediaMgmt smoke tests (not being built or run ATM)
brendand
parents:
diff changeset
   208
//  [End of File] - Do not remove