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

📄 mybluetoothengineclass.h

📁 Symbian C++ 蓝牙例程
💻 H
字号:
/* ====================================================================
 * File: MyBluetoothEngineClass.h
 * Created: 23/08/07
 * Author: 
 * Copyright (c): , All rights reserved
 * ==================================================================== */

#ifndef __MYBLUETOOTHENGINE_CLASS_H__
#define __MYBLUETOOTHENGINE_CLASS_H__

#include <bteng.h>

//Forward Declarations
class CBTMCMSettings;
class CBluetoothEngine_ExtensiblePlugInAppView;

class CMyBTEngine : public MBTMCMSettingsCB
{

public:
/*!
  @function NewL
   
  @discussion Create a CMyBTEngine object, 
  @result a pointer to the created instance of CMyBTEngine
  */
    static CMyBTEngine* NewL(CBluetoothEngine_ExtensiblePlugInAppView* aAppView);

/*!
  @function NewL
   
  @discussion Create a CMyBTEngine object, 
  @result a pointer to the created instance of CMyBTEngine
  */
    static CMyBTEngine* NewLC(CBluetoothEngine_ExtensiblePlugInAppView* aAppView);


/*!
  @function ~CMyBTEngine
  
  @discussion Destroy the object and release all memory objects
  */
    ~CMyBTEngine();

private: //From MBTMCMSettingsCB

/*!
  * Pure virtual function to provide a way to notify parent instance
  * of Discoverability Mode changes.
  * Parameters:
  * @param aMode     Current discoverability mode.
  * @return none
  */
    void DiscoverabilityModeChangedL(TBTDiscoverabilityMode aMode);

/*!
  * Pure virtual function  being implemented to provide a way to notify parent instance
  * of Power Mode changes.
  * Parameters:
  * @param aState    Current power mode state
  * @return none
  */
    void PowerModeChangedL(TBool aState);

/*!
  * Pure virtual function being implemented to provide a way to notify parent instance
  * of Audio accessory changes.
  * Parameters:
  * @param aAddr      Bluetooth address
  * @return none
  */
    void BTAAccessoryChangedL (TBTDevAddr& aAddr); 

/*!
  * Pure virtual function being implemented to provide a way to notify parent instance
  * of Audio connection changes.
  * Parameters:
  * @param aStatus        ETrue if we have audio connection
  * @return none
  */
    void  BTAAConnectionStatusChangedL (TBool &aStatus); 

private:

/*!
  @function ConstructL
  
  @discussion  Perform the second phase construction of a CMyBTEngine object
  */
    void ConstructL(CBluetoothEngine_ExtensiblePlugInAppView* aAppView);

/*!
  @function CMyBTEngine
  
  @discussion Perform the first phase of two phase construction 
  */
    CMyBTEngine();	

public:  

/*!
  @function GetAllSettings
  
  @discussion retrieves the information like Bluetooth Status (i.e., On or Off), 
  Discoverability, Search Mode, Name, Sap Mode  
  */
  void GetAllSettings();

/*!
  @function GetLocalBTName
  
  @discussion retrieves the local Bluetooth Name  
  */
  void GetLocalBTName();

/*!
  @function SetLocalBTName
  
  @discussion sets the local Bluetooth Name  
  */	
  void SetLocalBTName();

/*!
  @function GetDiscoverabilityMd
  
  @discussion gets the Bluetooth Discoverability Mode
  */	
  void GetDiscoverabilityMd();

/*!
  @function SetDiscoverabilityMdHidden
  
  @discussion sets the Bluetooth Discoverability Mode to Hidden
  */	
  void SetDiscoverabilityMdHidden();
	
/*!
  @function SetDiscoverabilityMdGeneral
  
  @discussion sets the Bluetooth Discoverability Mode to General  
  */	
  void SetDiscoverabilityMdGeneral();
	
/*!
  @function SetDiscoverabilityMdTemp
  
  @discussion sets the Bluetooth Discoverability Mode to Temperory
  */	
  void SetDiscoverabilityMdTemp();
	
/*!
  @function GetSearchMd
  
  @discussion gets the Bluetooth Search Mode  
  */	
  void GetSearchMd();
	
/*!
  @function SetSearchMdGeneral
  
  @discussion sets the Bluetooth Search Mode to General 
  */
  void SetSearchMdGeneral();
	
/*!
  @function SetSearchMdLimited
  
  @discussion sets the Bluetooth Search Mode to Limited 
  */
  void SetSearchMdLimited();
	
/*!
  @function GetPowerState
  
  @discussion gets the Bluetooth Power State
  */
  void GetPowerState();
	
/*!
  @function SetPowerStateOn
  
  @discussion sets the Bluetooth Power State On  
  */	
  void SetPowerStateOn();
	
/*!
  @function SetPowerStateOff
  
  @discussion sets the Bluetooth Power State Off
  */
  void SetPowerStateOff();

/*!
  @function GetBTSapEnabledStatus
  
  @discussion gets the Bluetooth Sap Enabled Status 
  */	
  void GetBTSapEnabledStatus();

/*!
  @function EnableSapMode
  
  @discussion enables the Bluetooth Sap Mode  
  */	
  void EnableSapMode();
	
/*!
  @function DisableSapMode
  
  @discussion disables the Bluetooth Sap Mode 
  */
  void DisableSapMode();
	
/*!
  @function GetBTGetPairedDevices
  
  @discussion gets the details of all the paired devices  
  */
  void GetBTGetPairedDevices();
	
/*!
  @function AddDeviceToRegistry
  
  @discussion adds the device to Bluetooth Registry
  */
  void AddDeviceToRegistry(); 

/*!
  @function GetDeviceFromRegistry
  
  @discussion gets the device from Bluetooth Registry  
  */
  void GetDeviceFromRegistry();
	
/*!
  @function GetDevicesFromRegistry
  
  @discussion gets all the devices from Bluetooth Registry
  */		
  void GetDevicesFromRegistry();
	
/*!
  @function DeleteDeviceFrmRegistry
  
  @discussion deletes a Device from the Bluetooth Registry
  */	
  void DeleteDeviceFrmRegistry();
	
	
/*!
  @function ModifyDeviceFrmRegistry
  
  @discussion modifies a Device data into Bluetooth Registry
  */	
  void ModifyDeviceFrmRegistry();	
	
/*!
  @function SetDeviceSecurity
  
  @discussion sets  Security params for the Device
  */	
  void SetDeviceSecurity();
	
	
  CBTMCMSettings* iBtSettings;
	
  RBTDeviceHandler iBtDeviceHandler;
  
  CBluetoothEngine_ExtensiblePlugInAppView* iDupAppView;
  
  TBool iPowerState;
  
  TBTDiscoverabilityMode iDiscoverabilityMode;
  
  TBTSearchMode iSearchMode;
  
  TBuf<50> iBTLocalName;
  
  TBool iNameModifiedFlag;
  
  TBTSapMode iSapMode;
  
  TInt iErrCode;
  
  TBuf<5> iErrCodeBuf;
  
  TBuf<20> iDevFrdName;
  
  TBTDevAddr iBTIntAddr;
  
  CBTDevice* iBTDevice;

};







#endif // __MYBLUETOOTHENGINE_CLASS_H__

⌨️ 快捷键说明

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