Saturday, August 09, 2008

How to get information about Profile [Online / Offline].

Profile information are enumerated as below.

EProfileUnknown = -1,
EProfileOffline = 5,
EProfileOffline = -2

Pre-v9 S60 devices.
    TInt profileIndex = EUnknownProfile;
CSettingInfo* settingsInfo = CSettingInfo::NewL(NULL);
CleanupStack::PushL(settingsInfo);
User::LeaveIfError(settingsInfo->Get(SettingInfo::EActiveProfile, profileIndex));
CleanupStack::PopAndDestroy(settingsInfo);
// profileIndex contains the profile information
v9.x S60 devices.
    CRepository* repository = CRepository::NewL(KCRUidProfileEngine);
CleanupStack::PushL(repository);
User::LeaveIfError(repository->Get(KProEngActiveProfile, profileIndex));
CleanupStack::PopAndDestroy(repository);
// profileInde contains the profile information

No comments:

stats counter