Hi
Please take a look at the code below.
after loading the TSY (which goes well) ,
I call the GetCurrentNetwork method (after a basic initiation of params - I dont know how to initiate them).
I Checked and found that the iNetworkInfoPckg var is empty after calling the method.
* How can I actually retrieve the relevant data ? -
For a start I want to see the current network ...
* What should I change or add to the code?
Thanks a LOT , TE
RTelServer iServer;
CCommsDatabase* const db = CCommsDatabase::NewL(EDatabaseTypeUnspecified);
CleanupStack::PushL(db); // PUSH
TUint32 modemId = 0;
db->GetGlobalSettingL(TPtrC(MODEM_PHONE_SERVICES_SMS), modemId);
CCommsDbTableView* const view = db->OpenViewMatchingUintLC(TPtrC(MODEM), TPtrC(COMMDB_ID), modemId); // PUSH
TInt err = view->GotoFirstRecord();
User::LeaveIfError(err);
TFileName tsyName;
view->ReadTextL(TPtrC(MODEM_TSY_NAME), tsyName);
User::LeaveIfError(iServer.LoadPhoneModule(tsyName));
CleanupStack::PopAndDestroy(2, db); // view & db User::LeaveIfError(iServer.EnumeratePhones(enumphone));
if (enumphone < 1)
{
User::Leave(KErrNotFound);
}
HBufC8 * iNetworkInfoPckg = HBufC8::NewL(50);
RMobilePhone::TMobilePhoneLocationAreaV1 * iArea;
RMobilePhone phone;
RTelServer::TPhoneInfo info;
User::LeaveIfError(iServer.GetPhoneInfo(0, info));
User::LeaveIfError(phone.Open(iServer, info.iName));
phone.GetCurrentNetwork(iReqStatus, iNetworkInfoPckg->Des(), (*iArea));
User::WaitForRequest(iReqStatus);
phone.Close();