bluetoothinfo.cpp

来自「Series_60_DP_1_0_2_0_Thread_And_Active_O」· C++ 代码 · 共 65 行

CPP
65 行
字号
/*
* ============================================================================
*  Name     : TBluetoothInfo from Bluetoothinfo.h
*  Part of  : ThreadAO
*  Created  : 12.1.2005 by Forum Nokia
*  Version  : 1.0
*  Copyright: Nokia Corporation
* ============================================================================
*/

#include "BluetoothInfo.h"

// ----------------------------------------------------------------------------------------------
// TBluetoothInfo::TBluetoothInfo(TDes& aName, TDes& aAddress)
//
// Constructor.
// ----------------------------------------------------------------------------------------------

TBluetoothInfo::TBluetoothInfo(TDes& aName, TDes& aAddress)
	{
	iDeviceName = aName;
	iHexAddress = aAddress;
	}

// ----------------------------------------------------------------------------------------------
// void TBluetoothInfo::GetDeviceName(TDes& aName)
//
// Get the name of the bluetooth device.
// ----------------------------------------------------------------------------------------------

void TBluetoothInfo::GetDeviceName(TDes& aName)
	{
	aName.Copy(iDeviceName); 
	}
// ----------------------------------------------------------------------------------------------
// void TBluetoothInfo::GetAddressHex(TDes& aAddress)
//
// Get the address of the bluetooth device.
// ----------------------------------------------------------------------------------------------

void TBluetoothInfo::GetAddressHex(TDes& aAddress)
	{
	aAddress.Copy(iHexAddress);
	}

// ----------------------------------------------------------------------------------------------
// TBluetoothInfo::SetDeviceName(TDes& aName)
//
// Set the name of the bluetooth device.
// ----------------------------------------------------------------------------------------------

void TBluetoothInfo::SetDeviceName(TDes& aName)
	{
	iDeviceName = aName;		
	}
// ----------------------------------------------------------------------------------------------
// void TBluetoothInfo::SetAddressHex(TDes& aAddress)
//
// Set the address of the bluetooth device.
// ----------------------------------------------------------------------------------------------

void TBluetoothInfo::SetAddressHex(TDes& aAddress)
	{
	iHexAddress  = aAddress;
	}

⌨️ 快捷键说明

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