Wednesday, July 25, 2007

[Revisiting] Bluetooth Power Status Check
In my last post i showed how to detect that Blue tooth is ON / OFF in S60 v3 but in Pre-S60v3 SDKs it is bit tricky. Here is one way of achiving same thing using libs from OLD S60 v1.2 SDK. [I found this method in Forum Nokia Posted by a respected member.]
Note : Use it on your Own Rsk.

#ifndef BT_ENG_HACK_H
#define BT_ENG_HACK_H
// link against BTENG.LIB copied from SDK 1.2

// these are headers that are just not included
// in the SDK, so I had to reverse engineer them
//C:\Symbian\tilion\group>"c:\Program Files\Borland\CBuilder6\Bin\expdump.exe"
// C:\Symbian\Series60_1_2_B\epoc32\release\winsb\udeb\BTENG.LIB
class MBTMCMSettingsCB
class CBTMCMSettings;
class CBTMCMSettings

static CBTMCMSettings* NewLC(MBTMCMSettingsCB *x);
static CBTMCMSettings* NewL(MBTMCMSettingsCB *x);

void SetPowerStateL(TBool a, TBool b);
void GetPowerStateL(TBool &a);
TInt GetConnectionStatus(int &a);

Powered by Qumana

No comments:

stats counter