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

📄 testeapiappview.h

📁 qaSDQDaca<FCSASDAVCASC SDVFDSVDF
💻 H
字号:
/*
============================================================================
 Name		: TesteAPIAppView.h
 Author	  : Tiago Sousa
 Copyright   : 
 Description : Declares view class for application.
============================================================================
*/

#ifndef __TESTEAPIAPPVIEW_h__
#define __TESTEAPIAPPVIEW_h__

// INCLUDES
#include <coecntrl.h>
#include "Bluetooth.h"

// CLASS DECLARATION
class CTesteAPIAppView : public CCoeControl, BluetoothAPIListener
	{
	public: // New methods

		/**
		* NewL.
		* Two-phased constructor.
		* Create a CTesteAPIAppView object, which will draw itself to aRect.
		* @param aRect The rectangle this view will be drawn to.
		* @return a pointer to the created instance of CTesteAPIAppView.
		*/
		static CTesteAPIAppView* NewL( const TRect& aRect );

		/**
		* NewLC.
		* Two-phased constructor.
		* Create a CTesteAPIAppView object, which will draw itself
		* to aRect.
		* @param aRect Rectangle this view will be drawn to.
		* @return A pointer to the created instance of CTesteAPIAppView.
		*/
		static CTesteAPIAppView* NewLC( const TRect& aRect );

		/**
		* ~CTesteAPIAppView
		* Virtual Destructor.
		*/
		virtual ~CTesteAPIAppView();

	public:  // Functions from base classes

		/**
		* From CCoeControl, Draw
		* Draw this CTesteAPIAppView to the screen.
		* @param aRect the rectangle of this view that needs updating
		*/
		void Draw( const TRect& aRect ) const;

		/**
		* From CoeControl, SizeChanged.
		* Called by framework when the view size is changed.
		*/
		virtual void SizeChanged();
		virtual void devicesDiscoverFinished( vector<BTDeviceData>& aDiscoveredDeviceList );
		virtual void servicesDiscoverFinished( vector<BTDeviceData>& aDiscoveredDeviceList );
		void BTConnectServer();
		void BTConnectClient();
		void BTSendMsg(char *aMessage);

		void serverConnected();
		void serverDisconnected();
		void clientConnected();
		void clientDisconnected();
		void messageReceived( char * aMessage);
		void messageSent();
		void errorOcurred(int aError);
		void DisconnectAsServer();
		void DisconnectAsClient();
		
	private: // Constructors

		/**
		* ConstructL
		* 2nd phase constructor.
		* Perform the second phase construction of a
		* CTesteAPIAppView object.
		* @param aRect The rectangle this view will be drawn to.
		*/
		void ConstructL(const TRect& aRect);

		/**
		* CTesteAPIAppView.
		* C++ default constructor.
		*/
		CTesteAPIAppView();
		
		BluetoothAPI *Bluetooth;
		TInt status;
		vector<BTDeviceData> DeviceList;
		vector<BTDeviceData> ServiceList;
		char iMessage[256];

	};

#endif // __TESTEAPIAPPVIEW_h__

// End of File

⌨️ 快捷键说明

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