⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 test_e1122000.h

📁 一个关于s60第五版中的传感器的使用方法的例子
💻 H
字号:
/*
* ==============================================================================
* ==============================================================================
*/

#ifndef __TestAPPUI_H__
#define __TestAPPUI_H__

// INCLUDES
#include <aknappui.h>
#include <akndoc.h>
#include <aknapp.h>
#include <e32property.h>
#include <ECom.h>
#include <aknwaitdialog.h> 
#include <AknProgressDialog.h>
#include <eikprogi.h> 

#include <sensrvchannelfinder.h>
#include <sensrvchannel.h>
#include <sensrvmagnetometersensor.h>
#include <sensrvgeneralproperties.h>
#include <sensrvmagnetometersensor.h>
#include <sensrvaccelerometersensor.h>
#include <sensrvorientationsensor.h>
#include <sensrvdatalistener.h> 
#include <sensrvtappingsensor.h> 
#include <sensrvtypes.h> 


// FORWARD DECLARATIONS
class CResultsContainer;
class CProppertyContainer;

// UID for the application;
// this should correspond to the uid defined in the mmp file
const TUid KUidTestApp = { 0xE1122000};

// CLASS DECLARATION
/**
* CTestAppUi application UI class.
* Interacts with the user through the UI and request message processing
* from the handler class
*/
class CTestAppUi : public CAknAppUi,MSensrvDataListener,MProgressDialogCallback
    {
    public: // Constructors and destructor
        void ConstructL();
        CTestAppUi();
        ~CTestAppUi();
    public:    
    	void ShowDialogL(TDesC& aText,const TDesC& aHeading);
		void LogEventL(const TDesC& aEvent);
		void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane);
    protected:
   		void DialogDismissedL (TInt aButtonId);
    	void DataReceived( CSensrvChannel& aChannel, TInt aCount, TInt aDataLost );
    	void DataError( CSensrvChannel& aChannel, TSensrvErrorSeverity aError );
    	void GetDataListenerInterfaceL( TUid /*aInterfaceUid*/, TAny*& /*aInterface*/ ){};
    private:  // Functions from base classes
		void HandleCommandL( TInt aCommand );	
		void GetAllChannelsL(void);
		void UpdateProcessL(const TDesC& aProgressText);
		void StartWaitNoteL();
		
    private: // Data
        CResultsContainer* 		iResultsContainer;
        CProppertyContainer*	iProppertyContainer;
        
        CSensrvChannelFinder*	iSensrvChannelFinder;
        RSensrvChannelInfoList  iChannelInfoList;
        CSensrvChannel*			iSensrvSensorChannel;
    	TInt					iUpdateInterval;
    	TUint32					iDataCount,iDataLostCount;
    	
    	TInt					iData1Max,iData2Max,iData3Max;
    	TInt					iData1Min,iData2Min,iData3Min;
    	
    	TTime					iStartTime;
    	CAknWaitDialog*				iWaitDialog;
    };





// CLASS DECLARATION

/**
* CTestDocument application class.
* An instance of class CTestDocument is the Document part of the
* AVKON application framework for the Test example application.
*/
class CTestDocument : public CAknDocument
    {
    public: // Constructors and destructor
        static CTestDocument* NewL( CEikApplication& aApp );
        static CTestDocument* NewLC( CEikApplication& aApp );
        virtual ~CTestDocument();
        void LogToFileL(const TDesC& aStuff);
   	//	const CAiwGenericParamList* GetAiwParameters() const;
    public: // Functions from base classes
        CEikAppUi* CreateAppUiL();
    private: // Constructors
        void ConstructL();
        CTestDocument( CEikApplication& aApp );
    private:
    	RFile		iDebugFile;
		CTestAppUi*	iTestAppUi;
    };
    
    


// CLASS DECLARATION

/**
* CTestApplication application class.
* Provides factory to create concrete document object.
* An instance of CTestApplication is the application part of the
* AVKON application framework for the Test example application.
*/
class CTestApplication : public CAknApplication
    {
    public: // Functions from base classes
        TUid AppDllUid() const;

    protected: // Functions from base classes
        CApaDocument* CreateDocumentL();
    };
    
    
#endif // __TestAPPUI_H__

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -