photosgallery/viewframework/commandhandlers/tsrc/ut_commandhandlerdrm/inc/t_glxcommandhandlerdrm.h
changeset 0 4e91876724a2
equal deleted inserted replaced
-1:000000000000 0:4e91876724a2
       
     1 /*
       
     2 * Copyright (c) 2006 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:  CGlxCommandHandlerDRM unit test cases
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef __T_GLXCOMMANDHANDLERDRM_H__
       
    22 #define __T_GLXCOMMANDHANDLERDRM_H__
       
    23 
       
    24 //  EXTERNAL INCLUDES
       
    25 #include <CEUnitTestSuiteClass.h>
       
    26 #include <EUnitDecorators.h>
       
    27 
       
    28 #include <glxcommandhandler.h>
       
    29 #include <mglxmedialistprovider.h>
       
    30 #include <glxlistdefs.h>
       
    31 
       
    32 //  INTERNAL INCLUDES
       
    33 
       
    34 
       
    35 //  FORWARD DECLARATIONS
       
    36 class CGlxCommandHandlerDrm;
       
    37 class _CGlxTestMediaList;
       
    38 class CGlxMedia;
       
    39 class CGlxUiUtility;
       
    40 NONSHARABLE_CLASS( CGlxCommandHandlerDRMTester): public CBase, 
       
    41                                        public MGlxMediaListProvider
       
    42     {
       
    43 public:
       
    44 	static CGlxCommandHandlerDRMTester* NewL();
       
    45 	~CGlxCommandHandlerDRMTester();
       
    46 	
       
    47 	TBool ExecuteL(TInt aCommand);
       
    48 	
       
    49 	void AddNonProtectedItemL();
       
    50 	
       
    51 	void AddProtectedItemL(TInt aId, CGlxMedia* aMedia);
       
    52 	
       
    53 	void ForceFocusChangeEventL( TInt aFocus );
       
    54 	
       
    55 	void ForceHandleAttributeL( TInt aFocus );
       
    56 	
       
    57 public: // From MGlxMediaListProvider
       
    58 	virtual MGlxMediaList& MediaList();
       
    59 
       
    60 private:
       
    61 	CGlxCommandHandlerDRMTester();
       
    62 	void ConstructL();
       
    63 	
       
    64 private:
       
    65 	CGlxCommandHandlerDrm* iDRMHandler;
       
    66 	
       
    67 	_CGlxTestMediaList* iMediaList;
       
    68 	
       
    69 	RPointerArray<CGlxCommandHandler> iCommandHandlerList; 
       
    70 	
       
    71 	CGlxUiUtility* iDummyUiUtility;
       
    72     };
       
    73 
       
    74 //  CLASS DEFINITION
       
    75 /**
       
    76  * TODO Auto-generated EUnit test suite
       
    77  *
       
    78  */
       
    79 NONSHARABLE_CLASS( T_GlxCommandHandlerDRM )
       
    80 	: public CEUnitTestSuiteClass
       
    81     {
       
    82     public:     // Constructors and destructors
       
    83 
       
    84         /**
       
    85          * Two phase construction
       
    86          */
       
    87         static T_GlxCommandHandlerDRM* NewL();
       
    88         static T_GlxCommandHandlerDRM* NewLC();
       
    89         /**
       
    90          * Destructor
       
    91          */
       
    92         ~T_GlxCommandHandlerDRM();
       
    93 
       
    94     private:    // Constructors and destructors
       
    95 
       
    96         T_GlxCommandHandlerDRM();
       
    97         void ConstructL();
       
    98 
       
    99     private:    // New methods
       
   100 
       
   101          void SetupL();
       
   102         
       
   103          void Teardown();
       
   104         
       
   105          void T_CreateL();
       
   106          
       
   107          void T_TestEmptyMediaListL();
       
   108          
       
   109          void T_TestHandleCommandsL();
       
   110          
       
   111          void T_TestHandleFocusChangedL();
       
   112          
       
   113          void T_TestHandleAttributeL();
       
   114         
       
   115 
       
   116     private:    // Data
       
   117 	    CGlxCommandHandlerDRMTester* iDRMHandlerTester;
       
   118 
       
   119         EUNIT_DECLARE_TEST_TABLE; 
       
   120 
       
   121     };
       
   122 
       
   123 #endif      //  __T_GLXCOMMANDHANDLERDRM_H__
       
   124 
       
   125 // End of file