mtpfws/mtpintegrationtest/integration/mtpmodeselector/inc/MtpModeSelector.h
branchRCL_3
changeset 1 f8e15b44d440
equal deleted inserted replaced
0:d0791faffa3f 1:f8e15b44d440
       
     1 // This material, including documentation and any related computer
       
     2 // programs, is protected by copyright controlled by Nokia. All
       
     3 // rights are reserved. Copying, including reproducing, storing
       
     4 // adapting or translating, any or all of this material requires the
       
     5 // prior written consent of Nokia. This material also contains
       
     6 // confidential information which may not be disclosed to others
       
     7 // without the prior written consent of Nokia.
       
     8 
       
     9 
       
    10 
       
    11 /**
       
    12  @file
       
    13  @internalComponent
       
    14  @test
       
    15 */
       
    16 #ifndef __MTPMODESELECTOR_H__
       
    17 #define __MTPMODESELECTOR_H__
       
    18 
       
    19 #include <eikdialg.h>
       
    20 #include <eikchlst.h>
       
    21 #include "CtransportInitiator.h"
       
    22 
       
    23 
       
    24 class CMtpModeSelectorDlg : public CEikDialog
       
    25 	{
       
    26 public:	
       
    27 	static CMtpModeSelectorDlg* NewL();
       
    28 	CMtpModeSelectorDlg();
       
    29    
       
    30 private:
       
    31     void ConstructL();
       
    32 	~CMtpModeSelectorDlg();
       
    33 	// from CEikDialog
       
    34 	TBool OkToExitL(TInt aButtonId);
       
    35 	void PreLayoutDynInitL();
       
    36 public :
       
    37     CtransportInitiator* iTransportInitiator;	
       
    38 	
       
    39 	};
       
    40 	
       
    41 
       
    42 	
       
    43 /**
       
    44  *	CModeSelectorAppView for creating a window and to draw the text
       
    45  *	
       
    46  */  
       
    47 class CModeSelectorAppView : public CCoeControl
       
    48     {
       
    49 public:
       
    50 	// creates a CModeSelectorAppView object
       
    51 	static CModeSelectorAppView* NewL(const TRect& aRect);
       
    52 	~CModeSelectorAppView();
       
    53 private:
       
    54 	CModeSelectorAppView();
       
    55 	void ConstructL(const TRect& aRect);
       
    56 	//Draws the text on the screen	           
       
    57 	void Draw(const TRect& /*aRect*/) const;
       
    58 
       
    59 private:
       
    60 	//contains the text needs to be drawn
       
    61 	HBufC*  iExampleText;
       
    62     };
       
    63     
       
    64     
       
    65 /**
       
    66  *	CModeSelectorAppUi handles the system events and menu events
       
    67  *	
       
    68  */  
       
    69 class CModeSelectorAppUi : public CEikAppUi
       
    70     {
       
    71 public:
       
    72     void ConstructL();
       
    73 	~CModeSelectorAppUi();
       
    74 
       
    75 private:
       
    76     // Inherirted from class CEikAppUi for handling menu events
       
    77 	void HandleCommandL(TInt aCommand);
       
    78 	
       
    79 	// From CCoeAppUi to handle system events
       
    80 	void HandleSystemEventL(const TWsEvent& aEvent);
       
    81 
       
    82 private:
       
    83 	CCoeControl* iAppView;
       
    84 	};
       
    85 
       
    86 
       
    87 /**
       
    88  *	CExampleDocument for creating the application UI
       
    89  *	
       
    90  */  
       
    91 class CModeSelectorDocument : public CEikDocument
       
    92 	{
       
    93 public:
       
    94 	// creates a CExampleDocument object
       
    95 	static CModeSelectorDocument* NewL(CEikApplication& aApp);
       
    96 	CModeSelectorDocument(CEikApplication& aApp);
       
    97 	void ConstructL();
       
    98 private: 
       
    99 	// Inherited from CEikDocument for creating the AppUI
       
   100 	CEikAppUi* CreateAppUiL();
       
   101 	};
       
   102 	
       
   103 	
       
   104 	
       
   105 /**
       
   106  *	CExampleApplication creates a new instance of the document 
       
   107  *   associated with this application
       
   108  *	
       
   109  */  
       
   110 class CModeSelectorApplication : public CEikApplication
       
   111 	{
       
   112 private: 
       
   113 	// Inherited from class CApaApplication to create a new instance of the document
       
   114 	CApaDocument* CreateDocumentL();
       
   115 	//gets teh Application's UID
       
   116 	TUid AppDllUid() const;
       
   117 	};	 
       
   118 	
       
   119 #endif	   
       
   120 	
       
   121 
       
   122