How to modify a packet data bearer IAP Name?
i use the fellow code it can modify the Wireless lan IAp name?
but it can't modify the packet data bearer iap name ?
why?
how to modify the packet data bearer iap name?
thanks?
Code:
LOCAL_D const TUint32 KUidNone = 0;
CCommsDatabase* db = CCommsDatabase::NewL();
CleanupStack::PushL(db);
CApSelect * iSelect = CApSelect::NewLC(*db, KEApIspTypeAll, EApBearerTypeAll, KEApSortUidAscending);
TInt err = db->BeginTransaction();
CApAccessPointItem* wlanNewItem = CApAccessPointItem::NewLC();
// Store it into the iDb.
TBool val = 1;
TUint32 newalanid;
CApDataHandler* handler = CApDataHandler::NewLC(*db);
TUint32 apid;
handler->AccessPointDataL(aConnectionID, *wlanNewItem);\\the aconnectionID is a input parameter
wlanNewItem->ReadTextL( EApWapAccessPointName, buf );
wlanNewItem->SetNamesL(_L("good"));
handler->UpdateAccessPointDataL(*wlanNewItem, val);
CCommsDbTableView* wLanServiceTable = db->OpenViewMatchingUintLC(
TPtrC( WLAN_SERVICE ), TPtrC( WLAN_SERVICE_ID ), newalanid );
TInt errorCode = wLanServiceTable->GotoFirstRecord();
if ( errorCode == KErrNone )
{
wLanServiceTable->UpdateRecord();
}
else
{
TUint32 dummyUid( KUidNone );
User::LeaveIfError( wLanServiceTable->InsertRecord( dummyUid ) );
// Save link to LAN service
wLanServiceTable->WriteUintL( TPtrC( WLAN_SERVICE_ID ), aConnectionID );
}
wLanServiceTable->PutRecordChanges();
err = db->CommitTransaction(); // // End a transaction. Call after `InsertRecord()` or `UpdateRecord()`.
CleanupStack::PopAndDestroy(5);