📄 bluetoothengine_extensiblepluginappui.cpp
字号:
/* ====================================================================
* File: BluetoothEngine_ExtensiblePlugInAppUi.cpp
* Created: 23/08/07
* Author:
* Copyright (c): All rights reserved
* ==================================================================== */
#include <avkon.hrh>
#include <aknnotewrappers.h>
#include "BluetoothEngine_ExtensiblePlugIn.pan"
#include "BluetoothEngine_ExtensiblePlugInAppUi.h"
#include "BluetoothEngine_ExtensiblePlugInAppView.h"
#include "BluetoothEngine_ExtensiblePlugIn.hrh"
#include "MyBluetoothEngineClass.h"
// ConstructL is called by the application framework
void CBluetoothEngine_ExtensiblePlugInAppUi::ConstructL()
{
BaseConstructL();
iAppView = CBluetoothEngine_ExtensiblePlugInAppView::NewL(ClientRect());
AddToStackL(iAppView);
iMyBTEngine = CMyBTEngine::NewL(iAppView);
}
CBluetoothEngine_ExtensiblePlugInAppUi::CBluetoothEngine_ExtensiblePlugInAppUi()
{
// no implementation required
}
CBluetoothEngine_ExtensiblePlugInAppUi::~CBluetoothEngine_ExtensiblePlugInAppUi()
{
if (iAppView)
{
RemoveFromStack(iAppView);
delete iAppView;
iAppView = NULL;
}
if (iMyBTEngine)
{
delete iMyBTEngine;
iMyBTEngine = NULL;
}
}
// handle any menu commands
void CBluetoothEngine_ExtensiblePlugInAppUi::HandleCommandL(TInt aCommand)
{
switch(aCommand)
{
case EEikCmdExit:
case EAknSoftkeyExit:
Exit();
break;
case EBluetoothEngine_ExtensiblePlugInCommand1:
{
iMyBTEngine->GetAllSettings();
}
break;
case EBluetoothEngine_ExtensiblePlugInCommand2:
{
iMyBTEngine->GetLocalBTName();
}
break;
case EBluetoothEngine_ExtensiblePlugInCommand3:
{
iMyBTEngine->SetLocalBTName();
}
break;
case EBluetoothEngine_ExtensiblePlugInCommand4:
{
iMyBTEngine->GetDiscoverabilityMd();
}
break;
case EBTDiscHidden:
{
iMyBTEngine->SetDiscoverabilityMdHidden();
}
break;
case EBTDiscGeneral:
{
iMyBTEngine->SetDiscoverabilityMdGeneral();
}
break;
case EBTDiscTemp:
{
iMyBTEngine->SetDiscoverabilityMdTemp();
}
break;
case EBluetoothEngine_ExtensiblePlugInCommand6:
{
iMyBTEngine->GetSearchMd();
}
break;
case EBTSearchGeneral:
{
iMyBTEngine->SetSearchMdGeneral();
}
break;
case EBTSearchLimit:
{
iMyBTEngine->SetSearchMdLimited();
}
break;
case EBluetoothEngine_ExtensiblePlugInCommand8:
{
iMyBTEngine->GetPowerState();
}
break;
case EBTPowerOn:
{
iMyBTEngine->SetPowerStateOn();
}
break;
case EBTPowerOff:
{
iMyBTEngine->SetPowerStateOff();
}
break;
case EBluetoothEngine_ExtensiblePlugInCommand10:
{
iMyBTEngine->GetBTSapEnabledStatus();
}
break;
case EBTSapEnable:
{
iMyBTEngine->EnableSapMode();
}
break;
case EBTSapDisable:
{
iMyBTEngine->DisableSapMode();
}
break;
case EBluetoothEngine_ExtensiblePlugInCommand12:
{
iMyBTEngine->GetBTGetPairedDevices();
}
break;
case EBluetoothEngine_ExtensiblePlugInCommand13:
{
iMyBTEngine->AddDeviceToRegistry();
}
break;
case EBTGetDevice:
{
iMyBTEngine->GetDeviceFromRegistry();
}
break;
case EBTGetDevices:
{
iMyBTEngine->GetDevicesFromRegistry();
}
break;
case EBTDeleteDevice:
{
iMyBTEngine->DeleteDeviceFrmRegistry();
}
break;
case EBTModifyDevice:
{
iMyBTEngine->ModifyDeviceFrmRegistry();
}
break;
case EBluetoothEngine_ExtensiblePlugInCommand15:
{
iMyBTEngine->SetDeviceSecurity();
}
break;
default:
Panic(EBluetoothEngine_ExtensiblePlugInBasicUi);
break;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -