You Are Here:

Community: Wiki

This page was last modified on 8 December 2007, at 13:35.

How to know the tsy name programatically on a specific device

From Forum Nokia Wiki

In order to load a tsy on a device, we need to pass a device specific tsy name, i.e erigsm.tsy, to RTelServer::LoadPhoneModule(). Without hard coding the name of the tsy and keep the code as portable as possible,knowing the tsy name programatically on a specific device will be a lot helpful.

This can be programatically retrieved, since tsy name is stored in the commdb in the modem bearer table for phone and SMS services.

The following code can be useful to get the tsy name:

CCommsDatabase* const db = CCommsDatabase::NewL(EDatabaseTypeUnspecified);
CleanupStack::PushL(db); // PUSH
TUint32 modemId = 0;
 
//Find the modem bearer for phone and SMS service.
db->GetGlobalSettingL(TPtrC(MODEM_PHONE_SERVICES_SMS), modemId);
 
// PUSH
CCommsDbTableView* const view =
db->OpenViewMatchingUintLC(TPtrC(MODEM), TPtrC(COMMDB_ID), modemId);
TInt err = view->GotoFirstRecord();
User::LeaveIfError(err);
TFileName tsyName;
view->ReadTextL(TPtrC(MODEM_TSY_NAME), tsyName);
User::LeaveIfError(telServer.LoadPhoneModule(tsyName));
CleanupStack::PopAndDestroy(2, db); // view & db


--

Related Wiki Articles

No related wiki articles found

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia