This page was last modified 05:25, 27 November 2007.
How to load a TSY module
From Forum Nokia Wiki
Category:Symbian C++]]
Usually, client applications first load a TSY module to use a particular modem which supports its functionality.In the following case the server is first connected, and then the Hayes TSY is loaded.Generally, the name of the TSY module should be obtained by querying the CommDb.
Loading a TSY module is shown as follows:
RTelServer server; Int ret = server.Connect(); _LIT(KTsyName,"HAYES.TSY") ret=server.LoadPhoneModule(KTsyName); ret=server.UnloadPhoneModule(KTsyName); yest(ret==KErrNone); server.Close();
The following code snippet shows a function which can be used to obtain the name of the currently selected TSY.
// Use CommDB to find which TSY to load
void CEtelEngine::GetDefaultTSYL(TDes& aTSYName;)
{
CCommsDatabase* db = CCommsDatabase::NewL(EDatabaseTypeUnspecified);
CleanupStack::PushL(db);
// Connect to the Modem table.
CCommsDbTableView* table = db->OpenTableLC(TPtrC(MODEM));
TInt tabErr = table->GotoFirstRecord();
User::LeaveIfError(tabErr);
TUint32 id;
table->ReadUintL(TPtrC(COMMDB_ID), id);
//this was the template record, so go to the next one
if (id == (TUint32)KDbNullColNo)
{
User::LeaveIfError(table->GotoNextRecord());
table->ReadUintL(TPtrC(COMMDB_ID),id);
}
table->ReadTextL(TPtrC(MODEM_TSY_NAME), aTSYName);
CleanupStack::PopAndDestroy(2); // table and db
This should have #include commdb.h and must be linked to commdb.lib.
--
| Related Discussions | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Does Python for s60has Tkinter | xhsoldier | Python | 4 | 2008-02-02 12:00 |
| Calender | finchy | Python | 2 | 2008-04-11 07:14 |
| Sched module problem... | tonino12345 | Python | 7 | 2007-10-16 14:42 |
| Re: How to debug ETel/TSY with emulator | AlexOfBorg | Developer Resources Feedback (Documentation, Examples, Training) | 1 | 2007-11-30 07:23 |
| 3650 Datasuite connecting secretly to Internet??? | pgsm.hu | Symbian Networking & Messaging | 0 | 2003-07-28 11:00 |
