# HG changeset patch # User hgs # Date 1284630624 -10800 # Node ID 8b0c979bbe8c3d30a631d62531cf0d82e8c773db # Parent 2709c04a4af5fa6a8390733f333d8414ecdd2663 201037 diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apeng/BWinsCw/ApEngine_EKA2U.def --- a/apengine/apeng/BWinsCw/ApEngine_EKA2U.def Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,181 +0,0 @@ -EXPORTS - ??0CApAccessPointItem@@IAE@XZ @ 1 NONAME ; CApAccessPointItem::CApAccessPointItem(void) - ??0CApDataHandler@@IAE@XZ @ 2 NONAME ; CApDataHandler::CApDataHandler(void) - ??0CApListItem@@IAE@XZ @ 3 NONAME ; CApListItem::CApListItem(void) - ??0CApListItemList@@QAE@XZ @ 4 NONAME ; CApListItemList::CApListItemList(void) - ??0CApNetworkItem@@AAE@XZ @ 5 NONAME ; CApNetworkItem::CApNetworkItem(void) - ??0CApNetworkItemList@@QAE@XZ @ 6 NONAME ; CApNetworkItemList::CApNetworkItemList(void) - ??0CApNetworks@@AAE@XZ @ 7 NONAME ; CApNetworks::CApNetworks(void) - ??0CApSelect@@IAE@XZ @ 8 NONAME ; CApSelect::CApSelect(void) - ??0CApUtils@@IAE@XZ @ 9 NONAME ; CApUtils::CApUtils(void) - ??0CVpnApEngine@@AAE@XZ @ 10 NONAME ; CVpnApEngine::CVpnApEngine(void) - ??0CVpnApItem@@AAE@XZ @ 11 NONAME ; CVpnApItem::CVpnApItem(void) - ??1CActiveApDb@@UAE@XZ @ 12 NONAME ; CActiveApDb::~CActiveApDb(void) - ??1CApAccessPointItem@@UAE@XZ @ 13 NONAME ; CApAccessPointItem::~CApAccessPointItem(void) - ??1CApDataHandler@@UAE@XZ @ 14 NONAME ; CApDataHandler::~CApDataHandler(void) - ??1CApListItem@@UAE@XZ @ 15 NONAME ; CApListItem::~CApListItem(void) - ??1CApListItemList@@UAE@XZ @ 16 NONAME ; CApListItemList::~CApListItemList(void) - ??1CApNetworkItem@@UAE@XZ @ 17 NONAME ; CApNetworkItem::~CApNetworkItem(void) - ??1CApNetworkItemList@@UAE@XZ @ 18 NONAME ; CApNetworkItemList::~CApNetworkItemList(void) - ??1CApNetworks@@UAE@XZ @ 19 NONAME ; CApNetworks::~CApNetworks(void) - ??1CApSelect@@UAE@XZ @ 20 NONAME ; CApSelect::~CApSelect(void) - ??1CApUtils@@UAE@XZ @ 21 NONAME ; CApUtils::~CApUtils(void) - ??1CVpnApEngine@@UAE@XZ @ 22 NONAME ; CVpnApEngine::~CVpnApEngine(void) - ??1CVpnApItem@@UAE@XZ @ 23 NONAME ; CVpnApItem::~CVpnApItem(void) - ??8CApAccessPointItem@@QBEHABV0@@Z @ 24 NONAME ; int CApAccessPointItem::operator==(class CApAccessPointItem const &) const - ??8CVpnApItem@@QBEHABV0@@Z @ 25 NONAME ; int CVpnApItem::operator==(class CVpnApItem const &) const - ??9CApAccessPointItem@@QBEHABV0@@Z @ 26 NONAME ; int CApAccessPointItem::operator!=(class CApAccessPointItem const &) const - ??9CVpnApItem@@QBEHABV0@@Z @ 27 NONAME ; int CVpnApItem::operator!=(class CVpnApItem const &) const - ?AccessPointDataL@CApDataHandler@@QAEXKAAVCApAccessPointItem@@@Z @ 28 NONAME ; void CApDataHandler::AccessPointDataL(unsigned long, class CApAccessPointItem &) - ?AddObserverL@CActiveApDb@@QAEXPAVMActiveApDbObserver@@@Z @ 29 NONAME ; void CActiveApDb::AddObserverL(class MActiveApDbObserver *) - ?AllListItemDataL@CApNetworks@@QAEHAAVCApNetworkItemList@@@Z @ 30 NONAME ; int CApNetworks::AllListItemDataL(class CApNetworkItemList &) - ?AllListItemDataL@CApSelect@@QAEHAAVCApListItemList@@@Z @ 31 NONAME ; int CApSelect::AllListItemDataL(class CApListItemList &) - ?BearerFilter@CApSelect@@QAEHXZ @ 32 NONAME ; int CApSelect::BearerFilter(void) - ?BearerType@CApListItem@@QAE?AW4TApBearerType@@XZ @ 33 NONAME ; enum TApBearerType CApListItem::BearerType(void) - ?BearerType@CApSelect@@QAE?AW4TApBearerType@@XZ @ 34 NONAME ; enum TApBearerType CApSelect::BearerType(void) - ?BearerTypeL@CApAccessPointItem@@QAE?AW4TApBearerType@@XZ @ 35 NONAME ; enum TApBearerType CApAccessPointItem::BearerTypeL(void) - ?BearerTypeL@CApUtils@@QAE?AW4TApBearerType@@K@Z @ 36 NONAME ; enum TApBearerType CApUtils::BearerTypeL(unsigned long) - ?ConnectionName@CApAccessPointItem@@QBEABVTDesC16@@XZ @ 37 NONAME ; class TDesC16 const & CApAccessPointItem::ConnectionName(void) const - ?ConstructL@CApAccessPointItem@@IAEXXZ @ 38 NONAME ; void CApAccessPointItem::ConstructL(void) - ?ConstructL@CApDataHandler@@IAEXAAVCCommsDatabase@@@Z @ 39 NONAME ; void CApDataHandler::ConstructL(class CCommsDatabase &) - ?ConstructL@CApListItem@@IAEXW4TCommsDbIspType@@KABVTDesC16@@W4TApBearerType@@1@Z @ 40 NONAME ; void CApListItem::ConstructL(enum TCommsDbIspType, unsigned long, class TDesC16 const &, enum TApBearerType, class TDesC16 const &) - ?ConstructL@CApListItem@@IAEXW4TCommsDbIspType@@KABVTDesC16@@W4TApBearerType@@@Z @ 41 NONAME ; void CApListItem::ConstructL(enum TCommsDbIspType, unsigned long, class TDesC16 const &, enum TApBearerType) - ?ConstructL@CApListItem@@IAEXXZ @ 42 NONAME ; void CApListItem::ConstructL(void) - ?ConstructL@CApNetworkItem@@AAEXKABVTDesC16@@@Z @ 43 NONAME ; void CApNetworkItem::ConstructL(unsigned long, class TDesC16 const &) - ?ConstructL@CApNetworkItem@@AAEXXZ @ 44 NONAME ; void CApNetworkItem::ConstructL(void) - ?ConstructL@CApNetworks@@AAEXAAVCCommsDatabase@@@Z @ 45 NONAME ; void CApNetworks::ConstructL(class CCommsDatabase &) - ?ConstructL@CApSelect@@IAEXAAVCCommsDatabase@@HHH@Z @ 46 NONAME ; void CApSelect::ConstructL(class CCommsDatabase &, int, int, int) - ?ConstructL@CApSelect@@IAEXAAVCCommsDatabase@@HHHH@Z @ 47 NONAME ; void CApSelect::ConstructL(class CCommsDatabase &, int, int, int, int) - ?ConstructL@CApSelect@@IAEXAAVCCommsDatabase@@HHHHW4TVpnFilterType@@@Z @ 48 NONAME ; void CApSelect::ConstructL(class CCommsDatabase &, int, int, int, int, enum TVpnFilterType) - ?ConstructL@CApUtils@@IAEXAAVCCommsDatabase@@@Z @ 49 NONAME ; void CApUtils::ConstructL(class CCommsDatabase &) - ?ConstructL@CVpnApEngine@@IAEXPAVCCommsDatabase@@@Z @ 50 NONAME ; void CVpnApEngine::ConstructL(class CCommsDatabase *) - ?ConstructL@CVpnApItem@@IAEXXZ @ 51 NONAME ; void CVpnApItem::ConstructL(void) - ?CopyFromL@CApAccessPointItem@@QAEXABV1@@Z @ 52 NONAME ; void CApAccessPointItem::CopyFromL(class CApAccessPointItem const &) - ?CopyFromL@CApListItem@@QAEXABV1@@Z @ 53 NONAME ; void CApListItem::CopyFromL(class CApListItem const &) - ?CopyFromL@CApNetworkItem@@QAEXABV1@@Z @ 54 NONAME ; void CApNetworkItem::CopyFromL(class CApNetworkItem const &) - ?CopyFromL@CVpnApItem@@QAEXABV1@@Z @ 55 NONAME ; void CVpnApItem::CopyFromL(class CVpnApItem const &) - ?Count@CApNetworks@@QBEKXZ @ 56 NONAME ; unsigned long CApNetworks::Count(void) const - ?Count@CApSelect@@QAEKXZ @ 57 NONAME ; unsigned long CApSelect::Count(void) - ?CreateCopyFromL@CApDataHandler@@QAEKK@Z @ 58 NONAME ; unsigned long CApDataHandler::CreateCopyFromL(unsigned long) - ?CreateFromDataL@CApDataHandler@@QAEKAAVCApAccessPointItem@@@Z @ 59 NONAME ; unsigned long CApDataHandler::CreateFromDataL(class CApAccessPointItem &) - ?CreateNetworkL@CApDataHandler@@QAEXAAVCApNetworkItem@@@Z @ 60 NONAME ; void CApDataHandler::CreateNetworkL(class CApNetworkItem &) - ?CreateVpnApL@CVpnApEngine@@QAEKAAVCVpnApItem@@@Z @ 61 NONAME ; unsigned long CVpnApEngine::CreateVpnApL(class CVpnApItem &) - ?CreateVpnApL@CVpnApEngine@@QAEKAAVTDesC16@@K0PAV2@K@Z @ 62 NONAME ; unsigned long CVpnApEngine::CreateVpnApL(class TDesC16 &, unsigned long, class TDesC16 &, class TDesC16 *, unsigned long) - ?Cvt@CVpnApEngine@@SAHXZ @ 63 NONAME ; int CVpnApEngine::Cvt(void) - ?Database@CActiveApDb@@QAEPAVCCommsDatabase@@XZ @ 64 NONAME ; class CCommsDatabase * CActiveApDb::Database(void) - ?DefaultL@CApDataHandler@@QBEKH@Z @ 65 NONAME ; unsigned long CApDataHandler::DefaultL(int) const - ?DefaultL@CApDataHandler@@QBEKHAAH@Z @ 66 NONAME ; unsigned long CApDataHandler::DefaultL(int, int &) const - ?DeleteVpnL@CVpnApEngine@@QAEXK@Z @ 67 NONAME ; void CVpnApEngine::DeleteVpnL(unsigned long) - ?DoHasMandatoryFieldsFilledL@CApUtils@@QAEHKPAVCCommsDbTableView@@W4TApBearerType@@@Z @ 68 NONAME ; int CApUtils::DoHasMandatoryFieldsFilledL(unsigned long, class CCommsDbTableView *, enum TApBearerType) - ?GetPreferredIfDbIapTypeL@CApDataHandler@@QAEXKW4TCommDbConnectionDirection@@AAK11@Z @ 69 NONAME ; void CApDataHandler::GetPreferredIfDbIapTypeL(unsigned long, enum TCommDbConnectionDirection, unsigned long &, unsigned long &, unsigned long &) - ?GetPreferredIfDbIspTypeL@CApDataHandler@@QAEABVTDesC16@@KW4TCommDbConnectionDirection@@AAK111@Z @ 70 NONAME ; class TDesC16 const & CApDataHandler::GetPreferredIfDbIspTypeL(unsigned long, enum TCommDbConnectionDirection, unsigned long &, unsigned long &, unsigned long &, unsigned long &) - ?HasMandatoryFieldsFilledL@CApUtils@@QAEHK@Z @ 71 NONAME ; int CApUtils::HasMandatoryFieldsFilledL(unsigned long) - ?HasSameIspAndBearerL@CApAccessPointItem@@QAEHAAV1@@Z @ 72 NONAME ; int CApAccessPointItem::HasSameIspAndBearerL(class CApAccessPointItem &) - ?IAPExistsL@CApUtils@@QAEHK@Z @ 73 NONAME ; int CApUtils::IAPExistsL(unsigned long) - ?ISPTypeL@CApUtils@@QAEXKAAW4TCommsDbIspType@@@Z @ 74 NONAME ; void CApUtils::ISPTypeL(unsigned long, enum TCommsDbIspType &) - ?IapIdFromWapIdL@CApUtils@@QAEKK@Z @ 75 NONAME ; unsigned long CApUtils::IapIdFromWapIdL(unsigned long) - ?IsAPInUseL@CApUtils@@QAEHK@Z @ 76 NONAME ; int CApUtils::IsAPInUseL(unsigned long) - ?IsApProtectedL@CApProtHandler@@SAHPAVCCommsDatabase@@K@Z @ 77 NONAME ; int CApProtHandler::IsApProtectedL(class CCommsDatabase *, unsigned long) - ?IsPreferencesProtectedL@CApProtHandler@@SAHPAVCCommsDatabase@@@Z @ 78 NONAME ; int CApProtHandler::IsPreferencesProtectedL(class CCommsDatabase *) - ?IsReadOnly@CApAccessPointItem@@QBEHXZ @ 79 NONAME ; int CApAccessPointItem::IsReadOnly(void) const - ?IsReadOnly@CApListItem@@QBEHXZ @ 80 NONAME ; int CApListItem::IsReadOnly(void) const - ?IsReadOnly@CApSelect@@QBEHXZ @ 81 NONAME ; int CApSelect::IsReadOnly(void) const - ?IsReadOnlyL@CApUtils@@QAEHK@Z @ 82 NONAME ; int CApUtils::IsReadOnlyL(unsigned long) - ?IsTableProtectedL@CApProtHandler@@SAHPAVCCommsDatabase@@@Z @ 83 NONAME ; int CApProtHandler::IsTableProtectedL(class CCommsDatabase *) - ?IsValidNameL@CApUtils@@QAEHABVTDesC16@@@Z @ 84 NONAME ; int CApUtils::IsValidNameL(class TDesC16 const &) - ?IsValidNameL@CApUtils@@QAEHABVTDesC16@@K@Z @ 85 NONAME ; int CApUtils::IsValidNameL(class TDesC16 const &, unsigned long) - ?IsVpnApL@CVpnApEngine@@QAEHK@Z @ 86 NONAME ; int CVpnApEngine::IsVpnApL(unsigned long) - ?IspTypeFilter@CApSelect@@QAEHXZ @ 87 NONAME ; int CApSelect::IspTypeFilter(void) - ?ItemForUid@CApListItemList@@QBEPAVCApListItem@@K@Z @ 88 NONAME ; class CApListItem * CApListItemList::ItemForUid(unsigned long) const - ?ItemForUid@CApNetworkItemList@@QBEPBVCApNetworkItem@@K@Z @ 89 NONAME ; class CApNetworkItem const * CApNetworkItemList::ItemForUid(unsigned long) const - ?MakeValidNameL@CApUtils@@QAEHAAVTDes16@@@Z @ 90 NONAME ; int CApUtils::MakeValidNameL(class TDes16 &) - ?MoveLast@CApSelect@@QAEHXZ @ 91 NONAME ; int CApSelect::MoveLast(void) - ?MoveNext@CApSelect@@QAEHXZ @ 92 NONAME ; int CApSelect::MoveNext(void) - ?MovePrev@CApSelect@@QAEHXZ @ 93 NONAME ; int CApSelect::MovePrev(void) - ?MoveToFirst@CApSelect@@QAEHXZ @ 94 NONAME ; int CApSelect::MoveToFirst(void) - ?Name@CApListItem@@QAEABVTDesC16@@XZ @ 95 NONAME ; class TDesC16 const & CApListItem::Name(void) - ?Name@CApNetworkItem@@QBEABVTDesC16@@XZ @ 96 NONAME ; class TDesC16 const & CApNetworkItem::Name(void) const - ?Name@CApSelect@@QAEABVTDesC16@@XZ @ 97 NONAME ; class TDesC16 const & CApSelect::Name(void) - ?Name@CVpnApItem@@QBEABVTDesC16@@XZ @ 98 NONAME ; class TDesC16 const & CVpnApItem::Name(void) const - ?NameL@CApNetworks@@QBEABVTDesC16@@K@Z @ 99 NONAME ; class TDesC16 const & CApNetworks::NameL(unsigned long) const - ?NameL@CApUtils@@QAEXKAAVTDes16@@@Z @ 100 NONAME ; void CApUtils::NameL(unsigned long, class TDes16 &) - ?NewL@CActiveApDb@@SAPAV1@W4TCommDbDatabaseType@@@Z @ 101 NONAME ; class CActiveApDb * CActiveApDb::NewL(enum TCommDbDatabaseType) - ?NewLC@CApAccessPointItem@@SAPAV1@XZ @ 102 NONAME ; class CApAccessPointItem * CApAccessPointItem::NewLC(void) - ?NewLC@CApDataHandler@@SAPAV1@AAVCCommsDatabase@@@Z @ 103 NONAME ; class CApDataHandler * CApDataHandler::NewLC(class CCommsDatabase &) - ?NewLC@CApListItem@@SAPAV1@PAV1@@Z @ 104 NONAME ; class CApListItem * CApListItem::NewLC(class CApListItem *) - ?NewLC@CApListItem@@SAPAV1@W4TCommsDbIspType@@KABVTDesC16@@W4TApBearerType@@1H@Z @ 105 NONAME ; class CApListItem * CApListItem::NewLC(enum TCommsDbIspType, unsigned long, class TDesC16 const &, enum TApBearerType, class TDesC16 const &, int) - ?NewLC@CApListItem@@SAPAV1@W4TCommsDbIspType@@KABVTDesC16@@W4TApBearerType@@@Z @ 106 NONAME ; class CApListItem * CApListItem::NewLC(enum TCommsDbIspType, unsigned long, class TDesC16 const &, enum TApBearerType) - ?NewLC@CApListItem@@SAPAV1@XZ @ 107 NONAME ; class CApListItem * CApListItem::NewLC(void) - ?NewLC@CApNetworkItem@@SAPAV1@PAV1@@Z @ 108 NONAME ; class CApNetworkItem * CApNetworkItem::NewLC(class CApNetworkItem *) - ?NewLC@CApNetworkItem@@SAPAV1@XZ @ 109 NONAME ; class CApNetworkItem * CApNetworkItem::NewLC(void) - ?NewLC@CApNetworks@@SAPAV1@AAVCCommsDatabase@@@Z @ 110 NONAME ; class CApNetworks * CApNetworks::NewLC(class CCommsDatabase &) - ?NewLC@CApSelect@@SAPAV1@AAVCCommsDatabase@@HHH@Z @ 111 NONAME ; class CApSelect * CApSelect::NewLC(class CCommsDatabase &, int, int, int) - ?NewLC@CApSelect@@SAPAV1@AAVCCommsDatabase@@HHHH@Z @ 112 NONAME ; class CApSelect * CApSelect::NewLC(class CCommsDatabase &, int, int, int, int) - ?NewLC@CApSelect@@SAPAV1@AAVCCommsDatabase@@HHHHW4TVpnFilterType@@@Z @ 113 NONAME ; class CApSelect * CApSelect::NewLC(class CCommsDatabase &, int, int, int, int, enum TVpnFilterType) - ?NewLC@CApUtils@@SAPAV1@AAVCCommsDatabase@@@Z @ 114 NONAME ; class CApUtils * CApUtils::NewLC(class CCommsDatabase &) - ?NewLC@CVpnApEngine@@SAPAV1@PAVCCommsDatabase@@@Z @ 115 NONAME ; class CVpnApEngine * CVpnApEngine::NewLC(class CCommsDatabase *) - ?NewLC@CVpnApItem@@SAPAV1@XZ @ 116 NONAME ; class CVpnApItem * CVpnApItem::NewLC(void) - ?ProtectItemL@CApProtHandler@@SAXPAVCCommsDatabase@@K@Z @ 117 NONAME ; void CApProtHandler::ProtectItemL(class CCommsDatabase *, unsigned long) - ?ProtectPreferencesL@CApProtHandler@@SAXPAVCCommsDatabase@@@Z @ 118 NONAME ; void CApProtHandler::ProtectPreferencesL(class CCommsDatabase *) - ?ProtectTableL@CApProtHandler@@SAXPAVCCommsDatabase@@@Z @ 119 NONAME ; void CApProtHandler::ProtectTableL(class CCommsDatabase *) - ?ReadBool@CApAccessPointItem@@QAEHW4TApMember@@AAH@Z @ 120 NONAME ; int CApAccessPointItem::ReadBool(enum TApMember, int &) - ?ReadBool@CVpnApItem@@QAEHW4TVpnApMember@@AAH@Z @ 121 NONAME ; int CVpnApItem::ReadBool(enum TVpnApMember, int &) - ?ReadConstLongTextL@CApAccessPointItem@@QAEPBVHBufC16@@W4TApMember@@@Z @ 122 NONAME ; class HBufC16 const * CApAccessPointItem::ReadConstLongTextL(enum TApMember) - ?ReadConstLongTextL@CVpnApItem@@QAEPBVHBufC16@@W4TVpnApMember@@@Z @ 123 NONAME ; class HBufC16 const * CVpnApItem::ReadConstLongTextL(enum TVpnApMember) - ?ReadLongTextL@CApAccessPointItem@@QAEPAVHBufC16@@W4TApMember@@@Z @ 124 NONAME ; class HBufC16 * CApAccessPointItem::ReadLongTextL(enum TApMember) - ?ReadNetworkL@CApDataHandler@@QAEXKAAVCApNetworkItem@@@Z @ 125 NONAME ; void CApDataHandler::ReadNetworkL(unsigned long, class CApNetworkItem &) - ?ReadNetworkPartL@CApDataHandler@@QAEXAAVCApAccessPointItem@@@Z @ 126 NONAME ; void CApDataHandler::ReadNetworkPartL(class CApAccessPointItem &) - ?ReadTextL@CApAccessPointItem@@QAEXW4TApMember@@AAVTDes16@@@Z @ 127 NONAME ; void CApAccessPointItem::ReadTextL(enum TApMember, class TDes16 &) - ?ReadTextL@CApAccessPointItem@@QAEXW4TApMember@@AAVTDes8@@@Z @ 128 NONAME ; void CApAccessPointItem::ReadTextL(enum TApMember, class TDes8 &) - ?ReadTextL@CVpnApItem@@QAEXW4TVpnApMember@@AAVTDes16@@@Z @ 129 NONAME ; void CVpnApItem::ReadTextL(enum TVpnApMember, class TDes16 &) - ?ReadTextLengthL@CApAccessPointItem@@QAEKW4TApMember@@@Z @ 130 NONAME ; unsigned long CApAccessPointItem::ReadTextLengthL(enum TApMember) - ?ReadUint@CApAccessPointItem@@QAEHW4TApMember@@AAK@Z @ 131 NONAME ; int CApAccessPointItem::ReadUint(enum TApMember, unsigned long &) - ?ReadUint@CVpnApItem@@QAEHW4TVpnApMember@@AAK@Z @ 132 NONAME ; int CVpnApItem::ReadUint(enum TVpnApMember, unsigned long &) - ?RemoveAPL@CApDataHandler@@QAEXK@Z @ 133 NONAME ; void CApDataHandler::RemoveAPL(unsigned long) - ?RemoveNetworkL@CApDataHandler@@QAEXK@Z @ 134 NONAME ; void CApDataHandler::RemoveNetworkL(unsigned long) - ?RemoveObserver@CActiveApDb@@QAEXPAVMActiveApDbObserver@@@Z @ 135 NONAME ; void CActiveApDb::RemoveObserver(class MActiveApDbObserver *) - ?RemoveProtectedAccessPointsL@CApProtHandler@@SAXPAVCCommsDatabase@@@Z @ 136 NONAME ; void CApProtHandler::RemoveProtectedAccessPointsL(class CCommsDatabase *) - ?SanityCheckOk@CApAccessPointItem@@QAEHXZ @ 137 NONAME ; int CApAccessPointItem::SanityCheckOk(void) - ?SetAsDefaultL@CApDataHandler@@QAEXKW4TCommsDbIspType@@@Z @ 138 NONAME ; void CApDataHandler::SetAsDefaultL(unsigned long, enum TCommsDbIspType) - ?SetBearerTypeL@CApAccessPointItem@@QAEXW4TApBearerType@@@Z @ 139 NONAME ; void CApAccessPointItem::SetBearerTypeL(enum TApBearerType) - ?SetFiltersL@CApSelect@@QAEXHHH@Z @ 140 NONAME ; void CApSelect::SetFiltersL(int, int, int) - ?SetISPTypeL@CApUtils@@QAEXKW4TCommsDbIspType@@@Z @ 141 NONAME ; void CApUtils::SetISPTypeL(unsigned long, enum TCommsDbIspType) - ?SetItemL@CApListItem@@QAEXW4TCommsDbIspType@@KABVTDesC16@@W4TApBearerType@@1@Z @ 142 NONAME ; void CApListItem::SetItemL(enum TCommsDbIspType, unsigned long, class TDesC16 const &, enum TApBearerType, class TDesC16 const &) - ?SetItemL@CApListItem@@QAEXW4TCommsDbIspType@@KABVTDesC16@@W4TApBearerType@@@Z @ 143 NONAME ; void CApListItem::SetItemL(enum TCommsDbIspType, unsigned long, class TDesC16 const &, enum TApBearerType) - ?SetNameL@CApNetworkItem@@QAEXABVTDesC16@@@Z @ 144 NONAME ; void CApNetworkItem::SetNameL(class TDesC16 const &) - ?SetNameL@CApUtils@@QAEXAAVTDes16@@K@Z @ 145 NONAME ; void CApUtils::SetNameL(class TDes16 &, unsigned long) - ?SetNamesL@CApAccessPointItem@@QAEXABVTDesC16@@@Z @ 146 NONAME ; void CApAccessPointItem::SetNamesL(class TDesC16 const &) - ?SetPreferredIfDbIapTypeL@CApDataHandler@@QAEXKW4TCommDbConnectionDirection@@KW4TCommDbDialogPref@@KH@Z @ 147 NONAME ; void CApDataHandler::SetPreferredIfDbIapTypeL(unsigned long, enum TCommDbConnectionDirection, unsigned long, enum TCommDbDialogPref, unsigned long, int) - ?SetPreferredIfDbIspTypeL@CApDataHandler@@QAEXKW4TCommDbConnectionDirection@@KW4TCommDbDialogPref@@KKABVTDesC16@@H@Z @ 148 NONAME ; void CApDataHandler::SetPreferredIfDbIspTypeL(unsigned long, enum TCommDbConnectionDirection, unsigned long, enum TCommDbDialogPref, unsigned long, unsigned long, class TDesC16 const &, int) - ?SetUid@CApNetworkItem@@QAEXK@Z @ 149 NONAME ; void CApNetworkItem::SetUid(unsigned long) - ?SortOrder@CApSelect@@QAEHXZ @ 150 NONAME ; int CApSelect::SortOrder(void) - ?StartPage@CApListItem@@QBEABVTDesC16@@XZ @ 151 NONAME ; class TDesC16 const & CApListItem::StartPage(void) const - ?Type@CApListItem@@QAE?AW4TCommsDbIspType@@XZ @ 152 NONAME ; enum TCommsDbIspType CApListItem::Type(void) - ?Type@CApSelect@@QAE?AW4TCommsDbIspType@@XZ @ 153 NONAME ; enum TCommsDbIspType CApSelect::Type(void) - ?Uid@CApListItem@@QAEKXZ @ 154 NONAME ; unsigned long CApListItem::Uid(void) - ?Uid@CApNetworkItem@@QBEKXZ @ 155 NONAME ; unsigned long CApNetworkItem::Uid(void) const - ?Uid@CApSelect@@QAEKXZ @ 156 NONAME ; unsigned long CApSelect::Uid(void) - ?UnprotectItemL@CApProtHandler@@SAXPAVCCommsDatabase@@K@Z @ 157 NONAME ; void CApProtHandler::UnprotectItemL(class CCommsDatabase *, unsigned long) - ?UnprotectPreferencesL@CApProtHandler@@SAXPAVCCommsDatabase@@@Z @ 158 NONAME ; void CApProtHandler::UnprotectPreferencesL(class CCommsDatabase *) - ?UnprotectTableL@CApProtHandler@@SAXPAVCCommsDatabase@@@Z @ 159 NONAME ; void CApProtHandler::UnprotectTableL(class CCommsDatabase *) - ?UpdateAccessPointDataL@CApDataHandler@@QAEXAAVCApAccessPointItem@@AAH@Z @ 160 NONAME ; void CApDataHandler::UpdateAccessPointDataL(class CApAccessPointItem &, int &) - ?UpdateVpnDataL@CVpnApEngine@@QAEXAAVCVpnApItem@@@Z @ 161 NONAME ; void CVpnApEngine::UpdateVpnDataL(class CVpnApItem &) - ?VpnDataL@CVpnApEngine@@QAEXKAAVCVpnApItem@@@Z @ 162 NONAME ; void CVpnApEngine::VpnDataL(unsigned long, class CVpnApItem &) - ?WapApExistsL@CApUtils@@QAEHK@Z @ 163 NONAME ; int CApUtils::WapApExistsL(unsigned long) - ?WapBearer@CApAccessPointItem@@QBEABVTDesC16@@XZ @ 164 NONAME ; class TDesC16 const & CApAccessPointItem::WapBearer(void) const - ?WapBearerTypeL@CApUtils@@QAEXKAAVTDes16@@@Z @ 165 NONAME ; void CApUtils::WapBearerTypeL(unsigned long, class TDes16 &) - ?WapIdFromIapIdL@CApUtils@@QAEKK@Z @ 166 NONAME ; unsigned long CApUtils::WapIdFromIapIdL(unsigned long) - ?WapUid@CApAccessPointItem@@QBEKXZ @ 167 NONAME ; unsigned long CApAccessPointItem::WapUid(void) const - ?WapUid@CVpnApItem@@QBEKXZ @ 168 NONAME ; unsigned long CVpnApItem::WapUid(void) const - ?WriteBool@CApAccessPointItem@@QAEHW4TApMember@@ABH@Z @ 169 NONAME ; int CApAccessPointItem::WriteBool(enum TApMember, int const &) - ?WriteBool@CVpnApItem@@QAEHW4TVpnApMember@@ABH@Z @ 170 NONAME ; int CVpnApItem::WriteBool(enum TVpnApMember, int const &) - ?WriteLongTextL@CApAccessPointItem@@QAEHW4TApMember@@ABVTDesC16@@@Z @ 171 NONAME ; int CApAccessPointItem::WriteLongTextL(enum TApMember, class TDesC16 const &) - ?WriteLongTextL@CVpnApItem@@QAEHW4TVpnApMember@@ABVTDesC16@@@Z @ 172 NONAME ; int CVpnApItem::WriteLongTextL(enum TVpnApMember, class TDesC16 const &) - ?WriteTextL@CApAccessPointItem@@QAEHW4TApMember@@ABVTDesC16@@@Z @ 173 NONAME ; int CApAccessPointItem::WriteTextL(enum TApMember, class TDesC16 const &) - ?WriteTextL@CApAccessPointItem@@QAEHW4TApMember@@ABVTDesC8@@@Z @ 174 NONAME ; int CApAccessPointItem::WriteTextL(enum TApMember, class TDesC8 const &) - ?WriteTextL@CVpnApItem@@QAEHW4TVpnApMember@@ABVTDesC16@@@Z @ 175 NONAME ; int CVpnApItem::WriteTextL(enum TVpnApMember, class TDesC16 const &) - ?WriteUint@CApAccessPointItem@@QAEHW4TApMember@@ABK@Z @ 176 NONAME ; int CApAccessPointItem::WriteUint(enum TApMember, unsigned long const &) - ?WriteUint@CVpnApItem@@QAEHW4TVpnApMember@@ABK@Z @ 177 NONAME ; int CVpnApItem::WriteUint(enum TVpnApMember, unsigned long const &) - ?ConstructL@CApSelect@@IAEXAAVCCommsDatabase@@HHHHW4TVpnFilterType@@H@Z @ 178 NONAME ; void CApSelect::ConstructL(class CCommsDatabase &, int, int, int, int, enum TVpnFilterType, int) - ?NewLC@CApSelect@@SAPAV1@AAVCCommsDatabase@@HHHHW4TVpnFilterType@@H@Z @ 179 NONAME ; class CApSelect * CApSelect::NewLC(class CCommsDatabase &, int, int, int, int, enum TVpnFilterType, int) - diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apeng/Data/ApEngine.rss --- a/apengine/apeng/Data/ApEngine.rss Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* This file contains all the resources for the ApEngine. -* -*/ - - -// RESOURCE IDENTIFIER -NAME APNG // 4 letter ID - -// INCLUDES -#include -#include - - -// RESOURCE DEFINITIONS - -RESOURCE RSS_SIGNATURE {} - -RESOURCE TBUF { buf="ApEngine"; } - -RESOURCE TBUF64 r_apng_default_ap_name { buf = qtn_set_ap_default_name; } - -RESOURCE TBUF64 r_apng_default_vpn_ap_name { buf = qtn_vpn_sett_vpn_iap_default_name; } - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apeng/EABI/ApEngine_EKA2U.def --- a/apengine/apeng/EABI/ApEngine_EKA2U.def Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,238 +0,0 @@ -EXPORTS - _ZN10CVpnApItem10ConstructLEv @ 1 NONAME - _ZN10CVpnApItem10WriteTextLE12TVpnApMemberRK7TDesC16 @ 2 NONAME - _ZN10CVpnApItem14WriteLongTextLE12TVpnApMemberRK7TDesC16 @ 3 NONAME - _ZN10CVpnApItem18ReadConstLongTextLE12TVpnApMember @ 4 NONAME - _ZN10CVpnApItem5NewLCEv @ 5 NONAME - _ZN10CVpnApItem8ReadBoolE12TVpnApMemberRi @ 6 NONAME - _ZN10CVpnApItem8ReadUintE12TVpnApMemberRm @ 7 NONAME - _ZN10CVpnApItem9CopyFromLERKS_ @ 8 NONAME - _ZN10CVpnApItem9ReadTextLE12TVpnApMemberR6TDes16 @ 9 NONAME - _ZN10CVpnApItem9WriteBoolE12TVpnApMemberRKi @ 10 NONAME - _ZN10CVpnApItem9WriteUintE12TVpnApMemberRKm @ 11 NONAME - _ZN10CVpnApItemC1Ev @ 12 NONAME - _ZN10CVpnApItemC2Ev @ 13 NONAME - _ZN10CVpnApItemD0Ev @ 14 NONAME - _ZN10CVpnApItemD1Ev @ 15 NONAME - _ZN10CVpnApItemD2Ev @ 16 NONAME - _ZN11CActiveApDb12AddObserverLEP19MActiveApDbObserver @ 17 NONAME - _ZN11CActiveApDb14RemoveObserverEP19MActiveApDbObserver @ 18 NONAME - _ZN11CActiveApDb4NewLE19TCommDbDatabaseType @ 19 NONAME - _ZN11CActiveApDb8DatabaseEv @ 20 NONAME - _ZN11CActiveApDbD0Ev @ 21 NONAME - _ZN11CActiveApDbD1Ev @ 22 NONAME - _ZN11CActiveApDbD2Ev @ 23 NONAME - _ZN11CApListItem10BearerTypeEv @ 24 NONAME - _ZN11CApListItem10ConstructLE15TCommsDbIspTypemRK7TDesC1613TApBearerType @ 25 NONAME - _ZN11CApListItem10ConstructLE15TCommsDbIspTypemRK7TDesC1613TApBearerTypeS3_ @ 26 NONAME - _ZN11CApListItem10ConstructLEv @ 27 NONAME - _ZN11CApListItem3UidEv @ 28 NONAME - _ZN11CApListItem4NameEv @ 29 NONAME - _ZN11CApListItem4TypeEv @ 30 NONAME - _ZN11CApListItem5NewLCE15TCommsDbIspTypemRK7TDesC1613TApBearerType @ 31 NONAME - _ZN11CApListItem5NewLCE15TCommsDbIspTypemRK7TDesC1613TApBearerTypeS3_i @ 32 NONAME - _ZN11CApListItem5NewLCEPS_ @ 33 NONAME - _ZN11CApListItem5NewLCEv @ 34 NONAME - _ZN11CApListItem8SetItemLE15TCommsDbIspTypemRK7TDesC1613TApBearerType @ 35 NONAME - _ZN11CApListItem8SetItemLE15TCommsDbIspTypemRK7TDesC1613TApBearerTypeS3_ @ 36 NONAME - _ZN11CApListItem9CopyFromLERKS_ @ 37 NONAME - _ZN11CApListItemC1Ev @ 38 NONAME - _ZN11CApListItemC2Ev @ 39 NONAME - _ZN11CApListItemD0Ev @ 40 NONAME - _ZN11CApListItemD1Ev @ 41 NONAME - _ZN11CApListItemD2Ev @ 42 NONAME - _ZN11CApNetworks10ConstructLER14CCommsDatabase @ 43 NONAME - _ZN11CApNetworks16AllListItemDataLER18CApNetworkItemList @ 44 NONAME - _ZN11CApNetworks5NewLCER14CCommsDatabase @ 45 NONAME - _ZN11CApNetworksC1Ev @ 46 NONAME - _ZN11CApNetworksC2Ev @ 47 NONAME - _ZN11CApNetworksD0Ev @ 48 NONAME - _ZN11CApNetworksD1Ev @ 49 NONAME - _ZN11CApNetworksD2Ev @ 50 NONAME - _ZN12CVpnApEngine10ConstructLEP14CCommsDatabase @ 51 NONAME - _ZN12CVpnApEngine10DeleteVpnLEm @ 52 NONAME - _ZN12CVpnApEngine12CreateVpnApLER10CVpnApItem @ 53 NONAME - _ZN12CVpnApEngine12CreateVpnApLER7TDesC16mS1_PS0_m @ 54 NONAME - _ZN12CVpnApEngine14UpdateVpnDataLER10CVpnApItem @ 55 NONAME - _ZN12CVpnApEngine3CvtEv @ 56 NONAME - _ZN12CVpnApEngine5NewLCEP14CCommsDatabase @ 57 NONAME - _ZN12CVpnApEngine8IsVpnApLEm @ 58 NONAME - _ZN12CVpnApEngine8VpnDataLEmR10CVpnApItem @ 59 NONAME - _ZN12CVpnApEngineC1Ev @ 60 NONAME - _ZN12CVpnApEngineC2Ev @ 61 NONAME - _ZN12CVpnApEngineD0Ev @ 62 NONAME - _ZN12CVpnApEngineD1Ev @ 63 NONAME - _ZN12CVpnApEngineD2Ev @ 64 NONAME - _ZN14CApDataHandler10ConstructLER14CCommsDatabase @ 65 NONAME - _ZN14CApDataHandler12ReadNetworkLEmR14CApNetworkItem @ 66 NONAME - _ZN14CApDataHandler13SetAsDefaultLEm15TCommsDbIspType @ 67 NONAME - _ZN14CApDataHandler14CreateNetworkLER14CApNetworkItem @ 68 NONAME - _ZN14CApDataHandler14RemoveNetworkLEm @ 69 NONAME - _ZN14CApDataHandler15CreateCopyFromLEm @ 70 NONAME - _ZN14CApDataHandler15CreateFromDataLER18CApAccessPointItem @ 71 NONAME - _ZN14CApDataHandler16AccessPointDataLEmR18CApAccessPointItem @ 72 NONAME - _ZN14CApDataHandler16ReadNetworkPartLER18CApAccessPointItem @ 73 NONAME - _ZN14CApDataHandler22UpdateAccessPointDataLER18CApAccessPointItemRi @ 74 NONAME - _ZN14CApDataHandler24GetPreferredIfDbIapTypeLEm26TCommDbConnectionDirectionRmS1_S1_ @ 75 NONAME - _ZN14CApDataHandler24GetPreferredIfDbIspTypeLEm26TCommDbConnectionDirectionRmS1_S1_S1_ @ 76 NONAME - _ZN14CApDataHandler24SetPreferredIfDbIapTypeLEm26TCommDbConnectionDirectionm17TCommDbDialogPrefmi @ 77 NONAME - _ZN14CApDataHandler24SetPreferredIfDbIspTypeLEm26TCommDbConnectionDirectionm17TCommDbDialogPrefmmRK7TDesC16i @ 78 NONAME - _ZN14CApDataHandler5NewLCER14CCommsDatabase @ 79 NONAME - _ZN14CApDataHandler9RemoveAPLEm @ 80 NONAME - _ZN14CApDataHandlerC1Ev @ 81 NONAME - _ZN14CApDataHandlerC2Ev @ 82 NONAME - _ZN14CApDataHandlerD0Ev @ 83 NONAME - _ZN14CApDataHandlerD1Ev @ 84 NONAME - _ZN14CApDataHandlerD2Ev @ 85 NONAME - _ZN14CApNetworkItem10ConstructLEmRK7TDesC16 @ 86 NONAME - _ZN14CApNetworkItem10ConstructLEv @ 87 NONAME - _ZN14CApNetworkItem5NewLCEPS_ @ 88 NONAME - _ZN14CApNetworkItem5NewLCEv @ 89 NONAME - _ZN14CApNetworkItem6SetUidEm @ 90 NONAME - _ZN14CApNetworkItem8SetNameLERK7TDesC16 @ 91 NONAME - _ZN14CApNetworkItem9CopyFromLERKS_ @ 92 NONAME - _ZN14CApNetworkItemC1Ev @ 93 NONAME - _ZN14CApNetworkItemC2Ev @ 94 NONAME - _ZN14CApNetworkItemD0Ev @ 95 NONAME - _ZN14CApNetworkItemD1Ev @ 96 NONAME - _ZN14CApNetworkItemD2Ev @ 97 NONAME - _ZN14CApProtHandler12ProtectItemLEP14CCommsDatabasem @ 98 NONAME - _ZN14CApProtHandler13ProtectTableLEP14CCommsDatabase @ 99 NONAME - _ZN14CApProtHandler14IsApProtectedLEP14CCommsDatabasem @ 100 NONAME - _ZN14CApProtHandler14UnprotectItemLEP14CCommsDatabasem @ 101 NONAME - _ZN14CApProtHandler15UnprotectTableLEP14CCommsDatabase @ 102 NONAME - _ZN14CApProtHandler17IsTableProtectedLEP14CCommsDatabase @ 103 NONAME - _ZN14CApProtHandler19ProtectPreferencesLEP14CCommsDatabase @ 104 NONAME - _ZN14CApProtHandler21UnprotectPreferencesLEP14CCommsDatabase @ 105 NONAME - _ZN14CApProtHandler23IsPreferencesProtectedLEP14CCommsDatabase @ 106 NONAME - _ZN14CApProtHandler28RemoveProtectedAccessPointsLEP14CCommsDatabase @ 107 NONAME - _ZN15CApListItemListC1Ev @ 108 NONAME - _ZN15CApListItemListC2Ev @ 109 NONAME - _ZN15CApListItemListD0Ev @ 110 NONAME - _ZN15CApListItemListD1Ev @ 111 NONAME - _ZN15CApListItemListD2Ev @ 112 NONAME - _ZN18CApAccessPointItem10ConstructLEv @ 113 NONAME - _ZN18CApAccessPointItem10WriteTextLE9TApMemberRK6TDesC8 @ 114 NONAME - _ZN18CApAccessPointItem10WriteTextLE9TApMemberRK7TDesC16 @ 115 NONAME - _ZN18CApAccessPointItem11BearerTypeLEv @ 116 NONAME - _ZN18CApAccessPointItem13ReadLongTextLE9TApMember @ 117 NONAME - _ZN18CApAccessPointItem13SanityCheckOkEv @ 118 NONAME - _ZN18CApAccessPointItem14SetBearerTypeLE13TApBearerType @ 119 NONAME - _ZN18CApAccessPointItem14WriteLongTextLE9TApMemberRK7TDesC16 @ 120 NONAME - _ZN18CApAccessPointItem15ReadTextLengthLE9TApMember @ 121 NONAME - _ZN18CApAccessPointItem18ReadConstLongTextLE9TApMember @ 122 NONAME - _ZN18CApAccessPointItem20HasSameIspAndBearerLERS_ @ 123 NONAME - _ZN18CApAccessPointItem5NewLCEv @ 124 NONAME - _ZN18CApAccessPointItem8ReadBoolE9TApMemberRi @ 125 NONAME - _ZN18CApAccessPointItem8ReadUintE9TApMemberRm @ 126 NONAME - _ZN18CApAccessPointItem9CopyFromLERKS_ @ 127 NONAME - _ZN18CApAccessPointItem9ReadTextLE9TApMemberR5TDes8 @ 128 NONAME - _ZN18CApAccessPointItem9ReadTextLE9TApMemberR6TDes16 @ 129 NONAME - _ZN18CApAccessPointItem9SetNamesLERK7TDesC16 @ 130 NONAME - _ZN18CApAccessPointItem9WriteBoolE9TApMemberRKi @ 131 NONAME - _ZN18CApAccessPointItem9WriteUintE9TApMemberRKm @ 132 NONAME - _ZN18CApAccessPointItemC1Ev @ 133 NONAME - _ZN18CApAccessPointItemC2Ev @ 134 NONAME - _ZN18CApAccessPointItemD0Ev @ 135 NONAME - _ZN18CApAccessPointItemD1Ev @ 136 NONAME - _ZN18CApAccessPointItemD2Ev @ 137 NONAME - _ZN18CApNetworkItemListC1Ev @ 138 NONAME - _ZN18CApNetworkItemListC2Ev @ 139 NONAME - _ZN18CApNetworkItemListD0Ev @ 140 NONAME - _ZN18CApNetworkItemListD1Ev @ 141 NONAME - _ZN18CApNetworkItemListD2Ev @ 142 NONAME - _ZN8CApUtils10ConstructLER14CCommsDatabase @ 143 NONAME - _ZN8CApUtils10IAPExistsLEm @ 144 NONAME - _ZN8CApUtils10IsAPInUseLEm @ 145 NONAME - _ZN8CApUtils11BearerTypeLEm @ 146 NONAME - _ZN8CApUtils11IsReadOnlyLEm @ 147 NONAME - _ZN8CApUtils11SetISPTypeLEm15TCommsDbIspType @ 148 NONAME - _ZN8CApUtils12IsValidNameLERK7TDesC16 @ 149 NONAME - _ZN8CApUtils12IsValidNameLERK7TDesC16m @ 150 NONAME - _ZN8CApUtils12WapApExistsLEm @ 151 NONAME - _ZN8CApUtils14MakeValidNameLER6TDes16 @ 152 NONAME - _ZN8CApUtils14WapBearerTypeLEmR6TDes16 @ 153 NONAME - _ZN8CApUtils15IapIdFromWapIdLEm @ 154 NONAME - _ZN8CApUtils15WapIdFromIapIdLEm @ 155 NONAME - _ZN8CApUtils25HasMandatoryFieldsFilledLEm @ 156 NONAME - _ZN8CApUtils27DoHasMandatoryFieldsFilledLEmP17CCommsDbTableView13TApBearerType @ 157 NONAME - _ZN8CApUtils5NameLEmR6TDes16 @ 158 NONAME - _ZN8CApUtils5NewLCER14CCommsDatabase @ 159 NONAME - _ZN8CApUtils8ISPTypeLEmR15TCommsDbIspType @ 160 NONAME - _ZN8CApUtils8SetNameLER6TDes16m @ 161 NONAME - _ZN8CApUtilsC1Ev @ 162 NONAME - _ZN8CApUtilsC2Ev @ 163 NONAME - _ZN8CApUtilsD0Ev @ 164 NONAME - _ZN8CApUtilsD1Ev @ 165 NONAME - _ZN8CApUtilsD2Ev @ 166 NONAME - _ZN9CApSelect10BearerTypeEv @ 167 NONAME - _ZN9CApSelect10ConstructLER14CCommsDatabaseiii @ 168 NONAME - _ZN9CApSelect10ConstructLER14CCommsDatabaseiiii @ 169 NONAME - _ZN9CApSelect10ConstructLER14CCommsDatabaseiiii14TVpnFilterType @ 170 NONAME - _ZN9CApSelect11MoveToFirstEv @ 171 NONAME - _ZN9CApSelect11SetFiltersLEiii @ 172 NONAME - _ZN9CApSelect12BearerFilterEv @ 173 NONAME - _ZN9CApSelect13IspTypeFilterEv @ 174 NONAME - _ZN9CApSelect16AllListItemDataLER15CApListItemList @ 175 NONAME - _ZN9CApSelect3UidEv @ 176 NONAME - _ZN9CApSelect4NameEv @ 177 NONAME - _ZN9CApSelect4TypeEv @ 178 NONAME - _ZN9CApSelect5CountEv @ 179 NONAME - _ZN9CApSelect5NewLCER14CCommsDatabaseiii @ 180 NONAME - _ZN9CApSelect5NewLCER14CCommsDatabaseiiii @ 181 NONAME - _ZN9CApSelect5NewLCER14CCommsDatabaseiiii14TVpnFilterType @ 182 NONAME - _ZN9CApSelect8MoveLastEv @ 183 NONAME - _ZN9CApSelect8MoveNextEv @ 184 NONAME - _ZN9CApSelect8MovePrevEv @ 185 NONAME - _ZN9CApSelect9SortOrderEv @ 186 NONAME - _ZN9CApSelectC1Ev @ 187 NONAME - _ZN9CApSelectC2Ev @ 188 NONAME - _ZN9CApSelectD0Ev @ 189 NONAME - _ZN9CApSelectD1Ev @ 190 NONAME - _ZN9CApSelectD2Ev @ 191 NONAME - _ZNK10CVpnApItem4NameEv @ 192 NONAME - _ZNK10CVpnApItem6WapUidEv @ 193 NONAME - _ZNK10CVpnApItemeqERKS_ @ 194 NONAME - _ZNK10CVpnApItemneERKS_ @ 195 NONAME - _ZNK11CApListItem10IsReadOnlyEv @ 196 NONAME - _ZNK11CApListItem9StartPageEv @ 197 NONAME - _ZNK11CApNetworks5CountEv @ 198 NONAME - _ZNK11CApNetworks5NameLEm @ 199 NONAME - _ZNK14CApDataHandler8DefaultLEi @ 200 NONAME - _ZNK14CApDataHandler8DefaultLEiRi @ 201 NONAME - _ZNK14CApNetworkItem3UidEv @ 202 NONAME - _ZNK14CApNetworkItem4NameEv @ 203 NONAME - _ZNK15CApListItemList10ItemForUidEm @ 204 NONAME - _ZNK18CApAccessPointItem10IsReadOnlyEv @ 205 NONAME - _ZNK18CApAccessPointItem14ConnectionNameEv @ 206 NONAME - _ZNK18CApAccessPointItem6WapUidEv @ 207 NONAME - _ZNK18CApAccessPointItem9WapBearerEv @ 208 NONAME - _ZNK18CApAccessPointItemeqERKS_ @ 209 NONAME - _ZNK18CApAccessPointItemneERKS_ @ 210 NONAME - _ZNK18CApNetworkItemList10ItemForUidEm @ 211 NONAME - _ZNK9CApSelect10IsReadOnlyEv @ 212 NONAME - _ZTI11CApListItem @ 213 NONAME ; ## - _ZTI12CApItemExtra @ 214 NONAME ; ## - _ZTI14CApDataHandler @ 215 NONAME ; ## - _ZTI15CApItemCdmaData @ 216 NONAME ; ## - _ZTI15CApItemWlanData @ 217 NONAME ; ## - _ZTI15CApListItemList @ 218 NONAME ; ## - _ZTI18CApAccessPointItem @ 219 NONAME ; ## - _ZTI18CApNetworkItemList @ 220 NONAME ; ## - _ZTI19CActiveApDbNotifier @ 221 NONAME ; ## - _ZTI8CApUtils @ 222 NONAME ; ## - _ZTI9CApSelect @ 223 NONAME ; ## - _ZTV11CApListItem @ 224 NONAME ; ## - _ZTV12CApItemExtra @ 225 NONAME ; ## - _ZTV14CApDataHandler @ 226 NONAME ; ## - _ZTV15CApItemCdmaData @ 227 NONAME ; ## - _ZTV15CApItemWlanData @ 228 NONAME ; ## - _ZTV15CApListItemList @ 229 NONAME ; ## - _ZTV18CApAccessPointItem @ 230 NONAME ; ## - _ZTV18CApNetworkItemList @ 231 NONAME ; ## - _ZTV19CActiveApDbNotifier @ 232 NONAME ; ## - _ZTV8CApUtils @ 233 NONAME ; ## - _ZTV9CApSelect @ 234 NONAME ; ## - _ZN9CApSelect10ConstructLER14CCommsDatabaseiiii14TVpnFilterTypei @ 235 NONAME - _ZN9CApSelect5NewLCER14CCommsDatabaseiiii14TVpnFilterTypei @ 236 NONAME - diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apeng/Rom/ApEngine.iby --- a/apengine/apeng/Rom/ApEngine.iby Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#ifndef __APENGINE_IBY__ -#define __APENGINE_IBY__ - -file=ABI_DIR\BUILD_DIR\ApEngine.dll SHARED_LIB_DIR\ApEngine.dll - -#endif diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apeng/Rom/ApEngineResources.iby --- a/apengine/apeng/Rom/ApEngineResources.iby Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#ifndef __APENGINERESOURCES_IBY__ -#define __APENGINERESOURCES_IBY__ - -DATA=DATAZ_\RESOURCE_FILES_DIR\ApEngine.rsc RESOURCE_FILES_DIR\ApEngine.rsc - -#endif diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apeng/cenrep/keys_accesspoints.xls Binary file apengine/apeng/cenrep/keys_accesspoints.xls has changed diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apeng/conf/accesspoints.confml Binary file apengine/apeng/conf/accesspoints.confml has changed diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apeng/conf/accesspoints_10008D3A.crml Binary file apengine/apeng/conf/accesspoints_10008D3A.crml has changed diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apeng/conf/accesspoints_10008D3B.crml Binary file apengine/apeng/conf/accesspoints_10008D3B.crml has changed diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apeng/group/APEngine.MMP --- a/apengine/apeng/group/APEngine.MMP Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,122 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project description file for the Access Point Engine -* -*/ - - -#include -#include - -TARGET APEngine.dll -TARGETTYPE dll -UID 0x1000008d 0x10008D3A - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - - -SOURCEPATH ../src -SOURCE ApEngineLogger.cpp -SOURCE ApListItem.cpp -SOURCE APSelect.cpp -SOURCE APDataHandler.cpp -SOURCE APUtils.cpp -SOURCE APAccessPointItem.cpp -SOURCE ApEngineCommons.cpp -SOURCE ActiveApDb.cpp -SOURCE ActiveApDbNotifier.cpp -SOURCE aplistitemlist.cpp -SOURCE ApProtHandler.cpp -SOURCE ApListItemKey.cpp -SOURCE ApNetworkItem.cpp -SOURCE APNetworks.cpp -SOURCE apnetworkitemlist.cpp -SOURCE VpnApItem.cpp -SOURCE VpnApEngine.cpp - - - -START RESOURCE ../Data/ApEngine.rss -HEADER -TARGETPATH RESOURCE_FILES_DIR -LANGUAGE_IDS -END // RESOURCE - -// Component specific internal headers -USERINCLUDE ../inc - -// ADO specific internal headers -SYSTEMINCLUDE ../../../inc - -//Macro to /epoc32 headers -MW_LAYER_SYSTEMINCLUDE - -LIBRARY commdb.lib -LIBRARY euser.lib -LIBRARY efsrv.lib -LIBRARY bafl.lib -LIBRARY insock.lib -LIBRARY esock.lib -LIBRARY FeatMgr.lib -LIBRARY Vpnapi.lib -LIBRARY centralrepository.lib - -#if defined(ARMCC) - DEFFILE ../EABI/ApEngine_EKA2.def -#elif defined( WINSCW ) - DEFFILE ../BWinsCw/ApEngine_EKA2.def -#elif defined( WINS ) - DEFFILE ../BWins/ApEngine_EKA2.def -#else - DEFFILE ../BMarm/ApEngine_EKA2.def -#endif - -// Define this macro if you wish to enable logging -//#define __TEST_APENGINE_LOG_ENABLED - - -// Define this macro if you wish to enable IPv6 support for testing -// It will override FeatureManager's NOT SUPPORTED.... -//MACRO __TEST_IPV6_SUPPORT - -#ifdef __TEST_APENGINE_LOG_ENABLED - MACRO __TEST_APENGINE_LOG__ - LIBRARY flogger.lib -#endif // __TEST_APENGINE_LOG_ENABLED - -// Define this to test CDMA support. -//MACRO __TEST_CDMA_SUPPORT - - -// Define this to test CSD support. -//MACRO __TEST_CSD_SUPPORT - - -// Define this to test HSCSD support. -//MACRO __TEST_HSCSD_SUPPORT - -// Define this to test CDMA write-protect support. -//MACRO __TEST_CDMA_WRITE_PROTECT - -// Define this to test WLAN support. -// MACRO __TEST_WLAN_SUPPORT - - -// Define this to test LAN support. -#ifdef WINS - MACRO __TEST_LAN_BEARER -#endif - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apeng/group/ApEngineCvt.mmp --- a/apengine/apeng/group/ApEngineCvt.mmp Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project specification for Accesspoint Engine filter -* Component Validation Test. -* -* -*/ - - -#include - -TARGET ApEngineCvt.exe -TARGETTYPE exe - -SOURCEPATH ../tsrc - -SOURCE ApEngineCvt.cpp - -// Component specific internal headers -USERINCLUDE ../inc - -// ADO-SUBSYSTEM specific internal headers -SYSTEMINCLUDE ../../inc - -// ADO specific internal headers -SYSTEMINCLUDE ../../../inc - -//Macro to /epoc32 headers -MW_LAYER_SYSTEMINCLUDE - -LIBRARY ApEngine.lib -LIBRARY commdb.lib -LIBRARY euser.lib diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apeng/group/bld.inf --- a/apengine/apeng/group/bld.inf Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Build information for the Access Point Engine -* -*/ - - -#include - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS -// export iby files -../Rom/ApEngine.iby CORE_MW_LAYER_IBY_EXPORT_PATH(ApEngine.iby) -../Rom/ApEngineResources.iby LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(ApEngineResources.iby) - -// export localised loc file -../loc/apengine.loc MW_LAYER_LOC_EXPORT_PATH(apengine.loc) - -../conf/accesspoints.confml APP_LAYER_CONFML(accesspoints.confml) -../conf/accesspoints_10008D3A.crml APP_LAYER_CRML(accesspoints_10008D3A.crml) -../conf/accesspoints_10008D3B.crml APP_LAYER_CRML(accesspoints_10008D3B.crml) - -PRJ_MMPFILES -./APEngine.MMP - - - -PRJ_TESTMMPFILES - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apeng/inc/APEngineVariant.hrh --- a/apengine/apeng/inc/APEngineVariant.hrh Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* This file contains variation info for ApEngine. -* The file can be included in C++ or resource file. -* -*/ - - -#ifndef APENGINEVARIANT_HRH -#define APENGINEVARIANT_HRH - -// feature to disable editing of normal access points and allow it only for VPN -#define KApUiEditOnlyVPNs 0x01 - -#endif // APENGINEVARIANT_HRH - - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apeng/inc/APItemCdmaData.h --- a/apengine/apeng/inc/APItemCdmaData.h Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,115 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of class CApItemCdmaData -* -*/ - - -#ifndef CAPITEMCDMADATA_H -#define CAPITEMCDMADATA_H - - -// INCLUDES -#include - - - -// CLASS DECLARATION - -/** -* CDMA2000-specific data extension for CApAccessPointItem. -* Access Point data which is common to all AP-s (ISP...), are not stored -* here. -*/ -class CApItemCdmaData :public CBase - { - public: - /** - * Two-phased constructor. Leaves on failure - * @return The constructed CApItemCdmaData. - */ - static CApItemCdmaData* NewL(); - - /** - * Destructor. - */ - virtual ~CApItemCdmaData(); - - /** - * C++ default constructor. - */ - CApItemCdmaData(); - - /** - * Second-phase constructor. - */ - void ConstructL(); - - public: - HBufC* iIwfName; ///< IWF name. - TUint32 iServiceOption; ///< Service option. - TUint32 iPdpType; ///< PDP type. - HBufC* iPdpAddress; ///< PDP address. - TUint32 iReqFwdPriority; ///< Requested forward priority. - TUint32 iReqRevPriority; ///< Requested reverse priority. - TUint32 iReqFwdBitrate; ///< Requested forward bitrate. - TUint32 iReqRevBitrate; ///< Requested reverse bitrate. - TUint32 iReqFwdLoss; ///< Req. forward frame loss rate. - TUint32 iReqRevLoss; ///< Req. reverse frame loss rate. - TUint32 iReqFwdMaxDelay; ///< Requested forward delay. - TUint32 iReqRevMaxDelay; ///< Requested reverse delay. - TUint32 iMinFwdBitrate; ///< Min. acceptable fwd bitrate. - TUint32 iMinRevBitrate; ///< Min. acceptable rev bitrate. - TUint32 iAccptFwdLoss; ///< Max. acc. fwd frame loss rate. - TUint32 iAccptRevLoss; ///< Max. acc. rev frame loss rate. - TUint32 iAccptFwdMaxDelay; ///< Max. acceptable forward delay. - TUint32 iAccptRevMaxDelay; ///< Max. acceptable reverse delay. - TUint32 iQosWarningTimeout; ///< Notify user if the requested QOS - ///< cannot be satisfied for this time in - ///< microseconds - TUint32 iRlpMode; ///< Transparent or non-transparent - ///< radio link protocol. - // CDMA2000 deprecated Mobile IP fields - TBool iMip; ///< Attempt to use mobile IP. - HBufC* iHomeAgentAddress; ///< Home Agent address. - TUint32 iMipTimeout; ///< A normal reconnect (informing the - ///< user) takes place if both the PPP link - ///< drops and a change in SID or NID is - ///< received within this time in - ///< milliseconds. - // CDMA2000 specific CDMA parameters provisioned through OTA and - // defined in TIA-683B section 3.5.8 - // These fields replace the old Mobile IP fields (above). - TUint32 iNaiType; ///< Type of NAI. - TUint32 iSimpleIpAuthAlgorithm; ///< SimpleIP auth.algorithm. - TUint32 iSimpleIpPapSsHandle; ///< SimpleIP PAP shared secret handle - TUint32 iSimpleIpChapSsHandle; ///< SimpleIP CHAP shared secret handle - TUint32 iMipTBit; ///< Reverse-tunneling reqd flag. - HBufC* iMipHomeAddress; ///< Home address. - HBufC* iMipPrimaryHomeAgent; ///< IP address of mobile node's - ///< primary home agent. - HBufC* iMipSecondaryHomeAgent; ///< IP address of mobile node's - ///< secondary home agent. - TUint32 iMipMnAaaAuthAlgorithm; ///< MN-AAA auth algorithm. - TUint32 iMipMnAaaSpi; ///< MN-AAA security param index. - TUint32 iMipMnAaaSsHandle; ///< MN-AAA shared secret handle. - TUint32 iMipMnHaAuthAlgorithm; ///< MN-HA auth algorithm. - TUint32 iMipMnHaSpi; ///< MN-HA security param index. - TUint32 iMipMnHaSsHandle; ///< MN-HA shared secret handle. - - }; - -#endif // CAPITEMCDMADATA_H - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apeng/inc/APItemExtra.h --- a/apengine/apeng/inc/APItemExtra.h Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,95 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of class CApItemExtra -* -*/ - - -#ifndef CAPITEMEXTRA_H -#define CAPITEMEXTRA_H - - -// INCLUDES - -// FORWARD DECLARATION -class CApItemCdmaData; -class CApItemWlanData; - -// CONSTANTS - - -// CLASS DECLARATION - -/** -* Representation of the access point extra data class. -* Provides a way to store additional data whithout breaking BC. -*/ -class CApItemExtra :public CBase - { - public: - /** - * Two-phased constructor. Leaves on failure - * @return The constructed CApItemExtra. - */ - static CApItemExtra* NewL(); - - /** - * Destructor. - */ - virtual ~CApItemExtra(); - - /** - * C++ default constructor. - */ - CApItemExtra(); - - /** - * Second-phase constructor. - */ - void ConstructL(); - - - public: - TBool iIsFeatureManagerInitialised; // FALSE by default - TBool iIpv6GetDNSIPFromServer; - TBool iIsWcdma; - HBufC* iIpv6PrimaryDNS; - HBufC* iIpv6SecondaryDNS; - TUint iIsIpv6Supported; // FALSE by default - TBool iIsVpnAp; // False by default - TApBearerType iVPnRealIapBearerType; - CApItemCdmaData* iCdmaData; // Owned. If NULL, CDMA is unsupported. - CApItemWlanData* iWlanData; // Owned. If NULL, Wlan is unsupported. - HBufC* iLanBearerModemName; - HBufC* iIapBearerType; - TUint32 iIapBearerID; - TInt iBearerProtocol; - TInt iBearerSpeed; - - /** - * Indicates if CSD Access point is supported or not. - */ - TBool iIsAppCsdSupport; - - /** - * Indicates if HSCSD Access point is supported or not. - */ - TBool iIsAppHscsdSupport; - - - }; - -#endif // CAPITEMEXTRA_H - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apeng/inc/APItemWlanData.h --- a/apengine/apeng/inc/APItemWlanData.h Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,73 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of class CApItemWlanData -* -*/ - - -#ifndef CAPITEMWLANDATA_H -#define CAPITEMWLANDATA_H - - -// INCLUDES -#include - - - -// CLASS DECLARATION - -/** -* Wlan-specific data extension for CApAccessPointItem. -* Access Point data which is common to all AP-s (ISP...), are not stored -* here. -*/ -class CApItemWlanData : public CBase - { - public: - /** - * Two-phased constructor. Leaves on failure - * @return The constructed CApItemWlanData. - */ - static CApItemWlanData* NewL(); - - /** - * Destructor. - */ - virtual ~CApItemWlanData(); - - /** - * C++ default constructor. - */ - CApItemWlanData(); - - /** - * Second-phase constructor. - */ - void ConstructL(); - - public: - // data members are public for CApAccessPointItem... - HBufC* iWlanNetworkName; ///< WLAN netwotk name, SSID - TUint32 iWlanNetworkMode; ///< Gives network mode, TUint32 - TUint32 iWlanSecurityMode; ///< The security mode, TUint32 - TUint32 iWlanId; ///< Commdb_id of wlan settings, TUint32 - TBool iIsWlan; ///< Indicates that this WLAN-capable - ///< access point is really WLAN or not. - TBool iScanSSID; ///< need to scan the SSID - TUint32 iChannelId; ///< The ad-hoc channel ID - }; - -#endif // CAPITEMWLANDATA_H - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apeng/inc/ActiveApDbNotifier.h --- a/apengine/apeng/inc/ActiveApDbNotifier.h Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,93 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Declares the CActiveApDbNotifier class. -* -*/ - - -#ifndef ACTIVE_AP_DB_NOTIFIER_H -#define ACTIVE_AP_DB_NOTIFIER_H - -// INCLUDES - -#include -#include - - -// FORWARD DECLARATIONS - -class CActiveApDb; - -// CLASS DECLARATION - -/** -* Active object encapsulating an access point database notifier. -* Used by CActiveApDb. -*/ -class CActiveApDbNotifier : public CActive - { - public: // construct / destruct - - /** - * Constructor. - * @param aDb Active access point database to watch for. - */ - CActiveApDbNotifier( CActiveApDb& aDb ); - - /** - * Destructor. - */ - virtual ~CActiveApDbNotifier(); - - protected: // from CActive - /** - * Invoked when the outstanding request completes. - */ - void RunL() ; - - /** - * Implementation of the Cancel protocol; - * cancel any outstanding request. - */ - void DoCancel(); - - public: // new methods - - /** - * Start the notifier. The notification request is automatically - * renewed until it is cancelled, or the database is closed by - * all clients (i.e. released by DBMS). - */ - void Start(); - - /** - * Cancel and close the notifier now. - */ - void Stop(); - - private: - /** - * Request database change notification from the Access Point Engine. - */ - void NotifyChange(); - - private: // data - CActiveApDb* iActiveDb; ///< Pointer to the database. - ///< Does not owns it. - }; - -#endif - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apeng/inc/ApEngineCommons.h --- a/apengine/apeng/inc/ApEngineCommons.h Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,309 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of some common global functions. -* -*/ - - -#ifndef APENGINE_COMMONS_H -#define APENGINE_COMMONS_H - -// INCLUDES -#include -#include - - -// CONSTANTS -_LIT(KSqlSelectBase, "SELECT * from %s WHERE %s='%S'"); -_LIT( KEmpty, "" ); -_LIT( KFormat, "%S" ); -_LIT8( KFormat8,"%S" ); - - -LOCAL_C const TInt KR_ApEngineDefaultValue = 0; - -// DATA TYPES - -enum TApEnginePanicCodes - { - ENullPointer, - EInvalidDbType, - EWrongResourceFormat, - EActiveApDbObserverNotFound, - EInvalidColumn, - EInvalidSpeed, - ESqlError, - ESanityCheckFailed, - ENotSupported, - EMenuCommandUnknown - }; - - -// CLASS DECLARATION -/** -* ApCommons is a collection of commonly used 'utility' functions. -*/ -NONSHARABLE_CLASS( ApCommons ) - { - public: - /** - * Panics. - */ - static void Panic( TApEnginePanicCodes aPanic ); - - /** - * Starts a transaction on the given database if not already in one. - * In case of error, leaves with CommDb error codes. - * In case of KErrLocked, if retry is asked, it retries the operation - * after a short ( KRetryWait ) period. If still locked, leaves with it - * to allow caller module to handle the situation - * (e.g. giving up a Retry/Cancel query). - * In case of successfull transaction starting, pushes - * RollbackTransactionOnLeave to the CleanUpStack. - * @param aDb A reference to a CCommsDatabase object to start - * the transaction. - * @param aRetry A TBool indicating whether it shall retry - * the operation or not. - * @return Boolean indicating whether it has started a - * transaction or not (it also means whether it has pushed it or not.) - * It is used after DB operations to decide whether we have to - * commit or it is the caller's task. - */ - static TBool StartPushedTransactionLC( CCommsDatabase& aDb, - TBool aRetry = ETrue ); - - - /** - * Rolls back transaction on leave; called in leave processing. - * @param aDb The database (CCommsDatabase*) as TAny*. - */ - static void RollbackTransactionOnLeave( TAny* aDb ); - - - - - /** - * Creates a valid name from the passed aName. - * @param aDb A reference to a CCommsDatabase object - * @param aChanged A reference to a boolean to hold whether the name - * had been changed or not. - * @param aUid The Uid of the access point whose name we are checking - * to be able to handle updates and ignore self-match only situation - * @param aIsNew a boolean specifying whether tha access point whose - * name we are checking is new or not. - * @return A valid name - */ - static HBufC* DoMakeValidNameL( CCommsDatabase& aDb, - TBool& aChanged, - HBufC* aName, - TUint32 aUid, - TBool aIsNew ); - - /** - * Ensures that the passed name is valid, length > 0 & length < max. - * If length == 0, leaves with KErrInvalidName - * If name is only whitespace, leaves with KErrInvalidName - * If name is longer than max, name is truncated - * It copies the name, pushez it onto the CleanupStack and passes - * ownership. - * @param aName The name - * @param aChanged A reference to a boolean to hold whether the name - * had been changed or not. - * @return The valid-length name - */ - static HBufC* EnsureMaxLengthLC( const TDesC* aName, TBool& aChanged ); - - - - - - - /** - * If aName is constructed from aPrefix with a postfix, get the numeric - * value of the postfix, e.g: - * - GetPostfix( "Foo (3)", "Foo" ) == 3 - * - GetPostfix( "Foo 23 (45)", "Foo 23" ) == 45 - * If aName is the same as aPrefix, return 0, e.g.: - * - GetPostfix( "Foo", "Foo" ) == 0 - * If aName is not constructed from aPrefix, return -1, e.g.: - * - GetPostfix( "Foobar", "Foo" ) == -1 - * - GetPostfix( "Fo 23 45", "Foo" ) == -1 - * @param aName The name to get the postfix from - * @param aPrefix The prefix - * @return The postfix - */ - static TInt GetPostfix( const TDesC& aName, const TDesC& aPrefix ); - - - /** - * Given aName in the format or - * , return a - * pointer to the leading part. That is, if there is - * trailing , then that is excluded; - * if there is no trailing part, then the original - * decriptor is returned. - * Examples: - * - "Foo" returns "Foo"; - * - "Foo 12" returns "Foo 12"; - * - "Foo(12)" returns "Foo"; - * - "Foo 12 (34)" returns "Foo 12 "; - * - "Foo bar" returns "Foo bar"; - * - "Foo " returns "Foo ". - * @param aName The name to get the prefix from - * @return The prefix - */ - static TPtrC GetPrefix( const TDesC& aName ); - - - /** - * Reads up a TUint32 from the given tables given column. - * Leaves in case of error. - * Leave with KErrUnknown is captured and returned as - * function return value. - * The main aim is not to Leave if some value is not written to the DB. - * @param atable The table to read from - * @param aColumn The column to read - * @param aValue A reference to hold the readed integer - * @return Error code - */ - static TInt ReadUintL - ( - CCommsDbTableView* atable, - const TDesC& aColumn, - TUint32& aValue - ); - - /** - * Reads up a TBool from the given tables given column. - * Leaves in case of error. - * Leave with KErrUnknown is captured and returned as - * function return value. - * The main aim is not to Leave if some value is not written to the DB. - * @param atable The table to read from - * @param aColumn The column to read - * @param aValue A reference to hold the readed boolean - * @return Error code - */ - static TInt ReadBoolL - ( - CCommsDbTableView* atable, - const TDesC& aColumn, - TBool& aValue - ); - - - /** - * Reads up a long text from the given tables given column. - * Leaves in case of error. - * Leave with KErrUnknown is captured and returned as - * function return value. - * Ownership of the returned text is passed to the caller. - * The main aim is not to Leave if some value is not written to the DB. - * @param atable The table to read from - * @param aColumn The column to read - * @param aValue A reference to hold the error code - * @return The readed long text - */ - static HBufC* ReadLongTextLC - ( - CCommsDbTableView* atable, - const TDesC& aColumn, - TInt& aErrCode - ); - - - /** - * Reads up a long text from the given tables given column. - * Leaves in case of error. - * Ownership of the returned text is passed to the caller. - * Readed data is poped from the CleanuptStack to be able - * to TRAP it in ReadLongTextLC (above) function... - * @param atable The table to read from - * @param aColumn The column to read - * @return The readed long text - */ - static HBufC* ReadLongTextL( CCommsDbTableView* atable, - const TDesC& aColumn ); - - - /** - * Returns the escaped aLiteral. - * @param aLiteral The lietral to be escaped - * @return the escaped aLiteral. - */ - static HBufC* EscapeTextLC( const TDesC& aLiteral ); - - - /** - * Reads up the specified text columns value from the database. - * In case of error, leaves with CommDb error codes. - */ - static HBufC16* ReadText16ValueLC( CCommsDbTableView* atable, - const TDesC& aCol ); - - /** - * Reads up the specified text columns value from the database. - * In case of error, leaves with CommDb error codes. - * @param atable The table to read from - * @param aColumn The column to read - * @return The readed text - */ - static HBufC8* ReadText8ValueLC( CCommsDbTableView* atable, - const TDesC& aCol ); - - /** - * Reads up the read-only flag for the current record - * in the passed table - * In case of error, leaves with CommDb error codes. - * The function expects the passed table to have a valid - * current record, that is, after creating the table, - * record cursor must be setted to the desired record... - * @param aTable The table to read current records read-only flag. - * @return The current records read-only flag - */ - static TBool DoGetReadOnlyL( CCommsDbTableView& aTable ); - - - /** - * Commits a transaction on the given database. - * In case of error, returns the CommDb error codes. - * @param aDb The database to commit the transaction on - * @return Error code - */ - static TInt CommitTransaction( CCommsDatabase& aDb ); - - - /** - * Gets the local variant value - * @return A TInt stating the variant - */ - static TInt GetVariantL(); - - - /** - * Gives back the TInt Value of the given shared data key for the given - * UId. Does't use notify the given shared data, just gives back the - * actual value. - * @param aUid actual uid to identify the chunk of shared data - * @param aKey actual shared data key - * @return The actual value of the shared data - */ - static TInt IsGivenSharedDataSupportL( const TUid aUid, - const TUint32 aKey ); - - }; - -#endif // CAPENGINE_COMMONS_H - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apeng/inc/ApEngineLogger.h --- a/apengine/apeng/inc/ApEngineLogger.h Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,153 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Logging macros for Access Point Engine -* -* -*/ - - -#ifndef APENGINE_LOGGER_H -#define APENGINE_LOGGER_H - -// INCLUDES - -#ifdef __TEST_APENGINE_LOG__ - #include - #include - #include - - // TYPES - - enum TApEngineLogMask ///< Log mask bits. - { - ELogOff = 0x00000000, ///< Don't log. - ETransaction = 0x00000001, ///< Log transaction activity. - ESelect = 0x00000002, ///< Log ApSelect activity. - EHandler = 0x00000004, ///< Log ApDataHandler activity. - EUtil = 0x00000008, ///< Log ApUtils activity. - ENetworks = 0x0000000F, ///< Log Networks activity. - EApList = 0x00000010, ///< Log ApList activity. - EProtection = 0x00000020, ///< Log protection activity. - EApItem = 0x00000040, ///< Log ApItem activity. - ECommons = 0x00000080, ///< Log transaction activity. - EActiveDb = 0x000000F0, ///< Log active db & notification - ///< activity. - - ESpecial = 0x0FFFF000, ///< Log special, temp stuff only - ELogAll = 0xFFFFFFFF ///< Log all. - }; - - // MACROS - - /// Determines what to log. Construct this from TApEngineLogMask values. - #define APENGINE_LOG_MASK ELogAll - - /// Determines log detail (0==basic level). - #define APENGINE_LOG_LEVEL 4 - - // CLASS DECLARATION - - /** - * Logger class. - */ - NONSHARABLE_CLASS( ApEngineLogger ) - { - public: // new methods - - /** - * Write formatted log. - * @param aMask Log mask. - * @param aLevel Log level. - * @param aFmt Format string. - */ - static void Write - ( TInt32 aMask, TInt aLevel, - TRefByValue aFmt, ... ); - - /** - * Write formatted log. - * @param aMask Log mask. - * @param aLevel Log level. - * @param aFmt Format string. - * @param aList Variable argument list. - */ - static void Write - ( - TInt32 aMask, - TInt aLevel, - TRefByValue aFmt, - VA_LIST& aList - ); - - /** - * Write formatted log. - * @param aMask Log mask. - * @param aLevel Log level. - * @param aFmt Format string. - */ - static void Write - ( TInt32 aMask, TInt aLevel, TRefByValue aFmt, ... ); - - /** - * Write formatted log. - * @param aMask Log mask. - * @param aLevel Log level. - * @param aFmt Format string. - * @param aList Variable argument list. - */ - static void Write - ( - TInt32 aMask, - TInt aLevel, - TRefByValue aFmt, - VA_LIST& aList - ); - - /** - * Write hex dump. - * @param aMask Log mask. - * @param aLevel Log level. - * @param aHeader Header string. - * @param aMargin Margin. - * @param aPtr Data. - * @param aLen Data length. - */ - static void HexDump - ( - TInt32 aMask, - TInt aLevel, - const TText* aHeader, - const TText* aMargin, - const TUint8* aPtr, - TInt aLen - ); - }; - - - /// Write formatted to log. - #define CLOG( body ) ApEngineLogger::Write body - /// Write hex dump. - #define CDUMP( body ) ApEngineLogger::HexDump body - -#else /* not defined __TEST_APENGINE_LOG__ */ - - /// Do nothing (log disabled). - #define CLOG( body ) - /// Do nothing (log disabled). - #define CDUMP( body ) - -#endif /* def __TEST_APENGINE_LOG__ */ - -#endif /* def APENGINE_LOGGER_H */ diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apeng/inc/ApEnginePrivateCRKeys.h --- a/apengine/apeng/inc/ApEnginePrivateCRKeys.h Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -#ifndef APENGINEPRIVATECRKEYS_H -#define APENGINEPRIVATECRKEYS_H - -const TUid KCRUidApEngineLV = {0x10008D3A}; - -// Local variation for ApEngine -const TUint32 KApEngineLVFlags = 0x00000001; - - -#endif // APENGINEPRIVATECRKEYS_H \ No newline at end of file diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apeng/inc/ApListItemKey.h --- a/apengine/apeng/inc/ApListItemKey.h Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,92 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of the TApListItemKey class. -* -*/ - - -#ifndef TAPLISTITEMKEY_H -#define TAPLISTITEMKEY_H - -// INCLUDES -#include -#include -#include - -// CLASS DECLARATION -/** -* A key for sorting CApListItems according to their name -* The pointer to the list is not owned -*/ -NONSHARABLE_CLASS( TApListItemNameKey ) : public TKeyArrayFix - { -public: - /** - * Sets the list to sort - * @param aPtr A pointer to the l;ist to sort - */ - void SetPtr( CApListItemList* aPtr ); - - // From TKeyArrayFix - virtual TInt Compare( TInt aLeft,TInt aRight ) const; - - // From TKeyArrayFix - virtual TAny* At( TInt anIndex ) const; - - /** - * Constructor - */ - TApListItemNameKey( TBool aAscending = ETrue ); - -protected: - CApListItemList* iList; - TBool iAscending; - }; - - - - -/** -* A key for sorting CApListItems according to their UID -* The pointer to the list is not owned -*/ -NONSHARABLE_CLASS( TApListItemUidKey ) : public TKeyArrayFix - { -public: - /** - * Sets the list to sort - * @param aPtr A pointer to the l;ist to sort - */ - void SetPtr( CApListItemList* aPtr ); - - // From TKeyArrayFix - virtual TInt Compare( TInt aLeft,TInt aRight ) const; - - // From TKeyArrayFix - virtual TAny* At( TInt anIndex ) const; - - /** - * Constructor - */ - TApListItemUidKey( TBool aAscending = ETrue ); - - -protected: - CApListItemList* iList; - TBool iAscending; - }; - -#endif - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apeng/inc/ApSpeedLookup.h --- a/apengine/apeng/inc/ApSpeedLookup.h Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,129 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* This file containes the Access Point Engine speed - ETel speed -* lookup-information for the Access Point Engine -* -*/ - - - -#ifndef APSPEED_LOOKUP_H -#define APSPEED_LOOKUP_H - -// INCLUDE FILES -#include - - -// CONSTANTS - -const TInt CSD = 0; -const TInt HSCSD = 1; - -const TInt Analogue = 0; -const TInt V110 = 1; -const TInt V120 = 2; - - -const TInt SpeedData[27][13] = - { - { - CSD, Analogue, KSpeedAutobaud, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0 - }, - { - CSD, Analogue, KSpeed9600, 0, 4, 2, 0, 0, 0, 0, 0, 1, 2 - }, - { - CSD, Analogue, KSpeed14400, 0, 5, 2, 0, 0, 0, 0, 0, 1, 3 - }, - { - CSD, Analogue, KSpeed28800, 0, 7, 2, 0, 0, 0, 0, 0, 1, 3 - }, - { - CSD, V110, KSpeed9600, 0, 4, 2, 0, 0, 0, 0, 0, 1, 4 - }, - { - CSD, V110, KSpeed14400, 0, 5, 2, 0, 0, 0, 0, 0, 1, 4 - }, - { - CSD, V110, KSpeed28800, 0, 7, 2, 0, 0, 0, 0, 0, 1, 4 - }, - { - CSD, V110, KSpeed38400, 0, 10, 2, 0, 0, 0, 0, 0, 1, 4 - }, - { - CSD, V120, KSpeed9600, 0, 4, 2, 0, 0, 0, 0, 0, 1, 5 - }, - { - CSD, V120, KSpeed14400, 0, 5, 2, 0, 0, 0, 0, 0, 1, 5 - }, - { - CSD, V120, KSpeed28800, 0, 7, 2, 0, 0, 0, 0, 0, 1, 5 - }, - { - CSD, V120, KSpeed56000, 0, 13, 2, 0, 0, 0, 0, 0, 1, 5 - }, - { - HSCSD, Analogue, KSpeedAutobaud, 1, 7, 2, 1, 12, 0, 0, 2, 1, 3 - }, - { - HSCSD, Analogue, KSpeed9600, 1, 7, 2, 1, 4, 0, 1, 1, 1, 3 - }, - { - HSCSD, Analogue, KSpeed14400, 1, 7, 2, 1, 12, 0, 1, 1, 1, 3 - }, - { - HSCSD, Analogue, KSpeed19200, 1, 7, 2, 1, 4, 0, 2, 2, 1, 3 - }, - { - HSCSD, Analogue, KSpeed28800, 1, 7, 2, 1, 12, 0, 2, 2, 1, 3 - }, - { - HSCSD, V110, KSpeed9600, 1, 10, 2, 1, 4, 0, 1, 1, 1, 4 - }, - { - HSCSD, V110, KSpeed14400, 1, 10, 2, 1, 12, 0, 1, 1, 1, 4 - }, - { - HSCSD, V110, KSpeed19200, 1, 10, 2, 1, 4, 0, 2, 2, 1, 4 - }, - { - HSCSD, V110, KSpeed28800, 1, 10, 2, 1, 12, 0, 2, 2, 1, 4 - }, - { - HSCSD, V110, KSpeed38400, 1, 10, 2, 1, 12, 0, 3, 3, 1, 4 - }, - { - HSCSD, V120, KSpeed9600, 1, 13, 2, 1, 4, 0, 1, 1, 1, 5 - }, - { - HSCSD, V120, KSpeed14400, 1, 13, 2, 1, 12, 0, 1, 1, 1, 5 - }, - { - HSCSD, V120, KSpeed19200, 1, 13, 2, 1, 4, 0, 2, 2, 1, 5 - }, - { - HSCSD, V120, KSpeed28800, 1, 13, 2, 1, 12, 0, 2, 2, 1, 5 - }, - { - HSCSD, V120, KSpeed43200, 1, 13, 2, 1, 12, 0, 3, 3, 1, 5 - } - }; - - - - -#endif - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apeng/loc/apengine.loc --- a/apengine/apeng/loc/apengine.loc Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* This is a localisation file for ApEngine -* A .loc file is the one and only place where the logical strings -* to be localised are defined. -* -*/ - - - -// LOCALISATION STRINGS - - -//d:The name of a new, default connection. Max.30 chars, longer ones will be truncated. -//l:list_set_graphic_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_ap_default_name "New connection" - - -//d:The name of a new, default vpn connection. Max.30 chars, longer ones will be truncated. -//l:list_set_graphic_pane_t1 -//w: -//r:2.8 -// -#define qtn_vpn_sett_vpn_iap_default_name "Connection" - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apeng/src/APAccessPointItem.cpp --- a/apengine/apeng/src/APAccessPointItem.cpp Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5492 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of the class CApAccessPointItem -* -*/ - - -// INCLUDE FILES -#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS -#include -#endif -#include -#include -#include -#include -#include -#include "ApAccessPointItem.h" -#include "ApEngineConsts.h" -#include "ApEngineCommons.h" -#include "ApEngineLogger.h" -#include -#include - -#include "APItemExtra.h" -#include "APItemCdmaData.h" -#include "APItemWlanData.h" - -#include -#include -#include - -#include - - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS -_LIT( KDefIspIfName, "ppp" ); // required ! - -_LIT( KDefGprsIfName, "pppgprs" ); // required ! - -_LIT( KDefIspIfNetworksIPv4, "ip" ); // required ! -//_LIT( KDefGprsIfParams, "gprsnif" ); // required ! -_LIT( KDefGprsIfParams, "" ); // required ! - -_LIT( KDefWapGatewayIpAddress, "0.0.0.0" ); -_LIT( KDefIspGateway, "0.0.0.0" ); -_LIT( KDefPhoneIpAddress, "0.0.0.0" ); -_LIT( KDefPrimaryNameServer, "0.0.0.0" ); -_LIT( KDefSecondaryNameServer, "0.0.0.0" ); - -_LIT( KWellKnownIp6PrimaryNameServer, "fec0:000:0000:ffff::1" ); -_LIT( KWellKnownIp6SecondaryNameServer, "fec0:000:0000:ffff::2" ); -_LIT( KDefIp6PrimaryNameServer, "0:0:0:0:0:0:0:0" ); -_LIT( KDefIp6SecondaryNameServer, "0:0:0:0:0:0:0:0" ); - -_LIT( KDefIspIfNetworksIPv6, "ip6" ); // required ! -_LIT( KDefIspIfNetworksIPv4IPv6, "ip,ip6" ); // required ! -_LIT( KDefIspIfNetworksIPv4IPv6LAN, "ip,ip6" ); // required ! - - - -/// ROM drive. -_LIT( KApEngineResDriveZ, "z:" ); -/// ApEngine resource file name. -_LIT( KApEngineResFileName, "ApEngine.rsc" ); - - -/** -* General Settings UID -*/ -#ifdef __TEST_USE_SHARED_DATA - LOCAL_D const TUid KGeneralSettingsUid = { 0X100058EC }; -#endif // __TEST_USE_SHARED_DATA - - -// MACROS -#define BOOL_COMPARE(a,b) (((a) && (b)) || (!(a) && !(b))) - -// LOCAL CONSTANTS AND MACROS -const TInt KApItemInitialTxtBufSize = 0; - -const TInt KApMembers = EApWlanIPNameServer2+1; - -_LIT( KDefProxyProtocolName, "http" ); // required ! - -#if defined(_DEBUG) - _LIT( kApSet, "APEngine" ) ; -#endif // (_DEBUG) - -const TInt KEndOfArray = -1; - -const TInt KCsdAnalogue[] = { KSpeedAutobaud, KSpeed9600, KSpeed14400, - KEndOfArray }; - -const TInt KCsdAnalogueWcdma[] = { KSpeedAutobaud, KSpeed9600, KSpeed14400, - KSpeed28800, KEndOfArray}; - -const TInt KCsdIsdn110[] = { KSpeed9600, KSpeed14400, KEndOfArray}; - -const TInt KCsdIsdn110Wcdma[] = { KSpeed9600, KSpeed14400, KSpeed28800, - KSpeed38400, KEndOfArray}; - -const TInt KCsdIsdn120[] = { KSpeed9600, KSpeed14400, KEndOfArray}; - -const TInt KCsdIsdn120Wcdma[] = { KSpeed9600, KSpeed14400, KSpeed28800, - KSpeed56000, KEndOfArray}; - -const TInt KHcsdAnal[] = { KSpeedAutobaud, KSpeed9600, KSpeed14400, - KSpeed19200, KSpeed28800, KEndOfArray}; - -const TInt KHcsdIsdn110[] = { KSpeed9600, KSpeed14400, KSpeed19200, - KSpeed28800, KSpeed38400, KEndOfArray}; - -const TInt KHcsdIsdn120[] = { KSpeed9600, KSpeed14400, KSpeed19200, - KSpeed28800, KSpeed43200, KEndOfArray}; - - - -// --------------------------------------------------------- -// --------------------------------------------------------- -// -// LOCAL, CApItemExtra class implementation -// -// --------------------------------------------------------- -// --------------------------------------------------------- -// -// --------------------------------------------------------- -// CApItemExtra::NewL -// --------------------------------------------------------- -// -CApItemExtra* CApItemExtra::NewL() - { - CLOG( ( EApItem, 0, _L( "-> CApItemExtra::NewL" ) ) ); - - CApItemExtra* self = new ( ELeave ) CApItemExtra; - CleanupStack::PushL( self ); - self->ConstructL(); - - CleanupStack::Pop( self ); - - CLOG( ( EApItem, 1, _L( "<- CApItemExtra::NewL" ) ) ); - - return self; - } - - -// Destructor -// --------------------------------------------------------- -// CApItemExtra::~CApItemExtra -// --------------------------------------------------------- -// -CApItemExtra::~CApItemExtra() - { - CLOG( ( EApItem, 0, _L( "-> CApItemExtra::~CApItemExtra" ) ) ); - - delete iCdmaData; - delete iWlanData; - delete iIpv6PrimaryDNS; - delete iIpv6SecondaryDNS; - delete iLanBearerModemName; - delete iIapBearerType; - } - - -// C++ default constructor can NOT contain any code that -// might leave. -// --------------------------------------------------------- -// CApItemExtra::CApItemExtra -// --------------------------------------------------------- -// -CApItemExtra::CApItemExtra() -:iIsFeatureManagerInitialised( EFalse ), -iIpv6GetDNSIPFromServer( ETrue ), -iIsWcdma( EFalse ), -iIsIpv6Supported( EFalse ), -iIsVpnAp( EFalse ), -iIsAppCsdSupport( EFalse ) - { - } - -// Symbian OS default constructor can leave. -// --------------------------------------------------------- -// CApItemExtra::ConstructL -// --------------------------------------------------------- -// -void CApItemExtra::ConstructL() - { - CLOG( ( EApItem, 0, _L( "-> CApItemExtra::ConstructL" ) ) ); - - iIpv6PrimaryDNS = HBufC::NewL( KApItemInitialTxtBufSize ); - iIpv6SecondaryDNS = HBufC::NewL( KApItemInitialTxtBufSize ); - iLanBearerModemName = HBufC::NewL( KApItemInitialTxtBufSize ); - iIapBearerType = HBufC::NewL( KApItemInitialTxtBufSize ); - -#ifdef __TEST_USE_SHARED_DATA - iIsAppHscsdSupport = - ApCommons::IsGivenSharedDataSupportL( KGeneralSettingsUid, - KGSHSCSDAccessPoints ); -#else - iIsAppHscsdSupport = ETrue; -#endif // __TEST_USE_SHARED_DATA - - -#ifdef __TEST_HSCSD_SUPPORT - iIsAppHscsdSupport = ETrue; -#endif // __TEST_HSCSD_SUPPORT - - CLOG( ( EApItem, 1, _L( "<- CApItemExtra::ConstructL" ) ) ); - } - - -// --------------------------------------------------------- -// --------------------------------------------------------- -// -// LOCAL, CApItemCdmaData class implementation -// -// --------------------------------------------------------- -// --------------------------------------------------------- -// -// --------------------------------------------------------- -// CApItemCdmaData::NewL -// --------------------------------------------------------- -// -CApItemCdmaData* CApItemCdmaData::NewL() - { - CLOG( ( EApItem, 0, _L( "-> CApItemCdmaData::NewL" ) ) ); - - CApItemCdmaData* self = new ( ELeave ) CApItemCdmaData; - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop( self ); - - CLOG( ( EApItem, 1, _L( "<- CApItemCdmaData::NewL" ) ) ); - - return self; - } - - -// Destructor -// --------------------------------------------------------- -// CApItemCdmaData::~CApItemCdmaData -// --------------------------------------------------------- -// -CApItemCdmaData::~CApItemCdmaData() - { - CLOG( ( EApItem, 0, _L( "-> CApItemCdmaData::~CApItemCdmaData" ) ) ); - - delete iIwfName; - delete iPdpAddress; - delete iHomeAgentAddress; - delete iMipHomeAddress; - delete iMipPrimaryHomeAgent; - delete iMipSecondaryHomeAgent; - } - - -// C++ default constructor can NOT contain any code that -// might leave. -// --------------------------------------------------------- -// CApItemCdmaData::CApItemCdmaData -// --------------------------------------------------------- -// -CApItemCdmaData::CApItemCdmaData() -/* Assuming 0 default values everywhere. */ -:iServiceOption( RPacketContext::KLowSpeedData ), -iPdpType( EIPv4 ), -iReqFwdPriority( 0 ), /*RPacketQoS::TQoSLinkPriority*/ -iReqRevPriority( 0 ), /*RPacketQoS::TQoSLinkPriority*/ -iReqFwdBitrate( 0 ), /*RPacketQoS::TQoSDataRate*/ -iReqRevBitrate( 0 ), /*RPacketQoS::TQoSDataRate*/ -iReqFwdLoss( 0 ), /*RPacketQoS::TQoSDataLoss*/ -iReqRevLoss( 0 ), /*RPacketQoS::TQoSDataLoss*/ -iReqFwdMaxDelay( 0 ), /*RPacketQoS::TQoSDelay*/ -iReqRevMaxDelay( 0 ), /*RPacketQoS::TQoSDelay*/ -iMinFwdBitrate( 0 ), /*RPacketQoS::TQoSDataRate*/ -iMinRevBitrate( 0 ), /*RPacketQoS::TQoSDataRate*/ -iAccptFwdLoss( 0 ), /*RPacketQoS::TQoSDataLoss*/ -iAccptRevLoss( 0 ), /*RPacketQoS::TQoSDataLoss*/ -iAccptFwdMaxDelay( 0 ), /*RPacketQoS::TQoSDelay*/ -iAccptRevMaxDelay( 0 ), /*RPacketQoS::TQoSDelay*/ -iQosWarningTimeout( 0 ), /*0xffffffff disables*/ -iRlpMode( RPacketQoS::KRLPUnknown ), -// CDMA2000 deprecated Mobile IP fields -iMip( EFalse ), -iMipTimeout( 0 ), -// CDMA2000 specific CDMA parameters provisioned through OTA -iNaiType( 0 ), -iSimpleIpAuthAlgorithm( 0 ), -iSimpleIpPapSsHandle( 0 ), -iSimpleIpChapSsHandle( 0 ), -iMipTBit( 0 ), -iMipMnAaaAuthAlgorithm( 0 ), -iMipMnAaaSpi( 0 ), -iMipMnAaaSsHandle( 0 ), -iMipMnHaAuthAlgorithm( 0 ), -iMipMnHaSpi( 0 ), -iMipMnHaSsHandle( 0 ) - { - } - -// Symbian OS default constructor can leave. -// --------------------------------------------------------- -// CApItemCdmaData::ConstructL -// --------------------------------------------------------- -// -void CApItemCdmaData::ConstructL() - { - CLOG( ( EApItem, 0, _L( "-> CApItemCdmaData::ConstructL" ) ) ); - - iIwfName = HBufC::NewL( KApItemInitialTxtBufSize ); - iPdpAddress = HBufC::NewL( KApItemInitialTxtBufSize ); - iHomeAgentAddress = HBufC::NewL( KApItemInitialTxtBufSize ); - iMipHomeAddress = HBufC::NewL( KApItemInitialTxtBufSize ); - iMipPrimaryHomeAgent = HBufC::NewL( KApItemInitialTxtBufSize ); - iMipSecondaryHomeAgent = HBufC::NewL( KApItemInitialTxtBufSize ); - - CLOG( ( EApItem, 1, _L( "<- CApItemCdmaData::ConstructL" ) ) ); - } - - - - - - - -// --------------------------------------------------------- -// --------------------------------------------------------- -// -// LOCAL, CApItemWlanData class implementation -// -// --------------------------------------------------------- -// --------------------------------------------------------- -// -// --------------------------------------------------------- -// CApItemWlanData::NewL -// --------------------------------------------------------- -// -CApItemWlanData* CApItemWlanData::NewL() - { - CLOG( ( EApItem, 0, _L( "-> CApItemWlanData::NewL" ) ) ); - - CApItemWlanData* self = new ( ELeave ) CApItemWlanData; - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop( self ); - - CLOG( ( EApItem, 1, _L( "<- CApItemWlanData::NewL" ) ) ); - - return self; - } - - -// Destructor -// --------------------------------------------------------- -// CApItemWlanData::~CApItemWlanData -// --------------------------------------------------------- -// -CApItemWlanData::~CApItemWlanData() - { - CLOG( ( EApItem, 0, _L( "-> CApItemWlanData::~CApItemWlanData" ) ) ); - delete iWlanNetworkName; - } - - -// C++ default constructor can NOT contain any code that -// might leave. -// --------------------------------------------------------- -// CApItemWlanData::CApItemWlanData -// --------------------------------------------------------- -// -CApItemWlanData::CApItemWlanData() -:iWlanNetworkMode( EInfra ), -iWlanSecurityMode( EOpen ) -/* Assuming 0 default values elsewhere. */ - { - } - -// Symbian OS default constructor can leave. -// --------------------------------------------------------- -// CApItemWlanData::ConstructL -// --------------------------------------------------------- -// -void CApItemWlanData::ConstructL() - { - CLOG( ( EApItem, 0, _L( "-> CApItemWlanData::ConstructL" ) ) ); - - iWlanNetworkName = HBufC::NewL( KApItemInitialTxtBufSize ); - - CLOG( ( EApItem, 1, _L( "<- CApItemWlanData::ConstructL" ) ) ); - } - - - - -// MODULE DATA STRUCTURES - -// ========================================================= -// ========================================================= -// ========================================================= -// -// CApAccessPointItem class implementation -// -// ========================================================= -// ========================================================= -// ========================================================= -// - -// ================= MEMBER FUNCTIONS ======================= -// Two-phased constructor. -// --------------------------------------------------------- -// CApAccessPointItem::NewLC -// --------------------------------------------------------- -// -EXPORT_C CApAccessPointItem* CApAccessPointItem::NewLC() - { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::NewLC" ) ) ); - - CApAccessPointItem* self = new ( ELeave ) CApAccessPointItem; - CleanupStack::PushL( self ); - self->ConstructL(); - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::NewLC" ) ) ); - return self; - } - - -// Destructor -// --------------------------------------------------------- -// CApAccessPointItem::~CApAccessPointItem -// --------------------------------------------------------- -// -EXPORT_C CApAccessPointItem::~CApAccessPointItem() - { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::~CApAccessPointItem" ) ) ); - - if ( iExt ) - { - if ( iExt->iIsFeatureManagerInitialised ) - { - FeatureManager::UnInitializeLib(); - } - } - - delete iExt; - delete iSpecified; - delete iWapAccessPointName; - delete iWapBearer; - delete iStartingPage; - delete iWapGatewayAddress; - delete iIapName; - delete iIspName; - delete iIspDescription; - delete iIspDefaultTelNumber; - delete iLoginScript; - delete iUserName; - delete iPassword; - delete iIspIfName; - delete iIspIfParams; - delete iIspIfNetworks; - delete iIspIfAuthName; - delete iIspIfAuthPass; - delete iIspIfCallbackInfo; - delete iIspIPAddr; - delete iIspIPNetMask; - delete iIspGateway; - delete iPrimaryDNS; - delete iSecondaryDNS; - delete iIspInitString; - delete iIapServiceType; - delete iGprsAccessPointName; - delete iGprsPdpAddress; - delete iApProxyProtocolName; - delete iApProxyServerAddress; - delete iApProxyExceptions; - delete iNetworkName; - delete iWapProxyLoginName; - delete iWapProxyLoginPass; - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::~CApAccessPointItem" ) ) ); - } - - -// --------------------------------------------------------- -// CApAccessPointItem::CopyFromL -// --------------------------------------------------------- -// -EXPORT_C void CApAccessPointItem::CopyFromL( const CApAccessPointItem& - aCopyFrom ) - { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::CopyFromL" ) ) ); - - WriteTextL( EApWapAccessPointName, *aCopyFrom.iWapAccessPointName ); - WriteTextL( EApWapCurrentBearer, *aCopyFrom.iWapBearer ); - WriteLongTextL( EApWapStartPage, *aCopyFrom.iStartingPage ); - // The WAP gateway address - WriteTextL( EApWapGatewayAddress, *aCopyFrom.iWapGatewayAddress ); - - iIsWTLSSecurityOn = aCopyFrom.iIsWTLSSecurityOn; - iIsConnectionTypeContinuous = aCopyFrom.iIsConnectionTypeContinuous; - iChargeCard = aCopyFrom.iChargeCard; - iWapIap = aCopyFrom.iWapIap; - - WriteTextL( EApIapName, *aCopyFrom.iIapName ); - iIapServiceId = aCopyFrom.iIapServiceId; - WriteTextL( EApIapServiceType, *aCopyFrom.iIapServiceType ); - - - iIapChargeCardId = aCopyFrom.iIapChargeCardId; - - WriteTextL( EApIspName, *aCopyFrom.iIspName ); - WriteTextL( EApIspDescription, *aCopyFrom.iIspDescription ); - - iIspType = aCopyFrom.iIspType; - - WriteTextL( EApIspDefaultTelNumber, *aCopyFrom.iIspDefaultTelNumber ); - - iIspDialResolution = aCopyFrom.iIspDialResolution; - iUseLoginScript = aCopyFrom.iUseLoginScript; - - WriteLongTextL( EApIspLoginScript, *aCopyFrom.iLoginScript ); - - iPromptPassword = aCopyFrom.iPromptPassword; - - WriteTextL( EApIspLoginName, *aCopyFrom.iUserName ); - WriteTextL( EApIspLoginPass, *aCopyFrom.iPassword ); - - iDisplayTerminalWindow = aCopyFrom.iDisplayTerminalWindow; - - WriteTextL( EApIspIfName, *aCopyFrom.iIspIfName ); - WriteTextL( EApIspIfParams, *aCopyFrom.iIspIfParams ); - WriteTextL( EApIspIfNetworks, *aCopyFrom.iIspIfNetworks ); - - iIspIfPromptForAuth = aCopyFrom.iIspIfPromptForAuth; - - WriteTextL( EApIspIfAuthName, *aCopyFrom.iIspIfAuthName ); - WriteTextL( EApIspIfAuthPass, *aCopyFrom.iIspIfAuthPass ); - - iIspIfAuthRetries = aCopyFrom.iIspIfAuthRetries; - iUseCallBack = aCopyFrom.iUseCallBack; - iCallBackTypeIsServerNum = aCopyFrom.iCallBackTypeIsServerNum; - - WriteTextL( EApIspIfCallbackInfo, *aCopyFrom.iIspIfCallbackInfo ); - - iIspCallbackTimeOut = aCopyFrom.iIspCallbackTimeOut; - iIspIPAddrFromServer = aCopyFrom.iIspIPAddrFromServer; - - WriteTextL( EApIspIPAddr, *aCopyFrom.iIspIPAddr ); - WriteTextL( EApIspIPNetMask, *aCopyFrom.iIspIPNetMask ); - WriteTextL( EApIspIPGateway, *aCopyFrom.iIspGateway ); - - iGetDNSIPFromServer = aCopyFrom.iGetDNSIPFromServer; - - WriteTextL( EApIspIPNameServer1, *aCopyFrom.iPrimaryDNS ); - WriteTextL( EApIspIPNameServer2, *aCopyFrom.iSecondaryDNS ); - - iEnablePPPCompression = aCopyFrom.iEnablePPPCompression; - iIspEnableLCPExtensions = aCopyFrom.iIspEnableLCPExtensions; - iIsPasswordAuthenticationSecure = - aCopyFrom.iIsPasswordAuthenticationSecure; - iIspEnableSwCompression = aCopyFrom.iIspEnableSwCompression; - iIspBearerName = aCopyFrom.iIspBearerName; - iMaxConnSpeed = aCopyFrom.iMaxConnSpeed; - iIspBearerCE = aCopyFrom.iIspBearerCE; - iApIapBearerService = aCopyFrom.iApIapBearerService; - iBearerCallTypeIsdn = aCopyFrom.iBearerCallTypeIsdn; - - WriteTextL( EApIspInitString, *aCopyFrom.iIspInitString ); - - iIspBearerType = aCopyFrom.iIspBearerType; - iIspChannelCoding = aCopyFrom.iIspChannelCoding; - iIspAIUR = aCopyFrom.iIspAIUR; - iIspRequestedTimeSlots = aCopyFrom.iIspRequestedTimeSlots; - iIspMaximumTimeSlots = aCopyFrom.iIspMaximumTimeSlots; - - WriteLongTextL( EApGprsAccessPointName, *aCopyFrom.iGprsAccessPointName ); - - WriteTextL( EApGprsPdpAddress, *aCopyFrom.iGprsPdpAddress ); - - iGprsPdpType = aCopyFrom.iGprsPdpType; - iGprsReqPrecedence = aCopyFrom.iGprsReqPrecedence; - iGprsReqDelay = aCopyFrom.iGprsReqDelay; - iGprsReqReliability = aCopyFrom.iGprsReqReliability; - iGprsReqPeakThroughput = aCopyFrom.iGprsReqPeakThroughput; - iGprsReqMeanPeakThroughput = aCopyFrom.iGprsReqMeanPeakThroughput; - iGprsMinPrecedence = aCopyFrom.iGprsMinPrecedence; - - iGprsMinDelay = aCopyFrom.iGprsMinDelay; - iGprsMinReliability = aCopyFrom.iGprsMinReliability; - iGprsMinPeakThroughput = aCopyFrom.iGprsMinPeakThroughput; - iGprsMinMeanThroughput = aCopyFrom.iGprsMinMeanThroughput; - - iGprsUseAnonymAccess = aCopyFrom.iGprsUseAnonymAccess; - WriteTextL( EApProxyProtocolName, *aCopyFrom.iApProxyProtocolName ); - WriteLongTextL( EApProxyServerAddress, *aCopyFrom.iApProxyServerAddress ); - WriteLongTextL( EApProxyExceptions, *aCopyFrom.iApProxyExceptions); - iApProxyPortNumber = aCopyFrom.iApProxyPortNumber; - iApProxyUseProxy = aCopyFrom.iApProxyUseProxy; - iApHasProxySettings = aCopyFrom.iApHasProxySettings; - WriteTextL( EApNetworkName, *aCopyFrom.iNetworkName ); - WriteTextL( EApProxyLoginName, *aCopyFrom.iWapProxyLoginName ); - WriteTextL( EApProxyLoginPass, *aCopyFrom.iWapProxyLoginPass ); - - iNetworkId = aCopyFrom.iNetworkId; - WriteTextL( EApLanBearerName, *aCopyFrom.iExt->iLanBearerModemName ); - WriteTextL( EApIapBearerType, *aCopyFrom.iExt->iIapBearerType ); - - - // Copying of WLAN data must be before Ipv6 support handling as that - // requires the knowledge of the bearer type!!!!! - if ( iExt->iWlanData ) - { - iExt->iWlanData->iWlanNetworkMode = - aCopyFrom.iExt->iWlanData->iWlanNetworkMode; - iExt->iWlanData->iWlanSecurityMode = - aCopyFrom.iExt->iWlanData->iWlanSecurityMode; - ReAllocL( iExt->iWlanData->iWlanNetworkName, - *aCopyFrom.iExt->iWlanData->iWlanNetworkName ); - iExt->iWlanData->iWlanId = aCopyFrom.iExt->iWlanData->iWlanId; - iExt->iWlanData->iIsWlan = aCopyFrom.iExt->iWlanData->iIsWlan; - iExt->iWlanData->iScanSSID = aCopyFrom.iExt->iWlanData->iScanSSID; - iExt->iWlanData->iChannelId = aCopyFrom.iExt->iWlanData->iChannelId; - } - - if ( iExt->iIsIpv6Supported ) - { - iExt->iIpv6GetDNSIPFromServer = - aCopyFrom.iExt->iIpv6GetDNSIPFromServer; - WriteTextL( EApIP6NameServer1, *aCopyFrom.iExt->iIpv6PrimaryDNS ); - WriteTextL( EApIP6NameServer2, *aCopyFrom.iExt->iIpv6SecondaryDNS ); - } - - if( iExt->iCdmaData ) - { - // CDMA2000 - ReAllocL( iExt->iCdmaData->iIwfName, - *aCopyFrom.iExt->iCdmaData->iIwfName ); - iExt->iCdmaData->iServiceOption = - aCopyFrom.iExt->iCdmaData->iServiceOption; - iExt->iCdmaData->iPdpType = aCopyFrom.iExt->iCdmaData->iPdpType; - ReAllocL( iExt->iCdmaData->iPdpAddress, - *aCopyFrom.iExt->iCdmaData->iPdpAddress ); - iExt->iCdmaData->iReqFwdPriority = - aCopyFrom.iExt->iCdmaData->iReqFwdPriority; - iExt->iCdmaData->iReqRevPriority = - aCopyFrom.iExt->iCdmaData->iReqRevPriority; - iExt->iCdmaData->iReqFwdBitrate = - aCopyFrom.iExt->iCdmaData->iReqFwdBitrate; - iExt->iCdmaData->iReqRevBitrate = - aCopyFrom.iExt->iCdmaData->iReqRevBitrate; - iExt->iCdmaData->iReqFwdLoss = aCopyFrom.iExt->iCdmaData->iReqFwdLoss; - iExt->iCdmaData->iReqRevLoss = aCopyFrom.iExt->iCdmaData->iReqRevLoss; - iExt->iCdmaData->iReqFwdMaxDelay = - aCopyFrom.iExt->iCdmaData->iReqFwdMaxDelay; - iExt->iCdmaData->iReqRevMaxDelay = - aCopyFrom.iExt->iCdmaData->iReqRevMaxDelay; - iExt->iCdmaData->iMinFwdBitrate = - aCopyFrom.iExt->iCdmaData->iMinFwdBitrate; - iExt->iCdmaData->iMinRevBitrate = - aCopyFrom.iExt->iCdmaData->iMinRevBitrate; - iExt->iCdmaData->iAccptFwdLoss = - aCopyFrom.iExt->iCdmaData->iAccptFwdLoss; - iExt->iCdmaData->iAccptRevLoss = - aCopyFrom.iExt->iCdmaData->iAccptRevLoss; - iExt->iCdmaData->iAccptFwdMaxDelay = - aCopyFrom.iExt->iCdmaData->iAccptFwdMaxDelay; - iExt->iCdmaData->iAccptRevMaxDelay = - aCopyFrom.iExt->iCdmaData->iAccptRevMaxDelay; - iExt->iCdmaData->iQosWarningTimeout = - aCopyFrom.iExt->iCdmaData->iQosWarningTimeout; - iExt->iCdmaData->iRlpMode = aCopyFrom.iExt->iCdmaData->iRlpMode; - // CDMA2000 deprecated Mobile IP fields - iExt->iCdmaData->iMip = aCopyFrom.iExt->iCdmaData->iMip; - ReAllocL( iExt->iCdmaData->iHomeAgentAddress, - *aCopyFrom.iExt->iCdmaData->iHomeAgentAddress ); - iExt->iCdmaData->iMipTimeout = aCopyFrom.iExt->iCdmaData->iMipTimeout; - // CDMA2000 specific CDMA parameters provisioned through OTA - iExt->iCdmaData->iNaiType = aCopyFrom.iExt->iCdmaData->iNaiType; - iExt->iCdmaData->iSimpleIpAuthAlgorithm = - aCopyFrom.iExt->iCdmaData->iSimpleIpAuthAlgorithm; - iExt->iCdmaData->iSimpleIpPapSsHandle = - aCopyFrom.iExt->iCdmaData->iSimpleIpPapSsHandle; - iExt->iCdmaData->iSimpleIpChapSsHandle = - aCopyFrom.iExt->iCdmaData->iSimpleIpChapSsHandle; - iExt->iCdmaData->iMipTBit = aCopyFrom.iExt->iCdmaData->iMipTBit; - ReAllocL( iExt->iCdmaData->iMipHomeAddress, - *aCopyFrom.iExt->iCdmaData->iMipHomeAddress ); - ReAllocL( iExt->iCdmaData->iMipPrimaryHomeAgent, - *aCopyFrom.iExt->iCdmaData->iMipPrimaryHomeAgent ); - ReAllocL( iExt->iCdmaData->iMipSecondaryHomeAgent, - *aCopyFrom.iExt->iCdmaData->iMipSecondaryHomeAgent ); - iExt->iCdmaData->iMipMnAaaAuthAlgorithm = - aCopyFrom.iExt->iCdmaData->iMipMnAaaAuthAlgorithm; - iExt->iCdmaData->iMipMnAaaSpi = - aCopyFrom.iExt->iCdmaData->iMipMnAaaSpi; - iExt->iCdmaData->iMipMnAaaSsHandle = - aCopyFrom.iExt->iCdmaData->iMipMnAaaSsHandle; - iExt->iCdmaData->iMipMnHaAuthAlgorithm = - aCopyFrom.iExt->iCdmaData->iMipMnHaAuthAlgorithm; - iExt->iCdmaData->iMipMnHaSpi = aCopyFrom.iExt->iCdmaData->iMipMnHaSpi; - iExt->iCdmaData->iMipMnHaSsHandle = - aCopyFrom.iExt->iCdmaData->iMipMnHaSsHandle; - } - - - SetIfNetworksL(); - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::CopyFromL" ) ) ); - } - - - -// --------------------------------------------------------- -// CApAccessPointItem::operator== -// --------------------------------------------------------- -// -EXPORT_C TBool CApAccessPointItem::operator==( - const CApAccessPointItem& aItem - ) const - { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::operator==" ) ) ); - - TBool retval( EFalse ); - TRAPD( err, retval = DoCompareApL( aItem ) ); - if ( err ) - { - retval = EFalse; - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::operator==" ) ) ); - return retval; - } - - - -// --------------------------------------------------------- -// CApAccessPointItem::operator!= -// --------------------------------------------------------- -// -EXPORT_C TBool CApAccessPointItem::operator!=( - const CApAccessPointItem& aItem - ) const - { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::operator!=" ) ) ); - - TBool ret = ( *this == aItem ); - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::operator!=" ) ) ); - return ( !ret ); - } - - - -// C++ default constructor can NOT contain any code that -// might leave. -// --------------------------------------------------------- -// CApAccessPointItem::CApAccessPointItem -// --------------------------------------------------------- -// -EXPORT_C CApAccessPointItem::CApAccessPointItem() -:iIsWTLSSecurityOn( EFalse ), -iIsConnectionTypeContinuous( EWapWspOptionConnectionOriented ), -iIspType( EIspTypeInternetOnly ), -iUseLoginScript( EFalse ), -iPromptPassword( EFalse ), -iDisplayTerminalWindow( EFalse ), -iUseCallBack( EFalse ), -iCallBackTypeIsServerNum( ECallbackActionMSCBCPAcceptServerSpecifiedNumber ), -iIspCallbackTimeOut( KCallBackTimeOut ), -iEnablePPPCompression( EFalse ), -iIsPasswordAuthenticationSecure( ETrue ), -iBearerCallTypeIsdn( ECallTypeAnalogue ), -iIspBearerCE( RMobileCall::EQoSNonTransparent ), -iGprsPdpType( EIPv4 ), -iIsReadOnly( EFalse ), -iApHasProxySettings( EFalse ), -iNetworkId( 0 ), -iApIapBearerService( RMobileCall::KCapsDataCircuitAsynchronous ) - - { - } - - -// Symbian OS default constructor can leave. -// --------------------------------------------------------- -// CApAccessPointItem::ConstructL -// --------------------------------------------------------- -// -EXPORT_C void CApAccessPointItem::ConstructL() - { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::ConstructL" ) ) ); - - iExt = CApItemExtra::NewL(); - - FeatureManager::InitializeLibL(); - iExt->iIsFeatureManagerInitialised = ETrue; - - iExt->iIsWcdma = - FeatureManager::FeatureSupported( KFeatureIdProtocolWcdma ); - - iExt->iIsAppCsdSupport = - FeatureManager::FeatureSupported( KFeatureIdAppCsdSupport ); -#ifdef __TEST_CSD_SUPPORT - iExt->iIsAppCsdSupport = ETrue; -#endif // __TEST_CSD_SUPPORT - - - iExt->iIsIpv6Supported = - FeatureManager::FeatureSupported( KFeatureIdIPv6 ); -#ifdef __TEST_IPV6_SUPPORT - iExt->iIsIpv6Supported = ETrue; -#endif // __TEST_IPV6_SUPPORT - if( FeatureManager::FeatureSupported( KFeatureIdProtocolCdma ) ) - { - iExt->iCdmaData = CApItemCdmaData::NewL(); - } -#ifdef __TEST_CDMA_SUPPORT - if( !iExt->iCdmaData ) - { - iExt->iCdmaData = CApItemCdmaData::NewL(); - } -#endif // __TEST_CDMA_SUPPORT - - if( FeatureManager::FeatureSupported( KFeatureIdProtocolWlan ) ) - { - iExt->iWlanData = CApItemWlanData::NewL(); - } -#ifdef __TEST_WLAN_SUPPORT - iExt->iWlanData = CApItemWlanData::NewL(); -#endif // __TEST_WLAN_SUPPORT - - iSpecified = new (ELeave) CArrayFixFlat( KApMembers ); - for (TInt i=0; i< KApMembers; i++) - { - iSpecified->AppendL( EFalse ); - } - // as we are in ConstructL called from NewLC, - // 'this' is already on the CleanupStack, - // so do not push members onto it! - iWapAccessPointName = HBufC::NewL( KApItemInitialTxtBufSize ); - iWapBearer = HBufC::NewL( KApItemInitialTxtBufSize ); - iStartingPage = HBufC::NewL( KApItemInitialTxtBufSize ); - iWapGatewayAddress = HBufC::NewL( KApItemInitialTxtBufSize ); - iIapName = HBufC::NewL( KApItemInitialTxtBufSize ); - iIspName = HBufC::NewL( KApItemInitialTxtBufSize ); - iIspDescription = HBufC::NewL( KApItemInitialTxtBufSize ); - iLoginScript = HBufC::NewL( KApItemInitialTxtBufSize ); - iUserName = HBufC::NewL( KApItemInitialTxtBufSize ); - - iPassword = HBufC::NewL( KApItemInitialTxtBufSize ); - iIspIfName = HBufC::NewL( KApItemInitialTxtBufSize ); - iIspIfParams = HBufC::NewL( KApItemInitialTxtBufSize ); - iIspIfNetworks = HBufC::NewL( KApItemInitialTxtBufSize ); - iIspIfAuthName = HBufC::NewL( KApItemInitialTxtBufSize ); - iIspIfAuthPass = HBufC::NewL( KApItemInitialTxtBufSize ); - iIspIfCallbackInfo = HBufC8::NewL( KApItemInitialTxtBufSize ); - iIspIPAddr = HBufC::NewL( KApItemInitialTxtBufSize ); - iIspIPNetMask = HBufC::NewL( KApItemInitialTxtBufSize ); - iIspGateway = HBufC::NewL( KApItemInitialTxtBufSize ); - - iPrimaryDNS = HBufC::NewL( KApItemInitialTxtBufSize ); - iSecondaryDNS = HBufC::NewL( KApItemInitialTxtBufSize ); - iIspInitString = HBufC8::NewL( KApItemInitialTxtBufSize ); - iIspDefaultTelNumber = HBufC::NewL( KApItemInitialTxtBufSize ); - - - iIapServiceType = HBufC::NewL( KApItemInitialTxtBufSize ); - iGprsAccessPointName = HBufC::NewL( KApItemInitialTxtBufSize ); - iGprsPdpAddress = HBufC::NewL( KApItemInitialTxtBufSize ); - - - iApProxyProtocolName = HBufC::NewL( KApItemInitialTxtBufSize ); - iApProxyServerAddress = HBufC::NewL( KApItemInitialTxtBufSize ); - iApProxyExceptions = HBufC::NewL( KApItemInitialTxtBufSize ); - iNetworkName = HBufC::NewL( KApItemInitialTxtBufSize ); - - iWapProxyLoginName = HBufC::NewL( KApItemInitialTxtBufSize ); - iWapProxyLoginPass = HBufC::NewL( KApItemInitialTxtBufSize ); - - RFs fs; - CleanupClosePushL( fs ); - User::LeaveIfError( fs.Connect() ); - - // can't use resource here because it is not added yet.... - TFileName resourceFile; - resourceFile.Append( KApEngineResDriveZ ); - resourceFile.Append( KDC_RESOURCE_FILES_DIR ); - resourceFile.Append( KApEngineResFileName ); - BaflUtils::NearestLanguageFile( fs, resourceFile ); - - RResourceFile rf; - CleanupClosePushL( rf ); - rf.OpenL( fs, resourceFile ); - rf.ConfirmSignatureL( 0 ); - HBufC8* readBuffer = rf.AllocReadLC( R_APNG_DEFAULT_AP_NAME ); - // as we are expecting HBufC16... - __ASSERT_DEBUG( ( readBuffer->Length()%2 ) == 0, - ApCommons::Panic( EWrongResourceFormat ) ); - const TPtrC16 ptrReadBuffer( (TText16*) readBuffer->Ptr(), - ( readBuffer->Length() + 1 ) >> 1 ); - HBufC16* textBuffer=HBufC16::NewL( ptrReadBuffer.Length() ); - *textBuffer=ptrReadBuffer; - CleanupStack::PopAndDestroy( readBuffer ); // readBuffer - CleanupStack::PushL( textBuffer ); - - SetNamesL( *textBuffer ); - - CleanupStack::PopAndDestroy( 3 ); // textbuffer, fs, rf - - WriteTextL( EApWapCurrentBearer, TPtrC(WAP_IP_BEARER) ); // required ! - - WriteTextL( EApIapServiceType, TPtrC(OUTGOING_WCDMA) ); // required ! - - - WriteTextL( EApIspIfName, KDefGprsIfName ); // required ! - WriteTextL( EApIspIfParams, KDefGprsIfParams ); // required ! - WriteTextL( EApIspIPGateway, KDefIspGateway ); - - WriteTextL( EApWapGatewayAddress, KDefWapGatewayIpAddress ); - WriteTextL( EApIspIPAddr, KDefPhoneIpAddress ); - WriteTextL( EApIspIPNameServer1, KDefPrimaryNameServer ); - WriteTextL( EApIspIPNameServer2, KDefSecondaryNameServer ); - - if ( iExt->iIsIpv6Supported ) - { - WriteTextL( EApIP6NameServer1, KDefIp6PrimaryNameServer ); - WriteTextL( EApIP6NameServer2, KDefIp6SecondaryNameServer ); - } - - SetIfNetworksL(); - - WriteTextL( EApProxyProtocolName, KDefProxyProtocolName ); - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::ConstructL" ) ) ); - } - - -// --------------------------------------------------------- -// CApAccessPointItem::ReadTextL -// --------------------------------------------------------- -// -EXPORT_C void CApAccessPointItem::ReadTextL( const TApMember aColumn, - TDes8& aValue ) - { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::ReadTextL8" ) ) ); - - LeaveIfUnsupportedL( aColumn ); - - switch ( aColumn ) - { - case EApIspIfCallbackInfo: - { - // make it large enough to hold - aValue.SetLength( iIspIfCallbackInfo->Length() ); - aValue.Format( KFormat8, iIspIfCallbackInfo ); - break; - } - case EApIspInitString: - { - // make it large enough to hold - aValue.SetLength( iIspInitString->Length() ); - aValue.Format( KFormat8, iIspInitString ); - break; - } - default: - { - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidColumn ) ); - User::Leave( KErrInvalidColumn ); - break; - } - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::ReadTextL8" ) ) ); - } - - - -// --------------------------------------------------------- -// CApAccessPointItem::ReadTextL -// --------------------------------------------------------- -// -EXPORT_C void CApAccessPointItem::ReadTextL( const TApMember aColumn, - TDes16& aValue ) - { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::ReadTextL" ) ) ); - - LeaveIfUnsupportedL( aColumn ); - - switch ( aColumn ) - { - case EApWapAccessPointName: - { - aValue.SetLength( iWapAccessPointName->Length() ); - aValue.Format( KFormat, iWapAccessPointName ); - break; - } - case EApWapCurrentBearer: - { - // make it large enough to hold - aValue.SetLength( iWapBearer->Length() ); - aValue.Format( KFormat, iWapBearer ); - break; - } - case EApWapGatewayAddress: - { - // make it large enough to hold - aValue.SetLength( iWapGatewayAddress->Length() ); - aValue.Format( KFormat, iWapGatewayAddress ); - break; - } - case EApIapName: - { - // make it large enough to hold - aValue.SetLength( iIapName->Length() ); - aValue.Format( KFormat, iIapName ); - break; - } - case EApIapServiceType: - { - // make it large enough to hold - aValue.SetLength( iIapServiceType->Length() ); - aValue.Format( KFormat, iIapServiceType ); - break; - } - case EApIspName: - { - // make it large enough to hold - aValue.SetLength( iIspName->Length() ); - aValue.Format( KFormat, iIspName ); - break; - } - case EApIspDescription: - { - // make it large enough to hold - aValue.SetLength( iIspDescription->Length() ); - aValue.Format( KFormat, iIspDescription ); - break; - } - case EApIspDefaultTelNumber: - { - // make it large enough to hold - aValue.SetLength( iIspDefaultTelNumber->Length() ); - aValue.Format( KFormat, iIspDefaultTelNumber ); - break; - } - case EApIspLoginName: - { - // make it large enough to hold - aValue.SetLength( iUserName->Length() ); - aValue.Format( KFormat, iUserName ); - break; - } - case EApIspLoginPass: - { - // make it large enough to hold - aValue.SetLength( iPassword->Length() ); - aValue.Format( KFormat, iPassword ); - break; - } - case EApIspIfName: - case EApGprsIfName: - case EApCdmaIfName: - { - // make it large enough to hold - aValue.SetLength( iIspIfName->Length() ); - aValue.Format( KFormat, iIspIfName ); - break; - } - case EApIspIfParams: - case EApGprsIfParams: - case EApCdmaIfParams: - { - // make it large enough to hold - aValue.SetLength( iIspIfParams->Length() ); - aValue.Format( KFormat, iIspIfParams ); - break; - } - case EApIspIfNetworks: - case EApGprsIfNetworks: - case EApCdmaIfNetworks: - case EApWlanIfNetworks: - { - // make it large enough to hold - aValue.SetLength( iIspIfNetworks->Length() ); - aValue.Format( KFormat, iIspIfNetworks ); - break; - } - case EApIspIfAuthName: - case EApGprsIfAuthName: - case EApCdmaIfAuthName: - case EApWlanIfAuthName: - { - // make it large enough to hold - aValue.SetLength( iIspIfAuthName->Length() ); - aValue.Format( KFormat, iIspIfAuthName ); - break; - } - case EApIspIfAuthPass: - case EApGprsIfAuthPassword: - case EApCdmaIfAuthPassword: - case EApWlanIfAuthPassword: - { - // make it large enough to hold - aValue.SetLength( iIspIfAuthPass->Length() ); - aValue.Format( KFormat, iIspIfAuthPass ); - break; - } - case EApIspIPAddr: - case EApGprsIpAddr: - case EApCdmaIpAddr: - case EApWlanIpAddr: - { - // make it large enough to hold - aValue.SetLength( iIspIPAddr->Length() ); - aValue.Format( KFormat, iIspIPAddr ); - break; - } - case EApIspIPNetMask: - case EApGprsIpNetMask: - case EApCdmaIpNetMask: - case EApWlanIpNetMask: - { - // make it large enough to hold - aValue.SetLength( iIspIPNetMask->Length() ); - aValue.Format( KFormat, iIspIPNetMask ); - break; - } - case EApIspIPGateway: - case EApGprsIpGateway: - case EApCdmaIpGateway: - case EApWlanIpGateway: - { - // make it large enough to hold - aValue.SetLength( iIspGateway->Length() ); - aValue.Format( KFormat, iIspGateway ); - break; - } - case EApIspIPNameServer1: - case EApGprsIPNameServer1: - case EApCdmaIPNameServer1: - case EApWlanIPNameServer1: - { - // make it large enough to hold - aValue.SetLength( iPrimaryDNS->Length() ); - aValue.Format( KFormat, iPrimaryDNS ); - break; - } - case EApIspIPNameServer2: - case EApGprsIPNameServer2: - case EApCdmaIPNameServer2: - case EApWlanIPNameServer2: - { - // make it large enough to hold - aValue.SetLength( iSecondaryDNS->Length() ); - aValue.Format( KFormat, iSecondaryDNS ); - break; - } - case EApGprsPdpAddress: - { - // make it large enough to hold - aValue.SetLength( iGprsPdpAddress->Length() ); - aValue.Format( KFormat, iGprsPdpAddress ); - break; - } - case EApProxyProtocolName: - { - aValue.SetLength( iApProxyProtocolName->Length() ); - aValue.Format( KFormat, iApProxyProtocolName ); - break; - } - case EApProxyLoginName: - { - aValue.SetLength( iWapProxyLoginName->Length() ); - aValue.Format( KFormat, iWapProxyLoginName ); - break; - } - case EApProxyLoginPass: - { - aValue.SetLength( iWapProxyLoginPass->Length() ); - aValue.Format( KFormat, iWapProxyLoginPass ); - break; - } - case EApNetworkName: - { - aValue.SetLength( iNetworkName->Length() ); - aValue.Format( KFormat, iNetworkName ); - break; - } - case EApIP6NameServer1: - { - // make it large enough to hold - if ( iExt->iIsIpv6Supported ) - { - aValue.SetLength( iExt->iIpv6PrimaryDNS->Length() ); - aValue.Format( KFormat, iExt->iIpv6PrimaryDNS ); - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - case EApIP6NameServer2: - { - // make it large enough to hold - if ( iExt->iIsIpv6Supported ) - { - aValue.SetLength( iExt->iIpv6SecondaryDNS->Length() ); - aValue.Format( KFormat, iExt->iIpv6SecondaryDNS ); - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - // CDMA2000 - case EApCdmaIwfName: - { - // LeaveIfUnsupported prevents getting here with no CDMA support. - __ASSERT_ALWAYS \ - ( iExt->iCdmaData, ApCommons::Panic( ESanityCheckFailed ) ); - aValue.SetLength( iExt->iCdmaData->iIwfName->Length() ); - aValue.Format( KFormat, iExt->iCdmaData->iIwfName ); - break; - } - case EApCdmaPdpAddress: - { - // LeaveIfUnsupported prevents getting here with no CDMA support. - __ASSERT_ALWAYS \ - ( iExt->iCdmaData, ApCommons::Panic( ESanityCheckFailed ) ); - aValue.SetLength( iExt->iCdmaData->iPdpAddress->Length() ); - aValue.Format( KFormat, iExt->iCdmaData->iPdpAddress ); - break; - } - case EApCdmaHomeAgentAddress: - { - // LeaveIfUnsupported prevents getting here with no CDMA support. - __ASSERT_ALWAYS \ - ( iExt->iCdmaData, ApCommons::Panic( ESanityCheckFailed ) ); - aValue.SetLength( iExt->iCdmaData->iHomeAgentAddress->Length() ); - aValue.Format( KFormat, iExt->iCdmaData->iHomeAgentAddress ); - break; - } - case EApCdmaMipPrimaryHomeAgent: - { - // LeaveIfUnsupported prevents getting here with no CDMA support. - __ASSERT_ALWAYS \ - ( iExt->iCdmaData, ApCommons::Panic( ESanityCheckFailed ) ); - aValue.SetLength - ( iExt->iCdmaData->iMipPrimaryHomeAgent->Length() ); - aValue.Format - ( KFormat, iExt->iCdmaData->iMipPrimaryHomeAgent ); - break; - } - case EApCdmaMipSecondaryHomeAgent: - { - // LeaveIfUnsupported prevents getting here with no CDMA support. - __ASSERT_ALWAYS \ - ( iExt->iCdmaData, ApCommons::Panic( ESanityCheckFailed ) ); - aValue.SetLength - ( iExt->iCdmaData->iMipSecondaryHomeAgent->Length() ); - aValue.Format - ( KFormat, iExt->iCdmaData->iMipSecondaryHomeAgent ); - break; - } - // END CDMA2000 - // WLAN - case EApWlanNetworkName: - { - // LeaveIfUnsupported prevents getting here with no WLAN support. - __ASSERT_ALWAYS \ - ( iExt->iWlanData, ApCommons::Panic( ESanityCheckFailed ) ); - aValue.SetLength - ( iExt->iWlanData->iWlanNetworkName->Length() ); - aValue.Format - ( KFormat, iExt->iWlanData->iWlanNetworkName ); - break; - } - // END WLAN - // LANModem - case EApLanBearerName: - { - aValue.SetLength( iExt->iLanBearerModemName->Length() ); - aValue.Format( KFormat, iExt->iLanBearerModemName ); - break; - } - // END LANModem - case EApIapBearerType: - { - aValue.SetLength( iExt->iIapBearerType->Length() ); - aValue.Format( KFormat, iExt->iIapBearerType ); - break; - } - default: - { - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidColumn ) ); - User::Leave( KErrInvalidColumn ); - } - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::ReadTextL" ) ) ); - } - - -// --------------------------------------------------------- -// CApAccessPointItem::ReadLongTextL -// --------------------------------------------------------- -// -EXPORT_C HBufC* CApAccessPointItem::ReadLongTextL( const TApMember aColumn ) - { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::ReadLongTextL" ) ) ); - - LeaveIfUnsupportedL( aColumn ); - - HBufC* retval = NULL; - switch ( aColumn ) - { - case EApWapStartPage: - { - retval = iStartingPage; - break; - } - case EApIspLoginScript: - { - retval = iLoginScript; - break; - } - case EApGprsAccessPointName: - { - retval = iGprsAccessPointName; - break; - } - case EApProxyServerAddress: - { - retval = iApProxyServerAddress; - break; - } - case EApProxyExceptions: - { - retval = iApProxyExceptions; - break; - } - default: - { - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidColumn ) ); - User::Leave( KErrInvalidColumn ); - break; - } - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::ReadLongTextL" ) ) ); - return retval; - } - - - - -// --------------------------------------------------------- -// CApAccessPointItem::ReadConstLongTextL -// --------------------------------------------------------- -// -EXPORT_C const HBufC* CApAccessPointItem::ReadConstLongTextL - ( const TApMember aColumn ) - { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::ReadConstLongTextL" ) ) ); - - LeaveIfUnsupportedL( aColumn ); - - HBufC* retval = NULL; - switch ( aColumn ) - { - case EApWapStartPage: - { - retval = iStartingPage; - break; - } - case EApIspLoginScript: - { - retval = iLoginScript; - break; - } - case EApGprsAccessPointName: - { - retval = iGprsAccessPointName; - break; - } - case EApProxyServerAddress: - { - retval = iApProxyServerAddress; - break; - } - case EApProxyExceptions: - { - retval = iApProxyExceptions; - break; - } - default: - { - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidColumn ) ); - User::Leave( KErrInvalidColumn ); - break; - } - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::ReadConstLongTextL" ) ) ); - return retval; - } - - -// --------------------------------------------------------- -// CApAccessPointItem::ReadTextLengthL -// --------------------------------------------------------- -// -EXPORT_C TUint32 CApAccessPointItem::ReadTextLengthL( const TApMember aColumn ) - { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::ReadTextLengthL" ) ) ); - - LeaveIfUnsupportedL( aColumn ); - - TUint32 l( 0 ); - switch ( aColumn ) - { // 16 first - case EApWapAccessPointName: - { - l = iWapAccessPointName->Length(); - break; - } - case EApWapStartPage: - { - l = iStartingPage->Length(); - break; - } - case EApWapCurrentBearer: - { - l = iWapBearer->Length(); - break; - } - case EApWapGatewayAddress: - { - l = iWapGatewayAddress->Length(); - break; - } - case EApIapName: - { - l = iIapName->Length(); - break; - } - case EApIapServiceType: - { - l = iIapServiceType->Length(); - break; - } - case EApIspName: - { - l = iIspName->Length(); - break; - } - case EApIspDescription: - { - l = iIspDescription->Length(); - break; - } - case EApIspDefaultTelNumber: - { - l = iIspDefaultTelNumber->Length(); - break; - } - case EApIspLoginName: - { - l = iUserName->Length(); - break; - } - case EApIspLoginPass: - { - l = iPassword->Length(); - break; - } - case EApIspIfName: - case EApGprsIfName: - case EApCdmaIfName: - { - l = iIspIfName->Length(); - break; - } - case EApIspIfParams: - case EApGprsIfParams: - case EApCdmaIfParams: - { - l = iIspIfParams->Length(); - break; - } - case EApIspIfNetworks: - case EApGprsIfNetworks: - case EApCdmaIfNetworks: - case EApWlanIfNetworks: - { - l = iIspIfNetworks->Length(); - break; - } - case EApIspIfAuthName: - case EApGprsIfAuthName: - case EApCdmaIfAuthName: - case EApWlanIfAuthName: - { - l = iIspIfAuthName->Length(); - break; - } - case EApIspIfAuthPass: - case EApGprsIfAuthPassword: - case EApCdmaIfAuthPassword: - case EApWlanIfAuthPassword: - { - l = iIspIfAuthPass->Length(); - break; - } - case EApIspIPAddr: - case EApGprsIpAddr: - case EApCdmaIpAddr: - case EApWlanIpAddr: - { - l = iIspIPAddr->Length(); - break; - } - case EApIspIPNetMask: - case EApGprsIpNetMask: - case EApCdmaIpNetMask: - case EApWlanIpNetMask: - { - l = iIspIPNetMask->Length(); - break; - } - case EApIspIPGateway: - case EApGprsIpGateway: - case EApCdmaIpGateway: - case EApWlanIpGateway: - { - l = iIspGateway->Length(); - break; - } - case EApIspIPNameServer1: - case EApGprsIPNameServer1: - case EApCdmaIPNameServer1: - case EApWlanIPNameServer1: - { - l = iPrimaryDNS->Length(); - break; - } - case EApIspIPNameServer2: - case EApGprsIPNameServer2: - case EApCdmaIPNameServer2: - case EApWlanIPNameServer2: - { - l = iSecondaryDNS->Length(); - break; - } - case EApGprsAccessPointName: - { - l = iGprsAccessPointName->Length(); - break; - } - case EApGprsPdpAddress: - { - l = iGprsPdpAddress->Length(); - break; - } - // 8 bit ones - case EApIspIfCallbackInfo: - { - l = iIspIfCallbackInfo->Length(); - break; - } - case EApIspInitString: - { - l = iIspInitString->Length(); - break; - } - // Login script - case EApIspLoginScript: - { - l = iLoginScript->Length(); - break; - } - case EApProxyProtocolName: - { - l = iApProxyProtocolName->Length(); - break; - } - case EApProxyServerAddress: - { - l = iApProxyServerAddress->Length(); - break; - } - case EApProxyExceptions: - { - l = iApProxyExceptions->Length(); - break; - } - case EApProxyLoginName: - { - l = iWapProxyLoginName->Length(); - break; - } - case EApProxyLoginPass: - { - l = iWapProxyLoginPass->Length(); - break; - } - case EApNetworkName: - { - l = iNetworkName->Length(); - break; - } - case EApIP6NameServer1: - { - if ( iExt->iIsIpv6Supported ) - { - l = iExt->iIpv6PrimaryDNS->Length(); - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - case EApIP6NameServer2: - { - if ( iExt->iIsIpv6Supported ) - { - l = iExt->iIpv6SecondaryDNS->Length(); - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - // CDMA2000 - case EApCdmaIwfName: - { - // LeaveIfUnsupported prevents getting here with no CDMA support. - __ASSERT_ALWAYS \ - ( iExt->iCdmaData, ApCommons::Panic( ESanityCheckFailed ) ); - l = iExt->iCdmaData->iIwfName->Length(); - break; - } - case EApCdmaPdpAddress: - { - // LeaveIfUnsupported prevents getting here with no CDMA support. - __ASSERT_ALWAYS \ - ( iExt->iCdmaData, ApCommons::Panic( ESanityCheckFailed ) ); - l = iExt->iCdmaData->iPdpAddress->Length(); - break; - } - case EApCdmaHomeAgentAddress: - { - // LeaveIfUnsupported prevents getting here with no CDMA support. - __ASSERT_ALWAYS \ - ( iExt->iCdmaData, ApCommons::Panic( ESanityCheckFailed ) ); - l = iExt->iCdmaData->iHomeAgentAddress->Length(); - break; - } - case EApCdmaMipPrimaryHomeAgent: - { - // LeaveIfUnsupported prevents getting here with no CDMA support. - __ASSERT_ALWAYS \ - ( iExt->iCdmaData, ApCommons::Panic( ESanityCheckFailed ) ); - l = iExt->iCdmaData->iMipPrimaryHomeAgent->Length(); - break; - } - case EApCdmaMipSecondaryHomeAgent: - { - // LeaveIfUnsupported prevents getting here with no CDMA support. - __ASSERT_ALWAYS \ - ( iExt->iCdmaData, ApCommons::Panic( ESanityCheckFailed ) ); - l = iExt->iCdmaData->iMipSecondaryHomeAgent->Length(); - break; - } - // END CDMA2000 - // WLAN - case EApWlanNetworkName: - { - // LeaveIfUnsupported prevents getting here with no WLAN support. - __ASSERT_ALWAYS \ - ( iExt->iWlanData, ApCommons::Panic( ESanityCheckFailed ) ); - l = iExt->iWlanData->iWlanNetworkName->Length(); - break; - } - // END WLAN - default: - { - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidColumn ) ); - User::Leave( KErrInvalidColumn ); - } - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::ReadTextLengthL" ) ) ); - return l; - } - - -// --------------------------------------------------------- -// CApAccessPointItem::ReadUint -// --------------------------------------------------------- -// -EXPORT_C TInt CApAccessPointItem::ReadUint( const TApMember aColumn, - TUint32& aValue ) - { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::ReadUint" ) ) ); - - TInt retval ( KErrNone ); - - if( !IsSupported( aColumn ) ) - { - retval = KErrNotSupported; - } - else - { - switch ( aColumn ) - { - case EApWapAccessPointID: - { - aValue = iWapUid; - break; - } - case EApWapIap: - { - aValue = iWapIap; - break; - } - case EApIapServiceId: - { - aValue = iIapServiceId; - break; - } - case EApIapChargecard: - { - aValue = iIapChargeCardId; - break; - } - case EApIspIspType: - case EApCdmaApType: - { - aValue = iIspType; - break; - } - case EApIspAuthRetries: - case EApGprsIfAuthRetries: - case EApCdmaIfAuthRetries: - case EApWlanIfAuthRetries: - { - aValue = iIspIfAuthRetries; - break; - } - case EApIspIfCallbackType: - { - aValue = iCallBackTypeIsServerNum; - break; - } - case EApIspCallBackTimeOut: - { - aValue = iIspCallbackTimeOut; - break; - } - case EApIspBearerName: - { - aValue = iIspBearerName; - break; - } - case EApIspBearerSpeed: - { - aValue = iMaxConnSpeed; - break; - } - case EApIspBearerCE: - { - aValue = iIspBearerCE; - break; - } - case EApIspBearerCallTypeIsdn: - { - aValue = iBearerCallTypeIsdn; - break; - } - case EApIspBearerType: - { - aValue = iIspBearerType; - break; - } - case EApIspChannelCoding: - { - aValue = iIspChannelCoding; - break; - } - case EApIspAIUR: - { - aValue = iIspAIUR; - break; - } - case EApIspRequestedTimeSlots: - { - aValue = iIspRequestedTimeSlots; - break; - } - case EApIspMaximumTimeSlots: - { - aValue = iIspMaximumTimeSlots; - break; - } - case EApGprsPdpType: - { - aValue = iGprsPdpType; - break; - } - case EApGprsReqPrecedence: - { - aValue = iGprsReqPrecedence; - break; - } - case EApGprsReqDelay: - { - aValue = iGprsReqDelay; - break; - } - case EApGprsReqReliability: - { - aValue = iGprsReqReliability; - break; - } - case EApGprsReqPeakThroughput: - { - aValue = iGprsReqPeakThroughput; - break; - } - case EApGprsReqMeanPeakThroughput: - { - aValue = iGprsReqMeanPeakThroughput; - break; - } - case EApGprsMinPrecedence: - { - aValue = iGprsMinPrecedence; - break; - } - case EApGprsMinDelay: - { - aValue = iGprsMinDelay; - break; - } - case EApGprsMinReliability: - { - aValue = iGprsMinReliability; - break; - } - case EApGprsMinPeakThroughput: - { - aValue = iGprsMinPeakThroughput; - break; - } - case EApGprsMinMeanThroughput: - { - aValue = iGprsMinMeanThroughput; - break; - } - case EApWapWspOption: - { - aValue = iIsConnectionTypeContinuous; - break; - } - case EApProxyPortNumber: - { - aValue = iApProxyPortNumber; - break; - } - case EApWapProxyPort: - { - aValue = iWapProxyPort; - break; - } - case EApNetworkID: - { - aValue = iNetworkId; - break; - } - case EApIapBearerService: - { - aValue = iApIapBearerService; - break; - } - - //* DEPRECATED !!! - case EApWapIsp: - case EApWapChargecard: - case EApWapIspType: - { - __ASSERT_DEBUG( EFalse, \ - User::Panic( kApSet, KErrNotSupported ) ); - retval = KErrNotSupported; - break; - } - //* Deprecated ends - // CDMA2000 - case EApCdmaServiceOption: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iServiceOption; - break; - } - case EApCdmaPdpType: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iPdpType; - break; - } - case EApCdmaReqFwdPriority: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iReqFwdPriority; - break; - } - case EApCdmaReqRevPriority: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iReqRevPriority; - break; - } - case EApCdmaReqFwdBitrate: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iReqFwdBitrate; - break; - } - case EApCdmaReqRevBitrate: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iReqRevBitrate; - break; - } - case EApCdmaReqFwdLoss: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iReqFwdLoss; - break; - } - case EApCdmaReqRevLoss: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iReqRevLoss; - break; - } - case EApCdmaReqFwdMaxDelay: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iReqFwdMaxDelay; - break; - } - case EApCdmaReqRevMaxDelay: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iReqRevMaxDelay; - break; - } - case EApCdmaMinFwdBitrate: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iMinFwdBitrate; - break; - } - case EApCdmaMinRevBitrate: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iMinRevBitrate; - break; - } - case EApCdmaAccptFwdLoss: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iAccptFwdLoss; - break; - } - case EApCdmaAccptRevLoss: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iAccptRevLoss; - break; - } - case EApCdmaAccptFwdMaxDelay: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iAccptFwdMaxDelay; - break; - } - case EApCdmaAccptRevMaxDelay: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iAccptRevMaxDelay; - break; - } - case EApCdmaQosWarningTimeout: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iQosWarningTimeout; - break; - } - case EApCdmaRlpMode: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iRlpMode; - break; - } - case EApCdmaMipTimeout: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iMipTimeout; - break; - } - case EApCdmaNaiType: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iNaiType; - break; - } - case EApCdmaSimpleIpAuthAlgorithm: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iSimpleIpAuthAlgorithm; - break; - } - case EApCdmaSimpleIpPapSsHandle: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iSimpleIpPapSsHandle; - break; - } - case EApCdmaSimpleIpChapSsHandle: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iSimpleIpChapSsHandle; - break; - } - case EApCdmaMipTBit: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iMipTBit; - break; - } - case EApCdmaMipMnAaaAuthAlgorithm: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iMipMnAaaAuthAlgorithm; - break; - } - case EApCdmaMipMnAaaSpi: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iMipMnAaaSpi; - break; - } - case EApCdmaMipMnAaaSsHandle: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iMipMnAaaSsHandle; - break; - } - case EApCdmaMipMnHaAuthAlgorithm: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iMipMnHaAuthAlgorithm; - break; - } - case EApCdmaMipMnHaSpi: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iMipMnHaSpi; - break; - } - case EApCdmaMipMnHaSsHandle: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iMipMnHaSsHandle; - break; - } - // END CDMA2000 - // WLAN - case EApWlanNetworkMode: - { - // IsSupported() check prevents getting here with no WLAN supp. - __ASSERT_ALWAYS ( iExt->iWlanData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iWlanData->iWlanNetworkMode; - break; - } - case EApWlanSecurityMode: - { - // IsSupported() check prevents getting here with no WLAN supp. - __ASSERT_ALWAYS ( iExt->iWlanData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iWlanData->iWlanSecurityMode; - break; - } - case EApWlanSettingsId: - { - // IsSupported() check prevents getting here with no WLAN supp. - __ASSERT_ALWAYS ( iExt->iWlanData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iWlanData->iWlanId; - break; - } - case EApWlanChannelId: - { - // IsSupported() check prevents getting here with no WLAN supp. - __ASSERT_ALWAYS ( iExt->iWlanData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iWlanData->iChannelId; - break; - } - // END WLAN - // LANModem - case EApIapBearerID: - { - aValue = iExt->iIapBearerID; - break; - } - // END LANModem - default : - { - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidColumn ) ); - retval = KErrInvalidColumn; - break; - } - } - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::ReadUint" ) ) ); - return retval; - } - - - -// --------------------------------------------------------- -// CApAccessPointItem::ReadBool -// --------------------------------------------------------- -// -EXPORT_C TInt CApAccessPointItem::ReadBool( const TApMember aColumn, - TBool& aValue ) - { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::ReadBool" ) ) ); - - TInt retval ( KErrNone ); - - if( !IsSupported( aColumn ) ) - { - retval = KErrNotSupported; - } - else - { - switch ( aColumn ) - { - case EApWapSecurity: - { - aValue = iIsWTLSSecurityOn; - break; - } - case EApIspDialResolution: - { - aValue = iIspDialResolution; - break; - } - case EApIspUseLoginScript: - { - aValue = iUseLoginScript; - break; - } - case EApIspPromptForLogin: - { - aValue = iPromptPassword; - break; - } - case EApIspDisplayPCT: - { - aValue = iDisplayTerminalWindow; - break; - } - case EApIspIfPromptForAuth: - case EApGprsIfPromptForAuth: - case EApCdmaIfPromptForAuth: - case EApWlanIfPromptForAuth: - { - aValue = iIspIfPromptForAuth; - break; - } - case EApIspIfCallbackEnabled: - { - aValue = iUseCallBack; - break; - } - case EApIspIPAddrFromServer: - case EApGprsIpAddrFromServer: - case EApCdmaIpAddrFromServer: - case EApWlanIpAddrFromServer: - { - aValue = iIspIPAddrFromServer; - break; - } - case EApIspIPDnsAddrFromServer: - case EApGprsIpDnsAddrFromServer: - case EApCdmaIpDnsAddrFromServer: - case EApWlanIpDnsAddrFromServer: - { - aValue = iGetDNSIPFromServer; - break; - } - case EApIspEnableIpHeaderComp: - case EApGprsHeaderCompression: - case EApCdmaHeaderCompression: - { - aValue = iEnablePPPCompression; - break; - } - case EApIspEnableLCPExtensions: - case EApGprsEnableLCPExtensions: - case EApCdmaEnableLCPExtensions: - { - aValue = iIspEnableLCPExtensions; - break; - } - case EApIspDisablePlainTextAuth: - case EApGprsDisablePlainTextAuth: - case EApCdmaDisablePlainTextAuth: - { - aValue = iIsPasswordAuthenticationSecure; - break; - } - case EApIspEnableSWCompression: - case EApGprsDataCompression: - case EApCdmaDataCompression: - { - aValue = iIspEnableSwCompression; - break; - } -// NOTE! This has been deprecated. - case EApIspBearerCallTypeIsdn: - { - aValue = ( iBearerCallTypeIsdn != ECallTypeAnalogue ); - break; - } - case EApGprsUseAnonymAccess: - case EApCdmaAnonymousAccess: - { - aValue = iGprsUseAnonymAccess; - break; - } - case EApIsReadOnly: - { - aValue = iIsReadOnly; - break; - } - case EApProxyUseProxy: - { - aValue = iApProxyUseProxy; - break; - } - case EApHasProxySettings: - { - aValue = iApHasProxySettings; - break; - } - case EApIP6DNSAddrFromServer: - { - if ( iExt->iIsIpv6Supported ) - { - aValue = iExt->iIpv6GetDNSIPFromServer; - } - else - { - retval = KErrNotSupported; - } - break; - } - // CDMA2000 - case EApCdmaMip: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iMip; - break; - } - // END CDMA2000 - // WLAN - case EApWlanScanSSID: - { - // IsSupported() check prevents getting here with no WLAN supp. - __ASSERT_ALWAYS ( iExt->iWlanData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iWlanData->iScanSSID; - break; - } - // END WLAN - default : - { - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidColumn ) ); - return KErrInvalidColumn; - } - } - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::ReadBool" ) ) ); - return retval; - } - - -// Update -// --------------------------------------------------------- -// CApAccessPointItem::WriteTextL -// --------------------------------------------------------- -// -EXPORT_C TInt CApAccessPointItem::WriteTextL( const TApMember aColumn, - const TDesC8& aValue ) - { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::WriteTextL8" ) ) ); - - LeaveIfUnsupportedL( aColumn ); - - TInt ret = KErrNone; - - switch ( aColumn ) - { - case EApIspIfCallbackInfo: - { - ReAllocL( iIspIfCallbackInfo, aValue ); - break; - } - case EApIspInitString: - { - ReAllocL( iIspInitString, aValue ); - break; - } - default: - { - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidColumn ) ); - ret = KErrInvalidColumn; - break; - } - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::WriteTextL8" ) ) ); - return ret; - } - - - -// --------------------------------------------------------- -// CApAccessPointItem::WriteTextL -// --------------------------------------------------------- -// -EXPORT_C TInt CApAccessPointItem::WriteTextL( const TApMember aColumn, - const TDesC16& aValue ) - { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::WriteTextL" ) ) ); - - LeaveIfUnsupportedL( aColumn ); - - TInt retval( KErrNone ); - switch ( aColumn ) - { - case EApWapAccessPointName: - { - HBufC* sgd = aValue.AllocLC(); - sgd->Des().Trim(); - ReAllocL( iWapAccessPointName, *sgd); - CleanupStack::PopAndDestroy( sgd ); // sgd - break; - } - case EApWapCurrentBearer: - { - ReAllocL( iWapBearer, aValue); - break; - } - case EApWapGatewayAddress: - { - // this is an IP Address, must remove leading 0s from - // the numbers - HBufC *tmp = GetCleanIpAddressLC( aValue ); - ReAllocL( iWapGatewayAddress, *tmp ); - CleanupStack::PopAndDestroy( tmp ); - break; - } - case EApIapName: - { - ReAllocL( iIapName, aValue); - break; - } - case EApIspName: - { - ReAllocL( iIspName, aValue); - break; - } - case EApIapServiceType: - { - ReAllocL( iIapServiceType, aValue); - //Check if ISP/GPRS has changed , update lfname &/or lfnetworks.! - if ( ( *iIapServiceType == TPtrC(DIAL_IN_ISP) ) || - ( *iIapServiceType == TPtrC(DIAL_OUT_ISP) ) ) - { - WriteTextL( EApIspIfName, KDefIspIfName ); - } - else if ( ( *iIapServiceType == TPtrC(OUTGOING_GPRS) ) || - ( *iIapServiceType == TPtrC(INCOMING_GPRS) ) ) - { - WriteTextL( EApIspIfName, KDefGprsIfName ); - } - else - { // unknown ISP type, do not know what to write, - // simply ignore it.... - } - break; - } - case EApIspDescription: - { - ReAllocL( iIspDescription, aValue); - break; - } - case EApIspDefaultTelNumber: - { - ReAllocL( iIspDefaultTelNumber, aValue); - break; - } - case EApIspLoginName: - { - ReAllocL( iUserName, aValue); - ReAllocL( iIspIfAuthName, aValue); - break; - } - case EApIspLoginPass: - { - ReAllocL( iPassword, aValue); - ReAllocL( iIspIfAuthPass, aValue); - break; - } - case EApIspIfName: - case EApGprsIfName: - case EApCdmaIfName: - { - ReAllocL( iIspIfName, aValue); - break; - } - case EApIspIfParams: - case EApGprsIfParams: - case EApCdmaIfParams: - { - ReAllocL( iIspIfParams, aValue); - break; - } - case EApIspIfNetworks: - case EApGprsIfNetworks: - case EApCdmaIfNetworks: - case EApWlanIfNetworks: - { - ReAllocL( iIspIfNetworks, aValue); // CAN NOT BE CHANGED - break; - } - case EApIspIfAuthName: - case EApGprsIfAuthName: - case EApCdmaIfAuthName: - case EApWlanIfAuthName: - { - ReAllocL( iIspIfAuthName, aValue); - ReAllocL( iUserName, aValue); - break; - } - case EApIspIfAuthPass: - case EApGprsIfAuthPassword: - case EApCdmaIfAuthPassword: - case EApWlanIfAuthPassword: - { - ReAllocL( iIspIfAuthPass, aValue); - ReAllocL( iPassword, aValue); - break; - } - case EApIspIPAddr: - case EApGprsIpAddr: - case EApCdmaIpAddr: - case EApWlanIpAddr: - { - ReAllocL( iIspIPAddr, aValue); - SetIpFromServer(); - break; - } - case EApIspIPNetMask: - case EApGprsIpNetMask: - case EApCdmaIpNetMask: - case EApWlanIpNetMask: - { - ReAllocL( iIspIPNetMask, aValue); - break; - } - case EApIspIPGateway: - case EApGprsIpGateway: - case EApCdmaIpGateway: - case EApWlanIpGateway: - { - ReAllocL( iIspGateway, aValue); - break; - } - case EApIspIPNameServer1: - case EApGprsIPNameServer1: - case EApCdmaIPNameServer1: - case EApWlanIPNameServer1: - { - ReAllocL( iPrimaryDNS, aValue); - SetDnsIpFromServer(); - break; - } - case EApIspIPNameServer2: - case EApGprsIPNameServer2: - case EApCdmaIPNameServer2: - case EApWlanIPNameServer2: - { - ReAllocL( iSecondaryDNS, aValue); - SetDnsIpFromServer(); - break; - } - case EApGprsPdpAddress: - { - ReAllocL( iGprsPdpAddress, aValue ); - break; - } - case EApProxyProtocolName: - { - ReAllocL( iApProxyProtocolName, aValue ); - SetProxyFlag(); - break; - } - case EApNetworkName: - { - ReAllocL( iNetworkName, aValue ); - break; - } - case EApProxyLoginName: - { - ReAllocL( iWapProxyLoginName, aValue ); - break; - } - case EApProxyLoginPass: - { - ReAllocL( iWapProxyLoginPass, aValue ); - break; - } - case EApIP6NameServer1: - { - if ( iExt->iIsIpv6Supported ) - { - ReAllocL( iExt->iIpv6PrimaryDNS, aValue); - SetDns6IpFromServer(); - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - case EApIP6NameServer2: - { - if ( iExt->iIsIpv6Supported ) - { - ReAllocL( iExt->iIpv6SecondaryDNS, aValue); - SetDns6IpFromServer(); - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - // CDMA2000 - case EApCdmaIwfName: - { - __ASSERT_ALWAYS \ - ( iExt->iCdmaData, ApCommons::Panic( ESanityCheckFailed ) ); - ReAllocL( iExt->iCdmaData->iIwfName, aValue ); - break; - } - case EApCdmaPdpAddress: - { - __ASSERT_ALWAYS \ - ( iExt->iCdmaData, ApCommons::Panic( ESanityCheckFailed ) ); - ReAllocL( iExt->iCdmaData->iPdpAddress, aValue ); - break; - } - case EApCdmaHomeAgentAddress: - { - __ASSERT_ALWAYS \ - ( iExt->iCdmaData, ApCommons::Panic( ESanityCheckFailed ) ); - ReAllocL( iExt->iCdmaData->iHomeAgentAddress, aValue ); - break; - } - case EApCdmaMipPrimaryHomeAgent: - { - __ASSERT_ALWAYS \ - ( iExt->iCdmaData, ApCommons::Panic( ESanityCheckFailed ) ); - ReAllocL( iExt->iCdmaData->iMipPrimaryHomeAgent, aValue ); - break; - } - case EApCdmaMipSecondaryHomeAgent: - { - __ASSERT_ALWAYS \ - ( iExt->iCdmaData, ApCommons::Panic( ESanityCheckFailed ) ); - ReAllocL( iExt->iCdmaData->iMipSecondaryHomeAgent, aValue ); - break; - } - // END CDMA2000 - // WLAN - case EApWlanNetworkName: - { - __ASSERT_ALWAYS \ - ( iExt->iWlanData, ApCommons::Panic( ESanityCheckFailed ) ); - ReAllocL( iExt->iWlanData->iWlanNetworkName, aValue ); - break; - } - // END WLAN - // LANModem - case EApLanBearerName: - { - ReAllocL( iExt->iLanBearerModemName, aValue ); - break; - } - // END LANModem - case EApIapBearerType: - { - ReAllocL( iExt->iIapBearerType, aValue ); - break; - } - default: - { - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidColumn ) ); - retval = KErrInvalidColumn; - break; - } - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::WriteTextL" ) ) ); - return retval; - } - - -// --------------------------------------------------------- -// CApAccessPointItem::WriteLongTextL -// --------------------------------------------------------- -// -EXPORT_C TInt CApAccessPointItem::WriteLongTextL( const TApMember aColumn, - const TDesC& aValue ) - { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::WriteLongTextL" ) ) ); - - LeaveIfUnsupportedL( aColumn ); - - TInt retval( KErrNone ); - switch ( aColumn ) - { - case EApGprsAccessPointName: - { - ReAllocL( iGprsAccessPointName, aValue); - break; - } - case EApWapStartPage: - { - ReAllocL( iStartingPage, aValue); - break; - } - case EApIspLoginScript: - { - ReAllocL( iLoginScript, aValue ); - break; - } - case EApProxyServerAddress: - { - ReAllocL( iApProxyServerAddress, aValue ); - SetProxyFlag(); - break; - } - case EApProxyExceptions: - { - ReAllocL( iApProxyExceptions, aValue ); - SetProxyFlag(); - break; - } - default: - { - // unknown column... - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidColumn ) ); - retval = KErrInvalidColumn; - break; - } - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::WriteLongTextL" ) ) ); - return retval; - } - - -// --------------------------------------------------------- -// CApAccessPointItem::WriteUint -// --------------------------------------------------------- -// -EXPORT_C TInt CApAccessPointItem::WriteUint( const TApMember aColumn, - const TUint32& aValue ) - { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::WriteUint" ) ) ); - - /***************************************************** - * Series 60 Customer / ETel - * Series 60 ETel API - *****************************************************/ - TInt retval( KErrNone ); - - if ( !IsSupported( aColumn ) ) - { - retval = KErrNotSupported; - } - else - { - switch ( aColumn ) - { - case EApWapAccessPointID: - { - iWapUid = aValue; - break; - } - case EApWapIap: - { - iWapIap = aValue; - break; - } - case EApIapServiceId: - { - iIapServiceId = aValue; - break; - } - case EApIapChargecard: - { - iIapChargeCardId = aValue; - break; - } - case EApIspIspType: - case EApCdmaApType: - { - iIspType = (TCommsDbIspType)aValue; - break; - } - case EApIspAuthRetries: - case EApGprsIfAuthRetries: - case EApCdmaIfAuthRetries: - case EApWlanIfAuthRetries: - { - iIspIfAuthRetries = aValue; - break; - } - case EApIspIfCallbackType: - { - iCallBackTypeIsServerNum = TCallbackAction( aValue ); - break; - } - case EApIspCallBackTimeOut: - { - iIspCallbackTimeOut = aValue; - break; - } - case EApIspBearerName: - { - iIspBearerName = - RMobileCall::TMobileCallDataServiceCaps( aValue ); - break; - } - case EApIspBearerSpeed: - { - iMaxConnSpeed = TApCallSpeed( aValue ); - break; - } - case EApIspBearerCE: - { - //iIspBearerCE = RMobileCall::TMobileCallDataQoSCaps( aValue ); - iIspBearerCE = RMobileCall::TMobileCallDataQoS( aValue ); - break; - } - case EApIspBearerCallTypeIsdn: - { - /* - // DO NOT CHECK VALIDITY HERE AS COMMSDB STORES IT DIFFERENTLY - // AFTER READED FROM THE DB, IT WILL BE CHECKED!!!!! - // ensure it is in the valid range - TUint32 tempint = aValue; - tempint = Min( tempint, TUint32(ECallTypeISDNv120) ); - tempint = Max( tempint, TUint32(ECallTypeAnalogue) ); - */ - iBearerCallTypeIsdn = (TApCallType)aValue; - break; - } - case EApIspBearerType: - { - iIspBearerType = aValue; - break; - } - case EApIspChannelCoding: - { - iIspChannelCoding = aValue; - break; - } - case EApIspAIUR: - { - iIspAIUR = aValue; - break; - } - case EApIspRequestedTimeSlots: - { - iIspRequestedTimeSlots = aValue; - break; - } - case EApIspMaximumTimeSlots: - { - iIspMaximumTimeSlots = aValue; - break; - } - - case EApGprsPdpType: - { - iGprsPdpType = aValue; - TRAP_IGNORE( SetIfNetworksL() ); - break; - } - case EApGprsReqPrecedence: - { - iGprsReqPrecedence = aValue; - break; - } - case EApGprsReqDelay: - { - iGprsReqDelay = aValue; - break; - } - case EApGprsReqReliability: - { - iGprsReqReliability = aValue; - break; - } - case EApGprsReqPeakThroughput: - { - iGprsReqPeakThroughput = aValue; - break; - } - case EApGprsReqMeanPeakThroughput: - { - iGprsReqMeanPeakThroughput = aValue; - break; - } - case EApGprsMinPrecedence: - { - iGprsMinPrecedence = aValue; - break; - } - case EApGprsMinDelay: - { - iGprsMinDelay = aValue; - break; - } - case EApGprsMinReliability: - { - iGprsMinReliability = aValue; - break; - } - case EApGprsMinPeakThroughput: - { - iGprsMinPeakThroughput = aValue; - break; - } - case EApGprsMinMeanThroughput: - { - iGprsMinMeanThroughput = aValue; - break; - } - case EApWapWspOption: - { - iIsConnectionTypeContinuous = aValue; - break; - } - case EApProxyPortNumber: - { - iApProxyPortNumber = aValue; - SetProxyFlag(); - break; - } - case EApWapProxyPort: - { - iWapProxyPort = aValue; - break; - } - case EApNetworkID: - { // now it is supported to set it from the outside... - iNetworkId = aValue; - break; - } - case EApIapBearerService: - { - iApIapBearerService = aValue; - break; - } - - // DEPRECATED !!! - case EApWapIsp: - case EApWapChargecard: - case EApWapIspType: - { - __ASSERT_DEBUG( EFalse, \ - User::Panic( kApSet, KErrNotSupported ) ); - retval = KErrNotSupported; - break; - } - // CDMA2000 - case EApCdmaServiceOption: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iServiceOption = aValue; - break; - } - case EApCdmaPdpType: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iPdpType = aValue; - TRAP_IGNORE( SetIfNetworksL() ); - break; - } - case EApCdmaReqFwdPriority: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iReqFwdPriority = aValue; - break; - } - case EApCdmaReqRevPriority: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iReqRevPriority = aValue; - break; - } - case EApCdmaReqFwdBitrate: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iReqFwdBitrate = aValue; - break; - } - case EApCdmaReqRevBitrate: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iReqRevBitrate = aValue; - break; - } - case EApCdmaReqFwdLoss: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iReqFwdLoss = aValue; - break; - } - case EApCdmaReqRevLoss: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iReqRevLoss = aValue; - break; - } - case EApCdmaReqFwdMaxDelay: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iReqFwdMaxDelay = aValue; - break; - } - case EApCdmaReqRevMaxDelay: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iReqRevMaxDelay = aValue; - break; - } - case EApCdmaMinFwdBitrate: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iMinFwdBitrate = aValue; - break; - } - case EApCdmaMinRevBitrate: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iMinRevBitrate = aValue; - break; - } - case EApCdmaAccptFwdLoss: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iAccptFwdLoss = aValue; - break; - } - case EApCdmaAccptRevLoss: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iAccptRevLoss = aValue; - break; - } - case EApCdmaAccptFwdMaxDelay: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iAccptFwdMaxDelay = aValue; - break; - } - case EApCdmaAccptRevMaxDelay: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iAccptRevMaxDelay = aValue; - break; - } - case EApCdmaQosWarningTimeout: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iQosWarningTimeout = aValue; - break; - } - case EApCdmaRlpMode: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iRlpMode = aValue; - break; - } - case EApCdmaMipTimeout: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iMipTimeout = aValue; - break; - } - case EApCdmaNaiType: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iNaiType = aValue; - break; - } - case EApCdmaSimpleIpAuthAlgorithm: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iSimpleIpAuthAlgorithm = aValue; - break; - } - case EApCdmaSimpleIpPapSsHandle: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iSimpleIpPapSsHandle = aValue; - break; - } - case EApCdmaSimpleIpChapSsHandle: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iSimpleIpChapSsHandle = aValue; - break; - } - case EApCdmaMipTBit: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iMipTBit = aValue; - break; - } - case EApCdmaMipMnAaaAuthAlgorithm: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iMipMnAaaAuthAlgorithm = aValue; - break; - } - case EApCdmaMipMnAaaSpi: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iMipMnAaaSpi = aValue; - break; - } - case EApCdmaMipMnAaaSsHandle: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iMipMnAaaSsHandle = aValue; - break; - } - case EApCdmaMipMnHaAuthAlgorithm: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iMipMnHaAuthAlgorithm = aValue; - break; - } - case EApCdmaMipMnHaSpi: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iMipMnHaSpi = aValue; - break; - } - case EApCdmaMipMnHaSsHandle: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iMipMnHaSsHandle = aValue; - break; - } - // END CDMA2000 - // WLAN - case EApWlanNetworkMode: - { - __ASSERT_ALWAYS ( iExt->iWlanData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iWlanData->iWlanNetworkMode = aValue; - break; - } - case EApWlanSecurityMode: - { - __ASSERT_ALWAYS ( iExt->iWlanData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iWlanData->iWlanSecurityMode = aValue; - break; - } - case EApWlanSettingsId: - { - __ASSERT_ALWAYS ( iExt->iWlanData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iWlanData->iWlanId = aValue; - break; - } - case EApWlanChannelId: - { - __ASSERT_ALWAYS ( iExt->iWlanData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iWlanData->iChannelId = aValue; - break; - } - // END WLAN - // LANModem - case EApIapBearerID: - { - iExt->iIapBearerID = aValue; - break; - } - // END LANModem - default : - { - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidColumn ) ); - retval = KErrInvalidColumn; - } - } - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::WriteUint" ) ) ); - return retval; - } - - - -// --------------------------------------------------------- -// CApAccessPointItem::WriteBool -// --------------------------------------------------------- -// -EXPORT_C TInt CApAccessPointItem::WriteBool( const TApMember aColumn, - const TBool& aValue ) - { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::WriteBool" ) ) ); - - TInt retval( KErrNone ); - - if ( !IsSupported( aColumn ) ) - { - retval = KErrNotSupported; - } - else - { - switch ( aColumn ) - { - case EApWapSecurity: - { - iIsWTLSSecurityOn = aValue; - break; - } - case EApIspDialResolution: - { - iIspDialResolution = aValue; - break; - } - case EApIspUseLoginScript: - { - iUseLoginScript = aValue; - break; - } - case EApIspPromptForLogin: - { - iPromptPassword = aValue; - iIspIfPromptForAuth = aValue; - break; - } - case EApIspDisplayPCT: - { - iDisplayTerminalWindow = EFalse; - break; - } - case EApIspIfPromptForAuth: - case EApGprsIfPromptForAuth: - case EApCdmaIfPromptForAuth: - case EApWlanIfPromptForAuth: - { - iIspIfPromptForAuth = aValue; - iPromptPassword = aValue; - break; - } - case EApIspIfCallbackEnabled: - { - iUseCallBack = aValue; - break; - } - case EApIspIPAddrFromServer: - case EApGprsIpAddrFromServer: - case EApCdmaIpAddrFromServer: - case EApWlanIpAddrFromServer: - { - iIspIPAddrFromServer = aValue; - break; - } - case EApIspIPDnsAddrFromServer: - case EApGprsIpDnsAddrFromServer: - case EApCdmaIpDnsAddrFromServer: - case EApWlanIpDnsAddrFromServer: - { - iGetDNSIPFromServer = aValue; - break; - } - case EApIspEnableIpHeaderComp: - case EApGprsHeaderCompression: - case EApCdmaHeaderCompression: - { - iEnablePPPCompression = aValue; - break; - } - case EApIspEnableLCPExtensions: - case EApGprsEnableLCPExtensions: - case EApCdmaEnableLCPExtensions: - { - iIspEnableLCPExtensions = aValue; - break; - } - case EApIspDisablePlainTextAuth: - case EApGprsDisablePlainTextAuth: - case EApCdmaDisablePlainTextAuth: - { - iIsPasswordAuthenticationSecure = aValue; - break; - } - case EApIspEnableSWCompression: - case EApGprsDataCompression: - case EApCdmaDataCompression: - { - iIspEnableSwCompression = aValue; - break; - } - // NOTE! This is deprecated. - case EApIspBearerCallTypeIsdn: - { - iBearerCallTypeIsdn = - TApCallType( aValue != ECallTypeAnalogue ); - break; - } - case EApGprsUseAnonymAccess: - case EApCdmaAnonymousAccess: - { - iGprsUseAnonymAccess = aValue; - break; - } - case EApIsReadOnly: - { - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidColumn ) ); - retval = KErrInvalidColumn; - break; - } - case EApProxyUseProxy: - { - iApProxyUseProxy = aValue; - SetProxyFlag(); - break; - } - case EApHasProxySettings: - { - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidColumn ) ); - retval = KErrNotSupported; - break; - } - case EApIP6DNSAddrFromServer: - { - if ( iExt->iIsIpv6Supported ) - { - iExt->iIpv6GetDNSIPFromServer = aValue; - } - else - { - retval = KErrNotSupported; - } - break; - } - // CDMA2000 - case EApCdmaMip: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iMip = aValue; - break; - } - // END CDMA2000 - // WLAN - case EApWlanScanSSID: - { - __ASSERT_ALWAYS ( iExt->iWlanData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iWlanData->iScanSSID = aValue; - break; - } - // END WLAN - default : - { - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidColumn ) ); - retval = KErrInvalidColumn; - break; - } - } - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::WriteBool" ) ) ); - return retval; - } - - - -// Query -// COMMON - -// --------------------------------------------------------- -// CApAccessPointItem::Uid -// --------------------------------------------------------- -// -EXPORT_C TUint32 CApAccessPointItem::WapUid() const - { - CLOG( ( EApItem, 0, _L( "<-> CApAccessPointItem::WapUid" ) ) ); - - return iWapUid; - } - - -// --------------------------------------------------------- -// CApAccessPointItem::ConnectionName -// --------------------------------------------------------- -// -EXPORT_C const TDesC& CApAccessPointItem::ConnectionName() const - { - CLOG( ( EApItem, 0, _L( "<-> CApAccessPointItem::ConnectionName" ) ) ); - - return *iWapAccessPointName; - } - - -// WAP-spec. -// --------------------------------------------------------- -// CApAccessPointItem::WapBearer -// --------------------------------------------------------- -// -EXPORT_C const TDesC& CApAccessPointItem::WapBearer() const - { - CLOG( ( EApItem, 0, _L( "<-> CApAccessPointItem::WapBearer" ) ) ); - - return *iWapBearer; - } - - - -// WAP-spec. -// --------------------------------------------------------- -// CApAccessPointItem::BearerTypeL -// --------------------------------------------------------- -// -EXPORT_C TApBearerType CApAccessPointItem::BearerTypeL() - { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::BearerTypeL" ) ) ); - - TApBearerType retval( EApBearerTypeAllBearers ); - // decide which bearer, read bearer spec. data. - if ( *iWapBearer == TPtrC(WAP_IP_BEARER) ) - { - if ( ( *iIapServiceType == TPtrC(DIAL_OUT_ISP) ) || - ( *iIapServiceType == TPtrC(DIAL_IN_ISP) ) ) - { - // now check speed - if ( iIspBearerType == EBearerTypeCSD ) - { - retval = EApBearerTypeCSD; - } - else - { - if ( iIspBearerType == EBearerTypeHSCSD ) - { - retval = EApBearerTypeHSCSD; - } - else - { - User::Leave( KErrInvalidBearer ); - } - } - } - else - { - if ( ( *iIapServiceType == TPtrC(OUTGOING_WCDMA) ) || - ( *iIapServiceType == TPtrC(INCOMING_WCDMA) ) ) - { - retval = EApBearerTypeGPRS; - } - else - { // some other bearer, currently only VPN... - if ( iExt->iIsVpnAp ) - { - // in this case get REAL IAP's bearer type... - retval = iExt->iVPnRealIapBearerType; - } - else - { - if ( iExt->iWlanData ) - { - // check if it is WLAN... - if ( *iIapServiceType == TPtrC(LAN_SERVICE) ) - { - if ( IsWlan() ) - { - retval = EApBearerTypeWLAN; - } - else - { - if ( *iExt->iLanBearerModemName == - KModemBearerLANModem ) - {// IPPass Through - retval = EApBearerTypeLANModem; - } - else - { - #ifdef __TEST_LAN_BEARER - retval = EApBearerTypeLAN; - #else - User::Leave( KErrInvalidBearer ); - #endif // __TEST_LAN_BEARER - } - } - } - else - { // otherwise, it is not known, invalid... - User::Leave( KErrInvalidBearer ); - } - } - else - { - if ( *iExt->iLanBearerModemName == - KModemBearerLANModem ) - {// IPPass Through - retval = EApBearerTypeLANModem; - } - else - { - #ifdef __TEST_LAN_BEARER - retval = EApBearerTypeLAN; - #else // __TEST_LAN_BEARER - User::Leave( KErrInvalidBearer ); - #endif // __TEST_LAN_BEARER - } - } - } - } - } - } - else - { - User::Leave( KErrInvalidBearer ); - } - if ( retval == EApBearerTypeAllBearers ) - { - User::Leave( KErrInvalidBearer ); - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::BearerTypeL" ) ) ); - return retval; - } - - - -// --------------------------------------------------------- -// CApAccessPointItem::SetBearerTypeL -// --------------------------------------------------------- -// -EXPORT_C void CApAccessPointItem::SetBearerTypeL( TApBearerType aBearer ) - { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::SetBearerTypeL" ) ) ); - - HBufC* tmpbuf; - switch ( aBearer ) - { - case EApBearerTypeGPRS: // GPRS - { - tmpbuf = TPtrC(WAP_IP_BEARER).AllocL(); - delete iWapBearer; - iWapBearer = tmpbuf; - WriteTextL( EApIapServiceType, TPtrC(OUTGOING_WCDMA) ); - WriteTextL( EApIspIfParams, KDefGprsIfParams ); // required ! - if( iExt->iWlanData ) - { - iExt->iWlanData->iIsWlan = EFalse; - } - WriteTextL( EApLanBearerName, KModemBearerGPRS ); - break; - } - case EApBearerTypeCSD: // CSD - { - if ( !iExt->iIsAppCsdSupport ) - { - User::Leave( KErrNotSupported ); - } - - tmpbuf = TPtrC(WAP_IP_BEARER).AllocL(); - delete iWapBearer; - iWapBearer = tmpbuf; - WriteTextL( EApIapServiceType, TPtrC(DIAL_OUT_ISP) ); - WriteTextL( EApIspIfParams, KEmpty ); // required ! - iIspBearerType = EBearerTypeCSD; - if( iExt->iWlanData ) - { - iExt->iWlanData->iIsWlan = EFalse; - } - WriteTextL( EApLanBearerName, KModemBearerCSD ); - LimitIp6DNSL(); - break; - } - case EApBearerTypeHSCSD: // HSCSD - { - if ( !iExt->iIsAppHscsdSupport || !iExt->iIsAppCsdSupport ) - { - User::Leave( KErrNotSupported ); - } - tmpbuf = TPtrC(WAP_IP_BEARER).AllocL(); - delete iWapBearer; - iWapBearer = tmpbuf; - WriteTextL( EApIapServiceType, TPtrC(DIAL_OUT_ISP) ); - WriteTextL( EApIspIfParams, KEmpty ); // required ! - iIspBearerType = EBearerTypeHSCSD; - if( iExt->iWlanData ) - { - iExt->iWlanData->iIsWlan = EFalse; - } - WriteTextL( EApLanBearerName, KModemBearerCSD ); - LimitIp6DNSL(); - break; - } - case EApBearerTypeWLAN: // WLAN - { - if( !iExt->iWlanData ) - { - User::Leave( KErrNotSupported ); - } - tmpbuf = TPtrC(WAP_IP_BEARER).AllocL(); - delete iWapBearer; - iWapBearer = tmpbuf; - WriteTextL( EApIapServiceType, TPtrC(LAN_SERVICE) ); - WriteTextL( EApIspIfParams, KEmpty ); // required ! - WriteTextL( EApLanBearerName, KModemBearerWLAN ); - iExt->iWlanData->iIsWlan = ETrue; - break; - } -#ifdef __TEST_LAN_BEARER - case EApBearerTypeLAN: // LAN - { - tmpbuf = TPtrC(WAP_IP_BEARER).AllocL(); - delete iWapBearer; - iWapBearer = tmpbuf; - WriteTextL( EApIapServiceType, TPtrC(LAN_SERVICE) ); - WriteTextL( EApIspIfParams, KEmpty ); // required ! - if( iExt->iWlanData ) - { - iExt->iWlanData->iIsWlan = EFalse; - } - WriteTextL( EApLanBearerName, KModemBearerLAN ); - break; - } -#endif // __TEST_LAN_BEARER - case EApBearerTypeLANModem: // LAN modem - { - tmpbuf = TPtrC(WAP_IP_BEARER).AllocL(); - delete iWapBearer; - iWapBearer = tmpbuf; - WriteTextL( EApIapServiceType, TPtrC(LAN_SERVICE) ); - WriteTextL( EApIspIfParams, KEmpty ); // required ! - if( iExt->iWlanData ) - { - iExt->iWlanData->iIsWlan = EFalse; - } - WriteTextL( EApLanBearerName, KModemBearerLANModem ); - break; - } - default: - { - User::Leave( KErrInvalidBearer ); - break; - } - } - LimitSpeedL(); - - SetIfNetworksL(); - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::SetBearerTypeL" ) ) ); - } - - - -// --------------------------------------------------------- -// CApAccessPointItem::SetNamesL -// --------------------------------------------------------- -// -EXPORT_C void CApAccessPointItem::SetNamesL( const TDesC16& aValue ) - { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::SetNamesL" ) ) ); - - WriteTextL( EApWapAccessPointName, aValue ); - WriteTextL( EApIapName, aValue ); - WriteTextL( EApIspName, aValue ); - WriteTextL( EApNetworkName, aValue ); - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::SetNamesL" ) ) ); - } - - - -// --------------------------------------------------------- -// CApAccessPointItem::SanityCheckOk -// --------------------------------------------------------- -// -EXPORT_C TBool CApAccessPointItem::SanityCheckOk() - { - CLOG( ( EApItem, 0, _L( "<-> CApAccessPointItem::SanityCheckOk" ) ) ); - - TBool retval( ETrue ); - // as iWApIspType had been deprecated, this method also... - return retval; - } - - - -// --------------------------------------------------------- -// CApAccessPointItem::HasSameIspAndBearer -// --------------------------------------------------------- -// -EXPORT_C TBool CApAccessPointItem::HasSameIspAndBearerL( - CApAccessPointItem& aItem ) - { - CLOG( ( EApItem, 0, - _L( "-> CApAccessPointItem::HasSameIspAndBearerL" ) ) ); - - TBool retval( EFalse ); - TApBearerType bearer = BearerTypeL(); - if ( bearer == aItem.BearerTypeL() ) - { - switch ( bearer ) - { - case EApBearerTypeCSD: - case EApBearerTypeHSCSD: - { - // compare phone number, username, pwd - // first compare phone numbers - if ( IsSamePhoneNumberL( aItem ) ) - { - TBool pwd1; - ReadBool( EApIspPromptForLogin, pwd1 ); - TBool pwd2; - aItem.ReadBool( EApIspPromptForLogin, pwd2 ); - if ( ( !pwd1 ) && ( !pwd2 ) ) - { - HBufC* tmpuser = HBufC::NewLC( - aItem.ReadTextLengthL( EApIspLoginName ) ); - HBufC* tmppwd = HBufC::NewLC( - aItem.ReadTextLengthL( EApIspLoginPass ) ); - TPtr16 tmpptruser( tmpuser->Des() ); - TPtr16 tmpptrpwd( tmppwd->Des() ); - aItem.ReadTextL( EApIspLoginName, tmpptruser ); - aItem.ReadTextL( EApIspLoginPass, tmpptrpwd ); - if ( ( iUserName->Compare( *tmpuser ) == 0 ) - && (iPassword->Compare( *tmppwd ) == 0 ) ) - { - retval = ETrue; - } - // tmpuser, tmppw - CleanupStack::PopAndDestroy( 2, tmpuser ); - } - } - break; - } - case EApBearerTypeGPRS: - { - // compare APN, (username/pwd?) - if ( aItem.ReadConstLongTextL( EApGprsAccessPointName ) - ->Compare( *iGprsAccessPointName ) == 0 ) - { - retval = ETrue; - } - break; - } - case EApBearerTypeCDMA: - { - retval = ETrue; - break; - } - case EApBearerTypeWLAN: - { - if( iExt->iWlanData ) - { - retval = ETrue; - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } -#ifdef __TEST_LAN_BEARER - case EApBearerTypeLAN: - { - retval = ETrue; - break; - } -#endif // __TEST_LAN_BEARER - case EApBearerTypeLANModem: - { - retval = ETrue; - break; - } - default: - { - User::Leave( KErrInvalidBearer ); - break; - } - } - } - - CLOG( ( EApItem, 1, - _L( "<- CApAccessPointItem::HasSameIspAndBearerL" ) ) ); - return retval; - } - - -// --------------------------------------------------------- -// CApAccessPointItem::IsReadOnly -// --------------------------------------------------------- -// -EXPORT_C TBool CApAccessPointItem::IsReadOnly() const - { - CLOG( ( EApItem, 0, _L( "<-> CApAccessPointItem::IsReadOnly" ) ) ); - - return iIsReadOnly; - } - - - - -// ================= OTHER EXPORTED FUNCTIONS ============== - - -// =============== OTHER NON - EXPORTED FUNCTIONS ============ -// --------------------------------------------------------- -// CApAccessPointItem::IsVpnAp -// --------------------------------------------------------- -// -TBool CApAccessPointItem::IsVpnAp() const - { - return iExt->iIsVpnAp; - } - - -// --------------------------------------------------------- -// CApAccessPointItem::SetVpnAp -// --------------------------------------------------------- -// -void CApAccessPointItem::SetVpnAp( TBool aIsVpn ) - { - iExt->iIsVpnAp = aIsVpn; - } - -// --------------------------------------------------------- -// CApAccessPointItem::Specified -// --------------------------------------------------------- -// -TBool CApAccessPointItem::Specified( TApMember aMember ) - { - CLOG( ( EApItem, 0, _L( "<-> CApAccessPointItem::Specified" ) ) ); - - return iSpecified->At( aMember ); - } - - -// --------------------------------------------------------- -// CApAccessPointItem::Specify -// --------------------------------------------------------- -// -void CApAccessPointItem::Specify( TApMember aMember, TBool aOn ) - { - CLOG( ( EApItem, 0, _L( "<-> CApAccessPointItem::Specify" ) ) ); - - iSpecified->At( aMember ) = aOn; - } - - -// --------------------------------------------------------- -// CApAccessPointItem::SpecifyAll -// --------------------------------------------------------- -// -void CApAccessPointItem::SpecifyAll( TBool aOn ) - { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::SpecifyAll" ) ) ); - - for( TInt i=0; i< KApMembers; i++ ) - { - iSpecified->At( i ) = aOn; - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::SpecifyAll" ) ) ); - } - - - -// --------------------------------------------------------- -// CApAccessPointItem::SpecifyWap -// --------------------------------------------------------- -// -void CApAccessPointItem::SpecifyWap( TBool aOn ) - { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::SpecifyWap" ) ) ); - - iSpecified->At( EApWapAccessPointID ) = aOn; - iSpecified->At( EApWapAccessPointName ) = aOn; - iSpecified->At( EApWapCurrentBearer ) = aOn; - iSpecified->At( EApWapStartPage ) = aOn; - iSpecified->At( EApWapGatewayAddress ) = aOn; - iSpecified->At( EApWapWspOption ) = aOn; - iSpecified->At( EApWapSecurity ) = aOn; - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::SpecifyWap" ) ) ); - } - - - -// --------------------------------------------------------- -// CApAccessPointItem::SpecifyIpBearer -// --------------------------------------------------------- -// -void CApAccessPointItem::SpecifyIpBearer( TBool aOn ) - { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::SpecifyIpBearer" ) ) ); - -//* DEPRECATED - iSpecified->At( EApWapIsp ) = EFalse; -//* DEPRECATED - iSpecified->At( EApWapChargecard ) = EFalse; - iSpecified->At( EApWapIap ) = aOn; -//* DEPRECATED - iSpecified->At( EApWapIspType ) = EFalse; - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::SpecifyIpBearer" ) ) ); - } - - -// --------------------------------------------------------- -// CApAccessPointItem::SpecifyIAP -// --------------------------------------------------------- -// -void CApAccessPointItem::SpecifyIAP( TBool aOn ) - { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::SpecifyIAP" ) ) ); - - iSpecified->At( EApWapIap ) = aOn; - iSpecified->At( EApIapName ) = aOn; - iSpecified->At( EApIapServiceType ) = aOn; - iSpecified->At( EApIapServiceId ) = aOn; - iSpecified->At( EApIapChargecard ) = aOn; - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::SpecifyIAP" ) ) ); - } - - -// --------------------------------------------------------- -// CApAccessPointItem::SpecifyISP -// --------------------------------------------------------- -// -void CApAccessPointItem::SpecifyISP( TBool aOn ) - { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::SpecifyISP" ) ) ); - - iSpecified->At( EApIspName ) = aOn; - iSpecified->At( EApIspDescription ) = aOn; - iSpecified->At( EApIspIspType ) = aOn; - - iSpecified->At( EApIspDefaultTelNumber ) = aOn; - iSpecified->At( EApIspDialResolution ) = aOn; - iSpecified->At( EApIspUseLoginScript ) = aOn; - iSpecified->At( EApIspLoginScript ) = aOn; - iSpecified->At( EApIspPromptForLogin ) = aOn; - iSpecified->At( EApIspLoginName ) = aOn; - iSpecified->At( EApIspLoginPass ) = aOn; - iSpecified->At( EApIspDisplayPCT ) = aOn; - iSpecified->At( EApIspIfName ) = aOn; - iSpecified->At( EApIspIfParams ) = aOn; - iSpecified->At( EApIspIfNetworks ) = aOn; - iSpecified->At( EApIspIfPromptForAuth ) = aOn; - iSpecified->At( EApIspIfAuthName ) = aOn; - iSpecified->At( EApIspIfAuthPass ) = aOn; - iSpecified->At( EApIspAuthRetries ) = aOn; - iSpecified->At( EApIspIfCallbackEnabled ) = aOn; - iSpecified->At( EApIspIfCallbackType ) = aOn; - iSpecified->At( EApIspIfCallbackInfo ) = aOn; - iSpecified->At( EApIspCallBackTimeOut ) = aOn; - iSpecified->At( EApIspIPAddrFromServer ) = aOn; - iSpecified->At( EApIspIPAddr ) = aOn; - iSpecified->At( EApIspIPNetMask ) = aOn; - iSpecified->At( EApIspIPGateway ) = aOn; - iSpecified->At( EApIspIPDnsAddrFromServer ) = aOn; - iSpecified->At( EApIspIPNameServer1 ) = aOn; - iSpecified->At( EApIspIPNameServer2 ) = aOn; - iSpecified->At( EApIspEnableIpHeaderComp ) = aOn; - iSpecified->At( EApIspEnableLCPExtensions ) = aOn; - iSpecified->At( EApIspDisablePlainTextAuth ) = aOn; - iSpecified->At( EApIspEnableSWCompression ) = aOn; - iSpecified->At( EApIspBearerName ) = aOn; - iSpecified->At( EApIspBearerSpeed ) = aOn; - iSpecified->At( EApIspBearerCallTypeIsdn ) = aOn; - iSpecified->At( EApIspBearerCE ) = aOn; - iSpecified->At( EApIspInitString ) = aOn; - iSpecified->At( EApIspBearerType ) = aOn; - iSpecified->At( EApIspChannelCoding ) = aOn; - iSpecified->At( EApIspAIUR ) = aOn; - iSpecified->At( EApIspRequestedTimeSlots ) = aOn; - iSpecified->At( EApIspMaximumTimeSlots ) = aOn; - - if ( iExt->iIsIpv6Supported ) - { - iSpecified->At( EApIP6DNSAddrFromServer ) = aOn; - iSpecified->At( EApIP6NameServer1 ) = aOn; - iSpecified->At( EApIP6NameServer2 ) = aOn; - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::SpecifyISP" ) ) ); - } - - -// --------------------------------------------------------- -// CApAccessPointItem::SpecifyGPRS -// --------------------------------------------------------- -// -void CApAccessPointItem::SpecifyGPRS( TBool aOn ) - { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::SpecifyGPRS" ) ) ); - - iSpecified->At( EApGprsAccessPointName ) = aOn; - iSpecified->At( EApGprsPdpType ) = aOn; - iSpecified->At( EApGprsPdpAddress ) = aOn; - iSpecified->At( EApGprsReqPrecedence ) = aOn; - iSpecified->At( EApGprsReqDelay ) = aOn; - iSpecified->At( EApGprsReqReliability ) = aOn; - iSpecified->At( EApGprsReqPeakThroughput ) = aOn; - iSpecified->At( EApGprsReqMeanPeakThroughput ) = aOn; - iSpecified->At( EApGprsMinPrecedence ) = aOn; - iSpecified->At( EApGprsMinDelay ) = aOn; - iSpecified->At( EApGprsMinReliability ) = aOn; - iSpecified->At( EApGprsMinPeakThroughput ) = aOn; - iSpecified->At( EApGprsMinMeanThroughput ) = aOn; - iSpecified->At( EApGprsUseAnonymAccess ) = aOn; - - // followings are mapped to ISP... fields - iSpecified->At( EApGprsDataCompression ) = aOn; - iSpecified->At( EApGprsHeaderCompression ) = aOn; - iSpecified->At( EApGprsIfName ) = aOn; - iSpecified->At( EApGprsIfParams ) = aOn; - iSpecified->At( EApGprsIfNetworks ) = aOn; - iSpecified->At( EApGprsIfPromptForAuth ) = aOn; - iSpecified->At( EApGprsIfAuthName ) = aOn; - iSpecified->At( EApGprsIfAuthPassword ) = aOn; - iSpecified->At( EApGprsIfAuthRetries ) = aOn; - iSpecified->At( EApGprsIpNetMask ) = aOn; - iSpecified->At( EApGprsIpGateway ) = aOn; - iSpecified->At( EApGprsIpAddrFromServer ) = aOn; - iSpecified->At( EApGprsIpAddr ) = aOn; - iSpecified->At( EApGprsIpDnsAddrFromServer ) = aOn; - iSpecified->At( EApGprsIPNameServer1 ) = aOn; - iSpecified->At( EApGprsIPNameServer2 ) = aOn; - iSpecified->At( EApGprsEnableLCPExtensions ) = aOn; - iSpecified->At( EApGprsDisablePlainTextAuth ) = aOn; - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::SpecifyGPRS" ) ) ); - } - - -// --------------------------------------------------------- -// CApAccessPointItem::SpecifyCDMA -// --------------------------------------------------------- -// -void CApAccessPointItem::SpecifyCDMA( TBool aOn ) - { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::SpecifyCDMA" ) ) ); - - __ASSERT_DEBUG( iExt->iCdmaData, ApCommons::Panic( ESanityCheckFailed ) ); - - iSpecified->At( EApCdmaIwfName ) = aOn; - iSpecified->At( EApCdmaServiceOption ) = aOn; - iSpecified->At( EApCdmaPdpType ) = aOn; - iSpecified->At( EApCdmaPdpAddress ) = aOn; - iSpecified->At( EApCdmaReqFwdPriority ) = aOn; - iSpecified->At( EApCdmaReqRevPriority ) = aOn; - iSpecified->At( EApCdmaReqFwdBitrate ) = aOn; - iSpecified->At( EApCdmaReqRevBitrate ) = aOn; - iSpecified->At( EApCdmaReqFwdLoss ) = aOn; - iSpecified->At( EApCdmaReqRevLoss ) = aOn; - iSpecified->At( EApCdmaReqFwdMaxDelay ) = aOn; - iSpecified->At( EApCdmaReqRevMaxDelay ) = aOn; - iSpecified->At( EApCdmaMinFwdBitrate ) = aOn; - iSpecified->At( EApCdmaMinRevBitrate ) = aOn; - iSpecified->At( EApCdmaAccptFwdLoss ) = aOn; - iSpecified->At( EApCdmaAccptRevLoss ) = aOn; - iSpecified->At( EApCdmaAccptFwdMaxDelay ) = aOn; - iSpecified->At( EApCdmaAccptRevMaxDelay ) = aOn; - // CDMA2000, mapped to ISP... fields - iSpecified->At( EApCdmaDataCompression ) = aOn; - iSpecified->At( EApCdmaHeaderCompression ) = aOn; - iSpecified->At( EApCdmaAnonymousAccess ) = aOn; - iSpecified->At( EApCdmaIfName ) = aOn; - iSpecified->At( EApCdmaIfParams ) = aOn; - iSpecified->At( EApCdmaIfNetworks ) = aOn; - iSpecified->At( EApCdmaIfPromptForAuth ) = aOn; - iSpecified->At( EApCdmaIfAuthName ) = aOn; - iSpecified->At( EApCdmaIfAuthPassword ) = aOn; - iSpecified->At( EApCdmaIfAuthRetries ) = aOn; - iSpecified->At( EApCdmaIpNetMask ) = aOn; - iSpecified->At( EApCdmaIpGateway ) = aOn; - iSpecified->At( EApCdmaIpAddrFromServer ) = aOn; - iSpecified->At( EApCdmaIpAddr ) = aOn; - iSpecified->At( EApCdmaIpDnsAddrFromServer ) = aOn; - iSpecified->At( EApCdmaIPNameServer1 ) = aOn; - iSpecified->At( EApCdmaIPNameServer2 ) = aOn; - iSpecified->At( EApCdmaEnableLCPExtensions ) = aOn; - iSpecified->At( EApCdmaDisablePlainTextAuth ) = aOn; - // CDMA2000 - iSpecified->At( EApCdmaApType ) = aOn; - iSpecified->At( EApCdmaQosWarningTimeout ) = aOn; - iSpecified->At( EApCdmaRlpMode ) = aOn; - // CDMA2000 deprecated Mobile IP fields - iSpecified->At( EApCdmaMip ) = aOn; - iSpecified->At( EApCdmaHomeAgentAddress ) = aOn; - iSpecified->At( EApCdmaMipTimeout ) = aOn; - // CDMA2000 specific CDMA parameters provisioned through OTA - iSpecified->At( EApCdmaNaiType ) = aOn; - iSpecified->At( EApCdmaSimpleIpAuthAlgorithm ) = aOn; - iSpecified->At( EApCdmaSimpleIpPapSsHandle ) = aOn; - iSpecified->At( EApCdmaSimpleIpChapSsHandle ) = aOn; - iSpecified->At( EApCdmaMipTBit ) = aOn; - iSpecified->At( EApCdmaMipHomeAddress ) = aOn; - iSpecified->At( EApCdmaMipPrimaryHomeAgent ) = aOn; - iSpecified->At( EApCdmaMipSecondaryHomeAgent ) = aOn; - iSpecified->At( EApCdmaMipMnAaaAuthAlgorithm ) = aOn; - iSpecified->At( EApCdmaMipMnAaaSpi ) = aOn; - iSpecified->At( EApCdmaMipMnAaaSsHandle ) = aOn; - iSpecified->At( EApCdmaMipMnHaAuthAlgorithm ) = aOn; - iSpecified->At( EApCdmaMipMnHaSpi ) = aOn; - iSpecified->At( EApCdmaMipMnHaSsHandle ) = aOn; - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::SpecifyCDMA" ) ) ); - } - - -// --------------------------------------------------------- -// CApAccessPointItem::SpecifyWLAN -// --------------------------------------------------------- -// -void CApAccessPointItem::SpecifyWLAN( TBool aOn ) - { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::SpecifyWLAN" ) ) ); - - __ASSERT_DEBUG( iExt->iWlanData, ApCommons::Panic( ESanityCheckFailed ) ); - - // WLAN, mapped to ISP... fields - iSpecified->At( EApWlanIfNetworks ) = aOn; - iSpecified->At( EApWlanIfPromptForAuth ) = aOn; - iSpecified->At( EApWlanIfAuthName ) = aOn; - iSpecified->At( EApWlanIfAuthPassword ) = aOn; - iSpecified->At( EApWlanIfAuthRetries ) = aOn; - iSpecified->At( EApWlanIpNetMask ) = aOn; - iSpecified->At( EApWlanIpGateway ) = aOn; - iSpecified->At( EApWlanIpAddrFromServer ) = aOn; - iSpecified->At( EApWlanIpAddr ) = aOn; - iSpecified->At( EApWlanIpDnsAddrFromServer ) = aOn; - iSpecified->At( EApWlanIPNameServer1 ) = aOn; - iSpecified->At( EApWlanIPNameServer2 ) = aOn; - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::SpecifyWLAN" ) ) ); - } - - -// --------------------------------------------------------- -// CApAccessPointItem::SetDnsIpFromServer -// --------------------------------------------------------- -// -void CApAccessPointItem::SetDnsIpFromServer() - { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::SetDnsIpFromServer" ) ) ); - - if ( ( iPrimaryDNS->Compare( KDynIpAddress ) == 0 ) && - ( iSecondaryDNS->Compare( KDynIpAddress ) == 0 ) ) - { - iGetDNSIPFromServer = ETrue; - } - else - { - iGetDNSIPFromServer = EFalse; - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::SetDnsIpFromServer" ) ) ); - } - - - -// --------------------------------------------------------- -// CApAccessPointItem::SetIpFromServer -// --------------------------------------------------------- -// -void CApAccessPointItem::SetIpFromServer() - { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::SetIpFromServer" ) ) ); - - if ( iIspIPAddr->Compare( KDynIpAddress ) == 0 ) - { - iIspIPAddrFromServer = ETrue; - } - else - { - iIspIPAddrFromServer = EFalse; - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::SetIpFromServer" ) ) ); - } - - - -// --------------------------------------------------------- -// CApAccessPointItem::SetDns6IpFromServer -// --------------------------------------------------------- -// -void CApAccessPointItem::SetDns6IpFromServer() - { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::SetDns6IpFromServer" ) ) ); - - if ( iExt->iIsIpv6Supported ) - { - if ( ( iExt->iIpv6PrimaryDNS->Compare( KDynIpv6Address ) == 0 ) && - ( iExt->iIpv6SecondaryDNS->Compare( KDynIpv6Address ) == 0 ) ) - { - - TApBearerType bt(EApBearerTypeGPRS); - TInt err(KErrNone); - TRAP( err, bt = BearerTypeL() ); - if ( err == KErrNone ) - { - switch (bt) - { - case EApBearerTypeCSD: - case EApBearerTypeHSCSD: - { // consider it user defined - iExt->iIpv6GetDNSIPFromServer = EFalse; - break; - } - default: - { - iExt->iIpv6GetDNSIPFromServer = ETrue; - break; - } - } - } - } - else - { - iExt->iIpv6GetDNSIPFromServer = EFalse; - } - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::SetDns6IpFromServer" ) ) ); - } - - -// --------------------------------------------------------- -// CApAccessPointItem::ReAllocL -// --------------------------------------------------------- -// -void CApAccessPointItem::ReAllocL(HBufC8*& aDes, const TDesC8& aValue) - { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::ReAllocL8" ) ) ); - - // now remove 'invalid' chars (TABs) as they cause problems - // in other places, like listboxes... - HBufC8* tmp = RemoveInvalidCharsLC( aValue ); - delete aDes; - aDes = tmp; - CleanupStack::Pop( tmp ); - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::ReAllocL8" ) ) ); - } - - -// --------------------------------------------------------- -// CApAccessPointItem::ReAllocL -// --------------------------------------------------------- -// -void CApAccessPointItem::ReAllocL(HBufC*& aDes, const TDesC16& aValue) - { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::ReAllocL" ) ) ); - - // now remove 'invalid' chars (TABs) as they cause problems - // in other places, like listboxes... - HBufC* tmp = RemoveInvalidCharsLC( aValue ); - delete aDes; - aDes = tmp; - CleanupStack::Pop( tmp ); - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::ReAllocL" ) ) ); - } - - - -// --------------------------------------------------------- -// CApAccessPointItem::DoCompareApL -// --------------------------------------------------------- -// -TBool CApAccessPointItem::DoCompareApL( const CApAccessPointItem& aItem )const - { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::DoCompareApL" ) ) ); - - TBool retval( EFalse ); - // sorry for those CONST_CASTS, but could not do it otherwise - // without API breask.... - CApAccessPointItem* thisitem = CONST_CAST( CApAccessPointItem*, this ); - CApAccessPointItem* otheritem = CONST_CAST( CApAccessPointItem*, &aItem ); - - TApBearerType thisbearer = thisitem->BearerTypeL(); - if ( thisbearer == otheritem->BearerTypeL() ) - { // if diff. bearers, compareing might give false results - // compare WAP: - // expect IAP ID - if ( CompareWap( aItem ) ) - { - switch ( thisbearer ) - { - case EApBearerTypeCSD: - case EApBearerTypeHSCSD: - { - // compare IAP - if ( CompareIap( aItem ) ) - { - // compare ISP - if ( CompareIsp( aItem ) ) - { - if ( CompareProxy( aItem ) ) - { - retval = ETrue; - } - } - } - break; - } - case EApBearerTypeGPRS: - { - // compare IAP - if ( CompareIap( aItem ) ) - { - // comapre GPRS - if ( CompareGprs( aItem ) ) - { - if ( CompareProxy( aItem ) ) - { - retval = ETrue; - } - } - } - break; - } - case EApBearerTypeCDMA: - { - // compare IAP - if ( CompareIap( aItem ) ) - { - // comapre CDMA - if ( CompareCdma( aItem ) ) - { - if ( CompareProxy( aItem ) ) - { - retval = ETrue; - } - } - } - break; - } - case EApBearerTypeWLAN: - { - if ( iExt->iWlanData ) - { - // Compare Iap - if ( CompareIap( aItem ) ) - { - // Check compareing for WLAN and LAN!!! - // Compare WLAN - if ( CompareWlan( aItem ) ) - { - if ( CompareProxy( aItem ) ) - { - retval = ETrue; - } - } - } - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - default: - { - // KErrInvalidBearer, but can not Leave here, - // so just return False - // retval is already False, nothing to do - break; - } - } - } - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::DoCompareApL" ) ) ); - return retval; - } - - - -// --------------------------------------------------------- -// CApAccessPointItem::CompareWap -// --------------------------------------------------------- -// -TBool CApAccessPointItem::CompareWap( const CApAccessPointItem& aItem ) const - { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::CompareWap" ) ) ); - - TBool retval( EFalse ); -// WAP AP Table -/* -WAP_CURRENT_BEARER -WAP_START_PAGE -*/ - -// WAP IP Bearer Table -/* - -- WAP_ACCESS_POINT_ID -WAP_GATEWAY_ADDRESS - -- WAP_IAP - -- WAP_ISP - -- WAP_CHARGECARD -WAP_ISP_TYPE -WAP_WSP_OPTION -WAP_SECURITY -*/ - - if ( BOOL_COMPARE( iIsWTLSSecurityOn, aItem.iIsWTLSSecurityOn ) - && ( iIsConnectionTypeContinuous == aItem.iIsConnectionTypeContinuous ) - ) - { - if ( - ( iWapAccessPointName->Compare( *aItem.iWapAccessPointName ) == 0 ) - && ( iWapBearer->Compare( *aItem.iWapBearer ) == 0 ) - && ( iStartingPage->Compare( *aItem.iStartingPage ) == 0 ) - && ( iWapGatewayAddress->Compare( *aItem.iWapGatewayAddress ) == 0 ) - && ( iWapProxyLoginName->Compare( - *aItem.iWapProxyLoginName ) == 0 ) - && ( iWapProxyLoginPass->Compare( - *aItem.iWapProxyLoginPass ) == 0 ) - ) - { - retval = ETrue; - } - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::CompareWap" ) ) ); - return retval; - } - - - -// --------------------------------------------------------- -// CApAccessPointItem::CompareIap -// --------------------------------------------------------- -// -TBool CApAccessPointItem::CompareIap( const CApAccessPointItem& aItem ) const - { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::CompareIap" ) ) ); - - TBool retval( EFalse ); -// WAP IAP Table -/* -COMMDB_NAME --- IAP_SERVICE _S("IAPService") -IAP_SERVICE_TYPE _S("IAPServiceType") --- IAP_CHARGECARD _S("Chargecard") -*/ - if ( - ( iIapName->Compare( *aItem.iIapName ) == 0 ) - && ( iIapServiceType->Compare( *aItem.iIapServiceType ) == 0 ) - && ( iNetworkName->Compare( *aItem.iNetworkName ) == 0 ) - && ( iNetworkId == aItem.iNetworkId ) - ) - { - retval = ETrue; - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::CompareIap" ) ) ); - return retval; - } - - - - -// --------------------------------------------------------- -// CApAccessPointItem::CompareIsp -// --------------------------------------------------------- -// -TBool CApAccessPointItem::CompareIsp( const CApAccessPointItem& aItem ) const - { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::CompareIsp" ) ) ); - - TBool retval( EFalse ); - if ( - BOOL_COMPARE( iIspDialResolution , aItem.iIspDialResolution ) - && BOOL_COMPARE( iUseLoginScript, aItem.iUseLoginScript ) - && BOOL_COMPARE( iPromptPassword, aItem.iPromptPassword ) - && BOOL_COMPARE( iDisplayTerminalWindow, aItem.iDisplayTerminalWindow ) - && BOOL_COMPARE( iIspIfPromptForAuth, aItem.iIspIfPromptForAuth ) - && iIspIfAuthRetries == aItem.iIspIfAuthRetries - && BOOL_COMPARE( iUseCallBack, aItem.iUseCallBack ) - && iCallBackTypeIsServerNum == aItem.iCallBackTypeIsServerNum - && iIspCallbackTimeOut == aItem.iIspCallbackTimeOut - && BOOL_COMPARE( iIspIPAddrFromServer, aItem.iIspIPAddrFromServer ) - && BOOL_COMPARE( iGetDNSIPFromServer, aItem.iGetDNSIPFromServer ) - && BOOL_COMPARE( iEnablePPPCompression, aItem.iEnablePPPCompression ) - && BOOL_COMPARE( iIspEnableLCPExtensions, - aItem.iIspEnableLCPExtensions ) - && BOOL_COMPARE( iIsPasswordAuthenticationSecure, - aItem.iIsPasswordAuthenticationSecure ) - && BOOL_COMPARE( iIspEnableSwCompression, - aItem.iIspEnableSwCompression ) - && iIspBearerName == aItem.iIspBearerName - && iMaxConnSpeed == aItem.iMaxConnSpeed - && iIspBearerCE == aItem.iIspBearerCE - && iApIapBearerService == aItem.iApIapBearerService - && iIspBearerType == aItem.iIspBearerType - && iBearerCallTypeIsdn == aItem.iBearerCallTypeIsdn - && iIspChannelCoding == aItem.iIspChannelCoding - && iIspAIUR == aItem.iIspAIUR - && iIspRequestedTimeSlots == aItem.iIspRequestedTimeSlots - && iIspMaximumTimeSlots == aItem.iIspMaximumTimeSlots - && ( - ( iExt->iIsIpv6Supported - && ( BOOL_COMPARE( iExt->iIpv6GetDNSIPFromServer, - aItem.iExt->iIpv6GetDNSIPFromServer ) ) ) - || !iExt->iIsIpv6Supported ) - ) - { - if ( - ( iIspName->Compare( *aItem.iIspName ) == 0 ) - && ( iIspDescription->Compare( *aItem.iIspDescription ) == 0 ) - && - ( iIspDefaultTelNumber->Compare( - *aItem.iIspDefaultTelNumber ) == 0 ) - && ( iLoginScript->Compare( *aItem.iLoginScript ) == 0 ) - && ( iUserName->Compare( *aItem.iUserName ) == 0 ) - && ( iPassword->Compare( *aItem.iPassword ) == 0 ) - && ( iIspIfName->Compare( *aItem.iIspIfName ) == 0 ) - && ( iIspIfParams->Compare( *aItem.iIspIfParams ) == 0 ) - && ( iIspIfNetworks->Compare( *aItem.iIspIfNetworks ) == 0 ) - && ( iIspIfAuthName->Compare( *aItem.iIspIfAuthName ) == 0 ) - && ( iIspIfAuthPass->Compare( *aItem.iIspIfAuthPass ) == 0 ) - && - ( iIspIfCallbackInfo->Compare( *aItem.iIspIfCallbackInfo ) == 0 ) - && ( iIspIPAddr->Compare( *aItem.iIspIPAddr ) == 0 ) - && ( iIspIPNetMask->Compare( *aItem.iIspIPNetMask ) == 0 ) - && ( iIspGateway->Compare( *aItem.iIspGateway ) == 0 ) - && ( iPrimaryDNS->Compare( *aItem.iPrimaryDNS ) == 0 ) - && ( iSecondaryDNS->Compare( *aItem.iSecondaryDNS ) == 0 ) - && ( iIspInitString->Compare( *aItem.iIspInitString ) == 0 ) - && ( - ( iExt->iIsIpv6Supported && - ( - ( iExt->iIpv6PrimaryDNS->Compare( - *aItem.iExt->iIpv6PrimaryDNS ) == 0 ) - && - ( iExt->iIpv6SecondaryDNS->Compare( - *aItem.iExt->iIpv6SecondaryDNS ) == 0 ) - ) - || !iExt->iIsIpv6Supported ) - ) - ) - { - retval = ETrue; - } - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::CompareIsp" ) ) ); - return retval; - } - - - - -// --------------------------------------------------------- -// CApAccessPointItem::CompareGprs -// --------------------------------------------------------- -// -TBool CApAccessPointItem::CompareGprs( const CApAccessPointItem& aItem ) const - { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::CompareGprs" ) ) ); - - TBool retval( EFalse ); - - if ( - iGprsPdpType == aItem.iGprsPdpType -// - && BOOL_COMPARE( iIspIfPromptForAuth, aItem.iIspIfPromptForAuth ) - && iIspIfAuthRetries == aItem.iIspIfAuthRetries - && BOOL_COMPARE( iIspIPAddrFromServer, aItem.iIspIPAddrFromServer ) - && BOOL_COMPARE( iGetDNSIPFromServer, aItem.iGetDNSIPFromServer ) - && BOOL_COMPARE( iEnablePPPCompression, aItem.iEnablePPPCompression ) - && BOOL_COMPARE( iIspEnableLCPExtensions, - aItem.iIspEnableLCPExtensions ) - && BOOL_COMPARE( iIsPasswordAuthenticationSecure, - aItem.iIsPasswordAuthenticationSecure ) - && BOOL_COMPARE( iIspEnableSwCompression, - aItem.iIspEnableSwCompression ) -// - && iGprsReqPrecedence == aItem.iGprsReqPrecedence - && iGprsReqDelay == aItem.iGprsReqDelay - && iGprsReqReliability == aItem.iGprsReqReliability - && iGprsReqPeakThroughput == aItem.iGprsReqPeakThroughput - && iGprsReqMeanPeakThroughput == aItem.iGprsReqMeanPeakThroughput - && iGprsMinPrecedence == aItem.iGprsMinPrecedence - && iGprsMinDelay == aItem.iGprsMinDelay - && iGprsMinReliability == aItem.iGprsMinReliability - && iGprsMinPeakThroughput == aItem.iGprsMinPeakThroughput - && iGprsMinMeanThroughput == aItem.iGprsMinMeanThroughput - && BOOL_COMPARE( iGprsUseAnonymAccess, aItem.iGprsUseAnonymAccess ) - && ( - ( iExt->iIsIpv6Supported - && (BOOL_COMPARE( iExt->iIpv6GetDNSIPFromServer, - aItem.iExt->iIpv6GetDNSIPFromServer ) ) ) - || ( !iExt->iIsIpv6Supported ) ) - ) - { - if ( - ( iGprsAccessPointName->Compare( - *aItem.iGprsAccessPointName ) == 0 ) -// - && ( iIspIfName->Compare( *aItem.iIspIfName ) == 0 ) - && ( iIspIfParams->Compare( *aItem.iIspIfParams ) == 0 ) - && ( iIspIfNetworks->Compare( *aItem.iIspIfNetworks ) == 0 ) - && ( iIspIfAuthName->Compare( *aItem.iIspIfAuthName ) == 0 ) - && ( iIspIfAuthPass->Compare( *aItem.iIspIfAuthPass ) == 0 ) - && ( iIspIPAddr->Compare( *aItem.iIspIPAddr ) == 0 ) - && ( iIspIPNetMask->Compare( *aItem.iIspIPNetMask ) == 0 ) - && ( iIspGateway->Compare( *aItem.iIspGateway ) == 0 ) - && ( iPrimaryDNS->Compare( *aItem.iPrimaryDNS ) == 0 ) - && ( iSecondaryDNS->Compare( *aItem.iSecondaryDNS ) == 0 ) -// - && ( iGprsPdpAddress->Compare( *aItem.iGprsPdpAddress ) == 0 ) - && ( - ( iExt->iIsIpv6Supported && - ( - ( iExt->iIpv6PrimaryDNS->Compare( - *aItem.iExt->iIpv6PrimaryDNS ) == 0 ) - && - ( iExt->iIpv6SecondaryDNS->Compare( - *aItem.iExt->iIpv6SecondaryDNS ) == 0 ) - ) - || !iExt->iIsIpv6Supported ) - ) - ) - { - retval = ETrue; - } - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::CompareGprs" ) ) ); - return retval; - } - - - -// --------------------------------------------------------- -// CApAccessPointItem::CompareCdma -// --------------------------------------------------------- -// -TBool CApAccessPointItem::CompareCdma( const CApAccessPointItem& aItem ) const - { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::CompareCdma" ) ) ); - - TBool retval( EFalse ); - - __ASSERT_ALWAYS( iExt->iCdmaData, ApCommons::Panic( ESanityCheckFailed ) ); - - if ( - iExt->iCdmaData->iServiceOption == - aItem.iExt->iCdmaData->iServiceOption - && iExt->iCdmaData->iPdpType == aItem.iExt->iCdmaData->iPdpType - && iExt->iCdmaData->iReqFwdPriority == - aItem.iExt->iCdmaData->iReqFwdPriority - && iExt->iCdmaData->iReqRevPriority == - aItem.iExt->iCdmaData->iReqRevPriority - && iExt->iCdmaData->iReqFwdBitrate == - aItem.iExt->iCdmaData->iReqFwdBitrate - && iExt->iCdmaData->iReqRevBitrate == - aItem.iExt->iCdmaData->iReqRevBitrate - && iExt->iCdmaData->iReqFwdLoss == aItem.iExt->iCdmaData->iReqFwdLoss - && iExt->iCdmaData->iReqRevLoss == aItem.iExt->iCdmaData->iReqRevLoss - && iExt->iCdmaData->iReqFwdMaxDelay == - aItem.iExt->iCdmaData->iReqFwdMaxDelay - && iExt->iCdmaData->iReqRevMaxDelay == - aItem.iExt->iCdmaData->iReqRevMaxDelay - && iExt->iCdmaData->iMinFwdBitrate == - aItem.iExt->iCdmaData->iMinFwdBitrate - && iExt->iCdmaData->iMinRevBitrate == - aItem.iExt->iCdmaData->iMinRevBitrate - && iExt->iCdmaData->iAccptFwdLoss == - aItem.iExt->iCdmaData->iAccptFwdLoss - && iExt->iCdmaData->iAccptRevLoss == - aItem.iExt->iCdmaData->iAccptRevLoss - && iExt->iCdmaData->iAccptFwdMaxDelay == - aItem.iExt->iCdmaData->iAccptFwdMaxDelay - && iExt->iCdmaData->iAccptRevMaxDelay == - aItem.iExt->iCdmaData->iAccptRevMaxDelay -// - && BOOL_COMPARE( iIspIfPromptForAuth, aItem.iIspIfPromptForAuth ) - && iIspIfAuthRetries == aItem.iIspIfAuthRetries - && BOOL_COMPARE( iIspIPAddrFromServer, aItem.iIspIPAddrFromServer ) - && BOOL_COMPARE( iGetDNSIPFromServer, aItem.iGetDNSIPFromServer ) - && BOOL_COMPARE( iEnablePPPCompression, aItem.iEnablePPPCompression ) - && BOOL_COMPARE( iIspEnableLCPExtensions, - aItem.iIspEnableLCPExtensions ) - && BOOL_COMPARE( iIsPasswordAuthenticationSecure, - aItem.iIsPasswordAuthenticationSecure ) - && BOOL_COMPARE( iIspEnableSwCompression, - aItem.iIspEnableSwCompression ) -// - && iIspType == aItem.iIspType - && iExt->iCdmaData->iQosWarningTimeout == - aItem.iExt->iCdmaData->iQosWarningTimeout - && iExt->iCdmaData->iRlpMode == aItem.iExt->iCdmaData->iRlpMode - && BOOL_COMPARE( iExt->iCdmaData->iMip, aItem.iExt->iCdmaData->iMip ) - && iExt->iCdmaData->iMipTimeout == aItem.iExt->iCdmaData->iMipTimeout - && iExt->iCdmaData->iNaiType == aItem.iExt->iCdmaData->iNaiType - && iExt->iCdmaData->iSimpleIpAuthAlgorithm == - aItem.iExt->iCdmaData->iSimpleIpAuthAlgorithm - && iExt->iCdmaData->iSimpleIpPapSsHandle == - aItem.iExt->iCdmaData->iSimpleIpPapSsHandle - && iExt->iCdmaData->iSimpleIpChapSsHandle == - aItem.iExt->iCdmaData->iSimpleIpChapSsHandle - && iExt->iCdmaData->iMipTBit == aItem.iExt->iCdmaData->iMipTBit - && iExt->iCdmaData->iMipMnAaaAuthAlgorithm == - aItem.iExt->iCdmaData->iMipMnAaaAuthAlgorithm - && iExt->iCdmaData->iMipMnAaaSpi == - aItem.iExt->iCdmaData->iMipMnAaaSpi - && iExt->iCdmaData->iMipMnAaaSsHandle == - aItem.iExt->iCdmaData->iMipMnAaaSsHandle - && iExt->iCdmaData->iMipMnHaAuthAlgorithm == - aItem.iExt->iCdmaData->iMipMnHaAuthAlgorithm - && iExt->iCdmaData->iMipMnHaSpi == aItem.iExt->iCdmaData->iMipMnHaSpi - && iExt->iCdmaData->iMipMnHaSsHandle == - aItem.iExt->iCdmaData->iMipMnHaSsHandle -// - && BOOL_COMPARE( iGprsUseAnonymAccess, aItem.iGprsUseAnonymAccess ) - && ( - ( iExt->iIsIpv6Supported - && ( BOOL_COMPARE( iExt->iIpv6GetDNSIPFromServer, - aItem.iExt->iIpv6GetDNSIPFromServer ) ) ) - || ( !iExt->iIsIpv6Supported ) ) - ) - { - if ( - ( iExt->iCdmaData->iIwfName->Compare( - *aItem.iExt->iCdmaData->iIwfName ) == 0 ) - && ( iExt->iCdmaData->iPdpAddress->Compare( - *aItem.iExt->iCdmaData->iPdpAddress ) == 0 ) - && ( iExt->iCdmaData->iHomeAgentAddress->Compare( - *aItem.iExt->iCdmaData->iHomeAgentAddress ) == 0 ) - && ( iExt->iCdmaData->iMipHomeAddress->Compare( - *aItem.iExt->iCdmaData->iMipHomeAddress ) == 0 ) - && ( iExt->iCdmaData->iMipPrimaryHomeAgent->Compare( - *aItem.iExt->iCdmaData->iMipPrimaryHomeAgent ) == 0 ) - && ( iExt->iCdmaData->iMipSecondaryHomeAgent->Compare( - *aItem.iExt->iCdmaData->iMipSecondaryHomeAgent ) == 0 ) -// - && ( iIspIfName->Compare( *aItem.iIspIfName ) == 0 ) - && ( iIspIfParams->Compare( *aItem.iIspIfParams ) == 0 ) - && ( iIspIfNetworks->Compare( *aItem.iIspIfNetworks ) == 0 ) - && ( iIspIfAuthName->Compare( *aItem.iIspIfAuthName ) == 0 ) - && ( iIspIfAuthPass->Compare( *aItem.iIspIfAuthPass ) == 0 ) - && ( iIspIPAddr->Compare( *aItem.iIspIPAddr ) == 0 ) - && ( iIspIPNetMask->Compare( *aItem.iIspIPNetMask ) == 0 ) - && ( iIspGateway->Compare( *aItem.iIspGateway ) == 0 ) - && ( iPrimaryDNS->Compare( *aItem.iPrimaryDNS ) == 0 ) - && ( iSecondaryDNS->Compare( *aItem.iSecondaryDNS ) == 0 ) -// - && ( - ( iExt->iIsIpv6Supported && - ( - ( iExt->iIpv6PrimaryDNS->Compare( - *aItem.iExt->iIpv6PrimaryDNS ) == 0 ) - && - ( iExt->iIpv6SecondaryDNS->Compare( - *aItem.iExt->iIpv6SecondaryDNS ) == 0 ) - ) - || !iExt->iIsIpv6Supported ) - ) - ) - { - retval = ETrue; - } - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::CompareCdma" ) ) ); - return retval; - } - - - -// --------------------------------------------------------- -// CApAccessPointItem::CompareWlan -// --------------------------------------------------------- -// -TBool CApAccessPointItem::CompareWlan( const CApAccessPointItem& aItem ) const - { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::CompareWlan" ) ) ); - - TBool retval( EFalse ); - - __ASSERT_ALWAYS( iExt->iWlanData, ApCommons::Panic( ESanityCheckFailed ) ); - __ASSERT_ALWAYS( aItem.iExt->iWlanData, - ApCommons::Panic( ESanityCheckFailed ) ); - - if ( - iExt->iWlanData->iWlanNetworkMode == - aItem.iExt->iWlanData->iWlanNetworkMode - && iExt->iWlanData->iScanSSID == aItem.iExt->iWlanData->iScanSSID - && iExt->iWlanData->iWlanSecurityMode == - aItem.iExt->iWlanData->iWlanSecurityMode - && iExt->iWlanData->iChannelId == - aItem.iExt->iWlanData->iChannelId - && BOOL_COMPARE( iGetDNSIPFromServer, aItem.iGetDNSIPFromServer ) - ) - { - if ( ( iExt->iWlanData->iWlanNetworkName->Compare( - *aItem.iExt->iWlanData->iWlanNetworkName ) == 0 ) - && ( iIspIPAddr->Compare( *aItem.iIspIPAddr ) == 0 ) - && ( iIspIPNetMask->Compare( *aItem.iIspIPNetMask ) == 0 ) - && ( iIspGateway->Compare( *aItem.iIspGateway ) == 0 ) - && ( iPrimaryDNS->Compare( *aItem.iPrimaryDNS ) == 0 ) - && ( iSecondaryDNS->Compare( *aItem.iSecondaryDNS ) == 0 ) -// Check if AuthName is needed or not -// && ( iIspIfAuthName->Compare( *aItem.iIspIfAuthName ) == 0 ) - ) - { - retval = ETrue; - } - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::CompareWlan" ) ) ); - return retval; - } - - -// --------------------------------------------------------- -// CApAccessPointItem::GetCleanIpAddressLC -// --------------------------------------------------------- -// -HBufC* CApAccessPointItem::GetCleanIpAddressLC( const TDesC& aValue ) - { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::GetCleanIpAddressLC" ) ) ); - - TBuf<256> buf; - TInetAddr in; - User::LeaveIfError( in.Input( aValue ) ); - in.Output( buf ); - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::GetCleanIpAddressLC" ) ) ); - return buf.AllocLC(); - } - - - -// --------------------------------------------------------- -// CApAccessPointItem::GetPlainPhoneNumberLC -// --------------------------------------------------------- -// -HBufC* CApAccessPointItem::GetPlainPhoneNumberLC( const TDesC& aNumber ) - { - CLOG( ( EApItem, 0, - _L( "-> CApAccessPointItem::GetPlainPhoneNumberLC" ) ) ); - - // Removes invalid chars e.g. space, () from the passed phone number. - // (valid are 0,1,2,..9,p,w,+,*,#) - // Strips pre- and postfixes, prefix separator is#, - // postfix separators are p, w or + - HBufC* retval = NULL; - - HBufC* numbuf = RemoveInvalidPhoneCharsLC( aNumber ); - TPtr16 num( numbuf->Des() ); - - TInt prefixpos( 0 ); - TInt postfixpos( 0 ); - TInt lasthashmark = num.LocateReverse('#'); - if ( lasthashmark != KErrNotFound ) - { // has prefix - prefixpos = ++lasthashmark; - } - else - { // no prefix - prefixpos = 0; - } - // now get postfixes, if any - // be carefull not to say postfix for the international code... - // as can be more than one postfix, get each postfix-separator type's - // position and use the lowest one - TInt ppos( 0 ); - TInt wpos( 0 ); - TInt pluspos( 0 ); - TInt tmppos( 0 ); - - tmppos = num.Locate( '+' ); - if ( tmppos != KErrNotFound ) - { - pluspos = tmppos; - if ( tmppos == 0 ) - { // possibly country code comes, get next if any - // also inc. prefixpos - prefixpos++; - num = num.Right( num.Length() - 1 ); - tmppos = num.Locate( '+' ); - if ( tmppos != KErrNotFound ) - { - tmppos = pluspos; - } - } - } - - tmppos = num.Locate( 'p' ); - if ( tmppos != KErrNotFound ) - { - ppos = tmppos; - num = num.Left( num.Length() - ppos ); - } - tmppos = num.LocateReverse( 'w' ); - if ( tmppos != KErrNotFound ) - { - wpos = tmppos; - num = num.Left( num.Length() - wpos ); - } - // now we have 3 positions, - // decide which is the smallest but greater than 0 - // if all is 0, it is 0... - if ( wpos ) - { - postfixpos = wpos; - } - else - { - if ( ppos ) - { - postfixpos = ppos; - } - else - { - if ( pluspos ) - { - postfixpos = pluspos; - } - } - } - // now we have pre- and postfix positions, get the resulting string - if ( postfixpos == 0 ) - { - postfixpos = aNumber.Length(); - } - retval = aNumber.Mid( prefixpos, postfixpos-prefixpos ).AllocLC(); - CleanupStack::Pop( retval ); // retval - CleanupStack::PopAndDestroy( numbuf ); // numbuf - CleanupStack::PushL( retval ); - - CLOG( ( EApItem, 1, - _L( "<- CApAccessPointItem::GetPlainPhoneNumberLC" ) ) ); - return retval; - } - - - - - -// --------------------------------------------------------- -// CApAccessPointItem::IsSamePhoneNumber -// --------------------------------------------------------- -// -TBool CApAccessPointItem::IsSamePhoneNumberL( CApAccessPointItem& aItem ) - { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::IsSamePhoneNumberL" ) ) ); - - TBool retval( EFalse ); - - HBufC* tmpphone = - HBufC::NewLC( aItem.ReadTextLengthL( EApIspDefaultTelNumber ) ); - TPtr16 tmpptr( tmpphone->Des() ); - aItem.ReadTextL( EApIspDefaultTelNumber, tmpptr ); - - HBufC* ph1 = GetPlainPhoneNumberLC( *iIspDefaultTelNumber ); - HBufC* ph2 = GetPlainPhoneNumberLC( tmpptr ); - TInt cl ( 7 ); - cl = Min( cl, ph1->Length() ); - cl = Min( cl, ph2->Length() ); - TPtrC16 ptr1 = ph1->Right( cl ); - TPtrC16 ptr2 = ph2->Right( cl ); - if ( ptr1.Compare( ptr2 ) == 0 ) - { - retval = ETrue; - } - CleanupStack::PopAndDestroy( 3, tmpphone ); // ph1, ph2, tmpphone - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::IsSamePhoneNumberL" ) ) ); - return retval; - } - - - -// --------------------------------------------------------- -// CApAccessPointItem::RemoveInvalidPhoneCharsLC -// --------------------------------------------------------- -// -HBufC* CApAccessPointItem::RemoveInvalidPhoneCharsLC( const TDesC16& aInText ) - { - CLOG( ( EApItem, 0, - _L( "-> CApAccessPointItem::RemoveInvalidPhoneCharsLC" ) ) ); - - // valid are 0,1,2,..9,p,w,+,*,# - TInt size = aInText.Length(); - HBufC* aOutText = HBufC::NewLC( size ); - TPtr ptr = aOutText->Des(); - - for(TInt i = 0; i< size; i++) - { - //TText ch = aInText[i]; - TChar ch = aInText[i]; - if ( ( ch == 'p' ) || ( ch == 'P' ) || ( ch == 'W' ) || ( ch == 'W' ) - || ( ch == '+' ) || ( ch == '0' ) || ( ch == '1' ) || ( ch == '2' ) - || ( ch == '3' ) || ( ch == '4' ) || ( ch == '5' ) || ( ch == '6' ) - || ( ch == '7' ) || ( ch == '8' ) || ( ch == '9' ) || ( ch == '*' ) - || ( ch == '#' ) - ) - { - ptr.Append( ch ); - } - } - - CLOG( ( EApItem, 1, - _L( "<- CApAccessPointItem::RemoveInvalidPhoneCharsLC" ) ) ); - return aOutText; - } - - - -// --------------------------------------------------------- -// CApAccessPointItem::RemoveInvalidCharsLC -// --------------------------------------------------------- -// -HBufC* CApAccessPointItem::RemoveInvalidCharsLC( const TDesC16& aInText ) - { - CLOG( ( EApItem, 0, - _L( "-> CApAccessPointItem::RemoveInvalidCharsLC" ) ) ); - - TInt size = aInText.Length(); - HBufC* aOutText = HBufC::NewLC( size ); - TPtr ptr = aOutText->Des(); - - for ( TInt ii=0; ii CApAccessPointItem::RemoveInvalidCharsLC8" ) ) ); - - TInt size = aInText.Length(); - HBufC8* aOutText = HBufC8::NewLC( size ); - TPtr8 ptr = aOutText->Des(); - - for ( TInt ii=0; ii CApAccessPointItem::CompareProxy" ) ) ); - - TBool retval( EFalse ); - if ( BOOL_COMPARE( iApHasProxySettings, aItem.iApHasProxySettings ) - && iApProxyPortNumber == aItem.iApProxyPortNumber - && BOOL_COMPARE( iApProxyUseProxy, iApProxyUseProxy ) - && ( iApProxyProtocolName->Compare( - *aItem.iApProxyProtocolName ) == 0 ) - && ( iApProxyServerAddress->Compare( - *aItem.iApProxyServerAddress ) == 0 ) - && ( iApProxyExceptions->Compare( *aItem.iApProxyExceptions ) == 0 ) ) - { - retval = ETrue; - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::CompareProxy" ) ) ); - return retval; - } - - -// --------------------------------------------------------- -// CApAccessPointItem::HasProxy -// --------------------------------------------------------- -// -TBool CApAccessPointItem::HasProxy() const - { - CLOG( ( EApItem, 0, _L( "<-> CApAccessPointItem::HasProxy" ) ) ); - - return iApHasProxySettings; - } - - - -// --------------------------------------------------------- -// CApAccessPointItem::SetProxyFlag -// --------------------------------------------------------- -// -void CApAccessPointItem::SetProxyFlag() - { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::SetProxyFlag" ) ) ); - - if ( ( iApProxyServerAddress->Compare( KDynIpAddress ) - && iApProxyServerAddress->Compare( KEmpty ) ) - || ( iApProxyPortNumber != 0 ) ) - { - iApHasProxySettings = ETrue; - } - else - { - iApHasProxySettings = EFalse; - } - // BY DEFAULT, as it is not accessible on the UI, - // we set the USE PROXY flag if ANY proxy setting is defined... - iApProxyUseProxy = iApHasProxySettings; - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::SetProxyFlag" ) ) ); - } - - - - -//---------------------------------------------------------- -// CApAccessPointItem::LimitSpeed -//---------------------------------------------------------- -// -void CApAccessPointItem::LimitSpeedL() - { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::LimitSpeedL" ) ) ); - - TBool isWcdma = iExt->iIsWcdma; - TApBearerType bearer = BearerTypeL(); - const TInt* actSpeeds = NULL; - switch ( bearer ) - { - case EApBearerTypeCSD: - { - switch ( iBearerCallTypeIsdn ) - { - case ECallTypeISDNv110: - { - isWcdma ? actSpeeds = KCsdIsdn110Wcdma : - actSpeeds = KCsdIsdn110; - break; - } - case ECallTypeISDNv120: - { - isWcdma ? actSpeeds = KCsdIsdn120Wcdma : - actSpeeds = KCsdIsdn120; - break; - } - case ECallTypeAnalogue: - default: - { - isWcdma ? actSpeeds = KCsdAnalogueWcdma : - actSpeeds = KCsdAnalogue; - break; - } - } - break; - } - case EApBearerTypeHSCSD: - { - switch ( iBearerCallTypeIsdn ) - { - case ECallTypeISDNv110: - { - actSpeeds = KHcsdIsdn110; - break; - } - case ECallTypeISDNv120: - { - actSpeeds = KHcsdIsdn120; - break; - } - case ECallTypeAnalogue: - default: - { - actSpeeds = KHcsdAnal; - break; - } - } - break; - } - default: - { - break; - } - } - - - if( actSpeeds ) - { - TInt tempSpeed = *actSpeeds; - TInt nextSpeed = *( actSpeeds + 1); - while ( ( nextSpeed != KEndOfArray ) - && ( tempSpeed < ( TInt )iMaxConnSpeed ) - && ( nextSpeed <= ( TInt )iMaxConnSpeed ) ) - { - tempSpeed = *( ++actSpeeds ); - nextSpeed = *( actSpeeds + 1); - } - iMaxConnSpeed = ( TApCallSpeed )tempSpeed ; - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::LimitSpeedL" ) ) ); - } - - - -//---------------------------------------------------------- -// CApAccessPointItem::SetIfNetworksL -//---------------------------------------------------------- -// -void CApAccessPointItem::SetIfNetworksL() - { - // Check if Wlan affects this one!!! - // Check if Lan affects this one!!! - TApBearerType bearertype = BearerTypeL(); - if ( iExt->iIsIpv6Supported ) - { - if ( bearertype == EApBearerTypeGPRS ) - { - if ( iGprsPdpType == EIPv6 ) - { - WriteTextL( EApIspIfNetworks, KDefIspIfNetworksIPv6 ); - } - else - { - WriteTextL( EApIspIfNetworks, KDefIspIfNetworksIPv4 ); - } - } - else if ( bearertype == EApBearerTypeCDMA ) - { - __ASSERT_ALWAYS( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - if ( iExt->iCdmaData->iPdpType == EIPv6 ) - { - WriteTextL( EApIspIfNetworks, KDefIspIfNetworksIPv6 ); - } - else - { - WriteTextL( EApIspIfNetworks, KDefIspIfNetworksIPv4 ); - } - } - else - { -#ifdef __TEST_LAN_BEARER - if ( bearertype == EApBearerTypeLAN ) - { - WriteTextL( EApIspIfNetworks, KDefIspIfNetworksIPv4IPv6LAN ); - } -#endif// __TEST_LAN_BEARER - if ( ( bearertype == EApBearerTypeWLAN ) - || ( bearertype == EApBearerTypeLANModem ) ) - { - WriteTextL( EApIspIfNetworks, KDefIspIfNetworksIPv4IPv6LAN ); - } - else - { // CSD, HSCSD - WriteTextL( EApIspIfNetworks, KDefIspIfNetworksIPv4IPv6 ); - } - } - } - else - { - WriteTextL( EApIspIfNetworks, KDefIspIfNetworksIPv4 ); - } - } - - -//---------------------------------------------------------- -// CApAccessPointItem::IsSupported -//---------------------------------------------------------- -// -TBool CApAccessPointItem::IsSupported( TApMember aColumn ) - { - TBool ret( ETrue ); - - switch ( aColumn ) - { - case EApCdmaIwfName: - case EApCdmaServiceOption: - case EApCdmaPdpType: - case EApCdmaPdpAddress: - case EApCdmaReqFwdPriority: - case EApCdmaReqRevPriority: - case EApCdmaReqFwdBitrate: - case EApCdmaReqRevBitrate: - case EApCdmaReqFwdLoss: - case EApCdmaReqRevLoss: - case EApCdmaReqFwdMaxDelay: - case EApCdmaReqRevMaxDelay: - case EApCdmaMinFwdBitrate: - case EApCdmaMinRevBitrate: - case EApCdmaAccptFwdLoss: - case EApCdmaAccptRevLoss: - case EApCdmaAccptFwdMaxDelay: - case EApCdmaAccptRevMaxDelay: - case EApCdmaDataCompression: - case EApCdmaHeaderCompression: - case EApCdmaAnonymousAccess: - case EApCdmaIfName: - case EApCdmaIfParams: - case EApCdmaIfNetworks: - case EApCdmaIfPromptForAuth: - case EApCdmaIfAuthName: - case EApCdmaIfAuthPassword: - case EApCdmaIfAuthRetries: - case EApCdmaIpNetMask: - case EApCdmaIpGateway: - case EApCdmaIpAddrFromServer: - case EApCdmaIpAddr: - case EApCdmaIpDnsAddrFromServer: - case EApCdmaIPNameServer1: - case EApCdmaIPNameServer2: - case EApCdmaEnableLCPExtensions: - case EApCdmaDisablePlainTextAuth: - case EApCdmaApType: - case EApCdmaQosWarningTimeout: - case EApCdmaRlpMode: - case EApCdmaMip: - case EApCdmaHomeAgentAddress: - case EApCdmaMipTimeout: - case EApCdmaNaiType: - case EApCdmaSimpleIpAuthAlgorithm: - case EApCdmaSimpleIpPapSsHandle: - case EApCdmaSimpleIpChapSsHandle: - case EApCdmaMipTBit: - case EApCdmaMipHomeAddress: - case EApCdmaMipPrimaryHomeAgent: - case EApCdmaMipSecondaryHomeAgent: - case EApCdmaMipMnAaaAuthAlgorithm: - case EApCdmaMipMnAaaSpi: - case EApCdmaMipMnAaaSsHandle: - case EApCdmaMipMnHaAuthAlgorithm: - case EApCdmaMipMnHaSpi: - case EApCdmaMipMnHaSsHandle: - { - ret = iExt->iCdmaData != NULL; - break; - } - case EApWlanNetworkName: - case EApWlanNetworkMode: - case EApWlanSecurityMode: - case EApWlanScanSSID: - case EApWlanChannelId: - { - ret = iExt->iWlanData != NULL; - break; - } - - default: - { - break; - } - } - - return ret; - } - -//---------------------------------------------------------- -// CApAccessPointItem::LeaveIfUnsupportedL -//---------------------------------------------------------- -// -void CApAccessPointItem::LeaveIfUnsupportedL( TApMember aColumn ) - { - if( !IsSupported( aColumn ) ) - { - User::Leave( KErrNotSupported ); - } - } - - - - -//---------------------------------------------------------- -// CApAccessPointItem::IsWlan -//---------------------------------------------------------- -// -TBool CApAccessPointItem::IsWlan() - { - TBool retval( EFalse ); - if ( iExt->iWlanData ) - { - retval = iExt->iWlanData->iIsWlan; - } - return retval; - } - - -//---------------------------------------------------------- -// CApAccessPointItem::LimitIp6DNSL -//---------------------------------------------------------- -// -void CApAccessPointItem::LimitIp6DNSL() - { - if ( iExt->iIsIpv6Supported ) - { - if ( ( iExt->iIpv6PrimaryDNS->Compare( KDynIpv6Address ) == 0 ) && - ( iExt->iIpv6SecondaryDNS->Compare( KDynIpv6Address ) == 0 ) ) - { - WriteTextL( EApIP6NameServer1, KWellKnownIp6PrimaryNameServer ); - WriteTextL( EApIP6NameServer2, KWellKnownIp6SecondaryNameServer ); - } - } - - } - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apeng/src/APDataHandler.cpp --- a/apengine/apeng/src/APDataHandler.cpp Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4159 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of class CApDataHandler -* -*/ - - -// INCLUDE FILES -#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS -#include -#endif -#include "APEngineVariant.hrh" - -#include -#include -#include -#include -#include -#ifdef __TEST_USE_SHARED_DATA - #include - #include -#endif //__TEST_USE_SHARED_DATA -#include - -#include "ApDataHandler.h" -#include "ApAccessPointItem.h" -#include "ApEngineCommons.h" -#include "ApUtils.h" -#include "ApEngineVer.h" -#include "ApEngineLogger.h" -#include "ApNetworkItem.h" -#include "APItemExtra.h" -#include "APItemCdmaData.h" -#include "APItemWlanData.h" -#include "ApSpeedLookup.h" - -// CONSTANTS -#if defined(_DEBUG) - _LIT( KErrInvalidIntendedType, "Invalid intended default type" ); -#endif // (_DEBUG) -_LIT( KErrNoSuchCase, "No such case" ); - - -// Agreed GPRS_QOS_WARNING_TIMEOUT Value -const TInt KGprsOsTimeout = -1; - -/** -* General Settings UID -*/ -#ifdef __TEST_USE_SHARED_DATA - LOCAL_D const TUid KGeneralSettingsUid = { 0X100058EC }; -#endif // __TEST_USE_SHARED_DATA - - - - - - -_LIT( KWlanBearerName, "WLANBearer" ); -_LIT( KWlanBearerAgent, "wlanagt.agt" ); -_LIT( KWlanBearerNif, "wlannif" ); - -_LIT( KWlanLDDName, "not used" ); -_LIT( KWlanPDDName, "not used" ); - -const TInt KWlanLastSocketActivityTimeout = -1; -const TInt KWlanLastSessionClosedTimeout = 1; -const TInt KWlanLastSocketClosedTimeout = -1; - - - - - - -// MACROS - - -// LOCAL FUNCTION PROTOTYPES - - -// ================= MEMBER FUNCTIONS ======================= - -// C++ default constructor can NOT contain any code that -// might leave. -// -// --------------------------------------------------------- -// CApDataHandler::NewLC -// --------------------------------------------------------- -// -EXPORT_C CApDataHandler* CApDataHandler::NewLC( CCommsDatabase& aDb ) - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::NewLC" ) ) ); - - CApDataHandler* db = new( ELeave ) CApDataHandler; - CleanupStack::PushL( db ); - db->ConstructL( aDb ); - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::NewLC" ) ) ); - - return db; - } - - - -// --------------------------------------------------------- -// CApDataHandler::~CApDataHandler -// --------------------------------------------------------- -// -EXPORT_C CApDataHandler::~CApDataHandler() - { - if ( iExt ) - { - if ( iExt->iIsFeatureManagerInitialised ) - { - FeatureManager::UnInitializeLib(); - } - } - delete iExt; - } - - -// --------------------------------------------------------- -// CApDataHandler::CApDataHandler -// --------------------------------------------------------- -// -EXPORT_C CApDataHandler::CApDataHandler( ) - { - iDb = NULL; - } - - -// --------------------------------------------------------- -// CApDataHandler::ConstructL -// --------------------------------------------------------- -// -EXPORT_C void CApDataHandler::ConstructL( CCommsDatabase& aDb ) - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::ConstructL" ) ) ); - - iExt = new ( ELeave )THandlerExtra; - iExt->iIsFeatureManagerInitialised = EFalse; - iExt->iIsIpv6Supported = EFalse; - - FeatureManager::InitializeLibL(); - iExt->iIsFeatureManagerInitialised = ETrue; - - iExt->iIsIpv6Supported = - FeatureManager::FeatureSupported( KFeatureIdIPv6 ); -#ifdef __TEST_IPV6_SUPPORT - iExt->iIsIpv6Supported = ETrue; -#endif // __TEST_IPV6_SUPPORT - - iDb = &aDb; - -#ifdef __TEST_USE_SHARED_DATA - iExt->iIsAppHscsdSupport = - ApCommons::IsGivenSharedDataSupportL( KGeneralSettingsUid, - KGSHSCSDAccessPoints ); -#else - iExt->iIsAppHscsdSupport = ETrue; -#endif // __TEST_USE_SHARED_DATA - - -#ifdef __TEST_HSCSD_SUPPORT - iExt->iIsAppHscsdSupport = ETrue; -#endif // __TEST_HSCSD_SUPPORT - - iExt->iVariant = ApCommons::GetVariantL(); - -#ifdef __TEST_CDMA_WRITE_PROTECT - iExt->iVariant |= KApUiEditOnlyVPNs; -#endif // __TEST_CDMA_WRITE_PROTECT - - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::ConstructL" ) ) ); - } - - -// query -// --------------------------------------------------------- -// CApDataHandler::AccessPointDataL -// --------------------------------------------------------- -// -EXPORT_C void CApDataHandler::AccessPointDataL( TUint32 aUid, - CApAccessPointItem& aApItem ) - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::AccessPointDataL" ) ) ); - - // returns the AP data of the record with the UID aUid - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - DoAccessPointDataL( aUid, aApItem ); - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - aApItem.SanityCheckOk(); - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::AccessPointDataL" ) ) ); - } - - - -// update -// --------------------------------------------------------- -// CApDataHandler::UpdateAccessPointDataL -// --------------------------------------------------------- -// -EXPORT_C void CApDataHandler::UpdateAccessPointDataL - ( - CApAccessPointItem& aApItem, - TBool& aNameChanged - ) - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::UpdateAccessPointDataL" ) ) ); - - if ( iExt->iVariant & KApUiEditOnlyVPNs ) - { - User::Leave( KErrNotSupported ); - } - - // update access point data. - aApItem.SanityCheckOk(); - - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - DoUpdateAccessPointDataL( aApItem, EFalse, aNameChanged ); - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::UpdateAccessPointDataL" ) ) ); - } - - - -// Creating new AP -// --------------------------------------------------------- -// CApDataHandler::CreateCopyFromL -// --------------------------------------------------------- -// -EXPORT_C TUint32 CApDataHandler::CreateCopyFromL( TUint32 aBaseId ) - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::CreateCopyFromL - ERROR: not suported" ) ) ); - User::Leave( KErrNotSupported ); - } - - - -// --------------------------------------------------------- -// CApDataHandler::CreateFromDataL -// --------------------------------------------------------- -// -EXPORT_C TUint32 CApDataHandler::CreateFromDataL( CApAccessPointItem& aApItem ) - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::CreateFromDataL" ) ) ); - - if ( iExt->iVariant & KApUiEditOnlyVPNs ) - { - User::Leave( KErrNotSupported ); - } - - aApItem.SanityCheckOk(); - - TBool aNameChanged( EFalse ); - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - TUint32 retval = DoUpdateAccessPointDataL( aApItem, ETrue, aNameChanged ); - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransaction - } - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::CreateFromDataL" ) ) ); - return retval; - } - - - -// Remove -// --------------------------------------------------------- -// CApDataHandler::RemoveAP -// --------------------------------------------------------- -// -EXPORT_C void CApDataHandler::RemoveAPL( TUint32 aUid ) - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::RemoveAPL" ) ) ); - - if ( iExt->iVariant & KApUiEditOnlyVPNs ) - { - User::Leave( KErrNotSupported ); - } - - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - DoRemoveAPL( aUid ); - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::RemoveAPL" ) ) ); - } - - -// Getting default access point -// --------------------------------------------------------- -// CApDataHandler::DefaultL -// --------------------------------------------------------- -// -EXPORT_C TUint32 CApDataHandler::DefaultL( TBool aIsWap ) const - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::DefaultL" ) ) ); - - // get default AP... - // first get global settings... - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - TUint32 value = DoGetDefaultL( aIsWap, NULL ); - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::DefaultL" ) ) ); - return value; - } - - - -// Setting as default -// --------------------------------------------------------- -// CApDataHandler::SetAsDefaultL -// --------------------------------------------------------- -// -EXPORT_C void CApDataHandler::SetAsDefaultL( TUint32 aUid, - TCommsDbIspType aIntendedType ) - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::SetAsDefaultL" ) ) ); - - if ( iExt->iVariant & KApUiEditOnlyVPNs ) - { - User::Leave( KErrNotSupported ); - } - - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - DoSetAsDefaultL( aUid, aIntendedType ); - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::SetAsDefaultL" ) ) ); - } - - -// --------------------------------------------------------- -// --------------------------------------------------------- -// Connection Preferene Handling -// --------------------------------------------------------- -// --------------------------------------------------------- - - -// --------------------------------------------------------- -// CApDataHandler::SetPreferredIfDbIapTypeL -// --------------------------------------------------------- -// -EXPORT_C void CApDataHandler::SetPreferredIfDbIapTypeL - ( - TUint32 aRank, - TCommDbConnectionDirection aDirection, - TUint32 aBearers, - TCommDbDialogPref aPrompt, - TUint32 aIAP, - TBool aOverwrite - ) - { - CLOG( ( EHandler, 0, - _L( "-> CApDataHandler::SetPreferredIfDbIapTypeL" ) ) ); - - if ( iExt->iVariant & KApUiEditOnlyVPNs ) - { - User::Leave( KErrNotSupported ); - } - - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - DoSetPreferredIfDbIapTypeL( aRank, aDirection, aBearers, - aPrompt, aIAP, aOverwrite); - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EHandler, 1, - _L( "<- CApDataHandler::SetPreferredIfDbIapTypeL" ) ) ); - } - - - - -// --------------------------------------------------------- -// CApDataHandler::SetPreferredIfDbIspTypeL -// --------------------------------------------------------- -// -EXPORT_C void CApDataHandler::SetPreferredIfDbIspTypeL - ( - TUint32 aRank, - TCommDbConnectionDirection aDirection, - TUint32 aBearers, - TCommDbDialogPref aPrompt, - TUint32 aISP, - TUint32 aChargeCard, - const TDesC& aServiceType, - TBool aOverwrite - ) - { - CLOG( ( EHandler, 0, - _L( "-> CApDataHandler::SetPreferredIfDbIspTypeL" ) ) ); - - if ( iExt->iVariant & KApUiEditOnlyVPNs ) - { - User::Leave( KErrNotSupported ); - } - - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - DoSetPreferredIfDbIspTypeL( aRank, aDirection, aBearers, aPrompt, - aISP, aChargeCard, aServiceType, aOverwrite); - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EHandler, 1, - _L( "<- CApDataHandler::SetPreferredIfDbIspTypeL" ) ) ); - } - - - -// --------------------------------------------------------- -// CApDataHandler::GetPreferredIfDbIapTypeL -// --------------------------------------------------------- -// -EXPORT_C void CApDataHandler::GetPreferredIfDbIapTypeL - ( - TUint32 aRank, - TCommDbConnectionDirection aDirection, - TUint32& aBearers, - TUint32& aPrompt, - TUint32& aIAP - ) - { - CLOG( ( EHandler, 0, - _L( "-> CApDataHandler::GetPreferredIfDbIapTypeL" ) ) ); - - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - CCommsDbConnectionPrefTableView* preft = - iDb->OpenConnectionPrefTableViewOnRankLC( aDirection, aRank ); - TInt err = preft->GotoFirstRecord(); // OK. - if ( err == KErrNone ) - { // record has been found - CCommsDbConnectionPrefTableView::TCommDbIapConnectionPref pref; - preft->ReadConnectionPreferenceL( pref ); - aBearers = pref.iBearer.iBearerSet; - aPrompt = pref.iDialogPref; - aIAP = pref.iBearer.iIapId; - } - else - { - User::Leave( err ); - } - CleanupStack::PopAndDestroy( preft ); // preft - - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EHandler, 1, - _L( "<- CApDataHandler::GetPreferredIfDbIapTypeL" ) ) ); - } - - - -// --------------------------------------------------------- -// CApDataHandler::GetPreferredIfDbIspTypeL -// --------------------------------------------------------- -// -EXPORT_C const TDesC& CApDataHandler::GetPreferredIfDbIspTypeL - ( - TUint32 /*aRank*/, - TCommDbConnectionDirection /*aDirection*/, - TUint32& /*aBearers*/, - TUint32& /*aPrompt*/, - TUint32& /*aISP*/, - TUint32& /*aChargeCard*/ - ) - { - CLOG( ( EHandler, 0, - _L( "<-> CApDataHandler::GetPreferredIfDbIspTypeL" ) ) ); - - User::Leave( KErrNotSupported ); - - return KErrNoSuchCase; - - } - - - -// --------------------------------------------------------- -// CApDataHandler::GetPreferredIfDbIspTypeL -// --------------------------------------------------------- -// -EXPORT_C TUint32 CApDataHandler::DefaultL( TBool aIsWap, - TBool& aReadOnly ) const - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::DefaultL" ) ) ); - - // get default AP... - // first get global settings... - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - TUint32 value = DoGetDefaultL( aIsWap, &aReadOnly ); - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::DefaultL" ) ) ); - return value; - } - - - - -// --------------------------------------------------------- -// CApDataHandler::RemoveNetworkL -// --------------------------------------------------------- -// -EXPORT_C void CApDataHandler::RemoveNetworkL( TUint32 aUid ) - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::RemoveNetworkL" ) ) ); - - if ( iExt->iVariant & KApUiEditOnlyVPNs ) - { - User::Leave( KErrNotSupported ); - } - - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - CCommsDbTableView* nettable = - iDb->OpenViewMatchingUintLC( TPtrC(NETWORK), - TPtrC(COMMDB_ID), - aUid ); - TInt err = nettable->GotoFirstRecord(); - if ( err == KErrNone ) - { - nettable->DeleteRecord(); - } - else - { - if ( err != KErrNotFound ) - { - User::Leave( err ); - } - } - CleanupStack::PopAndDestroy( nettable ); // RollbackTransactionOnLeave - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::RemoveNetworkL" ) ) ); - } - - -// --------------------------------------------------------- -// CApDataHandler::CreateNetworkL -// --------------------------------------------------------- -// -EXPORT_C void CApDataHandler::CreateNetworkL( CApNetworkItem& aNetwork ) - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::CreateNetworkL" ) ) ); - - if ( iExt->iVariant & KApUiEditOnlyVPNs ) - { - User::Leave( KErrNotSupported ); - } - - CApAccessPointItem* aApItem = CApAccessPointItem::NewLC(); - aApItem->WriteTextL( EApNetworkName, aNetwork.Name() ); - WriteNetworkDataL( ETrue, *aApItem ); - TUint32 tempuint( 0 ); - aApItem->ReadUint( EApNetworkID, tempuint ); - aNetwork.SetUid( tempuint ); - CleanupStack::PopAndDestroy( aApItem ); - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::CreateNetworkL" ) ) ); - } - - -// --------------------------------------------------------- -// CApDataHandler::ReadNetworkPartL -// --------------------------------------------------------- -// -EXPORT_C void CApDataHandler::ReadNetworkPartL( CApAccessPointItem& aItem ) - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::ReadNetworkPartL" ) ) ); - - ReadNetworkDataL( aItem ); - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::ReadNetworkPartL" ) ) ); - } - - -// --------------------------------------------------------- -// CApDataHandler::ReadNetworkL -// --------------------------------------------------------- -// -EXPORT_C void CApDataHandler::ReadNetworkL( TUint32 aUid, - CApNetworkItem& aNetwork ) - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::ReadNetworkL" ) ) ); - - CApAccessPointItem* aItem = CApAccessPointItem::NewLC(); - aItem->WriteUint( EApNetworkID, aUid ); - ReadNetworkDataL( *aItem ); - TUint32 length = aItem->ReadTextLengthL( EApNetworkName ); - HBufC* buf = HBufC::NewLC( length ); - TPtr16 ptr = buf->Des(); - aItem->ReadTextL( EApNetworkName, ptr ); - aNetwork.SetUid( aUid ); - aNetwork.SetNameL( ptr ); - CleanupStack::PopAndDestroy( buf ); - CleanupStack::PopAndDestroy( aItem ); - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::ReadNetworkL" ) ) ); - } - - -// ================= OTHER EXPORTED FUNCTIONS ============== - - -// ================= PROTECTED FUNCTIONS ============== - -// --------------------------------------------------------- -// CApDataHandler::ReadWapDataL -// --------------------------------------------------------- -// -void CApDataHandler::ReadWapDataL( TUint32 aWapId, - CApAccessPointItem& aApItem ) - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::ReadWapDataL" ) ) ); - - // internal function, caller MUST initiate a transaction, WE WILL NOT. - CCommsDbTableView* wapt; - wapt = iDb->OpenViewMatchingUintLC( TPtrC(WAP_ACCESS_POINT), - TPtrC(COMMDB_ID), aWapId ); - - - User::LeaveIfError( wapt->GotoFirstRecord() ); - - aApItem.WriteUint( EApWapAccessPointID, aWapId ); - - TInt err; - HBufC* buf = ApCommons::ReadLongTextLC( wapt, - TPtrC(WAP_START_PAGE), - err ); - if ( err != KErrUnknown ) - { - aApItem.WriteLongTextL( EApWapStartPage, *buf ); - CleanupStack::PopAndDestroy( buf ); - } - - buf = ApCommons::ReadText16ValueLC( wapt, TPtrC(WAP_CURRENT_BEARER) ); - aApItem.WriteTextL( EApWapCurrentBearer, *buf ); - CleanupStack::PopAndDestroy( buf ); - - buf = ApCommons::ReadText16ValueLC( wapt, TPtrC(COMMDB_NAME) ); - aApItem.WriteTextL( EApWapAccessPointName, *buf ); - CleanupStack::PopAndDestroy( buf ); - - - TBool readonly = ApCommons::DoGetReadOnlyL( *wapt ); - // not WriteBool, as it is 'write protected'... - aApItem.iIsReadOnly = readonly; - - CCommsDbTableView* bearert; - bearert = iDb->OpenViewMatchingUintLC( *aApItem.iWapBearer, - TPtrC(WAP_ACCESS_POINT_ID), aWapId ); - - User::LeaveIfError( bearert->GotoFirstRecord() ); - // now we can read common data - buf = ApCommons::ReadText16ValueLC( bearert, - TPtrC( WAP_GATEWAY_ADDRESS ) ); - aApItem.WriteTextL( EApWapGatewayAddress, *buf ); - CleanupStack::PopAndDestroy( buf ); - - - TUint32 tempint( 0 ); - TBool tempbool( EFalse ); - - ApCommons::ReadUintL( bearert, TPtrC(WAP_WSP_OPTION), tempint ); - aApItem.WriteUint( EApWapWspOption, tempint ); - - ApCommons::ReadBoolL( bearert, TPtrC(WAP_SECURITY), tempbool ); - aApItem.WriteBool( EApWapSecurity, tempbool ); - - aApItem.SpecifyWap( ETrue ); - // decide which bearer, read bearer spec. data. - if ( *aApItem.iWapBearer == TPtrC(WAP_IP_BEARER) ) - { - // init it, if it is specified in IAP, will override this... - aApItem.WriteUint( EApIapServiceId, tempint ); - - ApCommons::ReadUintL( bearert, TPtrC(WAP_IAP), tempint ); - aApItem.WriteUint( EApWapIap, tempint ); - - ApCommons::ReadUintL( bearert, TPtrC(WAP_PROXY_PORT), tempint ); - aApItem.WriteUint( EApWapProxyPort, tempint ); - - buf = ApCommons::ReadText16ValueLC( bearert, - TPtrC(WAP_PROXY_LOGIN_NAME) ); - aApItem.WriteTextL( EApProxyLoginName, *buf ); - CleanupStack::PopAndDestroy( buf ); - - - buf = ApCommons::ReadText16ValueLC( bearert, - TPtrC(WAP_PROXY_LOGIN_PASS) ); - aApItem.WriteTextL( EApProxyLoginPass, *buf ); - CleanupStack::PopAndDestroy( buf ); - - - - aApItem.SpecifyIpBearer( ETrue ); - } - else - { - User::Leave( KErrInvalidBearer ); - } - CleanupStack::PopAndDestroy( 2, wapt ); // bearert, wapt - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::ReadWapDataL" ) ) ); - } - - -// --------------------------------------------------------- -// CApDataHandler::ReadIapDataL -// --------------------------------------------------------- -// -void CApDataHandler::ReadIapDataL( TUint32 aIapId, - CApAccessPointItem& aApItem ) - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::ReadIapDataL" ) ) ); - - // internal function, caller MUST initiate a transaction, WE WILL NOT. - CCommsDbTableView* iapt = iDb->OpenViewMatchingUintLC( TPtrC(IAP), - TPtrC(COMMDB_ID), aIapId ); - - User::LeaveIfError( iapt->GotoFirstRecord() ); - // can not be more than one record, - // because we are looking up about UID! - aApItem.WriteUint( EApWapIap, aIapId ); - - HBufC* buf = ApCommons::ReadText16ValueLC( iapt, TPtrC(COMMDB_NAME) ); - aApItem.WriteTextL( EApIapName, *buf ); - CleanupStack::PopAndDestroy( buf ); - - TUint32 tempint; - - ApCommons::ReadUintL( iapt, TPtrC(IAP_SERVICE), tempint ); - aApItem.WriteUint( EApIapServiceId, tempint ); - - - buf = ApCommons::ReadText16ValueLC( iapt, TPtrC(IAP_SERVICE_TYPE) ); - aApItem.WriteTextL( EApIapServiceType, *buf ); - CleanupStack::PopAndDestroy( buf ); - - - ApCommons::ReadUintL( iapt, TPtrC(IAP_BEARER), tempint ); - aApItem.WriteUint( EApIapBearerID, tempint ); - - buf = ApCommons::ReadText16ValueLC( iapt, TPtrC(IAP_BEARER_TYPE) ); - aApItem.WriteTextL( EApIapBearerType, *buf ); - CleanupStack::PopAndDestroy( buf ); - - ReadModemBearerNameL( aApItem ); - - ApCommons::ReadUintL( iapt, TPtrC(IAP_NETWORK), tempint ); - aApItem.iNetworkId = tempint; - - // Network weighting! - ApCommons::ReadUintL( iapt, TPtrC(IAP_NETWORK_WEIGHTING), tempint ); - -/* - // seems that location is fixed so no read... - ApCommons::ReadUintL( iapt, TPtrC(IAP_LOCATION), tempint ); - aApItem.i = tempint; -*/ - - - aApItem.SpecifyIAP( ETrue ); - CleanupStack::PopAndDestroy( iapt ); // iapt - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::ReadIapDataL" ) ) ); - } - - - - - -// --------------------------------------------------------- -// CApDataHandler::ReadIspDataL -// --------------------------------------------------------- -// -void CApDataHandler::ReadIspDataL( TUint32 aIspId, - CApAccessPointItem& aApItem ) - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::ReadIspDataL" ) ) ); - - /***************************************************** - * Series 60 Customer / ETel - * Series 60 ETel API - *****************************************************/ - // internal function, caller MUST initiate a transaction, WE WILL NOT. - HBufC* buf = HBufC::NewLC( KModifiableTextLength ); - TPtr16 ptr = buf->Des(); - aApItem.ReadTextL( EApIapServiceType, ptr ); - - if ( ( buf->Compare( TPtrC(OUTGOING_WCDMA ) ) == 0 ) || - ( buf->Compare( TPtrC(INCOMING_WCDMA ) ) == 0 ) ) - { - ReadGprsDataL( aIspId, aApItem ); - } - else - { - if ( ( buf->Compare( TPtrC(DIAL_OUT_ISP ) ) == 0 ) || - ( buf->Compare( TPtrC(DIAL_IN_ISP ) ) == 0 ) ) - { - ReadDialInOutDataL( aIspId, aApItem ); - } - else - { // e.g. vpn... - if ( buf->Compare( TPtrC(VPN_SERVICE) ) == 0 ) - { // VPN - aApItem.iExt->iIsVpnAp = ETrue; - // get vpn bearer type - ReadVpnInfoL( aIspId, aApItem ); - } - else - { - if ( buf->Compare( TPtrC(LAN_SERVICE) ) == 0 ) - { // LAN - // get LAN data (WLAN) - ReadLanDataL( aIspId, aApItem ); - } - else - { - User::Leave( KErrInvalidBearer ); - } - } - } - } - CleanupStack::PopAndDestroy( buf ); // buf - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::ReadIspDataL" ) ) ); - } - - - -// --------------------------------------------------------- -// CApDataHandler::ReadGprsDataL -// --------------------------------------------------------- -// -void CApDataHandler::ReadGprsDataL( TUint32 aIspId, - CApAccessPointItem& aApItem ) - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::ReadGprsDataL" ) ) ); - - // internal function, caller MUST initiate a transaction, WE WILL NOT. - CCommsDbTableView* ispt = NULL; - - HBufC* servtype = HBufC::NewLC( KModifiableTextLength ); - TPtr16 ptr = servtype->Des(); - aApItem.ReadTextL( EApIapServiceType, ptr ); - - if ( servtype->Compare( TPtrC(OUTGOING_WCDMA ) ) == 0 ) - { - ispt = iDb->OpenViewMatchingUintLC( TPtrC(OUTGOING_WCDMA), - TPtrC(COMMDB_ID), - aIspId ); - } - else - { - if ( servtype->Compare( TPtrC(INCOMING_WCDMA ) ) == 0 ) - { - ispt = iDb->OpenViewMatchingUintLC( TPtrC(INCOMING_WCDMA), - TPtrC(COMMDB_ID), - aIspId ); - } - else - { - User::Leave( KErrInvalidBearer ); - } - } - - - User::LeaveIfError( ispt->GotoFirstRecord() ); - - // now read record data - HBufC* buf = ApCommons::ReadText16ValueLC( ispt, TPtrC(COMMDB_NAME) ); - aApItem.WriteTextL( EApIspName, *buf ); - CleanupStack::PopAndDestroy( buf ); - - TInt err( KErrNone ); - buf = ApCommons::ReadLongTextLC( ispt, TPtrC(GPRS_APN), err ); - if ( err != KErrUnknown ) - { - aApItem.WriteLongTextL( EApGprsAccessPointName, *buf ); - CleanupStack::PopAndDestroy( buf ); - } - - TUint32 tempint( 0 ); - TBool tempbool( EFalse ); - - ApCommons::ReadUintL( ispt, TPtrC(GPRS_PDP_TYPE), tempint ); - if ( tempint == RPacketContext::EPdpTypeIPv6 ) - { - aApItem.WriteUint( EApGprsPdpType, EIPv6 ); - } - else - { - aApItem.WriteUint( EApGprsPdpType, EIPv4 ); - } - - buf = ApCommons::ReadText16ValueLC( ispt, TPtrC(GPRS_PDP_ADDRESS) ); - aApItem.WriteTextL( EApGprsPdpAddress, *buf ); - CleanupStack::PopAndDestroy( buf ); - - ApCommons::ReadUintL( ispt, TPtrC(GPRS_REQ_PRECEDENCE), tempint ); - aApItem.WriteUint( EApGprsReqPrecedence, tempint); - - ApCommons::ReadUintL( ispt, TPtrC(GPRS_REQ_DELAY), tempint ); - aApItem.WriteUint( EApGprsReqDelay, tempint); - - ApCommons::ReadUintL( ispt, TPtrC(GPRS_REQ_RELIABILITY), tempint ); - aApItem.WriteUint( EApGprsReqReliability, tempint); - - ApCommons::ReadUintL( ispt, TPtrC(GPRS_REQ_PEAK_THROUGHPUT), tempint ); - aApItem.WriteUint( EApGprsReqPeakThroughput, tempint); - - ApCommons::ReadUintL( ispt, TPtrC(GPRS_REQ_MEAN_THROUGHPUT), tempint ); - aApItem.WriteUint( EApGprsReqMeanPeakThroughput, tempint); - - ApCommons::ReadUintL( ispt, TPtrC(GPRS_MIN_PRECEDENCE), tempint ); - aApItem.WriteUint( EApGprsMinPrecedence, tempint); - - ApCommons::ReadUintL( ispt, TPtrC(GPRS_MIN_DELAY), tempint ); - aApItem.WriteUint( EApGprsMinDelay, tempint); - - ApCommons::ReadUintL( ispt, TPtrC(GPRS_MIN_RELIABILITY), tempint ); - aApItem.WriteUint( EApGprsMinReliability, tempint); - - ApCommons::ReadUintL( ispt, TPtrC(GPRS_MIN_PEAK_THROUGHPUT), tempint ); - aApItem.WriteUint( EApGprsMinPeakThroughput, tempint); - - ApCommons::ReadUintL( ispt, TPtrC(GPRS_MIN_MEAN_THROUGHPUT), tempint ); - aApItem.WriteUint( EApGprsMinMeanThroughput, tempint); - - ApCommons::ReadBoolL( ispt, TPtrC(GPRS_DATA_COMPRESSION), tempbool ); - aApItem.WriteBool( EApGprsDataCompression, tempbool ); - - ApCommons::ReadBoolL( ispt, TPtrC(GPRS_HEADER_COMPRESSION), tempbool ); - aApItem.WriteBool( EApGprsHeaderCompression, tempbool ); - - ApCommons::ReadBoolL( ispt, TPtrC(GPRS_ANONYMOUS_ACCESS), tempbool ); - aApItem.WriteBool( EApGprsUseAnonymAccess, tempbool ); - - - buf = ApCommons::ReadText16ValueLC( ispt, TPtrC(GPRS_IF_PARAMS) ); - aApItem.WriteTextL( EApGprsIfParams, *buf ); - CleanupStack::PopAndDestroy( buf ); - - buf = ApCommons::ReadText16ValueLC( ispt, TPtrC(GPRS_IF_NETWORKS) ); - aApItem.WriteTextL( EApGprsIfNetworks, *buf ); - CleanupStack::PopAndDestroy( buf ); - - ApCommons::ReadBoolL( ispt, TPtrC(GPRS_IF_PROMPT_FOR_AUTH), tempbool ); - aApItem.WriteBool( EApGprsIfPromptForAuth, tempbool ); - - - buf = ApCommons::ReadText16ValueLC( ispt, TPtrC(GPRS_IF_AUTH_NAME) ); - aApItem.WriteTextL( EApGprsIfAuthName, *buf ); - CleanupStack::PopAndDestroy( buf ); - - buf = ApCommons::ReadText16ValueLC( ispt, TPtrC(GPRS_IF_AUTH_PASS) ); - aApItem.WriteTextL( EApGprsIfAuthPassword, *buf ); - CleanupStack::PopAndDestroy( buf ); - - ApCommons::ReadUintL( ispt, TPtrC(GPRS_IF_AUTH_RETRIES), tempint ); - aApItem.WriteUint( EApGprsIfAuthRetries, tempint ); - - buf = ApCommons::ReadText16ValueLC( ispt, TPtrC(GPRS_IP_NETMASK) ); - aApItem.WriteTextL( EApGprsIpNetMask, *buf ); - CleanupStack::PopAndDestroy( buf ); - - buf = ApCommons::ReadText16ValueLC( ispt, TPtrC(GPRS_IP_GATEWAY) ); - aApItem.WriteTextL( EApGprsIpGateway, *buf ); - CleanupStack::PopAndDestroy( buf ); - - ApCommons::ReadBoolL( ispt, TPtrC(GPRS_IP_ADDR_FROM_SERVER), tempbool ); - aApItem.WriteBool( EApGprsIpAddrFromServer, tempbool ); - - buf = ApCommons::ReadText16ValueLC( ispt, TPtrC(GPRS_IP_ADDR) ); - aApItem.WriteTextL( EApGprsIpAddr, *buf ); - CleanupStack::PopAndDestroy( buf ); - - ApCommons::ReadBoolL( ispt, TPtrC(GPRS_IP_DNS_ADDR_FROM_SERVER), - tempbool ); - aApItem.WriteBool( EApGprsIpDnsAddrFromServer, tempbool ); - - buf = ApCommons::ReadText16ValueLC( ispt, TPtrC(GPRS_IP_NAME_SERVER1) ); - aApItem.WriteTextL( EApGprsIPNameServer1, *buf ); - CleanupStack::PopAndDestroy( buf ); - - buf = ApCommons::ReadText16ValueLC( ispt, TPtrC(GPRS_IP_NAME_SERVER2) ); - aApItem.WriteTextL( EApGprsIPNameServer2, *buf ); - CleanupStack::PopAndDestroy( buf ); - - ApCommons::ReadBoolL( ispt, TPtrC(GPRS_ENABLE_LCP_EXTENSIONS), tempbool ); - aApItem.WriteBool( EApGprsEnableLCPExtensions, tempbool ); - - - ApCommons::ReadBoolL( ispt, TPtrC(GPRS_DISABLE_PLAIN_TEXT_AUTH), - tempbool ); - aApItem.WriteBool( EApGprsDisablePlainTextAuth, tempbool ); - - ApCommons::ReadUintL( ispt, TPtrC(GPRS_AP_TYPE), tempint ); - aApItem.WriteUint( EApIspIspType, TCommsDbIspType( tempint ) ); - - if ( iExt->iIsIpv6Supported ) - { - ReadServiceIp6L( *ispt, aApItem ); - } - - aApItem.SpecifyGPRS( ETrue ); - CleanupStack::PopAndDestroy( 2, servtype ); // ispt, servtype - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::ReadGprsDataL" ) ) ); - } - - - -// --------------------------------------------------------- -// CApDataHandler::ReadLanDataL -// --------------------------------------------------------- -// -void CApDataHandler::ReadLanDataL( TUint32 aIspId, - CApAccessPointItem& aApItem ) - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::ReadLanDataL" ) ) ); - - // internal function, caller MUST initiate a transaction, WE WILL NOT. - CCommsDbTableView* ispt = NULL; - - ispt = iDb->OpenViewMatchingUintLC( TPtrC(LAN_SERVICE), - TPtrC(COMMDB_ID), - aIspId ); - User::LeaveIfError( ispt->GotoFirstRecord() ); - - // now read record data - ReadServiceL( *ispt, aApItem ); - - CCommsDbTableView* lant = NULL; - // now see if it is WLAN - - if ( aApItem.iExt->iWlanData ) - { // WLAN is supported - lant = iDb->OpenViewMatchingUintLC( TPtrC(WLAN_SERVICE ), - TPtrC(WLAN_SERVICE_ID), - aIspId ); - - TInt err = lant->GotoFirstRecord(); - // it can be Ethernet Lan, WLAN and LanModem, - // from those, only WLAN has these fields, - // so if we can read them, it is wlan. If not, it is something else... - if ( err == KErrNone ) - { - // now read record data - ReadWlanL( *lant, aApItem ); - aApItem.iExt->iWlanData->iIsWlan = ETrue; - } - else - { - if ( err != KErrNotFound ) - { - User::LeaveIfError( err ); - } - // can not leave on not found error, as it still might be - // a valid bearer after all... - aApItem.iExt->iWlanData->iIsWlan = EFalse; - } - aApItem.SpecifyWLAN( ETrue ); - CleanupStack::PopAndDestroy( lant ); - } - - if ( iExt->iIsIpv6Supported ) - { - ReadServiceIp6L( *ispt, aApItem ); - } - - - - CleanupStack::PopAndDestroy( ispt ); - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::ReadLanDataL" ) ) ); - } - - - -// --------------------------------------------------------- -// CApDataHandler::ReadDialInOutDataL -// --------------------------------------------------------- -// -void CApDataHandler::ReadDialInOutDataL( TUint32 aIspId, - CApAccessPointItem& aApItem ) - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::ReadDialInOutDataL" ) ) ); - /***************************************************** - * Series 60 Customer / ETel - * Series 60 ETel API - *****************************************************/ - - // internal function, caller MUST initiate a transaction, WE WILL NOT. - CCommsDbTableView* ispt = NULL; - - HBufC* servtype = HBufC::NewLC( KModifiableTextLength ); - TPtr16 ptr = servtype->Des(); - aApItem.ReadTextL( EApIapServiceType, ptr ); - - if ( servtype->Compare( TPtrC(DIAL_OUT_ISP) ) == 0 ) - { - ispt = iDb->OpenViewMatchingUintLC( TPtrC(DIAL_OUT_ISP), - TPtrC(COMMDB_ID), aIspId ); - } - else - { - ispt = iDb->OpenViewMatchingUintLC( TPtrC(DIAL_IN_ISP), - TPtrC(COMMDB_ID), aIspId ); - } - - User::LeaveIfError( ispt->GotoFirstRecord() ); - - TUint32 tempint( 0 ); - TBool tempbool( EFalse ); - - HBufC* buf = NULL; - - aApItem.WriteUint( EApIapServiceId, aIspId ); - - - buf = ApCommons::ReadText16ValueLC( ispt, TPtrC(COMMDB_NAME) ); - aApItem.WriteTextL( EApIspName, *buf ); - CleanupStack::PopAndDestroy( buf ); - - buf = ApCommons::ReadText16ValueLC( ispt, TPtrC(ISP_DESCRIPTION) ); - aApItem.WriteTextL( EApIspDescription, *buf ); - CleanupStack::PopAndDestroy( buf ); - - - ApCommons::ReadUintL( ispt, TPtrC(ISP_TYPE), tempint ); - aApItem.WriteUint( EApIspIspType, TCommsDbIspType( tempint ) ); - - buf = ApCommons::ReadText16ValueLC( ispt, - TPtrC(ISP_DEFAULT_TEL_NUM) ); - aApItem.WriteTextL( EApIspDefaultTelNumber, *buf ); - CleanupStack::PopAndDestroy( buf ); - - - ApCommons::ReadBoolL( ispt, TPtrC(ISP_DIAL_RESOLUTION), tempbool ); - aApItem.WriteBool( EApIspDialResolution, tempbool ); - - ApCommons::ReadBoolL( ispt, TPtrC(ISP_USE_LOGIN_SCRIPT), tempbool ); - aApItem.WriteBool( EApIspUseLoginScript, tempbool ); - - TInt err; - buf = ApCommons::ReadLongTextLC( ispt, TPtrC(ISP_LOGIN_SCRIPT), err ); - aApItem.WriteLongTextL( EApIspLoginScript, *buf ); - CleanupStack::PopAndDestroy( buf ); - - - ApCommons::ReadBoolL( ispt, TPtrC(ISP_PROMPT_FOR_LOGIN), tempbool ); - aApItem.WriteBool( EApIspPromptForLogin, tempbool ); - - buf = ApCommons::ReadText16ValueLC( ispt, TPtrC(ISP_LOGIN_NAME) ); - // as same UserName & AuthName is required, it is readed from username - aApItem.WriteTextL( EApIspLoginName, *buf ); - aApItem.WriteTextL( EApIspIfAuthName, *buf ); - CleanupStack::PopAndDestroy( buf ); - - - buf = ApCommons::ReadText16ValueLC( ispt, TPtrC(ISP_LOGIN_PASS) ); - // as same Login_pass & AuthPassword is required, - // it is readed from login_pass - aApItem.WriteTextL( EApIspLoginPass, *buf ); - aApItem.WriteTextL( EApIspIfAuthPass, *buf ); - CleanupStack::PopAndDestroy( buf ); - - - ApCommons::ReadBoolL( ispt, TPtrC(ISP_DISPLAY_PCT), tempbool ); - aApItem.WriteBool( EApIspDisplayPCT, tempbool ); - - - buf = ApCommons::ReadText16ValueLC( ispt, TPtrC(ISP_IF_PARAMS) ); - aApItem.WriteTextL( EApIspIfParams, *buf ); - CleanupStack::PopAndDestroy( buf ); - - buf = ApCommons::ReadText16ValueLC( ispt, TPtrC(ISP_IF_NETWORKS) ); - aApItem.WriteTextL( EApIspIfNetworks, *buf ); - CleanupStack::PopAndDestroy( buf ); - - ApCommons::ReadBoolL( ispt, TPtrC(ISP_IF_PROMPT_FOR_AUTH), tempbool ); - aApItem.WriteBool( EApIspIfPromptForAuth, tempbool ); - - - ApCommons::ReadUintL( ispt, TPtrC(ISP_IF_AUTH_RETRIES), tempint ); - aApItem.WriteUint( EApIspAuthRetries, tempint ); - - ApCommons::ReadBoolL( ispt, - TPtrC(ISP_IF_CALLBACK_ENABLED), tempbool ); - - aApItem.WriteBool( EApIspIfCallbackEnabled, tempbool ); - - - ApCommons::ReadUintL( ispt, TPtrC(ISP_IF_CALLBACK_TYPE), tempint ); - aApItem.WriteUint( EApIspIfCallbackType, ( TCallbackAction )tempint ); - - - HBufC8* buf8 = ApCommons::ReadText8ValueLC - ( - ispt, - TPtrC(ISP_IF_CALLBACK_INFO) - ); - aApItem.WriteTextL( EApIspIfCallbackInfo, *buf8 ); - CleanupStack::PopAndDestroy( buf8 ); - - ApCommons::ReadUintL( ispt, TPtrC(ISP_CALLBACK_TIMEOUT), tempint ); - aApItem.WriteUint( EApIspCallBackTimeOut, tempint ); - - - ApCommons::ReadBoolL( ispt, - TPtrC(ISP_IP_ADDR_FROM_SERVER), tempbool ); - - aApItem.WriteBool( EApIspIPAddrFromServer, tempbool ); - - buf = ApCommons::ReadText16ValueLC( ispt, TPtrC(ISP_IP_ADDR) ); - aApItem.WriteTextL( EApIspIPAddr, *buf ); - CleanupStack::PopAndDestroy( buf ); - - buf = ApCommons::ReadText16ValueLC( ispt, TPtrC(ISP_IP_NETMASK) ); - aApItem.WriteTextL( EApIspIPNetMask, *buf ); - CleanupStack::PopAndDestroy( buf ); - - buf = ApCommons::ReadText16ValueLC( ispt, TPtrC(ISP_IP_GATEWAY) ); - aApItem.WriteTextL( EApIspIPGateway, *buf ); - CleanupStack::PopAndDestroy( buf ); - - ApCommons::ReadBoolL( ispt, TPtrC(ISP_IP_DNS_ADDR_FROM_SERVER), - tempbool ); - - aApItem.WriteBool( EApIspIPDnsAddrFromServer, tempbool ); - - buf = ApCommons::ReadText16ValueLC( ispt, - TPtrC(ISP_IP_NAME_SERVER1) ); - - aApItem.WriteTextL( EApIspIPNameServer1, *buf ); - CleanupStack::PopAndDestroy( buf ); - - buf = ApCommons::ReadText16ValueLC( ispt, - TPtrC(ISP_IP_NAME_SERVER2) ); - - aApItem.WriteTextL( EApIspIPNameServer2, *buf ); - CleanupStack::PopAndDestroy( buf ); - - - ApCommons::ReadBoolL( ispt, TPtrC(ISP_ENABLE_IP_HEADER_COMP), - tempbool ); - - aApItem.WriteBool( EApIspEnableIpHeaderComp, tempbool ); - - - ApCommons::ReadBoolL( ispt, TPtrC(ISP_ENABLE_LCP_EXTENSIONS), - tempbool ); - - aApItem.WriteBool( EApIspEnableLCPExtensions, tempbool ); - - - ApCommons::ReadBoolL( ispt, TPtrC(ISP_DISABLE_PLAIN_TEXT_AUTH), - tempbool ); - - aApItem.WriteBool( EApIspDisablePlainTextAuth, tempbool ); - - - ApCommons::ReadBoolL( ispt, TPtrC(ISP_ENABLE_SW_COMP), tempbool ); - - aApItem.WriteBool( EApIspEnableSWCompression, tempbool ); - - - ApCommons::ReadUintL( ispt, TPtrC(ISP_BEARER_NAME), tempint ); - aApItem.WriteUint( EApIspBearerName, - (RMobileCall::TMobileCallDataServiceCaps)tempint ); - - ApCommons::ReadUintL( ispt, TPtrC(ISP_BEARER_SPEED), tempint ); - aApItem.iExt->iBearerSpeed = tempint; - - ApCommons::ReadUintL( ispt, TPtrC(ISP_BEARER_PROTOCOL), tempint ); - aApItem.iExt->iBearerProtocol = tempint; - - ApCommons::ReadUintL( ispt, TPtrC(ISP_BEARER_CE), tempint ); - aApItem.WriteUint( EApIspBearerCE, - (RMobileCall::TMobileCallDataQoSCaps) tempint ); - - ApCommons::ReadUintL( ispt, TPtrC(ISP_BEARER_SERVICE), tempint ); - aApItem.WriteUint( EApIapBearerService, tempint ); - - - - buf8 = ApCommons::ReadText8ValueLC( ispt, - TPtrC(ISP_INIT_STRING) ); - - aApItem.WriteTextL( EApIspInitString, *buf8 ); - CleanupStack::PopAndDestroy( buf8 ); - - ApCommons::ReadUintL( ispt, TPtrC(ISP_BEARER_TYPE), tempint ); - aApItem.WriteUint( EApIspBearerType, tempint); - - ApCommons::ReadUintL( ispt, TPtrC(ISP_CHANNEL_CODING), tempint ); - aApItem.WriteUint( EApIspChannelCoding, tempint); - - ApCommons::ReadUintL( ispt, TPtrC(ISP_AIUR), tempint ); - aApItem.WriteUint( EApIspAIUR, tempint); - - ApCommons::ReadUintL( ispt, - TPtrC(ISP_REQUESTED_TIME_SLOTS), - tempint ); - aApItem.WriteUint( EApIspRequestedTimeSlots, tempint); - - ApCommons::ReadUintL( ispt, TPtrC(ISP_MAXIMUM_TIME_SLOTS), tempint ); - aApItem.WriteUint( EApIspMaximumTimeSlots, tempint); - - - if ( iExt->iIsIpv6Supported ) - { - ReadServiceIp6L( *ispt, aApItem ); - } - - EtelSpeed2ApL( aApItem ); - - aApItem.SpecifyISP( ETrue ); - CleanupStack::PopAndDestroy( 2, servtype ); // ispt, servtype - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::ReadDialInOutDataL" ) ) ); - } - - - -// --------------------------------------------------------- -// CApDataHandler::ReadVpnInfoL -// --------------------------------------------------------- -// -void CApDataHandler::ReadVpnInfoL( TUint32 aIspId, - CApAccessPointItem& aApItem) - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::ReadVpnInfoL" ) ) ); - - // internal function, caller MUST initiate a transaction, WE WILL NOT. - CCommsDbTableView* ispt = NULL; - - ispt = iDb->OpenViewMatchingUintLC( TPtrC(VPN_SERVICE), - TPtrC(COMMDB_ID), aIspId ); - User::LeaveIfError( ispt->GotoFirstRecord() ); - - TUint32 tempint; - - HBufC* buf = NULL; - // get the real iap - ApCommons::ReadUintL( ispt, TPtrC(VPN_SERVICE_IAP), tempint ); - - CCommsDbTableView* iapt = NULL; - iapt = iDb->OpenViewMatchingUintLC( TPtrC(IAP), - TPtrC(COMMDB_ID), tempint ); - - User::LeaveIfError( iapt->GotoFirstRecord() ); - - TUint32 iapservice; - ApCommons::ReadUintL( iapt, TPtrC(IAP_SERVICE), iapservice ); - - buf = ApCommons::ReadText16ValueLC( iapt, TPtrC(IAP_SERVICE_TYPE) ); - - if ( ( buf->Compare( TPtrC(OUTGOING_WCDMA ) ) == 0 ) || - ( buf->Compare( TPtrC(INCOMING_WCDMA ) ) == 0 ) ) - { - aApItem.iExt->iVPnRealIapBearerType = EApBearerTypeGPRS; - } - else - { - if ( ( buf->Compare( TPtrC(DIAL_OUT_ISP ) ) == 0 ) || - ( buf->Compare( TPtrC(DIAL_IN_ISP ) ) == 0 ) ) - { - // need to get ISP, - CCommsDbTableView* doutt = NULL; - doutt = iDb->OpenViewMatchingUintLC( *buf, - TPtrC(COMMDB_ID), - iapservice ); - User::LeaveIfError( doutt->GotoFirstRecord() ); - ApCommons::ReadUintL( doutt , TPtrC(ISP_BEARER_TYPE), tempint ); - if ( tempint == EBearerTypeCSD ) - { - aApItem.iExt->iVPnRealIapBearerType = EApBearerTypeCSD; - } - else - { - aApItem.iExt->iVPnRealIapBearerType = EApBearerTypeHSCSD; - } - CleanupStack::PopAndDestroy( doutt ); // doutt - } - else - { - // VPN, having a bearer something else than CSD, HSCSD, - // GPRS & CDMA? - if ( buf->Compare( TPtrC(LAN_SERVICE) ) == 0 ) - { // LAN - ReadLanDataL( aIspId, aApItem ); - } - else - { // otherwise, error - User::Leave( KErrInvalidBearer ); - } - } - } - - CleanupStack::PopAndDestroy( 3, ispt ); // buf, iapt, ispt - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::ReadVpnInfoL" ) ) ); - } - - - -// --------------------------------------------------------- -// CApDataHandler::WriteWapBearerDataL -// --------------------------------------------------------- -// -void CApDataHandler::WriteWapBearerDataL( TBool aIsNew, TUint32 aWapId, - CApAccessPointItem& aApItem ) - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::WriteWapBearerDataL" ) ) ); - - // internal function, caller MUST initiate a transaction, WE WILL NOT. - CCommsDbTableView* bearert; - if ( aIsNew ) - { - bearert = iDb->OpenTableLC( TPtrC(*aApItem.iWapBearer) ); - // CommDB's back-link makes returned UID value unusable, - // variable needed just to be able to make the call... - TUint32 dummy; - User::LeaveIfError( bearert->InsertRecord( dummy ) ); - } - else - { - bearert = iDb->OpenViewMatchingUintLC( TPtrC(*aApItem.iWapBearer), - TPtrC(WAP_ACCESS_POINT_ID), - aWapId ); - User::LeaveIfError( bearert->GotoFirstRecord() ); - User::LeaveIfError( bearert->UpdateRecord() ); - } - bearert->WriteTextL( TPtrC(WAP_GATEWAY_ADDRESS), - *aApItem.iWapGatewayAddress ); - bearert->WriteUintL( TPtrC(WAP_WSP_OPTION), - aApItem.iIsConnectionTypeContinuous ); - bearert->WriteBoolL( TPtrC(WAP_SECURITY), aApItem.iIsWTLSSecurityOn ); - bearert->WriteUintL( TPtrC(WAP_ACCESS_POINT_ID), aWapId ); - - if ( *aApItem.iWapBearer == TPtrC(WAP_IP_BEARER) ) - { - bearert->WriteUintL( TPtrC(WAP_IAP), aApItem.iWapIap ); - bearert->WriteUintL( TPtrC(WAP_PROXY_PORT), aApItem.iWapProxyPort ); - bearert->WriteTextL( TPtrC(WAP_PROXY_LOGIN_NAME), - *aApItem.iWapProxyLoginName ); - bearert->WriteTextL( TPtrC(WAP_PROXY_LOGIN_PASS), - *aApItem.iWapProxyLoginPass ); - } - else - { - User::Leave( KErrInvalidBearer ); - } - - User::LeaveIfError( bearert->PutRecordChanges( EFalse, EFalse ) ); - - CleanupStack::PopAndDestroy( bearert ); // bearert - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::WriteWapBearerDataL" ) ) ); - } - - - - -// --------------------------------------------------------- -// CApDataHandler::WriteWapApDataL -// --------------------------------------------------------- -// -void CApDataHandler::WriteWapApDataL( TBool aIsNew, TUint32 aWapId, - CApAccessPointItem& aApItem ) - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::WriteWapApDataL" ) ) ); - - // internal function, caller MUST initiate a transaction, WE WILL NOT. - CCommsDbTableView* wapt; - - if ( aIsNew ) - { - wapt = iDb->OpenTableLC( TPtrC(WAP_ACCESS_POINT) ); - TInt err = wapt->InsertRecord( aApItem.iWapUid ); - if ( err ) - { - User::LeaveIfError( err ); - } - // CommDB's back-link makes returned UID value unusable, - // variable needed just to be able to make the call... - } - else - { - wapt = iDb->OpenViewMatchingUintLC( TPtrC(WAP_ACCESS_POINT), - TPtrC(COMMDB_ID), aWapId ); - User::LeaveIfError( wapt->GotoFirstRecord() ); - User::LeaveIfError( wapt->UpdateRecord() ); - } - - wapt->WriteTextL( TPtrC(WAP_CURRENT_BEARER), *aApItem.iWapBearer ); - wapt->WriteTextL( TPtrC(COMMDB_NAME), *aApItem.iWapAccessPointName ); - - wapt->WriteLongTextL( TPtrC(WAP_START_PAGE), *aApItem.iStartingPage ); - - User::LeaveIfError( wapt->PutRecordChanges( EFalse, EFalse ) ); - - CleanupStack::PopAndDestroy( wapt ); // wapt - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::WriteWapApDataL" ) ) ); - } - - - -// --------------------------------------------------------- -// CApDataHandler::WriteIapDataL -// --------------------------------------------------------- -// -void CApDataHandler::WriteIapDataL( TBool aIsNew, TUint32 aIapId, - CApAccessPointItem& aApItem ) - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::WriteIapDataL" ) ) ); - - CCommsDbTableView* iapt; - // internal function, caller MUST initiate a transaction, WE WILL NOT. - if ( aIsNew ) - { - iapt = iDb->OpenTableLC( TPtrC(IAP) ); - User::LeaveIfError( iapt->InsertRecord( aApItem.iWapIap ) ); - } - else - { - iapt = iDb->OpenViewMatchingUintLC( TPtrC(IAP), - TPtrC(COMMDB_ID), aIapId ); - User::LeaveIfError( iapt->GotoFirstRecord() ); - User::LeaveIfError( iapt->UpdateRecord() ); - } - - iapt->WriteTextL( TPtrC(COMMDB_NAME), *aApItem.iIapName ); - iapt->WriteUintL( TPtrC(IAP_SERVICE), aApItem.iIapServiceId ); - iapt->WriteTextL( TPtrC(IAP_SERVICE_TYPE), *aApItem.iIapServiceType ); - - // hardcoded... - TApBearerType bearer = aApItem.BearerTypeL(); - switch ( bearer ) - { - case EApBearerTypeWLAN: - { - if ( aApItem.iExt->iWlanData ) - { - iapt->WriteTextL( TPtrC(IAP_BEARER_TYPE), TPtrC(LAN_BEARER) ); - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } -#ifdef __TEST_LAN_BEARER - case EApBearerTypeLAN: - { - iapt->WriteTextL( TPtrC(IAP_BEARER_TYPE), TPtrC(LAN_BEARER) ); - break; - } -#endif // __TEST_LAN_BEARER - case EApBearerTypeLANModem: - { - iapt->WriteTextL( TPtrC(IAP_BEARER_TYPE), TPtrC(LAN_BEARER) ); - break; - } - default: - { - iapt->WriteTextL( TPtrC(IAP_BEARER_TYPE), TPtrC(MODEM_BEARER) ); - break; - } - } - - TUint32 id = GetModemBearerIDL( aApItem ); - iapt->WriteUintL( TPtrC(IAP_BEARER), id ); - - iapt->WriteUintL( TPtrC(IAP_NETWORK), aApItem.iNetworkId ); - // Network weighting! - iapt->WriteUintL( TPtrC(IAP_NETWORK_WEIGHTING), 0 ); - - TUint32 loc = GetLocationIdL(); - iapt->WriteUintL( TPtrC(IAP_LOCATION), loc ); - - // now put changes - User::LeaveIfError( iapt->PutRecordChanges( EFalse, EFalse ) ); - - CleanupStack::PopAndDestroy( iapt ); // iapt - - if ( aIsNew ) - { - CCommsDbConnectionPrefTableView* view = - iDb->OpenConnectionPrefTableViewOnRankLC( - ECommDbConnectionDirectionOutgoing, 1 ); - - TInt ret = view->GotoFirstRecord(); - - CCommsDbConnectionPrefTableView::TCommDbIapConnectionPref tablePref; - - if ( ret == KErrNone ) - { - view->ReadConnectionPreferenceL( tablePref ); - - TUint32 iapId = tablePref.iBearer.iIapId; - - // Check if iap exists - CCommsDbTableView* view2 = - iDb->OpenViewMatchingUintLC( TPtrC(IAP), - TPtrC(COMMDB_ID), - iapId ); - - TInt exists = view2->GotoFirstRecord(); - CleanupStack::PopAndDestroy(); // view2 - - if ( iapId == 0 || exists != KErrNone ) - { - if ( bearer & - ( EApBearerTypeCSD - + EApBearerTypeHSCSD - + EApBearerTypeGPRS - + EApBearerTypeCDMA ) ) - { - // Get the current settings and then overwrite with the Iap - tablePref.iBearer.iIapId = aApItem.iWapIap; - tablePref.iBearer.iBearerSet = - KCommDbBearerCSD | KCommDbBearerWcdma; - view->UpdateBearerL( tablePref.iBearer ); - } - } - } - CleanupStack::PopAndDestroy(); // view - } - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::WriteIapDataL" ) ) ); - } - - - -// --------------------------------------------------------- -// CApDataHandler::WriteIspDataL -// --------------------------------------------------------- -// -void CApDataHandler::WriteIspDataL( TBool aIsNew, TUint32 aIspId, - CApAccessPointItem& aApItem ) - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::WriteIspDataL" ) ) ); - - aApItem.WriteUint( EApIapServiceId, aIspId ); - // internal function, caller MUST initiate a transaction, WE WILL NOT. - if ( ( aApItem.iIapServiceType->Compare( TPtrC(OUTGOING_WCDMA ) ) == 0 ) || - ( aApItem.iIapServiceType->Compare( TPtrC(INCOMING_WCDMA ) ) == 0 ) ) - { - WriteGprsDataL( aIsNew, aApItem ); - } - else - { - if ( ( aApItem.iIapServiceType->Compare( TPtrC(DIAL_IN_ISP) ) == 0 ) || - ( aApItem.iIapServiceType->Compare( TPtrC(DIAL_OUT_ISP) ) == 0 ) ) - { - WriteCsdDataL( aIsNew, aApItem ); - } - else - { // check if VPN - if ( aApItem.iIapServiceType->Compare( TPtrC(VPN_SERVICE) ) == 0 ) - { // currently, KErrNotSupported - User::Leave( KErrNotSupported ); - } - else - { - if ( aApItem.iIapServiceType->Compare( - TPtrC(LAN_SERVICE) ) == 0 ) - { - WriteLanDataL( aIsNew, aApItem ); - } - else - { - // something unknown, - User::Leave( KErrInvalidBearer ); - } - } - } - } - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::WriteIspDataL" ) ) ); - } - - - - -// --------------------------------------------------------- -// CApDataHandler::WriteGprsDataL -// --------------------------------------------------------- -// -void CApDataHandler::WriteGprsDataL( TBool aIsNew, - CApAccessPointItem& aApItem ) - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::WriteGprsDataL" ) ) ); - - CCommsDbTableView* table; - - if ( aIsNew ) - { - table = iDb->OpenTableLC( *aApItem.iIapServiceType ); - User::LeaveIfError( table->InsertRecord( aApItem.iIapServiceId ) ); - } - else - { - table = iDb->OpenViewMatchingUintLC( *aApItem.iIapServiceType, - TPtrC(COMMDB_ID), - aApItem.iIapServiceId ); - User::LeaveIfError( table->GotoFirstRecord() ); - User::LeaveIfError( table->UpdateRecord() ); - } - // now write record data - table->WriteTextL( TPtrC(COMMDB_NAME), *aApItem.iIspName ); - - table->WriteLongTextL( TPtrC(GPRS_APN), *aApItem.iGprsAccessPointName ); - - - if ( aApItem.iGprsPdpType == EIPv6 ) - { - table->WriteUintL( TPtrC(GPRS_PDP_TYPE), - RPacketContext::EPdpTypeIPv6 ); - } - else - { - table->WriteUintL( TPtrC(GPRS_PDP_TYPE), - RPacketContext::EPdpTypeIPv4 ); - } - - table->WriteTextL( TPtrC(GPRS_PDP_ADDRESS), *aApItem.iGprsPdpAddress ); - - table->WriteUintL( TPtrC(GPRS_REQ_PRECEDENCE), - aApItem.iGprsReqPrecedence ); - - table->WriteUintL( TPtrC(GPRS_REQ_DELAY), aApItem.iGprsReqDelay ); - - table->WriteUintL( TPtrC(GPRS_REQ_RELIABILITY), - aApItem.iGprsReqReliability ); - - table->WriteUintL( TPtrC(GPRS_REQ_PEAK_THROUGHPUT), - aApItem.iGprsReqPeakThroughput ); - - table->WriteUintL( TPtrC(GPRS_REQ_MEAN_THROUGHPUT), - aApItem.iGprsReqMeanPeakThroughput ); - - table->WriteUintL( TPtrC(GPRS_MIN_PRECEDENCE), - aApItem.iGprsMinPrecedence ); - - table->WriteUintL( TPtrC(GPRS_MIN_DELAY), aApItem.iGprsMinDelay ); - - table->WriteUintL( TPtrC(GPRS_MIN_RELIABILITY), - aApItem.iGprsMinReliability ); - - table->WriteUintL( TPtrC(GPRS_MIN_PEAK_THROUGHPUT), - aApItem.iGprsMinPeakThroughput ); - - table->WriteUintL( TPtrC(GPRS_MIN_MEAN_THROUGHPUT), - aApItem.iGprsMinMeanThroughput ); - - table->WriteBoolL( TPtrC(GPRS_DATA_COMPRESSION), - aApItem.iIspEnableSwCompression ); - - table->WriteBoolL( TPtrC(GPRS_HEADER_COMPRESSION), - aApItem.iEnablePPPCompression ); - - table->WriteBoolL( TPtrC(GPRS_ANONYMOUS_ACCESS), - aApItem.iGprsUseAnonymAccess ); - -/* -// Keep as long as replacing IF_NAME does not works as specified - table->WriteTextL( TPtrC(IF_NAME), *aApItem.iIspIfName ); -*/ - - table->WriteTextL( TPtrC(GPRS_IF_PARAMS), *aApItem.iIspIfParams ); - - table->WriteTextL( TPtrC(GPRS_IF_NETWORKS), *aApItem.iIspIfNetworks ); - - table->WriteBoolL( TPtrC(GPRS_IF_PROMPT_FOR_AUTH), - aApItem.iIspIfPromptForAuth ); - - table->WriteTextL( TPtrC(GPRS_IF_AUTH_NAME), *aApItem.iIspIfAuthName ); - - table->WriteTextL( TPtrC(GPRS_IF_AUTH_PASS), *aApItem.iIspIfAuthPass ); - - table->WriteUintL( TPtrC(GPRS_IF_AUTH_RETRIES), - aApItem.iIspIfAuthRetries ); - - table->WriteTextL( TPtrC(GPRS_IP_NETMASK), *aApItem.iIspIPNetMask ); - - table->WriteTextL( TPtrC(GPRS_IP_GATEWAY), *aApItem.iIspGateway ); - - table->WriteBoolL( TPtrC(GPRS_IP_ADDR_FROM_SERVER), - aApItem.iIspIPAddrFromServer ); - - table->WriteTextL( TPtrC(GPRS_IP_ADDR), *aApItem.iIspIPAddr ); - - table->WriteBoolL( TPtrC(GPRS_IP_DNS_ADDR_FROM_SERVER), - aApItem.iGetDNSIPFromServer ); - - table->WriteTextL( TPtrC(GPRS_IP_NAME_SERVER1), *aApItem.iPrimaryDNS ); - - table->WriteTextL( TPtrC(GPRS_IP_NAME_SERVER2), *aApItem.iSecondaryDNS ); - - table->WriteBoolL( TPtrC(GPRS_ENABLE_LCP_EXTENSIONS), - aApItem.iIspEnableLCPExtensions ); - - table->WriteBoolL( TPtrC(GPRS_DISABLE_PLAIN_TEXT_AUTH), - aApItem.iIsPasswordAuthenticationSecure ); - - table->WriteUintL( TPtrC(GPRS_AP_TYPE), aApItem.iIspType ); - - - // Agreed to use const... - table->WriteUintL( TPtrC(GPRS_QOS_WARNING_TIMEOUT), - TUint32(KGprsOsTimeout) ); - - if ( iExt->iIsIpv6Supported ) - { - WriteServiceIp6L( *table, aApItem ); - } - -// WriteDaemonL( *table, aApItem ); starts here - if ( aApItem.iIspIPAddrFromServer ) - { - table->WriteTextL( TPtrC(SERVICE_CONFIG_DAEMON_MANAGER_NAME), - KDaemonManagerName ); - table->WriteTextL( TPtrC(SERVICE_CONFIG_DAEMON_NAME), - KConfigDaemonName ); - } - else - { - // 3.1 it is changed!! - if ( FeatureManager::FeatureSupported( KFeatureIdIPv6 ) ) - { - table->WriteTextL( TPtrC(SERVICE_CONFIG_DAEMON_MANAGER_NAME), - KDaemonManagerName ); - table->WriteTextL( TPtrC(SERVICE_CONFIG_DAEMON_NAME), - KConfigDaemonName ); - } - else - { - table->WriteTextL( TPtrC(SERVICE_CONFIG_DAEMON_MANAGER_NAME), KEmpty ); - table->WriteTextL( TPtrC(SERVICE_CONFIG_DAEMON_NAME), KEmpty ); - } - } -// WriteDaemonL() Ends here - - // now put changes - User::LeaveIfError( table->PutRecordChanges( EFalse, EFalse ) ); - - CleanupStack::PopAndDestroy( table ); // table - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::WriteGprsDataL" ) ) ); - } - - - -// --------------------------------------------------------- -// CApDataHandler::WriteLanDataL -// --------------------------------------------------------- -// -void CApDataHandler::WriteLanDataL( TBool aIsNew, - CApAccessPointItem& aApItem ) - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::WriteLanDataL" ) ) ); - - CCommsDbTableView* table; - - if ( aIsNew ) - { - table = iDb->OpenTableLC( *aApItem.iIapServiceType ); - User::LeaveIfError( table->InsertRecord( aApItem.iIapServiceId ) ); - } - else - { - table = iDb->OpenViewMatchingUintLC( *aApItem.iIapServiceType, - TPtrC(COMMDB_ID), - aApItem.iIapServiceId ); - User::LeaveIfError( table->GotoFirstRecord() ); - User::LeaveIfError( table->UpdateRecord() ); - } - - // now write record data - WriteServiceL( *table, aApItem ); - - TApBearerType bearer = aApItem.BearerTypeL(); - - - if ( bearer == EApBearerTypeWLAN ) - { - if ( aApItem.iExt->iWlanData ) - { - - CCommsDbTableView* wlantable = NULL; - - if ( aIsNew ) - { - TUint32 dummy; - wlantable = iDb->OpenTableLC( TPtrC(WLAN_SERVICE) ); - User::LeaveIfError( wlantable->InsertRecord( dummy ) ); - aApItem.iExt->iWlanData->iWlanId = dummy; - } - else - { - // WLAN settings table backlinks to LAN service, - // so we query WLAN settings for a record - // where WLAN_SERVICE_ID is LAN_SERVICE's COMMDB_ID, - // which is aApItem.iIapServiceId... - wlantable = iDb->OpenViewMatchingUintLC( TPtrC(WLAN_SERVICE), - TPtrC(WLAN_SERVICE_ID), - aApItem.iIapServiceId ); - User::LeaveIfError( wlantable->GotoFirstRecord() ); - User::LeaveIfError( wlantable->UpdateRecord() ); - } - - // Add WLAN specific data storage - WriteWlanL( *wlantable, aApItem ); - User::LeaveIfError( wlantable->PutRecordChanges( EFalse, EFalse ) ); - CleanupStack::PopAndDestroy( wlantable ); // wlantable - } - else - { - // WLAN not supported, do not try to write it.... - User::Leave( KErrInvalidBearer ); - } - - } - - if ( iExt->iIsIpv6Supported ) - { - WriteServiceIp6L( *table, aApItem ); - } - - // now put changes - User::LeaveIfError( table->PutRecordChanges( EFalse, EFalse ) ); - CleanupStack::PopAndDestroy( table ); // table - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::WriteLanDataL" ) ) ); - } - - - -// --------------------------------------------------------- -// CApDataHandler::DoUpdateAccessPointDataL -// --------------------------------------------------------- -// -TUint32 CApDataHandler::DoUpdateAccessPointDataL - ( - CApAccessPointItem& aApItem, - TBool aIsNew, - TBool& aNameChanged - ) - { - CLOG( ( EHandler, 0, - _L( "-> CApDataHandler::DoUpdateAccessPointDataL" ) ) ); - - // internal function, caller MUST initiate a transaction, WE WILL NOT. - if ( aApItem.iWapAccessPointName->Length() == 0 ) - { - User::Leave( KErrInvalidName ); - } - - if ( aIsNew ) - { - HBufC* sgd = ApCommons::DoMakeValidNameL - ( - *iDb, - aNameChanged, - aApItem.iWapAccessPointName, - aApItem.iWapUid, - aIsNew - ); - if ( aNameChanged ) - { - CleanupStack::PushL( sgd ); - aApItem.SetNamesL( *sgd ); - CleanupStack::Pop( sgd ); - } - delete sgd; - } - else - { - // first check the existence of the access point, - // just to be on the sure side... - CCommsDbTableView* wapt; - wapt = iDb->OpenViewMatchingUintLC( TPtrC(WAP_ACCESS_POINT), - TPtrC(COMMDB_ID), aApItem.iWapUid ); - // if no other problem, will return KErrNone if it exists - // so we will go through to the next step. - // if returns KErrNotFound or any other problem, leave here. - User::LeaveIfError( wapt->GotoFirstRecord() ); - // now we need to destroy to create a new 'view' - CleanupStack::PopAndDestroy( wapt ); // wapt - - // now we can go on with the real stuff here... - // check if a record with the currently given name exists. - // No problem, if the UID is the same as ours, - // otherwise, leave because name already exists... - wapt = iDb->OpenViewMatchingTextLC( TPtrC(WAP_ACCESS_POINT), - TPtrC(COMMDB_NAME), - *aApItem.iWapAccessPointName ); - TInt res = wapt->GotoFirstRecord(); - if ( res == KErrNotFound ) - { // no such name - aNameChanged = EFalse; - } - else - { - if ( res == KErrNone ) - { - TUint32 id; - wapt->ReadUintL( TPtrC(COMMDB_ID), id ); - if ( id != aApItem.iWapUid ) - { - User::Leave( KErrAlreadyExists ); - } - } - else - { - User::LeaveIfError( res ); - } - } - CleanupStack::PopAndDestroy( wapt ); // wapt - } - - TBool NeedManualUpdate( ETrue ); - - // additional code for managing bearer-change starts here... - if ( !aIsNew ) - { // only check if update op. - // if bearer changed, it also UPDATES everything ! - // if no change, update MUST BE DONE HERE MANUALLY! - if ( HandleBearerChangeIfNeededL( aApItem ) ) - { - NeedManualUpdate = EFalse; - } - } - if ( NeedManualUpdate ) - { - WriteIspDataL( aIsNew, aApItem.iIapServiceId, aApItem ); - WriteNetworkDataL( aIsNew, aApItem ); - WriteIapDataL( aIsNew, aApItem.iWapIap, aApItem ); - WriteWapApDataL( aIsNew, aApItem.iWapUid, aApItem ); - WriteWapBearerDataL( aIsNew, aApItem.iWapUid, aApItem ); - if ( aApItem.HasProxy() ) - { - WriteProxyDataL( aIsNew, aApItem ); - } - else - { - if ( !aIsNew ) - { - TRAP_IGNORE( RemoveProxyDataL( aApItem.iIapServiceType, - aApItem.iIapServiceId ) ); - } - } - } - - CLOG( ( EHandler, 1, - _L( "<- CApDataHandler::DoUpdateAccessPointDataL" ) ) ); - return aApItem.iWapUid; - } - - - -// --------------------------------------------------------- -// CApDataHandler::SetDefaultIapIspL -// --------------------------------------------------------- -// -void CApDataHandler::SetDefaultIapIspL( TUint32 aUid ) - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::SetDefaultIapIspL" ) ) ); - - CApAccessPointItem* ap = CApAccessPointItem::NewLC(); - AccessPointDataL( aUid, *ap ); - // Get IAP uid from aUid record - // ap.iWapIap - // Dial In or Dial Out? - // ap.iWapIspType - // store it accordingly - switch ( ap->BearerTypeL() ) - { - case EApBearerTypeCSD: - case EApBearerTypeHSCSD: - { -// iDb->SetGlobalSettingL( TPtrC(DIAL_OUT_IAP), ap->iWapIap ); - SetPreferredIfDbIapTypeL - ( 1, // aRank, - ECommDbConnectionDirectionOutgoing, //aDirection, - KCommDbBearerCSD, // aBearers, - ECommDbDialogPrefDoNotPrompt, //aPrompt, - ap->iWapIap, //aIAP, - ETrue //aOverwrite - ); - break; - } - case EApBearerTypeGPRS: - case EApBearerTypeCDMA: - { - // Not applicable ! - User::Leave( KErrArgument ); - break; - } - default: - { - User::Leave( KErrInvalidIspRequest ); - } - } - CleanupStack::PopAndDestroy( ap ); // ap - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::SetDefaultIapIspL" ) ) ); - } - - - - - -// --------------------------------------------------------- -// CApDataHandler::RemoveWapBearerApL -// --------------------------------------------------------- -// -void CApDataHandler::RemoveWapBearerApL( TUint32 aUid ) - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::RemoveWapBearerApL" ) ) ); - - CCommsDbTableView* bearert; - bearert = iDb->OpenViewMatchingUintLC( TPtrC(WAP_IP_BEARER), - TPtrC(WAP_ACCESS_POINT_ID), aUid ); - - TInt res = bearert->GotoFirstRecord(); // OK. - if ( res == KErrNone ) - { // exists, delete it - User::LeaveIfError( bearert->DeleteRecord() ); - } - else - { - // silently ignore KErrNotFound. It is caused by incorrect DB, - // we are 'repairing it' this way. - if ( res != KErrNotFound ) - { - User::LeaveIfError( res ); - } - } - CleanupStack::PopAndDestroy( bearert ); // bearert - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::RemoveWapBearerApL" ) ) ); - } - - - -// --------------------------------------------------------- -// CApDataHandler::RemoveWapApL -// --------------------------------------------------------- -// -void CApDataHandler::RemoveWapApL( TUint32 aUid ) - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::RemoveWapApL" ) ) ); - - CCommsDbTableView* wapt = iDb->OpenViewMatchingUintLC( - TPtrC(WAP_ACCESS_POINT), - TPtrC(COMMDB_ID), aUid ); - TInt res = wapt->GotoFirstRecord(); // OK. - if ( res == KErrNone ) - { // exists, delete it - User::LeaveIfError( wapt->DeleteRecord() ); - } - else - { - // silently ignore KErrNotFound. It is caused by incorrect DB, - // we are 'repairing it' this way. - if ( res != KErrNotFound ) - { - User::Leave( res ); - } - } - CleanupStack::PopAndDestroy( wapt ); // wapt - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::RemoveWapApL" ) ) ); - } - - -// --------------------------------------------------------- -// CApDataHandler::RemoveIapL -// --------------------------------------------------------- -// -void CApDataHandler::RemoveIapL( TUint32 aUid ) - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::RemoveIapL" ) ) ); - - CCommsDbTableView* iapt; - iapt = iDb->OpenViewMatchingUintLC( TPtrC(IAP), - TPtrC(COMMDB_ID), aUid ); - TInt res = iapt->GotoFirstRecord(); // OK. - if ( res == KErrNone ) - { // exists, delete it - User::LeaveIfError( iapt->DeleteRecord() ); - } - else - { - // silently ignore KErrNotFound. It is caused by incorrect DB, - // we are 'repairing it' this way. - if ( res != KErrNotFound ) - { - User::Leave( res ); - } - } - CleanupStack::PopAndDestroy( iapt ); // iapt - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::RemoveIapL" ) ) ); - } - - - -// --------------------------------------------------------- -// CApDataHandler::RemoveIspL -// --------------------------------------------------------- -// -void CApDataHandler::RemoveIspL( TUint32 aUid, TBool aOut ) - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::RemoveIspL" ) ) ); - - CCommsDbTableView* ispt; - if ( aOut ) - { - ispt = iDb->OpenViewMatchingUintLC( TPtrC(DIAL_OUT_ISP), - TPtrC(COMMDB_ID), aUid ); - } - else - { - ispt = iDb->OpenViewMatchingUintLC( TPtrC(DIAL_IN_ISP), - TPtrC(COMMDB_ID), aUid ); - } - - TInt res = ispt->GotoFirstRecord(); // OK. - if ( res == KErrNone ) - { // exists, delete it - User::LeaveIfError( ispt->DeleteRecord() ); - } - else - { - // silently ignore KErrNotFound. It is caused by incorrect DB, - // we are 'repairing it' this way. - if ( res != KErrNotFound ) - { - User::Leave( res ); - } - } - CleanupStack::PopAndDestroy( ispt ); // ispt - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::RemoveIspL" ) ) ); - } - - - -// --------------------------------------------------------- -// CApDataHandler::RemoveGprsL -// --------------------------------------------------------- -// -void CApDataHandler::RemoveGprsL( TUint32 aUid, TBool aOut ) - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::RemoveGprsL" ) ) ); - - CCommsDbTableView* table; - if ( aOut ) - { - table = iDb->OpenViewMatchingUintLC( TPtrC(OUTGOING_WCDMA), - TPtrC(COMMDB_ID), aUid ); - } - else - { - table = iDb->OpenViewMatchingUintLC( TPtrC(INCOMING_WCDMA), - TPtrC(COMMDB_ID), aUid ); - } - - TInt res = table->GotoFirstRecord(); // O.K. - if ( res == KErrNone ) - { // exists, delete it - User::LeaveIfError( table->DeleteRecord() ); - } - else - { - // silently ignore KErrNotFound. It is caused by incorrect DB, - // we are 'repairing it' this way. - if ( res != KErrNotFound ) - { - User::Leave( res ); - } - } - - CleanupStack::PopAndDestroy( table ); // table - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::RemoveGprsL" ) ) ); - } - - -// --------------------------------------------------------- -// CApDataHandler::RemoveLanL -// --------------------------------------------------------- -// -void CApDataHandler::RemoveLanL( TUint32 aUid ) - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::RemoveLanL" ) ) ); - - CCommsDbTableView* table = iDb->OpenViewMatchingUintLC - ( TPtrC(LAN_SERVICE), TPtrC(COMMDB_ID), aUid ); - - TInt res = table->GotoFirstRecord(); // O.K. - if ( res == KErrNone ) - { // exists, delete it - User::LeaveIfError( table->DeleteRecord() ); - } - else - { - // silently ignore KErrNotFound. It is caused by incorrect DB, - // we are 'repairing it' this way. - if ( res != KErrNotFound ) - { - User::Leave( res ); - } - } - CleanupStack::PopAndDestroy( table ); // table - - // try to remove WLAN part, if it has any - // TRAP and ignore if not found - TRAP( res, RemoveWlanL( aUid ) ); - if ( res != KErrNotFound ) - { - User::LeaveIfError( res ); - } - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::RemoveLanL" ) ) ); - } - - - -// --------------------------------------------------------- -// CApDataHandler::RemoveWlanL -// --------------------------------------------------------- -// -void CApDataHandler::RemoveWlanL( TUint32 aUid ) - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::RemoveWlanL - ERROR: not suported" ) ) ); - User::Leave( KErrNotSupported ); - } - - - -// --------------------------------------------------------- -// CApDataHandler::HandleBearerChangeIfNeededL -// --------------------------------------------------------- -// -TBool CApDataHandler::HandleBearerChangeIfNeededL - ( CApAccessPointItem& aApItem ) - { - CLOG( ( EHandler, 0, - _L( "-> CApDataHandler::HandleBearerChangeIfNeededL" ) ) ); - - TApBearerType anew = aApItem.BearerTypeL(); - - CApUtils* au = CApUtils::NewLC( *iDb ); - TApBearerType aold = au->BearerTypeL( aApItem.iWapUid ); - // if different WAP_Bearer table, OR different IAP_SERVICE table, - // delete old ones and save current as NEW records - // under the SAME iWapUid ! - - TBool retval( EFalse ); - if ( ( aold != anew ) && - !( - (( aold == EApBearerTypeHSCSD ) && ( anew == EApBearerTypeCSD ) ) - || - ( ( aold == EApBearerTypeCSD ) && ( anew == EApBearerTypeHSCSD ) ) - ) - ) - {// different bearers! - HBufC* buf = HBufC::NewLC( KModifiableTextLength ); - TPtr ptr( buf->Des() ); - au->WapBearerTypeL( aApItem.iWapUid, ptr ); - - CApAccessPointItem* apitem = CApAccessPointItem::NewLC(); - AccessPointDataL( aApItem.iWapUid, *apitem ); - - if ( *aApItem.iWapBearer != ptr ) - { - // if different WAP_Bearer table, delete old wap_bearer - // & if needed, IAP, ISP, GPRS, CDMA, too - // and Crete new wap bearer & if needed, IAP, ISP, GPRS, CDMA, too - if ( *apitem->iWapBearer == TPtrC(WAP_IP_BEARER) ) - { - // e.g.:RemoveIpBearer(iIapServiceType, iIapServiceId, - // iWapIap ) - if ( ( *apitem->iIapServiceType == TPtrC(DIAL_OUT_ISP) ) - || ( *apitem->iIapServiceType == TPtrC(DIAL_IN_ISP) ) ) - { // ISP - RemoveIspL( apitem->iIapServiceId, - ( *apitem->iIapServiceType == TPtrC(DIAL_OUT_ISP) ) ); - } - else if( ( *apitem->iIapServiceType == - TPtrC(OUTGOING_WCDMA) ) - || ( *apitem->iIapServiceType == - TPtrC(INCOMING_WCDMA) ) ) - {// Gprs - RemoveGprsL( apitem->iIapServiceId, - ( *apitem->iIapServiceType == - TPtrC(OUTGOING_WCDMA) ) ); - } - else - { - // check if WLAN - if ( aApItem.iExt->iWlanData ) - { - RemoveLanL( apitem->iIapServiceId ); - } - else - { - // no leave on else Unknown, as we are deleting - // so silently ignore the error... - } - } - RemoveIapL( apitem->iWapIap ); - RemoveWapBearerApL( aApItem.iWapUid ); - } - else - { // SMS - User::Leave( KErrInvalidBearerType ); - } - RemoveProxyDataL( apitem->iIapServiceType, apitem->iIapServiceId ); - WriteIspDataL( ETrue, aApItem.iIapServiceId, aApItem ); - WriteIapDataL( ETrue, aApItem.iWapIap, aApItem ); - - // gets the UID needed for Bearer table - WriteWapApDataL( EFalse, aApItem.iWapUid, aApItem ); - // needs new bearer record - WriteWapBearerDataL( ETrue, aApItem.iWapUid, aApItem ); - if ( aApItem.HasProxy() ) - { - WriteProxyDataL( ETrue, aApItem ); - } - } - else - { // bearer table is same, but IAP_SERVICE is different - if ( ( aold == EApBearerTypeHSCSD ) || - ( aold == EApBearerTypeCSD ) ) - { - RemoveIspL( apitem->iIapServiceId, - ( *apitem->iIapServiceType == TPtrC(DIAL_OUT_ISP) ) ); - } - else if ( ( *apitem->iIapServiceType == - TPtrC(OUTGOING_WCDMA) ) - || ( *apitem->iIapServiceType == - TPtrC(INCOMING_WCDMA) ) ) - { - RemoveGprsL( apitem->iIapServiceId, - ( *apitem->iIapServiceType == TPtrC(OUTGOING_WCDMA) ) ); - } - else - { - // check if WLAN - if ( aApItem.iExt->iWlanData ) - { - RemoveLanL( apitem->iIapServiceId ); - } - else - { - // no leave on else Unknown, as we are deleting - // so silently ignore the error... - } - } - RemoveProxyDataL( apitem->iIapServiceType, apitem->iIapServiceId ); - WriteIspDataL( ETrue, aApItem.iIapServiceId, aApItem ); - WriteIapDataL( EFalse, aApItem.iWapIap, aApItem ); - // gets the UID needed for Bearer table - WriteWapApDataL( EFalse, aApItem.iWapUid, aApItem ); - WriteWapBearerDataL( EFalse, aApItem.iWapUid, aApItem ); - if ( aApItem.HasProxy() ) - { - WriteProxyDataL( ETrue, aApItem ); - } - } - CleanupStack::PopAndDestroy( 2, buf ); // apitem, buf - retval = ETrue; - } - CleanupStack::PopAndDestroy( au ); // au - // additional code for managing bearer-change ends here... - - CLOG( ( EHandler, 1, - _L( "<- CApDataHandler::HandleBearerChangeIfNeededL" ) ) ); - return retval; - } - - - - - -// --------------------------------------------------------- -// CApDataHandler::DoAccessPointDataL -// --------------------------------------------------------- -// -void CApDataHandler::DoAccessPointDataL( TUint32 aUid, - CApAccessPointItem& aApItem ) - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::DoAccessPointDataL" ) ) ); - - ReadWapDataL( aUid, aApItem ); - - if ( *aApItem.iWapBearer == TPtrC(WAP_IP_BEARER) ) - { - ReadIapDataL( aApItem.iWapIap, aApItem ); - ReadNetworkDataL( aApItem ); - ReadIspDataL( aApItem.iIapServiceId, aApItem ); - } - ReadProxyDataL( aApItem ); - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::DoAccessPointDataL" ) ) ); - } - - -// --------------------------------------------------------- -// CApDataHandler::DoRemoveAPL -// --------------------------------------------------------- -// -void CApDataHandler::DoRemoveAPL( TUint32 aUid ) - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::DoRemoveAPL" ) ) ); - - CApUtils* utils = CApUtils::NewLC( *iDb ); - if ( utils->IsAPInUseL( aUid ) ) - { - User::Leave( KErrInUse ); - } - CleanupStack::PopAndDestroy( utils ); // utils - - CCommsDbTableView* wapt; - wapt = iDb->OpenViewMatchingUintLC( TPtrC(WAP_ACCESS_POINT), - TPtrC(COMMDB_ID), aUid ); - User::LeaveIfError( wapt->GotoFirstRecord() ); - HBufC* buf = HBufC::NewLC( KCommsDbSvrMaxFieldLength ); - TPtr ptr( buf->Des() ); - wapt->ReadTextL( TPtrC(WAP_CURRENT_BEARER), - ptr ); // see declaration for comments! - - if ( *buf == TPtrC(WAP_IP_BEARER) ) - { - // get serviceType - CCommsDbTableView* bearert; - bearert = iDb->OpenViewMatchingUintLC( TPtrC(WAP_IP_BEARER), - TPtrC(WAP_ACCESS_POINT_ID), - aUid ); - - User::LeaveIfError( bearert->GotoFirstRecord() ); - TUint32 iapid; - ApCommons::ReadUintL( bearert, TPtrC(WAP_IAP), iapid ); - - CCommsDbTableView* iapt; - iapt = iDb->OpenViewMatchingUintLC( TPtrC(IAP), TPtrC(COMMDB_ID), - iapid ); - - User::LeaveIfError( iapt->GotoFirstRecord() ); - HBufC* servicetype = HBufC::NewLC( KCommsDbSvrMaxFieldLength ); - TPtr servptr( servicetype->Des() ); - iapt->ReadTextL( TPtrC(IAP_SERVICE_TYPE), servptr ); - TUint32 ispid; - iapt->ReadUintL( TPtrC(IAP_SERVICE), ispid ); - TUint32 networkid; - iapt->ReadUintL( TPtrC(IAP_NETWORK), networkid ); - RemoveNetworkDataL( networkid ); - if ( ( *servicetype == TPtrC(DIAL_OUT_ISP) ) || - ( *servicetype == TPtrC(DIAL_IN_ISP) ) ) - { // ISP - RemoveIspL( ispid, ( *servicetype == TPtrC(DIAL_OUT_ISP)) ); - RemoveIapL( iapid ); - } - else - { // Gprs - if ( ( *servicetype == TPtrC(OUTGOING_WCDMA) ) || - ( *servicetype == TPtrC(INCOMING_WCDMA) ) ) - { - RemoveGprsL( ispid, ( *servicetype == TPtrC(OUTGOING_WCDMA)) ); - RemoveIapL( iapid ); - } - else - { - if ( *servicetype ==TPtrC(LAN_SERVICE) ) - { - // LAN, WLAN - RemoveLanL( ispid ); - RemoveIapL( iapid ); - } - else - { - // VPN... - } - } - } - RemoveProxyDataL( servicetype, ispid ); - RemoveWapBearerApL( aUid ); - CleanupStack::PopAndDestroy( 3, bearert ); // servicetype,iapt,bearert - } - else - { // sms, - User::Leave( KErrInvalidBearerType ); - } - - RemoveWapApL( aUid ); - - CleanupStack::PopAndDestroy( 2, wapt ); // buf, wapt - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::DoRemoveAPL" ) ) ); - } - - - -// --------------------------------------------------------- -// CApDataHandler::DoSetAsDefaultL -// --------------------------------------------------------- -// -void CApDataHandler::DoSetAsDefaultL( TUint32 aUid, - TCommsDbIspType aIntendedType ) - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::DoSetAsDefaultL" ) ) ); - - // Due to changes in the database, ONLY WAP_ACCESS_POINT_ID - switch ( aIntendedType ) - { - case EIspTypeInternetOnly: - { - SetDefaultIapIspL( aUid ); - break; - } - case EIspTypeWAPOnly: - { - iDb->SetGlobalSettingL( TPtrC(WAP_ACCESS_POINT), aUid ); - break; - } - case EIspTypeInternetAndWAP: - { - iDb->SetGlobalSettingL( TPtrC(WAP_ACCESS_POINT), aUid ); - SetDefaultIapIspL( aUid ); - break; - } - default : - { - __ASSERT_DEBUG( EFalse, User::Panic( KErrInvalidIntendedType, - aIntendedType ) ); - break; - } - } - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::DoSetAsDefaultL" ) ) ); - } - - - -// --------------------------------------------------------- -// CApDataHandler::DoSetPreferredIfDbIapTypeL -// --------------------------------------------------------- -// -void CApDataHandler::DoSetPreferredIfDbIapTypeL( - TUint32 aRank, - TCommDbConnectionDirection aDirection, - TUint32 aBearers, - TCommDbDialogPref aPrompt, - TUint32 aIAP, - TBool aOverwrite - ) - { - CLOG( ( EHandler, 0, - _L( "-> CApDataHandler::DoSetPreferredIfDbIapTypeL" ) ) ); - - CCommsDbConnectionPrefTableView* preft = - iDb->OpenConnectionPrefTableViewOnRankLC( aDirection, aRank ); - if ( aOverwrite ) - { - TInt res = preft->GotoFirstRecord(); // OK. - if ( res == KErrNone ) - { // already exists, delete original and store the new one... - preft->DeleteConnectionPreferenceL(); - } - else - { - // silently ignore KErrNotFound. - // It is not an error in this case. - if ( res != KErrNotFound ) - { - User::Leave( res ); - } - } - } - CCommsDbConnectionPrefTableView::TCommDbIapConnectionPref pref; - pref.iRanking = aRank; - pref.iBearer.iBearerSet = aBearers; - pref.iDialogPref = aPrompt; - pref.iBearer.iIapId = aIAP; - pref.iDirection = aDirection; - preft->InsertConnectionPreferenceL( pref ); - CleanupStack::PopAndDestroy( preft ); // preft - - CLOG( ( EHandler, 1, - _L( "<- CApDataHandler::DoSetPreferredIfDbIapTypeL" ) ) ); - } - - - -// --------------------------------------------------------- -// CApDataHandler::DoSetPreferredIfDbIspTypeL -// --------------------------------------------------------- -// -void CApDataHandler::DoSetPreferredIfDbIspTypeL( - TUint32 /*aRank*/, - TCommDbConnectionDirection /*aDirection*/, - TUint32 /*aBearers*/, - TCommDbDialogPref /*aPrompt*/, - TUint32 /*aISP*/, - TUint32 /*aChargeCard*/, - const TDesC& /*aServiceType*/, - TBool /*aOverwrite*/ - ) - { - /* - DEPRECATED!!! - */ - CLOG( ( EHandler, 0, - _L( "<-> CApDataHandler::DoSetPreferredIfDbIspTypeL" ) ) ); - - User::Leave( KErrNotSupported ); - } - - - -// --------------------------------------------------------- -// CApDataHandler::ApSpeed2EtelL -// --------------------------------------------------------- -// -void CApDataHandler::ApSpeed2EtelL( CApAccessPointItem* aItem ) - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::ApSpeed2EtelL" ) ) ); - - __ASSERT_DEBUG( (aItem), ApCommons::Panic( ENullPointer ) ) ; - - /***************************************************** - * Series 60 Customer / ETel - * Series 60 ETel API - *****************************************************/ - - TInt bear = CSD; - switch ( aItem->BearerTypeL() ) - { - case EApBearerTypeCSD: - { - // search for (CSD, x, x) - bear = CSD; - break; - } - case EApBearerTypeHSCSD: - { - // HSCSD - // search for (HCSD, x, x) - bear = HSCSD; - break; - } - default: - { - // it is called only for CSD/HSCSD bearers, but to be sure... - __ASSERT_DEBUG( EFalse, ApCommons::Panic( ENotSupported ) ) ; - User::Leave( KErrInvalidBearerType ); - break; - } - } - - TInt type = Analogue; - switch ( aItem->iBearerCallTypeIsdn ) - { - case ECallTypeAnalogue: - { - type = Analogue; - break; - } - case ECallTypeISDNv110: - { - type = V110; - break; - } - case ECallTypeISDNv120: - { - type = V120; - break; - } - default: - { - // it has only 3 states, but to be sure... - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidSpeed ) ) ; - User::Leave( KErrInvalidBearerType ); - break; - } - } - - TBool found(EFalse); - // just get count once... - TInt count = sizeof(SpeedData)/sizeof(SpeedData[0]); - - for( TInt i=0; iiMaxConnSpeed ) ) - { - // wwe found it, get values, break - // Bearer_name, Bearer speed, Bearer_ce, Bearer_type - aItem->WriteUint( EApIspBearerName, SpeedData[i][3] ); - aItem->iExt->iBearerSpeed = SpeedData[i][4]; - aItem->WriteUint( EApIspBearerCE, SpeedData[i][5] ); - aItem->WriteUint( EApIspBearerType, SpeedData[i][6] ); - - - // Channel coding, Aiur, Req.Slot, MaxSlot, - aItem->WriteUint( EApIspChannelCoding, SpeedData[i][7] ); - aItem->WriteUint( EApIspAIUR, SpeedData[i][8] ); - aItem->WriteUint( EApIspRequestedTimeSlots, SpeedData[i][9] ); - aItem->WriteUint( EApIspMaximumTimeSlots, SpeedData[i][10] ); - - // Bearer_service, Bearer_Protocol - aItem->WriteUint( EApIapBearerService, SpeedData[i][11] ); - aItem->iExt->iBearerProtocol = SpeedData[i][12]; - - i = count; - found = ETrue; - } - } - if ( !found ) - { - // if not found, someone set an invalid speed in the engine - // which already should have been checked, - // just to be on the sure side - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidSpeed ) ) ; - User::Leave(KErrNotFound); - } - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::ApSpeed2EtelL" ) ) ); - } - - - -// --------------------------------------------------------- -// CApDataHandler::EtelSpeed2ApL -// --------------------------------------------------------- -// -void CApDataHandler::EtelSpeed2ApL( CApAccessPointItem& aItem ) - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::EtelSpeed2ApL" ) ) ); - - // ************* ALERT *************** - // We utilise the fact that this is called right after the data - // had been read from the DB and the - // aItem.iMaxConnSpeed and aItem.iBearerCallTypeIsdn members - // are holding the CommsDb style values. - // now we are converting it to our style as the API is fixed - // and so are the used enums... - - /***************************************************** - * Series 60 Customer / ETel - * Series 60 ETel API - *****************************************************/ - - TBool found(EFalse); - // just get count once... - TInt count = sizeof(SpeedData)/sizeof(SpeedData[0]); - - for( TInt i=0; iiBearerSpeed ) - && ( SpeedData[i][5] == aItem.iIspBearerCE ) - && ( SpeedData[i][6] == aItem.iIspBearerType ) - && ( SpeedData[i][7] == aItem.iIspChannelCoding ) - && ( SpeedData[i][8] == aItem.iIspAIUR ) - && ( SpeedData[i][9] == aItem.iIspRequestedTimeSlots ) - && ( SpeedData[i][10] == aItem.iIspMaximumTimeSlots ) - && ( SpeedData[i][11] == aItem.iApIapBearerService ) - && ( SpeedData[i][12] == aItem.iExt->iBearerProtocol ) ) - { - // we found it, get values, break - switch ( SpeedData[i][0] ) - { - case CSD: - { - aItem.iIspBearerType = EBearerTypeCSD; - break; - } - case HSCSD: - { - aItem.iIspBearerType = EBearerTypeHSCSD; - break; - } - default: - { // incorrect db, repair... - aItem.iIspBearerType = EBearerTypeCSD; - break; - } - } - - - switch ( SpeedData[i][1]) - { - case Analogue: - { - aItem.iBearerCallTypeIsdn = ECallTypeAnalogue; - break; - } - case V110: - { - aItem.iBearerCallTypeIsdn = ECallTypeISDNv110; - break; - } - case V120: - { - aItem.iBearerCallTypeIsdn = ECallTypeISDNv120; - break; - } - default: - { - // incorrect db, repair... - aItem.iBearerCallTypeIsdn = ECallTypeAnalogue; - break; - } - } - - aItem.iMaxConnSpeed = TApCallSpeed(SpeedData[i][2]); - i = count; - found = ETrue; - } - } - if ( !found ) - { - // if not found, someone set an invalid speed in the engine - // which already should have been checked, - // just to be on the sure side - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidSpeed ) ) ; - User::Leave(KErrNotFound); - } - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::EtelSpeed2ApL" ) ) ); - - } - - - -// Getting default access point -// --------------------------------------------------------- -// CApDataHandler::DoGetDefaultL -// --------------------------------------------------------- -// -TUint32 CApDataHandler::DoGetDefaultL( TBool aIsWap, - TBool* aReadOnly ) const - { // client MUST initiate a transaction, we will NOT ! - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::DoGetDefaultL" ) ) ); - - TUint32 value( KErrNone ); - if ( aIsWap ) - { - iDb->GetGlobalSettingL( TPtrC(WAP_ACCESS_POINT), value ); - } - else - { - TUint32 tmp( 0 ); - // CONST_CAST added later, originally used other code, - // when moved to 2.0, support was removed and needed - // to use own (non-const) - // method which can not be made const as it is part of the public API - CONST_CAST( CApDataHandler*, this )->GetPreferredIfDbIapTypeL - ( 1, // Rank - ECommDbConnectionDirectionOutgoing, - tmp, // aBearers, - tmp, // aPrompt, - value // aIAP - ); - } - - if ( aReadOnly ) - { // get read-only flag for an AP - CCommsDbTableView* wapt = - iDb->OpenViewMatchingUintLC( TPtrC(WAP_ACCESS_POINT), - TPtrC(COMMDB_ID), value); - User::LeaveIfError( wapt->GotoFirstRecord() ); - *aReadOnly = ApCommons::DoGetReadOnlyL( *wapt ); - CleanupStack::PopAndDestroy( wapt ); - } - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::DoGetDefaultL" ) ) ); - return value; - } - - -// --------------------------------------------------------- -// CApDataHandler::WriteProxyDataL -// --------------------------------------------------------- -// -void CApDataHandler::WriteProxyDataL( TBool aIsNew, - const CApAccessPointItem& aApItem ) - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::WriteProxyDataL" ) ) ); - - CCommsDbTableView* proxies; - if ( aIsNew ) - { - proxies = iDb->OpenTableLC( TPtrC(PROXIES) ); - // variable needed just to be able to make the call... - TUint32 dummy; - User::LeaveIfError( proxies->InsertRecord( dummy ) ); - } - else - { - // Add test cases covering this route - proxies = iDb->OpenViewMatchingTextLC( TPtrC(PROXIES), - TPtrC(PROXY_SERVICE_TYPE), - *aApItem.iIapServiceType ); - TInt err = proxies->GotoFirstRecord(); - if ( err == KErrNotFound ) - { // originally there were NO proxy, but now it is added - // variable needed just to be able to make the call... - // Add test cases covering this route - TUint32 dummy; - User::LeaveIfError( proxies->InsertRecord( dummy ) ); - } - else - { - // Add test cases covering this route - // now check if we have our record - TUint32 uval; - TBool found( EFalse ); - do - { - // Add test cases covering this route - proxies->ReadUintL( TPtrC(PROXY_ISP), uval ); - if ( uval == aApItem.iIapServiceId ) - { - found = ETrue; - } - else - { - err = proxies->GotoNextRecord(); - } - } while ( (!err) && (!found) ); - if ( !found ) - { // no proxy record, add it now - // variable needed just to be able to make the call... - TUint32 dummy; - User::LeaveIfError( proxies->InsertRecord( dummy ) ); - } - else - { // we found our proxy, use it... - User::LeaveIfError( proxies->UpdateRecord() ); - } - } - } - proxies->WriteUintL( TPtrC(PROXY_ISP), aApItem.iIapServiceId ); - proxies->WriteTextL( TPtrC(PROXY_SERVICE_TYPE), - *aApItem.iIapServiceType ); - - - proxies->WriteLongTextL( TPtrC(PROXY_SERVER_NAME), - *aApItem.iApProxyServerAddress); - - proxies->WriteTextL( TPtrC(PROXY_PROTOCOL_NAME), - *aApItem.iApProxyProtocolName ); - - proxies->WriteUintL( TPtrC(PROXY_PORT_NUMBER), - aApItem.iApProxyPortNumber ); - - proxies->WriteBoolL( TPtrC(PROXY_USE_PROXY_SERVER), - aApItem.iApProxyUseProxy ); - - proxies->WriteLongTextL( TPtrC(PROXY_EXCEPTIONS), - *aApItem.iApProxyExceptions ); - - User::LeaveIfError( proxies->PutRecordChanges( EFalse, EFalse ) ); - - CleanupStack::PopAndDestroy( proxies ); // proxies - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::WriteProxyDataL" ) ) ); - } - - -// --------------------------------------------------------- -// CApDataHandler::ReadProxyDataL -// --------------------------------------------------------- -// -void CApDataHandler::ReadProxyDataL( CApAccessPointItem& aApItem ) - { - // internal function, caller MUST initiate a transaction, WE WILL NOT. - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::ReadProxyDataL" ) ) ); - - // Add test cases covering ALL routes of this function - - CCommsDbTableView* proxies; - proxies = iDb->OpenViewMatchingTextLC( TPtrC(PROXIES), - TPtrC(PROXY_SERVICE_TYPE), - *aApItem.iIapServiceType ); - - TInt err = proxies->GotoFirstRecord(); - - if ( err != KErrNotFound ) - { - User::LeaveIfError( err ); - } - - if ( err != KErrNotFound ) - { - // we have some proxy, now found our record... - TUint32 uval; - TBool found( EFalse ); - do - { - proxies->ReadUintL( TPtrC(PROXY_ISP), uval ); - if ( uval == aApItem.iIapServiceId ) - { - found = ETrue; - } - else - { - err = proxies->GotoNextRecord(); - } - } while ( (!err) && (!found) ); - if ( found ) - { - HBufC* buf = ApCommons::ReadLongTextLC( proxies, - TPtrC(PROXY_SERVER_NAME), - err ); - if ( err != KErrUnknown ) - { - aApItem.WriteLongTextL( EApProxyServerAddress, *buf ); - } - - CleanupStack::PopAndDestroy( buf ); - buf = ApCommons::ReadText16ValueLC( proxies, - TPtrC(PROXY_PROTOCOL_NAME) ); - aApItem.WriteTextL( EApProxyProtocolName, *buf ); - CleanupStack::PopAndDestroy( buf ); - - TUint32 tempint( 0 ); - TBool tempbool( EFalse ); - - ApCommons::ReadUintL( proxies, TPtrC(PROXY_PORT_NUMBER), tempint ); - aApItem.WriteUint( EApProxyPortNumber, tempint ); - - - ApCommons::ReadBoolL( proxies, - TPtrC(PROXY_USE_PROXY_SERVER), - tempbool ); - aApItem.WriteBool( EApProxyUseProxy, tempbool ); - - buf = ApCommons::ReadLongTextLC( proxies, - TPtrC(PROXY_EXCEPTIONS), - err ); - aApItem.WriteLongTextL( EApProxyExceptions, *buf ); - - CleanupStack::PopAndDestroy( buf ); - } - } - CleanupStack::PopAndDestroy( proxies ); // proxies, sqlbuf - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::ReadProxyDataL" ) ) ); - } - - - -// --------------------------------------------------------- -// CApDataHandler::RemoveProxyDataL -// --------------------------------------------------------- -// -void CApDataHandler::RemoveProxyDataL( HBufC* aServiceType, TUint32 aIspId ) - { - // internal function, caller MUST initiate a transaction, WE WILL NOT. - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::RemoveProxyDataL" ) ) ); - - // Add test cases covering ALL routes of this function - - CCommsDbTableView* proxies; - proxies = iDb->OpenViewMatchingTextLC( TPtrC(PROXIES), - TPtrC(PROXY_SERVICE_TYPE), - *aServiceType ); - - TInt err = proxies->GotoFirstRecord(); - - if ( err != KErrNotFound ) - { - User::LeaveIfError( err ); - } - - if ( err != KErrNotFound ) - { - // we have some proxy, now found our record... - TUint32 uval; - TBool found( EFalse ); - do - { - proxies->ReadUintL( TPtrC(PROXY_ISP), uval ); - if ( uval == aIspId ) - { - found = ETrue; - } - else - { - err = proxies->GotoNextRecord(); - } - } while ( (!err) && (!found) ); - if ( found ) - { - if ( err == KErrNone ) - { - User::LeaveIfError( proxies->DeleteRecord() ); - } - else - { - // silently ignore KErrNotFound. It is caused by incorrect DB, - // we are 'repairing it' this way. - if ( err != KErrNotFound ) - { - User::LeaveIfError( err ); - } - } - } - } - CleanupStack::PopAndDestroy( proxies ); // proxies - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::RemoveProxyDataL" ) ) ); - } - - - - -// --------------------------------------------------------- -// CApDataHandler::WriteNetworkDataL -// --------------------------------------------------------- -// -void CApDataHandler::WriteNetworkDataL( TBool aIsNew, - CApAccessPointItem& aApItem ) - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::WriteNetworkDataL" ) ) ); - - if ( aApItem.iNetworkName->Compare( KEmpty ) != 0 ) - { - CCommsDbTableView* networks; - HBufC* buf = HBufC::NewLC( KApEngineMaxSql ); - if ( aIsNew ) - { - networks = iDb->OpenTableLC( TPtrC(NETWORK) ); - TUint32 netid; - User::LeaveIfError( networks->InsertRecord( netid ) ); - aApItem.iNetworkId = netid; - } - else - { - networks = iDb->OpenViewMatchingUintLC( TPtrC(NETWORK), - TPtrC(COMMDB_ID), - aApItem.iNetworkId ); - TInt err = networks->GotoFirstRecord(); - if ( err == KErrNotFound ) - { - // originally there were NO network, but now it is added - TUint32 netid; - User::LeaveIfError( networks->InsertRecord( netid ) ); - aApItem.iNetworkId = netid; - } - else - { - User::LeaveIfError( networks->UpdateRecord() ); - } - } - networks->WriteTextL( TPtrC(COMMDB_NAME), *aApItem.iNetworkName ); - - User::LeaveIfError( networks->PutRecordChanges( EFalse, EFalse ) ); - - CleanupStack::PopAndDestroy( networks ); // networks - CleanupStack::PopAndDestroy( buf ); // buf - } - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::WriteNetworkDataL" ) ) ); - } - - -// --------------------------------------------------------- -// CApDataHandler::ReadNetworkDataL -// --------------------------------------------------------- -// -void CApDataHandler::ReadNetworkDataL( CApAccessPointItem& aApItem ) - { - // internal function, caller MUST initiate a transaction, WE WILL NOT. - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::ReadNetworkDataL" ) ) ); - - CCommsDbTableView* networks; - networks = iDb->OpenViewMatchingUintLC( TPtrC(NETWORK), - TPtrC(COMMDB_ID), - aApItem.iNetworkId ); - - TInt err = networks->GotoFirstRecord(); - - if ( err != KErrNotFound ) - { - User::LeaveIfError( err ); - } - if ( err != KErrNotFound ) - { - HBufC* buf = ApCommons::ReadText16ValueLC( networks, - TPtrC(COMMDB_NAME) ); - if ( err != KErrUnknown ) - { - aApItem.WriteTextL( EApNetworkName, *buf ); - } - - CleanupStack::PopAndDestroy( buf ); - } - else - { // not found, set to NONE - aApItem.WriteTextL( EApNetworkName, KEmpty ); - } - CleanupStack::PopAndDestroy( networks ); // networks - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::ReadNetworkDataL" ) ) ); - } - - - -// --------------------------------------------------------- -// CApDataHandler::RemoveNetworkDataL -// --------------------------------------------------------- -// -void CApDataHandler::RemoveNetworkDataL( TUint32 aIspId ) - { - // internal function, caller MUST initiate a transaction, WE WILL NOT. - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::RemoveNetworkDataL" ) ) ); - - CCommsDbTableView* networks; - networks = iDb->OpenViewMatchingUintLC( TPtrC(NETWORK), - TPtrC(COMMDB_ID), - aIspId ); - - TInt err = networks->GotoFirstRecord(); - - if ( err == KErrNone ) - { - User::LeaveIfError( networks->DeleteRecord() ); - } - else - { - // silently ignore KErrNotFound. It is caused by incorrect DB, - // we are 'repairing it' this way. - if ( err != KErrNotFound ) - { - User::LeaveIfError( err ); - } - } - CleanupStack::PopAndDestroy( networks ); // networks, buf - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::RemoveNetworkDataL" ) ) ); - } - - - -// --------------------------------------------------------- -// CApDataHandler::GetLocationIdL -// --------------------------------------------------------- -// -TUint32 CApDataHandler::GetLocationIdL() - { - // agreed that the location record having the name 'Mobile' is used - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::GetLocationIdL" ) ) ); - - CCommsDbTableView* loc; - loc = iDb->OpenViewMatchingTextLC( TPtrC(LOCATION), TPtrC(COMMDB_NAME), - KLocation ); - TInt err = loc->GotoFirstRecord(); - - User::LeaveIfError( err ); - TUint32 id( 0 ); - loc->ReadUintL( TPtrC(COMMDB_ID), id ); - - CleanupStack::PopAndDestroy( loc ); // loc - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::GetLocationIdL" ) ) ); - return id; - } - - - -// --------------------------------------------------------- -// CApDataHandler::GetModemBearerIDL -// --------------------------------------------------------- -// -TUint32 CApDataHandler::GetModemBearerIDL( CApAccessPointItem& aApItem ) - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::GetModemBearerIDL" ) ) ); - - // agreed that the modem bearer record having the name - // 'CSD Modem' is used for (HS)CSD Access Points and - // 'GPRS Modem' is used for GPRS/WCDMA Access Points - // 'CDMA Modem' is used for CDMA Access Points - CCommsDbTableView* view = NULL; - TApBearerType bearer = aApItem.BearerTypeL(); - switch ( bearer ) - { - case EApBearerTypeCSD: - case EApBearerTypeHSCSD: - { - view = iDb->OpenViewMatchingTextLC( TPtrC(MODEM_BEARER), - TPtrC(COMMDB_NAME), - KModemBearerCSD ); - break; - } - case EApBearerTypeCDMA: - { - view = iDb->OpenViewMatchingTextLC( TPtrC(MODEM_BEARER), - TPtrC(COMMDB_NAME), - KModemBearerCDMA ); - break; - } - case EApBearerTypeGPRS: - { - view = iDb->OpenViewMatchingTextLC( TPtrC(MODEM_BEARER), - TPtrC(COMMDB_NAME), - KModemBearerGPRS ); - break; - } -#ifdef __TEST_LAN_BEARER - case EApBearerTypeLAN: - { - view = iDb->OpenViewMatchingTextLC( TPtrC(LAN_BEARER), - TPtrC(COMMDB_NAME), - KModemBearerLAN ); - break; - } -#endif // __TEST_LAN_BEARER - case EApBearerTypeWLAN: - { - if ( aApItem.iExt->iWlanData ) - { - view = iDb->OpenViewMatchingTextLC( TPtrC(LAN_BEARER), - TPtrC(COMMDB_NAME), - KModemBearerWLAN ); - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - case EApBearerTypeLANModem: - { - view = iDb->OpenViewMatchingTextLC( TPtrC(LAN_BEARER), - TPtrC(COMMDB_NAME), - KModemBearerLANModem ); - break; - } - default: - { - User::Leave( KErrInvalidBearerType ); - } - } - - TUint32 id( 0 ); - - if ( view ) - { - TInt err = view->GotoFirstRecord(); - if ( err == KErrNone ) - { - view->ReadUintL( TPtrC(COMMDB_ID), id ); - } - else - { - if ( err != KErrNotFound ) - { - User::LeaveIfError( err ); - } - else - { - if ( aApItem.iExt->iWlanData ) - { - id = CreateLanBearerIfNeededL(); - } - else - { -#ifdef __TEST_LAN_BEARER - id = CreateLanBearerIfNeededL(); -#else // __TEST_LAN_BEARER - User::Leave( KErrNotSupported ); -#endif //__TEST_LAN_BEARER - } - } - } - CleanupStack::PopAndDestroy( view ); // view - } - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::GetModemBearerIDL" ) ) ); - return id; - } - - - - -// --------------------------------------------------------- -// CApDataHandler::ReadServiceL -// --------------------------------------------------------- -// -void CApDataHandler::ReadServiceL( CCommsDbTableView& ispt, - CApAccessPointItem& aApItem ) - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::ReadServiceL" ) ) ); - - HBufC* buf = ApCommons::ReadText16ValueLC( &ispt, TPtrC(COMMDB_NAME) ); - aApItem.WriteTextL( EApIspName, *buf ); - CleanupStack::PopAndDestroy( buf ); - -// TUint32 tempint( 0 ); - TBool tempbool( EFalse ); - -/* - buf = ApCommons::ReadText16ValueLC( &ispt, TPtrC(SERVICE_IF_PARAMS) ); - aApItem.WriteTextL( EApIspIfParams, *buf ); - CleanupStack::PopAndDestroy( buf ); -*/ - buf = ApCommons::ReadText16ValueLC( &ispt, TPtrC(SERVICE_IF_NETWORKS) ); - aApItem.WriteTextL( EApWlanIfNetworks, *buf ); - CleanupStack::PopAndDestroy( buf ); - -/* - ApCommons::ReadBoolL( &ispt, TPtrC(SERVICE_IF_PROMPT_FOR_AUTH), tempbool ); - aApItem.WriteBool( EApWlanIfPromptForAuth, tempbool ); - - buf = ApCommons::ReadText16ValueLC( &ispt, TPtrC(SERVICE_IF_AUTH_NAME) ); - aApItem.WriteTextL( EApWlanIfAuthName, *buf ); - CleanupStack::PopAndDestroy( buf ); - - buf = ApCommons::ReadText16ValueLC( &ispt, TPtrC(SERVICE_IF_AUTH_PASS) ); - aApItem.WriteTextL( EApWlanIfAuthPassword, *buf ); - CleanupStack::PopAndDestroy( buf ); - - ApCommons::ReadUintL( &ispt, TPtrC(SERVICE_IF_AUTH_RETRIES), tempint ); - aApItem.WriteUint( EApWlanIfAuthRetries, tempint ); - - ApCommons::ReadBoolL( &ispt, - TPtrC(SERVICE_IF_CALLBACK_ENABLED), tempbool ); - aApItem.WriteBool( EApIspIfCallbackEnabled, tempbool ); - - ApCommons::ReadUintL( &ispt, TPtrC(SERVICE_IF_CALLBACK_TYPE), tempint ); - aApItem.WriteUint( EApIspIfCallbackType, ( TCallbackAction )tempint ); - - HBufC8* buf8 = ApCommons::ReadText8ValueLC - ( &ispt, TPtrC(SERVICE_IF_CALLBACK_INFO) ); - aApItem.WriteTextL( EApIspIfCallbackInfo, *buf8 ); - CleanupStack::PopAndDestroy( buf8 ); - - ApCommons::ReadUintL( &ispt, TPtrC(SERVICE_CALLBACK_TIMEOUT), tempint ); - aApItem.WriteUint( EApIspCallBackTimeOut, tempint ); -*/ - - buf = ApCommons::ReadText16ValueLC( &ispt, TPtrC(SERVICE_IP_NETMASK) ); - aApItem.WriteTextL( EApWlanIpNetMask, *buf ); - CleanupStack::PopAndDestroy( buf ); - - buf = ApCommons::ReadText16ValueLC( &ispt, TPtrC(SERVICE_IP_GATEWAY) ); - aApItem.WriteTextL( EApWlanIpGateway, *buf ); - CleanupStack::PopAndDestroy( buf ); - - ApCommons::ReadBoolL( &ispt, - TPtrC(SERVICE_IP_ADDR_FROM_SERVER), tempbool ); - aApItem.WriteBool( EApWlanIpAddrFromServer, tempbool ); - - buf = ApCommons::ReadText16ValueLC( &ispt, TPtrC(SERVICE_IP_ADDR) ); - aApItem.WriteTextL( EApWlanIpAddr, *buf ); - CleanupStack::PopAndDestroy( buf ); - - ApCommons::ReadBoolL( &ispt, TPtrC(SERVICE_IP_DNS_ADDR_FROM_SERVER), - tempbool ); - aApItem.WriteBool( EApWlanIpDnsAddrFromServer, tempbool ); - - buf = ApCommons::ReadText16ValueLC( &ispt, - TPtrC(SERVICE_IP_NAME_SERVER1) ); - aApItem.WriteTextL( EApWlanIPNameServer1, *buf ); - CleanupStack::PopAndDestroy( buf ); - - buf = ApCommons::ReadText16ValueLC( &ispt, - TPtrC(SERVICE_IP_NAME_SERVER2) ); - aApItem.WriteTextL( EApWlanIPNameServer2, *buf ); - CleanupStack::PopAndDestroy( buf ); - -/* - ApCommons::ReadBoolL( &ispt, TPtrC(SERVICE_ENABLE_SW_COMP), tempbool ); - aApItem.WriteBool( EApIspEnableSWCompression, tempbool ); - - ApCommons::ReadBoolL( &ispt, - TPtrC(SERVICE_ENABLE_IP_HEADER_COMP), - tempbool ); - aApItem.WriteBool( EApIspEnableIpHeaderComp, tempbool); - - ApCommons::ReadBoolL( &ispt, - TPtrC(SERVICE_ENABLE_LCP_EXTENSIONS), tempbool ); - aApItem.WriteBool( EApIspEnableLCPExtensions, tempbool ); - - ApCommons::ReadBoolL( &ispt, TPtrC(SERVICE_DISABLE_PLAIN_TEXT_AUTH), - tempbool ); - aApItem.WriteBool( EApIspDisablePlainTextAuth, tempbool ); -*/ - CLOG( ( EHandler, 0, _L( "<- CApDataHandler::ReadServiceL" ) ) ); - } - - -// --------------------------------------------------------- -// CApDataHandler::ReadServiceIp6L -// --------------------------------------------------------- -// -void CApDataHandler::ReadServiceIp6L( CCommsDbTableView& ispt, - CApAccessPointItem& aApItem ) - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::ReadServiceIp6L" ) ) ); - - if ( iExt->iIsIpv6Supported ) - { - TBool tempbool( EFalse ); - HBufC* buf; - - ApCommons::ReadBoolL( &ispt, TPtrC(SERVICE_IP6_DNS_ADDR_FROM_SERVER), - tempbool ); - - aApItem.WriteBool( EApIP6DNSAddrFromServer, tempbool ); - - buf = ApCommons::ReadText16ValueLC( &ispt, - TPtrC(SERVICE_IP6_NAME_SERVER1) ); - - aApItem.WriteTextL( EApIP6NameServer1, *buf ); - CleanupStack::PopAndDestroy( buf ); - - buf = ApCommons::ReadText16ValueLC( &ispt, - TPtrC(SERVICE_IP6_NAME_SERVER2) ); - - aApItem.WriteTextL( EApIP6NameServer2, *buf ); - CleanupStack::PopAndDestroy( buf ); - } - - CLOG( ( EHandler, 0, _L( "<- CApDataHandler::ReadServiceIp6L" ) ) ); - } - - - - -// --------------------------------------------------------- -// CApDataHandler::WriteServiceL -// --------------------------------------------------------- -// -void CApDataHandler::WriteServiceL( CCommsDbTableView& aTable, - CApAccessPointItem& aApItem ) - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::WriteServiceL" ) ) ); - - aTable.WriteTextL( TPtrC(COMMDB_NAME), *aApItem.iIspName ); - -// aTable.WriteTextL( TPtrC(SERVICE_IF_PARAMS), *aApItem.iIspIfParams ); - - aTable.WriteTextL( TPtrC(SERVICE_IF_NETWORKS), *aApItem.iIspIfNetworks ); - -// aTable.WriteBoolL( TPtrC(SERVICE_IF_PROMPT_FOR_AUTH), -// aApItem.iIspIfPromptForAuth ); - -// aTable.WriteTextL( TPtrC(SERVICE_IF_AUTH_NAME), -// *aApItem.iIspIfAuthName ); - -// aTable.WriteTextL( TPtrC(SERVICE_IF_AUTH_PASS), -// *aApItem.iIspIfAuthPass ); - -// aTable.WriteUintL( TPtrC(SERVICE_IF_AUTH_RETRIES), -// aApItem.iIspIfAuthRetries ); - - aTable.WriteTextL( TPtrC(SERVICE_IP_NETMASK), *aApItem.iIspIPNetMask ); - - aTable.WriteTextL( TPtrC(SERVICE_IP_GATEWAY), *aApItem.iIspGateway ); - - aTable.WriteBoolL( TPtrC(SERVICE_IP_ADDR_FROM_SERVER), - aApItem.iIspIPAddrFromServer ); - - aTable.WriteTextL( TPtrC(SERVICE_IP_ADDR), *aApItem.iIspIPAddr ); - - aTable.WriteBoolL( TPtrC(SERVICE_IP_DNS_ADDR_FROM_SERVER), - aApItem.iGetDNSIPFromServer ); - - aTable.WriteTextL( TPtrC(SERVICE_IP_NAME_SERVER1), - *aApItem.iPrimaryDNS ); - - aTable.WriteTextL( TPtrC(SERVICE_IP_NAME_SERVER2), - *aApItem.iSecondaryDNS ); - -/* - aTable.WriteBoolL( TPtrC(SERVICE_ENABLE_LCP_EXTENSIONS), - aApItem.iIspEnableLCPExtensions ); - - aTable.WriteBoolL( TPtrC(SERVICE_DISABLE_PLAIN_TEXT_AUTH), - aApItem.iIsPasswordAuthenticationSecure ); - - aTable.WriteBoolL( TPtrC(SERVICE_ENABLE_SW_COMP), - aApItem.iIspEnableSwCompression ); - - aTable.WriteBoolL( TPtrC(SERVICE_ENABLE_IP_HEADER_COMP), - aApItem.iEnablePPPCompression ); - - aTable.WriteBoolL( TPtrC(SERVICE_IF_CALLBACK_ENABLED), - aApItem.iUseCallBack ); - - aTable.WriteUintL( TPtrC(SERVICE_IF_CALLBACK_TYPE), - aApItem.iCallBackTypeIsServerNum ); - - aTable.WriteTextL( TPtrC(SERVICE_IF_CALLBACK_INFO), - *aApItem.iIspIfCallbackInfo ); - - aTable.WriteUintL( TPtrC(SERVICE_CALLBACK_TIMEOUT), - aApItem.iIspCallbackTimeOut ); -*/ - -// WriteDaemonL( aTable, aApItem ); starts here - if ( aApItem.iIspIPAddrFromServer ) - { - aTable.WriteTextL( TPtrC(SERVICE_CONFIG_DAEMON_MANAGER_NAME), - KDaemonManagerName ); - aTable.WriteTextL( TPtrC(SERVICE_CONFIG_DAEMON_NAME), - KConfigDaemonName ); - } - else - { - // 3.1 it is changed!! - if ( FeatureManager::FeatureSupported( KFeatureIdIPv6 ) ) - { - aTable.WriteTextL( TPtrC(SERVICE_CONFIG_DAEMON_MANAGER_NAME), - KDaemonManagerName ); - aTable.WriteTextL( TPtrC(SERVICE_CONFIG_DAEMON_NAME), - KConfigDaemonName ); - } - else - { - aTable.WriteTextL( TPtrC(SERVICE_CONFIG_DAEMON_MANAGER_NAME), KEmpty ); - aTable.WriteTextL( TPtrC(SERVICE_CONFIG_DAEMON_NAME), KEmpty ); - } - } -// WriteDaemonL() Ends here - - - CLOG( ( EHandler, 0, _L( "<- CApDataHandler::WriteServiceL" ) ) ); - } - - -// --------------------------------------------------------- -// CApDataHandler::WriteServiceIp6L -// --------------------------------------------------------- -// -void CApDataHandler::WriteServiceIp6L( CCommsDbTableView& ispt, - CApAccessPointItem& aApItem ) - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::WriteServiceIp6L" ) ) ); - - ispt.WriteBoolL( TPtrC(SERVICE_IP6_DNS_ADDR_FROM_SERVER), - aApItem.iExt->iIpv6GetDNSIPFromServer ); - - ispt.WriteTextL( TPtrC(SERVICE_IP6_NAME_SERVER1), - *aApItem.iExt->iIpv6PrimaryDNS ); - - ispt.WriteTextL( TPtrC(SERVICE_IP6_NAME_SERVER2), - *aApItem.iExt->iIpv6SecondaryDNS ); - - CLOG( ( EHandler, 0, _L( "<- CApDataHandler::WriteServiceIp6L" ) ) ); - } - - - -// --------------------------------------------------------- -// CApDataHandler::WriteCsdDataL -// --------------------------------------------------------- -// -void CApDataHandler::WriteCsdDataL( TBool aIsNew, - CApAccessPointItem& aApItem ) - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::WriteCsdDataL" ) ) ); - - TInt isCsdSupported = - FeatureManager::FeatureSupported( KFeatureIdAppCsdSupport ); -#ifdef __TEST_CSD_SUPPORT - isCsdSupported = ETrue; -#endif // __TEST_CSD_SUPPORT - - TCommsDbBearerType bearerType = - STATIC_CAST( TCommsDbBearerType, aApItem.iIspBearerType ); - - if ( ( ( bearerType == EBearerTypeCSD ) && ( !isCsdSupported ) ) || - ( ( bearerType == EBearerTypeHSCSD ) && - ( !isCsdSupported || !iExt->iIsAppHscsdSupport ) ) ) - { - User::Leave( KErrNotSupported ); - } - - CCommsDbTableView* ispt; - - if ( aIsNew ) - { - ispt = iDb->OpenTableLC( *aApItem.iIapServiceType ); - User::LeaveIfError( ispt->InsertRecord( aApItem.iIapServiceId ) ); - } - else - { - ispt = iDb->OpenViewMatchingUintLC( *aApItem.iIapServiceType, - TPtrC(COMMDB_ID), - aApItem.iIapServiceId ); - User::LeaveIfError( ispt->GotoFirstRecord() ); - User::LeaveIfError( ispt->UpdateRecord() ); - } - // now write record data - ispt->WriteTextL( TPtrC(COMMDB_NAME), *aApItem.iIspName ); - - ispt->WriteTextL( TPtrC(ISP_DESCRIPTION), *aApItem.iIspDescription ); - - ispt->WriteUintL( TPtrC(ISP_TYPE), aApItem.iIspType ); - - ispt->WriteTextL( TPtrC(ISP_DEFAULT_TEL_NUM), - *aApItem.iIspDefaultTelNumber ); - - ispt->WriteBoolL( TPtrC(ISP_DIAL_RESOLUTION), - aApItem.iIspDialResolution ); - - ispt->WriteBoolL( TPtrC(ISP_USE_LOGIN_SCRIPT), - aApItem.iUseLoginScript ); - - ispt->WriteLongTextL( TPtrC(ISP_LOGIN_SCRIPT), *aApItem.iLoginScript ); - - ispt->WriteBoolL( TPtrC(ISP_PROMPT_FOR_LOGIN), - aApItem.iPromptPassword ); - - ispt->WriteTextL( TPtrC(ISP_LOGIN_NAME), *aApItem.iUserName ); - - ispt->WriteTextL( TPtrC(ISP_LOGIN_PASS), *aApItem.iPassword ); - - ispt->WriteBoolL( TPtrC(ISP_DISPLAY_PCT), - aApItem.iDisplayTerminalWindow ); - - ApSpeed2EtelL( &aApItem ); - -/* -// Keep as long as replacing IF_NAME does not works as specified - ispt->WriteTextL( TPtrC(IF_NAME), *aApItem.iIspIfName ); -*/ - - ispt->WriteTextL( TPtrC(ISP_IF_PARAMS), *aApItem.iIspIfParams ); - - ispt->WriteTextL( TPtrC(ISP_IF_NETWORKS), *aApItem.iIspIfNetworks ); - - ispt->WriteBoolL( TPtrC(ISP_IF_PROMPT_FOR_AUTH), - aApItem.iIspIfPromptForAuth ); - - // as same UserName & Auth_name is required - ispt->WriteTextL( TPtrC(ISP_IF_AUTH_NAME), *aApItem.iUserName ); - - // as same login_pass & Auth_password is required - ispt->WriteTextL( TPtrC(ISP_IF_AUTH_PASS), *aApItem.iPassword ); - - ispt->WriteUintL( TPtrC(ISP_IF_AUTH_RETRIES), - aApItem.iIspIfAuthRetries ); - - ispt->WriteBoolL( TPtrC(ISP_IF_CALLBACK_ENABLED), - aApItem.iUseCallBack ); - - ispt->WriteUintL( TPtrC(ISP_IF_CALLBACK_TYPE), - aApItem.iCallBackTypeIsServerNum ); - - ispt->WriteTextL( TPtrC(ISP_IF_CALLBACK_INFO), - *aApItem.iIspIfCallbackInfo ); - - ispt->WriteUintL( TPtrC(ISP_CALLBACK_TIMEOUT), - aApItem.iIspCallbackTimeOut ); - - ispt->WriteBoolL( TPtrC(ISP_IP_ADDR_FROM_SERVER), - aApItem.iIspIPAddrFromServer ); - - ispt->WriteTextL( TPtrC(ISP_IP_ADDR), *aApItem.iIspIPAddr ); - - ispt->WriteTextL( TPtrC(ISP_IP_NETMASK), *aApItem.iIspIPNetMask ); - - ispt->WriteTextL( TPtrC(ISP_IP_GATEWAY), *aApItem.iIspGateway ); - - ispt->WriteBoolL( TPtrC(ISP_IP_DNS_ADDR_FROM_SERVER), - aApItem.iGetDNSIPFromServer ); - - ispt->WriteTextL( TPtrC(ISP_IP_NAME_SERVER1), *aApItem.iPrimaryDNS ); - - ispt->WriteTextL( TPtrC(ISP_IP_NAME_SERVER2), *aApItem.iSecondaryDNS ); - - ispt->WriteBoolL( TPtrC(ISP_ENABLE_IP_HEADER_COMP), - aApItem.iEnablePPPCompression ); - - ispt->WriteBoolL( TPtrC(ISP_ENABLE_LCP_EXTENSIONS), - aApItem.iIspEnableLCPExtensions ); - - ispt->WriteBoolL( TPtrC(ISP_DISABLE_PLAIN_TEXT_AUTH), - aApItem.iIsPasswordAuthenticationSecure ); - - ispt->WriteBoolL( TPtrC(ISP_ENABLE_SW_COMP), - aApItem.iIspEnableSwCompression ); - - ispt->WriteUintL( TPtrC(ISP_BEARER_NAME), aApItem.iIspBearerName ); - - ispt->WriteUintL( TPtrC(ISP_BEARER_SPEED), aApItem.iExt->iBearerSpeed ); - - ispt->WriteUintL( TPtrC(ISP_BEARER_PROTOCOL), - aApItem.iExt->iBearerProtocol ); - - ispt->WriteUintL( TPtrC(ISP_BEARER_CE), aApItem.iIspBearerCE ); - - ispt->WriteUintL( TPtrC(ISP_BEARER_SERVICE), aApItem.iApIapBearerService ); - - - - ispt->WriteTextL( TPtrC(ISP_INIT_STRING), *aApItem.iIspInitString ); - - ispt->WriteUintL( TPtrC(ISP_BEARER_TYPE), aApItem.iIspBearerType ); - - ispt->WriteUintL( TPtrC(ISP_CHANNEL_CODING), - aApItem.iIspChannelCoding ); - - ispt->WriteUintL( TPtrC(ISP_AIUR), aApItem.iIspAIUR ); - - ispt->WriteUintL( TPtrC(ISP_REQUESTED_TIME_SLOTS), - aApItem.iIspRequestedTimeSlots ); - - ispt->WriteUintL( TPtrC(ISP_MAXIMUM_TIME_SLOTS), - aApItem.iIspMaximumTimeSlots ); - - if ( iExt->iIsIpv6Supported ) - { - WriteServiceIp6L( *ispt, aApItem ); - } - - // No DHCP for CSD/HSCSD, so set it empty - ispt->WriteTextL( TPtrC(SERVICE_CONFIG_DAEMON_MANAGER_NAME), KEmpty ); - ispt->WriteTextL( TPtrC(SERVICE_CONFIG_DAEMON_NAME), KEmpty ); - - // now put changes - User::LeaveIfError( ispt->PutRecordChanges( EFalse, EFalse ) ); - - CleanupStack::PopAndDestroy( ispt ); // ispt - - CLOG( ( EHandler, 0, _L( "<- CApDataHandler::WriteCsdDataL" ) ) ); - } - - - -// --------------------------------------------------------- -// CApDataHandler::ReadWlanL -// --------------------------------------------------------- -// -void CApDataHandler::ReadWlanL( CCommsDbTableView& lant, - CApAccessPointItem& aApItem ) - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::ReadWlanL" ) ) ); - - HBufC* buf = ApCommons::ReadText16ValueLC( &lant, TPtrC(NU_WLAN_SSID) ); - aApItem.WriteTextL( EApWlanNetworkName, *buf ); - CleanupStack::PopAndDestroy( buf ); - - TUint32 tempint( 0 ); - - ApCommons::ReadUintL( &lant, TPtrC(COMMDB_ID), tempint ); - aApItem.WriteUint( EApWlanSettingsId, tempint ); - - ApCommons::ReadUintL( &lant, TPtrC(WLAN_CONNECTION_MODE), tempint ); - aApItem.WriteUint( EApWlanNetworkMode, tempint ); - - ApCommons::ReadUintL( &lant, TPtrC(WLAN_SECURITY_MODE), tempint ); - aApItem.WriteUint( EApWlanSecurityMode, tempint ); - - TBool b; - ApCommons::ReadBoolL( &lant, TPtrC(WLAN_SCAN_SSID), b ); - aApItem.WriteBool( EApWlanScanSSID, b ); - - ApCommons::ReadUintL( &lant, TPtrC(NU_WLAN_CHANNEL_ID), tempint ); - aApItem.WriteUint( EApWlanChannelId, tempint ); - - CLOG( ( EHandler, 0, _L( "<- CApDataHandler::ReadWlanL" ) ) ); - } - - - -// --------------------------------------------------------- -// CApDataHandler::WriteWlanL -// --------------------------------------------------------- -// -void CApDataHandler::WriteWlanL( CCommsDbTableView& aTable, - CApAccessPointItem& aApItem ) - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::WriteWlanL" ) ) ); - - aTable.WriteTextL( TPtrC(COMMDB_NAME), *aApItem.iIspName ); - aTable.WriteUintL( TPtrC(WLAN_SERVICE_ID), aApItem.iIapServiceId ); - aTable.WriteTextL( TPtrC(NU_WLAN_SSID), - *aApItem.iExt->iWlanData->iWlanNetworkName ); - aTable.WriteUintL( TPtrC(WLAN_CONNECTION_MODE), - aApItem.iExt->iWlanData->iWlanNetworkMode ); - - aTable.WriteUintL( TPtrC(WLAN_SECURITY_MODE), - aApItem.iExt->iWlanData->iWlanSecurityMode ); - - aTable.WriteBoolL( TPtrC(WLAN_SCAN_SSID), - aApItem.iExt->iWlanData->iScanSSID ); - - aTable.WriteUintL( TPtrC(NU_WLAN_CHANNEL_ID), - aApItem.iExt->iWlanData->iChannelId ); - - CLOG( ( EHandler, 0, _L( "<- CApDataHandler::WriteWlanL" ) ) ); - } - - - - -// --------------------------------------------------------- -// CApDataHandler::CreateLanBearerIfNeededL -// --------------------------------------------------------- -// -TUint32 CApDataHandler::CreateLanBearerIfNeededL() - { - CLOG( ( EApItem, 0, - _L( "-> CApDataHandler::CreateLanBearerIfNeededL" ) ) ); - - TUint32 retval( 0 ); - - CCommsDbTableView* t = NULL; - - t = iDb->OpenViewMatchingTextLC( TPtrC(LAN_BEARER), - TPtrC(LAN_BEARER_AGENT), - KWlanBearerAgent ); - if ( t->GotoFirstRecord() == KErrNotFound ) - { // no such yet, create one - TInt err = t->InsertRecord( retval ); - if ( err ) - { - User::LeaveIfError( err ); - } - t->WriteTextL( TPtrC(COMMDB_NAME), KWlanBearerName ); - t->WriteTextL( TPtrC(LAN_BEARER_AGENT), KWlanBearerAgent ); - t->WriteTextL( TPtrC(LAN_BEARER_NIF_NAME), KWlanBearerNif ); - - t->WriteTextL( TPtrC(LAN_BEARER_LDD_NAME), KWlanLDDName ); - t->WriteTextL( TPtrC(LAN_BEARER_PDD_NAME), KWlanPDDName ); - - - - t->WriteUintL( TPtrC(LAST_SOCKET_ACTIVITY_TIMEOUT), - (TUint32)KWlanLastSocketActivityTimeout ); - t->WriteUintL( TPtrC(LAST_SESSION_CLOSED_TIMEOUT), - KWlanLastSessionClosedTimeout ); - t->WriteUintL( TPtrC(LAST_SOCKET_CLOSED_TIMEOUT), - (TUint32)KWlanLastSocketClosedTimeout ); - - User::LeaveIfError( t->PutRecordChanges( EFalse, EFalse ) ); - - } - else - { // there is one, use it - t->ReadUintL( TPtrC(COMMDB_ID), retval ); - } - - CleanupStack::PopAndDestroy( t ); // t - - CLOG( ( EApItem, 0, - _L( "<- CApDataHandler::CreateLanBearerIfNeededL" ) ) ); - - return retval; - } - - - - - - -// --------------------------------------------------------- -// CApDataHandler::ReadModemBearerNameL -// --------------------------------------------------------- -// -void CApDataHandler::ReadModemBearerNameL( CApAccessPointItem& aApItem ) - { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::ReadModemBearerNameL" ) ) ); - - // agreed that the modem bearer record having the name - // 'CSD Modem' is used for (HS)CSD Access Points and - // 'GPRS Modem' is used for GPRS/WCDMA Access Points - // 'CDMA Modem' is used for CDMA Access Points - CCommsDbTableView* view = NULL; -// TApBearerType bearer = aApItem.BearerTypeL(); - - view = iDb->OpenViewMatchingUintLC( *aApItem.iExt->iIapBearerType, - TPtrC(COMMDB_ID), - aApItem.iExt->iIapBearerID ); -// 0 ); - HBufC* buf = NULL; - buf = ApCommons::ReadText16ValueLC( view, TPtrC(COMMDB_NAME) ); - aApItem.WriteTextL( EApLanBearerName, *buf ); - CleanupStack::PopAndDestroy( buf ); - - CleanupStack::PopAndDestroy( view ); - - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::ReadModemBearerNameL" ) ) ); - } - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apeng/src/APNetworks.cpp --- a/apengine/apeng/src/APNetworks.cpp Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,266 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of the CApNetworks class. -* -*/ - - -// INCLUDE FILES -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "ApNetworks.h" -#include "ApEngineLogger.h" -#include "ApEngineCommons.h" - - - - -// LOCAL CONSTANTS AND MACROS - -// LOCAL FUNCTION PROTOTYPES - -// ================= MEMBER FUNCTIONS ======================= -// Two-phased constructor. -// --------------------------------------------------------- -// CApNetworks::NewLC -// --------------------------------------------------------- -// -EXPORT_C CApNetworks* CApNetworks::NewLC( CCommsDatabase& aDb ) - { - CLOG( ( ENetworks, 0, _L( "-> CApNetworks::NewLC" ) ) ); - - CApNetworks* db = new( ELeave ) CApNetworks; - CleanupStack::PushL( db ); - db->ConstructL( aDb ); - - CLOG( ( ENetworks, 1, _L( "<- CApNetworks::NewLC" ) ) ); - return db; - } - - -// Destructor -// --------------------------------------------------------- -// CApNetworks::~CApNetworks -// --------------------------------------------------------- -// -EXPORT_C CApNetworks::~CApNetworks() - { - CLOG( ( ENetworks, 0, _L( "-> CApNetworks::~CApNetworks" ) ) ); - - if ( iApList ) - { - iApList->ResetAndDestroy(); - delete iApList; - } - - CLOG( ( ENetworks, 1, _L( "<- CApNetworks::~CApNetworks" ) ) ); - } - - -// C++ default constructor can NOT contain any code that -// might leave. -// -// --------------------------------------------------------- -// CApNetworks::CApNetworks -// --------------------------------------------------------- -// -EXPORT_C CApNetworks::CApNetworks() -:iCount( 0 ) - { - } - - -// Symbian OS default constructor can leave. -// --------------------------------------------------------- -// CApNetworks::ConstructL -// --------------------------------------------------------- -// -EXPORT_C void CApNetworks::ConstructL( CCommsDatabase& aDb ) - - { - CLOG( ( ENetworks, 0, _L( "-> CApNetworks::ConstructL" ) ) ); - - iApList = new( ELeave )CApNetworkItemList(); - iDb = &aDb; - DoUpdateL(); - - CLOG( ( ENetworks, 1, _L( "<- CApNetworks::ConstructL" ) ) ); - } - - - -// --------------------------------------------------------- -// CApNetworks::Count -// --------------------------------------------------------- -// -EXPORT_C TUint32 CApNetworks::Count() const - { - CLOG( ( ENetworks, 0, _L( "<-> CApNetworks::Count" ) ) ); - - return iApList->Count( ); - } - - -// --------------------------------------------------------- -// CApNetworks::Name -// --------------------------------------------------------- -// -EXPORT_C const TDesC& CApNetworks::NameL( TUint32 aUid ) const - { - CLOG( ( ENetworks, 0, _L( "-> CApNetworks::NameL" ) ) ); - - CApNetworkItem* item = - CONST_CAST( CApNetworkItem*, iApList->ItemForUid( aUid ) ); - if ( item == NULL ) - { - User::Leave( KErrNotFound ); - } - - CLOG( ( ENetworks, 1, _L( "<- CApNetworks::NameL" ) ) ); - return (item->Name() ); - } - - - - - - -// --------------------------------------------------------- -// CApNetworks::AllListItemDataL -// --------------------------------------------------------- -// -EXPORT_C TInt CApNetworks::AllListItemDataL( CApNetworkItemList& aList ) - { - CLOG( ( ENetworks, 0, _L( "-> CApNetworks::AllListItemDataL" ) ) ); - - aList.ResetAndDestroy(); - - CApNetworkItem* item=NULL; - - TInt i; - TInt count = iApList->Count(); - for ( i=0; i CApNetworks::DoUpdateL" ) ) ); - - TInt err( KErrNone ); - - TBool OwnTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - - CCommsDbTableView* networkt = iDb->OpenTableLC( TPtrC(NETWORK) ); - - err = networkt->GotoFirstRecord(); - - if ( ( err == KErrNone ) || ( err == KErrNotFound ) ) - { // even if it is empty, we must clear the list. - // otherwise, Leave - // fill up list. First empty it - iApList->ResetAndDestroy(); - iCount = 0; - TUint32 temp( 0 ); - TInt length( 0 ); - - CApNetworkItem* item = NULL; - CApNetworkItemList* tmpnetlist = new( ELeave )CApNetworkItemList(); - HBufC* tmp = NULL; - CleanupStack::PushL( tmpnetlist ); - - if ( err == KErrNone ) - { // now get the names and UIDs - TBool goon( ETrue ); - do - { - err = ApCommons::ReadUintL( networkt, TPtrC(COMMDB_ID), temp ); - - networkt->ReadColumnLengthL( TPtrC(COMMDB_NAME), length ); - tmp = HBufC::NewLC( length ); - TPtr tmpptr( tmp->Des() ); - networkt->ReadTextL( TPtrC(COMMDB_NAME), tmpptr ); - item = CApNetworkItem::NewLC( ); - item->SetUid( temp ); - item->SetNameL( tmpptr ); - tmpnetlist->AppendL( item ); - CleanupStack::Pop( item ); // item owned by list ! - - err = networkt->GotoNextRecord(); - if ( err == KErrNotFound ) - { - goon = EFalse; - } - else - { - User::LeaveIfError( err ); - } - CleanupStack::PopAndDestroy( tmp ); - } - while ( goon ); - } - // and now move items to real array - CleanupStack::Pop( tmpnetlist ); - delete iApList; - iApList = tmpnetlist; - } - else - { - User::Leave( err ); - } - - CleanupStack::PopAndDestroy( networkt ); - - if ( OwnTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - - CLOG( ( ENetworks, 1, _L( "<- CApNetworks::DoUpdateL" ) ) ); - return err; - } - - - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apeng/src/APSelect.cpp --- a/apengine/apeng/src/APSelect.cpp Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2561 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of the CApSelect class. -* -*/ - - -// INCLUDE FILES -#include -#include -#include -#include -#include -#include - -#include -#ifdef __TEST_USE_SHARED_DATA - #include -#endif // __TEST_USE_SHARED_DATA - -#include "ApListItem.h" -#include "ApListItemList.h" -#include "ApSelect.h" -#include "ApUtils.h" -#include "ApEngineCommons.h" -#include -#include "ApEngineLogger.h" -#include "ApListItemKey.h" - - - - -// CONSTANTS -const TInt KCursorNullPos = 0; -const TInt KItemCountNull = 0; - -#ifdef __TEST_USE_SHARED_DATA - // General Settings UID, Hardcoded - const TUid KGeneralSettingsUid={0X100058EC}; -#endif // __TEST_USE_SHARED_DATA - - -const TInt KDIALOUT = 0; -const TInt KGPRSIN = 1; -const TInt KGPRSOUT = 2; -const TInt KCDMA_ISP = 3; -const TInt KVPN = 4; - - -const TInt KUID = 0; -const TInt KISPTYPE = 1; -const TInt KBEARERTYPE = 2; - - - -// LOCAL CONSTANTS AND MACROS -#define VPN_SERVICE_SNAP _S("HomeSNAP") - -// LOCAL FUNCTION PROTOTYPES - -// ================= MEMBER FUNCTIONS ======================= -// Two-phased constructor. -// --------------------------------------------------------- -// CApSelect::NewLC -// --------------------------------------------------------- -// -EXPORT_C CApSelect* CApSelect::NewLC( CCommsDatabase& aDb, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType ) - { - CLOG( ( ESelect, 0, _L( "-> CApSelect::NewLC" ) ) ); - - CApSelect* db = CApSelect::NewLC( aDb, aIspFilter, - aBearerFilter, aSortType, EIPv4 ); - - CLOG( ( ESelect, 1, _L( "<- CApSelect::NewLC" ) ) ); - return db; - } - - -// Destructor -// --------------------------------------------------------- -// CApSelect::~CApSelect -// --------------------------------------------------------- -// -EXPORT_C CApSelect::~CApSelect() - { - CLOG( ( ESelect, 0, _L( "-> CApSelect::~CApSelect" ) ) ); - - if ( iExt ) - { - if ( iExt->iIsFeatureManagerInitialised ) - { - FeatureManager::UnInitializeLib(); - } - } - - if ( iApList ) - { - iApList->ResetAndDestroy(); - delete iApList; - } - - delete iExt; - - CLOG( ( ESelect, 1, _L( "<- CApSelect::~CApSelect" ) ) ); - } - - -// C++ default constructor can NOT contain any code that -// might leave. -// -// --------------------------------------------------------- -// CApSelect::CApSelect -// --------------------------------------------------------- -// -EXPORT_C CApSelect::CApSelect() -:iCursor( KCursorNullPos ), -iCount( KItemCountNull ) - { - } - - -// Symbian OS default constructor can leave. -// --------------------------------------------------------- -// CApSelect::ConstructL -// --------------------------------------------------------- -// -EXPORT_C void CApSelect::ConstructL( CCommsDatabase& aDb, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType ) - - { - ConstructL( aDb, aIspFilter, aBearerFilter, - aSortType, EIPv4, EVpnFilterBoth ); - } - - - -// --------------------------------------------------------- -// CApSelect::SetFilters -// --------------------------------------------------------- -// -EXPORT_C void CApSelect::SetFiltersL( TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType ) - { - SetFiltersL( aIspFilter, aBearerFilter, aSortType, - iExt->iReqIpvType, iExt->iVpnFilterType ); - - } - - -// --------------------------------------------------------- -// CApSelect::IspTypeFilter -// --------------------------------------------------------- -// -EXPORT_C TInt CApSelect::IspTypeFilter() - { - CLOG( ( ESelect, 0, _L( "<-> CApSelect::IspTypeFilter" ) ) ); - - return iIsp; - } - - -// --------------------------------------------------------- -// CApSelect::BearerFilter -// --------------------------------------------------------- -// -EXPORT_C TInt CApSelect::BearerFilter() - { - CLOG( ( ESelect, 0, _L( "<-> CApSelect::BearerFilter" ) ) ); - - return iBearer; - } - - -// --------------------------------------------------------- -// CApSelect::SortOrder -// --------------------------------------------------------- -// -EXPORT_C TInt CApSelect::SortOrder() - { - CLOG( ( ESelect, 0, _L( "<-> CApSelect::SortOrder" ) ) ); - - return iSort; - } - - - -// --------------------------------------------------------- -// CApSelect::MoveToFirst -// --------------------------------------------------------- -// -EXPORT_C TBool CApSelect::MoveToFirst() - { - CLOG( ( ESelect, 0, _L( "<-> CApSelect::MoveToFirst" ) ) ); - - iCursor = 0; - return ( iExt->iMaxIndex >= 0 ); - } - - -// --------------------------------------------------------- -// CApSelect::MoveNext -// --------------------------------------------------------- -// -EXPORT_C TBool CApSelect::MoveNext() - { - CLOG( ( ESelect, 0, _L( "<-> CApSelect::MoveNext" ) ) ); - - if ( iCursor < iExt->iMaxIndex ) - { - iCursor++; - return ETrue; - } - return EFalse; - } - - -// --------------------------------------------------------- -// CApSelect::MoveLast -// --------------------------------------------------------- -// -EXPORT_C TBool CApSelect::MoveLast() - { - CLOG( ( ESelect, 0, _L( "<-> CApSelect::MoveLast" ) ) ); - - iCursor = iExt->iMaxIndex; - return ( iCursor >= 0 ); - } - - -// --------------------------------------------------------- -// CApSelect::MovePrev -// --------------------------------------------------------- -// -EXPORT_C TBool CApSelect::MovePrev() - { - CLOG( ( ESelect, 0, _L( "<-> CApSelect::MovePrev" ) ) ); - - if ( iCursor>0 ) - { - iCursor--; - return ETrue; - } - return EFalse; - } - - -// --------------------------------------------------------- -// CApSelect::Count -// --------------------------------------------------------- -// -EXPORT_C TUint32 CApSelect::Count() - { - CLOG( ( ESelect, 0, _L( "<-> CApSelect::Count" ) ) ); - - return iApList->Count( ); - } - - -// --------------------------------------------------------- -// CApSelect::Name -// --------------------------------------------------------- -// -EXPORT_C const TDesC& CApSelect::Name() - { - CLOG( ( ESelect, 0, _L( "<-> CApSelect::Name" ) ) ); - - return *iApList->At( iCursor )->iName; - } - - -// --------------------------------------------------------- -// CApSelect::Uid -// --------------------------------------------------------- -// -EXPORT_C TUint32 CApSelect::Uid() - { - CLOG( ( ESelect, 0, _L( "<-> CApSelect::Uid" ) ) ); - - return iApList->At( iCursor )->iUid; - } - - -// --------------------------------------------------------- -// CApSelect::Type -// --------------------------------------------------------- -// -EXPORT_C TCommsDbIspType CApSelect::Type() - { - CLOG( ( ESelect, 0, _L( "<-> CApSelect::Type" ) ) ); - - return iApList->At( iCursor )->iIspType; - } - - -// --------------------------------------------------------- -// CApSelect::BearerType -// --------------------------------------------------------- -// -EXPORT_C TApBearerType CApSelect::BearerType() - { - CLOG( ( ESelect, 0, _L( "<-> CApSelect::BearerType" ) ) ); - - return iApList->At( iCursor )->iBearerType; - } - - - - -// --------------------------------------------------------- -// CApSelect::AllListItemDataL -// --------------------------------------------------------- -// -EXPORT_C TInt CApSelect::AllListItemDataL( CApListItemList& aList ) - { - CLOG( ( ESelect, 0, _L( "-> CApSelect::AllListItemDataL" ) ) ); - - aList.ResetAndDestroy(); - - CApListItem* item=NULL; - - TInt i; - TInt count = iApList->Count(); - for ( i=0; i CApSelect::IsReadOnly" ) ) ); - - return iApList->At( iCursor )->iExt->iReadOnly; - } - - - -// ================= OTHER EXPORTED FUNCTIONS ============== - -// ================== OTHER MEMBER FUNCTIONS =============== - - - -// --------------------------------------------------------- -// CApSelect::DoUpdate -// --------------------------------------------------------- -// -TInt CApSelect::DoUpdateL() - { - CLOG( ( ESelect, 0, _L( "-> CApSelect::DoUpdateL" ) ) ); - - // filtering criteria: - // Bearer type - // Isp type - // HasMandatory - // + ordering (name or UID...) - // first filter WAP_ACCESS_POINT table and order it - TBool OwnTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - if ( !OwnTransaction ) - { - __ASSERT_DEBUG( EFalse, ApCommons::Panic( ENotSupported ) ); - User::Leave( KErrNotSupported ); - } - - CCommsDbTableView* wapt = NULL; - CCommsDbTableView* ipbearert = NULL; - - CCommsDbTableView* iapt = NULL; - // csdOut, GprsIn, gprsOut, cdma, VPN - CCommsDbTableView* isptables[5] = { NULL, NULL, NULL, NULL, NULL}; - - - wapt = GetFilteredSortedWapTableViewLC(); - TInt err = wapt->GotoFirstRecord(); // OK. - if ( ( err == KErrNone ) || ( err == KErrNotFound ) ) - { // even if it is empty, we must clear the list. - // otherwise, Leave - // fill up list. First empty it - iApList->ResetAndDestroy(); - iCount = 0; - if ( err == KErrNone ) - { // have some, we can go on... - // First get ip_bearer table, then iap, then isp & gprs, if needed - if ( ( iBearer & EApBearerTypeCSD ) || - ( iBearer & EApBearerTypeHSCSD ) || - ( iBearer & EApBearerTypeGPRS ) || - ( iExt->iCdma && ( iBearer & EApBearerTypeCDMA ) ) ) - { - ipbearert = GetFilteredSortedIpBearerTableViewLC(); - if ( ipbearert ) - { - err = ipbearert->GotoFirstRecord(); - if ( err == KErrNone ) - { - if ( ( iBearer & EApBearerTypeCSD ) || - ( iBearer & EApBearerTypeHSCSD ) ) - { - isptables[KDIALOUT] = - GetFilteredSortedIspOutTableViewLC(); - } - if ( ( iBearer & EApBearerTypeGPRS ) ) - { - isptables[KGPRSIN] = - GetFilteredSortedGprsTableViewLC( ETrue ); - isptables[KGPRSOUT] = - GetFilteredSortedGprsTableViewLC( EFalse ); - } - } - else - { - if ( err != KErrNotFound ) - { - User::LeaveIfError( err ); - } - } - } - } - // get wapapids - // get smsapids, if defined - // get ipapids with iap ids - // get only those iap ids from filtered database - CArrayFixFlat* wapapid = - new ( ELeave ) CArrayFixFlat( 10 ); - CleanupStack::PushL( wapapid ); - GetUintValuesL( wapt, TPtrC(COMMDB_ID), *wapapid ); - - // read up access point names, too, just to be as fast as we can... - CArrayPtrFlat* wapapname = - new ( ELeave ) CArrayPtrFlat( 10 ); - CleanupStack::PushL( wapapname ); - GetTextValuesL( wapt, TPtrC(COMMDB_NAME), *wapapname ); - - - // read up start page, too, just to be as fast as we can... - CArrayPtrFlat* wapstartpage = - new ( ELeave ) CArrayPtrFlat( 10 ); - CleanupStack::PushL( wapstartpage ); - // as it is LONG text... - GetLongTextValuesL( wapt, TPtrC(WAP_START_PAGE), *wapstartpage ); - - //read up Read-only flags - CArrayFixFlat* protflags = - new ( ELeave ) CArrayFixFlat( 10 ); - CleanupStack::PushL( protflags ); - GetProtValuesL( wapt, *protflags ); - - - CArrayFixFlat* ipapid = - new ( ELeave ) CArrayFixFlat( 10 ); - CleanupStack::PushL( ipapid ); - GetUintValuesL( ipbearert, TPtrC(WAP_ACCESS_POINT_ID), *ipapid ); - - CArrayFixFlat* ipiapid = - new ( ELeave ) CArrayFixFlat( 10 ); - CleanupStack::PushL( ipiapid ); - GetUintValuesL( ipbearert, TPtrC(WAP_IAP), *ipiapid ); - - - - - // What comes next::::: - // for each table: - // filter separately for different bearers -> - // we know the bearer type... - // filter separately for different ISP types -> - // we know the ISP type... - // now all we have to do is to 'simply' check filtered IAP with - // the separate arrays, leave only those that present in - // both bearer & isp array - // fill up an array of id & an array of bearer type & - // an array of isp type - // after it, narrow down wap with wapbearer, - // create items in order, - // check items against remained iap array - // fill up values in list. - // bearer arrays : 0: csd, 1:hscsd, 2: gprs, 3: cdma - - TInt i( 0 ); - - // an array Isp[CSDOut/GPRSIn/GPRSOut/CDMA/VPN] - // [COMMDB_ID, ISP_TYPE, Bearer_type] - CArrayFixFlat* ispArray[5]; - for (i=0; i<5; i++) - { - ispArray[i] = new ( ELeave ) CArrayFixFlat( 10 ); - CleanupStack::PushL( ispArray[i] ); - } - - if ( isptables[KDIALOUT] ) - { - GetIspValuesL( isptables[KDIALOUT], ispArray[KDIALOUT], - TPtrC(ISP_TYPE) ); - } - if ( isptables[KGPRSIN] ) - { - GetIspValuesL( isptables[KGPRSIN], ispArray[KGPRSIN], - TPtrC(GPRS_AP_TYPE) ); - } - if ( isptables[KGPRSOUT] ) - { - GetIspValuesL( isptables[KGPRSOUT], ispArray[KGPRSOUT], - TPtrC(GPRS_AP_TYPE) ); - } - if ( isptables[KCDMA_ISP] ) // NULL if iExt->iCdma==EFalse. - { - GetIspValuesL( isptables[KCDMA_ISP], ispArray[KCDMA_ISP], - TPtrC(CDMA_AP_TYPE) ); - } - - - // iap arrays, 5 table, needs UID & linked ID for both - CArrayFixFlat* iapArrays[5][2]; - for (i=0; i<5; i++) - { - iapArrays[i][0] = new ( ELeave ) CArrayFixFlat( 10 ); - CleanupStack::PushL( iapArrays[i][0] ); - - iapArrays[i][1] = new ( ELeave ) CArrayFixFlat( 10 ); - CleanupStack::PushL( iapArrays[i][1] ); - } - // get iap table data... - // needs IAP UID & Iap_service - if ( ( iBearer & EApBearerTypeCSD ) || - ( iBearer & EApBearerTypeHSCSD ) ) - { - iapt = OpenViewMatchingTextL( TPtrC(IAP), - TPtrC(IAP_SERVICE_TYPE), - TPtrC(DIAL_OUT_ISP) ); - CleanupStack::PushL( iapt ); - GetUintValuesL( iapt, TPtrC(COMMDB_ID), - *iapArrays[KDIALOUT][0] ); - GetUintValuesL( iapt, TPtrC(IAP_SERVICE), - *iapArrays[KDIALOUT][1] ); - CleanupStack::PopAndDestroy( iapt ); // iapt; - iapt = NULL; - } - - - if ( iBearer & EApBearerTypeGPRS ) - { - iapt = OpenViewMatchingTextL( TPtrC(IAP), - TPtrC(IAP_SERVICE_TYPE), - TPtrC(INCOMING_WCDMA) ); - CleanupStack::PushL( iapt ); - GetUintValuesL( iapt, TPtrC(COMMDB_ID), - *iapArrays[KGPRSIN][0] ); - GetUintValuesL( iapt, TPtrC(IAP_SERVICE), - *iapArrays[KGPRSIN][1] ); - CleanupStack::PopAndDestroy( iapt ); // iapt; - iapt = NULL; - - iapt = OpenViewMatchingTextL( TPtrC(IAP), - TPtrC(IAP_SERVICE_TYPE), - TPtrC(OUTGOING_WCDMA) ); - CleanupStack::PushL( iapt ); - GetUintValuesL( iapt, TPtrC(COMMDB_ID), - *iapArrays[KGPRSOUT][0] ); - GetUintValuesL( iapt, TPtrC(IAP_SERVICE), - *iapArrays[KGPRSOUT][1] ); - CleanupStack::PopAndDestroy( iapt ); // iapt; - iapt = NULL; - } - - if ( ( iExt->iVpnFilterType == EVpnFilterVpnOnly ) || - ( iExt->iVpnFilterType == EVpnFilterBoth ) ) - { - iapt = OpenViewMatchingTextL( TPtrC(IAP), - TPtrC(IAP_SERVICE_TYPE), - TPtrC(VPN_SERVICE) ); - CleanupStack::PushL( iapt ); - GetUintValuesL( iapt, TPtrC(COMMDB_ID), - *iapArrays[KVPN][0] ); - GetUintValuesL( iapt, TPtrC(IAP_SERVICE), - *iapArrays[KVPN][1] ); - CleanupStack::PopAndDestroy( iapt ); // iapt; - iapt = NULL; - } - - - - CArrayFixFlat* vpnArray = NULL; - - if ( ( iExt->iVpnFilterType == EVpnFilterVpnOnly ) || - ( iExt->iVpnFilterType == EVpnFilterBoth ) ) - { // get VPN related data, namely Home IAP and name - isptables[KVPN] = GetVpnTableViewLC(); - - if ( isptables[KVPN] ) - { - - vpnArray = new ( ELeave ) CArrayFixFlat( 10 ); - CleanupStack::PushL( vpnArray ); - - GetVpnValuesL( isptables[KVPN], vpnArray ); - } - } - - - - - // till this point, we have done what we can. - // now we narrow down arrays. - // start with iap vs isp arrays, leave what we can in iap array. - - CApListItem* item = NULL; - CApListItemList* tmpApList = new( ELeave )CApListItemList(); - CleanupStack::PushL( tmpApList ); - TApBearerType bearer (EApBearerTypeAllBearers); - - // iapArrays[5][2]: - // 5 table (DialOut, GprsIn, Out, Cdma, VPN),2 id's(Uid,ServiceId) - // iapArrays[0] : Dial In service - // ispinbearerArrays: 0: csd, 1:hscsd, 2: gprs. 3: cdma - - // 'Merge' iap with isp, create temp. items with bearer types - // iap/DialIn/ServiceID : iapArrays[0][1] - - // check all iap/DialIn/ServiceID if it is in isparray -> - // array Gives bearer type & isp type - TInt j, iappos; - // check all iap/DialOut/ServiceID if it is - // in ispoutbearerarray[0,1] - if ( iapArrays[KDIALOUT][1] ) - { - for (j=0; jCount(); j++) - { - bearer = EApBearerTypeAllBearers; - // check all iap/DialOut/ServiceID if it is in isparray - // check if it is in ispArray[UID, ISP, Bearer] - // & return pos. - iappos = GetIapPos( ispArray[KDIALOUT], - iapArrays[KDIALOUT][1]->At( j ) ); - if ( iappos != KErrNotFound ) - { // DialOut, Isp, Bearer... - // create temp. item WITH IAP ID, Bearer type - if ( ispArray[KDIALOUT]->At( iappos )[KBEARERTYPE] == - EBearerTypeCSD ) - { - bearer = EApBearerTypeCSD; - } - else - { // HSCSD bearer - bearer = EApBearerTypeHSCSD; - } - // create temp. item WITH IAP ID, Bearer type - item = CApListItem::NewLC - ( - (TCommsDbIspType) - ispArray[KDIALOUT]->At( iappos )[KISPTYPE], - iapArrays[KDIALOUT][0]->At( j ), - KEmpty, - bearer - ); - tmpApList->AppendL( item ); - CleanupStack::Pop( item ); // item owned by list ! - } - } - } - - - - // check all iap/GprsIn/ServiceID if it is in ispinbearerarray[2] - if ( iapArrays[KGPRSIN][1] ) - { - bearer = EApBearerTypeGPRS; - for (j=0; jCount(); j++) - { - iappos = GetIapPos( ispArray[KGPRSIN], - iapArrays[KGPRSIN][1]->At( j ) ); - if ( iappos != KErrNotFound ) - { // GprsIn, Isp, Bearer... - // create temp. item WITH IAP ID, Bearer type - item = CApListItem::NewLC - ( - (TCommsDbIspType) - ispArray[KGPRSIN]->At( iappos )[KISPTYPE], - iapArrays[KGPRSIN][0]->At( j ), - KEmpty, - bearer - ); - tmpApList->AppendL( item ); - CleanupStack::Pop( item ); // item owned by list ! - } - } - } - - - // check all iap/GprsOut/ServiceID if it is in isparray - if ( iapArrays[KGPRSOUT][1] ) - { - bearer = EApBearerTypeGPRS; - for (j=0; jCount(); j++) - { - iappos = GetIapPos( ispArray[KGPRSOUT], - iapArrays[KGPRSOUT][1]->At( j ) ); - if ( iappos != KErrNotFound ) - { // GprsIn, Isp, Bearer... - // create temp. item WITH IAP ID, Bearer type - item = CApListItem::NewLC - ( - (TCommsDbIspType) - ispArray[KGPRSOUT]->At( iappos )[KISPTYPE], - iapArrays[KGPRSOUT][0]->At( j ), - KEmpty, - bearer - ); - tmpApList->AppendL( item ); - CleanupStack::Pop( item ); // item owned by list ! - } - } - } - - - // check all iap/cdma/ServiceID if it is in ispinbearerarray[2] - if ( iapArrays[KCDMA_ISP][1] ) // NULL if iExt->iCdma==EFalse. - { - bearer = EApBearerTypeCDMA; - for (j=0; jCount(); j++) - { - iappos = GetIapPos( ispArray[KCDMA_ISP], - iapArrays[KCDMA_ISP][1]->At( j ) ); - if ( iappos != KErrNotFound ) - { // Cdma, Isp, Bearer... - // create temp. item WITH IAP ID, Bearer type - item = CApListItem::NewLC - ( - (TCommsDbIspType) - ispArray[KCDMA_ISP]->At( iappos )[KISPTYPE], - iapArrays[KCDMA_ISP][0]->At( j ), - KEmpty, - bearer - ); - tmpApList->AppendL( item ); - CleanupStack::Pop( item ); // item owned by list ! - } - } - } - - - // Now we have the temporary list filled with - // IAP UID, bearer type, ISP type, - // So compare it to WAP part and create the REAL list... - TInt pos( KErrNotFound ); - TInt itempos( KErrNotFound ); - TBool protsupported = FeatureManager::FeatureSupported( - KFeatureIdSettingsProtection ); - for (i=0; i< wapapid->Count(); i++) - { // as wapapid is sorted, resulting list will be sorted, too ! - // is it in IP bearer ? - if ( IsInArray( ipapid, wapapid->At( i ) ) ) - { - // now need to get bearer type & isp type - // - pos = PosInArray(ipapid, wapapid->At( i ) ); - if (pos!= KErrNotFound ) - { // now we have the index in the - // ipiapid as they are synchronized... - // iapUid = ipiapid[ pos ]; - // now have to find a CApListItem in tmpApList - itempos = GetItemPos( tmpApList, - ipiapid->At( pos ) ); - if (itempos != KErrNotFound ) - { - TBool prot(EFalse); - if (protsupported) - { - prot = protflags->At( i ); - } - item = CApListItem::NewLC - ( - (TCommsDbIspType) - tmpApList->At( itempos )->Type(), - wapapid->At( i ), - *wapapname->At( i ), - tmpApList->At( itempos )->BearerType(), - *wapstartpage->At( i ), - prot ); - - iApList->AppendL( item ); - CleanupStack::Pop( item ); // item owned by aList ! - } - } - } - } - - #ifdef __TEST_LAN_BEARER - // enable LAN: - // ADD THEM AFTER NORMAL QUERYING... - if ( ( iBearer & EApBearerTypeLAN ) - || ( iBearer & EApBearerTypeLANModem ) ) - { - AddLanL( EFalse ); - } - #else - // enable LAN: - // ADD THEM AFTER NORMAL QUERYING... - if ( iBearer & EApBearerTypeLANModem ) - { - AddLanL( EFalse ); - } - #endif // __TEST_LAN_BEARER - if ( iBearer & EApBearerTypeWLAN ) - { - if ( iExt->iWlanSupported ) - { - // enable WLAN: - // ADD THEM AFTER NORMAL QUERYING... - AddLanL( ETrue ); - } - } - - // now it has only elements which are OK. - // from ALL CSD/GPRS/CDMA tables, still in sorted order... - // now it is time to check VPN related stuff, if any - if ( ( iExt->iVpnFilterType == EVpnFilterVpnOnly ) || - ( iExt->iVpnFilterType == EVpnFilterBoth ) ) - { // Add VPN access points if needed - // Add ALL VPN access points if needed as requested by - // Nokia, thus incomplete access points to be listed. - TUint32 wapid( 0 ); - TInt count = vpnArray->Count(); - - CApUtils* util = CApUtils::NewLC( *iDb ); - for ( i = 0; i < count; i++ ) - { - if ( vpnArray->At( i ).iHomeIapId != 0 ) - { - // get home wap id first - pos = PosInArray( ipiapid, - vpnArray->At( i ).iHomeIapId ); - - } - else if ( vpnArray->At( i ).iHomeSnapId != 0 ) - { - // VPN IAP points to a SNAP. Just mark it available. - pos = PosInArray( iapArrays[KVPN][1], vpnArray->At( i ).iVpnIapId ); - if ( pos != KErrNotFound ) - { // now get VPN IAP ID - TUint32 tempvpniapid = iapArrays[KVPN][0]->At( pos ); - TUint32 tempvpnwapid ( 0 ); - TRAP( err, tempvpnwapid = - util->WapIdFromIapIdL( - tempvpniapid ) ); - - item = CApListItem::NewLC - ( - EIspTypeInternetAndWAP, - tempvpnwapid, - *vpnArray->At( i ).iName, - EApBearerTypeAllBearers - ); - item->SetVpnFlag( ETrue ); - iApList->AppendL( item ); - CleanupStack::Pop( item ); - continue; - } - } - - TInt foundpos( KErrNotFound ); - if ( pos!= KErrNotFound ) - { // now we have the index in the - // ipiapid and as they are synchronized... - wapid = ipapid->At( pos ); - // now check if we do have it in array... - TInt jcount = iApList->Count(); - for ( j = 0; j < jcount; j++ ) - { - if ( iApList->At( j )->Uid() == wapid ) - { - foundpos = j; - break; - } - } - } - // should add VPN - // check if VPN-table COMMDB_ID is - // in iapArrays[VPN][1] - pos = PosInArray( - iapArrays[KVPN][1], - vpnArray->At( i ).iVpnIapId ); - if ( pos != KErrNotFound ) - { // now get VPN IAP ID - TUint32 tempvpniapid = - iapArrays[KVPN][0]->At( pos ); - TUint32 tempvpnwapid ( 0 ); - TRAP( err, tempvpnwapid = - util->WapIdFromIapIdL( - tempvpniapid ) ); - - if ( err == KErrNone ) - { - if ( foundpos != KErrNotFound ) - { - // if not found, it is either an unknown - // bearer type, for which we can nto show - // icon and UI at all, or it does not - // fulfill the filtering criteria, so we - // ignore them. - item = CApListItem::NewLC - ( - iApList->At( foundpos )->Type(), - tempvpnwapid, - *vpnArray->At( i ).iName, - iApList->At( foundpos ) - ->BearerType() - ); - item->SetVpnFlag( ETrue ); - iApList->AppendL( item ); - // item owned by aList ! - CleanupStack::Pop( item ); - } - } - } - } - CleanupStack::PopAndDestroy( util ); - } - - if ( iExt->iVpnFilterType == EVpnFilterVpnOnly ) - { // remove non-vpn access points if needed - TInt count = iApList->Count(); - for ( i = 0; i < count; i++ ) - { - if ( !iApList->At( i )->IsVpnAp() ) - { - delete iApList->At( i ); - iApList->Delete( i ); - count--; - i--; // 'cause it is cycled... - } - } - } - - -/* -#ifdef __WINS__ - //============================================================= - // Support for ethernet in emulator, change 1/2 - // - - iapt = OpenViewMatchingTextL( TPtrC(IAP), - TPtrC(IAP_SERVICE_TYPE), - TPtrC(LAN_SERVICE) ); - CleanupStack::PushL( iapt ); - - - TBuf<40> name; - TUint32 id; - TInt err = iapt->GotoFirstRecord(); - TInt err2; - CCommsDbTableView* tmpView = NULL; - - while(err == KErrNone) - { - iapt->ReadTextL(TPtrC(COMMDB_NAME), name); - iapt->ReadUintL(TPtrC(COMMDB_ID), id); - - tmpView = iDb->OpenViewMatchingUintLC( - TPtrC(WAP_IP_BEARER), TPtrC(WAP_IAP), id); - err2 = tmpView->GotoFirstRecord(); - if(err2 == KErrNone) - { - tmpView->ReadUintL(TPtrC(WAP_ACCESS_POINT_ID), id); - CleanupStack::PopAndDestroy( tmpView ); - - tmpView = iDb->OpenViewMatchingUintLC( - TPtrC(WAP_ACCESS_POINT), TPtrC(COMMDB_ID), id); - err2 = tmpView->GotoFirstRecord(); - if ( err2 == KErrNone ) - { - item = CApListItem::NewLC - ( - EIspTypeInternetAndWAP, - id, - name, - EApBearerTypeGPRS - ); - iApList->AppendL( item ); - - CleanupStack::Pop( item ); - } - } - - CleanupStack::PopAndDestroy( tmpView ); - - err = iapt->GotoNextRecord(); - } - - - CleanupStack::PopAndDestroy( iapt ); // iapt; - iapt = NULL; - - // End of change 1/2 - //============================================================= - -#endif // __WINS__ -*/ - - - iCount = iApList->Count(); - - CleanupStack::PopAndDestroy( tmpApList ); // tmpApList - - if ( vpnArray ) - { - CleanupStack::PopAndDestroy( vpnArray->Count() ); - CleanupStack::PopAndDestroy( vpnArray ); - } - if ( isptables[KVPN] ) - { - CleanupStack::PopAndDestroy( isptables[KVPN] ); - } - - CleanupStack::PopAndDestroy( 10, iapArrays[0][0] ); // iap arrays - - CleanupStack::PopAndDestroy( 5, ispArray[0] ); // isp arrays - - CleanupStack::Pop( 2, ipapid ); // ipiapid, ipapid - CleanupStack::Pop( protflags ); // protflags - delete protflags; - delete ipiapid; - delete ipapid; - -// Note: SMS bearer had been dropped. - CleanupStack::PopAndDestroy( wapstartpage->Count() );//wapstartpage - CleanupStack::PopAndDestroy( wapstartpage ); // wapstartpage - CleanupStack::PopAndDestroy( wapapname->Count() ); // wapapname - CleanupStack::PopAndDestroy( wapapname ); // wapapname - CleanupStack::Pop(); // wapapid - delete wapapid; - - if ( isptables[KCDMA_ISP] ) - { - CleanupStack::PopAndDestroy( isptables[KCDMA_ISP] ); - } - - if ( isptables[KGPRSOUT] ) - { - CleanupStack::PopAndDestroy( isptables[KGPRSOUT] ); - } - - if ( isptables[KGPRSIN] ) - { - CleanupStack::PopAndDestroy( isptables[KGPRSIN] ); - } - - if ( isptables[KDIALOUT] ) - { - CleanupStack::PopAndDestroy( isptables[KDIALOUT] ); - } - - if ( ipbearert ) - { - CleanupStack::PopAndDestroy( ipbearert ); - } - } - else - { - if ( err != KErrNotFound ) - { - User::LeaveIfError( err ); - } - } - } - else - { - if ( err != KErrNotFound ) - { - User::Leave( err ); - } - } - CleanupStack::PopAndDestroy( wapt ); // wapt - iExt->iMaxIndex = iCount-1; - if ( OwnTransaction ) - { - ApCommons::RollbackTransactionOnLeave( iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - CLOG( ( ESelect, 1, _L( "<- CApSelect::DoUpdateL" ) ) ); - - return err; - } - - - - - -// --------------------------------------------------------- -// CApSelect::GetFilteredSortedWapTableViewLC -// --------------------------------------------------------- -// -CCommsDbTableView* CApSelect::GetFilteredSortedWapTableViewLC() - { - CLOG( ( ESelect, 0, - _L( "-> CApSelect::GetFilteredSortedWapTableViewLC" ) ) ); - - CCommsDbTableView* wapt = NULL; - // Select * from WAP Access Point Table Where - // WAP_CURRENT_BEARER=WAP_IP_BEARER - if ( ( iBearer & EApBearerTypeCSD ) || - ( iBearer & EApBearerTypeHSCSD ) || - ( iBearer & EApBearerTypeGPRS ) || - ( iExt->iCdma && ( iBearer & EApBearerTypeCDMA ) ) ) - { - wapt = iDb->OpenViewMatchingTextLC( TPtrC(WAP_ACCESS_POINT), - TPtrC(WAP_CURRENT_BEARER), - TPtrC(WAP_IP_BEARER)); - } - else - { - wapt = iDb->OpenTableLC( TPtrC(WAP_ACCESS_POINT) ); - } - - TInt err; - err = wapt->GotoFirstRecord(); - if ( err != KErrNotFound ) - { - User::LeaveIfError( err ); - } - - if ( err != KErrNotFound ) - { - // here may come additional AND-ed parts - if ( ( iIsp & KEApIspTypeWAPMandatory ) || - ( iIsp & KEApIspTypeMMSMandatory ) ) - { // add AND ( Hasmandatory..) - if ( ( iBearer & EApBearerTypeCSD ) || - ( iBearer & EApBearerTypeHSCSD ) || - ( iBearer & EApBearerTypeGPRS ) || - ( iExt->iCdma && ( iBearer & EApBearerTypeCDMA ) ) ) - { // Needs IP bearer - // ( WAP_CURRENT_BEARER = WAP_IP_BEARER AND - // WAP_START_PAGE != "" - // AND WAP_START_PAGE != "http://" - // Filter out unneded records - HBufC* buf; - do - { - // Add test cases covering this route - buf = wapt->ReadLongTextLC( TPtrC(WAP_START_PAGE) ); - if ( ( buf->Compare( KEmpty ) == 0 ) - || ( buf->Compare( KInvStartPage ) == 0 ) ) - { - err = wapt->DeleteRecord(); - } - CleanupStack::PopAndDestroy( buf ); - err = wapt->GotoNextRecord(); - } - while ( !err ); - } - } - } - CLOG( ( ESelect, 1, - _L( "<- CApSelect::GetFilteredSortedWapTableViewLC" ) ) ); - - return wapt; - } - - - - - -// --------------------------------------------------------- -// CApSelect::GetFilteredSortedIpBearerTableViewLC() -// --------------------------------------------------------- -// -CCommsDbTableView* CApSelect::GetFilteredSortedIpBearerTableViewLC() - { - CLOG( ( ESelect, 0, - _L( "-> CApSelect::GetFilteredSortedIpBearerTableViewLC" ) ) ); - - CCommsDbTableView* table = NULL; - - table = iDb->OpenTableLC( TPtrC(WAP_IP_BEARER) ); - TInt err; - err = table->GotoFirstRecord(); - - if ( ( iBearer & EApBearerTypeCSD ) || - ( iBearer & EApBearerTypeHSCSD ) || - ( iBearer & EApBearerTypeGPRS ) || - ( iExt->iCdma && ( iBearer & EApBearerTypeCDMA ) ) ) - { - // needs ipbearer table - // only filtering we can do is about Mandatory - // because Isptype & Bearertype are up to - // ISP & GPRS tables... - if ( iIsp & KEApIspTypeWAPMandatory ) - { // Hasmandatory.. - // SELECT * from WAP_IP_BEARER WHERE - // WAP_GATEWAY_ADDRESS <> '' - // AND WAP_GATEWAY_ADDRESS != "0.0.0.0" ) - // AND HIDDEN... - - if ( err != KErrNotFound ) - { - User::LeaveIfError( err ); - - HBufC* buf; - do - { - buf = table->ReadLongTextLC( TPtrC(WAP_GATEWAY_ADDRESS) ); - if ( ( buf->Compare( KEmpty ) == 0 ) - || ( buf->Compare( KDynIpAddress ) == 0 ) ) - { - err = table->DeleteRecord(); - } - CleanupStack::PopAndDestroy( buf ); - err = table->GotoNextRecord(); - } while ( !err ); - } - } - } - - CLOG( ( ESelect, 1, - _L( "<- CApSelect::GetFilteredSortedIpBearerTableViewLC" ) ) ); - - return table; - } - - - -// --------------------------------------------------------- -// CApSelect::GetFilteredSortedIspOutTableViewLC() -// --------------------------------------------------------- -// -CCommsDbTableView* CApSelect::GetFilteredSortedIspOutTableViewLC() - { - CLOG( ( ESelect, 0, - _L( "-> CApSelect::GetFilteredSortedIspOutTableViewLC" ) ) ); - - CCommsDbTableView* table = NULL; - // ISP-type & bearer type... - if ( ( iBearer & EApBearerTypeCSD ) || - ( iBearer & EApBearerTypeHSCSD ) ) - { - // only needed if CSD or HSCSD - if ( ( iBearer & EApBearerTypeCSD ) && - (!( iBearer & EApBearerTypeHSCSD )) ) - { // needs only CSD - // WHERE ISP_BEARER_TYPE = EBearerTypeCSD - table = iDb->OpenViewMatchingUintLC( TPtrC(DIAL_OUT_ISP), - TPtrC(ISP_BEARER_TYPE), - EBearerTypeCSD - ); - } - else - { - if ( ( iBearer & EApBearerTypeHSCSD ) && - (!( iBearer & EApBearerTypeCSD )) ) - { // needs only HSCSD - // WHERE ISP_BEARER_TYPE = EBearerTypeHSCSD - table = iDb->OpenViewMatchingUintLC( TPtrC(DIAL_OUT_ISP), - TPtrC(ISP_BEARER_TYPE), - EBearerTypeHSCSD - ); - } - else - { - table = iDb->OpenTableLC( TPtrC(DIAL_OUT_ISP) ); - } - } - TInt err; - err = table->GotoFirstRecord(); - - if ( err != KErrNotFound ) - { - User::LeaveIfError( err ); - // now add isp-type filtering - // if Added = ETrue : AND ( ), else : WHERE - // KEApIspTypeInternetOnly, - // KEApIspTypeWAPOnly, - // KEApIspTypeInternetAndWAP, - // KEApIspTypeWAPMandatory, KEApIspTypeAll - TUint32 isp( 0 ); - do - { - table->ReadUintL( TPtrC(ISP_TYPE), isp ); - if ( ( iIsp & KEApIspTypeInternetOnly ) - && ( !( iIsp & KEApIspTypeAll ) ) - ) - {// ( ( ISP_TYPE == EIspTypeInternetOnly ) - if ( isp != EIspTypeInternetOnly ) - { - err = table->DeleteRecord(); - } - } - if ( ( iIsp & KEApIspTypeWAPOnly ) - && ( !( iIsp & KEApIspTypeAll ) ) - ) - { - if ( isp != EIspTypeWAPOnly ) - { - err = table->DeleteRecord(); - } - } - if ( ( iIsp & KEApIspTypeInternetAndWAP ) - && ( !( iIsp & KEApIspTypeAll ) ) - ) - { - if ( isp != EIspTypeInternetAndWAP ) - { - err = table->DeleteRecord(); - } - } - err = table->GotoNextRecord(); - } while ( !err ); - } - } - - CLOG( ( ESelect, 1, - _L( "<- CApSelect::GetFilteredSortedIspOutTableViewLC" ) ) ); - - return table; - } - - - -// --------------------------------------------------------- -// CApSelect::GetFilteredSortedGprsTableViewLC() -// --------------------------------------------------------- -// -CCommsDbTableView* CApSelect::GetFilteredSortedGprsTableViewLC( TBool aIn ) - { - CLOG( ( ESelect, 0, - _L( "-> CApSelect::GetFilteredSortedGprsTableViewLC" ) ) ); - - CCommsDbTableView* table = NULL; - // ISP-type & bearer type... - if ( iBearer & EApBearerTypeGPRS ) - { - // as all other criteria has more than 2 possible values - // and all their combinations should be taken into account, - // I ask the whole table and then narrow it down - // myself with removing the unneded records temporarily - if ( aIn ) - { - table = iDb->OpenTableLC( TPtrC( INCOMING_WCDMA ) ); - } - else - { - table = iDb->OpenTableLC( TPtrC( OUTGOING_WCDMA ) ); - } - TInt err; - err = table->GotoFirstRecord(); - - if ( err != KErrNotFound ) - { - User::LeaveIfError( err ); - // only needed if GPRS - // now add isp-type filtering - // KEApIspTypeInternetOnly, - // KEApIspTypeWAPOnly, - // KEApIspTypeInternetAndWAP, - // KEApIspTypeWAPMandatory, KEApIspTypeAll - TUint32 isp( 0 ); - TUint32 pdptype( 0 ); - TBool deleted(EFalse); - do - { - deleted = EFalse; - // first check if it fits our isp type criteria - TRAPD( res, table->ReadUintL( TPtrC(GPRS_AP_TYPE), isp ) ); - if ( res != KErrUnknown ) - { - if ( ( iIsp & KEApIspTypeInternetOnly ) - && ( !( iIsp & KEApIspTypeAll ) ) - ) - {// ( ( ISP_TYPE == EIspTypeInternetOnly ) - if ( isp != EIspTypeInternetOnly ) - { - err = table->DeleteRecord(); - deleted = ETrue; - } - } - if ( ( iIsp & KEApIspTypeWAPOnly ) - && ( !( iIsp & KEApIspTypeAll ) ) - ) - { - if ( isp != EIspTypeWAPOnly ) - { - err = table->DeleteRecord(); - deleted = ETrue; - } - } - if ( ( iIsp & KEApIspTypeInternetAndWAP ) - && ( !( iIsp & KEApIspTypeAll ) ) - ) - { - if ( isp != EIspTypeInternetAndWAP ) - { - err = table->DeleteRecord(); - deleted = ETrue; - } - } - } - // now check if it fits IPv4 or IPv6 criteria - // Add IPv4 or IPv6 query ONLY if it is supported!!! - if ( ( !deleted ) && ( iExt->iIsIpv6Supported ) ) - { - // if ONLY IPv4 is requested, - // filter out where PDP_type IS IPv6 - // if both is requested, do nothing - // if IPv6 only is requested, filter IN - // where PDP_type IS IPv6 - if ( ( iExt->iReqIpvType == EIPv4 ) || - ( iExt->iReqIpvType == EIPv6 ) ) - { // not both, needs filtering - table->ReadUintL( TPtrC(GPRS_PDP_TYPE), pdptype ); - if ( ( iExt->iReqIpvType == EIPv4 ) - && ( pdptype == RPacketContext::EPdpTypeIPv6 ) - ) - { - err = table->DeleteRecord(); - deleted = ETrue; - } - if ( ( iExt->iReqIpvType == EIPv6 ) - && ( pdptype == RPacketContext::EPdpTypeIPv4 ) - ) - { - err = table->DeleteRecord(); - deleted = ETrue; - } - } - } - err = table->GotoNextRecord(); - } while ( !err ); - } - } - CLOG( ( ESelect, 1, - _L( "<- CApSelect::GetFilteredSortedGprsTableViewLC" ) ) ); - - return table; - } - - - -// --------------------------------------------------------- -// CApSelect::GetUintValuesL -// --------------------------------------------------------- -// -void CApSelect::GetUintValuesL( CCommsDbTableView* aTable, - const TDesC& aField, - CArrayFixFlat& aArray ) - { - CLOG( ( ESelect, 0, _L( "-> CApSelect::GetUintValuesL" ) ) ); - - if ( aTable ) - { - TInt err = aTable->GotoFirstRecord(); - if ( ( err != KErrNone ) && ( err != KErrNotFound ) ) - { - User::Leave( err ); - } - if ( err != KErrNotFound ) - { - TUint32 temp( 0 ); - TBool goon( ETrue ); - do - { - err = ApCommons::ReadUintL( aTable, TPtrC(COMMDB_ID), temp ); - if ( ( err == KErrNone ) && ( temp ) ) - { - // Here I need to TRAP to be able to use 'old' - // database which has no such field ! - // Also assigns a 'default' for it in that case - TRAP(err, ApCommons::ReadUintL( aTable, aField, temp ) ); - aArray.AppendL( temp ); - } - err = aTable->GotoNextRecord(); - if ( err == KErrNotFound ) - { - goon = EFalse; - } - else - { - User::LeaveIfError( err ); - } - } - while ( goon ); - } - } - CLOG( ( ESelect, 1, _L( "<- CApSelect::GetUintValuesL" ) ) ); - - } - - - -// --------------------------------------------------------- -// CApSelect::GetProtValuesL -// --------------------------------------------------------- -// -void CApSelect::GetProtValuesL( CCommsDbTableView* aTable, - CArrayFixFlat& aArray ) - { - CLOG( ( ESelect, 0, _L( "-> CApSelect::GetProtValuesL" ) ) ); - - CCommsDbProtectTableView* view = - (CCommsDbProtectTableView*)aTable; - if ( aTable ) - { - TInt err = aTable->GotoFirstRecord(); - if ( ( err != KErrNone ) && ( err != KErrNotFound ) ) - { - User::Leave( err ); - } - if ( err != KErrNotFound ) - { - TBool goon( ETrue ); - TInt prot( EFalse ); - do - { - err = view->GetRecordAccess( prot ); - if ( ( err == KErrNone ) ) - { - aArray.AppendL( prot ); - } - err = aTable->GotoNextRecord(); - if ( err == KErrNotFound ) - { - goon = EFalse; - } - else - { - User::LeaveIfError( err ); - } - } - while ( goon ); - } - } - CLOG( ( ESelect, 1, _L( "<- CApSelect::GetProtValuesL" ) ) ); - - } - - - - -// --------------------------------------------------------- -// CApSelect::GetTextValuesL -// --------------------------------------------------------- -// -void CApSelect::GetTextValuesL( CCommsDbTableView* aTable, - const TDesC& aField, - CArrayPtrFlat& aArray ) - { - CLOG( ( ESelect, 0, _L( "-> CApSelect::GetTextValuesL" ) ) ); - - if ( aTable ) - { - TInt err = aTable->GotoFirstRecord(); - if ( ( err != KErrNone ) && ( err != KErrNotFound ) ) - { - User::Leave( err ); - } - if ( err != KErrNotFound ) - { - TBool goon( ETrue ); - TInt l; - TUint32 temp( 0 ); - HBufC* tmp = NULL; - do - { - err = ApCommons::ReadUintL( aTable, TPtrC(COMMDB_ID), temp ); - if ( ( err == KErrNone ) && ( temp ) ) - { - aTable->ReadColumnLengthL( aField, l ); - tmp = HBufC::NewLC( l ); - TPtr tmpptr( tmp->Des() ); - aTable->ReadTextL( aField, tmpptr ); - aArray.AppendL( tmp ); - } - err = aTable->GotoNextRecord(); - if ( err == KErrNotFound ) - { - goon = EFalse; - } - else - { - User::LeaveIfError( err ); - } - } - while ( goon ); - } - } - CLOG( ( ESelect, 1, _L( "<- CApSelect::GetTextValuesL" ) ) ); - - } - - - -// --------------------------------------------------------- -// CApSelect::GetLongTextValuesL -// --------------------------------------------------------- -// -void CApSelect::GetLongTextValuesL( CCommsDbTableView* aTable, - const TDesC& aField, - CArrayPtrFlat& aArray ) - { - CLOG( ( ESelect, 0, _L( "-> CApSelect::GetLongTextValuesL" ) ) ); - - if ( aTable ) - { - TInt err = aTable->GotoFirstRecord(); - if ( ( err != KErrNone ) && ( err != KErrNotFound ) ) - { - User::Leave( err ); - } - if ( err != KErrNotFound ) - { - TBool goon( ETrue ); - TInt l; - TUint32 temp( 0 ); - HBufC* tmp = NULL; - do - { - err = ApCommons::ReadUintL( aTable, TPtrC(COMMDB_ID), temp ); - if ( ( err == KErrNone ) && ( temp ) ) - { - aTable->ReadColumnLengthL( aField, l ); - tmp = aTable->ReadLongTextLC( aField ); - aArray.AppendL( tmp ); - } - err = aTable->GotoNextRecord(); - if ( err == KErrNotFound ) - { - goon = EFalse; - } - else - { - User::LeaveIfError( err ); - } - } - while ( goon ); - } - } - CLOG( ( ESelect, 1, _L( "<- CApSelect::GetLongTextValuesL" ) ) ); - - } - - - -// --------------------------------------------------------- -// CApSelect::IsInArray -// --------------------------------------------------------- -// -TBool CApSelect::IsInArray( CArrayFixFlat* aArray, TUint32 aValue ) - { - CLOG( ( ESelect, 0, _L( "<-> CApSelect::IsInArray" ) ) ); - - return ( PosInArray( aArray, aValue ) >= 0); - } - - - -// --------------------------------------------------------- -// CApSelect::PosInArray -// --------------------------------------------------------- -// -TInt CApSelect::PosInArray( CArrayFixFlat* aArray, TUint32 aValue ) - { - CLOG( ( ESelect, 0, _L( "-> CApSelect::PosInArray" ) ) ); - - TInt retval( KErrNotFound ); - if ( aArray ) - { - TInt count = aArray->Count(); - for( TInt i=0; ( ( iAt( i ) == aValue ) - { - retval = i; - } - } - } - CLOG( ( ESelect, 1, _L( "<- CApSelect::PosInArray" ) ) ); - - return retval; - } - - -// --------------------------------------------------------- -// CApSelect::GetItemPos -// --------------------------------------------------------- -// -TInt CApSelect::GetItemPos( CApListItemList* aList, TUint32 aId ) - { - CLOG( ( ESelect, 0, _L( "-> CApSelect::GetItemPos" ) ) ); - - TInt retval( KErrNotFound ); - if ( aList ) - { - TInt count = aList->Count(); - for( TInt i=0; ( ( iAt( i )->Uid() == aId ) - { - retval = i; - } - } - } - CLOG( ( ESelect, 1, _L( "<- CApSelect::GetItemPos" ) ) ); - - return retval; - } - - - -// --------------------------------------------------------- -// CApSelect::OpenViewMatchingTextL -// --------------------------------------------------------- -// -CCommsDbTableView* CApSelect::OpenViewMatchingTextL( - const TDesC& aTableName, - const TDesC& aColumnToMatch, - const TDesC16& aValueToMatch ) - { - CLOG( ( ESelect, 0, _L( "-> CApSelect::OpenViewMatchingTextL" ) ) ); - - CCommsDbTableView* table = NULL; - TRAPD( err, { // this leaves if the table is empty.... - table = iDb->OpenViewMatchingTextLC( aTableName, - aColumnToMatch, - aValueToMatch ); - CleanupStack::Pop( table ); // table - } - ); - if ( err != KErrNotFound ) - { - User::LeaveIfError( err ); - } - CLOG( ( ESelect, 1, _L( "<- CApSelect::OpenViewMatchingTextL" ) ) ); - - return table; - } - - - -// --------------------------------------------------------- -// CApSelect::GetIspValuesL -// --------------------------------------------------------- -// -void CApSelect::GetIspValuesL( CCommsDbTableView* aTable, - CArrayFixFlat* aArray, - const TDesC& aColName ) - { - CLOG( ( ESelect, 0, _L( "-> CApSelect::GetIspValuesL" ) ) ); - - if ( aTable ) - { - TInt err = aTable->GotoFirstRecord(); - if ( ( err != KErrNone ) && ( err != KErrNotFound ) ) - { - User::Leave( err ); - } - if ( err != KErrNotFound ) - { - TUint32 temp[3]; - TBool goon( ETrue ); - do - { - err = ApCommons::ReadUintL( aTable, TPtrC(COMMDB_ID), - temp[KUID] ); - if ( ( err == KErrNone ) && ( temp[KUID] ) ) - { - // Here I need to TRAP to be able to use 'old' - // database which has no such field ! - // Also assigns a 'default' for it in that case - TRAP( err, ApCommons::ReadUintL - ( - aTable, - aColName, - temp[KISPTYPE] - ) ); - if ( err == KErrNotFound ) - { - temp[KISPTYPE] = EIspTypeInternetAndWAP; - } - else - { - User::LeaveIfError( err ); - } - // if it is CSD/HSCSD, now decide which one - if( !aColName.Compare( TPtrC(ISP_TYPE) ) ) - { - err = ApCommons::ReadUintL - ( - aTable, - TPtrC(ISP_BEARER_TYPE), - temp[KBEARERTYPE] - ); - if ( err != KErrNone ) - { // only possible if it is NULL, - // for other errors, it leaves... - temp[KBEARERTYPE] = EBearerTypeCSD; - } - } - else - { - temp[KBEARERTYPE] = 0; - } - aArray->AppendL( temp ); - } - err = aTable->GotoNextRecord(); - if ( err == KErrNotFound ) - { - goon = EFalse; - } - else - { - User::LeaveIfError( err ); - } - } - while ( goon ); - } - } - CLOG( ( ESelect, 1, _L( "<- CApSelect::GetIspValuesL" ) ) ); - - } - - - - -// --------------------------------------------------------- -// CApSelect::GetIapPos -// --------------------------------------------------------- -// -TInt CApSelect::GetIapPos( CArrayFixFlat* aArray, TUint32 aValue ) - { - CLOG( ( ESelect, 0, _L( "-> CApSelect::GetIapPos" ) ) ); - - TInt retval( KErrNotFound ); - if ( aArray ) - { - TInt count = aArray->Count(); - for( TInt i=0; ( ( iAt( i )[KUID] == aValue ) - { - retval = i; - } - } - } - CLOG( ( ESelect, 1, _L( "<- CApSelect::GetIapPos" ) ) ); - - return retval; - } - - - -// --------------------------------------------------------- -// CApSelect::SortLocalisedNameL() -// --------------------------------------------------------- -// -void CApSelect::SortLocalisedNameL( TBool aAscending ) - { - CLOG( ( ESelect, 0, _L( "-> CApSelect::SortLocalisedNameL" ) ) ); - - TApListItemNameKey Key( aAscending ); - Key.SetPtr( iApList ); - // Sort returns KErrGeneral if stack overflow, otherwise, returns - // KErrNone. So we will Leave only if stack overflow, - // but then that really does not matter... - User::LeaveIfError( iApList->Sort( Key ) ); - CLOG( ( ESelect, 1, _L( "<- CApSelect::SortLocalisedNameL" ) ) ); - - } - - - - -// --------------------------------------------------------- -// CApSelect::SortUidL() -// --------------------------------------------------------- -// -void CApSelect::SortUidL( TBool aAscending ) - { - CLOG( ( ESelect, 0, _L( "-> CApSelect::SortUidL" ) ) ); - - TApListItemUidKey Key( aAscending ); - Key.SetPtr( iApList ); - // Sort returns KErrGeneral if stack overflow, otherwise, returns - // KErrNone. So we will Leave only if stack overflow, - // but then that really does not matter... - User::LeaveIfError( iApList->Sort( Key ) ); - CLOG( ( ESelect, 1, _L( "<- CApSelect::SortUidL" ) ) ); - - } - -// --------------------------------------------------------- -// CApSelect::NewLC() -// --------------------------------------------------------- -// -EXPORT_C CApSelect* CApSelect::NewLC( CCommsDatabase& aDb, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TInt aReqIpvType - ) - { - CLOG( ( ESelect, 0, _L( "-> CApSelect::NewLC" ) ) ); - - CApSelect* db = new( ELeave ) CApSelect; - CleanupStack::PushL( db ); - db->ConstructL( aDb, aIspFilter, aBearerFilter, - aSortType, aReqIpvType, EVpnFilterBoth ); - - CLOG( ( ESelect, 1, _L( "<- CApSelect::NewLC" ) ) ); - return db; - } - - - -// --------------------------------------------------------- -// CApSelect::ConstructL -// --------------------------------------------------------- -// -EXPORT_C void CApSelect::ConstructL( CCommsDatabase& aDb, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TInt aReqIpvType ) - - { - CLOG( ( ESelect, 0, _L( "-> CApSelect::ConstructL" ) ) ); - - ConstructL( aDb, aIspFilter, aBearerFilter, - aSortType, aReqIpvType, EVpnFilterBoth ); - - CLOG( ( ESelect, 1, _L( "<- CApSelect::ConstructL" ) ) ); - } - - - - -// --------------------------------------------------------- -// CApSelect::NewLC() -// --------------------------------------------------------- -// -EXPORT_C CApSelect* CApSelect::NewLC( CCommsDatabase& aDb, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TInt aReqIpvType, - TVpnFilterType aVpnFilterType - ) - { - CLOG( ( ESelect, 0, _L( "-> CApSelect::NewLC" ) ) ); - - CApSelect* db = new( ELeave ) CApSelect; - CleanupStack::PushL( db ); - db->ConstructL( aDb, aIspFilter, aBearerFilter, - aSortType, aReqIpvType, aVpnFilterType ); - - CLOG( ( ESelect, 1, _L( "<- CApSelect::NewLC" ) ) ); - return db; - } - - - -// --------------------------------------------------------- -// CApSelect::NewLC() -// --------------------------------------------------------- -// -EXPORT_C CApSelect* CApSelect::NewLC( CCommsDatabase& aDb, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TInt aReqIpvType, - TVpnFilterType aVpnFilterType, - TBool aIncludeEasyWlan ) - { - CLOG( ( ESelect, 0, _L( "-> CApSelect::NewLC" ) ) ); - - CApSelect* db = new( ELeave ) CApSelect; - CleanupStack::PushL( db ); - db->ConstructL( aDb, aIspFilter, aBearerFilter, - aSortType, aReqIpvType, aVpnFilterType, - aIncludeEasyWlan ); - - CLOG( ( ESelect, 1, _L( "<- CApSelect::NewLC" ) ) ); - return db; - } - - -// --------------------------------------------------------- -// CApSelect::ConstructL -// --------------------------------------------------------- -// -EXPORT_C void CApSelect::ConstructL( CCommsDatabase& aDb, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TInt aReqIpvType, - TVpnFilterType aVpnFilterType ) - { - CLOG( ( ESelect, 0, _L( "-> CApSelect::ConstructL" ) ) ); - - ConstructL( aDb, aIspFilter, aBearerFilter, aSortType, - aReqIpvType, aVpnFilterType, EFalse ); - - CLOG( ( ESelect, 1, _L( "<- CApSelect::ConstructL" ) ) ); - } - - - - - -// --------------------------------------------------------- -// CApSelect::ConstructL -// --------------------------------------------------------- -// -EXPORT_C void CApSelect::ConstructL( CCommsDatabase& aDb, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TInt aReqIpvType, - TVpnFilterType aVpnFilterType, - TBool aIncludeEasyWlan ) - { - CLOG( ( ESelect, 0, _L( "-> CApSelect::ConstructL" ) ) ); - - iExt = new ( ELeave )TSelectExtra; - iExt->iExtra = 0; - iExt->iIsIpv6Supported = EFalse; - iExt->iMaxIndex = 0; - iExt->iReqIpvType = EIPv4; - iExt->iIsFeatureManagerInitialised = EFalse; - iExt->iCdma = EFalse; - iExt->iWlanSupported = EFalse; - iExt->iIncludeEasyWlan = aIncludeEasyWlan; - - FeatureManager::InitializeLibL(); - iExt->iIsFeatureManagerInitialised = ETrue; - - iApList = new( ELeave )CApListItemList(); - iExt->iIsIpv6Supported = - FeatureManager::FeatureSupported( KFeatureIdIPv6 ); -#ifdef __TEST_IPV6_SUPPORT - iExt->iIsIpv6Supported = ETrue; -#endif // __TEST_IPV6_SUPPORT - iExt->iCdma = FeatureManager::FeatureSupported( KFeatureIdProtocolCdma ); -#ifdef __TEST_CDMA_SUPPORT - iExt->iCdma = ETrue; -#endif // __TEST_CDMA_SUPPORT - - iExt->iWlanSupported = - FeatureManager::FeatureSupported( KFeatureIdProtocolWlan ); -#ifdef __TEST_WLAN_SUPPORT - iExt->iWlanSupported = ETrue; -#endif // __TEST_WLAN_SUPPORT - - iDb = &aDb; - - SetFiltersL( aIspFilter, aBearerFilter, aSortType, - aReqIpvType, aVpnFilterType ); - - CLOG( ( ESelect, 1, _L( "<- CApSelect::ConstructL" ) ) ); - } - - - -// --------------------------------------------------------- -// CApSelect::SetFiltersL -// --------------------------------------------------------- -// -void CApSelect::SetFiltersL( TInt aIspFilter, TInt aBearerFilter, - TInt aSortType, TInt aReqIpvType, - TInt aVpnFilterType ) - { - CLOG( ( ESelect, 0, _L( "-> CApSelect::SetFilters" ) ) ); - - TInt lcode( KErrNone ); - // as bearer filter might be EApBearerTypeAllBearers, - // there is no point to check bearer filter validity - // but we can still check ISP... - if ( aIspFilter >= 2*KEApIspTypeMMSMandatory ) - { - lcode = KErrInvalidIspRequest; - } - - User::LeaveIfError( lcode ); - - if ( !( ( aSortType == KEApSortUidAscending ) - || ( aSortType == KEApSortUidDescending ) - || ( aSortType == KEApSortNameAscending ) - || ( aSortType == KEApSortNameDescending ) ) - ) - { - // no sorting order specified, - // assuming KEApSortUidAscending - aSortType = KEApSortUidAscending; - } - - if ( !( aBearerFilter & ( EApBearerTypeCSD - + EApBearerTypeCDMA - + EApBearerTypeGPRS - + EApBearerTypeHSCSD - + EApBearerTypeWLAN - #ifdef __TEST_LAN_BEARER - + EApBearerTypeLAN - #endif // __TEST_LAN_BEARER - + EApBearerTypeLANModem - // Check bearertype all case!!! - + EApBearerTypeAll ) ) - ) - { - // no bearer type specified, - // assuming EApBearerTypeAll - if ( aBearerFilter != EApBearerTypeAllBearers ) - { - // unknown bearer, Leave - User::Leave( KErrInvalidBearerType ); - } - } - - if ( !( aIspFilter & ( KEApIspTypeAll - + KEApIspTypeInternetAndWAP - + KEApIspTypeInternetOnly - + KEApIspTypeWAPOnly - + KEApIspTypeMMSMandatory ) ) - ) - { - // erroneous use, no ISP type specified, - // or only KEApIspTypeWAPMandatory, - // both cases assuming KEApIspTypeAll - aIspFilter += KEApIspTypeAll; - } - - iIsp = aIspFilter; - iSort = aSortType; - - if ( aBearerFilter & EApBearerTypeAll ) - { - aBearerFilter = EApBearerTypeAllBearers; - } - - iBearer = GetSupportedBearerSet( aBearerFilter ); - - if ( !iBearer ) - { - User::Leave( KErrInvalidBearerType ); - } - - iExt->iReqIpvType = aReqIpvType; - - iExt->iVpnFilterType = aVpnFilterType; - - DoUpdateL(); - - if ( iSort == KEApSortNameAscending ) - { - SortLocalisedNameL( ETrue ); // ascending - } - else - { - if ( iSort == KEApSortNameDescending ) - { - SortLocalisedNameL( EFalse ); // descending - } - else - { - if ( iSort == KEApSortUidAscending ) - { - SortUidL( ETrue ); - } - else - { - if ( iSort == KEApSortUidDescending ) - { - SortUidL( EFalse ); - } - } - } - } - - CLOG( ( ESelect, 1, _L( "<- CApSelect::SetFilters" ) ) ); - } - - - -// --------------------------------------------------------- -// CApSelect::GetVpnTableViewLC() -// --------------------------------------------------------- -// -CCommsDbTableView* CApSelect::GetVpnTableViewLC( ) - { - CLOG( ( ESelect, 0, _L( "-> CApSelect::GetVpnTableViewLC" ) ) ); - - CCommsDbTableView* table = NULL; - table = iDb->OpenTableLC( TPtrC(VPN_SERVICE) ); - - CLOG( ( ESelect, 1, _L( "<- CApSelect::GetVpnTableViewLC" ) ) ); - - return table; - } - - - -// --------------------------------------------------------- -// CApSelect::GetVpnValuesL -// --------------------------------------------------------- -// -void CApSelect::GetVpnValuesL( CCommsDbTableView* aTable, - CArrayFixFlat* aVpnArray ) - { // get the VPN values - CLOG( ( ESelect, 0, _L( "-> CApSelect::GetVpnValuesL" ) ) ); - - if ( aTable ) - { - TInt err = aTable->GotoFirstRecord(); - if ( ( err != KErrNone ) && ( err != KErrNotFound ) ) - { - User::Leave( err ); - } - if ( err != KErrNotFound ) - { - TUint32 tempvpn( 0 ); - TUint32 temphomeiap( 0 ); - TUint32 temphomesnap( 0 ); - HBufC* tempname = NULL; - TVpnData data; - TBool goon( ETrue ); - do - { - err = ApCommons::ReadUintL( aTable, TPtrC(COMMDB_ID), - tempvpn ); - if ( ( err == KErrNone ) && ( tempvpn ) ) - { - // First try to check if VPN IAP uses another IAP directly - err = ApCommons::ReadUintL( aTable, - TPtrC(VPN_SERVICE_IAP), - temphomeiap ); - - if ( (err != KErrNone ) || ( !tempvpn ) ) - { - // IAP field was empty. VPN IAP must point to SNAP. - err = ApCommons::ReadUintL( aTable, - TPtrC(VPN_SERVICE_SNAP), - temphomesnap ); - } - - if ( ( err == KErrNone ) && ( temphomeiap || temphomesnap ) ) - { - // now get the name - - tempname = - ApCommons::ReadText16ValueLC( aTable, - TPtrC(COMMDB_NAME) ); - - // everything is O.K., we can add the item - if ( temphomesnap ) - { - data.iHomeSnapId = temphomesnap; - data.iHomeIapId = 0; - } - else - { - data.iHomeSnapId = 0; - data.iHomeIapId = temphomeiap; - } - data.iVpnIapId = tempvpn; - data.iName = tempname; - aVpnArray->AppendL( data ); // array owns it... - } - // Only VPN iaps which point to a real IAP are added to list. - } - else - { - User::LeaveIfError( err ); - } - err = aTable->GotoNextRecord(); - if ( err == KErrNotFound ) - { - goon = EFalse; - } - else - { - User::LeaveIfError( err ); - } - } - while ( goon ); - } - } - CLOG( ( ESelect, 1, _L( "<- CApSelect::GetVpnValuesL" ) ) ); - - } - - - - - -// --------------------------------------------------------- -// CApSelect::AddLanL -// --------------------------------------------------------- -// -void CApSelect::AddLanL( TBool aWlan ) - { - CLOG( ( ESelect, 0, _L( "-> CApSelect::AddLanL" ) ) ); - - // First get the list of all VPN-s - // get their WAP-ID, IAPID, - // Also ask their RealIApID, bearertype and filter for it... - - CCommsDbTableView* lant = NULL; - - lant = iDb->OpenViewMatchingTextLC( TPtrC(IAP), - TPtrC(IAP_SERVICE_TYPE), - TPtrC(LAN_SERVICE) ); - TInt err = lant->GotoFirstRecord(); - if ( err != KErrNotFound) - { - User::LeaveIfError( err ); - - CArrayFixFlat* laniapid = - new ( ELeave ) CArrayFixFlat( 10 ); - CleanupStack::PushL( laniapid ); - GetUintValuesL( lant, TPtrC(COMMDB_ID), *laniapid ); - - CArrayFixFlat* lanserviceid = - new ( ELeave ) CArrayFixFlat( 10 ); - CleanupStack::PushL( lanserviceid ); - GetUintValuesL( lant, TPtrC(IAP_SERVICE), *lanserviceid ); - - CArrayFixFlat* iapbearerid = - new ( ELeave ) CArrayFixFlat( 10 ); - CleanupStack::PushL( iapbearerid ); - GetUintValuesL( lant, TPtrC(IAP_BEARER), *iapbearerid ); - - // read up access point names, too, just to be as fast as we can... - CArrayPtrFlat* lanapname = - new ( ELeave ) CArrayPtrFlat( 10 ); - CleanupStack::PushL( lanapname ); - GetTextValuesL( lant, TPtrC(COMMDB_NAME), *lanapname ); - - // now get WAP ID's -// CArrayFixFlat* lanwapapid = -// new ( ELeave ) CArrayFixFlat( 10 ); -// CleanupStack::PushL( lanwapapid ); - CApUtils* utils = CApUtils::NewLC( *iDb ); - - TUint32 count( laniapid->Count() ); - TUint32 currlaniapid; - TUint32 currwapapid( 0 ); - CApListItem* item = NULL; - - for ( TUint32 i = 0; i < count; i++) - { - currlaniapid = laniapid->At( i ); - TRAP( err, currwapapid = utils->WapIdFromIapIdL( currlaniapid )); - if ( !err ) - { // get protection for the given record - TInt prot( EFalse ); - CCommsDbTableView* wt = NULL; - - wt = iDb->OpenViewMatchingUintLC( TPtrC(WAP_ACCESS_POINT), - TPtrC(COMMDB_ID), - currwapapid ); - CCommsDbProtectTableView* protview = - (CCommsDbProtectTableView*)wt; - - User::LeaveIfError( wt->GotoFirstRecord() ); - err = protview->GetRecordAccess( prot ); - HBufC* wspage = wt->ReadLongTextLC( TPtrC(WAP_START_PAGE) ); - if ( aWlan ) - { - if ( iExt->iWlanSupported ) - { - // check if it is a WLAN, add ONLY if it IS - TUint32 lanid = lanserviceid->At( i ); - TBool iswlan( EFalse ); - TRAP( err, iswlan = utils->IsWlanL( lanid ) ); - if ( !err && iswlan ) - { - TBool hasssid( EFalse ); - err = KErrNone; - TRAP( err, - hasssid = utils->HasWlanSSIDL( lanid )); - if ( iExt->iIncludeEasyWlan ) - { - hasssid = ETrue; - } - if ( (err == KErrNone) && hasssid ) - { - item = CApListItem::NewLC( - EIspTypeInternetAndWAP, - currwapapid, - *lanapname->At( i ), - EApBearerTypeWLAN, - *wspage, - prot ); - iApList->AppendL( item ); - CleanupStack::Pop( item ); // owned by list - } - } - } - } - else - { - // first check if it is a WLAN, add ONLY if it IS NOT - // then check if it is LANModem, - // then check for LAN, if supported - // check if it is a WLAN, add ONLY if it IS NOT - TUint32 lanid = lanserviceid->At( i ); - TBool iswlan( EFalse ); - TRAP( err, iswlan = utils->IsWlanL( lanid ) ); - if ( !err && !iswlan ) - { - // then check if it is LANModem, - CCommsDbTableView* lanbearer; - lanbearer = - iDb->OpenViewMatchingUintLC( - TPtrC(LAN_BEARER), - TPtrC(COMMDB_ID), - iapbearerid->At(i ) ); - User::LeaveIfError( - lanbearer->GotoFirstRecord() ); - // LANMODEM? check commdb_name - HBufC* lbuf; - lbuf = ApCommons::ReadText16ValueLC( lanbearer, - TPtrC(COMMDB_NAME) ); - // if it is KModemBearerLanModem, it is LANModem - if ( *lbuf == KModemBearerLANModem ) - { - item = CApListItem::NewLC( EIspTypeInternetAndWAP, - currwapapid, - *lanapname->At( i ), - EApBearerTypeLANModem ); - iApList->AppendL( item ); - CleanupStack::Pop( item ); // item owned by list ! - } - else - { - -#ifdef __TEST_LAN_BEARER - // Check for sure it is LAN - // we now it is not WLAN, say it is LAN - item = CApListItem::NewLC( EIspTypeInternetAndWAP, - currwapapid, - *lanapname->At( i ), - EApBearerTypeLAN, - *wspage, - prot ); - iApList->AppendL( item ); - CleanupStack::Pop( item ); // item owned by list ! -#endif // __TEST_LAN_BEARER - } - CleanupStack::PopAndDestroy( lbuf ); - CleanupStack::PopAndDestroy( lanbearer ); - } - } - CleanupStack::PopAndDestroy( wspage ); - CleanupStack::PopAndDestroy( wt ); - } - } - - iCount = iApList->Count(); - iExt->iMaxIndex = iCount-1; - - CleanupStack::PopAndDestroy( utils ); -// CleanupStack::PopAndDestroy( lanwapapid ); - // ResetAndDestroy the array: - CleanupStack::PopAndDestroy( lanapname->Count() ); // lanapname - CleanupStack::PopAndDestroy( lanapname ); // lanapname - CleanupStack::PopAndDestroy( iapbearerid ); - CleanupStack::PopAndDestroy( lanserviceid ); - CleanupStack::PopAndDestroy( laniapid ); - } - - CleanupStack::PopAndDestroy( lant ); - CLOG( ( ESelect, 1, _L( "<- CApSelect::AddLanL" ) ) ); - } - - -// --------------------------------------------------------- -// CApSelect::GetSupportedBearerSet -// --------------------------------------------------------- -// -TInt CApSelect::GetSupportedBearerSet( TInt aBearerFilter ) - { - TInt retval = aBearerFilter; - - TBool isCsdSupported = - FeatureManager::FeatureSupported( KFeatureIdAppCsdSupport ); -#ifdef __TEST_CSD_SUPPORT - isCsdSupported = ETrue; -#endif // __TEST_CSD_SUPPORT - - -#ifdef __TEST_USE_SHARED_DATA - TInt isHscsdSupported = ETrue; - /* - ApCommons::IsGivenSharedDataSupportL( KGeneralSettingsUid, - KGSHSCSDAccessPoints ); - */ -#else - TInt isHscsdSupported = ETrue; -#endif // __TEST_USE_SHARED_DATA - -#ifdef __TEST_HSCSD_SUPPORT - isHscsdSupported = ETrue; -#endif // __TEST_HSCSD_SUPPORT - - if ( !isCsdSupported ) - { // remove CSD, HSCSD, do not allow ALL - if ( aBearerFilter & EApBearerTypeAll ) - { - retval &= ~EApBearerTypeCSD; - retval &= ~EApBearerTypeHSCSD; - } - else - { - if ( aBearerFilter & EApBearerTypeCSD ) - { - retval &= ~EApBearerTypeCSD; - } - if ( aBearerFilter & EApBearerTypeHSCSD ) - { - retval &= ~EApBearerTypeHSCSD; - } - } - } - - if ( !isHscsdSupported ) - { // HSCSD - if ( ( aBearerFilter & EApBearerTypeAll ) - || ( aBearerFilter & EApBearerTypeHSCSD ) ) - { - retval &= ~EApBearerTypeHSCSD; - } - } - return retval; - } - - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apeng/src/APUtils.cpp --- a/apengine/apeng/src/APUtils.cpp Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1469 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of the class CApUtils -* Contains utility functions for access point handling -* -*/ - - -// INCLUDE FILES -#include "APEngineVariant.hrh" - -#include "ApUtils.h" -#include "ApAccessPointItem.h" -#include "ApDataHandler.h" -#include "ApEngineCommons.h" -#include "ApEngineLogger.h" -#include -#include -#include - -#include - -#include - - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - - -// ================= MEMBER FUNCTIONS ======================= - -// construct/destruct/copy -// --------------------------------------------------------- -// CApUtils::NewLC -// --------------------------------------------------------- -// -EXPORT_C CApUtils* CApUtils::NewLC( CCommsDatabase& aDb ) - { - CLOG( ( EUtil, 0, _L( "-> CApUtils::NewLC" ) ) ); - - CApUtils* db = new( ELeave ) CApUtils; - CleanupStack::PushL( db ); - db->ConstructL( aDb ); - - CLOG( ( EUtil, 1, _L( "<- CApUtils::NewLC" ) ) ); - return db; - } - - - -// Destructor -// --------------------------------------------------------- -// CApUtils::~CApUtils -// --------------------------------------------------------- -// -EXPORT_C CApUtils::~CApUtils() - { - if ( iExt ) - { - if ( iExt->iIsFeatureManagerInitialised ) - { - FeatureManager::UnInitializeLib(); - } - } - delete iExt; - CLOG( ( EUtil, 0, _L( "<-> CApUtils::~CApUtils" ) ) ); - } - - -// C++ default constructor can NOT contain any code that -// might leave. -// -// --------------------------------------------------------- -// CApUtils::CApUtils -// --------------------------------------------------------- -// -EXPORT_C CApUtils::CApUtils() - { - } - - -// Symbian OS default constructor can leave. -// --------------------------------------------------------- -// CApUtils::ConstructL -// --------------------------------------------------------- -// -EXPORT_C void CApUtils::ConstructL( CCommsDatabase& aDb ) - { - CLOG( ( EUtil, 0, _L( "-> CApUtils::ConstructL" ) ) ); - - iDb = &aDb; - iExt = new ( ELeave )TUtilsExtra; - - FeatureManager::InitializeLibL(); - iExt->iIsFeatureManagerInitialised = ETrue; - - iExt->iVariant = ApCommons::GetVariantL(); -#ifdef __TEST_CDMA_WRITE_PROTECT - iExt->iVariant |= KApUiEditOnlyVPNs; -#endif // __TEST_CDMA_WRITE_PROTECT - - iExt->iWlanSupported = - FeatureManager::FeatureSupported( KFeatureIdProtocolWlan ); - - -#ifdef __TEST_WLAN_SUPPORT - iExt->iWlanSupported = ETrue; -#endif // __TEST_WLAN_SUPPORT - - CLOG( ( EUtil, 1, _L( "<- CApUtils::ConstructL" ) ) ); - } - - - - - -// utilities - -// --------------------------------------------------------- -// CApUtils::IsAPInUseL -// --------------------------------------------------------- -// -EXPORT_C TBool CApUtils::IsAPInUseL( TUint32 aUid ) - { - CLOG( ( EUtil, 0, _L( "-> CApUtils::IsAPInUseL" ) ) ); - - - - TBool retval( EFalse ); -#ifdef __WINS__ - // just to satisfy compiler... - aUid++; -#else // - RSocketServ rs; - RConnection rc; - - TUint32 iap( 0 ); - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb, ETrue ); - TRAP_IGNORE( iap = IapIdFromWapIdL( aUid ) ); - - User::LeaveIfError( rs.Connect() ); - User::LeaveIfError( rc.Open( rs ) ); - - TUint count( 0 ); - User::LeaveIfError( rc.EnumerateConnections( count ) ); - // Go on only if there is any - if ( count ) - { - for( TUint i = 1; i <= count; i++) - { - TPckgBuf connInfo; - User::LeaveIfError( rc.GetConnectionInfo( i, connInfo ) ); - if ( iap == connInfo().iIapId ) - { - // IAP is in use, break - retval = ETrue; - break; - } - } - } - - rc.Close(); - rs.Close(); - - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } -#endif // __WINS__ - - CLOG( ( EUtil, 1, _L( "<- CApUtils::IsAPInUseL" ) ) ); - return ( retval ); - } - - - - -// --------------------------------------------------------- -// CApUtils::WapBearerTypeL -// --------------------------------------------------------- -// -EXPORT_C void CApUtils::WapBearerTypeL( TUint32 aUid, TDes& aBearer ) - { - CLOG( ( EUtil, 0, _L( "-> CApUtils::WapBearerTypeL" ) ) ); - - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - - DoWapBearerTypeL( aUid, aBearer ); - - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EUtil, 1, _L( "<- CApUtils::WapBearerTypeL" ) ) ); - } - - -// --------------------------------------------------------- -// CApUtils::BearerTypeL -// --------------------------------------------------------- -// -EXPORT_C TApBearerType CApUtils::BearerTypeL( TUint32 aUid ) - { - CLOG( ( EUtil, 0, _L( "-> CApUtils::BearerTypeL" ) ) ); - - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - TApBearerType retval = EApBearerTypeAllBearers; - retval = DoBearerTypeL( aUid ); - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EUtil, 1, _L( "<- CApUtils::BearerTypeL" ) ) ); - return retval; - } - - -// --------------------------------------------------------- -// CApUtils::ISPTypeL -// --------------------------------------------------------- -// -EXPORT_C void CApUtils::ISPTypeL( TUint32 aUid, TCommsDbIspType& aIspType ) - { - CLOG( ( EUtil, 0, _L( "-> CApUtils::ISPTypeL" ) ) ); - - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - DoISPTypeL( aUid, aIspType ); - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EUtil, 1, _L( "<- CApUtils::ISPTypeL" ) ) ); - } - - - -// --------------------------------------------------------- -// CApUtils::IsValidNameL -// --------------------------------------------------------- -// -EXPORT_C TBool CApUtils::IsValidNameL( const TDesC& aNameText ) - { - CLOG( ( EUtil, 0, _L( "<-> CApUtils::IsValidNameL" ) ) ); - - return IsValidNameL( aNameText, 0 ); - } - - -// --------------------------------------------------------- -// CApUtils::MakeValidName -// --------------------------------------------------------- -// -EXPORT_C TBool CApUtils::MakeValidNameL( TDes& aNameText ) - { - CLOG( ( EUtil, 0, _L( "-> CApUtils::MakeValidNameL" ) ) ); - - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - - HBufC* buf = HBufC::NewLC( KModifiableTextLength ); - TPtr ptr( buf->Des() ); - ptr.Copy( aNameText ); - TBool nameChanged( EFalse ); - HBufC* sgd = ApCommons::DoMakeValidNameL( *iDb, - nameChanged, - buf, - 0, - EFalse ); - - if ( nameChanged ) - { - aNameText.Copy( *sgd ); - } - CleanupStack::PopAndDestroy( buf ); // buf - delete sgd; - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EUtil, 1, _L( "<- CApUtils::MakeValidNameL" ) ) ); - return nameChanged; - } - - -// --------------------------------------------------------- -// CApUtils::NameL -// --------------------------------------------------------- -// -EXPORT_C void CApUtils::NameL( TUint32 aUid, TDes& aName ) - { - CLOG( ( EUtil, 0, _L( "-> CApUtils::NameL" ) ) ); - - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - DoNameL( aUid, aName ); - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EUtil, 1, _L( "<- CApUtils::NameL" ) ) ); - } - - - -// --------------------------------------------------------- -// CApUtils::SetNameL -// --------------------------------------------------------- -// -EXPORT_C void CApUtils::SetNameL( TDes& aName, TUint32 aUid ) - { - CLOG( ( EUtil, 0, _L( "-> CApUtils::SetNameL" ) ) ); - - if ( iExt->iVariant & KApUiEditOnlyVPNs ) - { - User::Leave( KErrNotSupported ); - } - - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - DoSetNameL( aName, aUid ); - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EUtil, 1, _L( "<- CApUtils::SetNameL" ) ) ); - } - - - -// --------------------------------------------------------- -// CApUtils::SetISPTypeL -// --------------------------------------------------------- -// -EXPORT_C void CApUtils::SetISPTypeL( TUint32 aUid, TCommsDbIspType aIspType ) - { - CLOG( ( EUtil, 0, _L( "-> CApUtils::SetISPTypeL" ) ) ); - - if ( iExt->iVariant & KApUiEditOnlyVPNs ) - { - User::Leave( KErrNotSupported ); - } - - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - DoSetISPTypeL( aUid, aIspType ); - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EUtil, 1, _L( "<- CApUtils::SetISPTypeL" ) ) ); - } - - - -// --------------------------------------------------------- -// CApUtils::IapIdFromWapIdL -// --------------------------------------------------------- -// -EXPORT_C TUint32 CApUtils::IapIdFromWapIdL( TUint32 aUid ) - { - CLOG( ( EUtil, 0, _L( "-> CApUtils::IapIdFromWapIdL" ) ) ); - - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - TUint32 retval( 0 ); - - CCommsDbTableView* wapt; - wapt = iDb->OpenViewMatchingUintLC( TPtrC(WAP_ACCESS_POINT), - TPtrC(COMMDB_ID), aUid ); - User::LeaveIfError( wapt->GotoFirstRecord() ); - - HBufC* wapBearer = ApCommons::ReadText16ValueLC - ( - wapt, - TPtrC(WAP_CURRENT_BEARER) - ); - - if ( *wapBearer == TPtrC(WAP_IP_BEARER) ) - { - CCommsDbTableView* bearert; - bearert = iDb->OpenViewMatchingUintLC( TPtrC(*wapBearer), - TPtrC(WAP_ACCESS_POINT_ID), aUid ); - User::LeaveIfError( bearert->GotoFirstRecord() ); - ApCommons::ReadUintL( bearert, TPtrC(WAP_IAP), retval ); - CleanupStack::PopAndDestroy( bearert ); // bearert - } - else - { - User::Leave( KErrInvalidBearerType ); - } - CleanupStack::PopAndDestroy( 2, wapt ); // wapBearer, wapt - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EUtil, 1, _L( "<- CApUtils::IapIdFromWapIdL" ) ) ); - return retval; - } - - -// --------------------------------------------------------- -// CApUtils::WapIdFromIapIdL -// --------------------------------------------------------- -// -EXPORT_C TUint32 CApUtils::WapIdFromIapIdL( TUint32 aUid ) - { - CLOG( ( EUtil, 0, _L( "-> CApUtils::WapIdFromIapIdL" ) ) ); - - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - TUint32 retval( 0 ); - - CCommsDbTableView* bearert; - bearert = iDb->OpenViewMatchingUintLC( TPtrC(WAP_IP_BEARER), - TPtrC(WAP_IAP), aUid ); - User::LeaveIfError( bearert->GotoFirstRecord() ); - ApCommons::ReadUintL( bearert, TPtrC(WAP_ACCESS_POINT_ID), retval ); - CleanupStack::PopAndDestroy( bearert ); // bearert - - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EUtil, 1, _L( "<- CApUtils::WapIdFromIapIdL" ) ) ); - return retval; - } - - -// --------------------------------------------------------- -// CApUtils::HasMandatoryFieldsFilledL -// --------------------------------------------------------- -// -EXPORT_C TBool CApUtils::HasMandatoryFieldsFilledL( TUint32 aUid ) - { - CLOG( ( EUtil, 0, _L( "-> CApUtils::HasMandatoryFieldsFilledL" ) ) ); - - TBool retval( EFalse ); - TBool isOwn = ApCommons::StartPushedTransactionLC( *iDb ); - retval= DoHasMandatoryFieldsFilledL( aUid ); - if ( isOwn ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EUtil, 1, _L( "<- CApUtils::HasMandatoryFieldsFilledL" ) ) ); - return retval; - } - - - -// --------------------------------------------------------- -// CApUtils::IAPExistsL -// --------------------------------------------------------- -// -EXPORT_C TBool CApUtils::IAPExistsL( TUint32 aUid ) - { - CLOG( ( EUtil, 0, _L( "<-> CApUtils::IAPExistsL" ) ) ); - - return DoesExistsL( TPtrC( IAP ), aUid ); - } - - -// --------------------------------------------------------- -// CApUtils::WapApExistsL -// --------------------------------------------------------- -// -EXPORT_C TBool CApUtils::WapApExistsL( TUint32 aUid ) - { - CLOG( ( EUtil, 0, _L( "<-> CApUtils::WapApExistsL" ) ) ); - - return DoesExistsL( TPtrC( WAP_ACCESS_POINT ), aUid ); - } - - - -// --------------------------------------------------------- -// CApUtils::DoHasMandatoryFieldsFilledL -// --------------------------------------------------------- -// -EXPORT_C TBool CApUtils::DoHasMandatoryFieldsFilledL( - TUint32 aUid, - CCommsDbTableView* aWapt, - TApBearerType aBearertype ) - { - CLOG( ( EUtil, 0, _L( "-> CApUtils::DoHasMandatoryFieldsFilledL" ) ) ); - - TBool retval( EFalse ); - TInt need2pop( 0 ); - // if not contains, retval = False... - // Mandatory WAP settings are: - // CSD: StartPage, GatewayAddr - // Note: SMS bearer had been dropped. - // SMS: ServerNumber, ServiceNumber - // Gprs: StartPage, GatewayAddr - // Cdma: StartPage, GatewayAddr - // Start with CSD/GPRS: - - if ( aBearertype == EApBearerTypeAllBearers ) - { - aBearertype = BearerTypeL( aUid ); - } - if ( aBearertype == EApBearerTypeAllBearers ) - { - User::Leave( KErrInvalidBearerType ); - } - - if ( !aWapt ) - { - aWapt = iDb->OpenViewMatchingUintLC( TPtrC(WAP_ACCESS_POINT ), - TPtrC( COMMDB_ID ), aUid ); - need2pop++; - TInt res = aWapt->GotoFirstRecord(); - if ( res != KErrNone ) - { - aWapt = NULL; - User::Leave( res ); - } - } - switch ( aBearertype ) - { - case EApBearerTypeCSD: - case EApBearerTypeHSCSD: - case EApBearerTypeGPRS: - case EApBearerTypeCDMA: - { - TInt aLength( 0 ); - aWapt->ReadColumnLengthL( TPtrC(WAP_START_PAGE), aLength ); - if ( aLength ) - { - CCommsDbTableView* bearert = iDb->OpenViewMatchingUintLC( - TPtrC(WAP_IP_BEARER), - TPtrC(WAP_ACCESS_POINT_ID), - aUid ); - User::LeaveIfError( bearert->GotoFirstRecord() ); - bearert->ReadColumnLengthL( TPtrC(WAP_GATEWAY_ADDRESS), - aLength ); - if ( aLength ) - { - HBufC* txtbuf = HBufC::NewLC( aLength ); - TPtr16 txt = txtbuf->Des(); - bearert->ReadTextL( TPtrC(WAP_GATEWAY_ADDRESS), txt ); - if ( txt.Compare( KDynIpAddress ) ) - { - retval = ETrue; - } - } - CleanupStack::PopAndDestroy( 2, bearert ); // txtbuf,bearert - } - break; - } - default: - { - User::Leave( KErrInvalidBearerType ); - break; - } - } - if ( need2pop ) - { - CleanupStack::PopAndDestroy( need2pop ); - } - - CLOG( ( EUtil, 1, _L( "<- CApUtils::DoHasMandatoryFieldsFilledL" ) ) ); - return retval; - } - - - -// --------------------------------------------------------- -// CApUtils::IsValidNameL -// --------------------------------------------------------- -// -EXPORT_C TBool CApUtils::IsValidNameL( const TDesC& aNameText, - TUint32 aAcceptUid ) - { - CLOG( ( EUtil, 0, _L( "-> CApUtils::IsValidNameL" ) ) ); - - // Valid name: it means the name of the Connection, - // that is the COMMDB_NAME in WAP_ACCESS_POINT table - // - TBool ret( ETrue ) ; - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb, ETrue ); - - HBufC* esc = ApCommons::EscapeTextLC( aNameText ); - CCommsDbTableView* wapt; - wapt = iDb->OpenViewMatchingTextLC( TPtrC(WAP_ACCESS_POINT), - TPtrC(COMMDB_NAME), - *esc ); - - TInt res; - res = wapt->GotoFirstRecord(); // OK - do - { - if ( res == KErrNone ) - { - // Check UID - TUint32 arecid; - ApCommons::ReadUintL( wapt, TPtrC(COMMDB_ID), arecid); - if ( arecid != aAcceptUid ) - { - // some other record is already using this name, - // need to change it - ret = EFalse; - } - } - else - { - if ( res == KErrNotFound ) - { - ret = ETrue; - } - else - { - User::Leave( res ); - } - } - if ( ret && ( res == KErrNone ) ) - { - res = wapt->GotoNextRecord(); - } - }while ( ( res == KErrNone ) && ( ret ) ); - - CleanupStack::PopAndDestroy( wapt ); // wapt - CleanupStack::PopAndDestroy( esc ); // esc - - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EUtil, 1, _L( "<- CApUtils::IsValidNameL" ) ) ); - return ret; - } - - -// --------------------------------------------------------- -// CApUtils::IsReadOnlyL -// --------------------------------------------------------- -// -EXPORT_C TBool CApUtils::IsReadOnlyL( TUint32 aUid ) - { - CLOG( ( EUtil, 0, _L( "-> CApUtils::IsReadOnlyL" ) ) ); - - TBool retval( EFalse ); - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb, ETrue ); - CCommsDbTableView* wapt; - wapt = iDb->OpenViewMatchingUintLC( TPtrC(WAP_ACCESS_POINT), - TPtrC(COMMDB_ID), aUid ); - User::LeaveIfError( wapt->GotoFirstRecord() ); - retval = ApCommons::DoGetReadOnlyL( *wapt ); - CleanupStack::PopAndDestroy( wapt ); // wapt - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EUtil, 1, _L( "<- CApUtils::IsReadOnlyL" ) ) ); - return retval; - } - - - - -// --------------------------------------------------------- -// CApUtils::IsWlanL -// --------------------------------------------------------- -// -TBool CApUtils::IsWlanL( TUint32 aLanCommdbId ) - { - CLOG( ( EUtil, 0, _L( "-> CApUtils::IsWlanL" ) ) ); - - TBool retval( EFalse ); - TRAPD( err, retval = DoIsWlanL( aLanCommdbId ) ); - - if ( err == KErrNotFound ) - { - retval = EFalse; - } - else - { - User::LeaveIfError( err ); - } - - CLOG( ( EUtil, 1, _L( "<- CApUtils::IsWlanL" ) ) ); - return retval; - } - - - -// --------------------------------------------------------- -// CApUtils::HasWlanSSIDL -// --------------------------------------------------------- -// -TBool CApUtils::HasWlanSSIDL( TUint32 aLanCommdbId ) - { - CLOG( ( EUtil, 0, _L( "-> CApUtils::HasWlanSSIDL" ) ) ); - - TBool retval( EFalse ); - CCommsDbTableView* wlantable = NULL; - - // WLAN settings table backlinks to LAN service, - // so we query WLAN settings for a record - // where WLAN_SERVICE_ID is LAN_SERVICE's COMMDB_ID, - // which is aApItem.iIapServiceId... - wlantable = iDb->OpenViewMatchingUintLC( TPtrC(WLAN_SERVICE), - TPtrC(WLAN_SERVICE_ID), - aLanCommdbId ); - TInt err = wlantable->GotoFirstRecord(); - if ( err == KErrNotFound ) - { - retval = EFalse; - } - else - { - User::LeaveIfError( err ); - HBufC* wlanssid = ApCommons::ReadText16ValueLC - ( wlantable, TPtrC(NU_WLAN_SSID) ); - if ( wlanssid->Compare( KEmpty ) != 0 ) - { - retval = ETrue; - } - CleanupStack::PopAndDestroy( wlanssid ); - } - CleanupStack::PopAndDestroy( wlantable ); - - CLOG( ( EUtil, 1, _L( "<- CApUtils::HasWlanSSIDL" ) ) ); - return retval; - } - - -// ==== OTHER PRIVATE/protected, NON-EXPORTED FUNCTIONS ==== - -// --------------------------------------------------------- -// CApUtils::DoWapBearerTypeL -// --------------------------------------------------------- -// -void CApUtils::DoWapBearerTypeL( TUint32 aUid, TDes& aBearer ) - { - CLOG( ( EUtil, 0, _L( "-> CApUtils::DoWapBearerTypeL" ) ) ); - - CCommsDbTableView* wapt; - wapt = iDb->OpenViewMatchingUintLC( TPtrC(WAP_ACCESS_POINT), - TPtrC(COMMDB_ID), aUid ); - User::LeaveIfError( wapt->GotoFirstRecord() ); - HBufC* wapBearer = ApCommons::ReadText16ValueLC - ( - wapt, - TPtrC(WAP_CURRENT_BEARER) - ); - if ( aBearer.MaxLength() < wapBearer->Length() ) - { - User::Leave( KErrDescOverflow ); - } - else - { - aBearer.SetLength( wapBearer->Length() ); - aBearer.Format( KFormat, &*wapBearer ); - } - CleanupStack::PopAndDestroy( 2, wapt ); // wapBearer, wapt - - CLOG( ( EUtil, 1, _L( "<- CApUtils::DoWapBearerTypeL" ) ) ); - } - - - -// --------------------------------------------------------- -// CApUtils::DoBearerTypeL -// --------------------------------------------------------- -// -TApBearerType CApUtils::DoBearerTypeL( TUint32 aUid ) - { - CLOG( ( EUtil, 0, _L( "-> CApUtils::DoBearerTypeL" ) ) ); - - TApBearerType retval = EApBearerTypeAllBearers; - - CCommsDbTableView* wapt; - wapt = iDb->OpenViewMatchingUintLC( TPtrC(WAP_ACCESS_POINT), - TPtrC(COMMDB_ID), - aUid ); - - // TRAPped for some record that doesn't have a WAP -table. - // If KErrNotFound, then just return EApBearerTypeWLAN - TInt wapErr = wapt->GotoFirstRecord(); - if ( wapErr == KErrNotFound ) - { - CleanupStack::PopAndDestroy( wapt ); - return EApBearerTypeWLAN; - } - else - { - User::LeaveIfError( wapErr ); - } - - HBufC* wapBearer = ApCommons::ReadText16ValueLC - ( - wapt, - TPtrC(WAP_CURRENT_BEARER) - ); - - CCommsDbTableView* bearert = iDb->OpenViewMatchingUintLC( *wapBearer, - TPtrC(WAP_ACCESS_POINT_ID), aUid ); - - User::LeaveIfError( bearert->GotoFirstRecord() ); - // decide which bearer, read bearer spec. data. - if ( *wapBearer == TPtrC(WAP_IP_BEARER) ) - { - TUint32 wapIap; - ApCommons::ReadUintL( bearert, TPtrC(WAP_IAP), wapIap ); - - CCommsDbTableView* iapt = iDb->OpenViewMatchingUintLC( TPtrC(IAP), - TPtrC(COMMDB_ID), wapIap ); - - User::LeaveIfError( iapt->GotoFirstRecord() ); - HBufC* aIapServiceType = ApCommons::ReadText16ValueLC - ( - iapt, - TPtrC(IAP_SERVICE_TYPE) - ); - if ( ( *aIapServiceType == TPtrC(DIAL_OUT_ISP) ) || - ( *aIapServiceType == TPtrC(DIAL_IN_ISP) ) ) - { - // need to get 'speed' data ( HS or normal CSD ) - TUint32 wapIsp; - ApCommons::ReadUintL( iapt, TPtrC(IAP_SERVICE), wapIsp ); - CCommsDbTableView* ispt = iDb->OpenViewMatchingUintLC( - *aIapServiceType, - TPtrC(COMMDB_ID), - wapIsp ); - User::LeaveIfError( ispt->GotoFirstRecord() ); - TUint32 bear; - if ( ApCommons::ReadUintL( ispt, TPtrC(ISP_BEARER_TYPE), bear ) - == KErrUnknown ) - { - bear = EBearerTypeCSD; - } - if ( bear == EBearerTypeCSD ) - { - retval = EApBearerTypeCSD; - } - else - { - if ( bear == EBearerTypeHSCSD ) - { - retval = EApBearerTypeHSCSD; - } - else - { - User::Leave( KErrInvalidBearer ); - } - } - CleanupStack::PopAndDestroy( ispt ); // ispt - } - else - { - if ( ( *aIapServiceType == TPtrC(OUTGOING_WCDMA) ) || - ( *aIapServiceType == TPtrC(INCOMING_WCDMA) ) ) - { - retval = EApBearerTypeGPRS; - } - else - { // some other bearer, currently it might be VPN or WLAN - if ( *aIapServiceType == TPtrC(VPN_SERVICE) ) - { // Get real VPN bearertype... - TUint32 service; - ApCommons::ReadUintL( iapt, TPtrC(IAP_SERVICE), service ); - - CCommsDbTableView* ispt; - ispt = iDb->OpenViewMatchingUintLC( TPtrC(VPN_SERVICE), - TPtrC(COMMDB_ID), - service ); - User::LeaveIfError( ispt->GotoFirstRecord() ); - TUint32 tempint; - HBufC* buf = NULL; - // get the real iap - ApCommons::ReadUintL( ispt, - TPtrC(VPN_SERVICE_IAP), - tempint ); - - // now open the real IAP an get it's bearer... - CCommsDbTableView* iapt2 = NULL; - iapt2 = iDb->OpenViewMatchingUintLC( TPtrC(IAP), - TPtrC(COMMDB_ID), - tempint ); - User::LeaveIfError( iapt2->GotoFirstRecord() ); - - buf = ApCommons::ReadText16ValueLC( iapt2, - TPtrC(IAP_SERVICE_TYPE) ); - TUint32 service2; - ApCommons::ReadUintL( iapt2, TPtrC(IAP_SERVICE), - service2 ); - - if ( ( buf->Compare( TPtrC(OUTGOING_WCDMA ) ) == 0 ) || - ( buf->Compare( TPtrC(INCOMING_WCDMA ) ) == 0 ) ) - { - retval = EApBearerTypeGPRS; - } - else - { - if ( ( buf->Compare( TPtrC(DIAL_OUT_ISP ) ) == 0 ) || - ( buf->Compare( TPtrC(DIAL_IN_ISP ) ) == 0 ) ) - { - // need to get ISP, - CCommsDbTableView* doutt = NULL; - doutt = iDb->OpenViewMatchingUintLC( - *buf, - TPtrC(COMMDB_ID), - service2 ); - - User::LeaveIfError( doutt ->GotoFirstRecord() ); - ApCommons::ReadUintL( doutt , - TPtrC(ISP_BEARER_TYPE), - tempint ); - if ( tempint == EBearerTypeCSD ) - { - retval = EApBearerTypeCSD; - } - else - { - retval = EApBearerTypeHSCSD; - } - CleanupStack::PopAndDestroy( doutt ); // doutt - } - else - { - // VPN, having a bearer something - // else than CSD, HSCSD & GPRS? - // check for WLAN - if ( iExt->iWlanSupported ) - { - if ( buf->Compare( TPtrC(LAN_SERVICE) ) == 0 ) - { // LAN or WLAN - if ( IsWlanL( service2 ) ) - { - retval = EApBearerTypeWLAN; - } - else - { - User::Leave( KErrInvalidBearer ); - } - } - else - { - User::Leave( KErrInvalidBearer ); - } - } - else - { - User::Leave( KErrInvalidBearer ); - } - } - } - CleanupStack::PopAndDestroy( 3, ispt ); // buf, iapt2, ispt - } - else - { // other, but not VPN, check for WLAN - if ( iExt->iWlanSupported ) - { - if ( *aIapServiceType == TPtrC(LAN_SERVICE) ) - { // check existence... - TUint32 service; - TUint32 bearer; - ApCommons::ReadUintL( iapt, TPtrC(IAP_SERVICE), - service ); - ApCommons::ReadUintL( iapt, TPtrC(IAP_BEARER), - bearer ); - - - CCommsDbTableView* ispt; - ispt = iDb->OpenViewMatchingUintLC( - TPtrC(LAN_SERVICE), - TPtrC(COMMDB_ID), - service ); - User::LeaveIfError( ispt->GotoFirstRecord() ); - // now we know it is either WLAN or some kinda LAN - if ( IsWlanL( service ) ) - { - retval = EApBearerTypeWLAN; - } - else - { // other, - // check for LANModem first, then for LAN - CCommsDbTableView* lanbearer; - lanbearer = - iDb->OpenViewMatchingUintLC( - TPtrC(LAN_BEARER), - TPtrC(COMMDB_ID), - bearer ); - User::LeaveIfError( - lanbearer->GotoFirstRecord() ); - // LANMODEM? check commdb_name - HBufC* lbuf; - lbuf = ApCommons::ReadText16ValueLC( lanbearer, - TPtrC(COMMDB_NAME) ); - // if it is KModemBearerLANModem, - // it is LANModem - if ( *lbuf == KModemBearerLANModem ) - { - retval = EApBearerTypeLANModem; - } - else - { - #ifdef __TEST_LAN_BEARER - // LAN? - if ( *lbuf == KModemBearerLAN ) - { - retval = EApBearerTypeLAN; - } - else - { - // other, but not VPN, or not supported - User::Leave( KErrInvalidBearer ); - } - #else - // other, but not VPN, or not supported - User::Leave( KErrInvalidBearer ); - #endif // __TEST_LAN_BEARER - } - CleanupStack::PopAndDestroy( lbuf ); - CleanupStack::PopAndDestroy( lanbearer ); - } - CleanupStack::PopAndDestroy( ispt ); - } - } - else - { - #ifdef __TEST_LAN_BEARER - if ( *aIapServiceType == TPtrC(LAN_SERVICE) ) - { // check existence... - TUint32 service; - TUint32 bearer; - ApCommons::ReadUintL( iapt, TPtrC(IAP_SERVICE), - service ); - ApCommons::ReadUintL( iapt, TPtrC(IAP_BEARER), - bearer ); - - CCommsDbTableView* ispt; - ispt = iDb->OpenViewMatchingUintLC( - TPtrC(LAN_SERVICE), - TPtrC(COMMDB_ID), - service ); - User::LeaveIfError( ispt->GotoFirstRecord() ); - // now we know it is some kinda LAN - // check for LANModem first, then for LAN - CCommsDbTableView* lanbearer; - lanbearer = - iDb->OpenViewMatchingUintLC( - TPtrC(LAN_BEARER), - TPtrC(COMMDB_ID), - bearer ); - User::LeaveIfError( - lanbearer->GotoFirstRecord() ); - // LANMODEM? check commdb_name - HBufC* lbuf; - lbuf = ApCommons::ReadText16ValueLC( lanbearer, - TPtrC(COMMDB_NAME) ); - // if it is KModemBearerLANModem, it is LANModem - if ( *lbuf == KModemBearerLANModem ) - { - retval = EApBearerTypeLANModem; - } - else - { - // LAN? - if ( *lbuf == KModemBearerLANModem ) - { - retval = EApBearerTypeLAN; - } - else - { - // other, but not VPN, or not supported - User::Leave( KErrInvalidBearer ); - } - } - CleanupStack::PopAndDestroy( lbuf ); - CleanupStack::PopAndDestroy( lanbearer ); - CleanupStack::PopAndDestroy( ispt ); - } - else - {// other, but not LAN - User::Leave( KErrInvalidBearer ); - } - #endif // __TEST_LAN_BEARER - } - } - } - } - CleanupStack::PopAndDestroy( 2, iapt );// aIapServiceType, iapt - } - else - { - User::Leave( KErrInvalidBearer ); - } - - CleanupStack::PopAndDestroy( bearert ); // bearert - CleanupStack::Pop( wapBearer ); // wapBearer, - // cannot PopAndDestroy because it has been re-allocated ! - delete wapBearer; - CleanupStack::PopAndDestroy( wapt ); // wapt - - if ( retval == EApBearerTypeAllBearers ) - { - User::Leave( KErrInvalidBearer ); - } - - CLOG( ( EUtil, 1, _L( "<- CApUtils::DoBearerTypeL" ) ) ); - return retval; - } - - - -// --------------------------------------------------------- -// CApUtils::DoISPTypeL -// --------------------------------------------------------- -// -void CApUtils::DoISPTypeL( TUint32 aUid, TCommsDbIspType& aIspType ) - { - CLOG( ( EUtil, 0, _L( "-> CApUtils::DoISPTypeL" ) ) ); - - TCommsDbIspType retval = EIspTypeInternetAndWAP; - - CCommsDbTableView* wapt; - wapt = iDb->OpenViewMatchingUintLC( TPtrC(WAP_ACCESS_POINT), - TPtrC(COMMDB_ID), - aUid ); - - User::LeaveIfError( wapt->GotoFirstRecord() ); - HBufC* wapBearer = ApCommons::ReadText16ValueLC - ( - wapt, - TPtrC(WAP_CURRENT_BEARER) - ); - - if ( *wapBearer == TPtrC(WAP_IP_BEARER) ) - { - CCommsDbTableView* bearert; - bearert = iDb->OpenViewMatchingUintLC( TPtrC(*wapBearer), - TPtrC(WAP_ACCESS_POINT_ID), - aUid ); - - User::LeaveIfError( bearert->GotoFirstRecord() ); - TUint32 aWapIap; - ApCommons::ReadUintL( bearert, TPtrC(WAP_IAP), aWapIap ); - // now we have IAP uid, can go for Service type, ID - - CCommsDbTableView* iapt; - iapt = iDb->OpenViewMatchingUintLC( TPtrC(IAP), - TPtrC(COMMDB_ID), - aWapIap ); - - User::LeaveIfError( iapt->GotoFirstRecord() ); - HBufC* aIapServiceType = ApCommons::ReadText16ValueLC - ( - iapt, - TPtrC(IAP_SERVICE_TYPE) - ); - // decide which bearer, read bearer spec. data. - TUint32 aIsp; - ApCommons::ReadUintL( iapt, TPtrC(IAP_SERVICE), aIsp ); - - // No need to be defensive, if *aIapServiceType is invalid, - // it shall Leave, - // otherwise, we will handle the difference... - CCommsDbTableView* ispt = iDb->OpenViewMatchingUintLC( - *aIapServiceType, - TPtrC(COMMDB_ID), aIsp ); - User::LeaveIfError( ispt->GotoFirstRecord() ); - TUint32 sgd; - if ( ( *aIapServiceType == TPtrC(DIAL_OUT_ISP) ) || - ( *aIapServiceType == TPtrC(DIAL_IN_ISP) ) ) - { // get real IspType - ApCommons::ReadUintL( ispt, TPtrC(ISP_TYPE), sgd ); - } - else - { - // OUTGOING_WCDMA/INCOMING_WCDMA - // read ISP type - ApCommons::ReadUintL( ispt, TPtrC(GPRS_AP_TYPE), sgd ); - } - retval = TCommsDbIspType( sgd ); - CleanupStack::PopAndDestroy( ispt ); // ispt - CleanupStack::Pop( aIapServiceType );// aIapServiceType, - // cannot PopAndDestroy because it has been re-allocated ! - delete aIapServiceType; - CleanupStack::PopAndDestroy( 2, bearert ); // iapt, bearert - } - else - { - User::Leave( KErrInvalidBearer ); - } - - CleanupStack::Pop( wapBearer ); // wapBearer, - // cannot PopAndDestroy because it has been re-allocated ! - delete wapBearer; - CleanupStack::PopAndDestroy( wapt ); // wapt - aIspType = retval; - - CLOG( ( EUtil, 1, _L( "<- CApUtils::DoISPTypeL" ) ) ); - } - - -// --------------------------------------------------------- -// CApUtils::DoNameL -// --------------------------------------------------------- -// -void CApUtils::DoNameL( TUint32 aUid, TDes& aName ) - { - CLOG( ( EUtil, 0, _L( "-> CApUtils::DoNameL" ) ) ); - - CCommsDbTableView* wapt = iDb->OpenViewMatchingUintLC( - TPtrC(WAP_ACCESS_POINT), - TPtrC(COMMDB_ID), aUid ); - User::LeaveIfError( wapt->GotoFirstRecord() ); - HBufC* sgd = ApCommons::ReadText16ValueLC( wapt, TPtrC(COMMDB_NAME) ); - - if ( aName.MaxLength() < sgd->Length() ) - { - User::Leave( KErrDescOverflow ); - } - else - { - aName.SetLength( sgd->Length() ); - aName.Format( KFormat, &*sgd ); - } - CleanupStack::PopAndDestroy( 2, wapt ); // sgd, wapt - - CLOG( ( EUtil, 1, _L( "<- CApUtils::DoNameL" ) ) ); - } - - -// --------------------------------------------------------- -// CApUtils::DoSetNameL -// --------------------------------------------------------- -// -void CApUtils::DoSetNameL( TDes& aName, TUint32 aUid ) - { - CLOG( ( EUtil, 0, _L( "-> CApUtils::DoSetNameL" ) ) ); - - if ( iExt->iVariant & KApUiEditOnlyVPNs ) - { - User::Leave( KErrNotSupported ); - } - - CCommsDbTableView* wapt; - - wapt = iDb->OpenViewMatchingUintLC( TPtrC(WAP_ACCESS_POINT), - TPtrC(COMMDB_ID), aUid ); - User::LeaveIfError( wapt->GotoFirstRecord() ); - HBufC* aCurrent = ApCommons::ReadText16ValueLC( wapt, - TPtrC(COMMDB_NAME) ); - if ( *aCurrent != aName ) - { - TBool aNameChanged( EFalse ); - HBufC* namebuf = aName.AllocL(); - CleanupStack::PushL( namebuf ); - HBufC* sgd = ApCommons::DoMakeValidNameL - ( - *iDb, - aNameChanged, - namebuf, - aUid, - EFalse - ); - if ( aNameChanged ) - { - aName.Copy( *sgd ); - delete sgd; - } - CleanupStack::PopAndDestroy( namebuf ); // namebuf - User::LeaveIfError( wapt->UpdateRecord() ); - wapt->WriteTextL( TPtrC(COMMDB_NAME), aName ); - User::LeaveIfError( wapt->PutRecordChanges() ); - } - CleanupStack::PopAndDestroy( 2, wapt ); // aCurrent,wapt - - CLOG( ( EUtil, 1, _L( "<- CApUtils::DoSetNameL" ) ) ); - } - - -// --------------------------------------------------------- -// CApUtils::DoSetISPTypeL -// --------------------------------------------------------- -// -void CApUtils::DoSetISPTypeL( TUint32 aUid, TCommsDbIspType aIspType ) - { - CLOG( ( EUtil, 0, _L( "-> CApUtils::DoSetISPTypeL" ) ) ); - - if ( iExt->iVariant & KApUiEditOnlyVPNs ) - { - User::Leave( KErrNotSupported ); - } - - // first check requested ISP-type validity - if ( ( aIspType == EIspTypeInternetOnly ) || - ( aIspType == EIspTypeWAPOnly ) || - ( aIspType == EIspTypeInternetAndWAP ) ) - { - CCommsDbTableView* wapt; - wapt = iDb->OpenViewMatchingUintLC( TPtrC(WAP_ACCESS_POINT), - TPtrC(COMMDB_ID), aUid ); - User::LeaveIfError( wapt->GotoFirstRecord() ); - HBufC* wapBearer = ApCommons::ReadText16ValueLC - ( - wapt, - TPtrC(WAP_CURRENT_BEARER) - ); - if ( *wapBearer == TPtrC(WAP_IP_BEARER) ) - { - CCommsDbTableView* bearert; - bearert = iDb->OpenViewMatchingUintLC( - *wapBearer, - TPtrC(WAP_ACCESS_POINT_ID), aUid ); - - User::LeaveIfError( bearert->GotoFirstRecord() ); - TUint32 aWapIap; - ApCommons::ReadUintL( bearert, TPtrC(WAP_IAP), aWapIap ); - // now we have IAP uid, can go for Service type, ID - - CCommsDbTableView* iapt; - iapt = iDb->OpenViewMatchingUintLC( TPtrC(IAP), - TPtrC(COMMDB_ID), - aWapIap ); - User::LeaveIfError( iapt->GotoFirstRecord() ); - - HBufC* aIapServiceType = ApCommons::ReadText16ValueLC - ( - iapt, - TPtrC(IAP_SERVICE_TYPE) - ); - - // get ISP ID - TUint32 aIsp; - ApCommons::ReadUintL( iapt, TPtrC(IAP_SERVICE), aIsp ); - - CCommsDbTableView* ispt; - ispt = iDb->OpenViewMatchingUintLC( *aIapServiceType, - TPtrC(COMMDB_ID), aIsp ); - User::LeaveIfError( ispt->GotoFirstRecord() ); - // now we have it, just write: - User::LeaveIfError( ispt->UpdateRecord() ); - // decide which bearer, write into bearer spec. column. - if ( ( *aIapServiceType == TPtrC(DIAL_OUT_ISP) ) || - ( *aIapServiceType == TPtrC(DIAL_IN_ISP) ) ) - { // write real IspType - ispt->WriteUintL( TPtrC(ISP_TYPE), aIspType ); - } - else - { - // OUTGOING_WCDMA / INCOMING_WCDMA - ispt->WriteUintL( TPtrC(GPRS_AP_TYPE), aIspType ); - } - User::LeaveIfError( ispt->PutRecordChanges( EFalse, EFalse ) ); - // ispt, aIapServiceType, iapt, bearert - CleanupStack::PopAndDestroy( 4, bearert ); - } - else - { - User::Leave( KErrInvalidBearer ); - } - CleanupStack::PopAndDestroy( 2, wapt ); // wapBearer, wapt - } - else - { - User::Leave( KErrInvalidIspRequest ); - } - - CLOG( ( EUtil, 1, _L( "<- CApUtils::DoSetISPTypeL" ) ) ); - } - - -// --------------------------------------------------------- -// CApUtils::DoesExistsL -// --------------------------------------------------------- -// -TBool CApUtils::DoesExistsL( TPtrC aTable, TUint32 aUid ) - { - CLOG( ( EUtil, 0, _L( "-> CApUtils::DoesExistsL" ) ) ); - - TBool retval( EFalse ); - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb, ETrue ); - CCommsDbTableView* table; - table = iDb->OpenViewMatchingUintLC( aTable, - TPtrC(COMMDB_ID), aUid ); - TInt res = table->GotoFirstRecord(); - CleanupStack::PopAndDestroy( table ); // table - if ( res == KErrNone ) - { - retval = ETrue; - } - if ( res != KErrNotFound ) - { - User::LeaveIfError( res ); - } - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EUtil, 1, _L( "<- CApUtils::DoesExistsL" ) ) ); - return retval; - } - - - -// --------------------------------------------------------- -// CApUtils::DoIsWlanL -// --------------------------------------------------------- -// -TBool CApUtils::DoIsWlanL( TUint32 aLanCommdbId ) - { - CLOG( ( EUtil, 1, _L( "-> CApUtils::DoIsWlanL" ) ) ); - - TBool retval( EFalse ); - - CCommsDbTableView* wlantable = NULL; - - // WLAN settings table backlinks to LAN service, - // so we query WLAN settings for a record - // where WLAN_SERVICE_ID is LAN_SERVICE's COMMDB_ID, - // which is aApItem.iIapServiceId... - wlantable = iDb->OpenViewMatchingUintLC( TPtrC(WLAN_SERVICE), - TPtrC(WLAN_SERVICE_ID), - aLanCommdbId ); - - TInt err = wlantable->GotoFirstRecord(); - if ( err == KErrNotFound ) - { - retval = EFalse; - } - else - { - User::LeaveIfError( err ); - retval = ETrue; - } - - CleanupStack::PopAndDestroy( wlantable ); - - CLOG( ( EUtil, 1, _L( "<- CApUtils::DoIsWlanL" ) ) ); - return retval; - } - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apeng/src/ActiveApDb.cpp --- a/apengine/apeng/src/ActiveApDb.cpp Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,229 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implementation of CActiveApDb. -* -*/ - - -// INCLUDE FILES - -#include -#include "ActiveApDbNotifier.h" -#include -#include "ApEngineCommons.h" -#include "ApEngineLogger.h" - -const TInt KObserverArrayGranularity = 1; - -// ================= MEMBER FUNCTIONS ======================= - -// --------------------------------------------------------- -// CActiveApDb::NewL -// --------------------------------------------------------- -// -EXPORT_C CActiveApDb* CActiveApDb::NewL( TCommDbDatabaseType /*aType*/ ) - { - CLOG( ( EActiveDb, 0, _L( "-> CActiveApDb::NewL" ) ) ); - - CActiveApDb* db = new ( ELeave ) CActiveApDb; - CleanupStack::PushL( db ); - db->ConstructL(); - CleanupStack::Pop( db ); // db - - CLOG( ( EActiveDb, 1, _L( "<- CActiveApDb::NewL" ) ) ); - return db; - } - -// --------------------------------------------------------- -// CActiveApDb::~CActiveApDb -// --------------------------------------------------------- -// -EXPORT_C CActiveApDb::~CActiveApDb() - { - CLOG( ( EActiveDb, 0, _L( "-> CActiveApDb::~CActiveApDb" ) ) ); - - delete iDbNotifier; - delete iObservers; - delete iDb; - - CLOG( ( EActiveDb, 1, _L( "<- CActiveApDb::~CActiveApDb" ) ) ); - } - - -// --------------------------------------------------------- -// CActiveApDb::CActiveApDb -// --------------------------------------------------------- -// -CActiveApDb::CActiveApDb() - { - } - - -// --------------------------------------------------------- -// CActiveApDb::ConstructL -// --------------------------------------------------------- -// -void CActiveApDb::ConstructL() - { - iDb = CCommsDatabase::NewL( ); - iObservers = new ( ELeave ) CArrayPtrFlat - ( KObserverArrayGranularity ); - iDbNotifier = new ( ELeave ) CActiveApDbNotifier( *this ); - - iState = EReady; - } - - -// --------------------------------------------------------- -// CActiveApDb::AddObserverL -// --------------------------------------------------------- -// -EXPORT_C void CActiveApDb::AddObserverL( MActiveApDbObserver* anObserver ) - { - CLOG( ( EActiveDb, 0, _L( "-> CActiveApDb::AddObserverL" ) ) ); - - if ( !anObserver ) - { - User::Leave( KErrNullPointerPassed ); - } - iObservers->AppendL( anObserver ); - iDbNotifier->Start(); - - CLOG( ( EActiveDb, 1, _L( "<- CActiveApDb::AddObserverL" ) ) ); - } - - -// --------------------------------------------------------- -// CActiveApDb::RemoveObserver -// --------------------------------------------------------- -// -EXPORT_C void CActiveApDb::RemoveObserver( MActiveApDbObserver* anObserver ) - { - CLOG( ( EActiveDb, 0, _L( "-> CActiveApDb::RemoveObserver" ) ) ); - - __ASSERT_DEBUG( anObserver, ApCommons::Panic( ENullPointer ) ); - TInt count = iObservers->Count(); - for ( TInt i = 0; i < count; i++ ) - { - if ( iObservers->At( i ) == anObserver ) - { - iObservers->Delete( i ); - // leave cycle for faster processing, can not return because - // we may have to stop() if it was the last one... - break; - } - } - if ( !iObservers->Count() ) - { // no more observers waiting so stop notification... - iDbNotifier->Stop(); - } - // for some reason, observer was not found-> - // Someone has already removed it - // simply ignore it - CLOG( ( EActiveDb, 1, _L( "<- CActiveApDb::RemoveObserver" ) ) ); - - } - - -// --------------------------------------------------------- -// CActiveApDb::Database -// --------------------------------------------------------- -// -EXPORT_C CCommsDatabase* CActiveApDb::Database() - { - CLOG( ( EActiveDb, 0, _L( "<-> CActiveApDb::Database" ) ) ); - - return iDb; - } - -// --------------------------------------------------------- -// CActiveApDb::HandleDbEventL -// --------------------------------------------------------- -// -void CActiveApDb::HandleDbEventL( TInt anEvent ) - { - CLOG( ( EActiveDb, 0, _L( "-> CActiveApDb::HandleDbEventL" ) ) ); - - // possible events: EClose,EUnlock,ECommit,ERollback,ERecover - switch ( anEvent ) - { - case RDbNotifier::EUnlock: - { - CLOG( ( EActiveDb, 2, _L( "Notifier Unlock" ) ) ); - NotifyObserversL( MActiveApDbObserver::EDbAvailable ); - break; - } - case RDbNotifier::ECommit: - { - CLOG( ( EActiveDb, 2, _L( "Notifier Commit" ) ) ); - NotifyObserversL( MActiveApDbObserver::EDbChanged ); - break; - } - case RDbNotifier::EClose: - { - CLOG( ( EActiveDb, 2, _L( "Notifier Close/Rollbac/Recover" ) ) ); - NotifyObserversL( MActiveApDbObserver::EDbClosing ); - // Use base class' method to keep the notifier alive. - // We need to know when all clients has released the db. - break; - } - case RDbNotifier::ERollback: - { - CLOG( ( EActiveDb, 2, _L( "Notifier Close/Rollbac/Recover" ) ) ); - NotifyObserversL( MActiveApDbObserver::EDbAvailable ); - break; - } - case RDbNotifier::ERecover: - { - CLOG( ( EActiveDb, 2, _L( "Notifier Close/Rollbac/Recover" ) ) ); - NotifyObserversL( MActiveApDbObserver::EDbClosing ); - // Use base class' method to keep the notifier alive. - // We need to know when all clients has released the db. - break; - } - default: - { - // Don't know what's happened, but instead of - // Panicking, it's better to 'simulate' a change. - // 'Defensive' programming. - CLOG( ( EActiveDb, 2, _L( "Notifier UNKNOWN" ) ) ); - NotifyObserversL( MActiveApDbObserver::EDbChanged ); - break; - } - } - CLOG( ( EActiveDb, 1, _L( "<- CActiveApDb::HandleDbEventL" ) ) ); - - } - - - - -// --------------------------------------------------------- -// CActiveApDb::NotifyObserversL -// --------------------------------------------------------- -// -void CActiveApDb::NotifyObserversL( MActiveApDbObserver::TEvent anEvent ) - { - - TInt i; - TInt count = iObservers->Count(); - // one hazard is that if one client leaves, - // the rest of the clients will not be notified this time... - for ( i = 0; i < count; i++ ) - { - TRAP_IGNORE( iObservers->At( i )->HandleApDbEventL( anEvent ) ); - } - } - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apeng/src/ActiveApDbNotifier.cpp --- a/apengine/apeng/src/ActiveApDbNotifier.cpp Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,121 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implementation of CActiveApDbNotifier. -* -*/ - - -// INCLUDE FILES - -#include "ActiveApDb.h" -#include "ActiveApDbNotifier.h" - -// ================= MEMBER FUNCTIONS ======================= - -// --------------------------------------------------------- -// CActiveApDbNotifier::CActiveApDbNotifier -// --------------------------------------------------------- -// -CActiveApDbNotifier::CActiveApDbNotifier( CActiveApDb& aDb ) -: CActive( EPriorityStandard ) - { - iActiveDb = &aDb; - CActiveScheduler::Add( this ); - } - -// --------------------------------------------------------- -// CActiveApDbNotifier::~CActiveApDbNotifier -// --------------------------------------------------------- -// -CActiveApDbNotifier::~CActiveApDbNotifier() - { - Cancel(); - } - -// --------------------------------------------------------- -// CActiveApDbNotifier::RunL -// --------------------------------------------------------- -// -void CActiveApDbNotifier::RunL() - { - if ( iStatus == KErrCancel ) - { - // Do nothing. - } - else - { - // first store status, because re-schedule will be earlier - // than notifying clients. Reason: - // clients can leave but re-schedule MUST happen anyway, - // to keep the notifier alive even if any client leaves - TRequestStatus tempstatus( iStatus ); - - if ( iStatus == RDbNotifier::EClose ) - { - // Finish if the database is closed. - NotifyChange(); - } - else - { - // Reschedule automatically (as long as the database is open). - NotifyChange(); - } - // and now let clients handle their stuff... - TRAP_IGNORE( iActiveDb->HandleDbEventL( tempstatus.Int() ) ); - } - } - - -// --------------------------------------------------------- -// CActiveApDbNotifier::DoCancel -// --------------------------------------------------------- -// -void CActiveApDbNotifier::DoCancel() - { - Stop(); - } - - -// --------------------------------------------------------- -// CActiveApDbNotifier::Stop -// --------------------------------------------------------- -// -void CActiveApDbNotifier::Stop() - { - iActiveDb->Database()->CancelRequestNotification(); - } - -// --------------------------------------------------------- -// CActiveApDbNotifier::Start -// --------------------------------------------------------- -// -void CActiveApDbNotifier::Start() - { - NotifyChange(); - } - -// --------------------------------------------------------- -// CActiveApDbNotifier::NotifyChange -// --------------------------------------------------------- -// -void CActiveApDbNotifier::NotifyChange() - { - if ( !IsActive() ) - { - iActiveDb->Database()->RequestNotification( iStatus ); - SetActive(); - } - } - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apeng/src/ApEngineCommons.cpp --- a/apengine/apeng/src/ApEngineCommons.cpp Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,571 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of some common global functions. -* -*/ - - -// INCLUDE FILES -#include -#include -#include -#include -#include // link against centralrepository.lib - -#include "ApEngineCommons.h" -#include "ApProtHandler.h" -#include "ApEngineLogger.h" -#include "ApEnginePrivateCRKeys.h" - -// CONSTANTS - - -// LOCAL CONSTANTS AND MACROS -_LIT(KFormatPostfix, "%S(%02d)"); -_LIT(KFormatNoPostfix, "%S"); -_LIT(KFormatLargePostfix, "%S(%d)"); - -void ApCommons::Panic( TApEnginePanicCodes aPanic ) - { - _LIT( kApSet, "APEngine" ) ; - User::Panic( kApSet, aPanic ) ; - } - - -// --------------------------------------------------------- -// ApCommons::StartPushedTransactionL -// --------------------------------------------------------- -// -TBool ApCommons::StartPushedTransactionLC( CCommsDatabase& aDb, TBool aRetry ) - { - CLOG( ( ETransaction, 0, - _L( "-> ApCommons::StartPushedTransactionLC" ) ) ); - - TBool retval( EFalse ); - if ( !aDb.InTransaction() ) - { - TInt retriesLeft( aRetry ? KRetryCount : 1 ); - TInt err = aDb.BeginTransaction(); - while ( ( ( err == KErrLocked ) || ( err == KErrAccessDenied ) ) - && --retriesLeft ) - { - User::After( KRetryWait ); - err = aDb.BeginTransaction(); - } - User::LeaveIfError( err ); - CleanupStack::PushL - ( - TCleanupItem( ApCommons::RollbackTransactionOnLeave, &aDb ) - ); - retval = ETrue; - } - else - { - retval = EFalse; - } - CLOG( ( ETransaction, 1, - _L( "<- ApCommons::StartPushedTransactionLC" ) ) ); - return retval; - } - - - -// --------------------------------------------------------- -// ApCommons::RollbackTransactionOnLeave -// --------------------------------------------------------- -// -void ApCommons::RollbackTransactionOnLeave( TAny* aDb ) - { - CLOG( ( ETransaction, 0, - _L( "-> ApCommons::RollbackTransactionOnLeave" ) ) ); - - CCommsDatabase* db = STATIC_CAST( CCommsDatabase*, aDb ); - db->RollbackTransaction(); - - CLOG( ( ETransaction, 1, - _L( "<- ApCommons::RollbackTransactionOnLeave" ) ) ); - } - - - - -// --------------------------------------------------------- -// ApCommons::DoMakeValidNameL -// --------------------------------------------------------- -// -HBufC* ApCommons::DoMakeValidNameL - ( - CCommsDatabase& aDb, - TBool& aChanged, - HBufC* aName, - TUint32 aUid, - TBool aIsNew - ) - { - CLOG( ( ECommons, 0, _L( "-> ApCommons::DoMakeValidNameL" ) ) ); - - aChanged = EFalse; - HBufC* temp = HBufC::NewLC( KApMaxConnNameLength ); - HBufC* temp2 = HBufC::NewLC( KApMaxConnNameLength ); - - HBufC* corrname = ApCommons::EnsureMaxLengthLC( aName, aChanged ); - *temp = *corrname; - TInt postfix( 0 ); - TInt pf( 0 ); - TInt i( 0 ); - TBool valid ( EFalse ); - - TPtrC prefix = ApCommons::GetPrefix( *corrname ); - - CApUtils* utils = CApUtils::NewLC( aDb ); - - if ( aIsNew ) - { - aUid = 0; - } - - postfix = GetPostfix( *temp, prefix ); - postfix = -1; - do - { - valid = utils->IsValidNameL( *temp, aUid ); - if ( !valid ) - { - aChanged = ETrue; - postfix++; - // check the length of postfix, check text length accordingly - pf = postfix; - for (i=1; i<10; i++) - { - pf /= 10; - if ( !pf ) - break; - } - TPtr sgdptr( temp->Des() ); - TPtr sgdptr2( temp2->Des() ); - if ( postfix ) - { - if ( postfix < 10 ) - { - sgdptr2 = prefix.Left( KApMaxConnNameLength - i - 3 ); - } - else - { - sgdptr2 = prefix.Left( KApMaxConnNameLength - i - 2 ); - } - } - else - { - sgdptr2 = prefix.Left( KApMaxConnNameLength ); - } - if ( postfix ) - { - if ( postfix > 9 ) - { - sgdptr.Format( KFormatLargePostfix, &sgdptr2, - postfix ); - } - else - { - sgdptr.Format( KFormatPostfix, &sgdptr2, - postfix ); - } - } - else - { - sgdptr.Format( KFormatNoPostfix, &sgdptr2 ); - } - } - } while ( !valid ); - - CleanupStack::PopAndDestroy( utils ); - CleanupStack::PopAndDestroy( corrname ); - CleanupStack::PopAndDestroy( temp2 ); - - if ( aChanged ) - { - CleanupStack::Pop( temp ); - } - else - { - CleanupStack::PopAndDestroy( temp ); - temp = NULL; - } - - CLOG( ( ECommons, 1, _L( "<- ApCommons::DoMakeValidNameL" ) ) ); - - return temp; - } - - - - - -// --------------------------------------------------------- -// ApCommons::EnsureMaxLengthLC -// --------------------------------------------------------- -// -HBufC* ApCommons::EnsureMaxLengthLC( const TDesC* aName, TBool& aChanged ) - { - CLOG( ( ECommons, 0, _L( "-> ApCommons::EnsureMaxLengthLC" ) ) ); - - TInt length = aName->Length(); - - aChanged = EFalse; - - if ( !length ) - { - // Name is required. - User::Leave(KErrInvalidName); - } - - HBufC* corrname; - if ( KApMaxConnNameLength < length ) - { // name too long, truncate. - corrname = aName->Left( KApMaxConnNameLength ).AllocLC(); - aChanged = ETrue; - } - else - { - corrname = aName->AllocLC(); - corrname->Des().Trim(); - if ( corrname->Length() == 0 ) - { - User::Leave(KErrInvalidName); - } - // comes here only if name is valid - if ( corrname->Length() != aName->Length() ) - { - aChanged = ETrue; - } - } - CLOG( ( ECommons, 1, _L( "<- ApCommons::EnsureMaxLengthLC" ) ) ); - - return corrname; - } - - - - -/** -* Given aName in the format or , -* return a pointer to the leading part. -* That is, if there is trailing , -* then that is excluded; if there is no trailing part, then the original -* decriptor is returned. -* Examples: -* - "Foo" returns "Foo"; -* - "Foo 12" returns "Foo 12"; -* - "Foo(12)" returns "Foo"; -* - "Foo 12 (34)" returns "Foo 12 "; -* - "Foo bar" returns "Foo bar"; -* - "Foo " returns "Foo ". -*/ -TPtrC ApCommons::GetPrefix( const TDesC& aName ) - { - TPtrC prefix = aName; - TInt lastBrace = aName.LocateReverse('('); - if ( lastBrace != KErrNotFound ) - { - // aName looks like "". - // See if is an integer number. - TPtrC num = aName.Right( aName.Length() - lastBrace - 1 ); - TInt val; - TLex lex( num ); - if ( lex.Val( val ) == KErrNone ) - { - // Yes, the trailer is an integer. - prefix.Set( aName.Left( lastBrace ) ); - } - } - return prefix; - } - - -/** -* If aName is constructed from aPrefix with a postfix, get the numeric -* value of the postfix, e.g: -* - GetPostfix( "Foo (3)", "Foo" ) == 3 -* - GetPostfix( "Foo 23 (45)", "Foo 23" ) == 45 -* If aName is the same as aPrefix, return 0, e.g.: -* - GetPostfix( "Foo", "Foo" ) == 0 -* If aName is not constructed from aPrefix, return -1, e.g.: -* - GetPostfix( "Foobar", "Foo" ) == -1 -* - GetPostfix( "Fo 23 45", "Foo" ) == -1 -*/ -TInt ApCommons::GetPostfix( const TDesC& aName, const TDesC& aPrefix ) - { - TInt postfix( KErrNotFound ); - TInt nameLength = aName.Length(); - TInt prefixLength = aPrefix.Length(); - if ( nameLength >= prefixLength && aName.FindF( aPrefix ) == 0 ) - { - // aName is longer or equal length, and - // aPrefix can be found in the beginning of aName. - if ( nameLength == prefixLength ) - { - // They have the same length; they equal. - postfix = 0; - } - else - { - if ( aName[ prefixLength ] == '(' ) - { - // (Now we know that aName is longer than aPrefix.) - // aName looks like "aPrefix". - // See if is an integer number. - TPtrC num = aName.Right( nameLength - prefixLength - 1 ); - TInt val; - TLex lex( num ); - if ( lex.Val( val ) == KErrNone ) - { - // Yes, the trailer is an integer. - if ( val > 0 ) - { - postfix = val; - } - else - { - // signal that it is invalid... - postfix = -1; - } - } - } - } - } - return postfix; - } - - - - -// --------------------------------------------------------- -// ApCommons::ReadUintL -// --------------------------------------------------------- -// -TInt ApCommons::ReadUintL - ( - CCommsDbTableView* atable, - const TDesC& aColumn, - TUint32& aValue - ) - { - __ASSERT_DEBUG( (atable), Panic( ENullPointer ) ) ; - TRAPD( err, atable->ReadUintL( aColumn, aValue ) ); - if ( err != KErrNone ) - { // do not leave if readed value is not present in table... - if ( ( err != KErrUnknown ) && ( err != KErrNotFound ) ) - User::Leave( err ); - } - return err; - } - - -// --------------------------------------------------------- -// ApCommons::ReadBoolL -// --------------------------------------------------------- -// -TInt ApCommons::ReadBoolL - ( - CCommsDbTableView* atable, - const TDesC& aColumn, - TBool& aValue - ) - { - __ASSERT_DEBUG( (atable), Panic( ENullPointer ) ) ; - TRAPD( err, atable->ReadBoolL( aColumn, aValue ) ); - if ( err != KErrNone ) - { // do not leave if readed value is not present in table... - if ( err != KErrUnknown ) - User::Leave( err ); - } - return err; - } - - - -// --------------------------------------------------------- -// ApCommons::ReadLongTextLC -// --------------------------------------------------------- -// -HBufC* ApCommons::ReadLongTextLC - ( - CCommsDbTableView* atable, - const TDesC& aColumn, - TInt& aErrCode - ) - { - __ASSERT_DEBUG( (atable), Panic( ENullPointer ) ) ; - HBufC* value = NULL; - // because of Trap, we need to call a func - // which pops it from the stack & push it back afterwards... - TRAP( aErrCode, value = ReadLongTextL( atable, aColumn ) ); - CleanupStack::PushL( value ); - if ( aErrCode != KErrNone ) - { // do not leave if readed value is not present in table... - if ( aErrCode != KErrUnknown ) - User::Leave( aErrCode ); - } - return value; - } - - - -// --------------------------------------------------------- -// ApCommons::ReadLongTextL -// --------------------------------------------------------- -// -HBufC* ApCommons::ReadLongTextL( CCommsDbTableView* atable, - const TDesC& aColumn ) - { - __ASSERT_DEBUG( (atable), Panic( ENullPointer ) ) ; - HBufC* value = atable->ReadLongTextLC( aColumn ); - CleanupStack::Pop( value ); - return value; - } - - - -// --------------------------------------------------------- -// ApCommons::EscapeTextLC -// --------------------------------------------------------- -// -HBufC* ApCommons::EscapeTextLC( const TDesC& aLiteral ) - { - TInt l( aLiteral.Length() ); - //> 2*, to ensure correct esc. even if ALL chars are quotes... - HBufC* retbuf = HBufC::NewLC( 2*l ); - TPtr ret = retbuf->Des(); - TUint quote( '\'' ); // TChar gives warnings in THUMB & ARMI - TInt i( 0 ); - - for( i=0; iReadColumnLengthL(aCol, aLength); - - HBufC* buf = HBufC::NewLC(aLength); - TPtr ptr( buf->Des() ); - atable->ReadTextL(aCol, ptr); - return buf; - } - - -// --------------------------------------------------------- -// ApCommons::ReadText8ValueLC -// --------------------------------------------------------- -// -HBufC8* ApCommons::ReadText8ValueLC( CCommsDbTableView* atable, - const TDesC& aCol ) - { - __ASSERT_DEBUG( (atable), Panic( ENullPointer ) ) ; - TInt aLength(0); - atable->ReadColumnLengthL(aCol, aLength); - - HBufC8* buf = HBufC8::NewLC(aLength); - TPtr8 ptr( buf->Des() ); - atable->ReadTextL(aCol, ptr); - return buf; - } - - -// --------------------------------------------------------- -// ApCommons::DoGetReadOnlyL -// --------------------------------------------------------- -// -TBool ApCommons::DoGetReadOnlyL( CCommsDbTableView& aTable ) - { - return CApProtHandler::GetProtectionStateL( aTable ); - } - - - -// --------------------------------------------------------- -// ApCommons::CommitTransaction -// --------------------------------------------------------- -// -TInt ApCommons::CommitTransaction( CCommsDatabase& aDb ) - { - CLOG( ( ETransaction, 0, _L( "-> ApCommons::CommitTransaction" ) ) ); - TInt err = aDb.CommitTransaction(); - CLOG( ( ETransaction, 1, _L( "<- ApCommons::CommitTransaction" ) ) ); - return err; - } - - - - -//---------------------------------------------------------- -// ApCommons::GetVariantL -//---------------------------------------------------------- -// -TInt ApCommons::GetVariantL() - { - CLOG( ( ETransaction, 0, _L( "-> ApCommons::GetVariantL" ) ) ); - TInt variant( 0 ); - // Connecting and initialization: - CRepository* repository = CRepository::NewL( KCRUidApEngineLV ); - repository->Get( KApEngineLVFlags, variant ); - delete repository; - - CLOG( ( ETransaction, 1, _L( "<- ApCommons::GetVariantL" ) ) ); - - return variant; - } - - - -// --------------------------------------------------------- -// ApCommons::IsGivenSharedDataSupportL -// --------------------------------------------------------- -// -TInt ApCommons::IsGivenSharedDataSupportL( const TUid aUid, - const TUint32 aKey ) - { - TInt value( 0 ); - // Connecting and initialization: - CRepository* repository = CRepository::NewL( aUid ); - repository->Get( aKey, value ); - delete repository; - return value; - } - - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apeng/src/ApEngineLogger.cpp --- a/apengine/apeng/src/ApEngineLogger.cpp Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,159 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Implementation of class ApEngineLogger. -* -* -*/ - - -// INCLUDE FILES - -#ifdef __TEST_APENGINE_LOG__ - - #include "ApEngineLogger.h" - #include - - // ================= CONSTANTS ======================= - - /// ApEngine logging directory. - _LIT( KApEngineLogDir, "ApEngine" ); - /// ApEngine log file name. - _LIT( KApEngineLogFile, "ApEngine.txt" ); - - - // ================= MEMBER FUNCTIONS ======================= - - // --------------------------------------------------------- - // ApEngineLogger::Write() - // --------------------------------------------------------- - // - void ApEngineLogger::Write - ( TInt32 aMask, TInt aLevel, TRefByValue aFmt, ... ) - { - if( (aMask & APENGINE_LOG_MASK) && (aLevel <= APENGINE_LOG_LEVEL) ) - { - VA_LIST list; - VA_START( list, aFmt ); - RFileLogger::WriteFormat - ( - KApEngineLogDir, - KApEngineLogFile, - EFileLoggingModeAppend, - aFmt, - list - ); - VA_END( list ); - } - } - - - // --------------------------------------------------------- - // ApEngineLogger::Write() - // --------------------------------------------------------- - // - void ApEngineLogger::Write - ( TInt32 aMask, TInt aLevel, - TRefByValue aFmt, - VA_LIST& aList ) - { - if( (aMask & APENGINE_LOG_MASK) && (aLevel <= APENGINE_LOG_LEVEL) ) - { - RFileLogger::WriteFormat - ( - KApEngineLogDir, - KApEngineLogFile, - EFileLoggingModeAppend, - aFmt, - aList - ); - } - } - - - // --------------------------------------------------------- - // ApEngineLogger::Write() - // --------------------------------------------------------- - // - void ApEngineLogger::Write - ( TInt32 aMask, TInt aLevel, TRefByValue aFmt, ... ) - { - if( (aMask & APENGINE_LOG_MASK) && (aLevel <= APENGINE_LOG_LEVEL) ) - { - VA_LIST list; - VA_START( list, aFmt ); - RFileLogger::WriteFormat - ( - KApEngineLogDir, - KApEngineLogFile, - EFileLoggingModeAppend, - aFmt, - list - ); - VA_END( list ); - } - } - - - // --------------------------------------------------------- - // ApEngineLogger::Write() - // --------------------------------------------------------- - // - void ApEngineLogger::Write - ( TInt32 aMask, TInt aLevel, - TRefByValue aFmt, VA_LIST& aList ) - { - if( (aMask & APENGINE_LOG_MASK) && (aLevel <= APENGINE_LOG_LEVEL) ) - { - RFileLogger::WriteFormat - ( - KApEngineLogDir, - KApEngineLogFile, - EFileLoggingModeAppend, - aFmt, - aList - ); - } - } - - - // --------------------------------------------------------- - // ApEngineLogger::HexDump() - // --------------------------------------------------------- - // - void ApEngineLogger::HexDump - ( - TInt32 aMask, - TInt aLevel, - const TText* aHeader, - const TText* aMargin, - const TUint8* aPtr, - TInt aLen - ) - { - if( (aMask & APENGINE_LOG_MASK) && (aLevel <= APENGINE_LOG_LEVEL) ) - { - RFileLogger::HexDump - ( - KApEngineLogDir, - KApEngineLogFile, - EFileLoggingModeAppend, - aHeader, - aMargin, - aPtr, - aLen - ); - } - } -#endif // __TEST_APENGINE_LOG__ diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apeng/src/ApListItem.cpp --- a/apengine/apeng/src/ApListItem.cpp Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,384 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Declaration of the CApSelect class. -* -*/ - - -// INCLUDE FILES -#include - -#include "ApListItem.h" -#include "ApEngineLogger.h" -#include "ApEngineCommons.h" - -// LOCAL FUNCTION PROTOTYPES - -// ================= MEMBER FUNCTIONS ======================= -// Two-phased constructor. -// --------------------------------------------------------- -// CApListItem::NewLC -// --------------------------------------------------------- -// -EXPORT_C CApListItem* CApListItem::NewLC() - { - CLOG( ( EUtil, 0, _L( "-> CApListItem::NewLC" ) ) ); - - CApListItem* db = new( ELeave ) CApListItem; - CleanupStack::PushL( db ); - db->ConstructL(); - - CLOG( ( EUtil, 1, _L( "<- CApListItem::NewLC" ) ) ); - return db; - } - - -// --------------------------------------------------------- -// CApListItem::NewLC -// --------------------------------------------------------- -// -EXPORT_C CApListItem* CApListItem::NewLC - ( - TCommsDbIspType aIspType, - TUint32 aUid, - const TDesC& aName, - TApBearerType aBearerType - ) - { - CLOG( ( EUtil, 0, _L( "-> CApListItem::NewLC" ) ) ); - - CApListItem* db = new( ELeave ) CApListItem; - CleanupStack::PushL( db ); - db->ConstructL( aIspType, aUid, aName, aBearerType ); - - CLOG( ( EUtil, 1, _L( "<- CApListItem::NewLC" ) ) ); - return db; - } - - -EXPORT_C CApListItem* CApListItem::NewLC - ( - TCommsDbIspType aIspType, - TUint32 aUid, - const TDesC& aName, - TApBearerType aBearerType, - const TDesC& aStartPage, - TBool aReadOnly - ) - { - CLOG( ( EUtil, 0, _L( "-> CApListItem::NewLC" ) ) ); - - CApListItem* db = new( ELeave ) CApListItem; - CleanupStack::PushL( db ); - db->ConstructL( aIspType, aUid, aName, aBearerType, aStartPage ); - db->iExt->iReadOnly = aReadOnly; - - CLOG( ( EUtil, 1, _L( "<- CApListItem::NewLC" ) ) ); - return db; - } - -// --------------------------------------------------------- -// CApListItem::NewLC -// --------------------------------------------------------- -// -EXPORT_C CApListItem* CApListItem::NewLC( CApListItem* aItem ) - { - CLOG( ( EUtil, 0, _L( "-> CApListItem::NewLC" ) ) ); - - CApListItem* db = new( ELeave ) CApListItem; - CleanupStack::PushL( db ); - db->ConstructL( aItem->iIspType, aItem->iUid, *aItem->iName, - aItem->iBearerType, *aItem->iStartPage ); - db->iExt->iReadOnly = aItem->IsReadOnly(); - - CLOG( ( EUtil, 1, _L( "<- CApListItem::NewLC" ) ) ); - return db; - } - - -// Destructor -// --------------------------------------------------------- -// CApListItem::~CApListItem -// --------------------------------------------------------- -// -EXPORT_C CApListItem::~CApListItem() - { - CLOG( ( EUtil, 0, _L( "-> CApListItem::NewLC" ) ) ); - - delete iName; - delete iStartPage; - if ( iExt ) - { - delete iExt; - } - - CLOG( ( EUtil, 1, _L( "<- CApListItem::NewLC" ) ) ); - } - - - -// --------------------------------------------------------- -// CApListItem::CopyFromL -// --------------------------------------------------------- -// -EXPORT_C void CApListItem::CopyFromL( const CApListItem& aCopyFrom ) - { - CLOG( ( EUtil, 0, _L( "-> CApListItem::NewLC" ) ) ); - - HBufC* temp = NULL; - HBufC* temp2 = NULL; - temp = aCopyFrom.iName->AllocL(); - delete iName; - iName = temp; - - temp2 = aCopyFrom.iStartPage->AllocL(); - delete iStartPage; - iStartPage = temp2; - - iUid = aCopyFrom.iUid; - iIspType = aCopyFrom.iIspType; - iBearerType = aCopyFrom.iBearerType; - iExt->iReadOnly = aCopyFrom.iExt->iReadOnly; - - CLOG( ( EUtil, 1, _L( "<- CApListItem::NewLC" ) ) ); - } - - -// C++ default constructor can NOT contain any code that -// might leave. -// -// --------------------------------------------------------- -// CApListItem::CApListItem -// --------------------------------------------------------- -// -EXPORT_C CApListItem::CApListItem() -:iIspType( EIspTypeInternetAndWAP ), -iUid( 0 ), -iBearerType( EApBearerTypeGPRS ) - { - } - - -// Symbian OS default constructor can leave. -// --------------------------------------------------------- -// CApListItem::ConstructL -// --------------------------------------------------------- -// -EXPORT_C void CApListItem::ConstructL() - { - CLOG( ( EUtil, 0, _L( "-> CApListItem::NewLC" ) ) ); - - iName = HBufC::NewL( 0 ); - iStartPage = HBufC::NewL( 0 ); - CreateExtraL(); - - CLOG( ( EUtil, 1, _L( "<- CApListItem::NewLC" ) ) ); - } - - -// Symbian OS default constructor can leave. -// --------------------------------------------------------- -// CApListItem::ConstructL -// --------------------------------------------------------- -// -EXPORT_C void CApListItem::ConstructL( TCommsDbIspType aIspType, - TUint32 aUid, - const TDesC& aName, - TApBearerType aBearerType ) - { - CLOG( ( EUtil, 0, _L( "-> CApListItem::NewLC" ) ) ); - - ConstructL(); - SetItemL( aIspType, aUid, aName, aBearerType ); - - CLOG( ( EUtil, 1, _L( "<- CApListItem::NewLC" ) ) ); - } - - - -// --------------------------------------------------------- -// CApListItem::ConstructL -// --------------------------------------------------------- -// -EXPORT_C void CApListItem::ConstructL( TCommsDbIspType aIspType, - TUint32 aUid, - const TDesC& aName, - TApBearerType aBearerType, - const TDesC& aStartPage - ) - { - CLOG( ( EUtil, 0, _L( "-> CApListItem::ConstructL" ) ) ); - - ConstructL(); - SetItemL( aIspType, aUid, aName, aBearerType, aStartPage ); - - CLOG( ( EUtil, 1, _L( "<- CApListItem::ConstructL" ) ) ); - } - - -// --------------------------------------------------------- -// CApListItem::SetItemL -// --------------------------------------------------------- -// -EXPORT_C void CApListItem::SetItemL( TCommsDbIspType aIspType, - TUint32 aUid, - const TDesC& aName, - TApBearerType aBearerType ) - { - CLOG( ( EUtil, 0, _L( "-> CApListItem::SetItemL(4)" ) ) ); - - SetItemL( aIspType, aUid, aName, aBearerType, KEmpty ); - - CLOG( ( EUtil, 1, _L( "<- CApListItem::SetItemL(4)" ) ) ); - } - - -// --------------------------------------------------------- -// CApListItem::SetItemL -// --------------------------------------------------------- -// -EXPORT_C void CApListItem::SetItemL( TCommsDbIspType aIspType, - TUint32 aUid, - const TDesC& aName, - TApBearerType aBearerType, - const TDesC& aStartpage - ) - { - CLOG( ( EUtil, 0, _L( "-> CApListItem::SetItemL" ) ) ); - - HBufC* temp = NULL; - temp = aName.AllocL(); - delete iName; - iName = temp; - - HBufC* temp2 = NULL; - temp2 = aStartpage.AllocL(); - delete iStartPage; - iStartPage = temp2; - - iIspType = aIspType; - iUid = aUid; - iBearerType = aBearerType; - - CLOG( ( EUtil, 1, _L( "<- CApListItem::SetItemL" ) ) ); - } - - -// --------------------------------------------------------- -// CApListItem::Name -// --------------------------------------------------------- -// -EXPORT_C const TDesC& CApListItem::Name() - { - CLOG( ( EUtil, 0, _L( "<-> CApListItem::Name" ) ) ); - - return *iName; - } - - -// --------------------------------------------------------- -// CApListItem::Uid -// --------------------------------------------------------- -// -EXPORT_C TUint32 CApListItem::Uid() - { - CLOG( ( EUtil, 0, _L( "<-> CApListItem::Uid" ) ) ); - - return iUid; - } - - -// --------------------------------------------------------- -// CApListItem::Type -// --------------------------------------------------------- -// -EXPORT_C TCommsDbIspType CApListItem::Type() - { - CLOG( ( EUtil, 0, _L( "<-> CApListItem::Type" ) ) ); - - return iIspType; - } - - - -// --------------------------------------------------------- -// CApListItem::BearerType -// --------------------------------------------------------- -// -EXPORT_C TApBearerType CApListItem::BearerType() - { - CLOG( ( EUtil, 0, _L( "<-> CApListItem::BearerType" ) ) ); - - return iBearerType; - } - - -// --------------------------------------------------------- -// CApListItem::StartPage -// --------------------------------------------------------- -// -EXPORT_C const TDesC& CApListItem::StartPage() const - { - CLOG( ( EUtil, 0, _L( "<-> CApListItem::StartPage" ) ) ); - - return *iStartPage; - } - - -// --------------------------------------------------------- -// CApListItem::IsReadOnly -// --------------------------------------------------------- -// -EXPORT_C TBool CApListItem::IsReadOnly() const - { - CLOG( ( EUtil, 0, _L( "<-> CApListItem::IsReadOnly" ) ) ); - - return iExt->iReadOnly; - } - - -// --------------------------------------------------------- -// CApListItem::IsVpnAp -// --------------------------------------------------------- -// -TBool CApListItem::IsVpnAp() const - { - return iExt->iIsVpn; - } - - -// --------------------------------------------------------- -// CApListItem::CreateExtraL -// --------------------------------------------------------- -// -void CApListItem::CreateExtraL() - { - iExt = new ( ELeave )TApListItemExtra; - iExt->iIapId = 0; - iExt->iIsVpn = EFalse; - iExt->iReadOnly = EFalse; - } - - -// --------------------------------------------------------- -// CApListItem::SetVpnFlag -// --------------------------------------------------------- -// -void CApListItem::SetVpnFlag( TBool aIsVpn ) - { - iExt->iIsVpn = aIsVpn; - } - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apeng/src/ApListItemKey.cpp --- a/apengine/apeng/src/ApListItemKey.cpp Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,148 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of the TApListItemKey class. -* -*/ - - -// INCLUDE FILES - -#include "ApListItemList.h" -#include "ApListItem.h" -#include "ApListItemKey.h" - -// CONSTANTS - - -// ================= MEMBER FUNCTIONS ======================= -// --------------------------------------------------------- -// TApListItemNameKey::SetPtr() -// --------------------------------------------------------- -// -void TApListItemNameKey::SetPtr( CApListItemList* aPtr ) - { - iList = aPtr; - } - - -// --------------------------------------------------------- -// TApListItemNameKey::Compare() -// --------------------------------------------------------- -// -TInt TApListItemNameKey::Compare( TInt aLeft,TInt aRight ) const - { - TInt retval = - iList->At( aLeft )->Name().CompareC( iList->At( aRight )->Name() ); - if ( !iAscending ) - { - retval *= -1; - } - return retval; - } - - -// --------------------------------------------------------- -// TApListItemNameKey::At() -// --------------------------------------------------------- -// -TAny* TApListItemNameKey::At( TInt anIndex ) const - { - TAny* ptr = MUTABLE_CAST( TDesC16*, &(iList->At( anIndex )->Name())); - return ptr; - } - - - -// --------------------------------------------------------- -// TApListItemNameKey::TApListItemNameKey() -// --------------------------------------------------------- -// -TApListItemNameKey::TApListItemNameKey( TBool aAscending ) -:TKeyArrayFix( 0, ECmpCollated ) - { - iList = NULL; - iAscending = aAscending; - } - - - - - - -// --------------------------------------------------------- -// TApListItemUidKey -// --------------------------------------------------------- - - -// --------------------------------------------------------- -// TApListItemUidKey::SetPtr -// --------------------------------------------------------- -// -void TApListItemUidKey::SetPtr( CApListItemList* aPtr ) - { - iList = aPtr; - } - - -// --------------------------------------------------------- -// TApListItemUidKey::Compare -// --------------------------------------------------------- -// -TInt TApListItemUidKey::Compare( TInt aLeft,TInt aRight ) const - { - TInt retval( 1 ); - if ( iList->At( aLeft )->Uid() < iList->At( aRight )->Uid() ) - { - retval = -1; - } - else - { - if ( iList->At( aLeft )->Uid() == iList->At( aRight )->Uid() ) - { - retval = 0; - } - } - if ( !iAscending ) - { - retval *= -1; - } - return retval; - } - - -// --------------------------------------------------------- -// TApListItemUidKey::At -// --------------------------------------------------------- -// -TAny* TApListItemUidKey::At( TInt anIndex ) const - { - TAny* ptr = MUTABLE_CAST( TUint32*, &(iList->At( anIndex )->iUid) ); - return ptr; - } - - - -// --------------------------------------------------------- -// TApListItemUidKey::TApListItemUidKey -// --------------------------------------------------------- -// -TApListItemUidKey::TApListItemUidKey( TBool aAscending ) -:TKeyArrayFix( 0, ECmpCollated ) - { - iList = NULL; - iAscending = aAscending; - } - - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apeng/src/ApNetworkItem.cpp --- a/apengine/apeng/src/ApNetworkItem.cpp Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,199 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Declaration of the CApNetworkItem class. -* -*/ - - -// INCLUDE FILES -#include - -#include "ApNetworkItem.h" -#include "ApEngineLogger.h" - - -// LOCAL FUNCTION PROTOTYPES - -// ================= MEMBER FUNCTIONS ======================= -// Two-phased constructor. -// --------------------------------------------------------- -// CApNetworkItem::NewLC -// --------------------------------------------------------- -// -EXPORT_C CApNetworkItem* CApNetworkItem::NewLC() - { - CLOG( ( ENetworks, 0, _L( "-> CApNetworkItem::NewLC()" ) ) ); - - CApNetworkItem* db = new( ELeave ) CApNetworkItem; - CleanupStack::PushL( db ); - db->ConstructL(); - - CLOG( ( ENetworks, 1, _L( "<- CApNetworkItem::NewLC()" ) ) ); - return db; - } - - -// --------------------------------------------------------- -// CApNetworkItem::NewLC -// --------------------------------------------------------- -// -EXPORT_C CApNetworkItem* CApNetworkItem::NewLC( CApNetworkItem* aItem ) - { - CLOG( ( ENetworks, 0, _L( "-> CApNetworkItem::NewLC" ) ) ); - - CApNetworkItem* db = new( ELeave ) CApNetworkItem; - CleanupStack::PushL( db ); - db->ConstructL( aItem->iUid, *aItem->iName ); - - CLOG( ( ENetworks, 1, _L( "<- CApNetworkItem::NewLC" ) ) ); - return db; - } - - -// Destructor -// --------------------------------------------------------- -// CApNetworkItem::~CApNetworkItem -// --------------------------------------------------------- -// -EXPORT_C CApNetworkItem::~CApNetworkItem() - { - CLOG( ( ENetworks, 0, _L( "-> CApNetworkItem::~CApNetworkItem" ) ) ); - - delete iName; - } - - - -// --------------------------------------------------------- -// CApNetworkItem::CopyFromL -// --------------------------------------------------------- -// -EXPORT_C void CApNetworkItem::CopyFromL( const CApNetworkItem& aCopyFrom ) - { - CLOG( ( ENetworks, 0, _L( "-> CApNetworkItem::CopyFromL" ) ) ); - - HBufC* temp = NULL; - temp = aCopyFrom.iName->AllocL(); - delete iName; - iName = temp; - - iUid = aCopyFrom.iUid; - - CLOG( ( ENetworks, 1, _L( "<- CApNetworkItem::CopyFromL" ) ) ); - } - - -// C++ default constructor can NOT contain any code that -// might leave. -// -// --------------------------------------------------------- -// CApNetworkItem::CApNetworkItem -// --------------------------------------------------------- -// -EXPORT_C CApNetworkItem::CApNetworkItem() -:iUid( 0 ) - { - } - - -// Symbian OS default constructor can leave. -// --------------------------------------------------------- -// CApNetworkItem::ConstructL -// --------------------------------------------------------- -// -EXPORT_C void CApNetworkItem::ConstructL() - { - CLOG( ( ENetworks, 0, _L( "-> CApNetworkItem::ConstructL()" ) ) ); - - iName = HBufC::NewL( 0 ); - - CLOG( ( ENetworks, 1, _L( "<- CApNetworkItem::ConstructL()" ) ) ); - } - - -// Symbian OS default constructor can leave. -// --------------------------------------------------------- -// CApNetworkItem::ConstructL -// --------------------------------------------------------- -// -EXPORT_C void CApNetworkItem::ConstructL( TUint32 aUid, - const TDesC& aName ) - { - CLOG( ( ENetworks, 0, _L( "-> CApNetworkItem::ConstructL" ) ) ); - - ConstructL(); - SetUid( aUid ); - SetNameL( aName ); - - CLOG( ( ENetworks, 1, _L( "<- CApNetworkItem::ConstructL" ) ) ); - } - - - -// --------------------------------------------------------- -// CApNetworkItem::Name -// --------------------------------------------------------- -// -EXPORT_C const TDesC& CApNetworkItem::Name() const - { - CLOG( ( ENetworks, 0, _L( "<-> CApNetworkItem::Name" ) ) ); - - return *iName; - } - - -// --------------------------------------------------------- -// CApNetworkItem::Uid -// --------------------------------------------------------- -// -EXPORT_C TUint32 CApNetworkItem::Uid() const - { - CLOG( ( ENetworks, 0, _L( "<-> CApNetworkItem::Uid" ) ) ); - - return iUid; - } - - - -// --------------------------------------------------------- -// CApNetworkItem::SetUid -// --------------------------------------------------------- -// -EXPORT_C void CApNetworkItem::SetUid( TUint32 aUid ) - { - CLOG( ( ENetworks, 0, _L( "<-> CApNetworkItem::SetUid" ) ) ); - - iUid = aUid; - - } - - -// --------------------------------------------------------- -// CApNetworkItem::SetUidL -// --------------------------------------------------------- -// -EXPORT_C void CApNetworkItem::SetNameL( const TDesC& aName ) - { - CLOG( ( ENetworks, 0, _L( "-> CApNetworkItem::SetNameL" ) ) ); - - HBufC* temp = NULL; - temp = aName.AllocL(); - delete iName; - iName = temp; - - CLOG( ( ENetworks, 1, _L( "<- CApNetworkItem::SetNameL" ) ) ); - } - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apeng/src/ApProtHandler.cpp --- a/apengine/apeng/src/ApProtHandler.cpp Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,750 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of the CApProtHandler class. -* -*/ - - -// INCLUDE FILES -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include - -#include "ApEngineCommons.h" -#include "APEngineVariant.hrh" -#include "ApEngineLogger.h" - -// ================= MEMBER FUNCTIONS ======================= - -// --------------------------------------------------------- -// CApProtHandler::IsTableProtectedL -// --------------------------------------------------------- -// -EXPORT_C TBool CApProtHandler::IsTableProtectedL( CCommsDatabase* aDb ) - { - CLOG( ( EProtection, 0, _L( "-> CApProtHandler::IsTableProtectedL" ) ) ); - - TBool retval( EFalse ); - retval = IsTableProtectedL( aDb, TPtrC(WAP_ACCESS_POINT) ); - - CLOG( ( EProtection, 1, _L( "<- CApProtHandler::IsTableProtectedL" ) ) ); - return retval; - } - - -// --------------------------------------------------------- -// CApProtHandler::IsApProtectedL -// --------------------------------------------------------- -// -EXPORT_C TBool CApProtHandler::IsApProtectedL( CCommsDatabase* aDb, - TUint32 aUid ) - { - CLOG( ( EProtection, 0, _L( "-> CApProtHandler::IsApProtectedL" ) ) ); - - TBool retval( EFalse ); - retval = IsRecordProtectedL( aDb, TPtrC(WAP_ACCESS_POINT), aUid ); - - CLOG( ( EProtection, 1, _L( "<- CApProtHandler::IsApProtectedL" ) ) ); - return retval; - } - - -// --------------------------------------------------------- -// CApProtHandler::ProtectItemL -// --------------------------------------------------------- -// -EXPORT_C void CApProtHandler::ProtectItemL( CCommsDatabase* aDb, - TUint32 aUid ) - { - CLOG( ( EProtection, 0, _L( "-> CApProtHandler::ProtectItemL" ) ) ); - - if ( ApCommons::GetVariantL() & KApUiEditOnlyVPNs ) - { - User::Leave( KErrNotSupported ); - } -#ifdef __TEST_CDMA_WRITE_PROTECT - User::Leave( KErrNotSupported ); -#endif // __TEST_CDMA_WRITE_PROTECT - - ProtectRecordL( aDb, TPtrC(WAP_ACCESS_POINT), aUid ); - - CLOG( ( EProtection, 1, _L( "<- CApProtHandler::ProtectItemL" ) ) ); - } - - -// --------------------------------------------------------- -// CApProtHandler::UnprotectItemL -// --------------------------------------------------------- -// -EXPORT_C void CApProtHandler::UnprotectItemL( CCommsDatabase* aDb, - TUint32 aUid ) - { - CLOG( ( EProtection, 0, _L( "-> CApProtHandler::UnprotectItemL" ) ) ); - - if ( ApCommons::GetVariantL() & KApUiEditOnlyVPNs ) - { - User::Leave( KErrNotSupported ); - } -#ifdef __TEST_CDMA_WRITE_PROTECT - User::Leave( KErrNotSupported ); -#endif // __TEST_CDMA_WRITE_PROTECT - - UnprotectRecordL( aDb, TPtrC(WAP_ACCESS_POINT), aUid ); - - CLOG( ( EProtection, 1, _L( "<- CApProtHandler::UnprotectItemL" ) ) ); - } - - - -// --------------------------------------------------------- -// CApProtHandler::ProtectTableL -// --------------------------------------------------------- -// -EXPORT_C void CApProtHandler::ProtectTableL( CCommsDatabase* aDb ) - { - CLOG( ( EProtection, 0, _L( "-> CApProtHandler::ProtectTableL" ) ) ); - - if ( ApCommons::GetVariantL() & KApUiEditOnlyVPNs ) - { - User::Leave( KErrNotSupported ); - } -#ifdef __TEST_CDMA_WRITE_PROTECT - User::Leave( KErrNotSupported ); -#endif // __TEST_CDMA_WRITE_PROTECT - - ProtectTableL( aDb, TPtrC(WAP_ACCESS_POINT) ); - - CLOG( ( EProtection, 1, _L( "<- CApProtHandler::ProtectTableL" ) ) ); - } - - -// --------------------------------------------------------- -// CApProtHandler::UnprotectTableL -// --------------------------------------------------------- -// -EXPORT_C void CApProtHandler::UnprotectTableL( CCommsDatabase* aDb ) - { - CLOG( ( EProtection, 0, _L( "-> CApProtHandler::UnprotectTableL" ) ) ); - - if ( ApCommons::GetVariantL() & KApUiEditOnlyVPNs ) - { - User::Leave( KErrNotSupported ); - } -#ifdef __TEST_CDMA_WRITE_PROTECT - User::Leave( KErrNotSupported ); -#endif // __TEST_CDMA_WRITE_PROTECT - - UnprotectTableL( aDb, TPtrC(WAP_ACCESS_POINT) ); - - CLOG( ( EProtection, 1, _L( "<- CApProtHandler::UnprotectTableL" ) ) ); - } - - -// --------------------------------------------------------- -// CApProtHandler::IsPreferencesProtectedL -// --------------------------------------------------------- -// -EXPORT_C TBool CApProtHandler::IsPreferencesProtectedL( CCommsDatabase* aDb ) - { - CLOG( ( EProtection, 0, - _L( "-> CApProtHandler::IsPreferencesProtectedL" ) ) ); - - CCommsDatabase* db = aDb; - if ( !aDb ) - { - // create DB object - db = CCommsDatabase::NewL( ETrue ); - CleanupStack::PushL( db ); - } - - CCommsDbProtectConnectPrefTableView* table = - STATIC_CAST( CCommsDbProtectConnectPrefTableView*, - db->OpenConnectionPrefTableLC()); - - TInt err = table->GotoFirstRecord(); - if ( err != KErrNotFound ) - { - User::LeaveIfError( err ); - } - - RDbRowSet::TAccess access; - User::LeaveIfError( table->GetTableAccess( access ) ); - CleanupStack::PopAndDestroy( table ); - if ( !aDb ) - { - CleanupStack::PopAndDestroy( db ); //db - } - - //access is EUpdatable if record is updatable - TBool retval( !(access == RDbRowSet::EUpdatable) ); - - CLOG( ( EProtection, 1, - _L( "<- CApProtHandler::IsPreferencesProtectedL" ) ) ); - return retval; - } - - -// --------------------------------------------------------- -// CApProtHandler::ProtectPreferencesL -// --------------------------------------------------------- -// -EXPORT_C void CApProtHandler::ProtectPreferencesL( CCommsDatabase* aDb ) - { - CLOG( ( EProtection, 0, _L( "-> CApProtHandler::ProtectPreferencesL" ) ) ); - - if ( ApCommons::GetVariantL() & KApUiEditOnlyVPNs ) - { - User::Leave( KErrNotSupported ); - } -#ifdef __TEST_CDMA_WRITE_PROTECT - User::Leave( KErrNotSupported ); -#endif // __TEST_CDMA_WRITE_PROTECT - - CCommsDatabase* db = aDb; - if ( !aDb ) - { - // create DB object - db = CCommsDatabase::NewL( ETrue ); - CleanupStack::PushL( db ); - } - - CCommsDbProtectConnectPrefTableView* table = - STATIC_CAST( CCommsDbProtectConnectPrefTableView*, - db->OpenConnectionPrefTableLC()); - - User::LeaveIfError( table->GotoFirstRecord() ); - User::LeaveIfError( table->ProtectTable() ); - - CleanupStack::PopAndDestroy( table ); - - if ( !aDb ) - { - CleanupStack::PopAndDestroy( db ); //db - } - - CLOG( ( EProtection, 1, _L( "<- CApProtHandler::ProtectPreferencesL" ) ) ); - } - - - -// --------------------------------------------------------- -// CApProtHandler::UnprotectPreferencesL -// --------------------------------------------------------- -// -EXPORT_C void CApProtHandler::UnprotectPreferencesL( CCommsDatabase* aDb ) - { - CLOG( ( EProtection, 0, - _L( "-> CApProtHandler::UnprotectPreferencesL" ) ) ); - - if ( ApCommons::GetVariantL() & KApUiEditOnlyVPNs ) - { - User::Leave( KErrNotSupported ); - } -#ifdef __TEST_CDMA_WRITE_PROTECT - User::Leave( KErrNotSupported ); -#endif // __TEST_CDMA_WRITE_PROTECT - - CCommsDatabase* db = aDb; - if ( !aDb ) - { - // create DB object - db = CCommsDatabase::NewL( ETrue ); - CleanupStack::PushL( db ); - } - CCommsDbProtectConnectPrefTableView* table = - STATIC_CAST( CCommsDbProtectConnectPrefTableView*, - db->OpenConnectionPrefTableLC()); - - User::LeaveIfError( table->GotoFirstRecord() ); - User::LeaveIfError( table->UnprotectTable() ); - - CleanupStack::PopAndDestroy( table ); - if ( !aDb ) - { - CleanupStack::PopAndDestroy( db ); //db - } - - CLOG( ( EProtection, 1, - _L( "<- CApProtHandler::UnprotectPreferencesL" ) ) ); - } - - - -// --------------------------------------------------------- -// CApProtHandler::RemoveProtectedAccessPointsL -// --------------------------------------------------------- -// -EXPORT_C void CApProtHandler::RemoveProtectedAccessPointsL( - CCommsDatabase* aDb) - { - CLOG( ( EProtection, 0, - _L( "-> CApProtHandler::RemoveProtectedAccessPointsL" ) ) ); - - if ( ApCommons::GetVariantL() & KApUiEditOnlyVPNs ) - { - User::Leave( KErrNotSupported ); - } -#ifdef __TEST_CDMA_WRITE_PROTECT - User::Leave( KErrNotSupported ); -#endif // __TEST_CDMA_WRITE_PROTECT - - CCommsDatabase* db; - if ( !aDb ) - { - // create DB object - db = CCommsDatabase::NewL( ETrue ); - CleanupStack::PushL( db ); - } - else - { - db = aDb; - } - DoRemoveProtectedAccessPointsL( *db ); - - if ( !aDb ) - { - CleanupStack::PopAndDestroy( db ); // db - } - - CLOG( ( EProtection, 1, - _L( "<- CApProtHandler::RemoveProtectedAccessPointsL" ) ) ); - } - -// ================== OTHER MEMBER FUNCTIONS =============== - - - - - -// --------------------------------------------------------- -// CApProtHandler::IsRecordProtectedL -// --------------------------------------------------------- -// -TBool CApProtHandler::IsRecordProtectedL( CCommsDatabase* aDb, - const TDesC& aTable, - TUint32 aUid ) - { - CLOG( ( EProtection, 0, _L( "-> CApProtHandler::IsRecordProtectedL" ) ) ); - - CCommsDatabase* db = aDb; - if ( !aDb ) - { - // create DB object - db = CCommsDatabase::NewL( ETrue ); - CleanupStack::PushL( db ); - } - - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *db, ETrue ); - - CCommsDbProtectTableView* view = - (CCommsDbProtectTableView*)db->OpenViewMatchingUintLC - ( - aTable, - TPtrC(COMMDB_ID), - aUid - ); - - TInt err = view->GotoFirstRecord(); - User::LeaveIfError( err ); - - TInt prot( EFalse ); - User::LeaveIfError( view->GetRecordAccess( prot ) ); - - CleanupStack::PopAndDestroy( view ); // view - - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *db ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - if ( !aDb ) - { - CleanupStack::PopAndDestroy( db ); // db - } - - CLOG( ( EProtection, 1, _L( "<- CApProtHandler::IsRecordProtectedL" ) ) ); - return prot; - } - - - -// --------------------------------------------------------- -// CApProtHandler::ProtectRecordL -// --------------------------------------------------------- -// -void CApProtHandler::ProtectRecordL( CCommsDatabase* aDb, - const TDesC& aTable, TUint32 aUid ) - { - CLOG( ( EProtection, 0, _L( "-> CApProtHandler::ProtectRecordL" ) ) ); - - if ( ApCommons::GetVariantL() & KApUiEditOnlyVPNs ) - { - User::Leave( KErrNotSupported ); - } -#ifdef __TEST_CDMA_WRITE_PROTECT - User::Leave( KErrNotSupported ); -#endif // __TEST_CDMA_WRITE_PROTECT - - CCommsDatabase* db = aDb; - if ( !aDb ) - { - // create DB object - db = CCommsDatabase::NewL( ETrue ); - CleanupStack::PushL( db ); - } - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *db, ETrue ); - - CCommsDbProtectTableView* view = - (CCommsDbProtectTableView*)db->OpenViewMatchingUintLC - ( - aTable, - TPtrC(COMMDB_ID), - aUid - ); - - TInt err = view->GotoFirstRecord(); - User::LeaveIfError( err ); - - User::LeaveIfError( view->ProtectRecord() ); - - CleanupStack::PopAndDestroy( view ); // view - - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *db ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - if ( !aDb ) - { - CleanupStack::PopAndDestroy( db ); // db - } - - CLOG( ( EProtection, 1, _L( "<- CApProtHandler::ProtectRecordL" ) ) ); - } - - - -// --------------------------------------------------------- -// CApProtHandler::UnprotectRecordL -// --------------------------------------------------------- -// -void CApProtHandler::UnprotectRecordL( CCommsDatabase* aDb, - const TDesC& aTable, TUint32 aUid ) - { - CLOG( ( EProtection, 0, _L( "-> CApProtHandler::UnprotectRecordL" ) ) ); - - if ( ApCommons::GetVariantL() & KApUiEditOnlyVPNs ) - { - User::Leave( KErrNotSupported ); - } -#ifdef __TEST_CDMA_WRITE_PROTECT - User::Leave( KErrNotSupported ); -#endif // __TEST_CDMA_WRITE_PROTECT - - CCommsDatabase* db = aDb; - if ( !aDb ) - { - // create DB object - db = CCommsDatabase::NewL( ETrue ); - CleanupStack::PushL( db ); - } - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *db, ETrue ); - - CCommsDbProtectTableView* view = - (CCommsDbProtectTableView*)db->OpenViewMatchingUintLC - ( - aTable, - TPtrC(COMMDB_ID), - aUid - ); - - TInt err = view->GotoFirstRecord(); - User::LeaveIfError( err ); - - User::LeaveIfError( view->UnprotectRecord() ); - - CleanupStack::PopAndDestroy( view ); // view - - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *db ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - if ( !aDb ) - { - CleanupStack::PopAndDestroy( db ); // db - } - - CLOG( ( EProtection, 1, _L( "<- CApProtHandler::UnprotectRecordL" ) ) ); - } - - - - -// --------------------------------------------------------- -// CApProtHandler::IsTableProtectedL -// --------------------------------------------------------- -// -TBool CApProtHandler::IsTableProtectedL( CCommsDatabase* aDb, - const TDesC& aTable ) - { - CLOG( ( EProtection, 0, - _L( "-> CApProtHandler::IsTableProtectedL(table)" ) ) ); - - TBool retval( EFalse ); - CCommsDatabase* db = aDb; - if ( !aDb ) - { - // create DB object - db = CCommsDatabase::NewL( ETrue ); - CleanupStack::PushL( db ); - } - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *db, ETrue ); - - CCommsDbProtectTableView* view = - (CCommsDbProtectTableView*)db->OpenTableLC( aTable ); - - RDbRowSet::TAccess aAccessType( RDbRowSet::EUpdatable ); - - User::LeaveIfError( view->GetTableAccess( aAccessType) ); - - if ( aAccessType == RDbRowSet::EUpdatable ) - { - retval = EFalse; - } - else - { // EReadOnly, EInsertOnly - retval = ETrue; - } - - CleanupStack::PopAndDestroy( view ); // view - - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *db ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - if ( !aDb ) - { - CleanupStack::PopAndDestroy( db ); // db - } - - CLOG( ( EProtection, 1, - _L( "<- CApProtHandler::IsTableProtectedL(table)" ) ) ); - return retval; - } - - -// --------------------------------------------------------- -// CApProtHandler::ProtectTableL -// --------------------------------------------------------- -// -void CApProtHandler::ProtectTableL( CCommsDatabase* aDb, - const TDesC& aTable ) - { - CLOG( ( EProtection, 0, - _L( "-> CApProtHandler::ProtectTableL(table)" ) ) ); - - if ( ApCommons::GetVariantL() & KApUiEditOnlyVPNs ) - { - User::Leave( KErrNotSupported ); - } -#ifdef __TEST_CDMA_WRITE_PROTECT - User::Leave( KErrNotSupported ); -#endif // __TEST_CDMA_WRITE_PROTECT - - CCommsDatabase* db = aDb; - if ( !aDb ) - { - // create DB object - db = CCommsDatabase::NewL( ETrue ); - CleanupStack::PushL( db ); - } - - CCommsDbProtectTableView* view = - (CCommsDbProtectTableView*)db->OpenTableLC( aTable ); - - TInt err = view->GotoFirstRecord(); - User::LeaveIfError( err ); - - User::LeaveIfError( view->ProtectTable() ); - - CleanupStack::PopAndDestroy( view ); // view - - if ( !aDb ) - { - CleanupStack::PopAndDestroy( db ); //db - } - - CLOG( ( EProtection, 1, - _L( "<- CApProtHandler::ProtectTableL(table)" ) ) ); - } - - - -// --------------------------------------------------------- -// CApProtHandler::UnprotectTableL -// --------------------------------------------------------- -// -void CApProtHandler::UnprotectTableL( CCommsDatabase* aDb, - const TDesC& aTable ) - { - CLOG( ( EProtection, 0, - _L( "-> CApProtHandler::UnprotectTableL(table)" ) ) ); - - if ( ApCommons::GetVariantL() & KApUiEditOnlyVPNs ) - { - User::Leave( KErrNotSupported ); - } -#ifdef __TEST_CDMA_WRITE_PROTECT - User::Leave( KErrNotSupported ); -#endif // __TEST_CDMA_WRITE_PROTECT - - CCommsDatabase* db = aDb; - if ( !aDb ) - { - // create DB object - db = CCommsDatabase::NewL( ETrue ); - CleanupStack::PushL( db ); - } -// Follow related error rep. and act accordingly: -// JBAH-58FCHH -// TBool ownTransaction = ApCommons::StartPushedTransactionLC( *db, ETrue ); - - CCommsDbProtectTableView* view = - (CCommsDbProtectTableView*)db->OpenTableLC( aTable ); - - - TInt err = view->GotoFirstRecord(); - // If not found, no problem, Unprotect will be carried out correctly - // But if no GotoFirstRecord, and no records, it will Panic... - if ( err != KErrNotFound ) - { - User::LeaveIfError( err ); - } - - User::LeaveIfError( view->UnprotectTable() ); - - CleanupStack::PopAndDestroy( view ); // view - - -/* - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *db ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } -*/ - if ( !aDb ) - { - CleanupStack::PopAndDestroy( db ); // db - } - - CLOG( ( EProtection, 1, - _L( "<- CApProtHandler::UnprotectTableL(table)" ) ) ); - } - - -// --------------------------------------------------------- -// CApProtHandler::GetProtectionStateL -// --------------------------------------------------------- -// -TBool CApProtHandler::GetProtectionStateL( CCommsDbTableView& aTable ) - { - CLOG( ( EProtection, 0, _L( "-> CApProtHandler::GetProtectionStateL" ) ) ); - - TInt aAccess( 0 ); - User::LeaveIfError( - ( (CCommsDbProtectTableView*) &aTable )->GetRecordAccess( aAccess ) ); - - CLOG( ( EProtection, 1, _L( "<- CApProtHandler::GetProtectionStateL" ) ) ); - return aAccess; - } - - - -// --------------------------------------------------------- -// CApProtHandler::DoRemoveProtectedAccessPointsL -// --------------------------------------------------------- -// -void CApProtHandler::DoRemoveProtectedAccessPointsL( - CCommsDatabase& aDb) - { - CLOG( ( EProtection, 0, - _L( "-> CApProtHandler::DoRemoveProtectedAccessPointsL" ) ) ); - - if ( ApCommons::GetVariantL() & KApUiEditOnlyVPNs ) - { - User::Leave( KErrNotSupported ); - } -#ifdef __TEST_CDMA_WRITE_PROTECT - User::Leave( KErrNotSupported ); -#endif // __TEST_CDMA_WRITE_PROTECT - - // TRANSACTION STARTING IS REMOVED UNTIL ERROR - // JBAH-58FCHH IS CORRECTED BY SYMBIAN - // start a transaction, just to make sure -// TBool ownTransaction = ApCommons::StartPushedTransactionLC( aDb, ETrue ); - - // make AP table updatable - UnprotectTableL( &aDb ); - - // remove all protected AP - // first get a list of current AP-s - CApListItemList* list = new( ELeave )CApListItemList(); - CleanupStack::PushL( list ); - CApDataHandler* handler = CApDataHandler::NewLC( aDb ); - CApSelect* sel = - CApSelect::NewLC( aDb, KEApIspTypeAll, EApBearerTypeAllBearers, - KEApSortNameAscending); - sel->AllListItemDataL( *list ); - // now get protected ones and delete them - TInt count( list->Count() ); - for( TInt i = 0; iAt( i )->IsReadOnly() ) - { - UnprotectItemL( &aDb, list->At( i )->Uid() ); - handler->RemoveAPL( list->At( i )->Uid() ); - } - } - CleanupStack::PopAndDestroy( 3, list ); // sel, handler, list - -/* - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *aDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } -*/ - - CLOG( ( EProtection, 1, - _L( "<- CApProtHandler::DoRemoveProtectedAccessPointsL" ) ) ); - } - - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apeng/src/VpnApEngine.cpp --- a/apengine/apeng/src/VpnApEngine.cpp Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1404 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of the CVpnApEngine class. -* -*/ - - -// INCLUDE FILES - -#include "VpnApEngine.h" -#include "VpnApItem.h" -#include "ApEngineLogger.h" -#include "ApEngineConsts.h" -#include "ApEngineCommons.h" - -#include -#include -#include - -#include - -#include -#include - - -// CONSTANTS -_LIT( KVpnVirtualBearerName, "vpnbearer" ); -_LIT( KVpnVirtualBearerAgent, "vpnconnagt.agt" ); -_LIT( KVpnVirtualBearerNif, "tunnelnif" ); -_LIT( KDefProxyProtocolName, "http" ); // required ! -_LIT( KDefWapGatewayIpAddress, "0.0.0.0" ); - - - -// constatnts needed for the virtualbearer table -const TInt KNoTimeout = -1; -const TUint32 KLastSessionTimeout = 3; - - -// ================= MEMBER FUNCTIONS ======================= -// --------------------------------------------------------- -// CVpnApEngine::NewLC -// --------------------------------------------------------- -// -EXPORT_C CVpnApEngine* CVpnApEngine::NewLC( CCommsDatabase* aDb ) - { - CLOG( ( EApItem, 0, _L( "-> CVpnApEngine::NewL" ) ) ); - - CVpnApEngine* self = new ( ELeave ) CVpnApEngine; - CleanupStack::PushL( self ); - self->ConstructL( aDb ); - - CLOG( ( EApItem, 1, _L( "<- CVpnApEngine::NewL" ) ) ); - - return self; - } - - -// --------------------------------------------------------- -// CVpnApEngine::~CVpnApEngine -// --------------------------------------------------------- -// -EXPORT_C CVpnApEngine::~CVpnApEngine() - { - if ( iOwnDb ) - { - delete iDb; - } - - CLOG( ( EApItem, 0, _L( "<-> CVpnApEngine::~CVpnApEngine" ) ) ); - } - - -// --------------------------------------------------------- -// CVpnApEngine::ConstructL -// --------------------------------------------------------- -// -EXPORT_C void CVpnApEngine::ConstructL( CCommsDatabase* aDb ) - { - CLOG( ( EApItem, 0, _L( "-> CVpnApEngine::ConstructL" ) ) ); - - if ( aDb ) - { - iDb = aDb; - iOwnDb = EFalse; - } - else - { - iDb = CCommsDatabase::NewL(); - iOwnDb = ETrue; - } - - CLOG( ( EApItem, 0, _L( "<- CVpnApEngine::ConstructL" ) ) ); - } - - -// --------------------------------------------------------- -// CVpnApEngine::CVpnApEngine -// --------------------------------------------------------- -// -EXPORT_C CVpnApEngine::CVpnApEngine() -:iOwnDb( EFalse ) - { - CLOG( ( EApItem, 0, _L( "<-> CVpnApEngine::CVpnApEngine" ) ) ); - - } - - - -// --------------------------------------------------------- -// CVpnApEngine::CreateVpnApL -// --------------------------------------------------------- -// -EXPORT_C TUint32 CVpnApEngine::CreateVpnApL( CVpnApItem& aVpnApItem ) - { - CLOG( ( EApItem, 0, _L( "-> CVpnApEngine::CreateVpnApL" ) ) ); - - TUint32 retval( 0 ); - - // Start a transaction - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - - retval = DoCreateVpnApL( ETrue, aVpnApItem ); - - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - - - CLOG( ( EApItem, 1, _L( "<- CVpnApEngine::CreateVpnApL" ) ) ); - - return retval; - } - - - - - -// --------------------------------------------------------- -// CVpnApEngine::CreateVpnL -// --------------------------------------------------------- -// -EXPORT_C TUint32 CVpnApEngine::CreateVpnApL( TDesC& aName, - TUint32 aIapId, - TDesC& aPolicy, - TDesC* aProxyServerAddress, - TUint32 aProxyPort ) - { - CLOG( ( EApItem, 0, _L( "-> CVpnApEngine::CreateVpnApL..." ) ) ); - TUint32 retval( 0 ); - - CVpnApItem* item = CVpnApItem::NewLC(); - - item->WriteTextL( EApVpnWapAccessPointName, aName ); - item->WriteUint( EApVpnRealIapID, aIapId ); - item->WriteTextL( EApVpnPolicyId, aPolicy ); - item->WriteLongTextL( EApVpnProxyServerAddress, *aProxyServerAddress ); - item->WriteUint( EApVpnProxyPortNumber, aProxyPort ); - - - RVpnServ ps; - User::LeaveIfError( ps.Connect() ); - CleanupClosePushL( ps ); - - TVpnPolicyDetails det; - - TVpnPolicyName pName( aPolicy ); - - TInt err = ps.GetPolicyDetails( pName, det ); - - // When the policy is deleted (err!=0): - // have this leave, in UI display a note about needing to be reconfigured - // & set it & policyID to none to look like there is NO policy - // which will force the reconfiguration if in the UI - User::LeaveIfError( err ); - - item->WriteTextL( EApVpnPolicy, det.iName ); - - CreateVpnApL( *item ); - - CleanupStack::PopAndDestroy(); // ps - - CleanupStack::PopAndDestroy( item ); - - CLOG( ( EApItem, 1, _L( "<- CVpnApEngine::CreateVpnApL..." ) ) ); - - return retval; - } - - - - -// --------------------------------------------------------- -// CVpnApEngine::DeleteVpnL -// --------------------------------------------------------- -// -EXPORT_C void CVpnApEngine::DeleteVpnL( TUint32 aVpnApId ) - { - CLOG( ( EApItem, 0, _L( "-> CVpnApEngine::DeleteVpnL" ) ) ); - - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - DoDeleteVpnL( aVpnApId ); - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EApItem, 1, _L( "<- CVpnApEngine::DeleteVpnL" ) ) ); - } - - - - - - -// --------------------------------------------------------- -// CVpnApEngine::VpnDataL -// --------------------------------------------------------- -// -EXPORT_C void CVpnApEngine::VpnDataL( TUint32 aUid, - CVpnApItem& aVpnApItem ) - { - CLOG( ( EApItem, 0, _L( "-> CVpnApEngine::VpnDataL" ) ) ); - - ReadVpnWapBearerDataL( aUid, aVpnApItem ); - ReadVpnWapApDataL( aVpnApItem ); - ReadVpnIapRecordL( aVpnApItem ); - ReadNetworkDataL( aVpnApItem ); - ReadVpnDataL( aVpnApItem ); - ReadProxyDataL( aVpnApItem ); - - CLOG( ( EApItem, 1, _L( "<- CVpnApEngine::VpnDataL" ) ) ); - } - - - - -// --------------------------------------------------------- -// CVpnApEngine::UpdateVpnDataL -// --------------------------------------------------------- -// -EXPORT_C void CVpnApEngine::UpdateVpnDataL( CVpnApItem& aVpnApItem ) - { - CLOG( ( EApItem, 0, _L( "-> CVpnApEngine::UpdateVpnDataL" ) ) ); - - // Start a transaction - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - - // ignore return value as it is used only when creating new - DoCreateVpnApL( EFalse, aVpnApItem ); - - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EApItem, 1, _L( "<- CVpnApEngine::UpdateVpnDataL" ) ) ); - } - - - - -// --------------------------------------------------------- -// CVpnApEngine::IsVpnApL() -// --------------------------------------------------------- -// -EXPORT_C TBool CVpnApEngine::IsVpnApL( const TUint32 aUid ) - { - CLOG( ( EApItem, 0, _L( "-> CVpnApEngine::IsVpnApL" ) ) ); - - TBool retval( EFalse ); - // Start a transaction - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - - CCommsDbTableView* wapt; - wapt = iDb->OpenViewMatchingUintLC( TPtrC(WAP_IP_BEARER), - TPtrC(WAP_ACCESS_POINT_ID), aUid ); - User::LeaveIfError( wapt->GotoFirstRecord() ); - - TUint32 iapid( 0 ); - ApCommons::ReadUintL( wapt, TPtrC(WAP_IAP), iapid ); - - - - CCommsDbTableView* iapt; - iapt = iDb->OpenViewMatchingUintLC( TPtrC(IAP), - TPtrC(COMMDB_ID), iapid ); - User::LeaveIfError( iapt->GotoFirstRecord() ); - - HBufC* iapServiceType = ApCommons::ReadText16ValueLC - ( - iapt, - TPtrC(IAP_SERVICE_TYPE) - ); - - retval = ( iapServiceType->Compare( TPtrC(VPN_SERVICE) ) == 0 ); - - CleanupStack::PopAndDestroy( iapServiceType ); // iapServiceType - - CleanupStack::PopAndDestroy( iapt ); // iapt - - CleanupStack::PopAndDestroy( wapt ); // wapt - - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EApItem, 1, _L( "<- CVpnApEngine::IsVpnApL" ) ) ); - - return retval; - } - - - -// --------------------------------------------------------- -// CVpnApEngine::Cvt() -// --------------------------------------------------------- -// -EXPORT_C TInt CVpnApEngine::Cvt() - { - return KErrNone; - } - - - - -// --------------------------------------------------------- -// CVpnApEngine::DoCreateVpnApL -// --------------------------------------------------------- -// -TUint32 CVpnApEngine::DoCreateVpnApL( TBool aIsNew, CVpnApItem& aVpnApItem ) - { - CLOG( ( EApItem, 0, _L( "-> CVpnApEngine::DoCreateVpnApL" ) ) ); - - // internal function, caller MUST initiate a transaction, WE WILL NOT. - // create 1 single virtual bearer if not already present - // Create a new VPN access point (WAP, etc. with VPN IAP - // Create a new VPN record in VPN table - - CApUtils* util = CApUtils::NewLC( *iDb ); - TBool valid = - util->IsValidNameL( *aVpnApItem.iName, aVpnApItem.iVpnWapId ); - CleanupStack::PopAndDestroy( util ); - - if ( !valid ) - { - User::Leave( KErrAlreadyExists ); - } - - WriteVpnDataL( aIsNew, aVpnApItem ); - TUint32 virtbearerid = CreateVirtBearerIfNeededL(); - aVpnApItem.iVirtualBearerID = virtbearerid; - WriteNetworkDataL( aIsNew, aVpnApItem ); - WriteVpnIapRecordL( aIsNew, aVpnApItem ); - - WriteVpnWapApDataL( aIsNew, aVpnApItem ); - WriteVpnWapBearerDataL( aIsNew, aVpnApItem ); - if ( aVpnApItem.HasProxy() ) - { - WriteProxyDataL( aIsNew, aVpnApItem ); - } - else - { - if ( !aIsNew ) - { - CCommsDbTableView* iapt; - iapt = iDb->OpenViewMatchingUintLC( TPtrC(IAP), TPtrC(COMMDB_ID), - aVpnApItem.iVpnIapId ); - - User::LeaveIfError( iapt->GotoFirstRecord() ); - HBufC* servicetype = HBufC::NewLC( KCommsDbSvrMaxFieldLength ); - TPtr servptr( servicetype->Des() ); - iapt->ReadTextL( TPtrC(IAP_SERVICE_TYPE), servptr ); - - TRAP_IGNORE( RemoveVpnProxyDataL( aVpnApItem.iVpnTableId ) ); - - CleanupStack::PopAndDestroy( servicetype ); - CleanupStack::PopAndDestroy( iapt ); - } - } - - CLOG( ( EApItem, 0, _L( "<- CVpnApEngine::DoCreateVpnApL" ) ) ); - - return aVpnApItem.iVpnWapId; - } - - -// --------------------------------------------------------- -// CVpnApEngine::WriteVpnDataL -// --------------------------------------------------------- -// -void CVpnApEngine::WriteVpnDataL( TBool aIsNew, CVpnApItem& aVpnApItem ) - { - CLOG( ( EApItem, 0, _L( "-> CVpnApEngine::WriteVpnDataL" ) ) ); - - // internal function, caller MUST initiate a transaction, WE WILL NOT. - CCommsDbTableView* t; - - if ( aIsNew ) - { - t = iDb->OpenTableLC( TPtrC(VPN_SERVICE) ); - TInt err = t->InsertRecord( aVpnApItem.iVpnTableId ); - if ( err ) - { - User::LeaveIfError( err ); - } - } - else - { - t = iDb->OpenViewMatchingUintLC( TPtrC(VPN_SERVICE), - TPtrC(COMMDB_ID), - aVpnApItem.iVpnTableId ); - User::LeaveIfError( t->GotoFirstRecord() ); - User::LeaveIfError( t->UpdateRecord() ); - } - - t->WriteTextL( TPtrC(COMMDB_NAME), *aVpnApItem.iName ); - - t->WriteTextL( TPtrC(VPN_SERVICE_POLICY), *aVpnApItem.iPolicyId ); - - t->WriteUintL( TPtrC(VPN_SERVICE_IAP), aVpnApItem.iRealIapId ); - - t->WriteUintL( TPtrC(VPN_SERVICE_NETWORKID), aVpnApItem.iHomeNetwork ); - - User::LeaveIfError( t->PutRecordChanges( EFalse, EFalse ) ); - - CleanupStack::PopAndDestroy( t ); // t - - CLOG( ( EApItem, 0, _L( "<- CVpnApEngine::WriteVpnDataL" ) ) ); - - } - - - - -// --------------------------------------------------------- -// CVpnApEngine::CreateVirtBearerIfNeededL -// --------------------------------------------------------- -// -TUint32 CVpnApEngine::CreateVirtBearerIfNeededL() - { - CLOG( ( EApItem, 0, _L( "-> CVpnApEngine::CreateVirtBearerIfNeededL" ) ) ); - - TUint32 retval( 0 ); - - CCommsDbTableView* t = NULL; - - t = iDb->OpenViewMatchingTextLC( TPtrC(VIRTUAL_BEARER), - TPtrC(VIRTUAL_BEARER_AGENT), - KVpnVirtualBearerAgent ); - if ( t->GotoFirstRecord() == KErrNotFound ) - { // no such yet, create one - TInt err = t->InsertRecord( retval ); - if ( err ) - { - User::LeaveIfError( err ); - } - t->WriteTextL( TPtrC(COMMDB_NAME), KVpnVirtualBearerName ); - t->WriteTextL( TPtrC(VIRTUAL_BEARER_AGENT), KVpnVirtualBearerAgent ); - t->WriteTextL( TPtrC(VIRTUAL_BEARER_NIF), KVpnVirtualBearerNif ); - - t->WriteUintL( TPtrC(LAST_SOCKET_ACTIVITY_TIMEOUT), - (TUint32)KNoTimeout ); - t->WriteUintL( TPtrC(LAST_SESSION_CLOSED_TIMEOUT), - KLastSessionTimeout ); - t->WriteUintL( TPtrC(LAST_SOCKET_CLOSED_TIMEOUT), - (TUint32)KNoTimeout ); - - User::LeaveIfError( t->PutRecordChanges( EFalse, EFalse ) ); - - } - else - { // there is one, use it - t->ReadUintL( TPtrC(COMMDB_ID), retval ); - } - - CleanupStack::PopAndDestroy( t ); // t - - CLOG( ( EApItem, 0, _L( "<- CVpnApEngine::CreateVirtBearerIfNeededL" ) ) ); - - return retval; - } - - - -// --------------------------------------------------------- -// CVpnApEngine::WriteVpnIapRecordL -// --------------------------------------------------------- -// -TUint32 CVpnApEngine::WriteVpnIapRecordL( TBool aIsNew, - CVpnApItem& aVpnApItem ) - { - CLOG( ( EApItem, 0, _L( "-> CVpnApEngine::WriteVpnIapRecordL" ) ) ); - - // internal function, caller MUST initiate a transaction, WE WILL NOT. - CCommsDbTableView* t; - - if ( aIsNew ) - { - t = iDb->OpenTableLC( TPtrC(IAP) ); - TInt err = t->InsertRecord( aVpnApItem.iVpnIapId ); - if ( err ) - { - User::LeaveIfError( err ); - } - } - else - { - t = iDb->OpenViewMatchingUintLC( TPtrC(IAP), - TPtrC(COMMDB_ID), - aVpnApItem.iVpnIapId ); - User::LeaveIfError( t->GotoFirstRecord() ); - User::LeaveIfError( t->UpdateRecord() ); - } - - t->WriteTextL( TPtrC(COMMDB_NAME), *aVpnApItem.iName ); - - t->WriteUintL( TPtrC(IAP_SERVICE), aVpnApItem.iVpnTableId ); - t->WriteTextL( TPtrC(IAP_SERVICE_TYPE), TPtrC(VPN_SERVICE) ); - - // hardcoded... - t->WriteTextL( TPtrC(IAP_BEARER_TYPE), TPtrC(VIRTUAL_BEARER) ); - t->WriteUintL( TPtrC(IAP_BEARER), aVpnApItem.iVirtualBearerID ); - - t->WriteUintL( TPtrC(IAP_NETWORK), aVpnApItem.iVpnIapNetwork ); - - // Network weighting hardcoded to 0! - t->WriteUintL( TPtrC(IAP_NETWORK_WEIGHTING), 0 ); - - TUint32 loc = GetLocationIdL(); - t->WriteUintL( TPtrC(IAP_LOCATION), loc ); - - User::LeaveIfError( t->PutRecordChanges( EFalse, EFalse ) ); - - CleanupStack::PopAndDestroy( t ); // t - - - CLOG( ( EApItem, 0, _L( "<- CVpnApEngine::WriteVpnIapRecordL" ) ) ); - - return aVpnApItem.iVpnIapId; - } - - - - -// --------------------------------------------------------- -// CVpnApEngine::GetLocationIdL -// --------------------------------------------------------- -// -TUint32 CVpnApEngine::GetLocationIdL() - { - // agreed that the location record having the name 'Mobile' is used - CLOG( ( EHandler, 0, _L( "-> CVpnApEngine::GetLocationIdL" ) ) ); - - CCommsDbTableView* loc; - loc = iDb->OpenViewMatchingTextLC( TPtrC(LOCATION), - TPtrC(COMMDB_NAME), - KLocation ); - TInt err = loc->GotoFirstRecord(); - - User::LeaveIfError( err ); - TUint32 id( 0 ); - loc->ReadUintL( TPtrC(COMMDB_ID), id ); - - CleanupStack::PopAndDestroy( loc ); // loc - - CLOG( ( EHandler, 1, _L( "<- CVpnApEngine::GetLocationIdL" ) ) ); - return id; - } - - - -// --------------------------------------------------------- -// CVpnApEngine::WriteVpnWapApDataL -// --------------------------------------------------------- -// -void CVpnApEngine::WriteVpnWapApDataL( TBool aIsNew, CVpnApItem& aVpnApItem ) - { - CLOG( ( EHandler, 0, _L( "-> CVpnApEngine::WriteVpnWapApDataL" ) ) ); - - // internal function, caller MUST initiate a transaction, WE WILL NOT. - CCommsDbTableView* wapt; - - if ( aIsNew ) - { - wapt = iDb->OpenTableLC( TPtrC(WAP_ACCESS_POINT) ); - TInt err = wapt->InsertRecord( aVpnApItem.iVpnWapId ); - if ( err ) - { - User::LeaveIfError( err ); - } - // CommDB's back-link makes returned UID value unusable, - // variable needed just to be able to make the call... - } - else - { - wapt = iDb->OpenViewMatchingUintLC( TPtrC(WAP_ACCESS_POINT), - TPtrC(COMMDB_ID), - aVpnApItem.iVpnWapId ); - User::LeaveIfError( wapt->GotoFirstRecord() ); - User::LeaveIfError( wapt->UpdateRecord() ); - } - - // it is IP_BEARER - wapt->WriteTextL( TPtrC(WAP_CURRENT_BEARER), TPtrC(WAP_IP_BEARER) ); - wapt->WriteTextL( TPtrC(COMMDB_NAME), *aVpnApItem.iName ); - - wapt->WriteLongTextL( TPtrC(WAP_START_PAGE), KEmpty ); - - User::LeaveIfError( wapt->PutRecordChanges( EFalse, EFalse ) ); - - CleanupStack::PopAndDestroy( wapt ); // wapt - - CLOG( ( EHandler, 1, _L( "<- CVpnApEngine::WriteVpnWapApDataL" ) ) ); - } - - - -// --------------------------------------------------------- -// CVpnApEngine::WriteWapBearerDataL -// --------------------------------------------------------- -// -void CVpnApEngine::WriteVpnWapBearerDataL( TBool aIsNew, - CVpnApItem& aVpnApItem ) - { - CLOG( ( EHandler, 0, _L( "-> CVpnApEngine::WriteWapBearerDataL" ) ) ); - - // internal function, caller MUST initiate a transaction, WE WILL NOT. - CCommsDbTableView* bearert; - if ( aIsNew ) - { - bearert = iDb->OpenTableLC( TPtrC(WAP_IP_BEARER) ); - // CommDB's back-link makes returned UID value unusable, - // variable needed just to be able to make the call... - TUint32 alma; - User::LeaveIfError( bearert->InsertRecord( alma ) ); - } - else - { - bearert = iDb->OpenViewMatchingUintLC( TPtrC(WAP_IP_BEARER), - TPtrC(WAP_ACCESS_POINT_ID), - aVpnApItem.iVpnWapId ); - User::LeaveIfError( bearert->GotoFirstRecord() ); - User::LeaveIfError( bearert->UpdateRecord() ); - } - bearert->WriteTextL( TPtrC(WAP_GATEWAY_ADDRESS), KDefWapGatewayIpAddress ); - -/* - bearert->WriteUintL( TPtrC(WAP_WSP_OPTION), - aApItem.iIsConnectionTypeContinuous ); - bearert->WriteBoolL( TPtrC(WAP_SECURITY), aApItem.iIsWTLSSecurityOn ); -*/ - bearert->WriteUintL( TPtrC(WAP_ACCESS_POINT_ID), aVpnApItem.iVpnWapId ); - - bearert->WriteUintL( TPtrC(WAP_IAP), aVpnApItem.iVpnIapId ); - - // Hardcoded to 0 - bearert->WriteUintL( TPtrC(WAP_PROXY_PORT), 0 ); - - User::LeaveIfError( bearert->PutRecordChanges( EFalse, EFalse ) ); - - CleanupStack::PopAndDestroy( bearert ); // bearert - - CLOG( ( EHandler, 1, _L( "<- CVpnApEngine::WriteWapBearerDataL" ) ) ); - } - - - - -// --------------------------------------------------------- -// CVpnApEngine::ReadVpnWapBearerDataL -// --------------------------------------------------------- -// -void CVpnApEngine::ReadVpnWapBearerDataL( TUint32 aUid, - CVpnApItem& aVpnApItem ) - { - CLOG( ( EHandler, 0, _L( "-> CVpnApEngine::ReadVpnWapBearerDataL" ) ) ); - - // internal function, caller MUST initiate a transaction, WE WILL NOT. - CCommsDbTableView* bearert; - bearert = iDb->OpenViewMatchingUintLC( TPtrC(WAP_IP_BEARER), - TPtrC(WAP_ACCESS_POINT_ID), - aUid ); - User::LeaveIfError( bearert->GotoFirstRecord() ); - aVpnApItem.iVpnWapId = aUid; - - // for vpn, it is not used.... - // bearert->WriteTextL( TPtrC(WAP_GATEWAY_ADDRESS), KEmpty ); - -/* - bearert->WriteUintL( TPtrC(WAP_WSP_OPTION), - aApItem.iIsConnectionTypeContinuous ); - bearert->WriteBoolL( TPtrC(WAP_SECURITY), aApItem.iIsWTLSSecurityOn ); -*/ - - // not neccessary, as we already queried for it and set it... - // bearert->ReadUintL( TPtrC(WAP_ACCESS_POINT_ID), aVpnApItem.iVpnWapId ); - - bearert->ReadUintL( TPtrC(WAP_IAP), aVpnApItem.iVpnIapId ); - - // Hardcoded to 0, not used, skip it - // bearert->WriteUintL( TPtrC(WAP_PROXY_PORT), 0 ); - - CleanupStack::PopAndDestroy( bearert ); // bearert - - CLOG( ( EHandler, 1, _L( "<- CVpnApEngine::ReadVpnWapBearerDataL" ) ) ); - } - - - - -// --------------------------------------------------------- -// CVpnApEngine::ReadVpnWapApDataL -// --------------------------------------------------------- -// -void CVpnApEngine::ReadVpnWapApDataL( CVpnApItem& aVpnApItem ) - { - CLOG( ( EHandler, 0, _L( "-> CVpnApEngine::ReadVpnWapApDataL" ) ) ); - - // internal function, caller MUST initiate a transaction, WE WILL NOT. - CCommsDbTableView* wapt; - - wapt = iDb->OpenViewMatchingUintLC( TPtrC(WAP_ACCESS_POINT), - TPtrC(COMMDB_ID), - aVpnApItem.iVpnWapId ); - User::LeaveIfError( wapt->GotoFirstRecord() ); - - // it is IP_BEARER, but as hardcoded, skip it... - // wapt->ReadTextL( TPtrC(WAP_CURRENT_BEARER), TPtrC(WAP_IP_BEARER) ); - - HBufC* buf = NULL; - buf = ApCommons::ReadText16ValueLC( wapt, TPtrC(COMMDB_NAME) ); - aVpnApItem.WriteTextL( EApVpnWapAccessPointName, *buf ); - CleanupStack::PopAndDestroy( buf ); // buf - - // HARDCODED, skip it - //wapt->WriteLongTextL( TPtrC(WAP_START_PAGE), KEmpty ); - - CleanupStack::PopAndDestroy( wapt ); // wapt - - CLOG( ( EHandler, 1, _L( "<- CVpnApEngine::ReadVpnWapApDataL" ) ) ); - } - - - -// --------------------------------------------------------- -// CVpnApEngine::ReadVpnIapRecordL -// --------------------------------------------------------- -// -void CVpnApEngine::ReadVpnIapRecordL( CVpnApItem& aVpnApItem ) - { - CLOG( ( EApItem, 0, _L( "-> CVpnApEngine::ReadVpnIapRecordL" ) ) ); - - // internal function, caller MUST initiate a transaction, WE WILL NOT. - CCommsDbTableView* t; - - t = iDb->OpenViewMatchingUintLC( TPtrC(IAP), - TPtrC(COMMDB_ID), - aVpnApItem.iVpnIapId ); - User::LeaveIfError( t->GotoFirstRecord() ); - - // Name is already set from WAP, skip it - // t->WriteTextL( TPtrC(COMMDB_NAME), *aVpnApItem.iName ); - - t->ReadUintL( TPtrC(IAP_SERVICE), aVpnApItem.iVpnTableId ); - - // Hardcoded table name, not used, skip it - // t->WriteTextL( TPtrC(IAP_SERVICE_TYPE), TPtrC(VPN_SERVICE) ); - - // hardcoded..., not used, skip it - //t->WriteTextL( TPtrC(IAP_BEARER_TYPE), TPtrC(VIRTUAL_BEARER) ); - - t->ReadUintL( TPtrC(IAP_BEARER), aVpnApItem.iVirtualBearerID ); - - t->ReadUintL( TPtrC(IAP_NETWORK), aVpnApItem.iHomeNetwork ); - - // Network weighting hardcoded to 0!, not used, skip it - //t->WriteUintL( TPtrC(IAP_NETWORK_WEIGHTING), 0 ); - - // as location is only written, skip it - /* - TUint32 loc = GetLocationIdL(); - t->WriteUintL( TPtrC(IAP_LOCATION), loc ); - */ - - CleanupStack::PopAndDestroy( t ); // t - - CLOG( ( EApItem, 0, _L( "<- CVpnApEngine::ReadVpnIapRecordL" ) ) ); - } - - - -// --------------------------------------------------------- -// CVpnApEngine::ReadVpnDataL -// --------------------------------------------------------- -// -void CVpnApEngine::ReadVpnDataL( CVpnApItem& aVpnApItem ) - { - CLOG( ( EApItem, 0, _L( "-> CVpnApEngine::ReadVpnDataL" ) ) ); - - // internal function, caller MUST initiate a transaction, WE WILL NOT. - CCommsDbTableView* t; - - t = iDb->OpenViewMatchingUintLC( TPtrC(VPN_SERVICE), - TPtrC(COMMDB_ID), - aVpnApItem.iVpnTableId ); - User::LeaveIfError( t->GotoFirstRecord() ); - - // already got from WAP table, skip it here - //t->WriteTextL( TPtrC(COMMDB_NAME), *aVpnApItem.iName ); - - HBufC* buf = NULL; - buf = ApCommons::ReadText16ValueLC( t, TPtrC(VPN_SERVICE_POLICY) ); - aVpnApItem.WriteTextL( EApVpnPolicyId, *buf ); - - RVpnServ ps; - User::LeaveIfError( ps.Connect() ); - CleanupClosePushL( ps ); - - TVpnPolicyName pName( *buf ); - - TInt policyCount(0); - TInt err = ps.EnumeratePolicies(policyCount); - if ( !err && policyCount) - { - CArrayFixFlat* policyList; - policyList = new (ELeave) CArrayFixFlat(policyCount); - CleanupStack::PushL(policyList); - - err = ps.GetPolicyInfoList(policyList); - if ( err ) - { - aVpnApItem.WriteTextL( EApVpnPolicy, KEmpty ); - } - else - { - TBool found(EFalse); - for (TInt i(0); iCount(); ++i) - { - if (pName.Compare((*policyList)[i].iId) == 0 ) - { - aVpnApItem.WriteTextL( EApVpnPolicy, - (*policyList)[i].iName ); - found = ETrue; - break; - } - } - if (!found) - { - // When the policy is deleted (err!=0): - // have this leave, in UI display a note about needing to be reconfigured & - // set it & policyID to none to look like there is NO policy - // which will force the reconfiguration if in the UI - // User::LeaveIfError( err ); - aVpnApItem.WriteTextL( EApVpnPolicy, KEmpty ); - } - } - CleanupStack::PopAndDestroy(policyList); - } - - CleanupStack::PopAndDestroy(); // ps - - CleanupStack::PopAndDestroy( buf ); // buf - - // These fields might be missing from CommsDat. - // ApEngine does not support SNAPs, use CmManager API to get full support. - TRAP_IGNORE( t->ReadUintL( TPtrC(VPN_SERVICE_IAP), aVpnApItem.iRealIapId ) ) - TRAP_IGNORE( t->ReadUintL( TPtrC(VPN_SERVICE_NETWORKID), aVpnApItem.iHomeNetwork ) ) - - CleanupStack::PopAndDestroy( t ); // t - - // Get real IAP name !!!!! - CCommsDbTableView* iapt; - - iapt = iDb->OpenViewMatchingUintLC( TPtrC(IAP), - TPtrC(COMMDB_ID), - aVpnApItem.iRealIapId ); - - err = iapt->GotoFirstRecord(); - if ( err == KErrNotFound ) - { - aVpnApItem.WriteTextL( EApVpnRealIapName, KEmpty ); - aVpnApItem.iVpnRealWapId = 0; - } - else - { - User::LeaveIfError( err ); - buf = ApCommons::ReadText16ValueLC( iapt, TPtrC(COMMDB_NAME) ); - aVpnApItem.WriteTextL( EApVpnRealIapName, *buf ); - CleanupStack::PopAndDestroy( buf ); // buf - - CApUtils* util = CApUtils::NewLC( *iDb ); - - TUint32 realwapid = util->WapIdFromIapIdL( aVpnApItem.iRealIapId ); - aVpnApItem.iVpnRealWapId = realwapid; - - CleanupStack::PopAndDestroy( util ); - - } - - CleanupStack::PopAndDestroy( iapt ); // t - - CLOG( ( EApItem, 0, _L( "<- CVpnApEngine::ReadVpnDataL" ) ) ); - } - - - - - - - - - - - -// --------------------------------------------------------- -// CVpnApEngine::WriteProxyDataL -// --------------------------------------------------------- -// -void CVpnApEngine::WriteProxyDataL( TBool aIsNew, - const CVpnApItem& aVpnApItem ) - { - CLOG( ( EHandler, 0, _L( "-> CVpnApEngine::WriteProxyDataL" ) ) ); - - CCommsDbTableView* proxies; - if ( aIsNew ) - { - proxies = iDb->OpenTableLC( TPtrC(PROXIES) ); - // variable needed just to be able to make the call... - TUint32 dummy; - User::LeaveIfError( proxies->InsertRecord( dummy ) ); - } - else - { - proxies = iDb->OpenViewMatchingTextLC( TPtrC(PROXIES), - TPtrC(PROXY_SERVICE_TYPE), - TPtrC(VPN_SERVICE) ); - TInt err = proxies->GotoFirstRecord(); - if ( err == KErrNotFound ) - { // originally there were NO proxy, but now it is added - // variable needed just to be able to make the call... - TUint32 dummy; - User::LeaveIfError( proxies->InsertRecord( dummy ) ); - } - else - { - // check if it is our proxy... - // Add test cases covering this route - TUint32 uval; - TBool found( EFalse ); - do - { - // Add test cases covering this route - proxies->ReadUintL( TPtrC(PROXY_ISP), uval ); - if ( uval == aVpnApItem.iVpnTableId ) - { - found = ETrue; - } - else - { - err = proxies->GotoNextRecord(); - } - } while ( (!err) && (!found) ); - if ( !found ) - { // no proxy record, add it now - // variable needed just to be able to make the call... - TUint32 alma; - User::LeaveIfError( proxies->InsertRecord( alma ) ); - } - else - { // we found our proxy, use it... - User::LeaveIfError( proxies->UpdateRecord() ); - } - } - } - proxies->WriteTextL( TPtrC(PROXY_SERVICE_TYPE), - TPtrC(VPN_SERVICE) ); - - proxies->WriteUintL( TPtrC(PROXY_ISP), aVpnApItem.iVpnTableId ); - - - proxies->WriteLongTextL( TPtrC(PROXY_SERVER_NAME), - *aVpnApItem.iProxyServerAddress ); - - proxies->WriteTextL( TPtrC(PROXY_PROTOCOL_NAME), - KDefProxyProtocolName ); - - proxies->WriteUintL( TPtrC(PROXY_PORT_NUMBER), - aVpnApItem.iProxyPort ); - - TBool useproxy( EFalse ); - if ( ( aVpnApItem.iProxyPort ) - || ( aVpnApItem.iProxyServerAddress->Compare( KEmpty ) != 0 ) ) - { - useproxy = ETrue; - } - - proxies->WriteBoolL( TPtrC(PROXY_USE_PROXY_SERVER), - useproxy ); - - /* - not used, skipped - proxies->WriteLongTextL( TPtrC(PROXY_EXCEPTIONS), - *aApItem.iApProxyExceptions ); - */ - proxies->WriteLongTextL( TPtrC(PROXY_EXCEPTIONS), - KEmpty ); - - User::LeaveIfError( proxies->PutRecordChanges( EFalse, EFalse ) ); - - CleanupStack::PopAndDestroy( proxies ); // proxies - - CLOG( ( EHandler, 1, _L( "<- CVpnApEngine::WriteProxyDataL" ) ) ); - } - - - -// --------------------------------------------------------- -// CVpnApEngine::ReadProxyDataL -// --------------------------------------------------------- -// -void CVpnApEngine::ReadProxyDataL( CVpnApItem& aVpnApItem ) - { - // internal function, caller MUST initiate a transaction, WE WILL NOT. - CLOG( ( EHandler, 0, _L( "-> CVpnApEngine::ReadProxyDataL" ) ) ); - - CCommsDbTableView* proxies; - proxies = iDb->OpenViewMatchingTextLC( TPtrC(PROXIES), - TPtrC(PROXY_SERVICE_TYPE), - TPtrC(VPN_SERVICE) ); - TInt err = proxies->GotoFirstRecord(); - if ( err != KErrNotFound ) - { - User::LeaveIfError( err ); - } - if ( err != KErrNotFound ) - { - // check if it is our proxy... - // Add test cases covering this route - TUint32 uval; - TBool found( EFalse ); - do - { - // Add test cases covering this route - proxies->ReadUintL( TPtrC(PROXY_ISP), uval ); - if ( uval == aVpnApItem.iVpnTableId ) - { - found = ETrue; - } - else - { - err = proxies->GotoNextRecord(); - } - } while ( (!err) && (!found) ); - if ( found ) - { // it is our proxy record, use it - HBufC* buf = ApCommons::ReadLongTextLC( proxies, - TPtrC(PROXY_SERVER_NAME), - err ); - if ( err != KErrUnknown ) - { - aVpnApItem.WriteLongTextL( EApVpnProxyServerAddress, *buf ); - } - - CleanupStack::PopAndDestroy( buf ); // buf - - TUint32 tempint; - - ApCommons::ReadUintL( proxies, TPtrC(PROXY_PORT_NUMBER), tempint ); - aVpnApItem.WriteUint( EApVpnProxyPortNumber, tempint ); - - /* - buf = ApCommons::ReadLongTextLC( proxies, - TPtrC(PROXY_EXCEPTIONS), - err ); - aVpnApItem.WriteLongTextL( EApProxyExceptions, *buf ); - CleanupStack::PopAndDestroy( buf ); // buf - */ - } - } - CleanupStack::PopAndDestroy( proxies ); // proxies - - CLOG( ( EHandler, 1, _L( "<- CVpnApEngine::ReadProxyDataL" ) ) ); - } - - - - -// --------------------------------------------------------- -// CVpnApEngine::RemoveVpnProxyDataL -// --------------------------------------------------------- -// -void CVpnApEngine::RemoveVpnProxyDataL( TUint32 aIspId ) - { - // internal function, caller MUST initiate a transaction, WE WILL NOT. - CLOG( ( EHandler, 0, _L( "-> CVpnApEngine::RemoveProxyDataL" ) ) ); - - // Add test cases covering all this functions routes - - CCommsDbTableView* proxies; - proxies = iDb->OpenViewMatchingTextLC( TPtrC(PROXIES), - TPtrC(PROXY_SERVICE_TYPE), - TPtrC(VPN_SERVICE) ); - TInt err = proxies->GotoFirstRecord(); - if ( err == KErrNone ) - { // now get OUR proxy record - TUint32 uval; - TBool found( EFalse ); - do - { - // Add test cases covering this route - proxies->ReadUintL( TPtrC(PROXY_ISP), uval ); - if ( uval == aIspId ) - { - found = ETrue; - } - else - { - err = proxies->GotoNextRecord(); - } - } while ( (!err) && (!found) ); - if ( found ) - { - User::LeaveIfError( proxies->DeleteRecord() ); - } - else - { - // silently ignore KErrNotFound. It is caused by incorrect DB, - // we are 'repairing it' this way. - if ( err != KErrNotFound ) - { - User::LeaveIfError( err ); - } - } - } - else - { - // silently ignore KErrNotFound. It is caused by incorrect DB, - // we are 'repairing it' this way. - if ( err != KErrNotFound ) - { - User::LeaveIfError( err ); - } - } - CleanupStack::PopAndDestroy( proxies ); // proxies - - CLOG( ( EHandler, 1, _L( "<- CVpnApEngine::RemoveProxyDataL" ) ) ); - } - - - -// --------------------------------------------------------- -// CVpnApEngine::DoDeleteVpnL -// --------------------------------------------------------- -// -void CVpnApEngine::DoDeleteVpnL( TUint32 aUid ) - { - CLOG( ( EHandler, 0, _L( "-> CVpnApEngine::DoDeleteVpnL" ) ) ); - - // when deleting, need to delete: - // homenetwork - // VPN_TABLE record - // IAP's VPN record - // WAP's VPN record - // IP_BEARER's record - // proxy record - - // first make sure that the given AP is not in use - CApUtils* utils = CApUtils::NewLC( *iDb ); - if ( utils->IsAPInUseL( aUid ) ) - { - User::Leave( KErrInUse ); - } - CleanupStack::PopAndDestroy( utils ); // utils - - CCommsDbTableView* wapt; - wapt = iDb->OpenViewMatchingUintLC( TPtrC(WAP_ACCESS_POINT), - TPtrC(COMMDB_ID), aUid ); - User::LeaveIfError( wapt->GotoFirstRecord() ); - HBufC* buf = HBufC::NewLC( KCommsDbSvrMaxFieldLength ); - TPtr ptr( buf->Des() ); - wapt->ReadTextL( TPtrC(WAP_CURRENT_BEARER), - ptr ); // see declaration for comments! - - if ( *buf == TPtrC(WAP_IP_BEARER) ) - { - // get serviceType - CCommsDbTableView* bearert; - bearert = iDb->OpenViewMatchingUintLC( TPtrC(WAP_IP_BEARER), - TPtrC(WAP_ACCESS_POINT_ID), - aUid ); - - User::LeaveIfError( bearert->GotoFirstRecord() ); - - TUint32 ipbearerid; - ApCommons::ReadUintL( bearert, TPtrC(COMMDB_ID), ipbearerid ); - - TUint32 iapid; - ApCommons::ReadUintL( bearert, TPtrC(WAP_IAP), iapid ); - - CCommsDbTableView* iapt; - iapt = iDb->OpenViewMatchingUintLC( TPtrC(IAP), TPtrC(COMMDB_ID), - iapid ); - - User::LeaveIfError( iapt->GotoFirstRecord() ); - HBufC* servicetype = HBufC::NewLC( KCommsDbSvrMaxFieldLength ); - TPtr servptr( servicetype->Des() ); - iapt->ReadTextL( TPtrC(IAP_SERVICE_TYPE), servptr ); - TUint32 ispid; - iapt->ReadUintL( TPtrC(IAP_SERVICE), ispid ); - TUint32 networkid; - iapt->ReadUintL( TPtrC(IAP_NETWORK), networkid ); - - RemoveNetworkDataL( networkid ); - - if ( *servicetype == TPtrC(VPN_SERVICE) ) - { - RemoveRecordL( TPtrC(VPN_SERVICE), ispid ); - RemoveRecordL( TPtrC(IAP), iapid ); - } - else - { // what to do if none of them??? - User::Leave( KErrInvalidBearer ); - } - RemoveVpnProxyDataL( ispid ); - RemoveRecordL( TPtrC(WAP_IP_BEARER), ipbearerid ); - // servicetype, iapt, bearert - CleanupStack::PopAndDestroy( 3, bearert ); - } - else - { // sms, - User::Leave( KErrInvalidBearerType ); - } - - RemoveRecordL( TPtrC(WAP_ACCESS_POINT), aUid ); - - CleanupStack::PopAndDestroy( 2, wapt ); // buf, wapt - - CLOG( ( EHandler, 1, _L( "<- CVpnApEngine::DoDeleteVpnL" ) ) ); - } - - - -// --------------------------------------------------------- -// CVpnApEngine::RemoveRecordL -// --------------------------------------------------------- -// -void CVpnApEngine::RemoveRecordL( const TDesC& aTable, TUint32 aUid ) - { - CLOG( ( EHandler, 0, _L( "-> CVpnApEngine::RemoveRecordL" ) ) ); - - CCommsDbTableView* t = iDb->OpenViewMatchingUintLC( - aTable, - TPtrC(COMMDB_ID), - aUid ); - TInt res = t->GotoFirstRecord(); // OK. - if ( res == KErrNone ) - { // exists, delete it - User::LeaveIfError( t->DeleteRecord() ); - } - else - { - // silently ignore KErrNotFound. It is caused by incorrect DB, - // we are 'repairing it' this way. - if ( res != KErrNotFound ) - { - User::Leave( res ); - } - } - CleanupStack::PopAndDestroy( t ); // t - - CLOG( ( EHandler, 1, _L( "<- CVpnApEngine::RemoveRecordL" ) ) ); - } - - - - - -// --------------------------------------------------------- -// CVpnApEngine::WriteNetworkDataL -// --------------------------------------------------------- -// -void CVpnApEngine::WriteNetworkDataL( TBool aIsNew, - CVpnApItem& aVpnApItem ) - { - CLOG( ( EHandler, 0, _L( "-> CVpnApEngine::WriteNetworkDataL" ) ) ); - - if ( aVpnApItem.iVpnIapNetwork == 0 ) - { - CCommsDbTableView* networks; - HBufC* buf = HBufC::NewLC( KApEngineMaxSql ); - if ( aIsNew ) - { - networks = iDb->OpenTableLC( TPtrC(NETWORK) ); - TUint32 netId; - User::LeaveIfError( networks->InsertRecord( netId ) ); - aVpnApItem.iVpnIapNetwork = netId; - } - else - { - networks = iDb->OpenViewMatchingUintLC( - TPtrC(NETWORK), TPtrC(COMMDB_ID), - aVpnApItem.iVpnIapNetwork ); - - TInt err = networks->GotoFirstRecord(); - if ( err == KErrNotFound ) - { // originally there were NO network, but now it is added - TUint32 netId; - User::LeaveIfError( networks->InsertRecord( netId ) ); - aVpnApItem.iVpnIapNetwork = netId; - } - else - { - User::LeaveIfError( networks->UpdateRecord() ); - } - } - networks->WriteTextL( TPtrC(COMMDB_NAME), *aVpnApItem.iName ); - - User::LeaveIfError( networks->PutRecordChanges( EFalse, EFalse ) ); - - CleanupStack::PopAndDestroy( networks ); // networks - CleanupStack::PopAndDestroy( buf ); // buf - } - - CLOG( ( EHandler, 1, _L( "<- CVpnApEngine::WriteNetworkDataL" ) ) ); - } - - -// --------------------------------------------------------- -// CVpnApEngine::ReadNetworkDataL -// --------------------------------------------------------- -// -void CVpnApEngine::ReadNetworkDataL( CVpnApItem& aVpnApItem ) - { - // internal function, caller MUST initiate a transaction, WE WILL NOT. - CLOG( ( EHandler, 0, _L( "-> CVpnApEngine::ReadNetworkDataL" ) ) ); - - CCommsDbTableView* networks; - networks = iDb->OpenViewMatchingUintLC( TPtrC(NETWORK), - TPtrC(COMMDB_ID), - aVpnApItem.iVpnIapNetwork ); - - TInt err = networks->GotoFirstRecord(); - - if ( err != KErrNotFound ) - { - User::LeaveIfError( err ); - } - if ( err != KErrNotFound ) - { - HBufC* buf = ApCommons::ReadText16ValueLC( networks, - TPtrC(COMMDB_NAME) ); - if ( err != KErrUnknown ) - { - aVpnApItem.WriteTextL( EApVpnIapNetworkName, *buf ); - } - - CleanupStack::PopAndDestroy( buf ); // buf - } - else - { // not found, set to NONE - aVpnApItem.WriteTextL( EApVpnIapNetworkName, KEmpty ); - } - CleanupStack::PopAndDestroy( networks ); // networks - - CLOG( ( EHandler, 1, _L( "<- CVpnApEngine::ReadNetworkDataL" ) ) ); - } - - - -// --------------------------------------------------------- -// CVpnApEngine::RemoveNetworkDataL -// --------------------------------------------------------- -// -void CVpnApEngine::RemoveNetworkDataL( TUint32 aIspId ) - { - // internal function, caller MUST initiate a transaction, WE WILL NOT. - CLOG( ( EHandler, 0, _L( "-> CVpnApEngine::RemoveNetworkDataL" ) ) ); - - RemoveRecordL( TPtrC(NETWORK), aIspId ); - - CLOG( ( EHandler, 1, _L( "<- CVpnApEngine::RemoveNetworkDataL" ) ) ); - } - -// End of File - diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apeng/src/VpnApItem.cpp --- a/apengine/apeng/src/VpnApItem.cpp Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,680 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of the CVpnApItem class. -* -*/ - - -// INCLUDE FILES - -#include -#include -#include -#include -#include -#include - -#include "VpnApItem.h" -#include "ApEngineLogger.h" -#include "ApEngineConsts.h" -#include "ApEngineCommons.h" - - - -// CONSTANTS -const TInt KApItemInitialTxtBufSize = 0; -const TInt KVpnDefProxyPortNumber = 80; - -// DUPLCIATE as I can not touch original, but do need the file here, too... -/// ROM drive. -_LIT( KApEngineResDriveZ, "z:" ); -/// ApEngine resource file name. -_LIT( KApEngineResFileName, "ApEngine.rsc" ); - - - -// ================= MEMBER FUNCTIONS ======================= -// --------------------------------------------------------- -// CVpnApItem::NewLC -// --------------------------------------------------------- -// -EXPORT_C CVpnApItem* CVpnApItem::NewLC() - { - CLOG( ( EApItem, 0, _L( "-> CVpnApItem::NewL" ) ) ); - - CVpnApItem* self = new ( ELeave ) CVpnApItem; - CleanupStack::PushL( self ); - self->ConstructL(); - - CLOG( ( EApItem, 1, _L( "<- CVpnApItem::NewL" ) ) ); - - return self; - } - - -// --------------------------------------------------------- -// CVpnApItem::~CVpnApItem -// --------------------------------------------------------- -// -EXPORT_C CVpnApItem::~CVpnApItem() - { - CLOG( ( EApItem, 0, _L( "<-> CVpnApItem::~CVpnApItem" ) ) ); - - delete iName; - delete iPolicy; - delete iProxyServerAddress; - delete iRealIapName; - delete iPolicyId; - delete iVpnIapNetworkName; - - } - - -// --------------------------------------------------------- -// CVpnApItem::ConstructL -// --------------------------------------------------------- -// -EXPORT_C void CVpnApItem::ConstructL() - { - CLOG( ( EApItem, 0, _L( "-> CVpnApItem::ConstructL" ) ) ); - - // as we are in ConstructL called from NewLC, - // 'this' is already on the CleanupStack, - // so do not push members onto it! - iName = HBufC::NewL( KApItemInitialTxtBufSize ); - iPolicy = HBufC::NewL( KApItemInitialTxtBufSize ); - iProxyServerAddress = HBufC::NewL( KApItemInitialTxtBufSize ); - iRealIapName = HBufC::NewL( KApItemInitialTxtBufSize ); - iPolicyId = HBufC::NewL( KApItemInitialTxtBufSize ); - iVpnIapNetworkName = HBufC::NewL( KApItemInitialTxtBufSize ); - - RFs fs; - CleanupClosePushL( fs ); - User::LeaveIfError( fs.Connect() ); - - // can't use resource here because it is not added yet.... - TFileName resourceFile; - resourceFile.Append( KApEngineResDriveZ ); - resourceFile.Append( KDC_RESOURCE_FILES_DIR ); - resourceFile.Append( KApEngineResFileName ); - BaflUtils::NearestLanguageFile( fs, resourceFile ); - - RResourceFile rf; - CleanupClosePushL( rf ); - rf.OpenL( fs, resourceFile ); - rf.ConfirmSignatureL( 0 ); - HBufC8* readBuffer = rf.AllocReadLC( R_APNG_DEFAULT_VPN_AP_NAME ); - // as we are expecting HBufC16... - __ASSERT_DEBUG( ( readBuffer->Length()%2 ) == 0, - ApCommons::Panic( EWrongResourceFormat ) ); - const TPtrC16 ptrReadBuffer( (TText16*) readBuffer->Ptr(), - ( readBuffer->Length() + 1 ) >> 1 ); - HBufC16* textBuffer=HBufC16::NewL( ptrReadBuffer.Length() ); - *textBuffer=ptrReadBuffer; - CleanupStack::PopAndDestroy( readBuffer ); // readbuffer - CleanupStack::PushL( textBuffer ); - - WriteTextL( EApVpnWapAccessPointName, *textBuffer ); - - WriteUint( EApVpnProxyPortNumber, KVpnDefProxyPortNumber ); - - CleanupStack::PopAndDestroy( 3 ); // textbuffer, fs, rf - - CLOG( ( EApItem, 0, _L( "<- CVpnApItem::ConstructL" ) ) ); - - } - - -// --------------------------------------------------------- -// CVpnApItem::CVpnApItem -// --------------------------------------------------------- -// -EXPORT_C CVpnApItem::CVpnApItem() - { - CLOG( ( EApItem, 0, _L( "<-> CVpnApItem::CVpnApItem" ) ) ); - } - - - -// --------------------------------------------------------- -// CVpnApItem::CopyFromL -// --------------------------------------------------------- -// -EXPORT_C void CVpnApItem::CopyFromL( const CVpnApItem& aCopyFrom ) - { - CLOG( ( EApItem, 0, _L( "-> CVpnApItem::CopyFromL" ) ) ); - - iVpnTableId = aCopyFrom.iVpnTableId; - iVpnIapId = aCopyFrom.iVpnIapId; - iRealIapId = aCopyFrom.iRealIapId; - iVpnRealWapId = aCopyFrom.iVpnRealWapId; - iVirtualBearerID = aCopyFrom.iVirtualBearerID; - iProxyPort = aCopyFrom.iProxyPort; - iHomeNetwork = aCopyFrom.iHomeNetwork; - - WriteTextL( EApVpnWapAccessPointName, *aCopyFrom.iName ); - WriteTextL( EApVpnPolicy, *aCopyFrom.iPolicy ); - WriteLongTextL( EApVpnProxyServerAddress, *aCopyFrom.iProxyServerAddress ); - WriteTextL( EApVpnRealIapName, *aCopyFrom.iRealIapName ); - WriteTextL( EApVpnPolicyId, *aCopyFrom.iPolicyId ); - WriteTextL( EApVpnIapNetworkName, *aCopyFrom.iVpnIapNetworkName ); - - CLOG( ( EApItem, 0, _L( "<- CVpnApItem::CopyFromL" ) ) ); - } - - - - -// --------------------------------------------------------- -// CVpnApItem::operator== -// --------------------------------------------------------- -// -EXPORT_C TBool CVpnApItem::operator==( const CVpnApItem& aItem ) const - { - CLOG( ( EApItem, 0, _L( "-> CVpnApItem::operator==" ) ) ); - - TBool retval( EFalse ); - - if ( ( iVpnTableId == aItem.iVpnTableId ) && - ( iVpnIapId == aItem.iVpnIapId ) && - ( iRealIapId == aItem.iRealIapId ) && - ( iVpnRealWapId == aItem.iVpnRealWapId ) && - ( iVirtualBearerID == aItem.iVirtualBearerID ) && - ( iProxyPort == aItem.iProxyPort ) && - ( iHomeNetwork == aItem.iHomeNetwork ) - ) - { - if ( - ( iName->Compare( *aItem.iName ) == 0 ) - && ( iPolicy->Compare( *aItem.iPolicy ) == 0 ) - && ( iProxyServerAddress->Compare( - *aItem.iProxyServerAddress ) == 0 ) - && ( iRealIapName->Compare( *aItem.iRealIapName ) == 0 ) - && ( iPolicyId->Compare( *aItem.iPolicyId ) == 0 ) - && ( iVpnIapNetworkName->Compare( - *aItem.iVpnIapNetworkName ) == 0 ) - ) - { - retval = ETrue; - } - } - - CLOG( ( EApItem, 0, _L( "<- CVpnApItem::operator==" ) ) ); - - return ( retval ); - } - - -// --------------------------------------------------------- -// CVpnApItem::operator!= -// --------------------------------------------------------- -// -EXPORT_C TBool CVpnApItem::operator!=( const CVpnApItem& aItem ) const - { - CLOG( ( EApItem, 0, _L( "-> CVpnApItem::operator!=" ) ) ); - - TBool ret = ( *this == aItem ); - - CLOG( ( EApItem, 1, _L( "<- CVpnApItem::operator!=" ) ) ); - return ( !ret ); - } - - - -// --------------------------------------------------------- -// CVpnApItem::ReadTextL -// --------------------------------------------------------- -// -EXPORT_C void CVpnApItem::ReadTextL( const TVpnApMember aColumn, - TDes16& aValue ) - { - CLOG( ( EApItem, 0, _L( "-> CVpnApItem::ReadTextL" ) ) ); - - switch ( aColumn ) - { - case EApVpnWapAccessPointName: - { - aValue.SetLength( iName->Length() ); - aValue.Format( KFormat, iName ); - break; - } - case EApVpnProxyServerAddress: - { - // make it large enough to hold - aValue.SetLength( iProxyServerAddress->Length() ); - aValue.Format( KFormat, iProxyServerAddress ); - break; - } - case EApVpnPolicy: - { - aValue.SetLength( iPolicy->Length() ); - aValue.Format( KFormat, iPolicy ); - break; - } - case EApVpnRealIapName: - { - aValue.SetLength( iRealIapName->Length() ); - aValue.Format( KFormat, iRealIapName ); - break; - } - case EApVpnPolicyId: - { - aValue.SetLength( iPolicyId->Length() ); - aValue.Format( KFormat, iPolicyId ); - break; - } - case EApVpnIapNetworkName: - { - aValue.SetLength( iVpnIapNetworkName->Length() ); - aValue.Format( KFormat, iVpnIapNetworkName ); - break; - } - default: - { - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidColumn ) ); - User::Leave( KErrInvalidColumn ); - } - } - - CLOG( ( EApItem, 1, _L( "<- CVpnApItem::ReadTextL" ) ) ); - } - - - -// --------------------------------------------------------- -// CVpnApItem::ReadConstLongTextL -// --------------------------------------------------------- -// -EXPORT_C const HBufC* CVpnApItem::ReadConstLongTextL( - const TVpnApMember aColumn - ) - { - CLOG( ( EApItem, 0, _L( "-> CVpnApItem::ReadConstLongTextL" ) ) ); - - HBufC* retval = NULL; - switch ( aColumn ) - { - case EApVpnProxyServerAddress: - { - retval = iProxyServerAddress; - break; - } - default: - { - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidColumn ) ); - User::Leave( KErrInvalidColumn ); - break; - } - } - - CLOG( ( EApItem, 1, _L( "<- CVpnApItem::ReadConstLongTextL" ) ) ); - return retval; - } - - -// --------------------------------------------------------- -// CVpnApItem::ReadUint -// --------------------------------------------------------- -// -EXPORT_C TInt CVpnApItem::ReadUint( const TVpnApMember aColumn, - TUint32& aValue ) - { - CLOG( ( EApItem, 0, _L( "-> CVpnApItem::ReadUint" ) ) ); - - TInt retval ( KErrNone ); - switch ( aColumn ) - { - case EApVpnWapAccessPointID: - { - aValue = iVpnWapId; - break; - } - case EApVpnIapID: - { - aValue = iVpnIapId; - break; - } - case EApVpnRealIapID: - { - aValue = iRealIapId; - break; - } - case EApVpnRealWapID: - { - aValue = iVpnRealWapId; - break; - } - case EApVpnProxyPortNumber: - { - aValue = iProxyPort; - break; - } - case EApVpnHomeNetworkID: - { - aValue = iHomeNetwork; - break; - } - case EApVpnIapNetworkID: - { - aValue = iVpnIapNetwork; - break; - } - default : - { - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidColumn ) ); - retval = KErrInvalidColumn; - break; - } - } - - CLOG( ( EApItem, 1, _L( "<- CVpnApItem::ReadUint" ) ) ); - return retval; - } - - - -// --------------------------------------------------------- -// CVpnApItem::ReadBool -// --------------------------------------------------------- -// -EXPORT_C TInt CVpnApItem::ReadBool( const TVpnApMember /*aColumn*/, - TBool& /*aValue*/ ) - { - CLOG( ( EApItem, 0, _L( "-> CVpnApItem::ReadBool" ) ) ); - - // This is just a placeholder API for possible expansion... - - TInt retval( KErrNone ); - - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidColumn ) ); - retval = KErrInvalidColumn; - - CLOG( ( EApItem, 1, _L( "<- CVpnApItem::ReadBool" ) ) ); - return retval; - } - - - - -// --------------------------------------------------------- -// CVpnApItem::WriteTextL -// --------------------------------------------------------- -// -EXPORT_C TInt CVpnApItem::WriteTextL( const TVpnApMember aColumn, - const TDesC16& aValue ) - { - CLOG( ( EApItem, 0, _L( "-> CVpnApItem::WriteTextL" ) ) ); - - TInt retval( KErrNone ); - switch ( aColumn ) - { - case EApVpnWapAccessPointName: - { - HBufC* sgd = aValue.AllocLC(); - sgd->Des().Trim(); - ReAllocL( iName, *sgd); - CleanupStack::PopAndDestroy( sgd ); // sgd - break; - } - case EApVpnPolicy: - { - ReAllocL( iPolicy, aValue); - break; - } - case EApVpnProxyServerAddress: - { - ReAllocL( iProxyServerAddress, aValue); - break; - } - case EApVpnRealIapName: - { - ReAllocL( iRealIapName, aValue ); - break; - } - case EApVpnPolicyId: - { - ReAllocL( iPolicyId, aValue ); - break; - } - case EApVpnIapNetworkName: - { - ReAllocL( iVpnIapNetworkName, aValue ); - break; - } - default: - { - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidColumn ) ); - retval = KErrInvalidColumn; - break; - } - } - - CLOG( ( EApItem, 1, _L( "<- CVpnApItem::WriteTextL" ) ) ); - return retval; - } - - - -// --------------------------------------------------------- -// CVpnApItem::WriteLongTextL -// --------------------------------------------------------- -// -EXPORT_C TInt CVpnApItem::WriteLongTextL( const TVpnApMember aColumn, - const TDesC& aValue ) - { - CLOG( ( EApItem, 0, _L( "-> CVpnApItem::WriteLongTextL" ) ) ); - - TInt retval( KErrNone ); - switch ( aColumn ) - { - case EApVpnProxyServerAddress: - { - ReAllocL( iProxyServerAddress, aValue); - break; - } - default: - { - // unknown column... - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidColumn ) ); - retval = KErrInvalidColumn; - break; - } - } - - CLOG( ( EApItem, 1, _L( "<- CVpnApItem::WriteLongTextL" ) ) ); - return retval; - } - - - -// --------------------------------------------------------- -// CVpnApItem::WriteUint -// --------------------------------------------------------- -// -EXPORT_C TInt CVpnApItem::WriteUint( const TVpnApMember aColumn, - const TUint32& aValue ) - { - CLOG( ( EApItem, 0, _L( "-> CVpnApItem::WriteUint" ) ) ); - - TInt retval( KErrNone ); - switch ( aColumn ) - { - case EApVpnWapAccessPointID: - { - iVpnWapId = aValue; - break; - } - case EApVpnIapID: - { - iVpnIapId = aValue; - break; - } - case EApVpnRealIapID: - { - iRealIapId= aValue; - break; - } - case EApVpnRealWapID: - { - iVpnRealWapId = aValue; - break; - } - case EApVpnProxyPortNumber: - { - iProxyPort = aValue; - break; - } - case EApVpnHomeNetworkID: - { - iHomeNetwork = aValue; - break; - } - case EApVpnIapNetworkID: - { - iVpnIapNetwork = aValue; - break; - } - default : - { - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidColumn ) ); - retval = KErrInvalidColumn; - } - } - - CLOG( ( EApItem, 1, _L( "<- CVpnApItem::WriteUint" ) ) ); - return retval; - } - - - -// --------------------------------------------------------- -// CVpnApItem::WriteBool -// --------------------------------------------------------- -// -EXPORT_C TInt CVpnApItem::WriteBool( const TVpnApMember /*aColumn*/, - const TBool& /*aValue*/ ) - { - CLOG( ( EApItem, 0, _L( "-> CVpnApItem::WriteBool" ) ) ); - - TInt retval( KErrNone ); - - // This is just a placeholder API for possible expansion... - - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidColumn ) ); - retval = KErrInvalidColumn; - - CLOG( ( EApItem, 1, _L( "<- CVpnApItem::WriteBool" ) ) ); - return retval; - } - - -// Query -// COMMON - -// --------------------------------------------------------- -// CVpnApItem::WapUid -// --------------------------------------------------------- -// -EXPORT_C TUint32 CVpnApItem::WapUid() const - { - CLOG( ( EApItem, 0, _L( "<-> CVpnApItem::WapUid" ) ) ); - - return iVpnWapId; - } - - -// --------------------------------------------------------- -// CVpnApItem::Name -// --------------------------------------------------------- -// -EXPORT_C const TDesC& CVpnApItem::Name() const - { - CLOG( ( EApItem, 0, _L( "<-> CVpnApItem::Name" ) ) ); - - return *iName; - } - - - -// --------------------------------------------------------- -// CVpnApItem::ReAllocL -// --------------------------------------------------------- -// -void CVpnApItem::ReAllocL(HBufC*& aDes, const TDesC16& aValue) - { - CLOG( ( EApItem, 0, _L( "-> CVpnApItem::ReAllocL" ) ) ); - - // now remove 'invalid' chars (TABs) as they cause problems - // in other places, like listboxes... - HBufC* tmp = RemoveInvalidCharsLC( aValue ); - delete aDes; - aDes = tmp; - CleanupStack::Pop( tmp ); - - CLOG( ( EApItem, 1, _L( "<- CVpnApItem::ReAllocL" ) ) ); - } - - - -// --------------------------------------------------------- -// CVpnApItem::RemoveInvalidCharsLC -// --------------------------------------------------------- -// -HBufC* CVpnApItem::RemoveInvalidCharsLC( const TDesC16& aInText ) - { - CLOG( ( EApItem, 0, _L( "-> CVpnApItem::RemoveInvalidCharsLC" ) ) ); - - TInt size = aInText.Length(); - HBufC* aOutText = HBufC::NewLC( size ); - TPtr ptr = aOutText->Des(); - - for ( TInt ii=0; ii CVpnApItem::HasProxy" ) ) ); - - TBool retval ( EFalse ); - - if ( ( iProxyServerAddress->Compare( KDynIpAddress ) - && iProxyServerAddress->Compare( KEmpty ) ) - && ( iProxyPort != 0 ) ) - { - retval = ETrue; - } - - CLOG( ( EApItem, 0, _L( "<- CVpnApItem::HasProxy" ) ) ); - - return retval; - } - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apeng/src/aplistitemlist.cpp --- a/apengine/apeng/src/aplistitemlist.cpp Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,84 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Declaration of the CApSelect class. -* -*/ - - -// INCLUDE FILES - -#include "ApListItemList.h" -#include "ApListItem.h" -#include "ApEngineLogger.h" - - -// CONSTANTS - -LOCAL_D const TInt KGranularity = 4; ///< Granularity of the list. - -// ================= MEMBER FUNCTIONS ======================= - -// C++ default constructor can NOT contain any code that -// might leave. -// -// --------------------------------------------------------- -// CApListItemList::CApListItemList -// --------------------------------------------------------- -// -EXPORT_C CApListItemList::CApListItemList() -: CArrayPtrFlat( KGranularity ) - { - } - -// Destructor -// --------------------------------------------------------- -// CApListItemList::~CApListItemList -// --------------------------------------------------------- -// -EXPORT_C CApListItemList::~CApListItemList() - { - CLOG( ( EApList, 0, _L( "-> CApListItemList::~CApListItemList" ) ) ); - - ResetAndDestroy(); - - CLOG( ( EApList, 1, _L( "<- CApListItemList::~CApListItemList" ) ) ); - } - -// --------------------------------------------------------- -// CApListItemList::ItemByUid -// --------------------------------------------------------- -// -EXPORT_C CApListItem* CApListItemList::ItemForUid( TUint32 aUid ) const - { - CLOG( ( EApList, 0, _L( "-> CApListItemList::ItemForUid" ) ) ); - - // This method cannot return "const CApListItem*", because all methods - // of CApListItem are non-const -> if the returned item was const, it - // would be unusable. - TInt i; - TInt count = Count(); - for ( i = 0; i < count; i++ ) - { - if ( At( i )->Uid() == aUid ) - { - return At( i ); - } - } - - CLOG( ( EApList, 0, _L( "-> CApListItemList::ItemForUid" ) ) ); - return NULL; - } - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apeng/src/apnetworkitemlist.cpp --- a/apengine/apeng/src/apnetworkitemlist.cpp Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,84 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Declaration of the CApNetworkItemList class. -* -*/ - - -// INCLUDE FILES - -#include "ApNetworkItemList.h" -#include "ApNetworkItem.h" -#include "ApEngineLogger.h" - - -// CONSTANTS - -LOCAL_D const TInt KGranularity = 4; ///< Granularity of the list. - -// ================= MEMBER FUNCTIONS ======================= - -// C++ default constructor can NOT contain any code that -// might leave. -// -// --------------------------------------------------------- -// CApNetworkItemList::CApNetworkItemList -// --------------------------------------------------------- -// -EXPORT_C CApNetworkItemList::CApNetworkItemList() -: CArrayPtrFlat( KGranularity ) - { - CLOG( ( ENetworks, 0, _L( "<-> CApNetworkItem::CApNetworkItemList" ) ) ); - } - -// Destructor -// --------------------------------------------------------- -// CApNetworkItemList::~CApNetworkItemList -// --------------------------------------------------------- -// -EXPORT_C CApNetworkItemList::~CApNetworkItemList() - { - CLOG( ( ENetworks, 0, _L( "-> CApNetworkItem::~CApNetworkItemList" ) ) ); - - ResetAndDestroy(); - - CLOG( ( ENetworks, 1, _L( "<- CApNetworkItem::~CApNetworkItemList" ) ) ); - } - - -// --------------------------------------------------------- -// CApNetworkItemList::ItemForUid -// --------------------------------------------------------- -// -EXPORT_C const CApNetworkItem* CApNetworkItemList::ItemForUid -( TUint32 aUid ) const - { - CLOG( ( ENetworks, 0, _L( "-> CApNetworkItem::ItemForUid" ) ) ); - - TInt i; - TInt count = Count(); - for ( i = 0; i < count; i++ ) - { - if ( At( i )->Uid() == aUid ) - { - return At( i ); - } - } - - CLOG( ( ENetworks, 1, _L( "<- CApNetworkItem::ItemForUid" ) ) ); - return NULL; - } - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/BMARM/APSETTINGSHANDLERUIU.DEF --- a/apengine/apsettingshandlerui/BMARM/APSETTINGSHANDLERUIU.DEF Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ -EXPORTS - __18CApSettingsHandleri18TSelectionListType18TSelectionMenuType @ 1 NONAME ; CApSettingsHandler::CApSettingsHandler(int, TSelectionListType, TSelectionMenuType) - ConstructL__18CApSettingsHandleriii @ 2 NONAME ; CApSettingsHandler::ConstructL(int, int, int) - E32Dll__F10TDllReason @ 3 NONAME R3UNUSED ; E32Dll(TDllReason) - NewLC__18CApSettingsHandlerR11CActiveApDbi18TSelectionListType18TSelectionMenuTypeiii @ 4 NONAME ; CApSettingsHandler::NewLC(CActiveApDb &, int, TSelectionListType, TSelectionMenuType, int, int, int) - NewLC__18CApSettingsHandleri18TSelectionListType18TSelectionMenuTypeiii @ 5 NONAME ; CApSettingsHandler::NewLC(int, TSelectionListType, TSelectionMenuType, int, int, int) - RunSettingsL__18CApSettingsHandlerUlRUl @ 6 NONAME R3UNUSED ; CApSettingsHandler::RunSettingsL(unsigned long, unsigned long &) - RunViewerL__18CApSettingsHandlerUl @ 7 NONAME R3UNUSED ; CApSettingsHandler::RunViewerL(unsigned long) - SetFilterL__18CApSettingsHandleriii @ 8 NONAME ; CApSettingsHandler::SetFilterL(int, int, int) - SetTextOverrideL__18CApSettingsHandler7TTextIDRC7TDesC16 @ 9 NONAME R3UNUSED ; CApSettingsHandler::SetTextOverrideL(TTextID, TDesC16 const &) - TextOverrideL__18CApSettingsHandler7TTextID @ 10 NONAME R3UNUSED ; CApSettingsHandler::TextOverrideL(TTextID) - "_._18CApSettingsHandler" @ 11 NONAME R3UNUSED ; CApSettingsHandler::~CApSettingsHandler(void) - ConstructL__18CApSettingsHandlerR11CActiveApDbiii @ 12 NONAME ; CApSettingsHandler::ConstructL(CActiveApDb &, int, int, int) - Cvt__18CApSettingsHandler @ 13 NONAME R3UNUSED ; CApSettingsHandler::Cvt(void) - NewLC__18CApSettingsHandlerR11CActiveApDbi18TSelectionListType18TSelectionMenuTypeiiii @ 14 NONAME ; CApSettingsHandler::NewLC(CActiveApDb &, int, TSelectionListType, TSelectionMenuType, int, int, int, int) - NewLC__18CApSettingsHandleri18TSelectionListType18TSelectionMenuTypeiiii @ 15 NONAME ; CApSettingsHandler::NewLC(int, TSelectionListType, TSelectionMenuType, int, int, int, int) - ConstructL__18CApSettingsHandlerR11CActiveApDbiii14TVpnFilterType @ 16 NONAME ; CApSettingsHandler::ConstructL(CActiveApDb &, int, int, int, TVpnFilterType) - ConstructL__18CApSettingsHandleriii14TVpnFilterType @ 17 NONAME ; CApSettingsHandler::ConstructL(int, int, int, TVpnFilterType) - NewLC__18CApSettingsHandlerR11CActiveApDbi18TSelectionListType18TSelectionMenuTypeiiii14TVpnFilterType @ 18 NONAME ; CApSettingsHandler::NewLC(CActiveApDb &, int, TSelectionListType, TSelectionMenuType, int, int, int, int, TVpnFilterType) - NewLC__18CApSettingsHandleri18TSelectionListType18TSelectionMenuTypeiiii14TVpnFilterType @ 19 NONAME ; CApSettingsHandler::NewLC(int, TSelectionListType, TSelectionMenuType, int, int, int, int, TVpnFilterType) - diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/BMARM/ApSettingsHandlerUI_EKA2U.def --- a/apengine/apsettingshandlerui/BMARM/ApSettingsHandlerUI_EKA2U.def Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ -EXPORTS - __18CApSettingsHandleri18TSelectionListType18TSelectionMenuType @ 1 NONAME ; CApSettingsHandler::CApSettingsHandler(int, TSelectionListType, TSelectionMenuType) - ConstructL__18CApSettingsHandlerR11CActiveApDbiii14TVpnFilterType @ 2 NONAME ; CApSettingsHandler::ConstructL(CActiveApDb &, int, int, int, TVpnFilterType) - ConstructL__18CApSettingsHandleriii @ 3 NONAME ; CApSettingsHandler::ConstructL(int, int, int) - ConstructL__18CApSettingsHandleriii14TVpnFilterType @ 4 NONAME ; CApSettingsHandler::ConstructL(int, int, int, TVpnFilterType) - Cvt__18CApSettingsHandler @ 5 NONAME R3UNUSED ; CApSettingsHandler::Cvt(void) - NewLC__18CApSettingsHandlerR11CActiveApDbi18TSelectionListType18TSelectionMenuTypeiii @ 6 NONAME ; CApSettingsHandler::NewLC(CActiveApDb &, int, TSelectionListType, TSelectionMenuType, int, int, int) - NewLC__18CApSettingsHandlerR11CActiveApDbi18TSelectionListType18TSelectionMenuTypeiiii @ 7 NONAME ; CApSettingsHandler::NewLC(CActiveApDb &, int, TSelectionListType, TSelectionMenuType, int, int, int, int) - NewLC__18CApSettingsHandlerR11CActiveApDbi18TSelectionListType18TSelectionMenuTypeiiii14TVpnFilterType @ 8 NONAME ; CApSettingsHandler::NewLC(CActiveApDb &, int, TSelectionListType, TSelectionMenuType, int, int, int, int, TVpnFilterType) - NewLC__18CApSettingsHandleri18TSelectionListType18TSelectionMenuTypeiii @ 9 NONAME ; CApSettingsHandler::NewLC(int, TSelectionListType, TSelectionMenuType, int, int, int) - NewLC__18CApSettingsHandleri18TSelectionListType18TSelectionMenuTypeiiii @ 10 NONAME ; CApSettingsHandler::NewLC(int, TSelectionListType, TSelectionMenuType, int, int, int, int) - NewLC__18CApSettingsHandleri18TSelectionListType18TSelectionMenuTypeiiii14TVpnFilterType @ 11 NONAME ; CApSettingsHandler::NewLC(int, TSelectionListType, TSelectionMenuType, int, int, int, int, TVpnFilterType) - RunSettingsL__18CApSettingsHandlerUlRUl @ 12 NONAME R3UNUSED ; CApSettingsHandler::RunSettingsL(unsigned long, unsigned long &) - RunViewerL__18CApSettingsHandlerUl @ 13 NONAME R3UNUSED ; CApSettingsHandler::RunViewerL(unsigned long) - SetFilterL__18CApSettingsHandleriii @ 14 NONAME ; CApSettingsHandler::SetFilterL(int, int, int) - SetTextOverrideL__18CApSettingsHandler7TTextIDRC7TDesC16 @ 15 NONAME R3UNUSED ; CApSettingsHandler::SetTextOverrideL(TTextID, TDesC16 const &) - TextOverrideL__18CApSettingsHandler7TTextID @ 16 NONAME R3UNUSED ; CApSettingsHandler::TextOverrideL(TTextID) - "_._18CApSettingsHandler" @ 17 NONAME R3UNUSED ; CApSettingsHandler::~CApSettingsHandler(void) - ConstructL__18CApSettingsHandlerR11CActiveApDbiii @ 18 NONAME ; CApSettingsHandler::ConstructL(CActiveApDb &, int, int, int) - diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/BWINS/APSETTINGSHANDLERUIU.DEF --- a/apengine/apsettingshandlerui/BWINS/APSETTINGSHANDLERUIU.DEF Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ -EXPORTS - ??0CApSettingsHandler@@IAE@HW4TSelectionListType@@W4TSelectionMenuType@@@Z @ 1 NONAME ; protected: __thiscall CApSettingsHandler::CApSettingsHandler(int,enum TSelectionListType,enum TSelectionMenuType) - ??1CApSettingsHandler@@UAE@XZ @ 2 NONAME ; public: virtual __thiscall CApSettingsHandler::~CApSettingsHandler(void) - ?ConstructL@CApSettingsHandler@@IAEXHHH@Z @ 3 NONAME ; protected: void __thiscall CApSettingsHandler::ConstructL(int,int,int) - ?E32Dll@@YAHW4TDllReason@@@Z @ 4 NONAME ; int __cdecl E32Dll(enum TDllReason) - ?NewLC@CApSettingsHandler@@SAPAV1@HW4TSelectionListType@@W4TSelectionMenuType@@HHH@Z @ 5 NONAME ; public: static class CApSettingsHandler * __cdecl CApSettingsHandler::NewLC(int,enum TSelectionListType,enum TSelectionMenuType,int,int,int) - ?RunSettingsL@CApSettingsHandler@@QAEHKAAK@Z @ 6 NONAME ; public: int __thiscall CApSettingsHandler::RunSettingsL(unsigned long,unsigned long &) - ?RunViewerL@CApSettingsHandler@@IAEHK@Z @ 7 NONAME ; protected: int __thiscall CApSettingsHandler::RunViewerL(unsigned long) - ?SetFilterL@CApSettingsHandler@@QAEXHHH@Z @ 8 NONAME ; public: void __thiscall CApSettingsHandler::SetFilterL(int,int,int) - ?SetTextOverrideL@CApSettingsHandler@@QAEXW4TTextID@@ABVTDesC16@@@Z @ 9 NONAME ; public: void __thiscall CApSettingsHandler::SetTextOverrideL(enum TTextID,class TDesC16 const &) - ?TextOverrideL@CApSettingsHandler@@QAEABVTDesC16@@W4TTextID@@@Z @ 10 NONAME ; public: class TDesC16 const & __thiscall CApSettingsHandler::TextOverrideL(enum TTextID) - ?ConstructL@CApSettingsHandler@@IAEXAAVCActiveApDb@@HHH@Z @ 11 NONAME ; protected: void __thiscall CApSettingsHandler::ConstructL(class CActiveApDb &,int,int,int) - ?NewLC@CApSettingsHandler@@SAPAV1@AAVCActiveApDb@@HW4TSelectionListType@@W4TSelectionMenuType@@HHH@Z @ 12 NONAME ; public: static class CApSettingsHandler * __cdecl CApSettingsHandler::NewLC(class CActiveApDb &,int,enum TSelectionListType,enum TSelectionMenuType,int,int,int) - ?Cvt@CApSettingsHandler@@SAHXZ @ 13 NONAME ; public: static int __cdecl CApSettingsHandler::Cvt(void) - ?NewLC@CApSettingsHandler@@SAPAV1@AAVCActiveApDb@@HW4TSelectionListType@@W4TSelectionMenuType@@HHHH@Z @ 14 NONAME ; public: static class CApSettingsHandler * __cdecl CApSettingsHandler::NewLC(class CActiveApDb &,int,enum TSelectionListType,enum TSelectionMenuType,int,int,int,int) - ?NewLC@CApSettingsHandler@@SAPAV1@HW4TSelectionListType@@W4TSelectionMenuType@@HHHH@Z @ 15 NONAME ; public: static class CApSettingsHandler * __cdecl CApSettingsHandler::NewLC(int,enum TSelectionListType,enum TSelectionMenuType,int,int,int,int) - ?ConstructL@CApSettingsHandler@@IAEXAAVCActiveApDb@@HHHW4TVpnFilterType@@@Z @ 16 NONAME ; protected: void __thiscall CApSettingsHandler::ConstructL(class CActiveApDb &,int,int,int,enum TVpnFilterType) - ?ConstructL@CApSettingsHandler@@IAEXHHHW4TVpnFilterType@@@Z @ 17 NONAME ; protected: void __thiscall CApSettingsHandler::ConstructL(int,int,int,enum TVpnFilterType) - ?NewLC@CApSettingsHandler@@SAPAV1@AAVCActiveApDb@@HW4TSelectionListType@@W4TSelectionMenuType@@HHHHW4TVpnFilterType@@@Z @ 18 NONAME ; public: static class CApSettingsHandler * __cdecl CApSettingsHandler::NewLC(class CActiveApDb &,int,enum TSelectionListType,enum TSelectionMenuType,int,int,int,int,enum TVpnFilterType) - ?NewLC@CApSettingsHandler@@SAPAV1@HW4TSelectionListType@@W4TSelectionMenuType@@HHHHW4TVpnFilterType@@@Z @ 19 NONAME ; public: static class CApSettingsHandler * __cdecl CApSettingsHandler::NewLC(int,enum TSelectionListType,enum TSelectionMenuType,int,int,int,int,enum TVpnFilterType) - diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/BWinsCw/APSETTINGSHANDLERUIU.DEF --- a/apengine/apsettingshandlerui/BWinsCw/APSETTINGSHANDLERUIU.DEF Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ -EXPORTS - ??0CApSettingsHandler@@IAE@HW4TSelectionListType@@W4TSelectionMenuType@@@Z @ 1 NONAME ; CApSettingsHandler::CApSettingsHandler(int, enum TSelectionListType, enum TSelectionMenuType) - ??1CApSettingsHandler@@UAE@XZ @ 2 NONAME ; CApSettingsHandler::~CApSettingsHandler(void) - ?ConstructL@CApSettingsHandler@@IAEXAAVCActiveApDb@@HHH@Z @ 3 NONAME ; void CApSettingsHandler::ConstructL(class CActiveApDb &, int, int, int) - ?ConstructL@CApSettingsHandler@@IAEXAAVCActiveApDb@@HHHW4TVpnFilterType@@@Z @ 4 NONAME ; void CApSettingsHandler::ConstructL(class CActiveApDb &, int, int, int, enum TVpnFilterType) - ?ConstructL@CApSettingsHandler@@IAEXHHH@Z @ 5 NONAME ; void CApSettingsHandler::ConstructL(int, int, int) - ?ConstructL@CApSettingsHandler@@IAEXHHHW4TVpnFilterType@@@Z @ 6 NONAME ; void CApSettingsHandler::ConstructL(int, int, int, enum TVpnFilterType) - ?Cvt@CApSettingsHandler@@SAHXZ @ 7 NONAME ; int CApSettingsHandler::Cvt(void) - ?E32Dll@@YAHW4TDllReason@@@Z @ 8 NONAME ; int E32Dll(enum TDllReason) - ?NewLC@CApSettingsHandler@@SAPAV1@AAVCActiveApDb@@HW4TSelectionListType@@W4TSelectionMenuType@@HHH@Z @ 9 NONAME ; class CApSettingsHandler * CApSettingsHandler::NewLC(class CActiveApDb &, int, enum TSelectionListType, enum TSelectionMenuType, int, int, int) - ?NewLC@CApSettingsHandler@@SAPAV1@AAVCActiveApDb@@HW4TSelectionListType@@W4TSelectionMenuType@@HHHH@Z @ 10 NONAME ; class CApSettingsHandler * CApSettingsHandler::NewLC(class CActiveApDb &, int, enum TSelectionListType, enum TSelectionMenuType, int, int, int, int) - ?NewLC@CApSettingsHandler@@SAPAV1@AAVCActiveApDb@@HW4TSelectionListType@@W4TSelectionMenuType@@HHHHW4TVpnFilterType@@@Z @ 11 NONAME ; class CApSettingsHandler * CApSettingsHandler::NewLC(class CActiveApDb &, int, enum TSelectionListType, enum TSelectionMenuType, int, int, int, int, enum TVpnFilterType) - ?NewLC@CApSettingsHandler@@SAPAV1@HW4TSelectionListType@@W4TSelectionMenuType@@HHH@Z @ 12 NONAME ; class CApSettingsHandler * CApSettingsHandler::NewLC(int, enum TSelectionListType, enum TSelectionMenuType, int, int, int) - ?NewLC@CApSettingsHandler@@SAPAV1@HW4TSelectionListType@@W4TSelectionMenuType@@HHHH@Z @ 13 NONAME ; class CApSettingsHandler * CApSettingsHandler::NewLC(int, enum TSelectionListType, enum TSelectionMenuType, int, int, int, int) - ?NewLC@CApSettingsHandler@@SAPAV1@HW4TSelectionListType@@W4TSelectionMenuType@@HHHHW4TVpnFilterType@@@Z @ 14 NONAME ; class CApSettingsHandler * CApSettingsHandler::NewLC(int, enum TSelectionListType, enum TSelectionMenuType, int, int, int, int, enum TVpnFilterType) - ?RunSettingsL@CApSettingsHandler@@QAEHKAAK@Z @ 15 NONAME ; int CApSettingsHandler::RunSettingsL(unsigned long, unsigned long &) - ?RunViewerL@CApSettingsHandler@@IAEHK@Z @ 16 NONAME ; int CApSettingsHandler::RunViewerL(unsigned long) - ?SetFilterL@CApSettingsHandler@@QAEXHHH@Z @ 17 NONAME ; void CApSettingsHandler::SetFilterL(int, int, int) - ?SetTextOverrideL@CApSettingsHandler@@QAEXW4TTextID@@ABVTDesC16@@@Z @ 18 NONAME ; void CApSettingsHandler::SetTextOverrideL(enum TTextID, class TDesC16 const &) - ?TextOverrideL@CApSettingsHandler@@QAEABVTDesC16@@W4TTextID@@@Z @ 19 NONAME ; class TDesC16 const & CApSettingsHandler::TextOverrideL(enum TTextID) - diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/BWinsCw/ApSettingsHandlerUI_EKA2U.def --- a/apengine/apsettingshandlerui/BWinsCw/ApSettingsHandlerUI_EKA2U.def Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ -EXPORTS - ??0CApSettingsHandler@@IAE@HW4TSelectionListType@@W4TSelectionMenuType@@@Z @ 1 NONAME ; CApSettingsHandler::CApSettingsHandler(int, enum TSelectionListType, enum TSelectionMenuType) - ??1CApSettingsHandler@@UAE@XZ @ 2 NONAME ; CApSettingsHandler::~CApSettingsHandler(void) - ?ConstructL@CApSettingsHandler@@IAEXAAVCActiveApDb@@HHH@Z @ 3 NONAME ; void CApSettingsHandler::ConstructL(class CActiveApDb &, int, int, int) - ?ConstructL@CApSettingsHandler@@IAEXAAVCActiveApDb@@HHHW4TVpnFilterType@@@Z @ 4 NONAME ; void CApSettingsHandler::ConstructL(class CActiveApDb &, int, int, int, enum TVpnFilterType) - ?ConstructL@CApSettingsHandler@@IAEXHHH@Z @ 5 NONAME ; void CApSettingsHandler::ConstructL(int, int, int) - ?ConstructL@CApSettingsHandler@@IAEXHHHW4TVpnFilterType@@@Z @ 6 NONAME ; void CApSettingsHandler::ConstructL(int, int, int, enum TVpnFilterType) - ?Cvt@CApSettingsHandler@@SAHXZ @ 7 NONAME ; int CApSettingsHandler::Cvt(void) - ?NewLC@CApSettingsHandler@@SAPAV1@AAVCActiveApDb@@HW4TSelectionListType@@W4TSelectionMenuType@@HHH@Z @ 8 NONAME ; class CApSettingsHandler * CApSettingsHandler::NewLC(class CActiveApDb &, int, enum TSelectionListType, enum TSelectionMenuType, int, int, int) - ?NewLC@CApSettingsHandler@@SAPAV1@AAVCActiveApDb@@HW4TSelectionListType@@W4TSelectionMenuType@@HHHH@Z @ 9 NONAME ; class CApSettingsHandler * CApSettingsHandler::NewLC(class CActiveApDb &, int, enum TSelectionListType, enum TSelectionMenuType, int, int, int, int) - ?NewLC@CApSettingsHandler@@SAPAV1@AAVCActiveApDb@@HW4TSelectionListType@@W4TSelectionMenuType@@HHHHW4TVpnFilterType@@@Z @ 10 NONAME ; class CApSettingsHandler * CApSettingsHandler::NewLC(class CActiveApDb &, int, enum TSelectionListType, enum TSelectionMenuType, int, int, int, int, enum TVpnFilterType) - ?NewLC@CApSettingsHandler@@SAPAV1@HW4TSelectionListType@@W4TSelectionMenuType@@HHH@Z @ 11 NONAME ; class CApSettingsHandler * CApSettingsHandler::NewLC(int, enum TSelectionListType, enum TSelectionMenuType, int, int, int) - ?NewLC@CApSettingsHandler@@SAPAV1@HW4TSelectionListType@@W4TSelectionMenuType@@HHHH@Z @ 12 NONAME ; class CApSettingsHandler * CApSettingsHandler::NewLC(int, enum TSelectionListType, enum TSelectionMenuType, int, int, int, int) - ?NewLC@CApSettingsHandler@@SAPAV1@HW4TSelectionListType@@W4TSelectionMenuType@@HHHHW4TVpnFilterType@@@Z @ 13 NONAME ; class CApSettingsHandler * CApSettingsHandler::NewLC(int, enum TSelectionListType, enum TSelectionMenuType, int, int, int, int, enum TVpnFilterType) - ?RunSettingsL@CApSettingsHandler@@QAEHKAAK@Z @ 14 NONAME ; int CApSettingsHandler::RunSettingsL(unsigned long, unsigned long &) - ?RunViewerL@CApSettingsHandler@@IAEHK@Z @ 15 NONAME ; int CApSettingsHandler::RunViewerL(unsigned long) - ?SetFilterL@CApSettingsHandler@@QAEXHHH@Z @ 16 NONAME ; void CApSettingsHandler::SetFilterL(int, int, int) - ?SetTextOverrideL@CApSettingsHandler@@QAEXW4TTextID@@ABVTDesC16@@@Z @ 17 NONAME ; void CApSettingsHandler::SetTextOverrideL(enum TTextID, class TDesC16 const &) - ?TextOverrideL@CApSettingsHandler@@QAEABVTDesC16@@W4TTextID@@@Z @ 18 NONAME ; class TDesC16 const & CApSettingsHandler::TextOverrideL(enum TTextID) - ?ConstructL@CApSettingsHandler@@IAEXAAVCActiveApDb@@HHHW4TVpnFilterType@@H@Z @ 19 NONAME ; void CApSettingsHandler::ConstructL(class CActiveApDb &, int, int, int, enum TVpnFilterType, int) - ?NewLC@CApSettingsHandler@@SAPAV1@AAVCActiveApDb@@HW4TSelectionListType@@W4TSelectionMenuType@@HHHHW4TVpnFilterType@@H@Z @ 20 NONAME ; class CApSettingsHandler * CApSettingsHandler::NewLC(class CActiveApDb &, int, enum TSelectionListType, enum TSelectionMenuType, int, int, int, int, enum TVpnFilterType, int) - ??1CApSettingsUi@@UAE@XZ @ 21 NONAME ; CApSettingsUi::~CApSettingsUi(void) - ?ConstructL@CApSettingsUi@@IAEXHHHW4TVpnFilterType@@@Z @ 22 NONAME ; void CApSettingsUi::ConstructL(int, int, int, enum TVpnFilterType) - ?NewLC@CApSettingsUi@@SAPAV1@HW4TSelectionListType@@W4TSelectionMenuType@@HHHHW4TVpnFilterType@@@Z @ 23 NONAME ; class CApSettingsUi * CApSettingsUi::NewLC(int, enum TSelectionListType, enum TSelectionMenuType, int, int, int, int, enum TVpnFilterType) - ?RunSettingsL@CApSettingsUi@@QAEHKAAK@Z @ 24 NONAME ; int CApSettingsUi::RunSettingsL(unsigned long, unsigned long &) - diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/EABI/ApSettingsHandlerUI_EKA2U.def --- a/apengine/apsettingshandlerui/EABI/ApSettingsHandlerUI_EKA2U.def Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -EXPORTS - _ZN18CApSettingsHandler10ConstructLER11CActiveApDbiii @ 1 NONAME - _ZN18CApSettingsHandler10ConstructLER11CActiveApDbiii14TVpnFilterType @ 2 NONAME - _ZN18CApSettingsHandler10ConstructLEiii @ 3 NONAME - _ZN18CApSettingsHandler10ConstructLEiii14TVpnFilterType @ 4 NONAME - _ZN18CApSettingsHandler10RunViewerLEm @ 5 NONAME - _ZN18CApSettingsHandler10SetFilterLEiii @ 6 NONAME - _ZN18CApSettingsHandler12RunSettingsLEmRm @ 7 NONAME - _ZN18CApSettingsHandler13TextOverrideLE7TTextID @ 8 NONAME - _ZN18CApSettingsHandler16SetTextOverrideLE7TTextIDRK7TDesC16 @ 9 NONAME - _ZN18CApSettingsHandler3CvtEv @ 10 NONAME - _ZN18CApSettingsHandler5NewLCER11CActiveApDbi18TSelectionListType18TSelectionMenuTypeiii @ 11 NONAME - _ZN18CApSettingsHandler5NewLCER11CActiveApDbi18TSelectionListType18TSelectionMenuTypeiiii @ 12 NONAME - _ZN18CApSettingsHandler5NewLCER11CActiveApDbi18TSelectionListType18TSelectionMenuTypeiiii14TVpnFilterType @ 13 NONAME - _ZN18CApSettingsHandler5NewLCEi18TSelectionListType18TSelectionMenuTypeiii @ 14 NONAME - _ZN18CApSettingsHandler5NewLCEi18TSelectionListType18TSelectionMenuTypeiiii @ 15 NONAME - _ZN18CApSettingsHandler5NewLCEi18TSelectionListType18TSelectionMenuTypeiiii14TVpnFilterType @ 16 NONAME - _ZN18CApSettingsHandlerC1Ei18TSelectionListType18TSelectionMenuType @ 17 NONAME - _ZN18CApSettingsHandlerC2Ei18TSelectionListType18TSelectionMenuType @ 18 NONAME - _ZN18CApSettingsHandlerD0Ev @ 19 NONAME - _ZN18CApSettingsHandlerD1Ev @ 20 NONAME - _ZN18CApSettingsHandlerD2Ev @ 21 NONAME - _ZTI18CApSettingsHandler @ 22 NONAME ; ## - _ZTV18CApSettingsHandler @ 23 NONAME ; ## - _ZN18CApSettingsHandler10ConstructLER11CActiveApDbiii14TVpnFilterTypei @ 24 NONAME - _ZN18CApSettingsHandler5NewLCER11CActiveApDbi18TSelectionListType18TSelectionMenuTypeiiii14TVpnFilterTypei @ 25 NONAME - _ZN13CApSettingsUi10ConstructLEiii14TVpnFilterType @ 26 NONAME - _ZN13CApSettingsUi12RunSettingsLEmRm @ 27 NONAME - _ZN13CApSettingsUi5NewLCEi18TSelectionListType18TSelectionMenuTypeiiii14TVpnFilterType @ 28 NONAME - _ZN13CApSettingsUiD0Ev @ 29 NONAME - _ZN13CApSettingsUiD1Ev @ 30 NONAME - _ZN13CApSettingsUiD2Ev @ 31 NONAME - _ZTI13CApSettingsUi @ 32 NONAME ; ## - _ZTV13CApSettingsUi @ 33 NONAME ; ## - diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/Rom/ApSettingsHandlerUI.iby --- a/apengine/apsettingshandlerui/Rom/ApSettingsHandlerUI.iby Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#ifndef __APSETTINGSHANDLERUI_IBY__ -#define __APSETTINGSHANDLERUI_IBY__ - -FILE=ABI_DIR\BUILD_DIR\ApSettingsHandlerUi.dll SHARED_LIB_DIR\ApSettingsHandlerUi.dll -SCALABLE_IMAGE(APP_BITMAP_DIR,APP_BITMAP_DIR,ApSettings) - -#endif diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/Rom/ApSettingsHandlerUIResources.iby --- a/apengine/apsettingshandlerui/Rom/ApSettingsHandlerUIResources.iby Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#ifndef __APSETTINGSHANDLERUIRESOURCE_IBY__ -#define __APSETTINGSHANDLERUIRESOURCE_IBY__ - -DATA=DATAZ_\RESOURCE_FILES_DIR\ApSetUi.rsc RESOURCE_FILES_DIR\ApSetUi.rsc - -#endif diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/data/apsetui.rss --- a/apengine/apsettingshandlerui/data/apsetui.rss Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1642 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* This file contains all the resources for the ApSettings UI. -* -*/ - - -// RESOURCE IDENTIFIER -NAME ASUI // 4 letter ID - -// INCLUDES -#include - -#include -#include -#include -#include -#include -#include -#include "ApSettingsHandlerUI.hrh" -#include -#include "ApSettingsHandlerConsts.h" -#include "eikon.rsg" -//#include -#include -#include - - - -//For Ip address editor -#define IPADDRESS_MIN_FIRST_FIELD_VALUE 0 -#define IPADDRESS_MIN_SECOND_FIELD_VALUE 0 -#define IPADDRESS_MIN_THIRD_FIELD_VALUE 0 -#define IPADDRESS_MIN_FOURTH_FIELD_VALUE 0 -#define IPADDRESS_MAX_FIRST_FIELD_VALUE 255 -#define IPADDRESS_MAX_SECOND_FIELD_VALUE 255 -#define IPADDRESS_MAX_THIRD_FIELD_VALUE 255 -#define IPADDRESS_MAX_FOURTH_FIELD_VALUE 255 - -// RESOURCE DEFINITIONS - -RESOURCE RSS_SIGNATURE { } - -RESOURCE TBUF { buf="ApSettingsHandlerUI"; } - - - -//---------------------------------------------------- -// -// r_apsettingsui_select_only_menubar -// -// -//---------------------------------------------------- -// -RESOURCE MENU_BAR r_apsettingsui_select_only_menubar - { - titles= - { - MENU_TITLE { menu_pane=r_apsettingsui_menu_select_only; txt="A"; } - }; - } - -//---------------------------------------------------- -// -// r_apsettingsui_select_normal_menubar -// -// -//---------------------------------------------------- -// -RESOURCE MENU_BAR r_apsettingsui_select_normal_menubar - { - titles= - { - MENU_TITLE { menu_pane=r_apsettingsui_menu_select_normal; txt="A"; } - }; - } - - - -//---------------------------------------------------- -// -// r_apsettingsui_normal_menubar -// -// -//---------------------------------------------------- -// -RESOURCE MENU_BAR r_apsettingsui_normal_menubar - { - titles= - { - MENU_TITLE { menu_pane=r_apsettingsui_menu_normal; txt="A"; } - }; - } - - - - -//---------------------------------------------------- -// -// r_apsettings_menubar -// -// -//---------------------------------------------------- -// -RESOURCE MENU_BAR r_apsettings_menubar - { - titles= - { - MENU_TITLE { menu_pane=r_apsettings_menu; txt="A"; } - }; - } - - - -//---------------------------------------------------- -// -// r_apsettingsui_menu_select_only -// -// -//---------------------------------------------------- -// -RESOURCE MENU_PANE r_apsettingsui_menu_select_only - { - items= - { - MENU_ITEM { command=EApSelCmdSelect; txt= qtn_set_cmd_select; flags = EEikMenuItemAction; } - }; - } - - -//---------------------------------------------------- -// -// r_apsettingsui_menu_select_normal -// -// -//---------------------------------------------------- -// -RESOURCE MENU_PANE r_apsettingsui_menu_select_normal - { - items= - { - MENU_ITEM { command=EApSelCmdSelect; txt= qtn_set_cmd_select; flags = EEikMenuItemAction; }, - MENU_ITEM { command=EApSelCmdOpen; txt= qtn_set_cmd_edit_ap; flags = EEikMenuItemAction;}, - MENU_ITEM { command=EApSelCmdNewBlank; txt= qtn_set_cmd_new_ap; }, - MENU_ITEM { command=EApSelCmdDelete; txt= qtn_set_cmd_del_ap; flags = EEikMenuItemSpecific; }, - MENU_ITEM { command=EApSelCmdNewUseExisting; txt= qtn_netw_options_duplicate_iap; flags = EEikMenuItemSpecific;}, - MENU_ITEM { command=EAknCmdHelp; txt= qtn_set_options_help; }, - MENU_ITEM { command=EApSelCmdExit; txt= qtn_set_options_exit; } - }; - } - - -//---------------------------------------------------- -// -// r_apsettingsui_menu_normal -// -// -//---------------------------------------------------- -// -RESOURCE MENU_PANE r_apsettingsui_menu_normal - { - items= - { - MENU_ITEM { command=EApSelCmdOpen; txt= qtn_set_cmd_edit_ap; flags = EEikMenuItemAction;}, - MENU_ITEM { command=EApSelCmdNewBlank; txt= qtn_set_cmd_new_ap; }, - MENU_ITEM { command=EApSelCmdDelete; txt= qtn_set_cmd_del_ap; flags = EEikMenuItemSpecific;}, - MENU_ITEM { command=EApSelCmdNewUseExisting; txt= qtn_netw_options_duplicate_iap; flags = EEikMenuItemSpecific;}, - MENU_ITEM { command=EAknCmdHelp; txt= qtn_set_options_help; }, - MENU_ITEM { command=EApSelCmdExit; txt= qtn_set_options_exit; } - }; - } - - - - - -//---------------------------------------------------- -// -// r_apsettings_menu -// -// -//---------------------------------------------------- -// -RESOURCE MENU_PANE r_apsettings_menu - { - items= - { - MENU_ITEM { command=EApSelCmdChange; txt= qtn_set_options_change; flags = EEikMenuItemAction;}, - MENU_ITEM { command=EApSelCmdAdvanced; txt= qtn_set_options_ap_advanced; flags = EEikMenuItemSpecific;}, - MENU_ITEM { command=EAknCmdHelp; txt= qtn_set_options_help; }, - MENU_ITEM { command=EApSelCmdExit; txt= qtn_set_options_exit; } - }; - } - - - -//---------------------------------------------------- -// -// r_apselector_pane_softkeys_options_back_edit -// -// -//---------------------------------------------------- -// -RESOURCE CBA r_apselector_pane_softkeys_options_back_edit - { - buttons = - { - CBA_BUTTON {id=EAknSoftkeyOptions; txt = text_softkey_option;}, - CBA_BUTTON {id=EAknSoftkeyBack; txt = text_softkey_back; }, - CBA_BUTTON {id=EApSelCmdOpen; txt = qtn_msk_edit;} - }; - } - -//---------------------------------------------------- -// -// r_apselector_pane_dialog -// -// -//---------------------------------------------------- -// -RESOURCE DIALOG r_apselector_pane_dialog - { - - flags= EEikDialogFlagWait | EEikDialogFlagNoDrag | EEikDialogFlagNoTitleBar | - EEikDialogFlagFillAppClientRect | - EEikDialogFlagCbaButtons; - buttons=r_apselector_pane_softkeys_options_back_edit; - items= - { - DLG_LINE - { - type = KApSelectorListboxType; - id = KApSelectorListboxId; - control= LISTBOX { flags = EAknListBoxSelectionList; }; - } - }; - } - - -//---------------------------------------------------- -// -// r_apselector_popup_dialog -// -// -//---------------------------------------------------- -// -RESOURCE DIALOG r_apselector_popup_dialog - { - - flags=EEikDialogFlagWait | EEikDialogFlagNoDrag | EEikDialogFlagNoTitleBar | - EEikDialogFlagCbaButtons; - buttons=r_apselector_pane_softkeys_options_back_edit; - items= - { - DLG_LINE - { - type = KApSelectorListboxType; - id = KApSelectorListboxId; - control= LISTBOX { flags = EAknListBoxSelectionList; width = 60; height = 4;}; - } - }; - } - -//---------------------------------------------------- -// -// r_apsettings_softkeys_options_back_change -// -// -//---------------------------------------------------- -// -RESOURCE CBA r_apsettings_softkeys_options_back_change - { - buttons = - { - CBA_BUTTON {id=EAknSoftkeyOptions; txt = text_softkey_option;}, - CBA_BUTTON {id=EAknSoftkeyBack; txt = text_softkey_back; }, - CBA_BUTTON {id=EApSelCmdQuickChange; txt = qtn_msk_change;} - }; - } - -//---------------------------------------------------- -// -// r_apsettings_dialog -// -// -//---------------------------------------------------- -// -RESOURCE DIALOG r_apsettings_dialog - { - flags=EEikDialogFlagWait | EEikDialogFlagNoDrag | EEikDialogFlagNoTitleBar | - EEikDialogFlagFillAppClientRect | - EEikDialogFlagCbaButtons; - - buttons=r_apsettings_softkeys_options_back_change; - items= - { - DLG_LINE - { - type = EAknCtSettingListBox; - id = KApSettingsListboxId; - control= LISTBOX { flags = EEikListBoxMultipleSelection;}; - } - }; - } - - - -RESOURCE LISTBOX r_listbox_ap_settings - { - flags = EEikListBoxMultipleSelection; - } - - - - - - - -RESOURCE DIALOG r_confirmation_query - { - flags=EGeneralQueryFlags; - buttons=R_AVKON_SOFTKEYS_YES_NO__YES; - items= - { - DLG_LINE - { - type=EAknCtQuery; - id=EGeneralQuery; - control= AVKON_CONFIRMATION_QUERY - { - layout = EConfirmationLayout; - }; - } - }; - } - - -RESOURCE DIALOG r_general_note - { - flags=EEikDialogFlagNoDrag | EEikDialogFlagNoTitleBar | - EEikDialogFlagCbaButtons | EEikDialogFlagWait; - buttons=R_AVKON_SOFTKEYS_EMPTY; - items= - { - DLG_LINE - { - type=EAknCtNote; - id = EGeneralNote; - control= AVKON_NOTE - { - layout = EGeneralLayout; - singular_label = ""; - plural_label = ""; - animation = R_QGN_NOTE_INFO_ANIM; - }; - } - }; - } - - -// Ap data editor resources -// Connection name -RESOURCE EDWIN r_setting_app_edwin_conn_name - { - width=KConnNameWidth; - lines=KConnNameLines; - maxlength=KMaxConnNameLength; - allowed_input_modes = EAknEditorTextInputMode | EAknEditorNumericInputMode; - default_input_mode = EAknEditorTextInputMode; - flags= EEikEdwinAutoSelection | EEikEdwinNoLineOrParaBreaks; - } -RESOURCE AVKON_SETTING_PAGE r_text_setting_page_conn_name - { - number= EAknSettingPageNoOrdinalDisplayed; - softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK; - label= qtn_set_ap_conn_name; - type = EEikCtEdwin; - editor_resource_id = r_setting_app_edwin_conn_name; - } - - - -// GprsAccessPointName -RESOURCE EDWIN r_setting_app_edwin_gprsap_name - { - width=KGprsApNameWidth; - lines=KGprsApNameLines; - maxlength=KMaxGprsApNameLength; - allowed_input_modes = EAknEditorTextInputMode | EAknEditorNumericInputMode; - default_input_mode = EAknEditorTextInputMode; - default_case = EAknEditorLowerCase; - avkon_flags = EAknEditorFlagLatinInputModesOnly; - flags = EEikEdwinAutoSelection | EEikEdwinNoLineOrParaBreaks; - } -RESOURCE AVKON_SETTING_PAGE r_text_setting_page_gprsap_name - { - number= EAknSettingPageNoOrdinalDisplayed; - softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK; - label= qtn_set_access_point_name; - type = EEikCtEdwin; - editor_resource_id = r_setting_app_edwin_gprsap_name; - } - - - -// LoginName: -RESOURCE EDWIN r_setting_app_edwin_login_name - { - width=KLoginNameWidth; - lines=KLoginNameLines; - maxlength=KMaxLoginNameLength; - allowed_input_modes = EAknEditorTextInputMode | EAknEditorNumericInputMode; - default_input_mode = EAknEditorTextInputMode; - default_case = EAknEditorLowerCase; - flags= EEikEdwinAutoSelection | EEikEdwinNoLineOrParaBreaks; - avkon_flags=EAknEditorFlagNoT9 | EAknEditorFlagLatinInputModesOnly; - } -RESOURCE AVKON_SETTING_PAGE r_text_setting_page_login_name - { - number= EAknSettingPageNoOrdinalDisplayed; - softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK; - label= qtn_set_ap_username; - type = EEikCtEdwin; - editor_resource_id = r_setting_app_edwin_login_name; - } - - - -// StartingPage: -RESOURCE EDWIN r_setting_app_edwin_starting_page - { - width=KStartPageWidth; - lines=KStartPageLines; - maxlength=KMaxStartPageLength; - numeric_keymap=EAknEditorCalculatorNumberModeKeymap; - allowed_input_modes = EAknEditorTextInputMode | EAknEditorNumericInputMode; - default_input_mode = EAknEditorTextInputMode; - special_character_table = R_AVKON_URL_SPECIAL_CHARACTER_TABLE_DIALOG; - default_case = EAknEditorLowerCase; - flags= EEikEdwinAutoSelection | EAknEditorLowerCase | EEikEdwinNoLineOrParaBreaks; - avkon_flags=EAknEditorFlagNoT9 | EAknEditorFlagLatinInputModesOnly; - } -RESOURCE AVKON_SETTING_PAGE r_text_setting_page_starting_page - { - number= EAknSettingPageNoOrdinalDisplayed; - softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK; - label= qtn_set_starting_page; - type = EEikCtEdwin; - editor_resource_id = r_setting_app_edwin_starting_page; - } - - -// Modem init string -RESOURCE EDWIN r_setting_app_edwin_modem_init_string - { - width=KModInitStringWidth; - lines=KModInitStringLines; - maxlength=KMaxModInitStringLength; - allowed_input_modes = EAknEditorTextInputMode | EAknEditorNumericInputMode; - default_input_mode = EAknEditorTextInputMode; - avkon_flags=EAknEditorFlagNoT9 | EAknEditorFlagLatinInputModesOnly; - flags= EEikEdwinAutoSelection | EEikEdwinOnlyASCIIChars; - } -RESOURCE AVKON_SETTING_PAGE r_text_setting_page_modem_init_string - { - number= EAknSettingPageNoOrdinalDisplayed; - softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK; - label= qtn_set_modem_init_string; - type = EEikCtEdwin; - editor_resource_id = r_setting_app_edwin_modem_init_string; - } - - - - -/* -// case EApIspDefaultTelNumber: -// case EApIspIfCallbackInfo: -// case EApWapServiceCentreAddress: -*/ - - -// AccessNumber (edwin): -RESOURCE EDWIN r_setting_app_edwin_access_num - { - width=KAccessNumWidth; - lines=KAccessNumLines; - maxlength=KMaxAccessNumLength; - numeric_keymap=EAknEditorStandardNumberModeKeymap; - allowed_input_modes=EAknEditorNumericInputMode; - default_input_mode=EAknEditorNumericInputMode; - avkon_flags=EAknEditorFlagNoT9; - flags = EEikEdwinAutoSelection; - } - - -RESOURCE AVKON_SETTING_PAGE r_text_setting_page_access_num - { - number= EAknSettingPageNoOrdinalDisplayed; - softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK; - label= qtn_set_access_number; - type = EEikCtEdwin; - editor_resource_id = r_setting_app_edwin_access_num; - } - - - -// CallbackInfo: -RESOURCE EDWIN r_setting_app_edwin_cb_num - { - width = KCBInfoWidth; - lines = KCBInfoLines; - maxlength = KCBInfoLength; - numeric_keymap=EAknEditorStandardNumberModeKeymap; - allowed_input_modes = EAknEditorNumericInputMode; - default_input_mode = EAknEditorNumericInputMode; - avkon_flags = EAknEditorFlagNoT9; - flags = EEikEdwinAutoSelection; - } -RESOURCE AVKON_SETTING_PAGE r_text_setting_page_cb_num - { - number= EAknSettingPageNoOrdinalDisplayed; - softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK; - label= qtn_set_cb_number; - type = EEikCtEdwin; - editor_resource_id = r_setting_app_edwin_cb_num; - } - - - -// ServiceCentreAddress: qtn_set_server_access -RESOURCE EDWIN r_setting_app_edwin_server_access - { - width=KServiceCentreAddrWidth; - lines=KServiceCentreAddrLines; - maxlength=KMaxServiceCentreAddrLength; - numeric_keymap=EAknEditorStandardNumberModeKeymap; - allowed_input_modes=EAknEditorNumericInputMode; - default_input_mode=EAknEditorNumericInputMode; - avkon_flags=EAknEditorFlagNoT9; - flags = EEikEdwinAutoSelection; - } -RESOURCE AVKON_SETTING_PAGE r_text_setting_page_server_access - { - number= EAknSettingPageNoOrdinalDisplayed; - softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK; - label= qtn_set_server_access; - type = EEikCtEdwin; - editor_resource_id = r_setting_app_edwin_server_access; - } - - - - -// ServiceAccessNumber: qtn_set_service_access, SMS WAP Gateway -RESOURCE EDWIN r_setting_app_edwin_service_access - { - width=KServiceAccessNumWidth; - lines=KServiceAccessNumLines; - maxlength=KMaxServiceAccessNumLength; - numeric_keymap=EAknEditorStandardNumberModeKeymap; - allowed_input_modes=EAknEditorNumericInputMode; - default_input_mode=EAknEditorNumericInputMode; - avkon_flags=EAknEditorFlagNoT9; - flags = EEikEdwinAutoSelection; - } -RESOURCE AVKON_SETTING_PAGE r_text_setting_page_service_access - { - number= EAknSettingPageNoOrdinalDisplayed; - softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK; - label= qtn_set_service_access; - type = EEikCtEdwin; - editor_resource_id = r_setting_app_edwin_service_access; - } - - - -////////////////////////////////////////////////////////////////////////////// -// IPEditor -////////////////////////////////////////////////////////////////////////////// -RESOURCE IP_FIELD_EDITOR r_setting_app_ip_editor - { - min_field_values = IP_FIELD - { - first_field = 0; - second_field = 0; - third_field = 0; - fourth_field = 0; - }; - max_field_values = IP_FIELD - { - first_field = 255; - second_field = 255; - third_field = 255; - fourth_field = 255; - }; - flags = 0; - } - - -// WapGatewayAddress: -RESOURCE AVKON_SETTING_PAGE r_text_setting_page_gw_addr - { - number= EAknSettingPageNoOrdinalDisplayed; - softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK; - label= qtn_set_gateway_ip; - type = EAknCtIpFieldEditor; - editor_resource_id = r_setting_app_ip_editor; - } - - -// IspIPAddr: -RESOURCE AVKON_SETTING_PAGE r_text_setting_page_ispip_addr - { - number= EAknSettingPageNoOrdinalDisplayed; - softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK; - label= qtn_set_ip_address; - type = EAknCtIpFieldEditor; - editor_resource_id = r_setting_app_ip_editor; - } - - - -// IPNameServer1: -RESOURCE AVKON_SETTING_PAGE r_text_setting_page_name_serv1 - { - number= EAknSettingPageNoOrdinalDisplayed; - softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK; - label= qtn_set_primary_dns; - type = EAknCtIpFieldEditor; - editor_resource_id = r_setting_app_ip_editor; - } - - -// IPNameServer2: -RESOURCE AVKON_SETTING_PAGE r_text_setting_page_name_serv2 - { - number= EAknSettingPageNoOrdinalDisplayed; - softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK; - label= qtn_set_secondary_dns; - type = EAknCtIpFieldEditor; - editor_resource_id = r_setting_app_ip_editor; - } - -////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////// - - - - -// LoginScript: -RESOURCE EDWIN r_setting_app_edwin_login_script - { - width=KLoginScriptWidth; - lines=KLoginScriptLines; - maxlength=KMaxLoginScriptLength; - allowed_input_modes = EAknEditorTextInputMode | EAknEditorNumericInputMode; - default_input_mode = EAknEditorTextInputMode; - avkon_flags = EAknEditorFlagLatinInputModesOnly; - flags= EEikEdwinAutoSelection; - } -RESOURCE AVKON_SETTING_PAGE r_text_setting_page_login_script - { - number= EAknSettingPageNoOrdinalDisplayed; - softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK; - label= qtn_set_login_script; - type = EEikCtEdwin; - editor_resource_id = r_setting_app_edwin_login_script; - } - -/* -special cases - case EApIspLoginPass: -*/ - -RESOURCE SECRETED r_setting_app_edwin_login_passwd - { - num_letters=KMaxLoginPasswordLength; - } - -RESOURCE AVKON_SETTING_PAGE r_text_setting_page_login_passwd - { - number= EAknSettingPageNoOrdinalDisplayed; - softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK; - label= qtn_set_ap_passwd; - type = EEikCtSecretEd; - editor_resource_id = r_setting_app_edwin_login_passwd; - } - - - - - - -// Proxy server address: -RESOURCE EDWIN r_setting_app_edwin_proxy_server_addr - { - width=KProxyServerWidth; - lines=KProxyServerLines; - maxlength=KMaxProxyServerLength; - numeric_keymap=EAknEditorCalculatorNumberModeKeymap; - allowed_input_modes = EAknEditorTextInputMode | EAknEditorNumericInputMode; - default_input_mode = EAknEditorTextInputMode; - special_character_table = R_AVKON_URL_SPECIAL_CHARACTER_TABLE_DIALOG; - default_case = EAknEditorLowerCase; - allowed_case_modes = EAknEditorLowerCase | EAknEditorUpperCase; - avkon_flags = EAknEditorFlagLatinInputModesOnly; - flags= EEikEdwinAutoSelection | EAknEditorLowerCase | EEikEdwinNoLineOrParaBreaks; - } -RESOURCE AVKON_SETTING_PAGE r_text_setting_page_proxy_server_addr - { - number= EAknSettingPageNoOrdinalDisplayed; - softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK; - label= qtn_set_proxy_server_address; - type = EEikCtEdwin; - editor_resource_id = r_setting_app_edwin_proxy_server_addr; - } - - -// Proxy port number -RESOURCE EDWIN r_setting_app_edwin_proxy_port_number - { - width=KProxyPortNumberWidth; - lines=KProxyPortNumberLines; - maxlength=KMaxProxyPortNumberLength; - allowed_input_modes = EAknEditorNumericInputMode; - default_input_mode = EAknEditorNumericInputMode; - default_case = EAknEditorLowerCase; - flags = EEikEdwinAutoSelection | EEikEdwinNoLineOrParaBreaks; - avkon_flags = EAknEditorFlagLatinInputModesOnly; - } -RESOURCE AVKON_SETTING_PAGE r_text_setting_page_proxy_port_number - { - number= EAknSettingPageNoOrdinalDisplayed; - softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK; - label= qtn_set_proxy_port_number; - type = EEikCtEdwin; - editor_resource_id = r_setting_app_edwin_proxy_port_number; - } - - - - - - - - - - - - - - - - - - - -RESOURCE DIALOG r_list_query - { - flags=EGeneralQueryFlags; - buttons=R_AVKON_SOFTKEYS_SELECT_CANCEL__SELECT; - items= - { - - DLG_LINE - { - type = EAknCtListQueryControl; - id=EListQueryControl; - control = AVKON_LIST_QUERY_CONTROL - { - listtype = EAknCtSinglePopupMenuListBox; - listbox = LISTBOX - { - flags = EAknListBoxMenuList; - height = KListQueryHeight; - width = KListQueryWidth; - }; - heading = qtn_set_new_ap_prompt_list; - }; - } - }; - } - - - -RESOURCE LISTBOX r_setting_app_listbox - { - flags = EEikListBoxMultipleSelection; - } - - -RESOURCE AVKON_SETTING_PAGE r_radio_button_setting_page - { - number = EAknSettingPageNoOrdinalDisplayed; - softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK; - type = EAknSetListBox; - editor_resource_id= r_setting_app_listbox; - } - - - -//---------------------------------------------------- -// -// R_AVKON_SOFTKEYS_OK_CANCEL__OK -// -// -//---------------------------------------------------- -// -RESOURCE CBA r_apsettings_softkeys_ok_cancel_ok - { - buttons = - { - CBA_BUTTON {id=EAknSoftkeyOk; txt = text_softkey_ok;}, - CBA_BUTTON {id=EAknSoftkeyBack; txt = text_softkey_cancel; }, - CBA_BUTTON {id=EAknSoftkeyOk; txt = qtn_msk_select;} - }; - } - - -RESOURCE AVKON_SETTING_PAGE r_popup_list_setting_page - { - number = EAknSettingPageNoOrdinalDisplayed; - softkey_resource = r_apsettings_softkeys_ok_cancel_ok; - type = EAknSetListBox; - editor_resource_id= r_setting_app_listbox; - } - - - -// ICONARRAYS - -RESOURCE AKN_ICON_ARRAY r_setting_ap_bearer_listbox_icons - { - bmpfile = APP_BITMAP_DIR"\\ApSettings.mbm"; - icons = - { - AKN_ICON - { - iconId = EMbmApsettingsQgn_prop_wml_gprs; - maskId = EMbmApsettingsQgn_prop_wml_gprs_mask; - }, - AKN_ICON - { - iconId = EMbmApsettingsQgn_prop_wml_csd; - maskId = EMbmApsettingsQgn_prop_wml_csd_mask; - }, - AKN_ICON - { - iconId = EMbmApsettingsQgn_prop_wml_hscsd; - maskId = EMbmApsettingsQgn_prop_wml_hscsd_mask; - }, - AKN_ICON - { - iconId = EMbmApsettingsQgn_prop_wml_sms; - maskId = EMbmApsettingsQgn_prop_wml_sms_mask; - }, - AKN_ICON - { - iconId = EMbmApsettingsQgn_prop_wlan_bearer; - maskId = EMbmApsettingsQgn_prop_wlan_bearer_mask; - }, - AKN_ICON - { - iconId = EMbmApsettingsQgn_prop_wlan_easy; - maskId = EMbmApsettingsQgn_prop_wlan_easy_mask; - } - }; - } - - -RESOURCE AKN_ICON_ARRAY r_setting_ap_protected_listbox_icons - { - bmpfile = APP_BITMAP_DIR"\\ApSettings.mbm"; - icons = - { - AKN_ICON - { iconId = EMbmApsettingsQgn_indi_sett_protected_add; - maskId = EMbmApsettingsQgn_indi_sett_protected_add_mask; - } - }; - } - - - -RESOURCE TBUF r_apui_view_text_cannot_access_db - { buf = qtn_set_err_db_inaccessible; } - - - - -// wait note dialog for delete operation... -RESOURCE DIALOG r_apui_view_wait_note - { - flags = EAknWaitNoteFlags | EEikDialogFlagModeless; - items= - { - DLG_LINE - { - type = EAknCtNote; - id = EGeneralNote; - control= AVKON_NOTE - { - layout = EWaitLayout; - imagefile = AVKON_ICON_FILE; - imageid = EMbmAvkonQgn_note_erased; - imagemask = EMbmAvkonQgn_note_erased_mask; - animation = R_QGN_GRAF_WAIT_BAR_ANIM; - }; - } - }; - } - - -RESOURCE TBUF r_apui_view_deleting_ap - { buf = qtn_set_wait_deleting_ap; } - -RESOURCE TBUF r_apui_cmd_select - { buf = qtn_set_cmd_select; } - -RESOURCE TBUF r_apui_cmd_edit_ap - { buf = qtn_set_cmd_edit_ap; } - -RESOURCE TBUF r_apui_cmd_new - { buf = qtn_set_cmd_new_ap; } - -RESOURCE TBUF r_apui_cmd_new_blank - { buf = qtn_set_cmd_new_default; } - -RESOURCE TBUF r_apui_cmd_new_use_existing - { buf = qtn_set_cmd_new_existing; } - -RESOURCE TBUF r_apui_cmd_del_iap - { buf = qtn_set_cmd_del_ap; } - -RESOURCE TBUF r_apui_cmd_help - { buf = qtn_set_options_help; } - -RESOURCE TBUF r_apui_cmd_exit - { buf = qtn_set_options_exit; } - - - - - -RESOURCE TBUF r_apui_navi_ap - { buf = qtn_set_navi_ap; } - -RESOURCE TBUF r_apui_note_ap_in_use_edit - { buf = qtn_set_note_ap_in_use_edit; } -RESOURCE TBUF r_apui_note_ap_in_use_delete - { buf = qtn_set_note_ap_in_use_del; } - -RESOURCE TBUF r_apui_note_protected_ap - { buf = qtn_set_note_protected_ap; } -RESOURCE TBUF r_apui_note_protected_ap_sett - { buf = qtn_set_note_protected_ap_sett; } - -RESOURCE TBUF r_apui_note_cannot_use_protected_ap - { buf = qtn_netw_info_cannot_use_protected_ap; } - - -RESOURCE TBUF r_apui_iap_are_you_sure_to_del - { buf = qtn_query_common_conf_delete; } - -RESOURCE TBUF r_apui_iap_conf_max_speed_wcdma - { buf = qtn_set_conf_max_speed_only_3g; } - -RESOURCE TBUF r_apui_iap_del_last_ap - { buf = qtn_set_note_delete_last_ap; } -RESOURCE TBUF r_apui_iap_create_new - { buf = qtn_set_ap_create_new; } -RESOURCE TBUF r_apui_iap_delete_linked - { buf = qtn_set_ap_delete_linked; } -RESOURCE TBUF r_apui_title_access_points - { buf = qtn_set_title_access_points; } -RESOURCE TBUF r_apui_ap_access_number_not - { buf = qtn_set_ap_access_number_not; } -RESOURCE TBUF r_apui_ap_server_access_number_not - { buf = qtn_set_ap_server_access_number_not; } - -RESOURCE TBUF r_apui_options_change - { buf = qtn_set_options_change; } -RESOURCE TBUF r_apui_options_ap_advanced - { buf = qtn_set_options_ap_advanced; } - - -// TBUF resources for the setting list -RESOURCE TBUF r_apui_view_connection_name - { buf = qtn_set_ap_conn_name; } - -RESOURCE TBUF r_apui_view_bearer_type - { buf = qtn_set_ap_bearer; } - -RESOURCE TBUF r_apui_view_wtls_security - { buf = qtn_set_wtls_security; } - -RESOURCE TBUF r_apui_view_connection_type - { buf = qtn_set_conn_type; } - - -// for GPRS bearer -RESOURCE TBUF r_apui_view_ap_name - { buf = qtn_set_access_point_name; } - -RESOURCE TBUF r_apui_view_user_name - { buf = qtn_set_ap_username; } - -RESOURCE TBUF r_apui_view_prompt_password - { buf = qtn_set_prompt_passwd; } - -RESOURCE TBUF r_apui_view_password - { buf = qtn_set_ap_passwd; } - -RESOURCE TBUF r_apui_view_password_auth - { buf = qtn_set_passwd_aut; } - -RESOURCE TBUF r_apui_view_wap_gw_ip_addr - { buf = qtn_set_gateway_ip; } - -RESOURCE TBUF r_apui_view_starting_page - { buf = qtn_set_starting_page; } - - - -// for GPRS Advanced -RESOURCE TBUF r_apui_view_phone_ip_addr - { buf = qtn_set_ip_address; } - -RESOURCE TBUF r_apui_view_primary_name_server - { buf = qtn_set_primary_dns; } - -RESOURCE TBUF r_apui_view_secondary_name_server - { buf = qtn_set_secondary_dns; } - - - -// for CSD -RESOURCE TBUF r_apui_view_access_number - { buf = qtn_set_access_number; } - -RESOURCE TBUF r_apui_view_data_call_type - { buf = qtn_set_data_call_type; } - -RESOURCE TBUF r_apui_view_max_conn_speed - { buf = qtn_set_max_speed; } - - -// for CSD Advanced -RESOURCE TBUF r_apui_view_use_call_back - { buf = qtn_set_use_cb; } - -RESOURCE TBUF r_apui_view_call_back_type - { buf = qtn_set_cb_type; } - -RESOURCE TBUF r_apui_view_call_back_number - { buf = qtn_set_cb_number; } - -RESOURCE TBUF r_apui_view_enable_ppp_comp - { buf = qtn_set_ppp_comp; } - -RESOURCE TBUF r_apui_view_use_login_script - { buf = qtn_set_use_logins; } - -RESOURCE TBUF r_apui_view_login_script - { buf = qtn_set_login_script; } - -RESOURCE TBUF r_apui_view_modem_init_string - { buf = qtn_set_modem_init_string; } - - -// for SMS -RESOURCE TBUF r_apui_view_server_access_number - { buf = qtn_set_server_access; } - -RESOURCE TBUF r_apui_view_service_access_number - { buf = qtn_set_service_access; } - - - - - -// 'Textual' but fixed values for settings -RESOURCE TBUF r_apui_view_bearer_type_gprs - { buf = qtn_set_bearer_packet_data; } - -RESOURCE TBUF r_apui_view_bearer_type_csd - { buf = qtn_set_bearer_data_call; } - -RESOURCE TBUF r_apui_view_bearer_type_hscsd - { buf = qtn_netw_sett_bearer_hscsd; } - -RESOURCE TBUF r_apui_view_bearer_type_sms - { buf = qtn_set_bearer_sms; } - - -RESOURCE TBUF r_apui_view_prompt_passwd_yes - { buf = qtn_set_prompt_passwd_yes; } - -RESOURCE TBUF r_apui_view_prompt_passwd_no - { buf = qtn_set_prompt_passwd_no; } - -RESOURCE TBUF r_apui_view_password_auth_normal - { buf = qtn_set_passwd_aut_normal; } - -RESOURCE TBUF r_apui_view_password_auth_secure - { buf = qtn_set_passwd_aut_secure; } - -RESOURCE TBUF r_apui_view_ip_addr_dynamic - { buf = qtn_set_ip_address_dynamic; } - -RESOURCE TBUF r_apui_view_wtls_security_on - { buf = qtn_set_wtls_security_on; } - -RESOURCE TBUF r_apui_view_wtls_security_off - { buf = qtn_set_wtls_security_off; } - - - -RESOURCE TBUF r_apui_view_conn_type_contin - { buf = qtn_set_conn_type_contin; } - -RESOURCE TBUF r_apui_view_conn_type_temp - { buf = qtn_set_conn_type_temp; } - -RESOURCE TBUF r_apui_view_datacall_analolgue - { buf = qtn_set_data_call_analolgue; } - -RESOURCE TBUF r_apui_view_datacall_isdn_110 - { buf = qtn_set_data_call_isdn_110; } - -RESOURCE TBUF r_apui_view_datacall_isdn_120 - { buf = qtn_set_data_call_isdn_120; } - -RESOURCE TBUF r_apui_view_speed_autodetect { buf = qtn_set_speed_auto_detect;} -RESOURCE TBUF r_apui_view_speed_9600 { buf = "9600"; } -RESOURCE TBUF r_apui_view_speed_14400 { buf = "14400"; } -RESOURCE TBUF r_apui_view_speed_19200 { buf = "19200"; } -RESOURCE TBUF r_apui_view_speed_28800 { buf = "28800"; } -RESOURCE TBUF r_apui_view_speed_38400 { buf = "38400"; } -RESOURCE TBUF r_apui_view_speed_43200 { buf = "43200"; } -RESOURCE TBUF r_apui_view_speed_56000 { buf = "56000"; } - - -RESOURCE TBUF r_apui_view_use_cb_yes { buf = qtn_set_use_cb_yes; } -RESOURCE TBUF r_apui_view_use_cb_no { buf = qtn_set_use_cb_no; } - - -RESOURCE TBUF r_apui_view_cb_use_server_number - { buf = qtn_set_use_server_number; } - -RESOURCE TBUF r_apui_view_cb_use_other_number - { buf = qtn_set_use_other_number; } - - -RESOURCE TBUF r_apui_view_ppp_comp_yes { buf = qtn_set_ppp_comp_yes; } -RESOURCE TBUF r_apui_view_ppp_comp_no { buf = qtn_set_ppp_comp_no; } - -RESOURCE TBUF r_apui_view_use_logins_no { buf = qtn_set_use_logins_no; } -RESOURCE TBUF r_apui_view_use_logins_yes { buf = qtn_set_use_logins_yes; } - -RESOURCE TBUF r_apui_view_term_win_yes { buf = qtn_set_term_win_yes; } -RESOURCE TBUF r_apui_view_term_win_no { buf = qtn_set_term_win_no; } - -RESOURCE TBUF r_apui_view_new_ap_prompt_list - { buf = qtn_set_new_ap_prompt_list; } - -RESOURCE TBUF r_apui_view_default_ap { buf = qtn_set_default_ap; } - -RESOURCE TBUF r_apui_view_saved { buf = qtn_set_ap_saved; } - -RESOURCE TBUF r_apui_view_wap_start_page_default { buf = "http://"; } - -RESOURCE TBUF r_apui_iap_name_already_exists - { buf = qtn_fldr_name_already_used; } - -RESOURCE TBUF r_apui_view_compulsory { buf = qtn_set_compulsory; } - -RESOURCE TBUF r_apui_view_ap_none - { buf = qtn_mce_settings_mms_none; } - -RESOURCE TBUF r_apui_view_invalid_number - { buf = qtn_info_invalid_number; } - -RESOURCE TBUF r_apui_view_invalid_conn_name - { buf = qtn_info_invalid_conn_name; } - - -RESOURCE TBUF r_apui_sett_val_field_none - { buf = qtn_selec_sett_val_field_none; } - - - - - -RESOURCE TBUF r_apui_view_proxy_server_addr { buf = qtn_set_proxy_server_address; } - -RESOURCE TBUF r_apui_view_proxy_port_number { buf = qtn_set_proxy_port_number; } - - -RESOURCE TBUF r_apui_view_network_group { buf = qtn_set_network_group; } - - -RESOURCE TBUF r_apui_sett_home_page_none { buf = qtn_set_home_page_none; } - - - - -RESOURCE TBUF r_apui_view_pdp_type { buf = qtn_set_network_type; } - -RESOURCE TBUF r_apui_view_pdp_type_ipv4 { buf = qtn_set_nw_type_ipv4; } - -RESOURCE TBUF r_apui_view_pdp_type_ipv6 { buf = qtn_set_nw_type_ipv6; } - -RESOURCE TBUF r_apui_view_ipv4_settings { buf = qtn_set_ipv4_settings; } - -RESOURCE TBUF r_apui_view_ipv6_settings { buf = qtn_set_ipv6_settings; } - -RESOURCE TBUF r_apui_view_set_dns_servers_ip { buf = qtn_set_dns_servers_ip; } - -RESOURCE TBUF r_apui_view_set_info_invalid_ip { buf = qtn_set_info_invalid_ip; } - -RESOURCE TBUF r_apui_view_set_ip_user_defined { buf = qtn_set_ip_user_defined; } - -RESOURCE TBUF r_apui_view_set_ip_well_known { buf = qtn_set_ip_well_known; } - - -RESOURCE TBUF r_apui_note_vpn_ap_sett { buf = qtn_set_note_vpn_ap_sett; } - - -RESOURCE TBUF r_apui_iap_del_iap_associated - { buf = qtn_vpn_quest_delete_iap_associated; } - - - -// WLAN strings & resources - -RESOURCE TBUF r_apui_view_bearer_type_wlan - { buf = qtn_wlan_sett_bearer_wlan; } - -RESOURCE TBUF r_apui_view_wlan_network_name - { buf = qtn_wlan_sett_network_name ; } - - -RESOURCE TBUF r_apui_view_wlan_network_mode - { buf = qtn_wlan_sett_network_mode ; } - - -RESOURCE TBUF r_apui_view_wlan_security_mode - { buf = qtn_wlan_sett_security_mode ; } - - -RESOURCE TBUF r_apui_view_wlan_security_settings - { buf = qtn_wlan_sett_security_settings ; } - - -RESOURCE TBUF r_apui_view_wlan_network_mode_infra - { buf = qtn_wlan_sett_network_mode_infra ; } - - -RESOURCE TBUF r_apui_view_wlan_network_mode_adhoc - { buf = qtn_wlan_sett_network_mode_adhoc ; } - - -RESOURCE TBUF r_apui_view_wlan_security_mode_open - { buf = qtn_wlan_sett_security_mode_open ; } - - -RESOURCE TBUF r_apui_view_wlan_security_mode_wep - { buf = qtn_wlan_sett_security_mode_wep ; } - - -RESOURCE TBUF r_apui_view_wlan_security_mode_802_1x - { buf = qtn_wlan_sett_security_mode_802_1x ; } - - -RESOURCE TBUF r_apui_view_wlan_security_mode_wpa - { buf = qtn_wlan_sett_security_mode_wpa ; } - - -RESOURCE TBUF r_apui_view_wlan_network_name_user - { buf = qtn_wlan_sett_network_name_user_defined ; } - - -RESOURCE TBUF r_apui_view_wlan_network_name_scan - { buf = qtn_wlan_sett_network_name_scan ; } - - -RESOURCE TBUF r_apui_ap_wlan_name_not_defined - { buf = qtn_wlan_quest_nw_name_not_defined; } - - -RESOURCE TBUF r_apui_netmask - { buf = qtn_netw_sett_subnet_mask; } - - -RESOURCE TBUF r_apui_ip_gateway - { buf = qtn_netw_sett_default_gateway; } - - -RESOURCE TBUF r_apui_view_wlan_hidden_network - { buf = qtn_wlan_sett_hidden_network; } - -RESOURCE TBUF r_apui_view_hidden_network_yes - { buf = qtn_wlan_sett_hidden_network_yes; } - -RESOURCE TBUF r_apui_view_hidden_network_no - { buf = qtn_wlan_sett_hidden_network_no; } - -RESOURCE TBUF r_apui_view_netw_quest_iap_incomplete_delete - { buf = qtn_netw_quest_iap_incomplete_delete; } - - -RESOURCE TBUF r_apui_view_ad_hoc - { buf = qtn_wlan_sett_adhoc_channel; } - -RESOURCE TBUF r_apui_view_ad_hoc_prmpt - { buf = qtn_wlan_prmpt_adhoc_channel; } - -RESOURCE TBUF r_apui_view_ad_hoc_channel_auto - { buf = qtn_wlan_sett_adhoc_channel_automatic; } - -RESOURCE TBUF r_apui_view_ad_hoc_channel_user_defined - { buf = qtn_wlan_sett_adhoc_channel_user_defined; } - -RESOURCE TBUF r_apui_ap_wlan_sec_sett_empty - { buf = qtn_wlan_quest_security_settings_empty; } - - -RESOURCE TBUF r_apui_view_avkon_compulsory - { buf = qtn_selec_setting_compulsory; } - - -RESOURCE TBUF r_apui_view_no_iap_defined_info - { buf = qtn_netw_info_no_iap_defined; } - -//---------------------------------------------------- -// -// r_apsettingsui_select_network_menubar -// -// -//---------------------------------------------------- -// -RESOURCE MENU_BAR r_apsettingsui_select_network_menubar - { - titles= - { - MENU_TITLE { menu_pane=r_apsettingsui_menu_network; txt="A"; } - }; - } - - -//---------------------------------------------------- -// -// r_apsettingsui_menu_network -// -// -//---------------------------------------------------- -// -RESOURCE MENU_PANE r_apsettingsui_menu_network - { - items= - { - MENU_ITEM { command=EApSelCmdSelect; txt= qtn_set_cmd_select; }, - MENU_ITEM { command=EApSelCmdNew; txt= qtn_set_cmd_new_netw_group;}, - MENU_ITEM { command=EApSelCmdDelete; txt= qtn_set_cmd_del_ap; }, - MENU_ITEM { command=EAknCmdHelp; txt= qtn_set_options_help; }, - MENU_ITEM { command=EApSelCmdExit; txt= qtn_set_options_exit; } - }; - } - -RESOURCE AVKON_SETTING_PAGE r_popup_list_network_setting_page - { - number = EAknSettingPageNoOrdinalDisplayed; - softkey_resource = R_AVKON_SOFTKEYS_OPTIONS_BACK__SELECT; - menubar = r_apsettingsui_select_network_menubar; - type = EAknSetListBox; - editor_resource_id= r_setting_app_listbox; - } - - - - - - -// Network name editor resources -// Network name -RESOURCE EDWIN r_setting_app_edwin_netw_name - { - width=KNetworkNameWidth; - lines=KNetworkNameLines; - maxlength=KMaxNetworkNameLength; - allowed_input_modes = EAknEditorTextInputMode | EAknEditorNumericInputMode; - default_input_mode = EAknEditorTextInputMode; - flags= EEikEdwinAutoSelection | EEikEdwinNoLineOrParaBreaks; - } -RESOURCE AVKON_SETTING_PAGE r_text_setting_page_netw_name - { - number= EAknSettingPageNoOrdinalDisplayed; - softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK; - label= qtn_set_ap_netw_name; - type = EEikCtEdwin; - editor_resource_id = r_setting_app_edwin_netw_name; - } - - - - - - -RESOURCE DIALOG r_dnsip4_query - { - flags=EGeneralQueryFlags; - buttons=R_AVKON_SOFTKEYS_OK_CANCEL__OK; - items= - { - DLG_LINE - { - type=EAknExtCtMultilineQuery; - id=EMultilineFirstLine; - control = AVKON_DATA_QUERY - { - layout = EMultiDataFirstIpEd; - label = qtn_set_primary_dns; - control = IP_FIELD_EDITOR - { - min_field_values = IP_FIELD - { - first_field = IPADDRESS_MIN_FIRST_FIELD_VALUE; - second_field = IPADDRESS_MIN_SECOND_FIELD_VALUE; - third_field = IPADDRESS_MIN_THIRD_FIELD_VALUE; - fourth_field = IPADDRESS_MIN_FOURTH_FIELD_VALUE; - }; - max_field_values = IP_FIELD - { - first_field = IPADDRESS_MAX_FIRST_FIELD_VALUE; - second_field = IPADDRESS_MAX_SECOND_FIELD_VALUE; - third_field = IPADDRESS_MAX_THIRD_FIELD_VALUE; - fourth_field = IPADDRESS_MAX_FOURTH_FIELD_VALUE; - }; - flags = 0; - }; - }; - }, - DLG_LINE - { - type = EAknExtCtMultilineQuery; - id = EMultilineSecondLine; - control = AVKON_DATA_QUERY - { - layout = EMultiDataSecondIpEd; - label = qtn_set_secondary_dns; - control = IP_FIELD_EDITOR - { - min_field_values = IP_FIELD - { - first_field = IPADDRESS_MIN_FIRST_FIELD_VALUE; - second_field = IPADDRESS_MIN_SECOND_FIELD_VALUE; - third_field = IPADDRESS_MIN_THIRD_FIELD_VALUE; - fourth_field = IPADDRESS_MIN_FOURTH_FIELD_VALUE; - }; - max_field_values = IP_FIELD - { - first_field = IPADDRESS_MAX_FIRST_FIELD_VALUE; - second_field = IPADDRESS_MAX_SECOND_FIELD_VALUE; - third_field = IPADDRESS_MAX_THIRD_FIELD_VALUE; - fourth_field = IPADDRESS_MAX_FOURTH_FIELD_VALUE; - }; - flags = 0; - }; - }; - } - }; - } - - - - - -RESOURCE DIALOG r_dnsip6_query - { - flags=EGeneralQueryFlags; - buttons=R_AVKON_SOFTKEYS_OK_CANCEL__OK; - items= - { - DLG_LINE - { - type=EAknCtMultilineQuery; - id=EMultilineFirstLine; - control = AVKON_DATA_QUERY - { - layout = EMultiDataFirstEdwin; - label = qtn_set_primary_dns; - control = EDWIN - { - avkon_flags = EAknEditorFlagLatinInputModesOnly; - flags=0; - width=16; - lines=1; - maxlength=KMaxIPv6NameServerLength; - }; - }; - }, - DLG_LINE - { - type=EAknCtMultilineQuery; - id=EMultilineSecondLine; - control= AVKON_DATA_QUERY - { - layout = EMultiDataSecondEdwin; - label = qtn_set_secondary_dns; - control=EDWIN - { - avkon_flags = EAknEditorFlagLatinInputModesOnly; - flags= 0; - width=16; - lines=1; - maxlength=KMaxIPv6NameServerLength; - }; - }; - } - }; - } - - - - -RESOURCE TBUF r_apui_view_new_ap_user_name_none - { buf = qtn_set_ap_username_none; } - -RESOURCE TBUF r_apui_view_new_ap_proxy_server_addr_none - { buf = qtn_set_proxy_server_address_none; } - -RESOURCE TBUF r_apui_view_new_ap_cb_number_none - { buf = qtn_set_cb_number_none; } - -RESOURCE TBUF r_apui_view_new_ap_login_script_none - { buf = qtn_set_login_script_none; } - -RESOURCE TBUF r_apui_view_new_ap_modem_init_none - { buf = qtn_set_modem_init_none; } - -RESOURCE TBUF r_apui_view_new_ap_dns_servers_automatic - { buf = qtn_set_dns_servers_automatic ; } - -RESOURCE TBUF r_apui_view_new_ap_dns_server_automatic - { buf = qtn_set_dns_server_automatic; } - -RESOURCE TBUF r_apui_view_no_security_settings - { buf = qtn_wlan_info_no_security_settings; } - - - - -// EApIspIPNetMask: -RESOURCE AVKON_SETTING_PAGE r_text_setting_page_isp_net_mask - { - number= EAknSettingPageNoOrdinalDisplayed; - softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK; - label= qtn_netw_sett_subnet_mask; - type = EAknCtIpFieldEditor; - editor_resource_id = r_setting_app_ip_editor; - } - - -// EApIspIPGateway: -RESOURCE AVKON_SETTING_PAGE r_text_setting_page_isp_gateway - { - number= EAknSettingPageNoOrdinalDisplayed; - softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK; - label= qtn_netw_sett_default_gateway; - type = EAknCtIpFieldEditor; - editor_resource_id = r_setting_app_ip_editor; - } - - - -RESOURCE DIALOG r_apui_wlan_name_query - { - flags = EGeneralQueryFlags; - buttons = R_AVKON_SOFTKEYS_OK_CANCEL__OK; - items = - { - DLG_LINE - { - type = EAknCtQuery; - id = EGeneralQuery; - control = AVKON_DATA_QUERY - { - layout = EDataLayout; - label = qtn_wlan_prmpt_network_name; - control = EDWIN - { - maxlength = KMaxWlanNetworkameLength; - flags = EEikEdwinNoWrap; - }; - }; - } - }; - } - - - - -RESOURCE DIALOG r_apui_wlan_adhoc_channel_query - { - flags = EGeneralQueryFlags; - buttons = R_AVKON_SOFTKEYS_OK_CANCEL__OK; - items = - { - DLG_LINE - { - type = EAknCtQuery; - id = EGeneralQuery; - control = AVKON_DATA_QUERY - { - layout = ENumberLayout; - label = qtn_wlan_prmpt_adhoc_channel; - control = AVKON_INTEGER_EDWIN - { - maxlength = KMaxAdhocChannelNumberLength; - min = KAdhocChannelMin; - max = KAdhocChannelMax; - }; - }; - } - }; - } - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/group/ApSettingsHandlerUiCvt.mmp --- a/apengine/apsettingshandlerui/group/ApSettingsHandlerUiCvt.mmp Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project specification for Accesspoint UI -* Component Validation Test. -* -* -*/ - - -#include - -TARGET ApSettingsHandlerUICvt.exe -TARGETTYPE exe - -SOURCEPATH ../tsrc - -SOURCE ApSettingsHandlerUICvt.cpp - -// Component specific internal headers -USERINCLUDE ../inc - -// ADO-SUBSYSTEM specific internal headers -SYSTEMINCLUDE ../../inc - -// ADO specific internal headers -SYSTEMINCLUDE ../../../inc - -//Macro to /epoc32 headers -MW_LAYER_SYSTEMINCLUDE - -LIBRARY ApSettingsHandlerUI.lib -LIBRARY euser.lib diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/group/Apsettingshandlerui.mmp --- a/apengine/apsettingshandlerui/group/Apsettingshandlerui.mmp Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,156 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* This is project specification file for the ApSettingsHandler. -* -*/ - - -#include -#include - - -TARGET ApSettingsHandlerUI.dll -TARGETTYPE DLL -UID 0x1000008d 0x10008d3B - -CAPABILITY CAP_GENERAL_DLL - -VENDORID VID_DEFAULT - - -SOURCEPATH ../src -SOURCE apsettingshandleruiImpl.cpp -SOURCE apsettingsui.cpp -SOURCE apsettingshandlerui.cpp -SOURCE ApSelQueryDialog.cpp -SOURCE TextOverrides.cpp -SOURCE ApSelectorDialog.cpp -SOURCE ApSelectorListBox.cpp -SOURCE ApSelectorListBoxModel.cpp -SOURCE ApSettingsModel.cpp -SOURCE ApSettingsCommons.cpp -SOURCE ApSettingsDlg.cpp -SOURCE ApSelPopupList.cpp -SOURCE apsettingsdeleteoperation.cpp -SOURCE AccessPointTextSettingPage.cpp -SOURCE ApNetSelPopupList.cpp -SOURCE ApNetSelectorListBoxModel.cpp -SOURCE FeatureManagerWrapper.cpp -SOURCE ApMultiLineDataQueryDialog.cpp - - -START RESOURCE ../data/apsetui.rss -HEADER -TARGETPATH RESOURCE_FILES_DIR -LANGUAGE_IDS - -END // RESOURCE - -// Component specific internal headers -USERINCLUDE ../inc - -// ADO specific internal headers -SYSTEMINCLUDE ../../../inc - -//Macro to /epoc32 headers -MW_LAYER_SYSTEMINCLUDE - -#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS -APP_LAYER_SYSTEMINCLUDE -#endif - -LIBRARY euser.lib -LIBRARY cone.lib -LIBRARY eikcore.lib -LIBRARY eikcoctl.lib -LIBRARY avkon.lib -LIBRARY eikdlg.lib -LIBRARY bafl.lib -LIBRARY eikctl.lib -LIBRARY apengine.lib -LIBRARY commonengine.lib -LIBRARY diskspacereserver.lib -LIBRARY commdb.lib -LIBRARY insock.lib -LIBRARY sysutil.lib -LIBRARY commonui.lib -LIBRARY FeatMgr.lib -LIBRARY AknInputLanguage.lib - -LIBRARY ConnectionUiUtilities.lib -LIBRARY centralrepository.lib - - -#if defined(ARMCC) - DEFFILE ../EABI/ApSettingsHandlerUI_EKA2.def -#elif defined( WINSCW ) - DEFFILE ../BWinsCw/ApSettingsHandlerUI_EKA2.def -#elif defined( WINS ) - DEFFILE ../BWins/ApSettingsHandlerUI_EKA2.def -#else - DEFFILE ../BMarm/ApSettingsHandlerUI_EKA2.def -#endif - - -#ifdef __SERIES60_HELP - LIBRARY hlplch.lib // for "Help" options menu -#endif // __SERIES60_HELP - - -LIBRARY efsrv.lib -LIBRARY AknSkins.lib -LIBRARY charconv.lib - - -// Define this macro if you wish to enable IPv6 support for testing -// It will override FeatureManager's NOT SUPPORTED.... -// MACRO __TEST_IPV6_SUPPORT - -// Define this macro if you wish to disable HsCSD support for testing -// It will override shared datakey setting.... -// MACRO __TEST_NO_HSCSD - - -// Define this to test CSD support. -// MACRO __TEST_CSD_SUPPORT - - -// Define this to test HSCSD support. -// MACRO __TEST_HSCSD_SUPPORT - -// Define this to test CDMA write-protect support. -//MACRO __TEST_CDMA_WRITE_PROTECT - -// Define this to test WLAN support. -//#define __TEST_WLAN_SUPPORT_ENABLED - -// Define this to use logging. -// #define __TEST_LOGGING_ENABLED - - -#ifdef __TEST_LOGGING_ENABLED - MACRO __TEST_LOGGING - LIBRARY flogger.lib -#endif - -// Define this to test LAN support. -#ifdef WINS - MACRO __TEST_LAN_BEARER -#endif - -#ifdef __TEST_WLAN_SUPPORT_ENABLED - MACRO __TEST_WLAN_SUPPORT -#endif // __TEST_WLAN_SUPPORT -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/group/apsettingshandleruiicons.mk --- a/apengine/apsettingshandlerui/group/apsettingshandleruiicons.mk Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,75 +0,0 @@ -# -# Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# - -ifeq (WINS,$(findstring WINS, $(PLATFORM))) -ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\Z -else -ZDIR=\epoc32\data\z -endif - -# ---------------------------------------------------------------------------- -# Configure these -# ---------------------------------------------------------------------------- - -TARGETDIR=$(ZDIR)\SYSTEM\Data -HEADERDIR=\epoc32\include -ICONTARGETFILENAME=$(TARGETDIR)\apsettings.mif -HEADERFILENAME=$(HEADERDIR)\apsettings.mbg - -do_nothing : - @rem do_nothing - -MAKMAKE : do_nothing - -BLD : do_nothing - -CLEAN : do_nothing - -LIB : do_nothing - -CLEANLIB : do_nothing - -# ---------------------------------------------------------------------------- -# Configure these. -# -# NOTE 1: DO NOT DEFINE MASK FILE NAMES! They are included automatically by -# MifConv if the mask detph is defined. -# -# NOTE 2: Usually, source paths should not be included in the bitmap -# definitions. MifConv searches for the icons in all icon directories in a -# predefined order, which is currently \s60\icons, \s60\bitmaps2. -# The directory \s60\icons is included in the search only if the feature flag -# __SCALABLE_ICONS is defined. -# ---------------------------------------------------------------------------- - -RESOURCE : - mifconv $(ICONTARGETFILENAME) /h$(HEADERFILENAME) \ - /c8,1 qgn_prop_wml_gprs.bmp \ - /c8,1 qgn_prop_wml_csd.bmp \ - /c8,1 qgn_prop_wml_hscsd.bmp \ - /c8,1 qgn_prop_wml_sms.bmp \ - /c8,1 qgn_prop_wlan_bearer.bmp \ - /c8,1 qgn_prop_wlan_easy.bmp \ - /c8,1 qgn_indi_sett_protected_add.bmp -FREEZE : do_nothing - -SAVESPACE : do_nothing - -RELEASABLES : - @echo $(HEADERFILENAME)&& \ - @echo $(ICONTARGETFILENAME) - -FINAL : do_nothing diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/group/apsettingshandleruiicons_dc.mk --- a/apengine/apsettingshandlerui/group/apsettingshandleruiicons_dc.mk Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,72 +0,0 @@ -# -# Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: Makefile for icons of ApSettingsHandlerUi -# - -ifeq (WINS,$(findstring WINS, $(PLATFORM))) -ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\Z -else -ZDIR=\epoc32\data\z -endif - - -TARGETDIR=$(ZDIR)\resource\apps -ICONTARGETFILENAME=$(TARGETDIR)\apsettings.mif - -HEADERDIR=\epoc32\include -HEADERFILENAME=$(HEADERDIR)\apsettings.mbg - -do_nothing : - @rem do_nothing - -MAKMAKE : do_nothing - -BLD : do_nothing - -CLEAN : do_nothing - -LIB : do_nothing - -CLEANLIB : do_nothing - -# ---------------------------------------------------------------------------- -# NOTE 1: DO NOT DEFINE MASK FILE NAMES! They are included automatically by -# MifConv if the mask detph is defined. -# -# NOTE 2: Usually, source paths should not be included in the bitmap -# definitions. MifConv searches for the icons in all icon directories in a -# predefined order, which is currently \s60\icons, \s60\bitmaps2, \s60\bitmaps. -# The directory \s60\icons is included in the search only if the feature flag -# __SCALABLE_ICONS is defined. -# ---------------------------------------------------------------------------- - -RESOURCE : - mifconv $(ICONTARGETFILENAME) /h$(HEADERFILENAME) \ - /c8,1 qgn_prop_wml_gprs.bmp \ - /c8,1 qgn_prop_wml_csd.bmp \ - /c8,1 qgn_prop_wml_hscsd.bmp \ - /c8,1 qgn_prop_wml_sms.bmp \ - /c8,1 qgn_prop_wlan_bearer.bmp \ - /c8,1 qgn_prop_wlan_easy.bmp \ - /c8,1 qgn_indi_sett_protected_add.bmp - -FREEZE : do_nothing - -SAVESPACE : do_nothing - -RELEASABLES : - @echo $(HEADERFILENAME)&& \ - @echo $(ICONTARGETFILENAME) - -FINAL : do_nothing diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/group/bld.inf --- a/apengine/apsettingshandlerui/group/bld.inf Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,56 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* This file provides the information required for building the -* whole of a ApSettingsUI. -* -*/ - - -#include - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS -// export iby files -../Rom/ApSettingsHandlerUI.iby CORE_MW_LAYER_IBY_EXPORT_PATH(ApSettingsHandlerUI.iby) -../Rom/ApSettingsHandlerUIResources.iby LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(ApSettingsHandlerUIResources.iby) - -// export localised loc file -../loc/apsettingshandlerui.loc MW_LAYER_LOC_EXPORT_PATH(apsettingshandlerui.loc) - -PRJ_MMPFILES -// gnumakefile apsettingshandleruiicons_dc.mk - -./Apsettingshandlerui.mmp - - -PRJ_TESTMMPFILES - -PRJ_EXTENSIONS - -START EXTENSION s60/mifconv -OPTION TARGETFILE apsettings.mif -OPTION HEADERFILE apsettings.mbg -OPTION SOURCES -c8,1 qgn_prop_wml_gprs \ - -c8,1 qgn_prop_wml_csd \ - -c8,1 qgn_prop_wml_hscsd \ - -c8,1 qgn_prop_wml_sms \ - -c8,1 qgn_prop_wlan_bearer \ - -c8,1 qgn_prop_wlan_easy \ - -c8,1 qgn_indi_sett_protected_add -END - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/inc/APSettingsHandlerUIVariant.hrh --- a/apengine/apsettingshandlerui/inc/APSettingsHandlerUIVariant.hrh Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* This file contains variation info for ApSettingsHandlerUi. -* The file can be included in C++ or resource file. -* -*/ - - -#ifndef APSETTINGSHANDLERUIVARIANT_HRH -#define APSETTINGSHANDLERUIVARIANT_HRH - -// This flag indicates whether the Wap related settings are visible -// in the Access Point Settings UI or not - -#define KWSPSettingsVisible 0x01 - - -// feature to disable editing of normal access points and allow it only for VPN -#define KApUiEditOnlyVPNs 0x02 - - -#endif // APSETTINGSHANDLERUIVARIANT_HRH - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/inc/AccessPointTextSettingPage.h --- a/apengine/apsettingshandlerui/inc/AccessPointTextSettingPage.h Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,124 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of class CAccessPointTextSettingPage. -* -*/ - - -#ifndef ACCESSPOINT_TEXT_SETTING_PAGE_H -#define ACCESSPOINT_TEXT_SETTING_PAGE_H - -// INCLUDE FILES -#include - - -// FORWARD DECLARATION -class CApSelectorListboxModel; - - -// CLASS DECLARATION - -/** -* Model for the access point listbox. It is an array of CApSelectorItem -* pointers; items are owned. -*/ -NONSHARABLE_CLASS( CAccessPointTextSettingPage ) : public CAknTextSettingPage - { -public: - /** - * Simple constructor depending only on a single resource Id. - * Editor resource is given via the link in the setting page resource. - * - * @param aResourceID Setting Page to use (if present) - * @param aText Reference to text for editing - * @param aTextSettingPageFlags option flags for miscellaneous things - * @param aIsLatin Giving whether the editor should be Latin only - */ - CAccessPointTextSettingPage( TInt aResourceID, TDes& aText, - TInt aTextSettingPageFlags = 0, - TBool aIsLatin = EFalse ); - /** - * Constructor that allows separate setting page and editor resources - * - * This constructor allows the use of setting page using only the editor - * resource. Other combinations are also possible - * - * In all cases the number (if supplied i.e. <> 0 ) is used. - * - * Editor Setting Page - * Resource Resource - * present present Both are used (but text & number overridden) - * = 0 present Editor resource is used via SP resource - * (Effectively like the other constructor) - * present = 0 Default Avkon SP resource if used - * + this editor resource - * = 0 = 0 uses default resource for both SP and editor. - * This is OK if: - * i) control type is present, - * ii) a default resource exists - * ( OK for text, integer, date, time, duration ) - * - * Note: THe first argument is a TDesC* (rather than TDesC&) because - * the other constructor cannot initialize such a member without allocation - * or having an internal dummy buffer. - * Note that this buffer must be owned by the client until - * ExecuteLD has been called. - * - * Rules for text and numbers: The rules are the same for both: (non-zero - * length) text or number other than EAknSettingPageNoOrdinalDisplayed if - * given in this constructor will not override resource (unless that is - * zero length or EAknSettingPageNoOrdinalDisplayed). Note, however, - * that text or number given via the specific API for setting them, - * WILL override resource. - * It is assumed that number from resource is very rare. Special text - * is somewhat more likely. - * - * @param aSettingTitleText Text at top of setting pane; - * OWNED EXTERNALLY - * @param aSettingNumber Number at top left (if present) - * @param aControlType Determines the type constructed - * and how its resource is read - * @param aEditorResourceId Editor resource to use in the setting page - * (if present) - * @param aSettingPageResourceId Setting Page to use (if present) - * @param aText Reference to text for editing - * @param aTextSettingPageFlags option flags for miscellaneous things - * @param aIsLatin Gives whether the editor should accept - * only Latin input - */ - CAccessPointTextSettingPage( const TDesC* aSettingTitleText, - TInt aSettingNumber, - TInt aControlType, - TInt aEditorResourceId, - TInt aSettingPageResourceId, - TDes& aText, - TInt aTextSettingPageFlags = 0, - TBool aIsLatin = EFalse ); - - - - /** - * 2nd stage construction for this specific type. Call BaseConstructL in - * CAknSettingPage, where the object is constructed from resource. - * - */ - virtual void ConstructL(); - - TBool iIsLatin; - }; - - -#endif - -// End of file diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/inc/ApMultiLineDataQueryDialog.h --- a/apengine/apsettingshandlerui/inc/ApMultiLineDataQueryDialog.h Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,72 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of class CApMultiLineDataQueryDialog. -* -*/ - - -#ifndef AP_MULTILINE_IP_QUERY_DIALOG_H -#define AP_MULTILINE_IP_QUERY_DIALOG_H - -// INCLUDE FILES -#include - - -// FORWARD DECLARATION - - -// CLASS DECLARATION - -/** -* A new class to extend the functionality of the existing -* CAKnMultiLineIpQueryDialog to be able to accept 0 length settings... -* Nothing else is changed. -*/ -NONSHARABLE_CLASS( CApMultiLineDataQueryDialog ) : - public CAknMultiLineDataQueryDialog - { -public: - public: - /** - * Multiline data query dialog, 2 lines - * @param aText1 Text1 - * @param aText2 Text2 - * @param aTone Tone - * @return A constructed CApMultiLineDataQueryDialog - */ - static CApMultiLineDataQueryDialog* NewL( - TDes& aText1, TDes& aText2, - TTone aTone = ENoTone); - - - protected: - /** - * If the query text is ok (retrieved form query controls) then - * display the left soft key, otherwise hide it. - */ - void UpdateLeftSoftKeyL(); - - private: - /** - * Constructor - * @param aTone Tone - */ - CApMultiLineDataQueryDialog( const TTone& aTone ); - - }; - - -#endif - -// End of file diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/inc/ApNetSelPopupList.h --- a/apengine/apsettingshandlerui/inc/ApNetSelPopupList.h Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,206 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Declares CApNetSelPopupList for network selection. -* -*/ - - -#ifndef APNETSEL_POPUP_LIST_DIALOG_H -#define APNETSEL_POPUP_LIST_DIALOG_H - -// INCLUDES - -#include -#include // for MActiveApDbObserver - -#include - - -// FORWARD DECLARATIONS - -class CApNetSelectorListboxModel; -class CApSettingsHandlerImpl; -class CApSettingsModel; - - -// CLASS DECLARATION -/** -* CApNetSelPopupList class -* Pop-up network selector 'control' object. -*/ -NONSHARABLE_CLASS( CApNetSelPopupList ) : public CAknRadioButtonSettingPage, - public MActiveApDbObserver - { - - public: // Constructors and destructor - - /** - * 2 phase construction - * @param aModel The data model object - * @param aHandler The data handler object - * @param aCurrentSelectionIndex The required selection index - * @param aPreferredUid The preferred UID - * @param aEventStore Stores the events - * @param aItemArray Itemarray - * @param aNeedsNone Gives whether it disoplays the item 'None' or not - * @return the constructed CApNetSelPopupList object - */ - static CApNetSelPopupList* NewL - ( - CApSettingsModel& aModel, - CApSettingsHandlerImpl& aHandler, - TInt& aCurrentSelectionIndex, - TInt& aPreferredUid, - TUint32& aEventStore, - CDesCArrayFlat* aItemArray, - TBool aNeedsNone - ); - - // Two phased construction - virtual void ConstructL(); - - private: - /** - * 2 phase construction - * @param aModel The data model object - * @param aHandler The data handler object - * @param aCurrentSelectionIndex The required selection index - * @param aPreferredUid The preferred UID - * @param aEventStore Stores the events - * @param aItemArray Itemarray - * @param aNeedsNone Gives whether it disoplays the item 'None' or not - * @return the constructed CApNetSelPopupList object - */ - CApNetSelPopupList - ( - CApSettingsModel& aModel, - CApSettingsHandlerImpl& aHandler, - TInt& aIndex, - TInt& aPreferredUid, - CDesCArrayFlat* aItemArray, - TUint32& aEventStore, - TBool aNeedsNone - ); - - virtual ~CApNetSelPopupList(); - - public: // New functions - void SetHighlighted(); - - private: - /** - * It tells whether the Select menu item needs to be deleted or not - * @param aResourcfeId The menu resource ID - * @return Boolean indicating whether the Select menu item - * needs to be deleted or not - */ - TBool Need2DeleteSelect( TInt aResourceId ); - - /** - * It tells whether the Open & the Dlete menu item needs - * to be deleted or not - * @param aResourcfeId The menu resource ID - * @return Boolean indicating whether the Delete menu item - * needs to be deleted or not - */ - TBool Need2DeleteOpenDelete( TInt aResourceId ); - - - /** - * Creates a new network group - * @return TBool indicating successful creation - */ - TBool HandleCreateNewNetworkGroupL(); - - - public: // Functions from base classes - // From CCoeControl - virtual void GetHelpContext(TCoeHelpContext& aContext) const; - - /** - * Implements the MActiveApDbObserver protocol - */ - virtual void HandleApDbEventL( TEvent anEvent ); - - - /** - * Overrides ActivateL - */ - virtual void ActivateL(); - - protected: - // From CAknRadioButtonPage - /* - * Needed to know about SELECTION (not HIGHLIGHT!) changes - * to be able to update currently valid selection UID. - */ - virtual void SelectCurrentItemL(); - - private: - /** - * From CAknSettingPage - */ - TBool OkToExitL( TInt aButtonId ); - - protected: // New functions - /** - * Fills up listbox control with data dynamically - */ - void FillListBoxWithDataL(); - - /* - * Sets the Selected item in the list. - * Needed to initialize the list according to the Uid and - * not to 'itemindex'... - */ - void SetSelectedL(); - - protected: // Functions from base classes - - /** - * From CAknSettingPage - */ - virtual void DynInitMenuPaneL( TInt aResourceId, - CEikMenuPane* aMenuPane ); - - // From MEikCommandObserver - virtual void ProcessCommandL( TInt aCommandId ); - - // From CCoeControl - TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, - TEventCode aType); - - private: //data - CApSettingsModel* iDataModel; // not owned, passed for usage - CAknSetStyleListBox* iList; - - CApNetSelectorListboxModel* iModel; // owns it, just passes - // items for usage to list! - - TInt* iSelected; // not owns it,passed for usage - CApSettingsHandlerImpl* iHandler; // not owns it,passed for usage - TUint32* iEventStore;// to hold the events - TUint32 iPreferredUid; - TInt iPreferredLine; - TBool iNeedsNone; - TBool iNeedUnlock; - TBool iHelpSupported; - TBool iProtectionSupported; - - }; - -#endif // APNETSEL_POPUP_LIST_DIALOG_H - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/inc/ApNetSelectorListBoxModel.h --- a/apengine/apsettingshandlerui/inc/ApNetSelectorListBoxModel.h Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,121 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of class CApNetSelectorListboxModel. -* -*/ - - -#ifndef APNETSELECTOR_LISTBOX_MODEL_H -#define APNETSELECTOR_LISTBOX_MODEL_H - -// INCLUDE FILES -#include -#include - - -// CONSTANTS -// Granularity of the model array. -const TInt KGranularity = 8; - - -_LIT( KListItemFormatGraphicOnOff, "%d\t%*S" ); - -const TInt KMaxFormatSize = sizeof( KListItemFormatGraphicOnOff ); -const TInt KMaxListItemNameLength = 50; // = KCommsDbSvrMaxFieldLength - - -/** -* Buffer size for formatting listbox text. Maximum item length -* plus listbox internals (tabulators for icons etc.) must fit into it. -* -* Important note: -* The model of the listbox is a CAknFilteredTextListBoxModel. -* The *itemarray* of that model is this class. That is, whatever is in -* the model (this class), it may not be visible, if it is filtered out. -* We always must use the listbox's Model() to get visible ones. -*/ -const TInt KMaxApSelectorListboxName = KMaxListItemNameLength+KMaxFormatSize; - - -// CLASS DECLARATION - -/** -* Model for the network group selection listbox. -* It is an array of CApNetworkItem pointers; -* items are owned. -*/ -NONSHARABLE_CLASS( CApNetSelectorListboxModel ) : - public CApNetworkItemList, - public MDesCArray - { - public: // Construct / destruct - - /** - * Constructor. - */ - CApNetSelectorListboxModel( ); - - /** - * Destructor. - */ - virtual ~CApNetSelectorListboxModel(); - - public: // from MDesCArray - - /** - * Get number of items in the model. - * @return Number of items. - */ - TInt MdcaCount() const; - - /** - * Text to be displayed for this item. - * @param aIndex Index of item. - * @return TPtrC for this item text (text owned by the model). - */ - TPtrC MdcaPoint( TInt aIndex ) const; - - - public: - /** - * index <--> Uid conversion - * @param aUid UID - * @param aErr Error code - * @return The index for the passed UID - */ - TInt Item4Uid( TUint32 aUid, TInt& aErr ) const; - - private: // data - /** - * Formats the text of the listbox. - * @param aIndex Index of item. - * @param aBuf Buffer to store formatted text. - */ - void FormatListboxText( TInt aIndex, TDes& aBuf ) const; - - /** - * MdcaPoint() cannot leave, so this buffer is allocated - * to allow formatting. Fortunately, doesn't have to be very - * large. - * We have to use MUTABLE CAST, as MdcaPoint is const (odd enough), - * so wouldn't allow formatting the text in a member... - */ - __MUTABLE TBuf iBuf; - - }; - - -#endif - -// End of file diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/inc/ApSelPopupList.h --- a/apengine/apsettingshandlerui/inc/ApSelPopupList.h Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,344 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Declares CApSelPopupList for access point selection. -*/ - - -#ifndef APSEL_POPUP_LIST_DIALOG_H -#define APSEL_POPUP_LIST_DIALOG_H - -// INCLUDES -#include -#include -#include // for MActiveApDbObserver - - -#include - - -// FORWARD DECLARATIONS -class CApSelectorListboxModel; -class CApSettingsHandlerImpl; - - -// CLASS DECLARATION -/** -* CApSelPopupList class -* Pop-up access point selector 'control' object. -*/ -NONSHARABLE_CLASS( CApSelPopupList ) : public CAknRadioButtonSettingPage, - public MActiveApDbObserver - { - - public: // Constructors and destructor - - /** - * Creates the popup list selector object - * @param aModel Data model to be used for reading data. - * Not owned. Must remain intact while - * the dialog exists. - * @param aHandler A CApSettingsHandlerImpl handling data - * @param aCurrentSelectionIndex The item to highlight - * @param aPreferredUid The preferred Uid to select - * @param aSelMenuType The Options menu type it should have - * @param aIspFilter The ISP filtering criteria - * @param aBearerFilter The bearer filtering criteria - * @param aSortType The ordering type for the list - * @param aEventStore Event information holder - * @param aItemArray The listbox items - * @param aNeedsNone Gives whether 'None' item is present - * @param aNoEdit Gives wether editing is allowed or not - * @param aReqIpvType The IPv types included in the list - * @param aVpnFilterType The VPN filtering type - * @return The created popup list selector object - */ - static CApSelPopupList* NewL - ( - CApSettingsModel& aModel, - CApSettingsHandlerImpl& aHandler, - TInt& aCurrentSelectionIndex, - TInt& aPreferredUid, - TSelectionMenuType aSelMenuType, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TUint32& aEventStore, - CDesCArrayFlat* aItemArray, - TBool aNeedsNone, - TBool aNoEdit, - TInt aReqIpvType = EIPv4, - TVpnFilterType aVpnFilterType = EVpnFilterBoth - ); - - - - /** - * Creates the popup list selector object - * @param aModel Data model to be used for reading data. - * Not owned. Must remain intact while - * the dialog exists. - * @param aHandler A CApSettingsHandlerImpl handling data - * @param aCurrentSelectionIndex The item to highlight - * @param aPreferredUid The preferred Uid to select - * @param aSelMenuType The Options menu type it should have - * @param aIspFilter The ISP filtering criteria - * @param aBearerFilter The bearer filtering criteria - * @param aSortType The ordering type for the list - * @param aEventStore Event information holder - * @param aItemArray The listbox items - * @param aNeedsNone Gives whether 'None' item is present - * @param aReqIpvType The IPv types included in the list - * @param aVpnFilterType The VPN filtering type - * @param aIncludeEasyWlan To include Easy WLAN AP's or not - * @param aNoEdit Gives wether editing is allowed or not - * @return The created popup list selector object - */ - static CApSelPopupList* NewL - ( - CApSettingsModel& aModel, - CApSettingsHandlerImpl& aHandler, - TInt& aCurrentSelectionIndex, - TInt& aPreferredUid, - TSelectionMenuType aSelMenuType, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TUint32& aEventStore, - CDesCArrayFlat* aItemArray, - TBool aNeedsNone, - TInt aReqIpvType, - TVpnFilterType aVpnFilterType, - TBool aIncludeEasyWlan, - TBool aNoEdit - ); - - /** - * Constructor - */ - virtual void ConstructL(); - - - protected: - /** - * Creates the popup list selector object - * @param aModel Data model to be used for reading data. - * Not owned. Must remain intact while - * the dialog exists. - * @param aHandler A CApSettingsHandlerImpl handling data - * @param aIndex The item to highlight - * @param aPreferredUid The preferred Uid to select - * @param aSelMenuType The Options menu type it should have - * @param aIspFilter The ISP filtering criteria - * @param aBearerFilter The bearer filtering criteria - * @param aSortType The ordering type for the list - * @param aItemArray The listbox items - * @param aEventStore Event information holder - * @param aNeedsNone Gives whether 'None' item is present - * @param aNoEdit Gives wether editing is allowed or not - * @param aReqIpvType The IPv types included in the list - * @param aVpnFilterType The VPN filtering type - * @return The created popup list selector object - */ - CApSelPopupList - ( - CApSettingsModel& aModel, - CApSettingsHandlerImpl& aHandler, - TInt& aIndex, - TInt& aPreferredUid, - TSelectionMenuType aSelMenuType, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - CDesCArrayFlat* aItemArray, - TUint32& aEventStore, - TBool aNeedsNone, - TBool aNoEdit, - TInt aReqIpvType = EIPv4, - TVpnFilterType aVpnFilterType = EVpnFilterBoth - ); - - - - /** - * Creates the popup list selector object - * @param aModel Data model to be used for reading data. - * Not owned. Must remain intact while - * the dialog exists. - * @param aHandler A CApSettingsHandlerImpl handling data - * @param aIndex The item to highlight - * @param aPreferredUid The preferred Uid to select - * @param aSelMenuType The Options menu type it should have - * @param aIspFilter The ISP filtering criteria - * @param aBearerFilter The bearer filtering criteria - * @param aSortType The ordering type for the list - * @param aItemArray The listbox items - * @param aEventStore Event information holder - * @param aNeedsNone Gives whether 'None' item is present - * @param aReqIpvType The IPv types included in the list - * @param aVpnFilterType The VPN filtering type - * @param aIncludeEasyWlan To include Easy WLAN AP's or not - * @param aNoEdit Gives wether editing is allowed or not - * @return The created popup list selector object - */ - CApSelPopupList - ( - CApSettingsModel& aModel, - CApSettingsHandlerImpl& aHandler, - TInt& aIndex, - TInt& aPreferredUid, - TSelectionMenuType aSelMenuType, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - CDesCArrayFlat* aItemArray, - TUint32& aEventStore, - TBool aNeedsNone, - TInt aReqIpvType, - TVpnFilterType aVpnFilterType, - TBool aIncludeEasyWlan, - TBool aNoEdit - ); - - /** - * Destructor - */ - virtual ~CApSelPopupList(); - - - public: // New functions - /** - * Sets the highlight. - */ - void SetHighlighted(); - - private: - - /** - * Loads our own icons - * @return The icon offset where they were appended. - */ - TInt LoadIconsL(); - - - public: // Functions from base classes - // From CCoeControl - virtual void GetHelpContext(TCoeHelpContext& aContext) const; - - /** - * Implements the MActiveApDbObserver protocol - */ - virtual void HandleApDbEventL( TEvent anEvent ); - - - /** - * Overrides ActivateL - */ - virtual void ActivateL(); - - // from CCoeControl - virtual void HandleResourceChange(TInt aType); - - protected: - // From CAknRadioButtonPage - /* - * Needed to know about SELECTION (not HIGHLIGHT!) changes - * to be able to update currently valid selection UID. - */ - virtual void SelectCurrentItemL(); - - private: - /** - * From CAknSettingPage - */ - TBool OkToExitL( TInt aButtonId ); - - - protected: // New functions - /** - * Fills up listbox control with data dynamically - */ - void FillListBoxWithDataL(); - - - /* - * Sets the Selected item in the list. - * Needed to initialize the list according to the Uid - * and not to 'itemindex'... - */ - void SetSelectedL(); - - - /* - * Checks for & handles the 'empty list' situation. - * According to the spec., prompts for creating a new one... - */ - void CheckIfEmptyL(); - - protected: // Functions from base classes - - /** - * From CAknSettingPage - */ - virtual void DynInitMenuPaneL( TInt aResourceId, - CEikMenuPane* aMenuPane ); - - // From MEikCommandObserver - virtual void ProcessCommandL( TInt aCommandId ); - - // From MEikListBoxObserver - void HandleListBoxEventL( CEikListBox* aListBox, - MEikListBoxObserver::TListBoxEvent aEventType ); - - // From CCoeControl - TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, - TEventCode aType); - - private: //data - CApSettingsModel* iDataModel; // not owns it, - // just passed for usage! - CAknSetStyleListBox* iList; - CApSelectorListboxModel* iModel; // owns it, just passes - // items for usage to list! - TInt* iSelected; // does not owns it, - // just passed for usage! - TInt iBearerFilter; - TInt iIspFilter; - TInt iSortType; - TSelectionMenuType iSelMenuType; - CApSettingsHandlerImpl* iHandler; // does not owns it, - // passed for usage - TUint32* iEventStore; // to hold the events - TUint32 iPreferredUid; - TInt iPreferredLine; - TBool iNeedsNone; - TBool iNeedUnlock; - - TInt iReqIpvType; // Default is IPv4 - TVpnFilterType iVpnFilterType; - TInt iVariant; /// Local variant value - - CAknIconArray* iIcons; - - TBool iIncludeEasyWlan; - TBool iInitialised; - TBool iNoEdit; - TBool iHelpSupported; - TBool iProtectionSupported; - TBool iDoExit; - }; - -#endif - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/inc/ApSelQueryDialog.h --- a/apengine/apsettingshandlerui/inc/ApSelQueryDialog.h Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,121 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Declares dialog CApSelQueryDialog for access point selection. -* -*/ - - -#ifndef APSEL_QUERY_DIALOG_H -#define APSEL_QUERY_DIALOG_H - -// INCLUDES -#include -#include -#include - -// FORWARD DECLARATIONS -class CApSelectorListboxModel; - -// CLASS DECLARATION -/** -* CApSelQueryDialog class -* -*/ -NONSHARABLE_CLASS( CApSelQueryDialog ) : public CAknListQueryDialog, - public MActiveApDbObserver - { - - public: // Constructors and destructor - - /** - * Constructor - * @param aModel a reference to the data model - * @param aIndex a pointer to hold the UID of the selected item - * @return The constructed access point selection query dialog - */ - CApSelQueryDialog( CApSettingsModel& aModel, - TUint32* aIndex ); - - /** - * Destructor - */ - virtual ~CApSelQueryDialog(); - - - public: // Functions from base classes - /** - * from MActiveApDbObserver - */ - virtual void HandleApDbEventL( TEvent anEvent ); - - - private: - /** - * From CAknListQueryDialog - */ - virtual void PreLayoutDynInitL( void ); - - - /** - * From CAknListQueryDialog - */ - virtual void PostLayoutDynInitL(); - - - /** - * From CAknListQueryDialog - */ - TBool OkToExitL( TInt aButtonId ); - - - // From CCoeControl - TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, - TEventCode aType); - - - // From MEikCommandObserver - void ProcessCommandL( TInt aCommandId ); - - - protected: // New functions - /** - * Fills up listbox control with data - */ - void FillListBoxWithDataL(); - - - /** - * Loads protected icons - * @return The icon offset where they were appended. - */ - TInt LoadIconsL(); - - - protected: // Functions from base classes - - - private: //data - CApSettingsModel* iDataModel; // does not own it, - // just passed for usage! - CEikListBox* iList; - CApSelectorListboxModel* iModel; - TUint32* iSelected; - TBool iNeedUnlock; - - }; - -#endif - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/inc/ApSelectorDialog.h --- a/apengine/apsettingshandlerui/inc/ApSelectorDialog.h Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,249 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Declares dialog CApSelectorDialog for access point selection. -* -*/ - - -#ifndef APSELECTORDIALOG_H -#define APSELECTORDIALOG_H - -// INCLUDES -#include -#include - -#include -#include - -// FORWARD DECLARATIONS -class CApSelectorListboxModel; -class CApSelectorListbox; -class CTextOverrides; -class CEikStatusPane; -class CAknTitlePane; -class CAknNavigationControlContainer; -class CAknNavigationDecorator; -class CApSettingsModel; -class CApSettingsHandlerImpl; - - -// CLASS DECLARATION -/** -* CApSelectorDialog dialog class -* -*/ -NONSHARABLE_CLASS( CApSelectorDialog ) : - public CAknDialog, public MEikListBoxObserver, - public MActiveApDbObserver - { - - public: // Constructors and destructor - /** - * Create and launch dialog. - * @param aModel Model to be used for reading data. Not owned. - * Must remain intact while the dialog exists. - * @param aHandler A CApSettingsHandlerImpl - * @param aHighLight The item to highlight - * @param aSelected The UID of the selected item. - * @return The dialog's return code - */ - TInt ConstructAndRunLD( CApSettingsModel& aModel, - CApSettingsHandlerImpl& aHandler, - TUint32 aHighLight, TUint32& aSelected ); - - - - /** - * Construct the dialog. The passed parameters determine - * the filtering rules it will use. - * @param aListType The list type it should use to display - * the list of access points - * @param aSelMenuType The Options menu type it should have - * @param aIspFilter The ISP filtering criteria - * @param aBearerFilter The bearer filtering criteria - * @param aSortType The ordering type for the list - * @param aEventStore Event information holder - * @param aNoEdit Gives wether editing is allowed or not - * @param aReqIpvType The IPv type which are included in the list - * @return The constructed dialog object - */ - static CApSelectorDialog* NewL( TSelectionListType aListType, - TSelectionMenuType aSelMenuType, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TUint32& aEventStore, - TBool aNoEdit, - TInt aReqIpvType = EIPv4 - ); - - - /** - * Destructor. - */ - ~CApSelectorDialog(); - - protected: - /** - * Constructor. The passed parameters determine - * the filtering rules it will use. - * @param aListType The list type it should use to display - * the list of access points - * @param aSelMenuType The Options menu type it should have - * @param aIspFilter The ISP filtering criteria - * @param aBearerFilter The bearer filtering criteria - * @param aSortType The ordering type for the list - * @param aEventStore Event information holder - * @param aReqIpvType The IPv type which are included in the list - * @param aNoEdit Gives wether editing is allowed or not - */ - CApSelectorDialog( TSelectionListType aListType, - TSelectionMenuType aSelMenuType, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TUint32& aEventStore, - TInt aReqIpvType, - TBool aNoEdit - ); - - - - public: // New functions - - /** - * Sets initial texts - */ - void InitTextsL(); - - - /** - * Handles listbox data changes - */ - void HandleListboxDataChangeL(); - - - /** - * Sets the text overrides. - * @param aOverrides An object containing the overriden texts - */ - void SetTextOverrides( CTextOverrides* aOverrides ); - - - /** - * Checks if the list is empty - */ - void CheckIfEmptyL(); - - - /** - * Sets the highlight - */ - void SetHighlighted(); - - public: // Functions from base classes - // From CCoeControl - virtual void ActivateL(); - - // From CCoeControl - virtual void GetHelpContext(TCoeHelpContext& aContext) const; - - // From MActiveApDbObserver - virtual void HandleApDbEventL( TEvent anEvent ); - - // From MEikCommandObserver - virtual void ProcessCommandL( TInt aCommandId ) ; - - // From MEikListBoxObserver - void HandleListBoxEventL( CEikListBox* aListBox, - TListBoxEvent aEventType ); - - SEikControlInfo CreateCustomControlL( TInt aControlType ); - - // From MEikMenuObserver - virtual void DynInitMenuPaneL( TInt aResourceId, - CEikMenuPane* aMenuPane ); - - // From CAknDialog - TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, - TEventCode aType); - - - protected: - // From CEikDialog - virtual void PreLayoutDynInitL(); - - - // From CEikDialog - virtual void PostLayoutDynInitL(); - - // From CAknDialog - TBool OkToExitL( TInt aButtonId ); - - /** - * Internal representation of the implementation of - * ProcessCommandL from MEikCommandObserver - */ - void DoProcessCommandL( TInt aCommandId ); - - - private: //data - - CEikStatusPane* iStatusPane; // NOT owned - CAknTitlePane* iTitlePane; // NOT owned - CAknNavigationControlContainer* iNaviPane; // NOT owned - CAknNavigationDecorator* iNaviDecorator; // owned - HBufC* iOldTitleText; - CApSettingsModel* iDataModel; // not owned, - // passed for usage - CApSelectorListbox* iList; - - CApSettingsHandlerImpl* iHandler; - CApSelectorListboxModel* iModel; - TSelectionListType iListType; - TSelectionMenuType iSelMenuType; - - TUint32 iHighLight; - TUint32* iSelected; - - TInt iIspFilter; - TInt iBearerFilter; - TInt iSortType; - - CTextOverrides* iTextOverrides; // not owned, - // passed for usage - - TUint32 iPreferredUid; - TInt iPreferredLine; - TUint32* iEventStore; - TBool iNeedUnlock; - TBool iModelPassed; - TApUiExitReason iExitReason; - - TInt iReqIpvType; /// Default is IPv4 - TInt iVariant; /// Local variant value - -#ifdef __TEST_OOMDEBUG - TBool iMemTestOn; -#endif // __TEST_OOMDEBUG - - TBool iInitialised; - TBool iNoEdit; - TBool iHelpSupported; - }; - -#endif - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/inc/ApSelectorListBoxModel.h --- a/apengine/apsettingshandlerui/inc/ApSelectorListBoxModel.h Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,152 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of class CApSelectorListboxModel. -* -*/ - - -#ifndef APSELECTOR_LISTBOX_MODEL_H -#define APSELECTOR_LISTBOX_MODEL_H - -// INCLUDE FILES -#include -#include - - -// CONSTANTS -// Granularity of the model array. -const TInt KGranularity = 8; - -// const TInt KErrInvalidBitmapType = -300; - -_LIT( KListItemFormatGraphicBearer, "%d\t%*S\t\t" ); -_LIT( KListItemFormatGraphicNone, "%*S" ); -_LIT( KListItemFormatGraphicOnOff, "%d\t%*S" ); - -_LIT( KListItemFormatGraphicProtected, "%d\t%*S\t%d\t" ); -_LIT( KListItemFormatGraphicOnOffWithLock, "%d\t%*S\t\t%d\t" ); -_LIT( KListItemFormatGraphicWithLock, "%*S\t\t%d\t" ); - -const TInt KMaxFormatSize = sizeof( KListItemFormatGraphicBearer ); -const TInt KMaxListItemNameLength = 50; // = KCommsDbSvrMaxFieldLength - -/** -* Buffer size for formatting listbox text. Maximum item length -* plus listbox internals (tabulators for icons etc.) must fit into it. -* -* Important note: -* The model of the listbox is a CAknFilteredTextListBoxModel. -* The *itemarray* of that model is this class. That is, whatever is in -* the model (this class), it may not be visible, if it is filtered out. -* We always must use the listbox's Model() to get visible ones. -*/ -const TInt KMaxApSelectorListboxName = KMaxListItemNameLength+KMaxFormatSize; - - -// CLASS DECLARATION - -/** -* Model for the access point listbox. It is an array of CApSelectorItem -* pointers; items are owned. -*/ -NONSHARABLE_CLASS( CApSelectorListboxModel ) : - public CApListItemList, - public MDesCArray - { - public: // Construct / destruct - enum TGraphicType /// Events reported to the database observer. - { - EGraphicNone, ///< No graphic or icon. - EGraphicProtection, ///< Only protected icon. - EGraphicBearer, ///< Bearer specific icon. - EGraphicOnOff ///< Selection specific icon. - }; - - - /** - * Constructor. - * @param aGraphicType The used graphic type - */ - CApSelectorListboxModel( TGraphicType aGraphicType = EGraphicBearer ); - - - /** - * Destructor. - */ - virtual ~CApSelectorListboxModel(); - - public: // from MDesCArray - - /** - * Get number of items in the model. - * @return Number of items. - */ - TInt MdcaCount() const; - - - /** - * Text to be displayed for this item. - * @param aIndex Index of item. - * @return TPtrC for this item text (text owned by the model). - */ - TPtrC MdcaPoint( TInt aIndex ) const; - - - public: - - /** - * index <--> Uid conversion - * @param aUid The UID of the item - * @param aErr Error code - * @return The index of the item - */ - TInt Item4Uid( TUint32 aUid, TInt& aErr ) const; - - - /** - * Sets the icon offset - * @param aOffset The offset of our icons in the iconarray - */ - void SetOwnIconOffset( TInt aOffset ); - - - private: // data - /** - * Formats the text of the listbox. - * @param aIndex Index of item. - * @param aBuf Buffer to store formatted text. - */ - void FormatListboxText( TInt aIndex, TDes& aBuf ) const; - - - /** - * MdcaPoint() cannot leave, so this buffer is allocated - * to allow formatting. Fortunately, doesn't have to be very - * large. - * We have to use MUTABLE CAST, as MdcaPoint is const (odd enough), - * so wouldn't allow formatting the text in a member... - */ - __MUTABLE TBuf iBuf; - - - TGraphicType iGraphicType; - TInt iOffset; - TBool iFeatureInitialised; - TBool iProtectionSupported; - }; - - -#endif - -// End of file diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/inc/ApSelectorListbox.h --- a/apengine/apsettingshandlerui/inc/ApSelectorListbox.h Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,114 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of class CApSelectorListbox. -* -*/ - - -#ifndef APSELECTOR_LISTBOX_H -#define APSELECTOR_LISTBOX_H - -// INCLUDE FILES -#include - - -// FORWARD DECLARATION -class CApSelectorListboxModel; - - -// CLASS DECLARATION - -/** -* Model for the access point listbox. It is an array of CApSelectorItem -* pointers; items are owned. -*/ -NONSHARABLE_CLASS( CApSelectorListbox ) : public CAknSingleGraphicStyleListBox - { - public: // Construct / destruct - - - /** - * Two-phased constructor. Leaves on failure. - * @param aParent Parent control. - * @return The constructed listbox. - */ - static CApSelectorListbox* NewL - ( const CCoeControl* aParent ); - - - /** - * Destructor. - */ - virtual ~CApSelectorListbox(); - - - /** - * Constructor. - */ - CApSelectorListbox(); - - public : - /** - * Handle key event. - * @param aKeyEvent The key event. - * @param aType Key event type. - * @return Response (was the key event consumed?). - */ - TKeyResponse OfferKeyEventL - ( const TKeyEvent& aKeyEvent, TEventCode aType ); - - /** - * Handle focus change. - * @param aDrawNow Draw now? - */ - void FocusChanged( TDrawNow aDrawNow ); - - - /** - * Loads the icons - */ - void LoadIconsL(); - - - /** - * Gets the UID from a given item - * @param The index of the item - * @return The UID of the item given by itemindex - */ - TUint32 Uid4Item( TInt aItem ) const; - - - /** - * Gets the UID of the current item - * @return The UID of the current item - */ - TUint32 CurrentItemUid() const; - - - /** - * Gets the name of the current item - * @return The name of the current item - */ - const TDesC& CurrentItemNameL(); - - - // from CCoeControl - void HandleResourceChange(TInt aType); - - }; - - -#endif - -// End of file diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/inc/ApSettingsDlg.h --- a/apengine/apsettingshandlerui/inc/ApSettingsDlg.h Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1020 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Declares dialog for access point view/edit. -* -*/ - - -#ifndef APSETTINGS_DLG_H -#define APSETTINGS_DLG_H - - - -// INCLUDES -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include - - -// CONSTANTS -const TInt KBearers = 4; - - -// FORWARD DECLARATIONS -class CTextOverrides; -class CEikStatusPane; -class CAknTitlePane; -class CAknNavigationControlContainer; -class CAknNavigationDecorator; -class CApSettingsModel; -class CApSettingsHandlerImpl; -class CFeatureManagerWrapper; - - -// CLASS DECLARATION -/** -* CApSettingsDlg dialog class -* -*/ - -const TInt KEndOfArray = -1; - -const TInt KCsdAnalogue[] = { KSpeedAutobaud, KSpeed9600, KSpeed14400, - KEndOfArray }; - -const TInt KCsdAnalogueWcdma[] = { KSpeedAutobaud, KSpeed9600, KSpeed14400, - KSpeed28800, KEndOfArray }; - -const TInt KCsdIsdn110[] = { KSpeed9600, KSpeed14400, KEndOfArray }; - -const TInt KCsdIsdn110Wcdma[] = { KSpeed9600, KSpeed14400, KSpeed28800, - KSpeed38400, KEndOfArray }; - -const TInt KCsdIsdn120[] = { KSpeed9600, KSpeed14400, KEndOfArray }; - -const TInt KCsdIsdn120Wcdma[] = { KSpeed9600, KSpeed14400, KSpeed28800, - KSpeed56000, KEndOfArray }; - -const TInt KHcsdAnalogue[] = { KSpeedAutobaud, KSpeed9600, KSpeed14400, - KSpeed19200, KSpeed28800, KEndOfArray }; - -const TInt KHcsdIsdn110[] = { KSpeed9600, KSpeed14400, KSpeed19200, - KSpeed28800, KSpeed38400, KEndOfArray }; - -const TInt KHcsdIsdn120[] = { KSpeed9600, KSpeed14400, KSpeed19200, - KSpeed28800, KSpeed43200, KEndOfArray }; - -//Resources -const TInt KResCsdAnalogue[] = { R_APUI_VIEW_SPEED_AUTODETECT, - R_APUI_VIEW_SPEED_9600, - R_APUI_VIEW_SPEED_14400, KEndOfArray }; - -const TInt KResCsdAnalogueWcdma[] = { R_APUI_VIEW_SPEED_AUTODETECT, - R_APUI_VIEW_SPEED_9600, - R_APUI_VIEW_SPEED_14400, - R_APUI_VIEW_SPEED_28800, KEndOfArray }; - -const TInt KResCsdIsdn110[] = { R_APUI_VIEW_SPEED_9600, - R_APUI_VIEW_SPEED_14400, KEndOfArray }; - -const TInt KResCsdIsdn110Wcdma[] = { R_APUI_VIEW_SPEED_9600, - R_APUI_VIEW_SPEED_14400, - R_APUI_VIEW_SPEED_28800, - R_APUI_VIEW_SPEED_38400, KEndOfArray }; - -const TInt KResCsdIsdn120[] = { R_APUI_VIEW_SPEED_9600, - R_APUI_VIEW_SPEED_14400, KEndOfArray }; - -const TInt KResCsdIsdn120Wcdma[] = { R_APUI_VIEW_SPEED_9600, - R_APUI_VIEW_SPEED_14400, - R_APUI_VIEW_SPEED_28800, - R_APUI_VIEW_SPEED_56000, KEndOfArray }; - -const TInt KResHcsdAnalogue[] = { R_APUI_VIEW_SPEED_AUTODETECT, - R_APUI_VIEW_SPEED_9600, - R_APUI_VIEW_SPEED_14400, - R_APUI_VIEW_SPEED_19200, - R_APUI_VIEW_SPEED_28800, KEndOfArray }; - -const TInt KResHcsdIsdn110[] = { R_APUI_VIEW_SPEED_9600, - R_APUI_VIEW_SPEED_14400, - R_APUI_VIEW_SPEED_19200, - R_APUI_VIEW_SPEED_28800, - R_APUI_VIEW_SPEED_38400, KEndOfArray }; - -const TInt KResHcsdIsdn120[] = { R_APUI_VIEW_SPEED_9600, - R_APUI_VIEW_SPEED_14400, - R_APUI_VIEW_SPEED_19200, - R_APUI_VIEW_SPEED_28800, - R_APUI_VIEW_SPEED_43200, KEndOfArray }; - -NONSHARABLE_CLASS( CApSettingsDlg ) : public CAknDialog, - public MEikListBoxObserver, - public MActiveApDbObserver - { - - public: // Constructors and destructor - - enum TSaveAction - { - EApCanSave, - EApMustDelete, - EApShallGoBack, - EApNoAction - }; - - /** - * Create and launch dialog. - * @param aModel Model to be used for handling access point data. - * Not owned. Must remain intact while the dialog - * exists. - * @param aHandler The data handling object - * @param aUid The Wap Access Point ID of the access point - * to view/edit. - * @param aItem An optional CApAccessPointItem to edit - * @return The code returned by the dialogs' ExecuteLD - */ - TInt ConstructAndRunLD( CApSettingsModel& aModel, - CApSettingsHandlerImpl& aHandler, - TUint32& aUid, - CApAccessPointItem* aItem = NULL ); - - - - /** - * Two-phase construction. - * @param aIspFilter The Isp filter to be used - * @param aBearerFilter The bearer filter to be used - * @param aSortType The sorting to be used - * @param aEventStore A reference to hold the events happened - * while running this setting dialog. - * @param aNeedIpv6Support Specifies whether the caller would like to - * have IPv6 support or not. If it is ETrue, in case of IPv6 support - * is available as a feature, it will be supported. If IPv6 feature - * is not supported by the phone, it simply defaults to the normal - * IPv4 version. - * If it is False, it uses the default IPv4 version independently - * from IPv6 feature beeing available or not. - */ - static CApSettingsDlg* NewL( TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TUint32& aEventStore, - TInt aNeedIpv6Support = EFalse - ); - - - /** - * Destructor. - */ - ~CApSettingsDlg(); - - - // From CCoeControl - TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, - TEventCode aType ) ; - - protected: - /** - * Constructor. - * @param aIspFilter The Isp filter to be used - * @param aBearerFilter The bearer filter to be used - * @param aSortType The sorting to be used - * @param aEventStore A reference to hold the events happened - * while running this setting dialog. - * @param aNeedIpv6Support Specifies whether the caller would like to - * have IPv6 support or not. If it is ETrue, in case of IPv6 support - * is available as a feature, it will be supported. If IPv6 feature - * is not supported by the phone, it simply defaults to the normal - * IPv4 version. - * If it is False, it uses the default IPv4 version independently - * from IPv6 feature beeing available or not. - */ - CApSettingsDlg( TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TUint32& aEventStore, - TBool aNeedIpv6Support - ); - - - - public: // New functions - - /** - * Initialises texts. - */ - void InitTextsL(); - - - /** - * Handles listbox data change - * @param aReRead Boolean indicating whether the data must be re-read - * from the database or only 'value' or 'structural' changes - */ - void HandleListboxDataChangeL( TBool aReRead ); - - - /** - * Sets the text overrides - * @param aOverrides The text overrides object to be used - */ - void SetTextOverrides( CTextOverrides* aOverrides ); - - - /** - * Handles database events, implementation of the - * MActiveApDbObserver protocol - * @param anEvent The event code - */ - virtual void HandleApDbEventL( TEvent anEvent ); - - // From CCoeControl - virtual void GetHelpContext(TCoeHelpContext& aContext) const; - - private: - - // From CEikDialog - virtual void PreLayoutDynInitL(); - - // From CAknDialog - TBool OkToExitL( TInt aButtonId ); - - // From MEikCommandObserver - virtual void ProcessCommandL( TInt aCommandId ) ; - - // From MEikMenuObserver - virtual void DynInitMenuPaneL( TInt aResourceId, - CEikMenuPane* aMenuPane ) ; - - // From MEikListBoxObserver - void HandleListBoxEventL( CEikListBox* aListBox, - TListBoxEvent aEventType ); - - protected: // New functions - - /** - * Fills up the listbox with data - * @param aItemArray The itemarray to fill up - * @param arr A pointer to a TApMember array to be used as - * list elements - * @param aLength The number of elements in the above array - * @param aRes A pointer to an array of resource ID's to use - * for the elements of the TApMember array - * @param aCompulsory A pointer to an array of TInts indicating that - * the elements of the TApMember array are - * compulsory or not - */ - void FillListWithDataL - ( - CDesCArrayFlat& aItemArray, - const TApMember& arr, - TInt aLength, - const TInt* aRes, - const TInt* aCompulsory - ); - - - - /** - * Adds one textual listbox item for the given member - * @param aItemArray The itemarray to add the item - * @param aMember A TApMember value specifying which member of - * the access point had to be added to the list - * @param aRes Resource ID for the 'title text' for this - * member - * @param aCompulsory a TInt indicating whether this member is - * compulsory or not - */ - void AddTextualListBoxItemL - ( - CDesCArrayFlat& aItemArray, - TApMember aMember, - TInt aRes, - TInt aCompulsory - ); - - - /** - * Adds one 'on/off' listbox item for the given member - * @param aItemArray The itemarray to add the item - * @param aMember A TApMember value specifying which member of - * the access point had to be added to the list - * @param aRes Resource ID for the 'title text' for this - * member - * @param aCompulsory TInt showing if the member is compulsory or not - */ - void AddOnOffListBoxItemL - ( - CDesCArrayFlat& aItemArray, - TApMember aMember, TInt aRes, - TInt aCompulsory - ); - - - /** - * Updates one 'on/off' listbox item for the given member - * @param aMember A TApMember value specifying which member of the - * access point had to be added to the list - * @param aRes Resource ID for the 'title text' for this member - * @param aPos The current position of the item in the list - * @param aCompulsory a TInt indicating whether - * this member is compulsory or not - */ - void UpdateOnOffListBoxItemL( TApMember aMember, TInt aRes, - TInt aPos, TInt aCompulsory ); - - - /** - * Updates one 'textual' listbox item for the given member - * @param aMember A TApMember value specifying which member of the - * access point had to be added to the list - * @param aRes Resource ID for the 'title text' for this member - * @param aPos The current position of the item in the list - * @param aCompulsory a TInt indicating whether - * this member is compulsory or not - */ - void UpdateTextualListBoxItemL( TApMember aMember, TInt aRes, - TInt aPos, TInt aCompulsory ); - - - /** - * Creates one 'textual' listbox item for the given member - * @param aMember A TApMember value specifying which member of the - * access point had to be added to the list - * @param aRes Resource ID for the 'title text' for this member - * @param aCompulsory a TInt indicating whether - * this member is compulsory or not - * @return A HBufC* pointing to the created listbox item text. - */ - HBufC* CreateTextualListBoxItemL( TApMember aMember, TInt aRes, - TInt aCompulsory ); - - - /** - * Creates one 'on/off' listbox item for the given member - * @param aMember A TApMember value specifying which member of the - * access point had to be added to the list - * @param aRes Resource ID for the 'title text' for this member - * @param aCompulsory a TInt indicating whether - * this member is compulsory or not - * @return A HBufC* pointing to the created listbox item text. - */ - HBufC* CreateOnOffListBoxItemL( TApMember aMember, TInt aRes, - TInt aCompulsory ); - - - /** - * Changes one setting. The setting, which is - * highlighted as current in the listbox is changed. - * @param aQuick a TBool indicating whether a 'quick' change is needed - * or not. Quick changes are not bring up any setting dialog but simply - * change the current value to the next available one. - * This can be used only for 'on/off' type settings - */ - void ChangeSettingsL( TBool aQuick ); - - - /** - * Sets the internal bearer type, list is re-arranged according to the - * newly set bearer type - * @param aBearer The new bearertype - */ - void SetBearerTypeL( TApBearerType aBearer ); - - - /** - * Inverts one boolean member of the access point - * @param aData the member to invert. - * if the member does not exists, - * or not a boolean memeber, code will _ASSERT_DEBUG - */ - void InvertSettingsL( TApMember aData ); - - - /** - * Shows a popup setting page (radio buttons) for the given member - * @param aDataMember The access point member which need to be changed - * @return A boolean indicating whether the current setting - * had been changed or not. - */ - TBool ShowPopupSettingPageL( TApMember aDataMember ); - - - /** - * Shows a popup text setting page for the given member - * @param aDataMember The access point member which need to be changed - * @return A boolean indicating whether the current setting - * had been changed or not. - */ - TBool ShowPopupTextSettingPageL( TApMember aData ); - - - /** - * Gets the text for the passed (text-type) member. - * @param aDataMember The access point member for which to get the text - * @return a HBufC* to the newly allocated text. - * Text is placed onto the CleanupStack. Ownership passed to caller. - */ - HBufC* GetTextLC( TApMember aData ); - - - /** - * Gets the resource ID for the passed (text-type) member - * along with the setting page flags - * @param aDataMember The access point member for which to get - * the resource ID - * @param aTextSettingPageFlags A reference to hold the setting - * page flags for the given member - */ - void GetTextResId( TApMember aData, TInt& apage, - TInt& aTextSettingPageFlags ); - - - /** - * Gets the resource ID for the passed (NOT text-type) member - * @param aDataMember The access point member for which to get - * the resource ID - * @param aattr A reference to hold the resource ID - * for the given member - */ - void GetResId( TApMember aData, TInt& aattr ); - - - /** - * Fills up a pop-up radio button setting page with the currently - * valid and available choices for the given member. - * @param aData The member whose chances are needed - * @param aCurrvalue The current value of the setting - * @return An array of choices for the given member, - * pushed to the CleanupStack. - */ - CDesCArrayFlat* FillPopupSettingPageLC( TApMember aData, - TInt& aCurrvalue ); - - - /** - * Updates the given member's data with the new - * setting from the setting page. - * @param aData the member to update - * @param aCurrvalue The new value - */ - void UpdateFromPopupSettingPageL( TApMember aData, - TInt aCurrvalue ); - - - /** - * Returns whether the access point in question can be saved or not. - * If a compulsory item is missing, user is prompted whether to delete - * it or to go back for re-editing. - * @param aDataNeeded If the AP can not be saved because a compulsory - * item is missing, this holds the TApMember which is not filled. - * It lists always the first item causing the 'failure'. - * @return a TSaveAction indicating whether it can be saved, - * must re-edit or must be deleted. - */ - TSaveAction CanSaveL( TApMember& aDataNeeded ); - - - /** - * Handles IP address editing of the given field - * Brings up the IP address editor page, fills up with the current - * value, handles editing and after editing, it stores the new value - * in the AP item. - * @param aData The (IP-address) member which needs to be changed - */ - void ShowPopupIpAddrSettingPageL( TApMember aData ); - - - /** - * Handles phone number editing of the given field - * Brings up the phone number editor page, fills up with the current - * value, handles editing and after editing, it stores the new value - * in the AP item. - * In case the entered phone number is invalid, an 'invalid number' - * note is shown and original value is kept. - * @param aData The (phone-number) member which needs to be changed - */ - void ShowPopupPhoneNumSettingPageL( TApMember aData ); - - - /** - * Handles password setting - * Brings up the password editor page, handles editing - * and after editing, it stores the new value in the AP item. - * @param a TApMember specifying the member - */ - void ShowPopupPasswordPageL( TApMember aData ); - - - /* - * Reads up a Boolean type data, ensures that it is in the - * required range (0 or 1) - * @param aData The member to get - * @param aInvert Whether the logic is inverted or not - * @param aCurrvalue The current value - */ - void GetBoolDataValue( TApMember aData, TBool aInvert, - TInt& aCurrvalue ); - private: - - /** - * Does the bearer change according to - * the current value of the selection - * @param a TInt specifying the current value - */ - void DoBearerChangeL( TInt aCurrvalue ); - - - /** - * Handles bearer change. - * Sets AP item bearer type, re-reads AP data, re-arranges listbox - * according to the new bearer type - * @param aBearer A TApBearerType specifying the current bearer. - */ - void HandleBearerChangeL( TApBearerType aBearer ); - - - /* - * This part holds functions available only in the case of - * 'multiple bearer support', that means that - * as long as the user does not saves the AP, multiple instances of - * the same AP are kept with different bearers... - */ - - /** - * Returns the array index for a bearer type - * @param aBearer The bearer type to get the index of - * @return The index - */ - TInt32 BearerToArrayIndexL( TApBearerType aBearer ); - - - /** - * Returns the bearer type for an index - * @param aIndex The index to get the bearer type for - * @return The bearer type - */ - TApBearerType ArrayIndexToBearer( TInt32 aIndex ); - - - /** - * Fills the passed array with the possible bearer speed values. - * Array MUST be empty to get correct result as speed values are - * simply APPENDED to the end of the list. - * Adds only valid and available values according to the current - * bearer type and call type. - * @param aItems The array to hold the bearer speed values - * @param aCurrvalue The index of the current speed value - */ - void FillUpBearerSpeedValuesL( CDesCArrayFlat& aItems, - TInt& aCurrvalue ); - - - /** - * Tries to save current access point data. - * Checks if the data can be saved: each compulsory fields are filled, - * Name is valid and does not exist already. - * If data can not be saved, pops up query about delete? Yes/No - * If user choses delete, AP will be deleted. - * If user chooses NO, the 'faulty' item will be highlighted in the - * list and it will return to the setting list, giving a chance to edit - * the faulty/missing data. - * @return Whether the 'Save' procedure had been successfull or not. - * It also means that if the user had choosen 'Delete', after deleting - * the AP it will return 'ETrue' indicating successfull operation. - */ - TBool SaveDataL( ); - - - /** - * Handles list structure changes. - * Refreshes the list of members needed to represent the current AP and - * the current settings. - */ - void HandleListStructureChangeL(); - - - /** - * This function 'limits' the connection speed after a bearertype or - * calltype change so the current bearer speed will be always valid. - */ - void LimitSpeed(); - - - /** - * Selects one item of the listbox. - * @param aItemIndex The index of the item to be select. - */ - void SelectItem( TInt aItemIndex ); - - - - /* - * Converts EParagraphDelimiter-s to /n-s - * Returned text is owned by the caller! - * @param aInText The original text where replacement is needed - * @return A new HBufC (pushed to the CleanupStack) with - * the modified text - */ - HBufC* ConvertDelimToPerNLC( const TDesC& aInText ); - - - /* - * Converts /n-s to EParagraphDelimiter-s - * Returned text is owned by the caller! - * @param aInText The original text where replacement is needed - * @return A new HBufC (pushed to the CleanupStack) with - * the modified text - */ - HBufC* ConvertPerNToDelimLC( const TDesC& aInText ); - - - /** - * Changes one setting. The setting, which is - * highlighted as current in the listbox is changed. - * @param aQuick a TBool indicating whether a 'quick' change is needed - * or not. Quick changes are not bring up any setting dialog but simply - * change the current value to the next available one. - * This can be used only for 'on/off' type settings - */ - void DoChangeSettingsL( TBool aQuick ); - - - /** - * Converts the selected speed index to the current speed value - * based on the bearer type (CSD/HSCSD) and whether it is analogue, - * ISDN v110 or ISDN v120 - * @param aCurrvalue TInt The current selection index - * @return The TApCallSpeed value - */ - TApCallSpeed GetBearerSpeedForSelection( TInt aCurrvalue ); - - - /** - * Calculates the index for the current speed value - * based on the bearer type (CSD/HSCSD) and whether it is analogue, - * ISDN v110 or ISDN v120 - * @return TInt the index of the current speed in the list - */ - TInt GetCurrIndexFromBearerSpeed( ); - - - /** - * Converts whitespace characters to spaces - * Returned text is owned by the caller! - * @param aInText The original text where replacement is needed - * @return A new HBufC (pushed to the CleanupStack) with - * the modified text - */ - HBufC* ReplaceWhiteSpaceCharactersLC( const TDesC& aInText ); - - - void ChangeNetworkGroupL(); - - - /** - * Gets the shareddata value whether HSCSD is enabled or not - * @return A TInt stating if it is enabled (1) or not (0) - */ - TInt IsHSCSDEnabledL(); - - - /** - * Gets the CSD settings array according to the passed variant - * It sets member pointers to Field, Title & Compulsory values - * @param variant Variant - */ - void GetCSDSettingArrays( TInt variant ); - - - /** - * Gets the GPRS settings array according to the passed variant - * It sets member pointers to Field, Title & Compulsory values - * @param aVariant Variant - */ - void GetGPRSSettingArrays( TInt aVariant ); - - - /** - * Gets the WLAN settings array according to the passed variant - * It sets member pointers to Field, Title & Compulsory values - * @param variant Variant - */ - void GetWLANSettingArraysL( TInt variant ); - - - /** - * Asks a query if wcdma speed had been selected. - * only checks if a speed-related member had been changed. - * @param aMember The member which had been changed - * @param aCurrValue The current value of the setting - * @return Whether the query had been accepted or not. - * Default return value is ETrue - */ - TBool AskQueryIfWcdmaL( TApMember aMember, TInt aCurrvalue ); - - - /** - * Displays the domain name servers data query - * @param AIp6 Determines whether ip4 or ip6 query is to be launched. - * Internally takes care about whether IP6 is supported or not. - * If IP4 is selected, it uses IP address editor. - * If IP6 is selected, it uses standard text editor. - * @return The result of the dialog's ExecuteLD - */ - TInt GetNameServersL( TBool aIp6 ); - - - /** - * Adds one 'Menu' listbox item (which will open another setting list) - * for the given member. - * @param aMember A TApMember value specifying which member of the - * access point had to be added to the list - * @param aRes Resource ID for the 'title text' for this member - * @param aCompulsory a TInt indicating whether - * this member is compulsory or not - */ - void AddMenuListBoxItemL( - CDesCArrayFlat& aItemArray, - TApMember aMember, - TInt aRes, - TInt aCompulsory - ); - - - /** - * Returns the current domain name server type - * It can be 3: Dynamic, Well-known, User defined - * Return values are 0, 1, 2, respectively - */ - TInt GetDomainNameServersTypeL(); - - - /** - * Pops up an IPv4 IP address multiline query - * IP address is entered into IPv4 address editors - * @return Returns the returned value of the multiline query - */ - TInt GetIpv4NameServerL(); - - - /** - * Pops up an IPv6 IP address multiline query - * IP address is entered into TEXT editors - * @return Returns the returned value of the multiline query - */ - TInt GetIpv6NameServerL(); - - - /** - * Returns the current domain name server type for IPv6 type - * It can be 3: Dynamic, Well-known, User defined - * Return values are 0, 1, 2, respectively - */ - TInt GetIPv6DNSTypeL(); - - - /** - * Returns the current domain name server type for IPv4 type - * It can be 3: Dynamic, Well-known, User defined - * Return values are 0, 1, 2, respectively - */ - TInt GetIPv4DNSTypeL(); - - - /** - * Strips non-number chars from the passed text - * @return a HBufC8 holding the new text - */ - HBufC* StripNonNumberLC( const TDesC16& aInText ); - - - /** - * Returns the index for the given bearertype in the list of - * currently available bearer types. - * Leaves with KErrNotSupported if the passed bearer type currently - * is not supported - */ - TInt BearerType2BearerItemPosL( TApBearerType aBearer ); - - - /** - * Returns the bearer type for the given position in the list of - * currently available bearer types. - * @param The position in the list - * @return The bearer type of the item bbeing in aPos position - */ - TApBearerType BearerItemPos2BearerTypeL( TInt aPos ); - - - /** - * Changes WLAN network name. - */ - void ChangeWlanNetworkNameL(); - - - /** - * Changes WLAN security settings. - * @return TInt giving exit or shutdown required if any, otherwise, 0 - */ - TInt ChangeWlanSecuritySettingsL(); - - - /** - * Changes WEP security settings. - * Leaves on errors. - * @return TInt giving exit or shutdown required if any, otherwise, 0 - */ - TInt ChangeWepSecuritySettingsL(); - - - /** - * Changes WPA security settings. - * Leaves on errors. - * @return TInt giving exit or shutdown required if any, otherwise, 0 - */ - TInt ChangeWpaSecuritySettingsL(); - - - /** - * Changes 802.1x security settings. - * Leaves on errors. - * @return TInt giving exit or shutdown required if any, otherwise, 0 - */ - TInt Change8021xSecuritySettingsL(); - - - /** - * Returns whether WLAN is supported or not. - * @return a boolean indicating whether WLAN is supported or not. - */ - TBool IsWlanSupported(); - - - /** - * Get the Wlan network name with a popup query - * @return A boolean indicating whether the current setting - * had been changed or not. - */ - TBool QueryWlanNetworkNameL(); - - - /** - * @return Whether the EApIspIPNetMask and EApIspIPGateway fields - * are visible in the settings or not. - */ - TBool IsNetMaskAndGatewayVisibleL(); - - - /** - * Returns the ad-hoc channel number asked from the user - */ - TUint32 GetAdHocChannelL(); - - - /** - * Returns whether the ad-hoc channel ID is visible or not - */ - TBool IsAdhocChannelVisible(); - - - /** - * Returns whether the security settings are filled correctly in case - * of a WLAN access point or not. - */ - TBool HasSecuritySettingsFilledL(); - - - /** - * Limits the security mode when the network mode has changed. - * In case of infrastructure, it should not be called - * In case of Ad-hoc, it should be called and it will limit the - * current security mode into the curren range, which is EOpen and EWep - * - */ - void LimitSecMode(); - - - /** - * Returns whether the access point in question can be saved or not. - * If a compulsory item is missing, user is prompted whether to quit - * without saving it or to go back for re-editing. - * @param aDataNeeded If the AP can not be saved because a compulsory - * item is missing, this holds the TApMember which is not filled. - * It lists always the first item causing the 'failure'. - * @return a TSaveAction indicating whether it can be saved, - * must re-edit or must be quited(deleted). - */ - TSaveAction CanSaveWlanCompulsoriesL( TApMember& aDataNeeded ); - - /** - * Restores Ipv4 settings to iApItem from iBackupApItem. - */ - void RestoreIpv4SettingsL(); - -protected: // Functions from base classes - - - - private: //data - TUint32* iUid; - - TUint32 iLevel; // current level - // when leaving level 0, the two indexes are stored: top & current - // to enable getting back to the same position & state - TInt iOldIndex; // current index - TInt iOldTopIndex; // top index - - TInt iAdvIndex; - - TApBearerType iBearerType; - TInt iIspFilter; - TInt iBearerFilter; - TInt iSortType; - - CEikStatusPane* iStatusPane; // NOT owned - CAknTitlePane* iTitlePane; // NOT owned - CAknNavigationControlContainer* iNaviPane; // NOT owned - CAknNavigationDecorator* iNaviDecorator; // owned - - HBufC* iOldTitleText; - - CApSettingsModel* iDataModel; // NOT owned - - CAknSettingStyleListBox* iList; // owned through resources, - // destroyed automatically - // by the dialog - - CApAccessPointItem* iApItem; // owned - CApAccessPointItem* iOldApItem; // owned - TUint32* iEventStore; - - CArrayPtrFlat* iBearerItemArray; // owned - - TApMember* iField; - TApMember* iFieldAdvanced; - TApMember* iFieldL2; - TInt iFieldCount; - TInt iAdvancedFieldCount; - TInt iFieldCountL2; - TInt* iTitles; - TInt* iTitlesAdvanced; - TInt* iTitlesL2; - TInt* iCompulsory; - TInt* iCompulsoryAdvanced; - TInt* iCompulsoryL2; - TApUiExitReason iExitReason; - - CDesCArrayFlat* iItemArray; // not owned - - CTextOverrides* iTextOverrides;// does not owns it, - // just passed for usage - CApSettingsHandlerImpl* iHandler; - - TInt iReqIpvType; // Default is IPv4 - TBool iL2Ipv4; // Default is NO - TInt iVariant; /// Local variant value - - /** - * CFeatureManagerWrapper wraps FeatureManager to eliminate maintenance - * of existance of FeatureManager. - * Owned. - */ - CFeatureManagerWrapper* iFeatureManagerWrapper; - - -#ifdef __TEST_OOMDEBUG - TBool iMemTestOn; -#endif // __TEST_OOMDEBUG - TInt iSecSettingsExitReason; - TApBearerType iOriginalBearerType; - - CApAccessPointItem* iBackupApItem; // owned - TBool iHelpSupported; - }; - -#endif - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/inc/ApSettingsHandlerConsts.h --- a/apengine/apsettingshandlerui/inc/ApSettingsHandlerConsts.h Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,86 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Contains common internal consts, typedefs for the Access Point settings. -* -*/ - - -#ifndef APSETTINGS_HANDLER_CONSTS_H -#define APSETTINGS_HANDLER_CONSTS_H - -// CONSTANTS - -#define KMaxConnNameLength 30 -#define KMaxGprsApNameLength 100 -#define KMaxLoginNameLength 50 -#define KMaxStartPageLength 1000 -#define KMaxAccessNumLength 21 -#define KCBInfoLength 21 -#define KMaxServiceCentreAddrLength 21 -#define KMaxServiceAccessNumLength 21 -#define KMaxLoginScriptLength 1000 -#define KMaxLoginPasswordLength 50 -#define KMaxModInitStringLength 50 -#define KMaxProxyServerLength 1000 -#define KMaxProxyPortNumberLength 5 -#define KMaxNetworkNameLength 50 -#define KMaxIPv6NameServerLength 40 -#define KMaxIPv4NameServerLength 12 -#define KMaxWlanNetworkameLength 32 -#define KMaxAdhocChannelNumberLength 2 -#define KAdhocChannelMin 1 -#define KAdhocChannelMax 11 - -#define KConnNameWidth 10 -#define KGprsApNameWidth 10 -#define KLoginNameWidth 10 -#define KStartPageWidth 10 -#define KAccessNumWidth 10 -#define KCBInfoWidth 10 -#define KServiceCentreAddrWidth 10 -#define KServiceAccessNumWidth 10 -#define KIpAddressWidth 10 -#define KLoginScriptWidth 10 -#define KModInitStringWidth 10 -#define KProxyServerWidth 10 -#define KProxyPortNumberWidth 10 -#define KNetworkNameWidth 10 - - -#define KConnNameLines 2 -#define KGprsApNameLines 2 -#define KLoginNameLines 2 -#define KStartPageLines 2 -#define KAccessNumLines 2 -#define KCBInfoLines 2 -#define KServiceCentreAddrLines 2 -#define KServiceAccessNumLines 2 -#define KIpAddressLines 2 -#define KLoginScriptLines 2 -#define KModInitStringLines 2 -#define KProxyServerLines 2 -#define KProxyPortNumberLines 2 -#define KNetworkNameLines 1 - - - - -#define KListQueryHeight 6 -#define KListQueryWidth 2 - -#endif - - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/inc/ApSettingsHandlerLogger.h --- a/apengine/apsettingshandlerui/inc/ApSettingsHandlerLogger.h Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,164 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Implemented logger functionality of the module -* -*/ - - -#ifndef APSETTINGSHANDLER_LOGGER_H -#define APSETTINGSHANDLER_LOGGER_H - - - -// INCLUDE FILES - -#include -#include - - -// CONSTANTS - -const TInt KApSetUIMajorVersion = 4; -const TInt KApSetUIMinorVersion = 0; -const TInt KApSetUIBuildVersion = 16; - -_LIT( KApSetUILogMessageAppBanner, "ApSetUI: (%d.%d.%d) started" ); -_LIT( KApSetUILogEnterFn, "ApSetUI: -> %S" ); -_LIT( KApSetUILogLeaveFn, "ApSetUI: <- %S" ); -_LIT( KApSetUILogExit, "ApSetUI: exit" ); -_LIT( KApSetUILogTimeFormatString, "%H:%T:%S:%*C3" ); - -// NOTE! We're depending on FLogger DLL, because it assumes the existence -// of C:\LOGS directory. -_LIT( KApSetUIFLoggerDependency, "c:\\logs\\" ); -_LIT( KApSetUIDoubleBackSlash, "\\" ); -_LIT( KApSetUILogDir, "data" ); -_LIT( KApSetUILogFile, "apui.log" ); - - - enum TApSetUiLogMask ///< Log mask bits. - { - ELogOff = 0x00000000, ///< Don't log. - EDelete = 0x00000001, ///< Log delete activity. - ESettings = 0x00000002, ///< Log Settings - EListbox = 0x00000004, ///< Log listbox activity. - EModel = 0x00000008, ///< Log Model activity. - EAPI = 0x00000010, ///< Log API activity. - EApImpl = 0x00000020, ///< Log Implementation activity. - EDialog = 0x00000040, ///< Log dialog activity. - EOther = 0x00000080, ///< Log other activity. - /* - EApItem = 0x00000040, ///< Log ApItem activity. - ECommons = 0x00000080, ///< Log transaction activity. - EActiveDb = 0x000000F0, ///< Log active db & notification - ///< activity. - */ - ESpecial = 0x0FFFF000, ///< Log special, temp stuff only - ELogAll = 0xFFFFFFFF ///< Log all. - }; - - // MACROS - - /// Determines what to log. Construct this from TApSetUiLogMask values. -// #define APSETUI_LOG_MASK ELogAll -// #define APSETUI_LOG_MASK EDelete + EModel + EListbox -// #define APSETUI_LOG_MASK EDelete + EModel -// #define APSETUI_LOG_MASK ESettings +EListbox +EModel +EAPI +EApImpl +EDialog +EOther - #define APSETUI_LOG_MASK EModel - - -#ifdef __TEST_LOGGING - #define APSETUILOGGER_CREATE { \ - TFileName path( KApSetUIFLoggerDependency ); \ - path.Append( KApSetUILogDir ); \ - path.Append( KApSetUIDoubleBackSlash ); \ - RFs& fs = CEikonEnv::Static()->FsSession(); \ - fs.MkDirAll( path ); \ - RFileLogger::WriteFormat( KApSetUILogDir, KApSetUILogFile, \ - EFileLoggingModeOverwrite, \ - KApSetUILogMessageAppBanner, \ - KApSetUIMajorVersion, \ - KApSetUIMinorVersion, \ - KApSetUIBuildVersion ); } - #define APSETUILOGGER_DELETE { \ - RFileLogger::Write( KApSetUILogDir, \ - KApSetUILogFile, \ - EFileLoggingModeAppend, \ - KApSetUILogExit ); } - #define APSETUILOGGER_ENTERFN( mask, a ) { \ - _LIT( temp, a ); \ - if (mask & APSETUI_LOG_MASK) \ - { \ - RFileLogger::WriteFormat( KApSetUILogDir, \ - KApSetUILogFile, \ - EFileLoggingModeAppend, \ - KApSetUILogEnterFn, &temp ); \ - } } - #define APSETUILOGGER_LEAVEFN( mask, a ) { \ - _LIT( temp, a ); \ - if (mask & APSETUI_LOG_MASK) \ - { \ - RFileLogger::WriteFormat( KApSetUILogDir, \ - KApSetUILogFile, \ - EFileLoggingModeAppend, \ - KApSetUILogLeaveFn, &temp ); \ - } } - #define APSETUILOGGER_WRITE( mask, a ) { \ - _LIT( temp, a ); \ - if (mask & APSETUI_LOG_MASK) \ - { \ - RFileLogger::Write( KApSetUILogDir, \ - KApSetUILogFile, \ - EFileLoggingModeAppend, temp ); \ - } } - #define APSETUILOGGER_WRITE_FORMAT( mask, a, b ) { \ - _LIT( temp, a ); \ - if (mask & APSETUI_LOG_MASK) \ - { \ - RFileLogger::WriteFormat( KApSetUILogDir, \ - KApSetUILogFile, \ - EFileLoggingModeAppend, \ - temp, b ); \ - } } - #define APSETUILOGGER_WRITE_TIMESTAMP( mask, a ) { \ - _LIT( temp, a ); \ - if (mask & APSETUI_LOG_MASK) \ - { \ - TTime time; TBuf<48> buf; time.HomeTime(); \ - time.FormatL( buf, KApSetUILogTimeFormatString ); \ - buf.Insert( 0, temp ); \ - RFileLogger::Write( KApSetUILogDir, KApSetUILogFile, \ - EFileLoggingModeAppend, buf); \ - } } - #define APSETUILOGGER_WRITE_BUF( mask, a ) { \ - if (mask & APSETUI_LOG_MASK) \ - { \ - RFileLogger::Write( KApSetUILogDir, KApSetUILogFile, \ - EFileLoggingModeAppend, a); \ - } } -#else - #define APSETUILOGGER_CREATE {} - #define APSETUILOGGER_DELETE {} - #define APSETUILOGGER_ENTERFN( mask, a ) {} - #define APSETUILOGGER_LEAVEFN( mask, a ) {} - #define APSETUILOGGER_WRITE( mask, a ) {} - #define APSETUILOGGER_WRITE_FORMAT( mask, a, b ) {} - #define APSETUILOGGER_WRITE_TIMESTAMP( mask, a ) {} - #define APSETUILOGGER_WRITE_BUF( mask, a ) {} -#endif // __TEST_LOGGING - -#endif // APSETTINGSHANDLER_LOGGER_H - -// End of file diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/inc/ApSettingsHandlerUI.hrh --- a/apengine/apsettingshandlerui/inc/ApSettingsHandlerUI.hrh Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,62 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* This file contains declarations for resources of ApSettingsHandlerUi. -* The file can be included in C++ or resource file. -* -*/ - - -#ifndef APSETTINGSHANDLER_HRH -#define APSETTINGSHANDLER_HRH - -#define KApSelectorListboxType 16543 -#define KApSettingsListboxType 6544 - -enum TApSelectorMenuCommands - { - EApSelCmdSelect = 1234, - EApSelCmdOpen, - EApSelCmdNew, - EApSelCmdNewBlank, - EApSelCmdNewUseExisting, - EApSelCmdDelete, - EApSelCmdExit, - EApSelCmdChange, - EApSelCmdAdvanced, - - // query commands - EApUiCmdRetry, - EApUiCmdCancel, - - EApSelCmdQuickChange - }; - - - - -enum TApSelectorDllDlgLineId // dialog line IDs - { - KApSelectorListboxId = 2, - KApSettingsListboxId, - KApGeneralNote, - KApWaitNote - }; - - - - -#endif // APSELECTOR - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/inc/ApSettingsHandlerUiPrivateCRKeys.h --- a/apengine/apsettingshandlerui/inc/ApSettingsHandlerUiPrivateCRKeys.h Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -#ifndef APSETTINGSHANDLERUIPRIVATECRKEYS_H -#define APSETTINGSHANDLERUIPRIVATECRKEYS_H - -const TUid KCRUidApSettingsHandlerUiLV = {0x10008D3B}; - -// Local variation for ApSettingsHandlerUi -const TUint32 KApSettingsHandlerUiLVFlags = 0x00000001; - - -#endif // APSETTINGSHANDLERUIPRIVATECRKEYS_H \ No newline at end of file diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/inc/ApSettingsLookups.h --- a/apengine/apsettingshandlerui/inc/ApSettingsLookups.h Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,981 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* This file containes the lookup-information for the ApSettingsDlg. -* Gives the order of the fields, number of the fields, etc. -* -*/ - - - -#ifndef APSETTINGS_LOOKUPS_H -#define APSETTINGS_LOOKUPS_H - -// INCLUDE FILES -#include -#include - -#include - - -// CONSTANTS -const TInt KListIndexConnectionName = 0; -const TInt KListIndexBearerType = 1; -const TInt KListIndexCSDAccessNumber = 2; - -const TInt KListIndexWLANNetworkName = 2; - -const TInt KListIndexWLANSubnetMask = 1; -const TInt KListIndexWLANDefaultGateway = 2; -const TInt KListIndexWLANSecuritySettings = 6; - - - -const TInt KApMember = 0; -const TInt KResourceID = 1; -const TInt KCompulsory = 2; - - - - - - - -const TInt Fields_CSD_L2_IPv4[3][2] = - { - { - EApIspIPAddr, ///< Phone IP addr. - EApIP6DNSAddrFromServer ///< Domain name servers - }, - { - R_APUI_VIEW_PHONE_IP_ADDR, ///< Phone IP addr. - R_APUI_VIEW_SET_DNS_SERVERS_IP ///< Domain name servers - }, - { - 0, ///< Phone IP addr. - 0 ///< Domain name servers - } - }; - - -const TInt Fields_CSD_L2_IPv6[3][1] = - { - { - EApIP6DNSAddrFromServer ///< Domain name servers - }, - { - R_APUI_VIEW_SET_DNS_SERVERS_IP ///< Domain name servers - }, - { - 0 ///< Domain name servers - } - }; - - - -//---------------------------------------------------------- -// Settings with the KWSPSettingsVisible flag defined -//---------------------------------------------------------- -// -const TInt Fields_GPRS_WSP[3][8] = - { - { - EApWapAccessPointName, ///< Connection name - EApWapCurrentBearer, ///< Bearer type - - EApGprsAccessPointName, ///< Access Point Name - EApIspIfAuthName, // username - EApIspPromptForLogin, ///< prompt password - EApIspIfAuthPass, // password - EApGprsDisablePlainTextAuth,///< password authentication - EApWapStartPage ///< Starting Page - }, - { - R_APUI_VIEW_CONNECTION_NAME, ///< Connection name - R_APUI_VIEW_BEARER_TYPE, ///< Bearer type - R_APUI_VIEW_AP_NAME, ///< Access Point Name - R_APUI_VIEW_USER_NAME, ///< username - R_APUI_VIEW_PROMPT_PASSWORD, ///< prompt password - R_APUI_VIEW_PASSWORD, ///< password - R_APUI_VIEW_PASSWORD_AUTH, ///< password authentication - R_APUI_VIEW_STARTING_PAGE ///< Starting Page - }, - { - 1, ///< Connection name - 0, ///< Bearer type - 0, ///< Access Point Name - 0, ///< username - 0, ///< prompt password - 0, ///< password - 0, ///< password authentication - 0 ///< Starting Page - } - }; - - - -const TInt Fields_GPRS_Advanced_WSP[3][8] = - { - { - EApIspIPAddr, ///< Phone IP addr. - EApGprsIPNameServer1, ///< Primary Name server - EApGprsIPNameServer2, ///< Secondary Name server - EApProxyServerAddress, ///< Proxy server address - EApProxyPortNumber, ///< Proxy port number - EApWapGatewayAddress, ///< Wap Gateway IP address - EApWapSecurity, ///< WTLS Security - EApWapWspOption ///< Connection type - }, - { - R_APUI_VIEW_PHONE_IP_ADDR, ///< Phone IP addr. - R_APUI_VIEW_PRIMARY_NAME_SERVER, ///< Primary Name server - R_APUI_VIEW_SECONDARY_NAME_SERVER, ///< Secondary Name server - R_APUI_VIEW_PROXY_SERVER_ADDR, ///< Proxy server address - R_APUI_VIEW_PROXY_PORT_NUMBER, ///< Proxy port number - R_APUI_VIEW_WAP_GW_IP_ADDR, ///< Wap Gateway IP address - R_APUI_VIEW_WTLS_SECURITY, ///< WTLS Security - R_APUI_VIEW_CONNECTION_TYPE ///< Connection type - }, - { - 0, ///< Phone IP addr. - 0, ///< Primary Name server - 0, ///< Secondary Name server - 0, ///< Proxy server address - 0, ///< Proxy port number - 0, ///< Wap Gateway IP address - 0, ///< WTLS Security - 0 ///< Connection type - } - }; - - - -const TInt Fields_CSD_WSP[3][10] = - { - { - EApWapAccessPointName, ///< Connection name - EApWapCurrentBearer, ///< Bearer type - - EApIspDefaultTelNumber, ///< Access Number - EApIspIfAuthName, // username - EApIspPromptForLogin, ///< prompt password - EApIspIfAuthPass, // password - EApGprsDisablePlainTextAuth, ///< password authentication - EApWapStartPage, ///< Starting Page - EApIspBearerCallTypeIsdn, ///< Data call type - ///< (analogue/ISDN110/ISDN120) - EApIspBearerSpeed ///< Max. connection speed - }, - { - R_APUI_VIEW_CONNECTION_NAME, ///< Connection name - R_APUI_VIEW_BEARER_TYPE, ///< Bearer type - R_APUI_VIEW_ACCESS_NUMBER, ///< Access Number - R_APUI_VIEW_USER_NAME, ///< username - R_APUI_VIEW_PROMPT_PASSWORD, ///< prompt password - R_APUI_VIEW_PASSWORD, ///< password - R_APUI_VIEW_PASSWORD_AUTH, ///< password authentication - R_APUI_VIEW_STARTING_PAGE, ///< Starting Page - R_APUI_VIEW_DATA_CALL_TYPE, ///< Data call type (analogue/ISDN) - R_APUI_VIEW_MAX_CONN_SPEED ///< Max. connection speed - }, - { - 1, ///< Connection name - 0, ///< Bearer type - 1, ///< Access Number - 0, ///< username - 0, ///< prompt password - 0, ///< password - 0, ///< password authentication - 0, ///< Starting Page - 0, ///< Data call type (analogue/ISDN) - 0 ///< Max. connection speed - } - }; - - -const TInt Fields_CSD_Advanced_WSP[3][15] = - { - { - EApIspIPAddr, ///< Phone IP addr. - EApGprsIPNameServer1, ///< Primary Name server - EApGprsIPNameServer2, ///< Secondary Name server - EApProxyServerAddress, ///< Proxy server address - EApProxyPortNumber, ///< Proxy port number - EApIspIfCallbackEnabled, ///< use callback - EApIspIfCallbackType, ///< call back type - EApIspIfCallbackInfo, ///< call back number - EApIspEnableSWCompression, ///< Enable SW compression - EApIspUseLoginScript, ///< Use login script - EApIspLoginScript, ///< The login script - EApIspInitString, ///< Modem init string - EApWapGatewayAddress, ///< Wap Gateway IP address - EApWapSecurity, ///< WTLS Security - EApWapWspOption ///< Connection type - }, - { - R_APUI_VIEW_PHONE_IP_ADDR, ///< Phone IP addr. - R_APUI_VIEW_PRIMARY_NAME_SERVER, ///< Primary Name server - R_APUI_VIEW_SECONDARY_NAME_SERVER, ///< Secondary Name server - R_APUI_VIEW_PROXY_SERVER_ADDR, ///< Proxy server address - R_APUI_VIEW_PROXY_PORT_NUMBER, ///< Proxy port number - R_APUI_VIEW_USE_CALL_BACK, ///< use callback - R_APUI_VIEW_CALL_BACK_TYPE, ///< call back type - R_APUI_VIEW_CALL_BACK_NUMBER, ///< call back number - R_APUI_VIEW_ENABLE_PPP_COMP, ///< Enable PPP compression - R_APUI_VIEW_USE_LOGIN_SCRIPT, ///< Use login script - R_APUI_VIEW_LOGIN_SCRIPT, ///< The login script - R_APUI_VIEW_MODEM_INIT_STRING, ///< Modem init string - R_APUI_VIEW_WAP_GW_IP_ADDR, ///< Wap Gateway IP address - R_APUI_VIEW_WTLS_SECURITY, ///< WTLS Security - R_APUI_VIEW_CONNECTION_TYPE ///< Connection type - }, - { - 0, ///< Phone IP addr. - 0, ///< Primary Name server - 0, ///< Secondary Name server - 0, ///< Proxy server address - 0, ///< Proxy port number - 0, ///< use callback - 0, ///< call back type - 0, ///< call back number - 0, ///< Enable PPP compression - 0, ///< Use login script - 0, ///< The login script - 0, ///< Modem init string - 0, ///< Wap Gateway IP address - 0, ///< WTLS Security - 0 ///< Connection type - } - }; - - - - - - -//---------------------------------------------------------- -// Normal settings, no flags defined -//---------------------------------------------------------- -// -const TInt Fields_GPRS[3][8] = - { - { - EApWapAccessPointName, ///< Connection name - EApWapCurrentBearer, ///< Bearer type - - EApGprsAccessPointName, ///< Access Point Name - EApIspIfAuthName, // username - EApIspPromptForLogin, ///< prompt password - EApIspIfAuthPass, // password - EApGprsDisablePlainTextAuth,///< password authentication - EApWapStartPage ///< Starting Page - }, - { - R_APUI_VIEW_CONNECTION_NAME, ///< Connection name - R_APUI_VIEW_BEARER_TYPE, ///< Bearer type - R_APUI_VIEW_AP_NAME, ///< Access Point Name - R_APUI_VIEW_USER_NAME, ///< username - R_APUI_VIEW_PROMPT_PASSWORD, ///< prompt password - R_APUI_VIEW_PASSWORD, ///< password - R_APUI_VIEW_PASSWORD_AUTH, ///< password authentication - R_APUI_VIEW_STARTING_PAGE ///< Starting Page - }, - { - 1, ///< Connection name - 0, ///< Bearer type - 0, ///< Access Point Name - 0, ///< username - 0, ///< prompt password - 0, ///< password - 0, ///< password authentication - 0 ///< Starting Page - } - }; - - - -const TInt Fields_GPRS_Advanced[3][5] = - { - { - EApIspIPAddr, ///< Phone IP addr. - EApGprsIPNameServer1, ///< Primary Name server - EApGprsIPNameServer2, ///< Secondary Name server - EApProxyServerAddress, ///< Proxy server address - EApProxyPortNumber ///< Proxy port number - }, - { - R_APUI_VIEW_PHONE_IP_ADDR, ///< Phone IP addr. - R_APUI_VIEW_PRIMARY_NAME_SERVER, ///< Primary Name server - R_APUI_VIEW_SECONDARY_NAME_SERVER, ///< Secondary Name server - R_APUI_VIEW_PROXY_SERVER_ADDR, ///< Proxy server address - R_APUI_VIEW_PROXY_PORT_NUMBER ///< Proxy port number - }, - { - 0, ///< Phone IP addr. - 0, ///< Primary Name server - 0, ///< Secondary Name server - 0, ///< Proxy server address - 0 ///< Proxy port number - } - }; - - - -const TInt Fields_CSD[3][10] = - { - { - EApWapAccessPointName, ///< Connection name - EApWapCurrentBearer, ///< Bearer type - - EApIspDefaultTelNumber, ///< Access Number - EApIspIfAuthName, // username - EApIspPromptForLogin, ///< prompt password - EApIspIfAuthPass, // password - EApGprsDisablePlainTextAuth, ///< password authentication - EApWapStartPage, ///< Starting Page - EApIspBearerCallTypeIsdn, ///< Data call type - ///< (analogue/ISDN110/ISDN120) - EApIspBearerSpeed ///< Max. connection speed - }, - { - R_APUI_VIEW_CONNECTION_NAME, ///< Connection name - R_APUI_VIEW_BEARER_TYPE, ///< Bearer type - R_APUI_VIEW_ACCESS_NUMBER, ///< Access Number - R_APUI_VIEW_USER_NAME, ///< username - R_APUI_VIEW_PROMPT_PASSWORD, ///< prompt password - R_APUI_VIEW_PASSWORD, ///< password - R_APUI_VIEW_PASSWORD_AUTH, ///< password authentication - R_APUI_VIEW_STARTING_PAGE, ///< Starting Page - R_APUI_VIEW_DATA_CALL_TYPE, ///< Data call type - ///< (analogue/ISDN) - R_APUI_VIEW_MAX_CONN_SPEED ///< Max. connection speed - }, - { - 1, ///< Connection name - 0, ///< Bearer type - 1, ///< Access Number - 0, ///< username - 0, ///< prompt password - 0, ///< password - 0, ///< password authentication - 0, ///< Starting Page - 0, ///< Data call type (analogue/ISDN) - 0 ///< Max. connection speed - } - }; - - - -const TInt Fields_CSD_Advanced[3][12] = - { - { - EApIspIPAddr, ///< Phone IP addr. - EApGprsIPNameServer1, ///< Primary Name server - EApGprsIPNameServer2, ///< Secondary Name server - EApProxyServerAddress, ///< Proxy server address - EApProxyPortNumber, ///< Proxy port number - EApIspIfCallbackEnabled, ///< use callback - EApIspIfCallbackType, ///< call back type - EApIspIfCallbackInfo, ///< call back number - EApIspEnableSWCompression, ///< Enable SW compression - EApIspUseLoginScript, ///< Use login script - EApIspLoginScript, ///< The login script - EApIspInitString ///< Modem init string - }, - { - R_APUI_VIEW_PHONE_IP_ADDR, ///< Phone IP addr. - R_APUI_VIEW_PRIMARY_NAME_SERVER, ///< Primary Name server - R_APUI_VIEW_SECONDARY_NAME_SERVER, ///< Secondary Name server - R_APUI_VIEW_PROXY_SERVER_ADDR, ///< Proxy server address - R_APUI_VIEW_PROXY_PORT_NUMBER, ///< Proxy port number - R_APUI_VIEW_USE_CALL_BACK, ///< use callback - R_APUI_VIEW_CALL_BACK_TYPE, ///< call back type - R_APUI_VIEW_CALL_BACK_NUMBER, ///< call back number - R_APUI_VIEW_ENABLE_PPP_COMP, ///< Enable PPP compression - R_APUI_VIEW_USE_LOGIN_SCRIPT, ///< Use login script - R_APUI_VIEW_LOGIN_SCRIPT, ///< The login script - R_APUI_VIEW_MODEM_INIT_STRING ///< Modem init string - }, - { - 0, ///< Phone IP addr. - 0, ///< Primary Name server - 0, ///< Secondary Name server - 0, ///< Proxy server address - 0, ///< Proxy port number - 0, ///< use callback - 0, ///< call back type - 0, ///< call back number - 0, ///< Enable PPP compression - 0, ///< Use login script - 0, ///< The login script - 0 ///< Modem init string - } - }; - - - - - - - - - - - - -//---------------------------------------------------------- -// Settings with the KWSPSettingsVisible flag defined -// AND IPv6 Support enabled -//---------------------------------------------------------- -// -const TInt Fields_GPRS_WSP_IPv6[3][8] = - { - { - EApWapAccessPointName, ///< Connection name - EApWapCurrentBearer, ///< Bearer type - - EApGprsAccessPointName, ///< Access Point Name - EApIspIfAuthName, // username - EApIspPromptForLogin, ///< prompt password - EApIspIfAuthPass, // password - EApGprsDisablePlainTextAuth,///< password authentication - EApWapStartPage ///< Starting Page - }, - { - R_APUI_VIEW_CONNECTION_NAME, ///< Connection name - R_APUI_VIEW_BEARER_TYPE, ///< Bearer type - R_APUI_VIEW_AP_NAME, ///< Access Point Name - R_APUI_VIEW_USER_NAME, ///< username - R_APUI_VIEW_PROMPT_PASSWORD, ///< prompt password - R_APUI_VIEW_PASSWORD, ///< password - R_APUI_VIEW_PASSWORD_AUTH, ///< password authentication - R_APUI_VIEW_STARTING_PAGE ///< Starting Page - }, - { - 1, ///< Connection name - 0, ///< Bearer type - 0, ///< Access Point Name - 0, ///< username - 0, ///< prompt password - 0, ///< password - 0, ///< password authentication - 0 ///< Starting Page - } - }; - - - -const TInt Fields_GPRS_Advanced_WSP_IPv6[3][8] = - { - { - EApGprsPdpType, ///< PDP type, IPv4 or IPv6 - EApIspIPAddr, ///< Phone IP addr. - EApIP6DNSAddrFromServer, ///< Domain name servers - EApProxyServerAddress, ///< Proxy server address - EApProxyPortNumber, ///< Proxy port number - EApWapGatewayAddress, ///< Wap Gateway IP address - EApWapSecurity, ///< WTLS Security - EApWapWspOption ///< Connection type - }, - { - R_APUI_VIEW_PDP_TYPE, ///< PDP type, IPv4 or IPv6 - R_APUI_VIEW_PHONE_IP_ADDR, ///< Phone IP addr. - R_APUI_VIEW_SET_DNS_SERVERS_IP, ///< Domain name servers - R_APUI_VIEW_PROXY_SERVER_ADDR, ///< Proxy server address - R_APUI_VIEW_PROXY_PORT_NUMBER, ///< Proxy port number - R_APUI_VIEW_WAP_GW_IP_ADDR, ///< Wap Gateway IP address - R_APUI_VIEW_WTLS_SECURITY, ///< WTLS Security - R_APUI_VIEW_CONNECTION_TYPE ///< Connection type - }, - { - 0, ///< PDP type, IPv4 or IPv6 - 0, ///< Phone IP addr. - 0, ///< Domain name servers - 0, ///< Proxy server address - 0, ///< Proxy port number - 0, ///< Wap Gateway IP address - 0, ///< WTLS Security - 0 ///< Connection type - } - }; - - - - -const TInt Fields_CSD_WSP_IPv6[3][10] = - { - { - EApWapAccessPointName, ///< Connection name - EApWapCurrentBearer, ///< Bearer type - - EApIspDefaultTelNumber, ///< Access Number - EApIspIfAuthName, // username - EApIspPromptForLogin, ///< prompt password - EApIspIfAuthPass, // password - EApGprsDisablePlainTextAuth, ///< password authentication - EApWapStartPage, ///< Starting Page - EApIspBearerCallTypeIsdn, ///< Data call type - ///< (analogue/ISDN110/ISDN120) - EApIspBearerSpeed ///< Max. connection speed - }, - { - R_APUI_VIEW_CONNECTION_NAME, ///< Connection name - R_APUI_VIEW_BEARER_TYPE, ///< Bearer type - R_APUI_VIEW_ACCESS_NUMBER, ///< Access Number - R_APUI_VIEW_USER_NAME, ///< username - R_APUI_VIEW_PROMPT_PASSWORD, ///< prompt password - R_APUI_VIEW_PASSWORD, ///< password - R_APUI_VIEW_PASSWORD_AUTH, ///< password authentication - R_APUI_VIEW_STARTING_PAGE, ///< Starting Page - R_APUI_VIEW_DATA_CALL_TYPE, ///< Data call type (analogue/ISDN) - R_APUI_VIEW_MAX_CONN_SPEED ///< Max. connection speed - }, - { - 1, ///< Connection name - 0, ///< Bearer type - 1, ///< Access Number - 0, ///< username - 0, ///< prompt password - 0, ///< password - 0, ///< password authentication - 0, ///< Starting Page - 0, ///< Data call type (analogue/ISDN) - 0 ///< Max. connection speed - } - }; - - -const TInt Fields_CSD_Advanced_WSP_IPv6[3][14] = - { - { - EApIpv4Settings, ///< Ipv4 Settings - EApIpv6Settings, ///< Ipv6 Settings - EApProxyServerAddress, ///< Proxy server address - EApProxyPortNumber, ///< Proxy port number - EApIspIfCallbackEnabled, ///< use callback - EApIspIfCallbackType, ///< call back type - EApIspIfCallbackInfo, ///< call back number - EApIspEnableSWCompression, ///< Enable SW compression - EApIspUseLoginScript, ///< Use login script - EApIspLoginScript, ///< The login script - EApIspInitString, ///< Modem init string - EApWapGatewayAddress, ///< Wap Gateway IP address - EApWapSecurity, ///< WTLS Security - EApWapWspOption ///< Connection type - }, - { - R_APUI_VIEW_IPV4_SETTINGS, ///< Ipv4 Settings - R_APUI_VIEW_IPV6_SETTINGS, ///< Ipv6 Settings - R_APUI_VIEW_PROXY_SERVER_ADDR, ///< Proxy server address - R_APUI_VIEW_PROXY_PORT_NUMBER, ///< Proxy port number - R_APUI_VIEW_USE_CALL_BACK, ///< use callback - R_APUI_VIEW_CALL_BACK_TYPE, ///< call back type - R_APUI_VIEW_CALL_BACK_NUMBER, ///< call back number - R_APUI_VIEW_ENABLE_PPP_COMP, ///< Enable PPP compression - R_APUI_VIEW_USE_LOGIN_SCRIPT, ///< Use login script - R_APUI_VIEW_LOGIN_SCRIPT, ///< The login script - R_APUI_VIEW_MODEM_INIT_STRING, ///< Modem init string - R_APUI_VIEW_WAP_GW_IP_ADDR, ///< Wap Gateway IP address - R_APUI_VIEW_WTLS_SECURITY, ///< WTLS Security - R_APUI_VIEW_CONNECTION_TYPE ///< Connection type - }, - { - 0, ///< Ipv4 Settings - 0, ///< Ipv6 Settings - 0, ///< Proxy server address - 0, ///< Proxy port number - 0, ///< use callback - 0, ///< call back type - 0, ///< call back number - 0, ///< Enable PPP compression - 0, ///< Use login script - 0, ///< The login script - 0, ///< Modem init string - 0, ///< Wap Gateway IP address - 0, ///< WTLS Security - 0 ///< Connection type - } - }; - - - - - - - - - -//---------------------------------------------------------- -// Normal settings, only Ipv6 defined -//---------------------------------------------------------- -// -const TInt Fields_GPRS_IPv6[3][8] = - { - { - EApWapAccessPointName, ///< Connection name - EApWapCurrentBearer, ///< Bearer type - - EApGprsAccessPointName, ///< Access Point Name - EApIspIfAuthName, // username - EApIspPromptForLogin, ///< prompt password - EApIspIfAuthPass, // password - EApGprsDisablePlainTextAuth,///< password authentication - EApWapStartPage ///< Starting Page - }, - { - R_APUI_VIEW_CONNECTION_NAME, ///< Connection name - R_APUI_VIEW_BEARER_TYPE, ///< Bearer type - R_APUI_VIEW_AP_NAME, ///< Access Point Name - R_APUI_VIEW_USER_NAME, ///< username - R_APUI_VIEW_PROMPT_PASSWORD, ///< prompt password - R_APUI_VIEW_PASSWORD, ///< password - R_APUI_VIEW_PASSWORD_AUTH, ///< password authentication - R_APUI_VIEW_STARTING_PAGE ///< Starting Page - }, - { - 1, ///< Connection name - 0, ///< Bearer type - 0, ///< Access Point Name - 0, ///< username - 0, ///< prompt password - 0, ///< password - 0, ///< password authentication - 0 ///< Starting Page - } - }; - - - -const TInt Fields_GPRS_Advanced_IPv6[3][5] = - { - { - EApGprsPdpType, ///< PDP type, IPv4 or IPv6 - EApIspIPAddr, ///< Phone IP addr. - EApIP6DNSAddrFromServer, ///< Domain name servers - EApProxyServerAddress, ///< Proxy server address - EApProxyPortNumber ///< Proxy port number - }, - { - R_APUI_VIEW_PDP_TYPE, ///< PDP type, IPv4 or IPv6 - R_APUI_VIEW_PHONE_IP_ADDR, ///< Phone IP addr. - R_APUI_VIEW_SET_DNS_SERVERS_IP, ///< Domain name servers - R_APUI_VIEW_PROXY_SERVER_ADDR, ///< Proxy server address - R_APUI_VIEW_PROXY_PORT_NUMBER ///< Proxy port number - }, - { - 0, ///< PDP type, IPv4 or IPv6 - 0, ///< Phone IP addr. - 0, ///< Domain name servers - 0, ///< Proxy server address - 0 ///< Proxy port number - } - }; - - - -const TInt Fields_CSD_IPv6[3][10] = - { - { - EApWapAccessPointName, ///< Connection name - EApWapCurrentBearer, ///< Bearer type - - EApIspDefaultTelNumber, ///< Access Number - EApIspIfAuthName, ///< username - EApIspPromptForLogin, ///< prompt password - EApIspIfAuthPass, ///< password - EApGprsDisablePlainTextAuth, ///< password authentication - EApWapStartPage, ///< Starting Page - EApIspBearerCallTypeIsdn, ///< Data call type - ///< (analogue/ISDN110/ISDN120) - EApIspBearerSpeed ///< Max. connection speed - }, - { - R_APUI_VIEW_CONNECTION_NAME, ///< Connection name - R_APUI_VIEW_BEARER_TYPE, ///< Bearer type - R_APUI_VIEW_ACCESS_NUMBER, ///< Access Number - R_APUI_VIEW_USER_NAME, ///< username - R_APUI_VIEW_PROMPT_PASSWORD, ///< prompt password - R_APUI_VIEW_PASSWORD, ///< password - R_APUI_VIEW_PASSWORD_AUTH, ///< password authentication - R_APUI_VIEW_STARTING_PAGE, ///< Starting Page - R_APUI_VIEW_DATA_CALL_TYPE, ///< Data call type (analogue/ISDN) - R_APUI_VIEW_MAX_CONN_SPEED ///< Max. connection speed - }, - { - 1, ///< Connection name - 0, ///< Bearer type - 1, ///< Access Number - 0, ///< username - 0, ///< prompt password - 0, ///< password - 0, ///< password authentication - 0, ///< Starting Page - 0, ///< Data call type (analogue/ISDN) - 0 ///< Max. connection speed - } - }; - - - -const TInt Fields_CSD_Advanced_IPv6[3][11] = - { - { - EApIpv4Settings, ///< Ipv4 Settings - EApIpv6Settings, ///< Ipv6 Settings - EApProxyServerAddress, ///< Proxy server address - EApProxyPortNumber, ///< Proxy port number - EApIspIfCallbackEnabled, ///< use callback - EApIspIfCallbackType, ///< call back type - EApIspIfCallbackInfo, ///< call back number - EApIspEnableSWCompression, ///< Enable SW compression - EApIspUseLoginScript, ///< Use login script - EApIspLoginScript, ///< The login script - EApIspInitString ///< Modem init string - }, - { - R_APUI_VIEW_IPV4_SETTINGS, ///< Ipv4 Settings - R_APUI_VIEW_IPV6_SETTINGS, ///< Ipv6 Settings - R_APUI_VIEW_PROXY_SERVER_ADDR, ///< Proxy server address - R_APUI_VIEW_PROXY_PORT_NUMBER, ///< Proxy port number - R_APUI_VIEW_USE_CALL_BACK, ///< use callback - R_APUI_VIEW_CALL_BACK_TYPE, ///< call back type - R_APUI_VIEW_CALL_BACK_NUMBER, ///< call back number - R_APUI_VIEW_ENABLE_PPP_COMP, ///< Enable PPP compression - R_APUI_VIEW_USE_LOGIN_SCRIPT, ///< Use login script - R_APUI_VIEW_LOGIN_SCRIPT, ///< The login script - R_APUI_VIEW_MODEM_INIT_STRING ///< Modem init string - }, - { - 0, ///< Ipv4 Settings - 0, ///< Ipv6 Settings - 0, ///< Proxy server address - 0, ///< Proxy port number - 0, ///< use callback - 0, ///< call back type - 0, ///< call back number - 0, ///< Enable PPP compression - 0, ///< Use login script - 0, ///< The login script - 0 ///< Modem init string - } - }; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -const TInt Fields_WLAN_IPv6[3][8] = - { - { - EApWapAccessPointName, ///< Connection name - EApWapCurrentBearer, ///< Bearer type - EApWlanNetworkName, ///< The network name - EApWlanScanSSID, ///< need to scan the SSID? - EApWlanNetworkMode, ///< Gives network mode - EApWlanSecurityMode, ///< The security mode - EApWlanSecuritySettings, ///< The security settings menu - EApWapStartPage ///< Starting Page - }, - { - R_APUI_VIEW_CONNECTION_NAME, ///< Connection name - R_APUI_VIEW_BEARER_TYPE, ///< Bearer type - R_APUI_VIEW_WLAN_NETWORK_NAME, ///< The network name - R_APUI_VIEW_WLAN_HIDDEN_NETWORK, ///< need to scan the SSID? - R_APUI_VIEW_WLAN_NETWORK_MODE, ///< The network mode - R_APUI_VIEW_WLAN_SECURITY_MODE, ///< The security mode - R_APUI_VIEW_WLAN_SECURITY_SETTINGS, ///< The security settings menu - R_APUI_VIEW_STARTING_PAGE ///< Starting Page - }, - { - 1, ///< Connection name - 0, ///< Bearer type - 1, ///< The network name - 0, ///< need to scan the SSID - 0, ///< Gives network mode - 0, ///< The security mode - 0, ///< The security settings menu - 0 ///< Starting Page - } - }; - - - -const TInt Fields_WLAN_Advanced_IPv6[3][5] = - { - { - EApIpv4Settings, ///< Ipv4 Settings - EApIpv6Settings, ///< Ipv6 Settings - EApWlanChannelId, ///< Ad-hoc channel auto/userdef. - EApProxyServerAddress, ///< Proxy server address - EApProxyPortNumber ///< Proxy port number - }, - { - R_APUI_VIEW_IPV4_SETTINGS, ///< Ipv4 Settings - R_APUI_VIEW_IPV6_SETTINGS, ///< Ipv6 Settings - R_APUI_VIEW_AD_HOC, ///< Ad-hoc channel auto/userdef. - R_APUI_VIEW_PROXY_SERVER_ADDR, ///< Proxy server address - R_APUI_VIEW_PROXY_PORT_NUMBER ///< Proxy port number - }, - { - 0, ///< Ipv4 Settings - 0, ///< Ipv6 Settings - 0, ///< Ad-hoc channel auto/userdef. - 0, ///< Proxy server address - 0 ///< Proxy port number - } - }; - - - - -const TInt Fields_WLAN_IPv4[3][8] = - { - { - EApWapAccessPointName, ///< Connection name - EApWapCurrentBearer, ///< Bearer type - EApWlanNetworkName, ///< The network name - EApWlanScanSSID, ///< need to scan the SSID? - EApWlanNetworkMode, ///< Gives network mode - EApWlanSecurityMode, ///< The security mode - EApWlanSecuritySettings, ///< The security settings menu - EApWapStartPage ///< Starting Page - }, - { - R_APUI_VIEW_CONNECTION_NAME, ///< Connection name - R_APUI_VIEW_BEARER_TYPE, ///< Bearer type - R_APUI_VIEW_WLAN_NETWORK_NAME, ///< The network name - R_APUI_VIEW_WLAN_HIDDEN_NETWORK, ///< need to scan the SSID? - R_APUI_VIEW_WLAN_NETWORK_MODE, ///< The network mode - R_APUI_VIEW_WLAN_SECURITY_MODE, ///< The security mode - R_APUI_VIEW_WLAN_SECURITY_SETTINGS, ///< The security settings menu - R_APUI_VIEW_STARTING_PAGE ///< Starting Page - }, - { - 1, ///< Connection name - 0, ///< Bearer type - 1, ///< The network name - 0, ///< need to scan the SSID - 0, ///< Gives network mode - 0, ///< The security mode - 0, ///< The security settings menu - 0 ///< Starting Page - } - }; - - -const TInt Fields_WLAN_Advanced_IPv4[3][8] = - { - { - EApIspIPAddr, ///< Phone IP addr. - EApIspIPNetMask, ///< Subnet mask - EApIspIPGateway, ///< IP address of gateway - EApGprsIPNameServer1, ///< Primary Name server - EApGprsIPNameServer2, ///< Secondary Name server - EApWlanChannelId, ///< Ad-hoc channel auto/userdef. - EApProxyServerAddress, ///< Proxy server address - EApProxyPortNumber ///< Proxy port number - }, - { - R_APUI_VIEW_PHONE_IP_ADDR, ///< Phone IP addr. - R_APUI_NETMASK, ///< Subnet mask - R_APUI_IP_GATEWAY, ///< IP address of gateway - R_APUI_VIEW_PRIMARY_NAME_SERVER, ///< Primary Name server - R_APUI_VIEW_SECONDARY_NAME_SERVER, ///< Secondary Name server - R_APUI_VIEW_AD_HOC, ///< Ad-hoc channel auto/userdef. - R_APUI_VIEW_PROXY_SERVER_ADDR, ///< Proxy server address - R_APUI_VIEW_PROXY_PORT_NUMBER ///< Proxy port number - }, - { - 0, ///< Phone IP addr. - 1, ///< Subnet mask - 1, ///< IP address of gateway - 0, ///< Primary Name server - 0, ///< Secondary Name server - 0, ///< Ad-hoc channel auto/userdef. - 0, ///< Proxy server address - 0 ///< Proxy port number - } - }; - - - -const TInt Fields_WLAN_L2_IPv4[3][4] = - { - { - EApIspIPAddr, ///< Phone IP addr. - EApIspIPNetMask, ///< Subnet mask - EApIspIPGateway, ///< IP address of gateway - EApIP6DNSAddrFromServer ///< Domain name servers - }, - { - R_APUI_VIEW_PHONE_IP_ADDR, ///< Phone IP addr. - R_APUI_NETMASK, ///< Subnet mask - R_APUI_IP_GATEWAY, ///< IP address of gateway - R_APUI_VIEW_SET_DNS_SERVERS_IP ///< Domain name servers - }, - { - 0, ///< Phone IP addr. - 1, ///< Subnet mask - 1, ///< IP address of gateway - 0 ///< Domain name servers - } - }; - - -#endif - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/inc/ApSettingsModel.h --- a/apengine/apsettingshandlerui/inc/ApSettingsModel.h Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,699 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of class CApSettingsModel. -* -*/ - - -#ifndef APSETTINGS_MODEL_H -#define APSETTINGS_MODEL_H - -// INCLUDE FILES -#include -#include -#include - -#include - -#include //for protection of settings - - -// FORWARD DECLARATION -class CActiveApDb; -class CApListItem; -class CApListItemList; -class CApAccessPointItem; -class CApDataHandler; -class CApSelect; -class CAknWaitDialog; -class CApSettingsDeleteOperation; -class CApNetworkItemList; -class CFeatureManagerWrapper; -class CVpnApEngine; -class CEikonEnv; - -class CWEPSecuritySettings; - -class CWPASecuritySettings; - - - -/** -* A structure to hold filtering parameters -* First, it is possible to specify which ISP-type we are looking for. -* The possible values are: -*
-* KEApIspTypeInternetOnly: Filter allows only access points that are -* capable of only internet access. -*
-* KEApIspTypeWAPOnly: Filter allows only access points that are -* capable of only WAP access. -*
-* KEApIspTypeInternetAndWAP:Filter allows only access points that are -* capable of internet AND WAP access. -*
-* KEApIspTypeWAPMandatory: Filter allows only access points that are -* capable of WAP access AND contain mandatory -* WAP settings. -*
-* KEApIspTypeAll: No filtering is done for the isp-type, -* all types of access points are shown. -*
-* It is possible to combine them by simply adding/or-ing together the values, -* filtering will be done in such a way that only access points with the -* listed ISP-types will be shown. -* Second filtering possibility (aBearerFilter) is the desired bearer type. -* The possible values are the values of the TApBearerType enum type and their -* combinations, as in case of the ISP type. -* The ordering of the list can be specified with the aSortType parameter. -* It can have the following values: -* KEApSortUidAscending: The sorting is done according to the ID -* of the access points in ascending order. -* KEApSortUidDescending: The sorting is done according to the ID -* of the access points in descending order. -* KEApSortNameAscending: The sorting is done according to the name -* of the access points in ascending order. -* KEApSortNameDescending: The sorting is done according to the name -* of the access points in descending order. -*/ -typedef struct - { - TInt iIspFilter; - TInt iBearerFilter; - TInt iSortType; - }TApSettingsParams; - - - - - - - -// CLASS DECLARATION - -/** -* Model for the access point settings ui. -*/ -NONSHARABLE_CLASS( CApSettingsModel ) : public CBase - { - public: // Construct / destruct - - /** - * Two-phased constructor. Leaves on failure. - * The following three parameters specify the filtering and ordering - * criteria for the selection list creation. First, it is possible to - * specify which ISP-type we are looking for. The possible values are: - *
- * KEApIspTypeInternetOnly: Filter allows only access points that are - * capable of only internet access. - *
- * KEApIspTypeWAPOnly: Filter allows only access points that are - * capable of only WAP access. - *
- * KEApIspTypeInternetAndWAP:Filter allows only access points that are - * capable of internet AND WAP access. - *
- * KEApIspTypeWAPMandatory: Filter allows only access points that are - * capable of WAP access AND contain - * mandatory WAP settings. - *
- * KEApIspTypeAll: No filtering is done for the isp-type, all - * types of access points are shown. - *
- * It is possible to combine them by simply adding/or-ing together the - * values, filtering will be done in such a way that only access points - * with the listed ISP-types will be shown. - * Second filtering possibility (aBearerFilter) is the desired bearer - * type. The possible values are the values of the TApBearerType enum - * type and their combinations, as in case of the ISP type. - * The ordering of the list can be specified with the aSortType - * parameter. It can have the following values: - * KEApSortUidAscending: The sorting is done according to the ID - * of the access points in ascending order. - * KEApSortUidDescending: The sorting is done according to the ID - * of the access points in descending order. - * KEApSortNameAscending: The sorting is done according to the name - * of the access points in ascending order. - * KEApSortNameDescending: The sorting is done according to the name - * of the access points in descending order. - * Caution! The ordering values can not be combined! - * @param aIspTypeFilter Filtering criteria on ISP type - * @param aBearerFilter Filtering criteria on bearer type - * @param aSortType Specifies the sort order to use. - * @param aReqIpvType Specifies whether the caller would like to - * have IPv4, IPv6 or both access points. If it is IPv6 or Both, - * in case of IPv6 support is available as a feature, it will be - * supported. If IPv6 feature is not supported by the phone, it - * simply defaults to the normal IPv4 version. - * If it is IPv4, it uses the default IPv4 version independently - * from IPv6 feature beeing available or not. - * @param aVpnFilterType a TVpnFilterType representing the possible - * additional VPN filtering. - * @param aVariant The local variant value - * @param aIncludeEasyWlan a TBool indicating whether to include the - * EasyWlan AP in the list or not - * @param aNoEdit Gives wether editing is allowed or not - * @return The constructed listbox. - */ - static CApSettingsModel* NewL( - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TInt aReqIpvType, - TVpnFilterType aVpnFilterType, - TInt aVariant, - TBool aIncludeEasyWlan, - TBool aNoEdit - ); - - - /** - * Two-phased constructor. Leaves on failure. - * The following three parameters specify the filtering and ordering - * criteria for the selection list creation. First, it is possible to - * specify which ISP-type we are looking for. The possible values are: - *
- * KEApIspTypeInternetOnly: Filter allows only access points that are - * capable of only internet access. - *
- * KEApIspTypeWAPOnly: Filter allows only access points that are - * capable of only WAP access. - *
- * KEApIspTypeInternetAndWAP:Filter allows only access points that are - * capable of internet AND WAP access. - *
- * KEApIspTypeWAPMandatory: Filter allows only access points that are - * capable of WAP access AND contain - * mandatory WAP settings. - *
- * KEApIspTypeAll: No filtering is done for the isp-type, all - * types of access points are shown. - *
- * It is possible to combine them by simply adding/or-ing together the - * values, filtering will be done in such a way that only access points - * with the listed ISP-types will be shown. - * Second filtering possibility (aBearerFilter) is the desired bearer - * type. The possible values are the values of the TApBearerType enum - * type and their combinations, as in case of the ISP type. - * The ordering of the list can be specified with the aSortType - * parameter. It can have the following values: - * KEApSortUidAscending: The sorting is done according to the ID - * of the access points in ascending order. - * KEApSortUidDescending: The sorting is done according to the ID - * of the access points in descending order. - * KEApSortNameAscending: The sorting is done according to the name - * of the access points in ascending order. - * KEApSortNameDescending: The sorting is done according to the name - * of the access points in descending order. - * Caution! The ordering values can not be combined! - * @param aDb The database to work on - * @param aIspTypeFilter Filtering criteria on ISP type - * @param aBearerFilter Filtering criteria on bearer type - * @param aSortType Specifies the sort order to use. - * @param aReqIpvType Specifies whether the caller would like to - * have IPv4, IPv6 or both access points. If it is IPv6 or Both, - * in case of IPv6 support is available as a feature, it will be - * supported. If IPv6 feature is not supported by the phone, it - * simply defaults to the normal IPv4 version. - * If it is IPv4, it uses the default IPv4 version independently - * from IPv6 feature beeing available or not. - * @param aVpnFilterType a TVpnFilterType representing the possible - * additional VPN filtering. - * @param aVariant The local variant value - * @param aIncludeEasyWlan a TBool indicating whether to include the - * EasyWlan AP in the list or not - * @param aNoEdit Gives wether editing is allowed or not - * @return The constructed listbox model. - */ - static CApSettingsModel* NewL( - CActiveApDb& aDb, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TInt aReqIpvType, - TVpnFilterType aVpnFilterType, - TInt aVariant, - TBool aIncludeEasyWlan, - TBool aNoEdit - ); - - /** - * Destructor. - */ - virtual ~CApSettingsModel(); - - - protected: - /** - * Constructor. - * @param aIspTypeFilter Filtering criteria on ISP type - * @param aBearerFilter Filtering criteria on bearer type - * @param aSortType Specifies the sort order to use. - * @param aReqIpvType Specifies whether the caller would like to - * have IPv4, IPv6 or both access points. If it is IPv6 or Both, - * in case of IPv6 support is available as a feature, it will be - * supported. If IPv6 feature is not supported by the phone, it - * simply defaults to the normal IPv4 version. - * If it is IPv4, it uses the default IPv4 version independently - * from IPv6 feature beeing available or not. - * @param aVariant The variant - * @param aVpnFilterType a TVpnFilterType representing the possible - * additional VPN filtering. - * @param aVariant The local variant value - * @param aIncludeEasyWlan a TBool indicating whether to include the - * EasyWlan AP in the list or not - * @param aNoEdit Gives wether editing is allowed or not - */ - CApSettingsModel( - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TInt aReqIpvType, - TInt aVariant, - TVpnFilterType aVpnFilterType, - TBool aIncludeEasyWlan, - TBool aNoEdit - ); - - - /** - * Second phase constructor. Leaves on failure. - * @param aDb Database to use if any, NULL otherwise. - */ - virtual void ConstructL( CActiveApDb* aDb ); - - - public: - /** - * Returns the database object - */ - CActiveApDb* Database(); - - - /** - * Gets the APs corresponding to the filtering criteria, - * already ordered. - * @param aFailedLocked a boolean indicating if the operation - * had failed because the DB was locked - * @param aList a reference to the list of APs. - * The passed list will be erased, elements destroyed, - * new elements created in it. The list owns the created elements - * and the caller maintaines ownership of the list. - * @param aIspFilter The isp filter to be used - * @param aBearerFilter The bearer filter to be used - * @param aSortType The ordering to be used. - * @param aReqIpvType Specifies whether the caller would like to - * have IPv4, IPv6 or both access points. If it is IPv6 or Both, - * in case of IPv6 support is available as a feature, it will be - * supported. If IPv6 feature is not supported by the phone, it - * simply defaults to the normal IPv4 version. - * If it is IPv4, it uses the default IPv4 version independently - * from IPv6 feature beeing available or not. - * @return the number of items in the list. - */ - TInt AllListItemDataL - ( - TBool& aFailedLocked, - CApListItemList& aList, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TInt aReqIpvType - ); - - - /** - * Gets the APs corresponding to the filtering criteria, - * already ordered. - * @param aFailedLocked a boolean indicating if the operation - * had failed because the DB was locked - * @param aList a reference to the list of APs. - * The passed list will be erased, elements destroyed, - * new elements created in it. The list owns the created elements - * and the caller maintaines ownership of the list. - * @param aIspFilter The isp filter to be used - * @param aBearerFilter The bearer filter to be used - * @param aSortType The ordering to be used. - * @param aReqIpvType Specifies whether the caller would like to - * have IPv4, IPv6 or both access points. If it is IPv6 or Both, - * in case of IPv6 support is available as a feature, it will be - * supported. If IPv6 feature is not supported by the phone, it - * simply defaults to the normal IPv4 version. - * If it is IPv4, it uses the default IPv4 version independently - * from IPv6 feature beeing available or not. - * @param aVpnFilterType - * @param aIncludeEasyWlan a TBool indicating whether to include the - * EasyWlan AP in the list or not - * @return the number of items in the list. - */ - TInt AllListItemDataL - ( - TBool& aFailedLocked, - CApListItemList& aList, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TInt aReqIpvType, - TVpnFilterType aVpnFilterType, - TBool aIncludeEasyWlan - ); - - - /** - * Gets the APs corresponding to the filtering criteria, - * already ordered. - * @param aFailedLocked a boolean indicating if the operation - * had failed because the DB was locked - * @param aList a reference to the list of APs. - * The passed list will be erased, elements destroyed, - * new elements created in it. The list owns the created elements - * and the caller maintaines ownership of the list. - * @return the number of items in the list. - */ - TInt AllListItemDataL( TBool& aFailedLocked, CApListItemList& aList ); - - - /** - * Reads up one access point data - * @param aUid The UID of the access point to read - * @param aApItem A reference to a CApAccessPointItem to hold the - * access point item readed from the database - */ - void AccessPointDataL( TUint32 aUid, CApAccessPointItem& aApItem ); - - - /** - * Updates one access point item in the database - * @param aApItem A reference to a CApAccessPointItem holding the - * access point item to be updated in the database - */ - TBool UpdateAccessPointDataL( CApAccessPointItem& aApItem ); - - - /** - * Returns a pointer to the CApDataHandler object - */ - CApDataHandler* DataHandler(); - - - /** - * Returns a pointer to the CApUtils object - */ - CApUtils* ApUtils(); - - - /** - * Sets the filtering parameters for the model - * @param aParams The filtering parameters to be used - */ - void SetParams( TApSettingsParams aParams ); - - - /** - * Gets the filtering parameters of the model - * @return The used filtering parameters - */ - TApSettingsParams Params(); - - - /** - * Returns a pointer to the VPN engine object - */ - CVpnApEngine* VpnEngine(); - - - /** - * Launches help - */ - void LaunchHelpL(); - - /** - * Deletes an access point specified by its UID - * @param aUid The UID of the access point to delete. - */ - void RemoveApL( TUint32 aUid ); - - - /** - * Starts a transaction - * @param aWrite A boolean indicating whether read or write lock is - * needed. - * @param aShowNote A boolean indicating whether to show - * 'Cannot access database' note or not if DB is locked - * @param aRetry A boolean indicating whether to retry or not - * if DB is locked - * @param aLFFSChecking Whether low disk space is checked or not - * @return TTransactionResult containing whther it is our - * own transaction or not or it has failed with KErrLocked - */ - TTransactionResult StartTransactionLC - ( - TBool aWrite, - TBool aShowNote = ETrue, - TBool aRetry = ETrue, - TBool aLFFSChecking = ETrue - ); - - /** - * Gets write lock on the database - */ - void GetWriteLockL(); - - - /** - * Cleanup function for the transaction. - * In case of leave, it will be called and - * transaction will be rolled back - */ - static void RollbackTransactionOnLeave( TAny* aDb ); - - - /** - * Commits the transaction on the database - */ - TInt CommitTransaction(); - - - /** - * Check if Disk space goes below critical level if allocating - * more disk space. - * @param aShowErrorNote If ETrue, a warning note is shown. - * @param aBytesToWrite Amount of disk space to be allocated (use an - * estimate if exact amount is not known). - * @return ETrue if allocation would go below critical level. - */ - TBool FFSSpaceBelowCriticalLevelL( TBool aShowErrorNote, - TInt aBytesToWrite /*=0*/ ); - - - /** - * Gets the network list - * @param aFailedLocked a boolean indicating if the operation - * had failed because the DB was locked - * @param aList a reference to the list of networks. - * The passed list will be erased, elements destroyed, - * new elements created in it. The list owns the created elements - * and the caller must maintaine ownership of the list. - * Leaves on error (Database and memory errors) - * @return the number of items in the list. - */ - TInt NetWorkListDataL( TBool& aFailedLocked, - CApNetworkItemList& aList ); - - - /** - * Returns the model's required IPv type (4, 6 or both, bitfield) - */ - TInt RequestedIPvType(); - - - /** - * Returns whether the Select menu item should be deleted or not - * @param aResourceId The ID of the current menu resource - * @param aCount The number of items in the list - */ - TBool Need2DeleteSelect( TInt aResourceId, TInt aCount ); - - - /** - * Returns whether the Open menu item should be deleted or not - * @param aResourceId The ID of the current menu resource - * @param aCount The number of items in the list - * @param aUid The UID of the current item in the list - * @param aNeedsNone Gives whether NONE is displayed as an item or not - */ - TBool Need2DeleteOpen( TInt aResourceId, TInt aCount, - TUint32 aUid, TBool aNeedsNone ); - - - /** - * Returns whether the Delete menu item should be deleted or not - * @param aResourceId The ID of the current menu resource - * @param aCount The number of items in the list - * @param aUid The UID of the current item in the list - * @param aNeedsNone Gives whether NONE is displayed as an item or not - */ - TBool Need2DeleteDeleteL( TInt aResourceId, TInt aCount, - TUint32 aUid, TBool aNeedsNone ); - - - /** - * Returns tha the New/Use existing menu item should be deleted or not - * @param aResourceId The ID of the current menu resource - * @param aCount The number of items in the list - */ - TBool Need2DeleteNewUseExisting( TInt aResourceId, TInt aCount ); - - - /** - * @param aResourceId The ID of the current menu resource - * Returns whether the New menu item should be deleted or not - */ - TBool Need2DeleteNewL( TInt aResourceId ); - - - /** - * Returns whether the Help menu item should be deleted or not - */ - TBool Need2DeleteHelp( TInt aResourceId ); - - - protected: - - - - - public: - /** - * Returns the name of the first VPN accesspoint with which the access - * point with the passed WAP UID is associated. - * Name is placed on the CleanupStack if not null. - * Should not be called upon VPN access points!!! - * @param aUid The WAP UID of the normal access point - * @return NULL or a pointer to the name of the associated access point. - */ - HBufC* GetLinkedVpnAccessPointLC( TUint32 aUid ); - - - /* - * Returns the current EikEnvironment - */ - CEikonEnv* EikEnv(); - - - - /** - * Creates a new access point from the passed item. - * @param aApItem A reference to a CApAccessPointItem holding the - * access point item to be added to the database - * @return The UID of the newly created and saved access point. - */ - TUint32 CreateFromDataL( CApAccessPointItem& aApItem ); - - - /** - * Handles WEP security settings - * Leaves on errors - * Return TInt giving exit or shutdown required if any, otherwise, 0 - */ - TInt ChangeWepSettingsL( CApAccessPointItem* aApItem ); - - - /** - * Handles WPA security settings - * Leaves on errors - * Return TInt giving exit or shutdown required if any, otherwise, 0 - */ - TInt ChangeWpaSettingsL( CApAccessPointItem* aApItem ); - - - /** - * Handles 802.1x security settings - * Leaves on errors - * Return TInt giving exit or shutdown required if any, otherwise, 0 - */ - TInt Change8021xSettingsL( CApAccessPointItem* aApItem ); - - /** - * Resets all WEP and WPA settings to NULL, thus forcing their - * re-load - */ - void ClearWEPAndWPASettings(); - - /* - * Writes the WLAN settings part - */ - void WriteWlanL( CApAccessPointItem& aApItem, TBool aIsNew ); - - - /* - * Loads the WLAN settings part - */ - void LoadWlanL( CApAccessPointItem& aApItem ); - - /** - * Returns whether the passed item has the security settings - * filled correctly or not. - */ - TBool HasWlanSecSettingsFilledL( CApAccessPointItem& aApItem ); - - - /** - * Update the security mode to reflect current state. - * Called after the user changed security settings - * @param aApItem The access point item containing the current settings - */ - void UpdateSecurityModeL( CApAccessPointItem& aApItem ); - - - private: // data - CActiveApDb* iDb; - CApDataHandler* iApData; - CApUtils* iUtils; - CApSettingsDeleteOperation* iop; - TApSettingsParams iParams; - TBool iDbOwned; - TInt iReqIpvType; - TVpnFilterType iVpnFilterType; - CVpnApEngine* iVpnApEngine; - TInt iVariant; /// Local variant value - TBool iIncludeEasyWlan; - - CEikonEnv* iEikEnv; /// Eikon environment - - public: - CWEPSecuritySettings* iWepSecSettings; ///< WEP settings data - TInt iWepUiExitReason; ///< WEP UI exit reason - - CWPASecuritySettings* iWpaSecSettings; ///< WPA settings data - TInt iWpaUiExitReason; ///< WPA UI exit reason - TBool iNoEdit; - - /** - * CFeatureManagerWrapper wraps FeatureManager to eliminate maintenance - * of existance of FeatureManager. - * Owned. - */ - CFeatureManagerWrapper* iFeatureManagerWrapper; - - TBool iInRefresh; - TBool iNeedRefresh; - TBool iHelpSupported; - TBool iProtectionSupported; - }; - - -#endif - -// End of file diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/inc/Apsettingsdeleteoperation.h --- a/apengine/apsettingshandlerui/inc/Apsettingsdeleteoperation.h Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,246 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of class CApSettingsDeleteOperation. -* -*/ - - -#ifndef APSETTINGS_DELETE_OPERATION_H -#define APSETTINGS_DELETE_OPERATION_H - -// INCLUDE FILES -#include -#include -// CONSTANTS - -// DATA TYPES - -// FORWARD DECLARATION -class CActiveApDb; -class CApSettingsModel; -class CAknWaitDialog; -class CErrorUI; - -// CLASS DECLARATION - -/** -* Model for the access point settings ui. -*/ -NONSHARABLE_CLASS( CApSettingsDeleteOperation ) : - public CActive, public MProgressDialogCallback - { - public: - enum TState /// State of the finite state machine. - { - EProcOnDialogOn, - EProcOffDialogOn, - EProcOnDialogOff, - EProcOffDialogOff - }; - - public: // Construct / destruct - /** - * Two-phased constructor. Leaves on failure. - * @param aNoteControlId The ID of the note control. - * @param aResourceID The resource ID of the wait note dialog. - * @param aUid The UID of the access point to delete. - * @param aNoteText The label for the note text. - * @return The constructed CApSettingsDeleteOperation object. - */ - static CApSettingsDeleteOperation* NewL( - TInt aNoteControlId, - TInt aResourceID, - TUint32 aUid, - const TDesC& aNoteText - ); - - - /** - * Destructor. - */ - virtual ~CApSettingsDeleteOperation(); - - - protected: // new functions - /** - * Constructor. - * @param aNoteControlId The ID of the note control. - * @param aResourceID The resource ID of the wait note dialog. - * @param aUid The UID of the access point to delete. - */ - CApSettingsDeleteOperation( - TInt aNoteControlId, - TInt aResourceID, - TUint32 aUid - ); - - /** - * Second phase constructor. Leaves on failure. - * @param aNoteText The desired text of the note. - * events. - */ - void ConstructL( const TDesC& aNoteText ); - - protected: // from CActive - /** - * Run a step of the observer test. - */ - void RunL(); - - /** - * Cancel protocol implementation. - * must be present although does nothing - * as it is pure virtual in base... - */ - void DoCancel(); - - /** - * Callback for notification of the dismissal of the wait note dialog. - * From MProgressDialogCallback. - * The passed aButtonId is ignored. - */ - virtual void DialogDismissedL( TInt aButtonId ); - - public: // new methods - - /** - * Start the operation. - */ - void StartL(); - - - /** - * Moves into next wait round and forces RunL to execute. - */ - void Next(); - - - /** - * Starts the wait note with the current params. - */ - void StartWaitNoteL(); - - - /** - * Starts the separate delete operation thread with the current params. - */ - void StartDeleteOperationThreadL(); - - - /** - * Separate thread for the delete operation. - * @param aPtr A pointer to the operation to be started in the thread - * @return The return code of the delete operation - */ - static TInt RunDeleteThread( TAny* aPtr ); - - - /** - * Separate thread for the delete operation. - * @param aop A pointer to the operation to be started in the thread - * @return The return code of the delete operation - */ - static TInt DoRunDeleteThreadL( CApSettingsDeleteOperation* aop ); - - - /** - * Starts a transaction on the given database - * @param aDb Pointer to the database object - * @param aWrite boolean indicating whether write or read lock is needed - * @param aRetry boolean indicating whether retry is needed - * @return Whether the transaction is our own or not - */ - static TBool StartTransactionLC - ( - CCommsDatabase* aDb, - TBool aWrite, - TBool aRetry /* ETrue */ - ); - - - /** - * Gets write lock for the given database - * @param aDb Pointer to the database object - */ - static void GetWriteLockL( CCommsDatabase* aDb ); - - - /** - * Cleanup function for the transaction. - * In case of leave, it will be called and - * transaction will be rolled back - */ - static void RollbackTransactionOnLeave( TAny* aDb ); - - - /** - * Get the list of VPN WAP Access point UID's which are linked to a - * specific normal internet access point WAP ID. - * @param aDb a reference of a CCommsDatabase database object - * to operate on - * @param aUid a TUint32 containing the WAP UID of the normal - * internet access point - * @param aVpnList a TUint32 dynamic array passed by reference to - * hold the WAP UID's of the linked VPN access points. - */ -/* - static void GetLinkedVpnAccessPointsL( CCommsDatabase& aDb, - TUint32 aUid, - CArrayFixFlat &aVpnList ); -*/ - - /** - * Reads up an integer from the given table - * @param atable The CCommsDbTableView* table to perform the operation - * @param aColumn The column to read - * @param aValue A TUint32 passed by reference to hold the readed value. - * @return TInt Error code. Returns either 0 or KErrnotFound. - * Leaves on any other error - */ - static TInt ReadUintL( CCommsDbTableView* atable, - const TDesC& aColumn, - TUint32& aValue ); - - /** - * Returns the current state. - */ - TState State(){ return iState;}; - - /** - * Set a new UID - */ - void SetUid( TUint32 aUid ) { iUid = aUid;}; - - - /** - * Set a new note-text - */ - void SetNoteTextL( const TDesC& aNoteText ); - - private: // data - TInt iNoteControlId; - TInt iResourceID; - TUint32 iUid; - RThread iDeleteOperation; - HBufC* iNoteText; - CAknWaitDialog* iWaitDialog; - TState iState; - CErrorUI* iErrorUi; - TInt iErr; - }; - - -#endif - -// End of file diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/inc/ApsettingshandleruiImpl.h --- a/apengine/apsettingshandlerui/inc/ApsettingshandleruiImpl.h Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1331 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Declares the main implementation, CApSettingsHandlerImpl for the -* Access Point settings. -* -*/ - - -#ifndef APSETTINGS_HANDLER_IMPL_H -#define APSETTINGS_HANDLER_IMPL_H - -// INCLUDES -#include -#include -#include - -// CONSTANTS -/* -const TUid KUidApSettingsHandler = { 0x10008d3B }; -*/ - -typedef struct ///< Extra data holder - { - TInt iResOffset; - TBool iIsIpv6Supported; // Default is NO - TBool iIsFeatureManagerInitialised; - TInt iExtra; - TInt iSortType; - TVpnFilterType iVpnFilterType; - TInt iVariant; /// Local variant value - TBool iIncludeEasyWlan; - }TApSetHandlerImplExtra; - - -// FORWARD DECLARATIONS -class CActiveApDb; -class CApSelector; -class CApSettingsModel; -class CApSettings; -class CTextOverrides; -class CApAccessPointItem; - - -// CLASS DECLARATION -/** -* CApSettingsHandlerImpl class: It is the main handler for the Access Point -* settings. It contains the implementation of the Access Point Settings for -* the public API to be used by other (sub)systems. -* -*/ -NONSHARABLE_CLASS( CApSettingsHandlerImpl ): public CBase - { - - public: // Constructors and destructor - - - /** - * Two-phased constructor. Leaves on failure. - * This function shall be used to create the access point - * settings/selection handling UI object. It is customizable through - * the parameters. This object is a small layer above the UI part and - * it provides a standard interface to select, edit, create access - * points. It has two main parts, Select and Edit. The first parameter, - * aStartWithSelection gives whether we would like to select or edit. - * In case of selection, there is the possibility to use this module in - * many applications. For this, two layouts are implemented, - * one is list pane used by General Settings which provides the list in - * a list-pane. The other layout is for the other applications - * requiring access point selection, a popup-list style as the decision - * I know about was that General Settings will use list-pane and all - * other apps. popup-list style. It is the caller who selects the style - * so if spec. says otherwise, this module still can be used. - * It is also possible to start the UI without selection, so if any - * module has a 'linked/default/etc.' access point and stored it's UID, - * the module can simply call the editor part of the UI without having - * to select the AP once more. In case of editing only, - * (aStartWithSelection is EFalse), all other construction parameters - * are ignored and after construction caller can simply call - * DoRunSettingsL(..). In case of selection, a lot of other parameters - * can be specified to fulfil all requirements. There are three types - * of Options menu available: - * EApSettingsSelMenuNormal, - * EApSettingsSelMenuSelectOnly, - * EApSettingsSelMenuSelectNormal. - *
- *-EApSettingsSelMenuSelectOnly: Only Select is visible, - * no way to edit, delete, create, etc. - *
- * -EApSettingsSelMenuNormal: Options menu specified in General - * Settings, contains Edit, Delete, - * Create new, etc. menu items. - *
- * -EApSettingsSelMenuSelectNormal: Same as in EApSettingsSelMenuNormal - * BUT the first item is Select. - * This one makes it possible to select - * an access point and also possible to - * edit, create, delete, etc. - *
- * The following three parameters specify the filtering and ordering - * criteria for the selection list creation. First, it is possible to - * specify which ISP-type we are looking for. The possible values are: - *
- * KEApIspTypeInternetOnly: Filter allows only access points that are - * capable of only internet access. - *
- * KEApIspTypeWAPOnly: Filter allows only access points that are - * capable of only WAP access. - *
- * KEApIspTypeInternetAndWAP: Filter allows only access points that are - * capable of internet AND WAP access. - *
- * KEApIspTypeWAPMandatory: Filter allows only access points that are - * capable of WAP access AND contain - * mandatory WAP settings. - *
- * KEApIspTypeAll: No filtering is done for the isp-type, - * all types of access points are shown. - *
- * It is possible to combine them by simply adding/or-ing together - * the values, filtering will be done in such a way that only access - * points with the listed ISP-types will be shown. Second filtering - * possibility (aBearerFilter) is the desired bearer type. The possible - * values are the values of the TApBearerType enum type and their - * combinations, as in case of the ISP type. The ordering of the list - * can be specified with the aSortType parameter. It can have the - * following values: - * KEApSortUidAscending: The sorting is done according to the ID - * of the access points in ascending order. - * KEApSortUidDescending: The sorting is done according to the ID - * of the access points in descending order. - * KEApSortNameAscending: The sorting is done according to the name - * of the access points in ascending order. - * KEApSortNameDescending: The sorting is done according to the name - * of the access points in descending order. - * Caution! The ordering values can not be combined! - * @param aStartWithSelection A boolean value indicating whether to - * select or edit an ap. - * @param aListType A TSelectionListType enum indicating the - * desired list type. - * @param aSelMenuType A TSelectionMenuType enum indicating the - * desired menu type. - * @param aIspTypeFilter Filtering criteria on ISP type - * @param aBearerFilter Filtering criteria on bearer type - * @param aSortType Specifies the sort order to use. - * @param aNoEdit Gives wether editing is allowed or not - * @return The constructed CApSettingsHandlerImpl object. - */ - static CApSettingsHandlerImpl* NewLC( - TBool aStartWithSelection, - TSelectionListType aListType, - TSelectionMenuType aSelMenuType, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TBool aNoEdit - ); - - - - /** - * Two-phased constructor. Leaves on failure. - * This function shall be used to create the access point - * settings/selection handling UI object. It is customizable through - * the parameters. This object is a small layer above the UI part and - * it provides a standard interface to select, edit, create - * access points. It has two main parts, Select and Edit. The first - * parameter, aStartWithSelection gives whether we would like to select - * or edit. In case of selection, there is the possibility to use this - * module in many applications. For this, two layouts are implemented, - * one is list pane used by General Settings which provides the list - * in a list-pane. The other layout is for the other applications - * requiring access point selection, a popup-list style as the - * decision I know about was that General Settings will use list-pane - * and all other apps. popup-list style. It is the caller who selects - * the style so if spec. says otherwise, this module still can be used. - * It is also possible to start the UI without selection, so if any - * module has a 'linked/default/etc.' access point and stored it's UID, - * the module can simply call the editor part of the UI without having - * to select the AP once more. - * In case of editing only, (aStartWithSelection is EFalse), all other - * construction parameters are ignored and after construction caller - * can simply call DoRunSettingsL(..). - * In case of selection, a lot of other parameters can be specified - * to fulfil all requirements. There are three types of Options menu - * available: - * EApSettingsSelMenuNormal, - * EApSettingsSelMenuSelectOnly, - * EApSettingsSelMenuSelectNormal. - *
- *-EApSettingsSelMenuSelectOnly: Only Select is visible, no way to - * edit, delete, create, etc. - *
- * -EApSettingsSelMenuNormal: Options menu specified in General - * Settings, contains Edit, Delete, - * Create new, etc. menu items. - *
- * -EApSettingsSelMenuSelectNormal: Same as in EApSettingsSelMenuNormal - * BUT the first item is Select. - * This one makes it possible to - * select an access point and also - * possible to edit, create, - * delete, etc. - *
- * The following three parameters specify the filtering and ordering - * criteria for the selection list creation. First, it is possible to - * specify which ISP-type we are looking for. The possible values are: - *
- * KEApIspTypeInternetOnly: Filter allows only access points that - * are capable of only internet access. - *
- * KEApIspTypeWAPOnly: Filter allows only access points that - * are capable of only WAP access. - *
- * KEApIspTypeInternetAndWAP: Filter allows only access points that - * are capable of internet AND WAP access. - *
- * KEApIspTypeWAPMandatory: Filter allows only access points that - * are capable of WAP access AND contain - * mandatory WAP settings. - *
- * KEApIspTypeAll: No filtering is done for the isp-type, - * all types of access points are shown. - *
- * It is possible to combine them by simply adding/or-ing together the - * values, filtering will be done in such a way that only access points - * with the listed ISP-types will be shown. - * Second filtering possibility (aBearerFilter) is the desired bearer - * type. The possible values are the values of the TApBearerType enum - * type and their combinations, as in case of the ISP type. - * The ordering of the list can be specified with the aSortType - * parameter. It can have the following values: - * KEApSortUidAscending: The sorting is done according to the ID - * of the access points in ascending order. - * KEApSortUidDescending: The sorting is done according to the ID - * of the access points in descending order. - * KEApSortNameAscending: The sorting is done according to the name - * of the access points in ascending order. - * KEApSortNameDescending: The sorting is done according to the name - * of the access points in descending order. - * Caution! The ordering values can not be combined! - * @param aDb A database to work on - * @param aStartWithSelection A boolean value indicating whether to - * select or edit an ap. - * @param aListType A TSelectionListType enum indicating the desired - * list type. - * @param aSelMenuType A TSelectionMenuType enum indicating the desired - * menu type. - * @param aIspTypeFilter Filtering criteria on ISP type - * @param aBearerFilter Filtering criteria on bearer type - * @param aSortType Specifies the sort order to use. - * @param aNoEdit Gives wether editing is allowed or not - * @return The constructed CApSettingsHandlerImpl object. - */ - static CApSettingsHandlerImpl* NewLC( - CActiveApDb& aDb, - TBool aStartWithSelection, - TSelectionListType aListType, - TSelectionMenuType aSelMenuType, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TBool aNoEdit - ); - - - - - - - - - /** - * Two-phased constructor. Leaves on failure. - * This function shall be used to create the access point - * settings/selection handling UI object.It is customizable through the - * parameters. This object is a small layer above the UI part and - * it provides a standard interface to select, edit, create access - * points. It has two main parts, Select and Edit. The first parameter, - * aStartWithSelection gives whether we would like to select or edit. - * In case of selection, there is the possibility to use this module in - * many applications. For this, two layouts are implemented, one is - * list pane used by General Settings which provides the list in a - * list-pane. The other layout is for the other applications requiring - * access point selection, a popup-list style as the decision was that - * General Settings will use list-pane and all other apps. popup-list - * style. It is the caller who selects the style so if spec. says - * otherwise, this module still can be used. - * It is also possible to start the UI without selection, so if any - * module has a 'linked/default/etc.' access point and stored it's UID, - * the module can simply call the editor part of the UI without having - * to select the AP once more. - * In case of editing only, (aStartWithSelection is EFalse), all other - * construction parameters are ignored and after construction caller - * can simply call DoRunSettingsL(..). - * In case of selection, a lot of other parameters can be specified to - * fulfil all requirements. There are three types of Options menu - * available: EApSettingsSelMenuNormal, EApSettingsSelMenuSelectOnly, - * EApSettingsSelMenuSelectNormal. - *
- *-EApSettingsSelMenuSelectOnly: Only Select is visible, no way to edit, - * delete, create, etc. - *
- * -EApSettingsSelMenuNormal:Options menu specified in General Settings, - * contains Edit, Delete, Create new, etc. menu items. - *
- * -EApSettingsSelMenuSelectNormal: Same as in EApSettingsSelMenuNormal - * BUT the first item is Select. This one makes it possible to select - * an access point and also possible to edit, create, delete, etc. - *
- * The following three parameters specify the filtering and ordering - * criteria for the selection list creation. First, it is possible to - * specify which ISP-type we are looking for. The possible values are: - *
- * KEApIspTypeInternetOnly: Filter allows only access points that are - * capable of only internet access. - *
- * KEApIspTypeWAPOnly: Filter allows only access points that are - * capable of only WAP access. - *
- * KEApIspTypeInternetAndWAP: Filter allows only access points that are - * capable of internet AND WAP access. - *
- * KEApIspTypeWAPMandatory: Filter allows only access points that are - * capable of WAP access AND contain mandatory WAP settings. - *
- * KEApIspTypeAll: No filtering is done for the isp-type, all types of - * access points are shown. - *
- * It is possible to combine them by simply adding/or-ing together the - * values, filtering will be done in such a way that only access points - * with the listed ISP-types will be shown. - * Second filtering possibility (aBearerFilter) is the desired bearer - * type. The possible values are the values of the TApBearerType enum - * type and their combinations, as in case of the ISP type. - * The ordering of the list can be specified with the aSortType - * parameter. It can have the following values: - * KEApSortUidAscending: The sorting is done according to the ID of - * the access points in ascending order. - * KEApSortUidDescending: The sorting is done according to the ID of - * the access points in descending order. - * KEApSortNameAscending: The sorting is done according to the name of - * the access points in ascending order. - * KEApSortNameDescending: The sorting is done according to the name of - * the access points in descending order. - * Caution! The ordering values can not be combined! - * @param aStartWithSelection A boolean value indicating whether to - * select or edit an ap. - * @param aListType A TSelectionListType enum indicating the desired - * list type. - * @param aSelMenuType A TSelectionMenuType enum indicating the desired - * menu type. - * @param aIspTypeFilter Filtering criteria on ISP type - * @param aBearerFilter Filtering criteria on bearer type - * @param aSortType Specifies the sort order to use. - * @param aReqIpvType Specifies whether the caller would like to - * have IPv4, IPv6 or both access points. If it is IPv6 or Both, - * in case of IPv6 support is available as a feature, it will be - * supported. If IPv6 feature is not supported by the phone, it - * simply defaults to the normal IPv4 version. - * If it is IPv4, it uses the default IPv4 version independently - * from IPv6 feature beeing available or not. - * @param aNoEdit Gives wether editing is allowed or not - * @return The constructed CApSettingsHandlerImpl object. - */ - static CApSettingsHandlerImpl* NewLC( - TBool aStartWithSelection, - TSelectionListType aListType, - TSelectionMenuType aSelMenuType, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TInt aReqIpvType, - TBool aNoEdit - ); - - - - /** - * Two-phased constructor. Leaves on failure. - * This function shall be used to create the access point - * settings/selection handling UI object. It is customizable through - * the parameters. This object is a small layer above the UI part and - * it provides a standard interface to select, edit, create access - * points. It has two main parts, Select and Edit. The first parameter, - * aStartWithSelection gives whether we would like to select or edit. - * In case of selection, there is the possibility to use this module in - * many applications. For this, two layouts are implemented, one is list - * pane used by General Settings which provides the list in a list-pane. - * The other layout is for the other applications requiring access point - * selection, a popup-list style as the decision was that General - * Settings will use list-pane and all other apps. popup-list style. - * It is the caller who selects the style so if spec. says otherwise, - * this module still can be used. It is also possible to start the UI - * without selection, so if any module has a 'linked/default/etc.' - * access point and stored it's UID, the module can simply call the - * editor part of the UI without having to select the AP once more. - * In case of editing only, (aStartWithSelection is EFalse), all other - * construction parameters are ignored and after construction caller can - * simply call DoRunSettingsL(..). In case of selection, a lot of other - * parameters can be specified to fulfil all requirements. There are - * three types of Options menu available: EApSettingsSelMenuNormal, - * EApSettingsSelMenuSelectOnly, EApSettingsSelMenuSelectNormal. - *
- *-EApSettingsSelMenuSelectOnly: Only Select is visible, no way to edit, - * delete, create, etc. - *
- * -EApSettingsSelMenuNormal:Options menu specified in General Settings, - * contains Edit, Delete, Create new, etc. menu items. - *
- * -EApSettingsSelMenuSelectNormal: Same as in EApSettingsSelMenuNormal - * BUT the first item is Select. This one makes it possible to select - * an access point and also possible to edit, create, delete, etc. - *
- * The following three parameters specify the filtering and ordering - * criteria for the selection list creation. First, it is possible to - * specify which ISP-type we are looking for. The possible values are: - *
- * KEApIspTypeInternetOnly: Filter allows only access points that are - * capable of only internet access. - *
- * KEApIspTypeWAPOnly: Filter allows only access points that are - * capable of only WAP access. - *
- * KEApIspTypeInternetAndWAP: Filter allows only access points that are - * capable of internet AND WAP access. - *
- * KEApIspTypeWAPMandatory: Filter allows only access points that are - * capable of WAP access AND contain mandatory WAP settings. - *
- * KEApIspTypeAll: No filtering is done for the isp-type, all types of - * access points are shown. - *
- * It is possible to combine them by simply adding/or-ing together the - * values, filtering will be done in such a way that only access points - * with the listed ISP-types will be shown. Second filtering possibility - * (aBearerFilter) is the desired bearer type. The possible values are - * the values of the TApBearerType enum type and their combinations, as - * in case of the ISP type. The ordering of the list can be specified - * with the aSortType parameter. It can have the following values: - * KEApSortUidAscending: The sorting is done according to the ID of - * the access points in ascending order. - * KEApSortUidDescending: The sorting is done according to the ID of - * the access points in descending order. - * KEApSortNameAscending: The sorting is done according to the name of - * the access points in ascending order. - * KEApSortNameDescending: The sorting is done according to the name of - * the access points in descending order. - * Caution! The ordering values can not be combined! - * @param aDb A database to work on - * @param aStartWithSelection A boolean value indicating whether to - * select or edit an ap. - * @param aListType A TSelectionListType enum indicating the desired - * list type. - * @param aSelMenuType A TSelectionMenuType enum indicating the desired - * menu type. - * @param aIspTypeFilter Filtering criteria on ISP type - * @param aBearerFilter Filtering criteria on bearer type - * @param aSortType Specifies the sort order to use. - * @param aReqIpvType Specifies whether the caller would like to - * have IPv4, IPv6 or both access points. If it is IPv6 or Both, - * in case of IPv6 support is available as a feature, it will be - * supported. If IPv6 feature is not supported by the phone, it - * simply defaults to the normal IPv4 version. - * If it is IPv4, it uses the default IPv4 version independently - * from IPv6 feature beeing available or not. - * @param aNoEdit Gives wether editing is allowed or not - * @return The constructed CApSettingsHandlerImpl object. - */ - static CApSettingsHandlerImpl* NewLC( - CActiveApDb& aDb, - TBool aStartWithSelection, - TSelectionListType aListType, - TSelectionMenuType aSelMenuType, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TInt aReqIpvType, - TBool aNoEdit - ); - - - - - /** - * Two-phased constructor. Leaves on failure. - * This function shall be used to create the access point - * settings/selection handling UI object.It is customizable through the - * parameters. This object is a small layer above the UI part and - * it provides a standard interface to select, edit, create access - * points. It has two main parts, Select and Edit. The first parameter, - * aStartWithSelection gives whether we would like to select or edit. - * In case of selection, there is the possibility to use this module in - * many applications. For this, two layouts are implemented, one is - * list pane used by General Settings which provides the list in a - * list-pane. The other layout is for the other applications requiring - * access point selection, a popup-list style as the decision was that - * General Settings will use list-pane and all other apps. popup-list - * style. It is the caller who selects the style so if spec. says - * otherwise, this module still can be used. - * It is also possible to start the UI without selection, so if any - * module has a 'linked/default/etc.' access point and stored it's UID, - * the module can simply call the editor part of the UI without having - * to select the AP once more. - * In case of editing only, (aStartWithSelection is EFalse), all other - * construction parameters are ignored and after construction caller - * can simply call DoRunSettingsL(..). - * In case of selection, a lot of other parameters can be specified to - * fulfil all requirements. There are three types of Options menu - * available: EApSettingsSelMenuNormal, EApSettingsSelMenuSelectOnly, - * EApSettingsSelMenuSelectNormal. - *
- *-EApSettingsSelMenuSelectOnly: Only Select is visible, no way to edit, - * delete, create, etc. - *
- * -EApSettingsSelMenuNormal:Options menu specified in General Settings, - * contains Edit, Delete, Create new, etc. menu items. - *
- * -EApSettingsSelMenuSelectNormal: Same as in EApSettingsSelMenuNormal - * BUT the first item is Select. This one makes it possible to select - * an access point and also possible to edit, create, delete, etc. - *
- * The following three parameters specify the filtering and ordering - * criteria for the selection list creation. First, it is possible to - * specify which ISP-type we are looking for. The possible values are: - *
- * KEApIspTypeInternetOnly: Filter allows only access points that are - * capable of only internet access. - *
- * KEApIspTypeWAPOnly: Filter allows only access points that are - * capable of only WAP access. - *
- * KEApIspTypeInternetAndWAP: Filter allows only access points that are - * capable of internet AND WAP access. - *
- * KEApIspTypeWAPMandatory: Filter allows only access points that are - * capable of WAP access AND contain mandatory WAP settings. - *
- * KEApIspTypeAll: No filtering is done for the isp-type, all types of - * access points are shown. - *
- * It is possible to combine them by simply adding/or-ing together the - * values, filtering will be done in such a way that only access points - * with the listed ISP-types will be shown. - * Second filtering possibility (aBearerFilter) is the desired bearer - * type. The possible values are the values of the TApBearerType enum - * type and their combinations, as in case of the ISP type. - * The ordering of the list can be specified with the aSortType - * parameter. It can have the following values: - * KEApSortUidAscending: The sorting is done according to the ID of - * the access points in ascending order. - * KEApSortUidDescending: The sorting is done according to the ID of - * the access points in descending order. - * KEApSortNameAscending: The sorting is done according to the name of - * the access points in ascending order. - * KEApSortNameDescending: The sorting is done according to the name of - * the access points in descending order. - * Caution! The ordering values can not be combined! - * @param aStartWithSelection A boolean value indicating whether to - * select or edit an ap. - * @param aListType A TSelectionListType enum indicating the desired - * list type. - * @param aSelMenuType A TSelectionMenuType enum indicating the desired - * menu type. - * @param aIspTypeFilter Filtering criteria on ISP type - * @param aBearerFilter Filtering criteria on bearer type - * @param aSortType Specifies the sort order to use. - * @param aReqIpvType Specifies whether the caller would like to - * have IPv4, IPv6 or both access points. If it is IPv6 or Both, - * in case of IPv6 support is available as a feature, it will be - * supported. If IPv6 feature is not supported by the phone, it - * simply defaults to the normal IPv4 version. - * If it is IPv4, it uses the default IPv4 version independently - * from IPv6 feature beeing available or not. - * @param aVpnFilterType a TVpnFilterType representing the possible - * additional VPN filtering. - * @param aNoEdit Gives wether editing is allowed or not - * @return The constructed CApSettingsHandlerImpl object. - */ - static CApSettingsHandlerImpl* NewLC( - TBool aStartWithSelection, - TSelectionListType aListType, - TSelectionMenuType aSelMenuType, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TInt aReqIpvType, - TVpnFilterType aVpnFilterType, - TBool aNoEdit - ); - - - - /** - * Two-phased constructor. Leaves on failure. - * This function shall be used to create the access point - * settings/selection handling UI object. It is customizable through - * the parameters. This object is a small layer above the UI part and - * it provides a standard interface to select, edit, create access - * points. It has two main parts, Select and Edit. The first parameter, - * aStartWithSelection gives whether we would like to select or edit. - * In case of selection, there is the possibility to use this module in - * many applications. For this, two layouts are implemented, one is list - * pane used by General Settings which provides the list in a list-pane. - * The other layout is for the other applications requiring access point - * selection, a popup-list style as the decision was that General - * Settings will use list-pane and all other apps. popup-list style. - * It is the caller who selects the style so if spec. says otherwise, - * this module still can be used. It is also possible to start the UI - * without selection, so if any module has a 'linked/default/etc.' - * access point and stored it's UID, the module can simply call the - * editor part of the UI without having to select the AP once more. - * In case of editing only, (aStartWithSelection is EFalse), all other - * construction parameters are ignored and after construction caller can - * simply call DoRunSettingsL(..). In case of selection, a lot of other - * parameters can be specified to fulfil all requirements. There are - * three types of Options menu available: EApSettingsSelMenuNormal, - * EApSettingsSelMenuSelectOnly, EApSettingsSelMenuSelectNormal. - *
- *-EApSettingsSelMenuSelectOnly: Only Select is visible, no way to edit, - * delete, create, etc. - *
- * -EApSettingsSelMenuNormal:Options menu specified in General Settings, - * contains Edit, Delete, Create new, etc. menu items. - *
- * -EApSettingsSelMenuSelectNormal: Same as in EApSettingsSelMenuNormal - * BUT the first item is Select. This one makes it possible to select - * an access point and also possible to edit, create, delete, etc. - *
- * The following three parameters specify the filtering and ordering - * criteria for the selection list creation. First, it is possible to - * specify which ISP-type we are looking for. The possible values are: - *
- * KEApIspTypeInternetOnly: Filter allows only access points that are - * capable of only internet access. - *
- * KEApIspTypeWAPOnly: Filter allows only access points that are - * capable of only WAP access. - *
- * KEApIspTypeInternetAndWAP: Filter allows only access points that are - * capable of internet AND WAP access. - *
- * KEApIspTypeWAPMandatory: Filter allows only access points that are - * capable of WAP access AND contain mandatory WAP settings. - *
- * KEApIspTypeAll: No filtering is done for the isp-type, all types of - * access points are shown. - *
- * It is possible to combine them by simply adding/or-ing together the - * values, filtering will be done in such a way that only access points - * with the listed ISP-types will be shown. Second filtering possibility - * (aBearerFilter) is the desired bearer type. The possible values are - * the values of the TApBearerType enum type and their combinations, as - * in case of the ISP type. The ordering of the list can be specified - * with the aSortType parameter. It can have the following values: - * KEApSortUidAscending: The sorting is done according to the ID of - * the access points in ascending order. - * KEApSortUidDescending: The sorting is done according to the ID of - * the access points in descending order. - * KEApSortNameAscending: The sorting is done according to the name of - * the access points in ascending order. - * KEApSortNameDescending: The sorting is done according to the name of - * the access points in descending order. - * Caution! The ordering values can not be combined! - * @param aDb A database to work on - * @param aStartWithSelection A boolean value indicating whether to - * select or edit an ap. - * @param aListType A TSelectionListType enum indicating the desired - * list type. - * @param aSelMenuType A TSelectionMenuType enum indicating the desired - * menu type. - * @param aIspTypeFilter Filtering criteria on ISP type - * @param aBearerFilter Filtering criteria on bearer type - * @param aSortType Specifies the sort order to use. - * @param aReqIpvType Specifies whether the caller would like to - * have IPv4, IPv6 or both access points. If it is IPv6 or Both, - * in case of IPv6 support is available as a feature, it will be - * supported. If IPv6 feature is not supported by the phone, it - * simply defaults to the normal IPv4 version. - * If it is IPv4, it uses the default IPv4 version independently - * from IPv6 feature beeing available or not. - * @param aVpnFilterType a TVpnFilterType representing the possible - * additional VPN filtering. - * @param aNoEdit Gives wether editing is allowed or not - * @return The constructed CApSettingsHandlerImpl object. - */ - static CApSettingsHandlerImpl* NewLC( - CActiveApDb& aDb, - TBool aStartWithSelection, - TSelectionListType aListType, - TSelectionMenuType aSelMenuType, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TInt aReqIpvType, - TVpnFilterType aVpnFilterType, - TBool aNoEdit - ); - - - - - - /** - * Two-phased constructor. Leaves on failure. - * This function shall be used to create the access point - * settings/selection handling UI object. It is customizable through - * the parameters. This object is a small layer above the UI part and - * it provides a standard interface to select, edit, create access - * points. It has two main parts, Select and Edit. The first parameter, - * aStartWithSelection gives whether we would like to select or edit. - * In case of selection, there is the possibility to use this module in - * many applications. For this, two layouts are implemented, one is list - * pane used by General Settings which provides the list in a list-pane. - * The other layout is for the other applications requiring access point - * selection, a popup-list style as the decision was that General - * Settings will use list-pane and all other apps. popup-list style. - * It is the caller who selects the style so if spec. says otherwise, - * this module still can be used. It is also possible to start the UI - * without selection, so if any module has a 'linked/default/etc.' - * access point and stored it's UID, the module can simply call the - * editor part of the UI without having to select the AP once more. - * In case of editing only, (aStartWithSelection is EFalse), all other - * construction parameters are ignored and after construction caller can - * simply call DoRunSettingsL(..). In case of selection, a lot of other - * parameters can be specified to fulfil all requirements. There are - * three types of Options menu available: EApSettingsSelMenuNormal, - * EApSettingsSelMenuSelectOnly, EApSettingsSelMenuSelectNormal. - *
- *-EApSettingsSelMenuSelectOnly: Only Select is visible, no way to edit, - * delete, create, etc. - *
- * -EApSettingsSelMenuNormal:Options menu specified in General Settings, - * contains Edit, Delete, Create new, etc. menu items. - *
- * -EApSettingsSelMenuSelectNormal: Same as in EApSettingsSelMenuNormal - * BUT the first item is Select. This one makes it possible to select - * an access point and also possible to edit, create, delete, etc. - *
- * The following three parameters specify the filtering and ordering - * criteria for the selection list creation. First, it is possible to - * specify which ISP-type we are looking for. The possible values are: - *
- * KEApIspTypeInternetOnly: Filter allows only access points that are - * capable of only internet access. - *
- * KEApIspTypeWAPOnly: Filter allows only access points that are - * capable of only WAP access. - *
- * KEApIspTypeInternetAndWAP: Filter allows only access points that are - * capable of internet AND WAP access. - *
- * KEApIspTypeWAPMandatory: Filter allows only access points that are - * capable of WAP access AND contain mandatory WAP settings. - *
- * KEApIspTypeAll: No filtering is done for the isp-type, all types of - * access points are shown. - *
- * It is possible to combine them by simply adding/or-ing together the - * values, filtering will be done in such a way that only access points - * with the listed ISP-types will be shown. Second filtering possibility - * (aBearerFilter) is the desired bearer type. The possible values are - * the values of the TApBearerType enum type and their combinations, as - * in case of the ISP type. The ordering of the list can be specified - * with the aSortType parameter. It can have the following values: - * KEApSortUidAscending: The sorting is done according to the ID of - * the access points in ascending order. - * KEApSortUidDescending: The sorting is done according to the ID of - * the access points in descending order. - * KEApSortNameAscending: The sorting is done according to the name of - * the access points in ascending order. - * KEApSortNameDescending: The sorting is done according to the name of - * the access points in descending order. - * Caution! The ordering values can not be combined! - * @param aDb A database to work on - * @param aStartWithSelection A boolean value indicating whether to - * select or edit an ap. - * @param aListType A TSelectionListType enum indicating the desired - * list type. - * @param aSelMenuType A TSelectionMenuType enum indicating the desired - * menu type. - * @param aIspTypeFilter Filtering criteria on ISP type - * @param aBearerFilter Filtering criteria on bearer type - * @param aSortType Specifies the sort order to use. - * @param aReqIpvType Specifies whether the caller would like to - * have IPv4, IPv6 or both access points. If it is IPv6 or Both, - * in case of IPv6 support is available as a feature, it will be - * supported. If IPv6 feature is not supported by the phone, it - * simply defaults to the normal IPv4 version. - * If it is IPv4, it uses the default IPv4 version independently - * from IPv6 feature beeing available or not. - * @param aVpnFilterType a TVpnFilterType representing the possible - * additional VPN filtering. - * @param aIncludeEasyWlan a TBool indicating whether it should - * include the easy wlan AP in the list or not. - * @param aNoEdit Gives wether editing is allowed or not - * @return The constructed CApSettingsHandlerImpl object. - */ - static CApSettingsHandlerImpl* NewLC( - CActiveApDb& aDb, - TBool aStartWithSelection, - TSelectionListType aListType, - TSelectionMenuType aSelMenuType, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TInt aReqIpvType, - TVpnFilterType aVpnFilterType, - TBool aIncludeEasyWlan, - TBool aNoEdit - ); - - - - - /** - * Destructor. - */ - ~CApSettingsHandlerImpl(); - - - protected: - /** - * Constructor. - * @param aStartWithSelection A boolean value indicating whether to - * select or edit an ap. - * @param aListType A TSelectionListType enum indicating the desired - * list type. - * @param aSelMenuType A TSelectionMenuType enum indicating the desired - * menu type. - * @param aNoEdit Gives wether editing is allowed or not - */ - CApSettingsHandlerImpl( - TBool aStartWithSelection, - TSelectionListType aListType, - TSelectionMenuType aSelMenuType, - TBool aNoEdit - ); - - /** - * Constructor. - * @param aStartWithSelection A boolean value indicating whether to - * select or edit an ap. - * @param aListType A TSelectionListType enum indicating the desired - * list type. - * @param aSelMenuType A TSelectionMenuType enum indicating the desired - * menu type. - * @param aHelpMajor Major help ID - * @param aNoEdit Gives wether editing is allowed or not - */ - CApSettingsHandlerImpl( - TBool aStartWithSelection, - TSelectionListType aListType, - TSelectionMenuType aSelMenuType, - TUid aHelpMajor, - TBool aNoEdit - ); - - - /** - * Constructor. - * @param aStartWithSelection A boolean value indicating whether to - * select or edit an ap. - * @param aListType A TSelectionListType enum indicating the desired - * list type. - * @param aSelMenuType A TSelectionMenuType enum indicating the desired - * menu type. - * @param aNeedIpv6Support Whether IPv6 is supported or not - * @param aNoEdit Gives wether editing is allowed or not - */ - CApSettingsHandlerImpl( - TBool aStartWithSelection, - TSelectionListType aListType, - TSelectionMenuType aSelMenuType, - TBool aNeedIpv6Support, - TBool aNoEdit - ); - - - - /** - * Second-phase constructor. - * @param aIspTypeFilter Filtering criteria on ISP type - * @param aBearerFilter Filtering criteria on bearer type - * @param aSortType Specifies the sort order to use. - */ - void ConstructL( - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType - ); - - - /** - * Second-phase constructor. - * @param aDb A database to work on - * @param aIspTypeFilter Filtering criteria on ISP type - * @param aBearerFilter Filtering criteria on bearer type - * @param aSortType Specifies the sort order to use. - */ - void ConstructL( - CActiveApDb& aDb, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType - ); - - - /** - * Second-phase constructor. - * @param aIspTypeFilter Filtering criteria on ISP type - * @param aBearerFilter Filtering criteria on bearer type - * @param aSortType Specifies the sort order to use. - * @param aVpnFilterType a TVpnFilterType representing the possible - * additional VPN filtering. - */ - void ConstructL( - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TVpnFilterType aVpnFilterType - ); - - - /** - * Second-phase constructor. - * @param aDb A database to work on - * @param aIspTypeFilter Filtering criteria on ISP type - * @param aBearerFilter Filtering criteria on bearer type - * @param aSortType Specifies the sort order to use. - * @param aVpnFilterType a TVpnFilterType representing the possible - * additional VPN filtering. - */ - void ConstructL( - CActiveApDb& aDb, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TVpnFilterType aVpnFilterType - ); - - - - - /** - * Second-phase constructor. - * @param aDb A database to work on - * @param aIspTypeFilter Filtering criteria on ISP type - * @param aBearerFilter Filtering criteria on bearer type - * @param aSortType Specifies the sort order to use. - * @param aVpnFilterType a TVpnFilterType representing the possible - * additional VPN filtering. - * @param aIncludeEasyWlan a TBool indicating whether it should - * include the easy wlan AP in the list or not. - */ - void ConstructL( - CActiveApDb& aDb, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TVpnFilterType aVpnFilterType, - TBool aIncludeEasyWlan - ); - - - public: // New functions - /** - * Sets the filtering used in the access point selection. - * @param aIspTypeFilter Filtering criteria on ISP type - * @param aBearerFilter Filtering criteria on bearer type - * @param aSortType Specifies the sort order to use. - * @return No return value. Leaves on error. - */ - void SetFilterL( - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType - ); - - - /** - * Sets possible overrides of some texts. - * By default, text is read from resources. This provides a way to - * change some of the text to a caller-supplied one. The text must - * be read from resource and must be already localized. - * More than one text can be substituted, they are stored internally - * in an array. - * Currently not supported and supporting it is under discussion. - * @param aText2Change TTextID to identify the text to be replaced with - * @param aNewText Reference to the substitute text. - */ - void SetTextOverrideL( TTextID aText2Change, - const TDesC& aNewText ); - - - /** - * Gets possible overrides of a text. - * By default, text is read from resources. This provides a way to - * change some of the text to a caller-supplied one. The text must - * be read from resource and must be already localized. - * More than one text can be substituted, they are stored internally - * in an array. - * Currently not supported and supporting it is under discussion - * @param aTextID TTextID type to identify the text to be replaced with - * @return Reference to the substitute text. - */ - const TDesC& TextOverrideL( TTextID aTextId ); - - - /** - * Starts the settings component. - * Creates dialog(s) from scratch, launches and executes them. - * Can leave with error codes. - * @param TUint32 aHighlight The UID of the AP to highlight by default - * @param TUint32 aSelected The UID of the access point selected - * by the user. - * @return The accomplished task's flag-codes: - *
- * KApUiEventNone, - *
- * KApUiEventSelected, - *
- * KApUiEventCreatedBlank, - *
- * KApUiEventCreatedUsedOld, - *
- * KApUiEventEdited, - *
- * KApUiEventDeleted, - *
- * KApUiEventExitRequested - *
and their combinations. ( Bitwise OR ) - *
- * aSelected will be modified only if KApUiEventSelected is included - * in the flags. - *
- * In case it returns KApUiEventExitRequested, the user had choosen - * the Exit option from the Options menu which means - * that the caller application MUST exit! - *
- * Returns after completion! - */ - TInt RunSettingsL( TUint32 aHighLight, TUint32& aSelected ); - - - /** - * Component Validation Test. - * @return KErrNone. - */ - static TInt Cvt(); - - - protected: // New functions - /** - * Starts the settings component. - * Creates dialog(s) from scratch, launches and executes them. - * In case of error, leaves with error codes. - * @param TUint32 aHighlight The UID of the AP to highlight by default - * @param TUint32 aSelected The UID of the AP selected by the user - * @return The accomplished task's flag-codes: - *
- * KApUiEventNone, - *
- * KApUiEventSelected, - *
- * KApUiEventCreatedBlank, - *
- * KApUiEventCreatedUsedOld, - *
- * KApUiEventEdited, - *
- * KApUiEventDeleted - *
- * and their combinations. ( Bitwise OR ) - *
- * aSelected will be modified only if KApUiEventSelected is included - * in the flags. - *
- * Returns after completion! - */ - TInt DoRunSettingsL( TUint32 aHighLight, TUint32& aSelected ); - - - /** - * Starts the viewer component. - * Creates dialog(s) from scratch, launches and executes it. - * In case of error, leaves with error codes. - * @param TUint32 aUid The UID of the AP to view/edit - * @return Returns the completed task's flags - * KApUiEventNone, KApUiEventSelected, KApUiEventCreatedBlank, - * KApUiEventCreatedUsedOld, KApUiEventEdited, KApUiEventDeleted, - * KApUiEventExitRequested and their combinations. ( Bitwise OR ) - * In case it returns KApUiEventExitRequested, the user had choosen - * the Exit option from the Options menu which means - * that the caller application MUST exit! - *
- * Returns after completion! - */ - TInt RunViewerL( TUint32 aUid ); - - - /** - * Starts the viewer component. - * Creates dialog(s) from scratch, launches and executes it. - * In case of error, leaves with error codes. - * @param TUint32 aUid The UID of the AP to view/edit - * @return Returns the completed task's flags - * KApUiEventNone, KApUiEventSelected, KApUiEventCreatedBlank, - * KApUiEventCreatedUsedOld, KApUiEventEdited, KApUiEventDeleted, - * KApUiEventExitRequested and their combinations. ( Bitwise OR ) - * Returns after completion! - */ - TInt DoRunViewerL( TUint32 aUid ); - - - // handles the Delete access Point command. - void HandleApDeleteCmdL( TUint32 aUid, TBool aIsLast ); - - - // handles the Create blank new access Point command. - TUint32 HandleApBlankNewL( TInt aBearers, TInt aIsps ); - - - // handles the Create new access Point by using existing one command. - TUint32 HandleApUseOldNewL(); - - - // handles the Editing of the newly created access Point. - TUint32 EditAfterCreateL( TUint32 aUid, - CApAccessPointItem* aItem = NULL ); - - - /** - * Second-phase internal constructor. - * @param aDb A database to work on - * @param aIspTypeFilter Filtering criteria on ISP type - * @param aBearerFilter Filtering criteria on bearer type - * @param aSortType Specifies the sort order to use. - * @param aVpnFilterType a TVpnFilterType representing the possible - * additional VPN filtering. - * @param aIncludeEasyWlan a TBool indicating whether it should - * include the easy wlan AP in the list or not. - */ - void DoConstructL( CActiveApDb* aDb, TInt aIspFilter, - TInt aBearerFilter, TInt aSortType, - TVpnFilterType aVpnFilterType, - TBool aIncludeEasyWlan ); - - - /** - * Starts the selector component as a list - * Creates dialog(s) from scratch, launches and executes them. - * In case of error, leaves with error codes. - * @param TUint32 aHighlight The UID of the AP to highlight by default - * @param TUint32 aSelected The UID of the AP selected by the user - * @return The accomplished task's flag-codes: - *
- * KApUiEventNone, - *
- * KApUiEventSelected, - *
- * KApUiEventCreatedBlank, - *
- * KApUiEventCreatedUsedOld, - *
- * KApUiEventEdited, - *
- * KApUiEventDeleted - *
- * and their combinations. ( Bitwise OR ) - *
- * aSelected will be modified only if KApUiEventSelected is included - * in the flags. - *
- * Returns after completion! - */ - void DoRunListSettingsL( TUint32 aHighLight, TUint32& aSelected ); - - - /** - * Starts the selector component in a setting page - * Creates dialog(s) from scratch, launches and executes them. - * In case of error, leaves with error codes. - * @param TUint32 aHighlight The UID of the AP to highlight by default - * @param TUint32 aSelected The UID of the AP selected by the user - * @return The accomplished task's flag-codes: - *
- * KApUiEventNone, - *
- * KApUiEventSelected, - *
- * KApUiEventCreatedBlank, - *
- * KApUiEventCreatedUsedOld, - *
- * KApUiEventEdited, - *
- * KApUiEventDeleted - *
- * and their combinations. ( Bitwise OR ) - *
- * aSelected will be modified only if KApUiEventSelected is included - * in the flags. - *
- * Returns after completion! - */ - void DoRunSetPageSettingsL( TUint32 aHighLight, TUint32& aSelected ); - - - /** - * handles the Create new access Point by using existing one command. - * Called after user has selected the AP to copy - * Creates the new Ap and offers it for editing. - * @param aSelected The UID of the AP to copy. Shall not be KErrNone. - * @return The UID of the newly created Ap - */ - TUint32 DoHandleApUseOldNewL( TUint32 aSelected ); - - /** - * Selects the Ap to Copy, returns its UID. - * If not selected, KErrNone is returned - */ - TUint32 SelectApToCopyL(); - - - /** - * handles the Create blank new access Point command. - */ - TUint32 DoHandleApBlankNewL( TInt aBearers, TInt aIsps ); - - - /** - * handles the Delete network group command. - * @param aUid The uid of the network to delete - */ - void HandleNetworkDeleteCmdL( TUint32 aUid ); - - - /** - * Gets the local variant value - * @return A TInt stating the variant - */ - TInt GetVariantL(); - - - /** - * Gets confirmation about deleting an access point - * @param aUid A TUint32 holding the WAP access point ID of the - * access point to be deleted. - * @param aIsLast A TBool specifying whether the access point to be - * deleted is the last one or not. - * @return A TInt stating the result - */ - TInt ConfirmDeleteL( TUint32 aUid, TBool aIsLast ); - - - /** - * Wrapper for the public API - */ - void HandleRunSettingsL( TUint32 aHighLight, TUint32& aSelected ); - - - protected: // Functions from base classes - - friend class CApSettingsDlg; - friend class CApSelectorDialog; - friend class CApSelPopupList; - friend class CApNetSelPopupList; - friend class CApSettingsHandler; - - private: - /** - * Selects an appropriate bearer type for a given item according to - * the current filtering criterias - * @param aBearers The current bearer filter set - * @param aItem The CApAccessPointItem whoose bearer type is to be set. - */ - void ChooseBearerTypeL( TInt aBearers, CApAccessPointItem& aItem ); - - /** - * Duplciates an existing access point identified by the passed WAP ID - * @param aUid The WAP Access Point ID of the access point to duplicate - * @return The WAP Access Point ID of the newly created access point. - */ - TUint32 HandleDuplicateL( TUint32 aUid ); - - - -public: - TUint32 EventStore() { return iEventStore; }; - - - - - private: //data - TBool iStartWithSelection; - TSelectionListType iListType; - TSelectionMenuType iSelMenuType; - - TInt iIspFilter; - TInt iBearerFilter; - TApSetHandlerImplExtra* iExt; // Extra data holder structure - - TInt iReqIpvType; // Default is IPv4 - - CApSettingsModel* iModel; - CTextOverrides* iTextOverrides; - TUint32 iEventStore; // to hold the events - TUid iHelpMajor; - TBool iNoEdit; - -#ifdef __TEST_OOMDEBUG - TBool iMemTestOn; -#endif // __TEST_OOMDEBUG - - }; - -#endif - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/inc/FeatureManagerWrapper.h --- a/apengine/apsettingshandlerui/inc/FeatureManagerWrapper.h Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,70 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of class CFeatureManagerWrapper. -* -*/ - - -#ifndef FEATURE_MANAGER_WRAPPER_H -#define FEATURE_MANAGER_WRAPPER_H - -// INCLUDE FILES -#include //CBase -#include - -// CLASS DECLARATION - -/** -* CFeatureManagerWrapper wraps FeatureManager to eliminate -* maintenance of existance of FeatureManager. -*/ -NONSHARABLE_CLASS( CFeatureManagerWrapper ) : public CBase - { - - public: - - /** - * Destructor. Uninitalize FeatureManager. - */ - virtual ~CFeatureManagerWrapper(); - - /** - * Static constructor. - */ - static CFeatureManagerWrapper* NewL(); - - protected: - - /** - * Default constructor. - */ - CFeatureManagerWrapper(); - - /** - * Second-phase constructor. Initialize FeatureManager - */ - void ConstructL(); - - private: - - /** - * Indicates Featuremanger is initialized or not. - */ - TBool iIsFeatureMgrInitialized; - - }; - -#endif - -// End of file diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/inc/TextOverrides.h --- a/apengine/apsettingshandlerui/inc/TextOverrides.h Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,124 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Declares the CTextOverrides class. -* -*/ - - -#ifndef TEXT_OVERRIDES_H -#define TEXT_OVERRIDES_H - - -// INCLUDES -#include -#include - -#include - -// CONST -const TInt KTxtOverrideGran = KTTextIdMax+1; - - -// CLASS DECLARATION -/** -* CTextOverrides class: It is a helper class for the Access Point settings. -* -*/ -NONSHARABLE_CLASS( CTextOverrides ) : public CBase - { - - public: // Constructors and destructor - - - /** - * Two-phased constructor. Leaves on failure. - * @return The constructed CTextOverrides. - */ - static CTextOverrides* NewL(); - - - /** - * Destructor. - */ - ~CTextOverrides(); - - - protected: - /** - * Constructor. - */ - CTextOverrides(); - - - /** - * Second-phase constructor. - */ - void ConstructL(); - - - - public: // New functions - /** - * Sets possible overrides of some texts. - * By default, text is read from resources. This provides a way to - * change some of the text to a caller-supplied one. The text must - * be read from resource and must be already localized. - * More than one text can be substituted, they are stored internally - * in an array. - * @param aText2Change TTextID to identify the text to be replaced with - * @param aNewText Reference to the substitute text. - */ - void SetTextOverrideL( TTextID aText2Change, const TDesC& aNewText ); - - - /** - * Gets overrides of the given text. - * By default, text is read from resources. This provides a way to - * change some of the text to a caller-supplied one. The text must - * be read from resource and must be already localized. - * More than one text can be substituted, they are stored internally - * in an array. - * @param aTextId TTextID type to identify the text to get - * @return Reference to the overriding text. - */ - const TDesC& TextOverrideL( TTextID aTextId ); - - /** - * Checks whether a given text is overriden or not. - * By default, text is read from resources. This provides a way to - * change some of the text to a caller-supplied one. The text must - * be read from resource and must be already localized. - * More than one text can be substituted, they are stored internally - * in an array. - * @param aTextId TTextID type to identify the text to check - * @return Boolean indicatiing whether the given text is - * overriden or not. - */ - TBool IsTextOverridenL( TTextID aTextId ); - - /* - * Validates the passed ID. If invalid, leaves with KErrInvalidTextId - * @param aTextId The text ID to validate - */ - void ValidateIdL( TTextID aTextId ); - - private: //data - CArrayPtrFlat* iTxtArray; - - }; - -#endif - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/inc/apsettingsui.h --- a/apengine/apsettingshandlerui/inc/apsettingsui.h Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,257 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Declares the main handler, CApSettingsHandler and public API for the -* Access Point settings. -* -*/ - - -#ifndef APSETTINGS_UI_H -#define APSETTINGS_UI_H - -// INCLUDES -#include -#include -#include - -// CONSTANTS - - -// FORWARD DECLARATIONS -class CActiveApDb; -class CTextOverrides; - -class CApSettingsHandlerImpl; - -// CLASS DECLARATION -/** -* CApSettingsUi class: It is the main handler for the Access Point -* settings. It contains the only public API for other (sub)systems. -* -*/ -class CApSettingsUi : public CBase - { - - public: // Constructors and destructor - - - - /** - * Two-phased constructor. Leaves on failure. - * This function shall be used to create the access point - * settings/selection handling UI object.It is customizable through the - * parameters. This object is a small layer above the UI part and - * it provides a standard interface to select, edit, create access - * points. It has two main parts, Select and Edit. The first parameter, - * aStartWithSelection gives whether we would like to select or edit. - * In case of selection, there is the possibility to use this module in - * many applications. For this, two layouts are implemented, one is - * list pane used by General Settings which provides the list in a - * list-pane. The other layout is for the other applications requiring - * access point selection, a popup-list style as the decision was that - * General Settings will use list-pane and all other apps. popup-list - * style. It is the caller who selects the style so if spec. says - * otherwise, this module still can be used. - * It is also possible to start the UI without selection, so if any - * module has a 'linked/default/etc.' access point and stored it's UID, - * the module can simply call the editor part of the UI without having - * to select the AP once more. - * In case of editing only, (aStartWithSelection is EFalse), all other - * construction parameters are ignored and after construction caller - * can simply call DoRunSettingsL(..). - * In case of selection, a lot of other parameters can be specified to - * fulfil all requirements. There are three types of Options menu - * available: EApSettingsSelMenuNormal, EApSettingsSelMenuSelectOnly, - * EApSettingsSelMenuSelectNormal. - *
- *-EApSettingsSelMenuSelectOnly: Only Select is visible, no way to edit, - * delete, create, etc. - *
- * -EApSettingsSelMenuNormal:Options menu specified in General Settings, - * contains Edit, Delete, Create new, etc. menu items. - *
- * -EApSettingsSelMenuSelectNormal: Same as in EApSettingsSelMenuNormal - * BUT the first item is Select. This one makes it possible to select - * an access point and also possible to edit, create, delete, etc. - *
- * The following three parameters specify the filtering and ordering - * criteria for the selection list creation. First, it is possible to - * specify which ISP-type we are looking for. The possible values are: - *
- * KEApIspTypeInternetOnly: Filter allows only access points that are - * capable of only internet access. - *
- * KEApIspTypeWAPOnly: Filter allows only access points that are - * capable of only WAP access. - *
- * KEApIspTypeInternetAndWAP: Filter allows only access points that are - * capable of internet AND WAP access. - *
- * KEApIspTypeWAPMandatory: Filter allows only access points that are - * capable of WAP access AND contain mandatory WAP settings. - *
- * KEApIspTypeAll: No filtering is done for the isp-type, all types of - * access points are shown. - *
- * It is possible to combine them by simply adding/or-ing together the - * values, filtering will be done in such a way that only access points - * with the listed ISP-types will be shown. - * Second filtering possibility (aBearerFilter) is the desired bearer - * type. The possible values are the values of the TApBearerType enum - * type and their combinations, as in case of the ISP type. - * The ordering of the list can be specified with the aSortType - * parameter. It can have the following values: - * KEApSortUidAscending: The sorting is done according to the ID of - * the access points in ascending order. - * KEApSortUidDescending: The sorting is done according to the ID of - * the access points in descending order. - * KEApSortNameAscending: The sorting is done according to the name of - * the access points in ascending order. - * KEApSortNameDescending: The sorting is done according to the name of - * the access points in descending order. - * Caution! The ordering values can not be combined! - * @param aStartWithSelection A boolean value indicating whether to - * select or edit an ap. - * @param aListType A TSelectionListType enum indicating the desired - * list type. - * @param aSelMenuType A TSelectionMenuType enum indicating the desired - * menu type. - * @param aIspTypeFilter Filtering criteria on ISP type - * @param aBearerFilter Filtering criteria on bearer type - * @param aSortType Specifies the sort order to use. - * @param aReqIpvType Specifies whether the caller would like to - * have IPv4, IPv6 or both access points. If it is IPv6 or Both, - * in case of IPv6 support is available as a feature, it will be - * supported. If IPv6 feature is not supported by the phone, it - * simply defaults to the normal IPv4 version. - * If it is IPv4, it uses the default IPv4 version independently - * from IPv6 feature beeing available or not. - * @param aVpnFilterType a TVpnFilterType representing the possible - * additional VPN filtering. - * @return The constructed CApSettingsUi object. - * - * @deprecated - */ - IMPORT_C static CApSettingsUi* NewLC( - TBool aStartWithSelection, - TSelectionListType aListType, - TSelectionMenuType aSelMenuType, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TInt aReqIpvType, - TVpnFilterType aVpnFilterType ); - - - /** - * Destructor. - * - * @deprecated - */ - IMPORT_C ~CApSettingsUi(); - - - protected: - - /** - * Constructor. - * @param aStartWithSelection A boolean value indicating whether to - * select or edit an ap. - * @param aListType A TSelectionListType enum indicating the desired - * list type. - * @param aSelMenuType A TSelectionMenuType enum indicating the desired - * menu type. - * @param aNeedIpv6Support Whether IPv6 is supported or not - */ - CApSettingsUi( TBool aStartWithSelection, - TSelectionListType aListType, - TSelectionMenuType aSelMenuType, - TBool aNeedIpv6Support ); - - - - /** - * Second-phase constructor. - * @param aIspTypeFilter Filtering criteria on ISP type - * @param aBearerFilter Filtering criteria on bearer type - * @param aSortType Specifies the sort order to use. - * @param aVpnFilterType a TVpnFilterType representing the possible - * additional VPN filtering. - * - * @deprecated - */ - IMPORT_C void ConstructL( - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TVpnFilterType aVpnFilterType - ); - - - public: // New functions - - /** - * Starts the settings component. - * Creates dialog(s) from scratch, launches and executes them. - * Can leave with error codes. - * @param TUint32 aHighlight The UID of the AP to highlight by default - * @param TUint32 aSelected The UID of the access point selected - * by the user. - * @return The accomplished task's flag-codes: - *
- * KApUiEventNone, - *
- * KApUiEventSelected, - *
- * KApUiEventCreatedBlank, - *
- * KApUiEventCreatedUsedOld, - *
- * KApUiEventEdited, - *
- * KApUiEventDeleted, - *
- * KApUiEventExitRequested - *
and their combinations. ( Bitwise OR ) - *
- * aSelected will be modified only if KApUiEventSelected is included - * in the flags. - *
- * In case it returns KApUiEventExitRequested, the user had choosen - * the Exit option from the Options menu which means - * that the caller application MUST exit! - *
- * Returns after completion! - * - * @deprecated - */ - IMPORT_C TInt RunSettingsL( TUint32 aHighLight, TUint32& aSelected ); - - - private: //data - TBool iStartWithSelection; - TSelectionListType iListType; - TSelectionMenuType iSelMenuType; - - TInt iReqIpvType; // Default is IPv4 - - CApSettingsHandlerImpl* iImpl; // owned - - - }; - -#endif - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/loc/apsettingshandlerui.loc --- a/apengine/apsettingshandlerui/loc/apsettingshandlerui.loc Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1195 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* This is a localisation file for ApSettingsHandlerUi -* A .loc file is the one and only place where the logical strings -* to be localised are defined. -* -*/ - - - -// LOCALISATION STRINGS - - -//d:Command in options menu. -//d:Selects the currently selected access point. -//l:list_single_pane_t1_cp2 -//w: -//r:2.8 -// -#define qtn_set_cmd_select "Select" - - -//d:Command in options menu. -//d:Opens the currently selected access point. -//l:list_single_pane_t1_cp2 -//w: -//r:2.8 -// -#define qtn_set_cmd_edit_ap "Edit" - - - -//d:Command in options menu. -//d:Create new access point top menu. -//l:list_single_pane_t1_cp2 -//w: -//r:2.8 -// -#define qtn_set_cmd_new_ap "New access point" - - -//d:Sub-command in options menu's qtn_set_cmd_new_ap. -//d:Create new access point with default values. -//l:list_single_popup_submenu_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_cmd_new_default "Default settings" - - -//d:Sub-command in options menu's qtn_set_cmd_new_ap. -//d:Create access point based on an existing one. -//l:list_single_popup_submenu_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_cmd_new_existing "Use existing" - - - -//d:Command in options menu. -//d:Deletes the currently selected access point. -//l:list_single_pane_t1_cp2 -//w: -//r:2.8 -// -#define qtn_set_cmd_del_ap "Delete" - - -//d:Command in options menu. -//d:Opens help application with context sensitive help. -//l:list_single_pane_t1_cp2 -//w: -//r:2.8 -// -#define qtn_set_options_help "Help" - - -//d:Command in options menu. -//d:Exits access point settings. -//l:list_single_pane_t1_cp2 -//w: -//r:2.8 -// -#define qtn_set_options_exit "Exit" - - - - - - - - - - - -//d:Title pane text while in General settings' connection settings. -//l:title_pane_t2/opt9 -//w: -//r:2.8 -// -#define qtn_set_title_settings_inet "Connection settings" - - - -//d:Title pane text while in General settings' connection settings. -//l:title_pane_t2/opt9 -//w: -//r:2.8 -// -#define qtn_set_navi_ap "Access points" - - - - -//d:User has tried to edit active access point. -//d:Operation is refused with this info note. -//l:popup_note_window -//w: -//r:2.8 -// -#define qtn_set_note_ap_in_use_edit "Access point in use: Can't be edited." - - -//d:User has tried to delete active access point. -//d:Operation is refused with this info note. -//l:popup_note_window -//w: -//r:2.8 -// -#define qtn_set_note_ap_in_use_del "Access point in use: Can't be deleted." - - - -//d:User trying to delete last access point. -//d:Operation is confirmed with this info note. -//d:%U stands for the name of the connection. -//l:popup_note_window -//w: -//r:2.8 -// -#define qtn_set_note_delete_last_ap "%U connection is the only one. Are you sure to delete it?" - - - -//d:User enters access points list view and no connections exists. -//d:User is offered a 'solution' with this info note. -//l:popup_note_window -//w: -//r:3.1 -// -#define qtn_set_ap_create_new "No access points defined. Define now?" - - -//d:User trying to delete access point which is linked to any other application. -//d:Operation is confirmed with this info note. -//l:popup_note_window -//w: -//r:2.8 -// -#define qtn_set_ap_delete_linked "Access point linked to another application.Are you sure to delete?" - - - -//d:User steps back from access point editing while Access Number field for data call is still empty. -//d:Operation is confirmed with this confirmation query. -//l:popup_note_window -//w: -//r:2.8 -// -#define qtn_set_ap_access_number_not "Access point can't\n be saved without \naccess number.\nDelete it?" - - - - - - - -//d:Command in options menu in access points view. -//d:Modifies the currently selected access point. -//l:list_single_pane_t1_cp2 -//w: -//r:2.8 -// -#define qtn_set_options_change "Change" - - -//d:Command in options menu in access points view. -//d:Opens advanced settings for the access point. -//l:list_single_pane_t1_cp2 -//w: -//r:2.8 -// -#define qtn_set_options_ap_advanced "Advanced settings" - - - - - -// localisation info for the access point setting view/edit part -// all strings below are items for list_setting_item -// -// "Common" for all access point bearer types - -//d:Item text in setting list. -//d:The name of the connection -//l:list_setting_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_ap_conn_name "Connection name" - - -//d:Item text in setting list. -//d:The name of the bearer type. -//l:list_setting_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_ap_bearer "Bearer type" - - -//d:Item text in setting list. -//d:Indicates whether connection is secure/unsecure (result: On/Off) -//l:list_setting_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_wtls_security "WTLS security" - - -//d:Item text in setting list. -//d:Indicates whether the connection type is continuous or temporary -//l:list_setting_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_conn_type "Connection type" - - -// for GPRS bearer -//d:Item text in setting list. -//d:The name of the GPRS access point -//l:list_setting_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_access_point_name "Access point name" - - -//d:Item text in setting list. -//d:The user name -//l:list_setting_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_ap_username "User name" - - -//d:Item text in setting list. -//d:Prompt password? (Yes/No) -//l:list_setting_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_prompt_passwd "Prompt password" - - -//d:Item text in setting list. -//l:list_setting_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_ap_passwd "Password" - - -//d:Item text in setting list. -//d:Indicates whther password authentication is secure or normal -//l:list_setting_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_passwd_aut "Password authentication" - - -//d:Item text in setting list. -//l:list_setting_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_gateway_ip "Wap Gateway IP address" - - -//d:Item text in setting list. -//d:The starting page for this access point. -//l:list_setting_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_starting_page "Starting page" - - -// for GPRS Advanced -//d:Item text in setting list. -//l:list_setting_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_ip_address "Phone IP address" - - -//d:Item text in setting list. -//l:list_setting_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_primary_dns "Primary Name Server" - - -//d:Item text in setting list. -//l:list_setting_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_secondary_dns "Secondary Name Server" - - - -// for CSD -//d:Item text in setting list. -//l:list_setting_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_access_number "Access Number" - - -//d:Item text in setting list. -//d:Indicates whether data call is analogue or ISDN -//l:list_setting_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_data_call_type "Data call type" - - -//d:Item text in setting list. -//d:The max. connection speed -//l:list_setting_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_max_speed "Max. connection speed" - - -// for CSD Advanced -//d:Item text in setting list. -//l:list_setting_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_use_cb "Use call back" - - -//d:Item text in setting list. -//l:list_setting_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_cb_type "Call back type" - - -//d:Item text in setting list. -//l:list_setting_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_cb_number "Call back number" - - -//d:Item text in setting list. -//d:Indicates whether to use PPP compression or not -//l:list_setting_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_ppp_comp "Enable PPP compression" - - -//d:Item text in setting list. -//l:list_setting_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_use_logins "Use login script" - - -//d:Item text in setting list. -//l:list_setting_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_modem_init_string "Modem init string" - - -// 'Textual' but fixed values for settings - -//d:The bearer type is packet data -//l:list_set_graphic_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_bearer_packet_data "Packet data" - -//d:The bearer type is data call -//l:list_set_graphic_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_bearer_data_call "Data call" - - -//d:The bearer type is HSCSD data call -//l:list_set_graphic_pane_t1 -//w: -//r:2.8 -// -#define qtn_netw_sett_bearer_hscsd "HSCSD call" - - -//d:Answer to: Prompt for password? -//l:list_set_graphic_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_prompt_passwd_yes "Yes" - - -//d:Answer to: Prompt for password? -//l:list_set_graphic_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_prompt_passwd_no "No" - - -//d:Answer to: qtn_set_passwd_aut, -//d:whether password authentication is secure or normal -//l:list_set_graphic_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_passwd_aut_normal "Normal" - - -//d:Answer to: qtn_set_passwd_aut, -//d:whether password authentication is secure or normal -//l:list_set_graphic_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_passwd_aut_secure "Secure" - - -//d:The IP address is dynamic. -//l:list_set_graphic_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_ip_address_dynamic "Dynamic" - - -//d:Answer to: qtn_set_wtls_security -//d:whether connection is secured or not -//l:list_set_graphic_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_wtls_security_on "On" - - -//d:Answer to: qtn_set_wtls_security -//d:whether connection is secured or not -//l:list_set_graphic_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_wtls_security_off "Off" - - -//d:Answer to: qtn_set_conn_type -//d:connection type is continuous -//l:list_set_graphic_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_conn_type_contin "Continuous" - - -//d:Answer to: qtn_set_conn_type -//d:connection type is temporary -//l:list_set_graphic_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_conn_type_temp "Temporary" - - -//d:Answer to: qtn_set_data_call_type -//d:The data call type is analogue -//l:list_set_graphic_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_data_call_analolgue "Analogue" - - -//d:Answer to: qtn_set_data_call_type -//d:The data call type is ISDN v.110 -//l:list_set_graphic_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_data_call_isdn_110 "ISDN v.110" - - -//d:Answer to: qtn_set_data_call_type -//d:The data call type is ISDN v.120 -//l:list_set_graphic_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_data_call_isdn_120 "ISDN v.120" - - -//d:Answer to: qtn_set_max_speed -//l:list_set_graphic_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_speed_auto_detect "Auto detect" - - -//d:Answer to: qtn_set_use_cb -//d: Use call back. -//l:list_set_graphic_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_use_cb_yes "Yes" - - -//d:Answer to: qtn_set_use_cb -//d:Do not use call back. -//l:list_set_graphic_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_use_cb_no "No" - - -//d:Answer to: qtn_set_cb_type -//d:Use server number for call back. -//l:list_set_graphic_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_use_server_number "Use server number" - - -//d:Answer to: qtn_set_cb_type -//d:Use other number for call back. -//l:list_set_graphic_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_use_other_number "Use other number" - - -//d:Answer to: qtn_set_ppp_comp -//l:list_set_graphic_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_ppp_comp_yes "Yes" - - -//d:Answer to: qtn_set_ppp_comp -//l:list_set_graphic_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_ppp_comp_no "No" - - -//d:Answer to: qtn_set_use_logins -//l:list_set_graphic_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_use_logins_no "no" - - -//d:Answer to: qtn_set_use_logins -//l:list_set_graphic_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_use_logins_yes "yes" - - -//d:Prompt text when creating new access point based on an already existing value -//l:heading_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_new_ap_prompt_list "Use existing connection:" - - -//d:Item text in setting list. -//l:list_setting_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_login_script "Login script" - - - -//d:Text used as prompt text in a text setting item -//l:list_setting_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_default_ap "Default Access Point" - - - -// not part of spec but added it -//d:After editing an access point, info after succesful save -//l:popup_note_window -//w: -//r:2.8 -// -#define qtn_set_ap_saved "Saved" - - -// not part of spec but added it -//d:User IS in access points list view and no connections exists. -//d:User is informed of having 0 access points with this 'empty list text'. -//l:main_list_empty_pane -//w: -//r:2.8 -// -#define qtn_set_ap_none_defined "No access point connections defined." - - - -//d:When a compulsory setting is not filled, this string indicates that it is compulsory. -//l:list_set_graphic_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_compulsory "Compulsory" - - - -//d:When no access point is selected, the text None indicates this. -//l:list_set_graphic_pane_t1 -//w: -//r:2.8 -// -#define qtn_mce_settings_mms_none "None" - - -//d: When the entered phonennumber is invalid, this information note is shown -//l: popup_note_window -//w: -//r:2.8 -// -#define qtn_info_invalid_number "Invalid number" - - -//d: When the entered connection name is invalid, this information note is shown -//l: popup_note_window -//w: -//r:2.8 -// -#define qtn_info_invalid_conn_name "Invalid connection name" - - -//d:%U stands for the name of the connection. -//l: popup_note_wait_window -//w: -//r:2.8 -// -#define qtn_set_wait_deleting_ap "Deleting %U" - - - -//d:Error note message: database is inaccessible. -//l:popup_note_window -//w: -//r:2.8 -// -#define qtn_set_err_db_inaccessible "Cannot access\ndatabase.\nTry again later." - - - - -//d:Item text in setting list. -//l:list_setting_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_proxy_server_address "Proxy server address" - - -//d:Item text in setting list. -//l:list_setting_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_proxy_port_number "Port Number" - - - -//d:Item text in setting list. -//l:list_setting_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_network_group "Network group" - - - -//d:Command in options menu. -//d:Creates a new network group. -//l:list_single_pane_t1_cp2 -//w: -//r:2.8 -// -#define qtn_set_cmd_new_netw_group "Create new group" - - - -//d:When there is no homepage value set, it is indicated with the text: none -//l:list_set_graphic_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_home_page_none "None" - - -//d:If user selected a WCDMA specific speed, this string presented to confirm it. -//l:popup_note_window -//w: -//r:2.8 -// -#define qtn_set_conf_max_speed_only_3g "Selected speed is available only in third generation mobile network. Continue?" - - -//d:Item text in setting list. Gives the network type (whether it is IP4 or IP6) -//l:list_setting_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_network_type "Network type" - - -//d: States that the network type is IP4 -//l:list_set_graphic_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_nw_type_ipv4 "IPv4" - - -//d: States that the network type is IP6 -//l:list_set_graphic_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_nw_type_ipv6 "IPv6" - - -//d:Item text in setting list. Offers IPv4 settings to be changed -//l:list_setting_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_ipv4_settings "IPv4 settings" - - -//d:Item text in setting list. Offers IPv6 settings to be changed -//l:list_setting_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_ipv6_settings "IPv6 settings" - - -//d:Item text in setting list. Entrance for the Domain name servers settings -//l:list_setting_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_dns_servers_ip "Domain name servers" - - -//d: When the entered IP address is not a valid IP address, this error note is shown -//l: popup_note_window -//w: -//r:2.8 -// -#define qtn_set_info_invalid_ip "Invalid IP address" - - -//d: Name server IP address is user defined -//l:list_set_graphic_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_ip_user_defined "User defined" - - -//d: Name server IP address is well-known -//l:list_set_graphic_pane_t1 -//w: -//r:2.8 -// -#define qtn_set_ip_well_known "Well-known" - - - -//d:If user selected a VPN access point for editing, this string presented to inform the user that -// to edit a VPN access point, he/she must use the VPN Settings UI -//l:popup_note_window -//w: -//r:2.8 -// -#define qtn_set_note_vpn_ap_sett "VPN access point, use VPN settings to edit it." - - -//d:User has tried to delete a protected access point. -//d:Operation is refused with this info note. -//l:popup_note_window -//w: -//r:2.8 -// -#define qtn_set_note_protected_ap "Protected Access point: Can’t be deleted" - - -//d:User has tried to open a protected access point. -//d:Operation is refused with this info note. -//l:popup_note_window -//w: -//r:2.8 -// -#define qtn_set_note_protected_ap_sett "Protected setting: Can’t be opened" - - -//d:User trying to delete access point, which is linked to an existing another VPN access point. -//d:Operation is confirmed with this info note. -//d:%U stands for the name of the VPN connection. -//l:popup_note_window -//w: -//r:2.8 -// -#define qtn_vpn_quest_delete_iap_associated "Access point is associated with a VPN access point ’%U’. Delete anyway?" - - -//d:User trying to copy a protected access point -//d:Operation is denied with this info note. -//l:popup_note_window -//w: -//r:2.8 -// -#define qtn_netw_info_cannot_use_protected_ap "Unable to use protected access point" - - - - -//d:User name if left empty -//l:list_set_graphic_pane_t1 -//w: -//r:2.8 -#define qtn_set_ap_username_none "None" - - -//d:Domain name servers 'Automatic' -//l:list_set_graphic_pane_t1 -//w: -//r:2.8 -#define qtn_set_dns_servers_automatic "Automatic" - - -//d:Primary name server & Secondary name server value 'Automatic' if left empty -//l:list_set_graphic_pane_t1 -//w: -//r:2.8 -#define qtn_set_dns_server_automatic "Automatic" - - -//d:Text to be displayed when proxy server address is left empty -//l:list_set_graphic_pane_t1 -//w: -//r:2.8 -#define qtn_set_proxy_server_address_none "None" - - -//d:Text to be displayed when the callback number is left empty -//l:list_set_graphic_pane_t1 -//w: -//r:2.8 -#define qtn_set_cb_number_none "None" - - -//d:Text to be displayed when the login script number is left empty -//l:list_set_graphic_pane_t1 -//w: -//r:2.8 -#define qtn_set_login_script_none "None" - - -//d:Text to be displayed when the modem init string is left empty -//l:list_set_graphic_pane_t1 -//w: -//r:2.8 -#define qtn_set_modem_init_none "None" - - - - - - -// WLAN loc strings - - - -//d:The bearer type is Wireless LAN -//l:list_set_graphic_pane_t1 -//w: -//r:3.0 -// -#define qtn_wlan_sett_bearer_wlan "Wireless LAN" - - -//d:Item text in setting list. -//d:The WLAN network name -//l:list_setting_pane_t1 -//w: -//r:3.0 -// -#define qtn_wlan_sett_network_name "WLAN network name" - - -//d:Defines the WLAN network mode, i.e. either infrastructure or ad-hoc. -//l:list_setting_pane_t1 -//w: -//r:3.0 -// -#define qtn_wlan_sett_network_mode "WLAN network mode" - - -//d:Defines the WLAN security mode, i.e. Open, WEP, 802.1x, WPA. -//l:list_setting_pane_t1 -//w: -//r:3.0 -// -#define qtn_wlan_sett_security_mode "WLAN security mode" - - - -//d:Selecting it will open the WLAN security settings -//l:list_setting_pane_t1 -//w: -//r:3.0 -// -#define qtn_wlan_sett_security_settings "WLAN security settings" - - -//d:Specifies that the network mode is Infrastructure -//l:list_set_graphic_pane_t1 -//w: -//r:3.0 -// -#define qtn_wlan_sett_network_mode_infra "Infrastructure" - - -//d:Specifies that the network mode is Ad-hoc -//l:list_set_graphic_pane_t1 -//w: -//r:3.0 -// -#define qtn_wlan_sett_network_mode_adhoc "Ad-hoc" - - -//d:Specifies that the security mode is Open network -//l:list_set_graphic_pane_t1 -//w: -//r:3.0 -// -#define qtn_wlan_sett_security_mode_open "Open network" - - -//d:Specifies that the security mode is WEP -//l:list_set_graphic_pane_t1 -//w: -//r:3.0 -// -#define qtn_wlan_sett_security_mode_wep "WEP" - - -//d:Specifies that the security mode is 802.1x -//l:list_set_graphic_pane_t1 -//w: -//r:3.0 -// -#define qtn_wlan_sett_security_mode_802_1x "802.1x" - - -//d:Specifies that the security mode is WPA -//l:list_set_graphic_pane_t1 -//w: -//r:3.0 -// -#define qtn_wlan_sett_security_mode_wpa "WPA/WPA2" - - -//d:Specifies that the WLAN network name is user defined -//l:list_set_graphic_pane_t1 -//w: -//r:3.0 -// -#define qtn_wlan_sett_network_name_user_defined "User defined" - - -//d:Specifies that the WLAN network name is selected from a scanned list -//l:list_set_graphic_pane_t1 -//w: -//r:3.0 -// -#define qtn_wlan_sett_network_name_scan "Scan for networks" - - - -//d:User has tried to save incomplete WLAN access point. -//d:Operation is refused with this info note. -//l:popup_note_window -//w: -//r:3.0 -// -#define qtn_wlan_quest_nw_name_not_defined "Incomplete details. WLAN network name must be defined.Delete access point?" - - - -//d:Defines the WLAN subnet mask to be used -//l:list_setting_pane_t1 -//w: -//r:3.0 -// -#define qtn_netw_sett_subnet_mask "Subnet mask" - - -//d:Defines the WLAN default gateway to be used -//l:list_setting_pane_t1 -//w: -//r:3.0 -// -#define qtn_netw_sett_default_gateway "Default gateway" - - - -//d:Informs that the selected Open Network does not has security settings. -//l:popup_note_window -//w: -//r:3.0 -// -#define qtn_wlan_info_no_security_settings "No security settings for ’Open network’" - - -//d:Prompt text for WLAN network name query. -//l:heading_pane_t1 -//w: -//r:3.0 -// -#define qtn_wlan_prmpt_network_name "WLAN network name:" - - -//d:User tries to save an access point which has some compulsory fields which are not filled. -//d:Operation is confirmed with this confirmation query. -//l:popup_note_window -//w: -//r:3.0 -// -#define qtn_netw_quest_iap_incomplete_delete "Incomplete access point details. Exit without saving?" - - - -//d:Prompt text for Ad-hoc channel name query. -//l:popup_query_data_window -//w: -//r:3.0 -// -#define qtn_wlan_prmpt_adhoc_channel "Ad-hoc channel" - - -//d:Setting item text for Ad-hoc channel. -//l:list_setting_pane_t1 -//w: -//r:3.0 -// -#define qtn_wlan_sett_adhoc_channel "Ad-hoc channel" - - -//d:Defines the ad-hoc channel to be automatic -//l:list_set_graphic_pane_t1 -//w: -//r:3.0 -// -#define qtn_wlan_sett_adhoc_channel_automatic "Automatic" - - -//d:Defines the ad-hoc channel to be user defined -//l:list_set_graphic_pane_t1 -//w: -//r:3.0 -// -#define qtn_wlan_sett_adhoc_channel_user_defined "User defined" - - -//d:User steps back from access point editing while the securuty settings' compulsory fields are not filled. -//d:Operation is confirmed with this confirmation query. -//l:popup_note_window -//w: -//r:3.0 -// -#define qtn_wlan_quest_security_settings_empty "Security settings for the selected security mode are incomplete.\nDelete access point?" - - -///d:Item text in setting list "Hidden network" -//l:list_setting_pane_t1 -//w: -//r:3.0 -// -#define qtn_wlan_sett_hidden_network "Hidden network" - - -//d:Option of hidden network -//l:list_set_graphic_pane_t1 -//w: -//r:3.0 -// -#define qtn_wlan_sett_hidden_network_no "No" - - -//d:Option of hidden network -//l:list_set_graphic_pane_t1 -//w: -//r:3.0 -// -#define qtn_wlan_sett_hidden_network_yes "Yes" - - -//d:User is duplicating an access point. -//d:Options menu item. -//l:list_single_pane_t1_cp2 -//w: -//r:3.1 -// -#define qtn_netw_options_duplicate_iap "Duplicate" - - -//d:User enters access points list view and no connections exists. -//d:User is informed about it and a 'solution' is offered with this info note. -//l:popup_note_window -//w: -//r:3.1 -// -#define qtn_netw_info_no_iap_defined "No access points defined. Define one via Connection settings." - - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/src/AccessPointTextSettingPage.cpp --- a/apengine/apsettingshandlerui/src/AccessPointTextSettingPage.cpp Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,94 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implementation of CAccessPointTextSettingPage. -* -*/ - - -// INCLUDE FILES - - -#include "AccessPointTextSettingPage.h" -#include - -#include // for AVKON ELAF -#include -#include "ApSettingsHandlerLogger.h" - -// ================= MEMBER FUNCTIONS ======================= - - -// --------------------------------------------------------- -// CAccessPointTextSettingPage::CAccessPointTextSettingPage -// --------------------------------------------------------- -// -CAccessPointTextSettingPage::CAccessPointTextSettingPage - ( TInt aResourceID, - TDes& aText, - TInt aTextSettingPageFlags, - TBool aIsLatin ) - :CAknTextSettingPage( aResourceID, aText, aTextSettingPageFlags ) - { - APSETUILOGGER_ENTERFN( EOther,"TxtSetPage::CAccessPointTextSettingPage<->") - iIsLatin = aIsLatin; - } - - - - -// --------------------------------------------------------- -// CAccessPointTextSettingPage::CAccessPointTextSettingPage -// --------------------------------------------------------- -// -CAccessPointTextSettingPage::CAccessPointTextSettingPage - ( const TDesC* aSettingTitleText, - TInt aSettingNumber, - TInt aControlType, - TInt aEditorResourceId, - TInt aSettingPageResourceId, - TDes& aText, - TInt aTextSettingPageFlags, - TBool aIsLatin ) - :CAknTextSettingPage( aSettingTitleText, aSettingNumber, aControlType, - aEditorResourceId, aSettingPageResourceId, aText, aTextSettingPageFlags ) - { - APSETUILOGGER_ENTERFN( EOther,"TxtSetPage::CAccessPointTextSettingPage<->") - iIsLatin = aIsLatin; - } - -// --------------------------------------------------------- -// CAccessPointTextSettingPage::ConstructL -// --------------------------------------------------------- -// -void CAccessPointTextSettingPage::ConstructL() - { - APSETUILOGGER_ENTERFN( EOther,"TxtSetPage::ConstructL") - - CAknTextSettingPage::ConstructL(); - FeatureManager::InitializeLibL(); - TBool avkonElaf = FeatureManager::FeatureSupported( KFeatureIdAvkonELaf ); - FeatureManager::UnInitializeLib(); - if ( avkonElaf && iIsLatin ) - { - CAknInputLanguageInfo* inputLangInfo = - AknInputLanguageInfoFactory::CreateInputLanguageInfoL(); - TextControl()->SetAknEditorLocalLanguage - ( inputLangInfo->UrlLanguage() ); - delete inputLangInfo; - } - - APSETUILOGGER_LEAVEFN( EOther,"TxtSetPage::ConstructL") - } - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/src/ApMultiLineDataQueryDialog.cpp --- a/apengine/apsettingshandlerui/src/ApMultiLineDataQueryDialog.cpp Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implementation of CApMultiLineDataQueryDialog. -* -*/ - - -// INCLUDE FILES - - -#include "ApMultiLineDataQueryDialog.h" -#include "ApSettingsHandlerLogger.h" - - -// ================= MEMBER FUNCTIONS ======================= - - -// --------------------------------------------------------- -// CApMultiLineDataQueryDialog::NewL -// --------------------------------------------------------- -// -CApMultiLineDataQueryDialog* CApMultiLineDataQueryDialog::NewL( - TDes& aText1, TDes& aText2, - TTone aTone ) - { - APSETUILOGGER_ENTERFN( EOther,"MultiQuery::NewL") - - CApMultiLineDataQueryDialog* self = - new (ELeave) CApMultiLineDataQueryDialog(aTone); - CleanupStack::PushL(self); - - self->SetDataL( aText1, aText2 ); - - CleanupStack::Pop(self); - - APSETUILOGGER_LEAVEFN( EOther,"MultiQuery::NewL") - return self; - } - - -// --------------------------------------------------------- -// CApMultiLineDataQueryDialog::CApMultiLineDataQueryDialog -// --------------------------------------------------------- -// -CApMultiLineDataQueryDialog::CApMultiLineDataQueryDialog( const TTone& aTone ) -: CAknMultiLineDataQueryDialog( aTone ) - { - APSETUILOGGER_ENTERFN( EOther,"MultiQuery::CApMultiLineDataQueryDialog<->") - } - - -// --------------------------------------------------------- -// CApMultiLineDataQueryDialog::UpdateLeftSoftKeyL -// --------------------------------------------------------- -// -void CApMultiLineDataQueryDialog::UpdateLeftSoftKeyL() - { - APSETUILOGGER_ENTERFN( EOther,"MultiQuery::UpdateLeftSoftKeyL") - - CAknMultiLineDataQueryDialog::UpdateLeftSoftKeyL(); - MakeLeftSoftkeyVisible( ETrue ); - - APSETUILOGGER_LEAVEFN( EOther,"MultiQuery::UpdateLeftSoftKeyL") - } - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/src/ApNetSelPopupList.cpp --- a/apengine/apsettingshandlerui/src/ApNetSelPopupList.cpp Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,679 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Defines CApNetSelPopupList for access point selection. -* -*/ - - -// INCLUDE FILES - -#include -#include - -#include "ApSettingsHandlerUI.hrh" - - -#include "ApNetSelPopupList.h" -#include "ApNetSelectorListBoxModel.h" -#include "ApSettingsModel.h" -#include -#include "ApsettingshandleruiImpl.h" - - -#include "ApSettingsHandlerLogger.h" - -#include "AccessPointTextSettingPage.h" - - - -#include // for protection of settings - - -// ================= MEMBER FUNCTIONS ======================= - -// --------------------------------------------------------- -// CApNetSelPopupList::NewL -// --------------------------------------------------------- -// -CApNetSelPopupList* CApNetSelPopupList::NewL( CApSettingsModel& aModel, - CApSettingsHandlerImpl& aHandler, - TInt& aCurrentSelectionIndex, - TInt& aPreferredUid, - TUint32& aEventStore, - CDesCArrayFlat* aItemArray, - TBool aNeedsNone ) - { - APSETUILOGGER_ENTERFN( EListbox,"NetSelPopup::NewL") - - CApNetSelPopupList* self = - new ( ELeave ) CApNetSelPopupList( - aModel, aHandler, - aCurrentSelectionIndex, - aPreferredUid, aItemArray, - aEventStore, aNeedsNone - ); -// till that point, object is only partially constructed! - - APSETUILOGGER_LEAVEFN( EListbox,"NetSelPopup::NewL") - return self; - } - - -// --------------------------------------------------------- -// CApNetSelPopupList::ConstructL -// --------------------------------------------------------- -// -void CApNetSelPopupList::ConstructL() - { - APSETUILOGGER_ENTERFN( EListbox,"NetSelPopup::ConstructL") - - FeatureManager::InitializeLibL(); - iHelpSupported = FeatureManager::FeatureSupported( KFeatureIdHelp ); - iProtectionSupported = FeatureManager::FeatureSupported( - KFeatureIdSettingsProtection ); - FeatureManager::UnInitializeLib(); - - CAknRadioButtonSettingPage::ConstructL(); - iList = ListBoxControl(); - iModel = new( ELeave )CApNetSelectorListboxModel(); - iList->Model()->SetItemTextArray( iModel ); - FillListBoxWithDataL(); - iDataModel->Database()->AddObserverL( this ); - - APSETUILOGGER_LEAVEFN( EListbox,"NetSelPopup::ConstructL") - } - - -// Destructor -CApNetSelPopupList::~CApNetSelPopupList() - { - APSETUILOGGER_ENTERFN( EListbox,"NetSelPopup::~CApNetSelPopupList") - - if ( iDataModel ) - { - if ( iDataModel->Database() ) - { - // must remove observer here as there is a chance that we do not exit - // through the standard way but through Leave(KErrLeaveWithoutAlert)... - iDataModel->Database()->RemoveObserver( this ); - } - } - if ( iModel ) - { - iModel->ResetAndDestroy(); - delete iModel; - } - - APSETUILOGGER_LEAVEFN( EListbox,"NetSelPopup::~CApNetSelPopupList") - } - - - -// Constructor -CApNetSelPopupList::CApNetSelPopupList( - CApSettingsModel& aModel, - CApSettingsHandlerImpl& aHandler, - TInt& aIndex, TInt& aPreferredUid, - CDesCArrayFlat* aItemArray, - TUint32& aEventStore, TBool aNeedsNone - ) -:CAknRadioButtonSettingPage( R_POPUP_LIST_NETWORK_SETTING_PAGE, - aIndex, aItemArray ), -iDataModel( &aModel ), -iSelected( &aPreferredUid ), -iHandler( &aHandler ), -iEventStore( &aEventStore ), -iNeedsNone( aNeedsNone ), -iNeedUnlock( EFalse ) - { - } - - - - - -// --------------------------------------------------------- -// CApNetSelPopupList::SetHighlighted() -// called when needs to change the highlighting -// --------------------------------------------------------- -// -void CApNetSelPopupList::SetHighlighted() - { - APSETUILOGGER_ENTERFN( EListbox,"NetSelPopup::SetHighlighted") - - if ( iPreferredUid ) - { - TInt err( KErrNone ); - TInt idx = iModel->Item4Uid( iPreferredUid, err ); - // if UID exists, set as current, else set 0 as current. - if ( err == KErrNone ) - { - iList->SetCurrentItemIndexAndDraw( idx ); - iPreferredUid = 0; - } - else - { - iList->SetCurrentItemIndexAndDraw( 0 ); - } - } - - APSETUILOGGER_LEAVEFN( EListbox,"NetSelPopup::SetHighlighted") - } - - -// --------------------------------------------------------- -// CApNetSelPopupList::GetHelpContext() -// --------------------------------------------------------- -// -void CApNetSelPopupList::GetHelpContext(TCoeHelpContext& aContext) const - { - APSETUILOGGER_ENTERFN( EListbox,"NetSelPopup::GetHelpContext") - - aContext.iMajor = iHandler->iHelpMajor; - - APSETUILOGGER_LEAVEFN( EListbox,"NetSelPopup::GetHelpContext") - } - - -// --------------------------------------------------------- -// CApNetSelPopupList::HandleApDbEventL -// called by the active access point framework -// --------------------------------------------------------- -// -void CApNetSelPopupList::HandleApDbEventL( TEvent anEvent ) - { - APSETUILOGGER_ENTERFN( EListbox,"NetSelPopup::HandleApDbEventL") - - switch ( anEvent ) - { - case EDbChanged: - { - FillListBoxWithDataL(); - break; - } - case EDbClosing: - { - break; - } - case EDbAvailable: - { - if ( iNeedUnlock ) - { - FillListBoxWithDataL(); - } - break; - } - default: - { - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - break; - } - } - - APSETUILOGGER_LEAVEFN( EListbox,"NetSelPopup::HandleApDbEventL") - } - - -// --------------------------------------------------------- -// CApNetSelPopupList::ActivateL() -// called after the dialog is shown -// used to handle empty list - query -// --------------------------------------------------------- -// -void CApNetSelPopupList::ActivateL() - { - APSETUILOGGER_ENTERFN( EListbox,"NetSelPopup::ActivateL") - - CAknRadioButtonSettingPage::ActivateL(); - - APSETUILOGGER_LEAVEFN( EListbox,"NetSelPopup::ActivateL") - } - - - -// --------------------------------------------------------- -// CApNetSelPopupList::SelectCurrentItemL() -// called after the setting had been changed -// --------------------------------------------------------- -// -void CApNetSelPopupList::SelectCurrentItemL() - { - APSETUILOGGER_ENTERFN( EListbox,"NetSelPopup::SelectCurrentItemL") - - CAknRadioButtonSettingPage::SelectCurrentItemL(); - TInt idx = iList->CurrentItemIndex(); - if ( idx >= 0 ) - { - *iSelected = iModel->At( idx )->Uid(); - } - - APSETUILOGGER_LEAVEFN( EListbox,"NetSelPopup::SelectCurrentItemL") - } - - - -// --------------------------------------------------------- -// CApNetSelPopupList::OkToExitL( TInt aButtonId ) -// called by framework when the OK button is pressed -// --------------------------------------------------------- -// -TBool CApNetSelPopupList::OkToExitL( TInt aButtonId ) - { - APSETUILOGGER_ENTERFN( EListbox,"NetSelPopup::OkToExitL") - - // Translate the button presses into commands for the appui & current - // view to handle. - // This is a very good thing, that aButtonId is a TInt, - // but the caller ( CAknSettingPage ) simply uses a TBool. - // The value of ETrue means the button usually for Yes, Ok, Options, etc - // and EFalse means Back, Cancel, etc. - // so we must act according to a boolean value and not - // according to the real button id... - TBool IsAccepted = aButtonId; - - if ( IsAccepted ) - { - TInt idx = iList->CurrentItemIndex(); - if ( idx >= 0 ) - { - *iSelected = iModel->At( idx )->Uid(); - } - } - - APSETUILOGGER_LEAVEFN( EListbox,"NetSelPopup::OkToExitL") - return ETrue; - } - - - -// --------------------------------------------------------- -// CApNetSelPopupList::FillListBoxWithDataL() -// called when listbox needs to be filled with data -// --------------------------------------------------------- -// -void CApNetSelPopupList::FillListBoxWithDataL() - { - APSETUILOGGER_ENTERFN( EListbox,"NetSelPopup::FillListBoxWithDataL") - - iPreferredLine = iList->CurrentItemIndex(); - if ( iPreferredLine < 0 ) - { - iPreferredLine = 0; - } - - if ( !iPreferredUid ) - { // if not specified explicitly, get current and use as 'preferred' - if ( iPreferredLine >= 0 ) - { - if ( iModel->Count() ) - { - iPreferredUid = iModel->At( iPreferredLine )->Uid(); - } - } - } - - TBool isLocked(EFalse); - iNeedUnlock = EFalse; - - iDataModel->NetWorkListDataL( isLocked, *iModel ); - - if ( isLocked ) - { - iNeedUnlock = ETrue; - } - - iList->View()->SetDisableRedraw( ETrue ); - - if ( iNeedsNone ) - { - HBufC* buf = iEikonEnv->AllocReadResourceLC( R_APUI_VIEW_AP_NONE ); - CApNetworkItem* NoneItem = CApNetworkItem::NewLC(); - NoneItem->SetUid( KApNoneUID ); - NoneItem->SetNameL( *buf ); - iModel->InsertL( 0, NoneItem ); - // as InsertL passes ownership of item to array, - // remove from cleanupstack - CleanupStack::Pop(); // NoneItem, as ownership is passed to array - CleanupStack::PopAndDestroy(); // buf, as item has copied it... - } - - iList->HandleItemAdditionL(); - - SetSelectedL(); - - SetHighlighted(); - - iList->View()->SetDisableRedraw( EFalse ); - iList->HandleItemAdditionL(); - - APSETUILOGGER_LEAVEFN( EListbox,"NetSelPopup::FillListBoxWithDataL") - } - - -// --------------------------------------------------------- -// CApNetSelPopupList::SetSelectedL() -// --------------------------------------------------------- -// -void CApNetSelPopupList::SetSelectedL() - { - APSETUILOGGER_ENTERFN( EListbox,"NetSelPopup::SetSelectedL") - - TInt i( 0 ); - for( i=0; iCount(); i++ ) - { - if ( iModel->At( i )->Uid() == TUint32( *iSelected ) ) - { - iList->SetCurrentItemIndexAndDraw( i ); - HandleListBoxEventL(iList, - MEikListBoxObserver::EEventItemSingleClicked); - /* HandleListBoxEventL(iList, - MEikListBoxObserver::EEventItemDoubleClicked);*/ - return; //exit here - } - } - iList->SetCurrentItemIndexAndDraw( 0 );//set something that does no harm... - HandleListBoxEventL(iList, - MEikListBoxObserver::EEventItemSingleClicked ); // simulate selection... - /*HandleListBoxEventL(iList, - MEikListBoxObserver::EEventItemDoubleClicked);*/ - - APSETUILOGGER_LEAVEFN( EListbox,"NetSelPopup::SetSelectedL") - } - - - - -// --------------------------------------------------------- -// CApNetSelPopupList::DynInitMenuPaneL -// --------------------------------------------------------- -// -void CApNetSelPopupList::DynInitMenuPaneL( TInt aResourceId, - CEikMenuPane* aMenuPane ) - { - APSETUILOGGER_ENTERFN( EListbox,"NetSelPopup::DynInitMenuPaneL") - - CAknSettingPage::DynInitMenuPaneL( aResourceId, aMenuPane ); - if ( aResourceId == R_APSETTINGSUI_MENU_NETWORK ) - { - if ( Need2DeleteSelect( aResourceId ) ) - { - aMenuPane->DeleteMenuItem( EApSelCmdSelect ); - } - if ( Need2DeleteOpenDelete( aResourceId ) ) - { - aMenuPane->DeleteMenuItem( EApSelCmdDelete ); - } - if ( iProtectionSupported ) - { - if ( CApProtHandler::IsTableProtectedL( - iDataModel->Database()->Database() ) ) - { - aMenuPane->DeleteMenuItem( EApSelCmdNew ); - } - } - if ( !iHelpSupported ) - { - aMenuPane->DeleteMenuItem( EAknCmdHelp ); - } - } - - APSETUILOGGER_LEAVEFN( EListbox,"NetSelPopup::DynInitMenuPaneL") - } - - -// From MEikCommandObserver -// --------------------------------------------------------- -// CApNetSelPopupList::ProcessCommandL -// --------------------------------------------------------- -// -void CApNetSelPopupList::ProcessCommandL( TInt aCommandId ) - { - APSETUILOGGER_ENTERFN( EListbox,"NetSelPopup::ProcessCommandL") - - if ( MenuShowing() ) - { - HideMenu(); - } - - switch ( aCommandId ) - { - case EAknSoftkeyOptions: - { - DisplayMenuL(); - break; - } - case EAknSoftkeyBack: - { - AttemptExitL( EFalse ); - break; - } - case EAknSoftkeyCancel: - { - *iEventStore |= KApUiEventShutDownRequested; - AttemptExitL( EFalse ); - break; - } - case EApSelCmdSelect: - { - *iEventStore |= KApUiEventSelected; - AttemptExitL( ETrue ); - break; - } - case EApSelCmdNew: - { - // create a new network group here - if ( HandleCreateNewNetworkGroupL() ) - { - SetHighlighted(); - } - break; - } - case EApSelCmdDelete: - { - // As it might have been started by the Clear key, - // we must check if there is any... - TInt cnt = iModel->Count(); - if ( ( iNeedsNone & ( cnt > 1 ) ) || ( !iNeedsNone && cnt ) ) - { - // as we must be standing on an item, it must exists... - // So no problem on iModel->At( ...) - if ( iList->CurrentItemIndex() < ( iModel->Count()-1 ) ) - {// move to next one if possible - iPreferredUid = iModel->At( - iList->CurrentItemIndex()+1 )->Uid(); - } - else - { // if it is the last, move to previous if possible. - // if not, set to 0 - if ( iModel->Count()> 1 ) - {// move to prev. one if possible - iPreferredUid = iModel->At( - iList->CurrentItemIndex()-1 )->Uid(); - } - else - { - iPreferredUid = 0; - } - } - iHandler->HandleNetworkDeleteCmdL( - iModel->At( iList->CurrentItemIndex() )->Uid() ); - } - break; - } - case EAknCmdHelp: - { - if ( iHelpSupported ) - { - iDataModel->LaunchHelpL(); - } - break; - } - default: - { - // silently ignore it - break; - } - } - // check if user wants to Exit.... - if ( *iEventStore & KApUiEventExitRequested ) - { - AttemptExitL( EFalse ); - } - else - { - switch ( aCommandId ) - { - case EApSelCmdExit: - { - *iEventStore |= KApUiEventExitRequested; - AttemptExitL( EFalse ); - break; - } - case EEikCmdExit: - { - *iEventStore |= KApUiEventShutDownRequested; - AttemptExitL( EFalse ); - break; - } - default: - { - break; - } - } - } - - APSETUILOGGER_LEAVEFN( EListbox,"NetSelPopup::ProcessCommandL") - } - - - -// From CCoeControl -// --------------------------------------------------------- -// CApNetSelPopupList::OfferKeyEventL -// --------------------------------------------------------- -// -TKeyResponse CApNetSelPopupList::OfferKeyEventL( const TKeyEvent& aKeyEvent, - TEventCode aType) - { - APSETUILOGGER_ENTERFN( EListbox,"NetSelPopup::OfferKeyEventL") - TKeyResponse retval; - if ( aType == EEventKey ) - { - if ( ( aKeyEvent.iCode == EKeyDelete ) || - ( aKeyEvent.iCode == EKeyBackspace ) ) - { - ProcessCommandL( EApSelCmdDelete ); - retval = EKeyWasConsumed; - } - else - { - if ( aKeyEvent.iCode == EKeyOK ) - { // process only if command is available... - ProcessCommandL( EApSelCmdSelect ); - retval = EKeyWasConsumed; - } - else - { - retval = CAknRadioButtonSettingPage::OfferKeyEventL( - aKeyEvent, aType ); - } - } - } - else - { - retval = CAknRadioButtonSettingPage::OfferKeyEventL( aKeyEvent, aType ); - } - - APSETUILOGGER_LEAVEFN( EListbox,"NetSelPopup::OfferKeyEventL") - return retval; - } - - - -// --------------------------------------------------------- -// CApNetSelPopupList::Need2DeleteSelect -// --------------------------------------------------------- -// -TBool CApNetSelPopupList::Need2DeleteSelect( TInt aResourceId ) - { - APSETUILOGGER_ENTERFN( EListbox,"NetSelPopup::Need2DeleteSelect<->") - return ( ( aResourceId == R_APSETTINGSUI_MENU_SELECT_NORMAL ) && - ( iList->Model()->NumberOfItems() == 0 ) ); - } - - - -// --------------------------------------------------------- -// CApNetSelPopupList::Need2DeleteOpenDelete -// --------------------------------------------------------- -// -TBool CApNetSelPopupList::Need2DeleteOpenDelete( TInt aResourceId ) - { - APSETUILOGGER_ENTERFN( EListbox,"NetSelPopup::Need2DeleteOpenDelete<->") - - return ( ( aResourceId == R_APSETTINGSUI_MENU_NETWORK ) && - ( - ( - ( iList->Model()->NumberOfItems() == 0) && - ( iNeedsNone == EFalse ) - ) - || - ( ( iNeedsNone ) && - ( iModel->At( iList->CurrentItemIndex() )->Uid() - == KApNoneUID ) - ) ) ); - } - - - -// --------------------------------------------------------- -// CApNetSelPopupList::HandleCreateNewNetworkGroupL -// --------------------------------------------------------- -// -TBool CApNetSelPopupList::HandleCreateNewNetworkGroupL() - { - APSETUILOGGER_ENTERFN( EListbox,"NetSelPopup::HandleCreateNewNetworkGroupL") - - TBool retval( EFalse ); - - // must be prepared for the worst case... - TBuf textToChange; - - TInt TextSettingPageFlags( EAknSettingPageNoOrdinalDisplayed ); - - CAccessPointTextSettingPage* dlg = - new( ELeave )CAccessPointTextSettingPage( - R_TEXT_SETTING_PAGE_NETW_NAME, - textToChange, - TextSettingPageFlags, - EFalse ); - - if ( dlg->ExecuteLD( CAknSettingPage::EUpdateWhenAccepted ) ) - { - CApNetworkItem* network = CApNetworkItem::NewLC(); - network->SetUid( 0 ); // will be assigned when written toi disk - network->SetNameL( textToChange ); - iDataModel->DataHandler()->CreateNetworkL( *network ); - iPreferredUid = network->Uid(); - CleanupStack::PopAndDestroy( network ); - retval = ETrue; - } - *iEventStore |= KApUiEventEdited; - - APSETUILOGGER_LEAVEFN( EListbox,"NetSelPopup::HandleCreateNewNetworkGroupL") - return retval; - } - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/src/ApNetSelectorListBoxModel.cpp --- a/apengine/apsettingshandlerui/src/ApNetSelectorListBoxModel.cpp Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,135 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implementation of CApNetSelectorListboxModel. -* -*/ - - -// INCLUDE FILES -#include "ApNetSelectorListBoxModel.h" -#include "ApNetworkItem.h" -#include - -#include "ApSettingsHandlerLogger.h" - -// CONSTANTS - - -// ================= MEMBER FUNCTIONS ======================= - -// --------------------------------------------------------- -// CApNetSelectorListboxModel::CApNetSelectorListboxModel -// --------------------------------------------------------- -// -CApNetSelectorListboxModel::CApNetSelectorListboxModel( ) -:CApNetworkItemList() - { - APSETUILOGGER_ENTERFN( EListbox,"NetSelListModel::CApNetSelectorListboxModel<->") - } - - -// --------------------------------------------------------- -// CApNetSelectorListboxModel::~CApNetSelectorListboxModel -// --------------------------------------------------------- -// -CApNetSelectorListboxModel::~CApNetSelectorListboxModel() - { - APSETUILOGGER_ENTERFN( EListbox,"NetSelListModel::~CApNetSelectorListboxModel") - - ResetAndDestroy(); // deletes all elements... - - APSETUILOGGER_LEAVEFN( EListbox,"NetSelListModel::~CApNetSelectorListboxModel") - } - - -// --------------------------------------------------------- -// CApNetSelectorListboxModel::MdcaCount -// --------------------------------------------------------- -// -TInt CApNetSelectorListboxModel::MdcaCount() const - { - APSETUILOGGER_ENTERFN( EListbox,"NetSelListModel::MdcaCount<->") - return Count(); - } - - -// --------------------------------------------------------- -// CApNetSelectorListboxModel::MdcaPoint -// --------------------------------------------------------- -// -TPtrC CApNetSelectorListboxModel::MdcaPoint( TInt aIndex ) const - { - APSETUILOGGER_ENTERFN( EListbox,"NetSelListModel::MdcaPoint") - - // We need to cast away the const-ness from the buffer. - // It was definitely made for formatting! - FormatListboxText( aIndex, - ( MUTABLE_CAST( TBuf&, iBuf ) ) ); - - - APSETUILOGGER_LEAVEFN( EListbox,"NetSelListModel::MdcaPoint") - return iBuf; - } - - -// --------------------------------------------------------- -// CApNetSelectorListboxModel::Item4Uid -// --------------------------------------------------------- -// -TInt CApNetSelectorListboxModel::Item4Uid( TUint32 aUid, TInt& aErr ) const - { - APSETUILOGGER_ENTERFN( EListbox,"NetSelListModel::Item4Uid") - - aErr = KErrNone; - TInt retval( KErrNotFound ); - for ( TInt i=0; iUid() == aUid ) - { - retval = i; - break; - } - } - if ( retval == KErrNotFound ) - { - aErr = KErrNotFound; - } - - APSETUILOGGER_LEAVEFN( EListbox,"NetSelListModel::Item4Uid") - return retval; - } - - - -// --------------------------------------------------------- -// CApNetSelectorListboxModel::FormatListboxText -// --------------------------------------------------------- -// -void CApNetSelectorListboxModel::FormatListboxText( TInt aIndex, - TDes& aBuf ) const - { - APSETUILOGGER_ENTERFN( EListbox,"NetSelListModel::FormatListboxText") - - aBuf.Format( - KListItemFormatGraphicOnOff, - 1, - Min( At( aIndex )->Name().Length(), - KMaxListItemNameLength ), - &At( aIndex )->Name() - ); - - APSETUILOGGER_LEAVEFN( EListbox,"NetSelListModel::FormatListboxText") - } - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/src/ApSelPopupList.cpp --- a/apengine/apsettingshandlerui/src/ApSelPopupList.cpp Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,955 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Defines CApSelPopupList for access point selection. -* -*/ - - -// INCLUDE FILES -#include "APSettingsHandlerUIVariant.hrh" - -#include -#include -#include - -#include "ApSelectorListBoxModel.h" -#include "ApSettingsModel.h" -#include "ApSettingsHandlerUI.hrh" -#include "ApSelPopupList.h" -#include "ApsettingshandleruiImpl.h" - - -#include "ApSettingsHandlerLogger.h" - -#include // for protection of settings - -#include -#include -#include - - -// CONSTANTS -// Drive and file name of the MBM file containing icons for Protection -_LIT( KFileIcons, "z:ApSettings.mbm" ); - - -// ================= MEMBER FUNCTIONS ======================= - -// --------------------------------------------------------- -// CApSelPopupList::NewL -// --------------------------------------------------------- -// -CApSelPopupList* CApSelPopupList::NewL( CApSettingsModel& aModel, - CApSettingsHandlerImpl& aHandler, - TInt& aCurrentSelectionIndex, - TInt& aPreferredUid, - TSelectionMenuType aSelMenuType, - TInt aIspFilter, TInt aBearerFilter, - TInt aSortType, TUint32& aEventStore, - CDesCArrayFlat* aItemArray, - TBool aNeedsNone, - TBool aNoEdit, - TInt aReqIpvType, - TVpnFilterType aVpnFilterType - ) - { - APSETUILOGGER_ENTERFN( EListbox,"SelPopupList::NewL") - CApSelPopupList* self = - new ( ELeave ) CApSelPopupList( aModel, aHandler, - aCurrentSelectionIndex, - aPreferredUid, aSelMenuType, - aIspFilter, aBearerFilter, - aSortType, aItemArray, - aEventStore, aNeedsNone, - aNoEdit, - aReqIpvType, - aVpnFilterType - ); -// till that point, object is only partially constructed! - - APSETUILOGGER_LEAVEFN( EListbox,"SelPopupList::NewL") - return self; - } - - - - - -// --------------------------------------------------------- -// CApSelPopupList::NewL -// --------------------------------------------------------- -// -CApSelPopupList* CApSelPopupList::NewL( CApSettingsModel& aModel, - CApSettingsHandlerImpl& aHandler, - TInt& aCurrentSelectionIndex, - TInt& aPreferredUid, - TSelectionMenuType aSelMenuType, - TInt aIspFilter, TInt aBearerFilter, - TInt aSortType, TUint32& aEventStore, - CDesCArrayFlat* aItemArray, - TBool aNeedsNone, - TInt aReqIpvType, - TVpnFilterType aVpnFilterType, - TBool aIncludeEasyWlan, - TBool aNoEdit - ) - { - APSETUILOGGER_ENTERFN( EListbox,"SelPopupList::NewL2") - - CApSelPopupList* self = - new ( ELeave ) CApSelPopupList( aModel, aHandler, - aCurrentSelectionIndex, - aPreferredUid, aSelMenuType, - aIspFilter, aBearerFilter, - aSortType, aItemArray, - aEventStore, aNeedsNone, - aReqIpvType, - aVpnFilterType, - aIncludeEasyWlan, - aNoEdit - ); -// till that point, object is only partially constructed! - - APSETUILOGGER_LEAVEFN( EListbox,"SelPopupList::NewL2") - return self; - } - - - -// --------------------------------------------------------- -// CApSelPopupList::ConstructL -// --------------------------------------------------------- -// -void CApSelPopupList::ConstructL() - { - APSETUILOGGER_ENTERFN( EListbox,"SelPopupList::ConstructL") - - FeatureManager::InitializeLibL(); - iHelpSupported = FeatureManager::FeatureSupported( KFeatureIdHelp ); - iProtectionSupported = FeatureManager::FeatureSupported( - KFeatureIdSettingsProtection ); - FeatureManager::UnInitializeLib(); - - CAknRadioButtonSettingPage::ConstructL(); - iList = ListBoxControl(); - iModel = new( ELeave )CApSelectorListboxModel( - CApSelectorListboxModel::EGraphicOnOff ); - iList->Model()->SetItemTextArray( iModel ); - if ( iProtectionSupported ) - { - TInt offset = LoadIconsL(); - iModel->SetOwnIconOffset( offset ); - } - FillListBoxWithDataL(); - iDataModel->Database()->AddObserverL( this ); - - if ( !iModel->Count() ) - { - // no ap defined, ask query if editable, - // show note if not - if ( iNoEdit ) - { - // show note first, - ShowNoteL( R_APUI_VIEW_NO_IAP_DEFINED_INFO ); - // then simply go back: - iDoExit = ETrue; - } - else - { - if ( !AskQueryL( R_APUI_IAP_CREATE_NEW ) ) - { // do not create, simply go back - iDoExit = ETrue; - } - else - { // create new AP - // just ket it pass, later in it will be handled in CheckIfEmptyL() - } - } - } - - APSETUILOGGER_LEAVEFN( EListbox,"SelPopupList::ConstructL") - } - - - -// Destructor -CApSelPopupList::~CApSelPopupList() - { - APSETUILOGGER_ENTERFN( EListbox,"SelPopupList::~CApSelPopupList") - - if ( iDataModel ) - { - if ( iDataModel->Database() ) - { - // must remove observer here as there is a chance that we do not exit - // through the standard way but through Leave(KErrLeaveWithoutAlert)... - iDataModel->Database()->RemoveObserver( this ); - } - } - - if ( iModel ) - { - iModel->ResetAndDestroy(); - delete iModel; - } - - APSETUILOGGER_LEAVEFN( EListbox,"SelPopupList::~CApSelPopupList") - } - - - -// Constructor -CApSelPopupList::CApSelPopupList( - CApSettingsModel& aModel, - CApSettingsHandlerImpl& aHandler, - TInt& aIndex, TInt& aPreferredUid, - TSelectionMenuType aSelMenuType, - TInt aIspFilter, TInt aBearerFilter, - TInt aSortType, CDesCArrayFlat* aItemArray, - TUint32& aEventStore, TBool aNeedsNone, - TBool aNoEdit, - TInt aReqIpvType, - TVpnFilterType aVpnFilterType - ) -:CAknRadioButtonSettingPage( R_POPUP_LIST_SETTING_PAGE, - aIndex, aItemArray ), -iDataModel( &aModel ), -iSelected( &aPreferredUid ), -iBearerFilter( aBearerFilter ), -iIspFilter( aIspFilter ), -iSortType( aSortType ), -iSelMenuType( aSelMenuType ), -iHandler( &aHandler ), -iEventStore( &aEventStore ), -iPreferredUid( aPreferredUid ), -iNeedsNone( aNeedsNone ), -iNeedUnlock( EFalse ), -iReqIpvType( aReqIpvType ), -iVpnFilterType( aVpnFilterType ), -iVariant( aHandler.iExt->iVariant ), -iIncludeEasyWlan( EFalse ), -iNoEdit( aNoEdit ) - { - } - - - - -CApSelPopupList::CApSelPopupList( - CApSettingsModel& aModel, - CApSettingsHandlerImpl& aHandler, - TInt& aIndex, TInt& aPreferredUid, - TSelectionMenuType aSelMenuType, - TInt aIspFilter, TInt aBearerFilter, - TInt aSortType, CDesCArrayFlat* aItemArray, - TUint32& aEventStore, TBool aNeedsNone, - TInt aReqIpvType, - TVpnFilterType aVpnFilterType, - TBool aIncludeEasyWlan, - TBool aNoEdit - ) -:CAknRadioButtonSettingPage( R_POPUP_LIST_SETTING_PAGE, - aIndex, aItemArray ), -iDataModel( &aModel ), -iSelected( &aPreferredUid ), -iBearerFilter( aBearerFilter ), -iIspFilter( aIspFilter ), -iSortType( aSortType ), -iSelMenuType( aSelMenuType ), -iHandler( &aHandler ), -iEventStore( &aEventStore ), -iPreferredUid( aPreferredUid ), -iNeedsNone( aNeedsNone ), -iNeedUnlock( EFalse ), -iReqIpvType( aReqIpvType ), -iVpnFilterType( aVpnFilterType ), -iVariant( aHandler.iExt->iVariant ), -iIncludeEasyWlan( aIncludeEasyWlan ), -iInitialised( EFalse ), -iNoEdit( aNoEdit ) - { - } - - - - -// --------------------------------------------------------- -// CApSelPopupList::SetHighlighted() -// called when needs to change the highlighting -// --------------------------------------------------------- -// -void CApSelPopupList::SetHighlighted() - { - APSETUILOGGER_ENTERFN( EListbox,"SelPopupList::SetHighlighted") - - TInt err( KErrNone ); - TInt idx = iModel->Item4Uid( iPreferredUid, err ); - - // if UID exists, set as current, else set 0 as current. - iList->SetCurrentItemIndexAndDraw( err == KErrNone ? idx : 0); - - APSETUILOGGER_LEAVEFN( EListbox,"SelPopupList::SetHighlighted") - } - - -// --------------------------------------------------------- -// CApSelPopupList::GetHelpContext() -// --------------------------------------------------------- -// -void CApSelPopupList::GetHelpContext(TCoeHelpContext& aContext) const - { - APSETUILOGGER_ENTERFN( EListbox,"SelPopupList::GetHelpContext") - - aContext.iMajor = iHandler->iHelpMajor; - - APSETUILOGGER_LEAVEFN( EListbox,"SelPopupList::GetHelpContext") - } - - -// --------------------------------------------------------- -// CApSelPopupList::HandleApDbEventL -// called by the active access point framework -// --------------------------------------------------------- -// -void CApSelPopupList::HandleApDbEventL( TEvent anEvent ) - { - APSETUILOGGER_ENTERFN( EListbox,"SelPopupList::HandleApDbEventL") - - switch ( anEvent ) - { - case EDbChanged: - { - FillListBoxWithDataL(); - break; - } - case EDbClosing: - { - break; - } - case EDbAvailable: - { - if ( iNeedUnlock ) - { - FillListBoxWithDataL(); - } - break; - } - default: - { - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - break; - } - } - - APSETUILOGGER_LEAVEFN( EListbox,"SelPopupList::HandleApDbEventL") - } - - -// --------------------------------------------------------- -// CApSelPopupList::ActivateL() -// called after the dialog is shown -// used to handle empty list - query -// --------------------------------------------------------- -// -void CApSelPopupList::ActivateL() - { - APSETUILOGGER_ENTERFN( EListbox,"SelPopupList::ActivateL") - - CAknRadioButtonSettingPage::ActivateL(); - - if (iDoExit) - { - User::Leave(KErrNone); - return; - } - - // put empty list checking & required actions here. - CheckIfEmptyL(); - - APSETUILOGGER_LEAVEFN( EListbox,"SelPopupList::ActivateL") - } - - - -// --------------------------------------------------------- -// CApSelPopupList::SelectCurrentItemL() -// called after the setting had been changed -// --------------------------------------------------------- -// -void CApSelPopupList::SelectCurrentItemL() - { - APSETUILOGGER_ENTERFN( EListbox,"SelPopupList::SelectCurrentItemL") - - CAknRadioButtonSettingPage::SelectCurrentItemL(); - TInt idx = iList->CurrentItemIndex(); - if ( idx >= 0 ) - { - *iSelected = iModel->At( idx )->Uid(); - } - - APSETUILOGGER_LEAVEFN( EListbox,"SelPopupList::SelectCurrentItemL") - } - - - -// --------------------------------------------------------- -// CApSelPopupList::OkToExitL( TInt aButtonId ) -// called by framework when the OK button is pressed -// --------------------------------------------------------- -// -TBool CApSelPopupList::OkToExitL( TInt aButtonId ) - { - APSETUILOGGER_ENTERFN( EListbox,"SelPopupList::OkToExitL") - - // Translate the button presses into commands for the appui & current - // view to handle. - // This is a very good thing, that aButtonId is a TInt, - // but the caller ( CAknSettingPage ) simply uses a TBool. - // The value of ETrue means the button usually for Yes, Ok, Options, etc - // and EFalse means Back, Cancel, etc. - // so we must act according to a boolean value and not - // according to the real button id... - TBool IsAccepted = aButtonId; - - if ( IsAccepted ) - { - TInt idx = iList->CurrentItemIndex(); - if ( idx >= 0 ) - { - *iSelected = iModel->At( idx )->Uid(); - } - } - - APSETUILOGGER_LEAVEFN( EListbox,"SelPopupList::OkToExitL") - return ETrue; - } - - - -// --------------------------------------------------------- -// CApSelPopupList::FillListBoxWithDataL() -// called when listbox needs to be filled with data -// --------------------------------------------------------- -// -void CApSelPopupList::FillListBoxWithDataL() - { - APSETUILOGGER_ENTERFN( EListbox,"SelPopupList::FillListBoxWithDataL") - - iPreferredLine = iList->CurrentItemIndex(); - if ( iPreferredLine < 0 ) - { - iPreferredLine = 0; - } - - TBool isLocked(EFalse); - iNeedUnlock = EFalse; - iDataModel->AllListItemDataL( isLocked, *iModel, iIspFilter, - iBearerFilter, iSortType, iReqIpvType, - iVpnFilterType, iIncludeEasyWlan ); - if ( isLocked ) - { - iNeedUnlock = ETrue; - } - - iList->View()->SetDisableRedraw( ETrue ); - - if ( iNeedsNone ) - { - HBufC* buf = iEikonEnv->AllocReadResourceLC( R_APUI_VIEW_AP_NONE ); - CApListItem* NoneItem = CApListItem::NewLC - ( - EIspTypeInternetAndWAP, KApNoneUID, - *buf, - EApBearerTypeHSCSD - ); - iModel->InsertL( 0, NoneItem ); - // as InsertL passes ownership of item to array, - // remove from cleanupstack - CleanupStack::Pop(); // NoneItem, as ownership is passed to array - CleanupStack::PopAndDestroy(); // buf, as item has copied it... - } - - iList->HandleItemAdditionL(); - - iList->View()->SetDisableRedraw( EFalse ); - iList->HandleItemAdditionL(); - - SetSelectedL(); - iPreferredUid = *iSelected; - - SetHighlighted(); - - SizeChanged(); - DrawNow(); - - CheckAndSetDataValidity(); - UpdateCbaL(); - - APSETUILOGGER_LEAVEFN( EListbox,"SelPopupList::FillListBoxWithDataL") - } - - -// --------------------------------------------------------- -// CApSelPopupList::SetSelectedL() -// --------------------------------------------------------- -// -void CApSelPopupList::SetSelectedL() - { - APSETUILOGGER_ENTERFN( EListbox,"SelPopupList::SetSelectedL") - - TInt i( 0 ); - TInt idx( 0 );//set something that does no harm... - TInt count = iModel->Count(); - for( i=0; iAt( i )->Uid() == TUint32( *iSelected ) ) - { - idx = i; - i = count; - } - } - iList->SetCurrentItemIndexAndDraw( idx ); - SelectCurrentItemL(); - - APSETUILOGGER_LEAVEFN( EListbox,"SelPopupList::SetSelectedL") - } - - -// --------------------------------------------------------- -// CApSelPopupList::CheckIfEmptyL() -// --------------------------------------------------------- -// -void CApSelPopupList::CheckIfEmptyL() - { - APSETUILOGGER_ENTERFN( EListbox,"SelPopupList::CheckIfEmptyL") - - if ( !iModel->Count() ) - { - // no ap defined, create new AP - ProcessCommandL( EApSelCmdNewBlank ); - } - iInitialised = ETrue; - - APSETUILOGGER_LEAVEFN( EListbox,"SelPopupList::CheckIfEmptyL") - } - - - -// --------------------------------------------------------- -// CApSelPopupList::DynInitMenuPaneL -// --------------------------------------------------------- -// -void CApSelPopupList::DynInitMenuPaneL( TInt aResourceId, - CEikMenuPane* aMenuPane ) - { - APSETUILOGGER_ENTERFN( EListbox,"SelPopupList::DynInitMenuPaneL") - - CAknSettingPage::DynInitMenuPaneL( aResourceId, aMenuPane ); - - TInt itemCount = iList->Model()->NumberOfItems(); - TInt idx = iList->CurrentItemIndex(); - TUint32 itemUid(0); - if ( itemCount ) - { - itemUid = iModel->At( idx )->Uid(); - } - - if ( iHandler->iModel->Need2DeleteSelect( aResourceId, itemCount ) ) - { - aMenuPane->DeleteMenuItem( EApSelCmdSelect ); - } - - if ( iHandler->iModel->Need2DeleteOpen( aResourceId, itemCount, - itemUid, iNeedsNone ) ) - { - aMenuPane->DeleteMenuItem( EApSelCmdOpen ); - } - if ( iHandler->iModel->Need2DeleteDeleteL( aResourceId, itemCount, - itemUid, iNeedsNone ) ) - { - aMenuPane->DeleteMenuItem( EApSelCmdDelete ); - } - - if ( iHandler->iModel->Need2DeleteNewUseExisting( - aResourceId, itemCount ) ) - { - aMenuPane->DeleteMenuItem( EApSelCmdNewUseExisting ); - } - if ( iHandler->iModel->Need2DeleteNewL( aResourceId ) ) - { - aMenuPane->DeleteMenuItem( EApSelCmdNewBlank ); - } - - if ( iHandler->iModel->Need2DeleteHelp( aResourceId ) ) - { - aMenuPane->DeleteMenuItem( EAknCmdHelp ); - } - - if ( aResourceId == R_APSETTINGSUI_MENU_SELECT_NORMAL ) - { - if ( iSelMenuType == EApSettingsSelMenuSelectOnly ) - { - // Disallow other menues by deleting them - aMenuPane->DeleteMenuItem( EApSelCmdExit ); - } - } - - APSETUILOGGER_LEAVEFN( EListbox,"SelPopupList::DynInitMenuPaneL") - } - - -// From MEikCommandObserver -// --------------------------------------------------------- -// CApSelPopupList::ProcessCommandL -// --------------------------------------------------------- -// -void CApSelPopupList::ProcessCommandL( TInt aCommandId ) - { - APSETUILOGGER_ENTERFN( EListbox,"SelPopupList::ProcessCommandL") - - if ( MenuShowing() ) - { - HideMenu(); - } - - switch ( aCommandId ) - { - case EAknSoftkeyOptions: - { - DisplayMenuL(); - break; - } - case EAknSoftkeyBack: - { - AttemptExitL( EFalse ); - break; - } - case EAknSoftkeyCancel: - { - *iEventStore |= KApUiEventShutDownRequested; - AttemptExitL( EFalse ); - break; - } - case EAknSoftkeyOk: - case EApSelCmdSelect: - { - *iEventStore |= KApUiEventSelected; - - TUint32 currUid = iModel->At( iList->CurrentItemIndex() )->Uid(); - if( iPreferredUid != currUid ) - { - iPreferredUid = currUid; - SetHighlighted(); - } - - CAknRadioButtonSettingPage::SelectCurrentItemL(); - AttemptExitL( ETrue ); - break; - } - case EApSelCmdOpen: - {// as we must be standing on an item, it must exist... - // So no problem on iModel->At( ...) - iPreferredUid = iModel->At( iList->CurrentItemIndex() )->Uid(); - iHandler->DoRunViewerL( iPreferredUid ); - SetHighlighted(); - break; - } - case EApSelCmdNew: - { - break; // starts a submenu, nothing to do here - } - case EApSelCmdNewBlank: - { - iPreferredUid = iHandler->HandleApBlankNewL( - iBearerFilter, iIspFilter ); - SetHighlighted(); - break; - } - case EApSelCmdNewUseExisting: - { - TUint32 currid = iModel->At( iList->CurrentItemIndex() )->Uid(); - iPreferredUid = iHandler->HandleDuplicateL( currid ); - SetHighlighted(); - break; - } - case EApSelCmdDelete: - { - // As it might have been started by the Clear key, - // we must check if there is any... - TInt cnt = iModel->Count(); - if ( ( iNeedsNone & ( cnt > 1 ) ) || ( !iNeedsNone && cnt ) ) - { - // as we must be standing on an item, it must exists... - // So no problem on iModel->At( ...) - if ( iList->CurrentItemIndex() < ( iModel->Count()-1 ) ) - {// move to next one if possible - iPreferredUid = iModel->At( - iList->CurrentItemIndex()+1 )->Uid(); - } - else - { // if it is the last, move to previous if possible. - // if not, set to 0 - if ( iModel->Count()> 1 ) - {// move to prev. one if possible - iPreferredUid = iModel->At( - iList->CurrentItemIndex()-1 )->Uid(); - } - else - { - iPreferredUid = 0; - } - } - iHandler->HandleApDeleteCmdL( - iModel->At( iList->CurrentItemIndex() )->Uid(), - iModel->Count() == (1+iNeedsNone) ); - } - break; - } - case EAknCmdHelp: - { - if ( iHelpSupported ) - { - iDataModel->LaunchHelpL(); - } - break; - } - default: - { - // silently ignore it - break; - } - } - // check if user wants to Exit.... - if ( *iEventStore & KApUiEventExitRequested ) - { - if ( iInitialised ) - { - AttemptExitL( EFalse ); - } - else - { - *iEventStore |= KApUiEventInternal; - User::Leave(KLeaveWithoutAlert); - } - } - else - { - switch ( aCommandId ) - { - case EApSelCmdExit: - { - *iEventStore |= KApUiEventExitRequested; - AttemptExitL( EFalse ); - break; - } - case EEikCmdExit: - { - *iEventStore |= KApUiEventShutDownRequested; - AttemptExitL( EFalse ); - break; - } - default: - { - break; - } - } - } - - APSETUILOGGER_LEAVEFN( EListbox,"SelPopupList::ProcessCommandL") - } - - - // From MEikListBoxObserver -void CApSelPopupList::HandleListBoxEventL( CEikListBox* aListBox, - MEikListBoxObserver::TListBoxEvent aEventType ) - { - APSETUILOGGER_ENTERFN( EListbox,"SelPopupList::HandleListBoxEventL") - - switch ( aEventType ) - { - case EEventEnterKeyPressed: - case EEventItemDoubleClicked: - case EEventItemSingleClicked: - { - ProcessCommandL( EApSelCmdSelect ); - break; - } - case EEventEditingStarted: - { - break; - } - case EEventEditingStopped: - { - break; - } - default: - { - CAknRadioButtonSettingPage::HandleListBoxEventL( aListBox, aEventType ); - }; - }; - - APSETUILOGGER_LEAVEFN( EListbox,"SelPopupList::HandleListBoxEventL") - } - - -// From CCoeControl -// --------------------------------------------------------- -// CApSelPopupList::OfferKeyEventL -// --------------------------------------------------------- -// -TKeyResponse CApSelPopupList::OfferKeyEventL( const TKeyEvent& aKeyEvent, - TEventCode aType) - { - APSETUILOGGER_ENTERFN( EListbox,"SelPopupList::OfferKeyEventL") - - TKeyResponse retval; - - if ( aType == EEventKey ) - { - if ( ( aKeyEvent.iCode == EKeyDelete ) || - ( aKeyEvent.iCode == EKeyBackspace ) ) - { - if (!iNoEdit) - { - ProcessCommandL( EApSelCmdDelete ); - } - retval = EKeyWasConsumed; - } - else - { - if ( ( aKeyEvent.iCode == EKeyOK || aKeyEvent.iCode == EKeyEnter ) && - ( ( iSelMenuType == EApSettingsSelMenuSelectOnly ) || - ( iSelMenuType == EApSettingsSelMenuSelectNormal ) ) ) - { // process only if command is available... - ProcessCommandL( EApSelCmdSelect ); - retval = EKeyWasConsumed; - } - else - { - retval = CAknRadioButtonSettingPage::OfferKeyEventL( - aKeyEvent, aType ); - } - } - } - else - { - retval = CAknRadioButtonSettingPage::OfferKeyEventL( aKeyEvent, aType ); - } - - APSETUILOGGER_LEAVEFN( EListbox,"SelPopupList::OfferKeyEventL") - return retval; - } - - - - -// --------------------------------------------------------- -// CApSelPopupList::LoadIconsL -// --------------------------------------------------------- -// -TInt CApSelPopupList::LoadIconsL() - { - APSETUILOGGER_ENTERFN( EListbox,"SelPopupList::LoadIconsL") - - CArrayPtr< CGulIcon >* icons = - iList->ItemDrawer()->FormattedCellData()->IconArray(); - - TInt count = icons->Count(); - - MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance(); - - TParse mbmFile; - User::LeaveIfError( mbmFile.Set( KFileIcons, &KDC_APP_BITMAP_DIR, NULL ) ); - - icons->AppendL( AknsUtils::CreateGulIconL( - skinInstance, - KAknsIIDQgnPropWmlGprs, - mbmFile.FullName(), - EMbmApsettingsQgn_prop_wml_gprs, - EMbmApsettingsQgn_prop_wml_gprs_mask ) ); - - icons->AppendL( AknsUtils::CreateGulIconL( - skinInstance, - KAknsIIDQgnPropWmlCsd, - mbmFile.FullName(), - EMbmApsettingsQgn_prop_wml_csd, - EMbmApsettingsQgn_prop_wml_csd_mask ) ); - - icons->AppendL( AknsUtils::CreateGulIconL( - skinInstance, - KAknsIIDQgnPropWmlHscsd, - mbmFile.FullName(), - EMbmApsettingsQgn_prop_wml_hscsd, - EMbmApsettingsQgn_prop_wml_hscsd_mask ) ); - - icons->AppendL( AknsUtils::CreateGulIconL( - skinInstance, - KAknsIIDQgnPropWmlSms, - mbmFile.FullName(), - EMbmApsettingsQgn_prop_wml_sms, - EMbmApsettingsQgn_prop_wml_sms_mask ) ); - - icons->AppendL( AknsUtils::CreateGulIconL( - skinInstance, - KAknsIIDQgnPropWlanBearer, - mbmFile.FullName(), - EMbmApsettingsQgn_prop_wlan_bearer, - EMbmApsettingsQgn_prop_wlan_bearer_mask ) ); - - icons->AppendL( AknsUtils::CreateGulIconL( - skinInstance, - KAknsIIDQgnPropWlanBearer, - mbmFile.FullName(), - EMbmApsettingsQgn_prop_wlan_easy, - EMbmApsettingsQgn_prop_wlan_easy_mask ) ); - - icons->AppendL( AknsUtils::CreateGulIconL( - skinInstance, - KAknsIIDQgnIndiSettProtectedAdd, - mbmFile.FullName(), - EMbmApsettingsQgn_indi_sett_protected_add, - EMbmApsettingsQgn_indi_sett_protected_add_mask ) ); - - APSETUILOGGER_LEAVEFN( EListbox,"SelPopupList::LoadIconsL") - return count; - } - - - - -// --------------------------------------------------------- -// CApSelPopupList::HandleResourceChange -// --------------------------------------------------------- -// -void CApSelPopupList::HandleResourceChange(TInt aType) - { - APSETUILOGGER_ENTERFN( EListbox,"SelPopupList::HandleResourceChange") - - if ( aType == KAknsMessageSkinChange ) - { - iList->HandleResourceChange( aType ); - if ( iProtectionSupported ) - { - TRAP_IGNORE( LoadIconsL() ); - } - SizeChanged(); - } - - CAknRadioButtonSettingPage::HandleResourceChange( aType ); - - APSETUILOGGER_LEAVEFN( EListbox,"SelPopupList::HandleResourceChange") - } - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/src/ApSelQueryDialog.cpp --- a/apengine/apsettingshandlerui/src/ApSelQueryDialog.cpp Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,379 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Defines dialog CApSelQueryDialog for access point selection. -* -*/ - - -// INCLUDE FILES -#include -#include -#include -#include - -#include -#include - -#include - -#include "ApSelectorListBoxModel.h" -#include "ApSettingsModel.h" -#include "ApSettingsHandlerUI.hrh" -#include "ApSelQueryDialog.h" - - -#include "ApSettingsHandlerLogger.h" -#include - -// CONSTANTS -// Drive and file name of the MBM file containing icons for Protection -_LIT( KFileIcons, "z:ApSettings.mbm" ); - - -// ================= MEMBER FUNCTIONS ======================= - -// Destructor -CApSelQueryDialog::~CApSelQueryDialog() - { - APSETUILOGGER_ENTERFN( EOther,"SelQuery::~CApSelQueryDialog") - - if ( iDataModel ) - { - if ( iDataModel->Database() ) - { - // iModel is deleted by the ListBox because LB owns the model - iDataModel->Database()->RemoveObserver( this ); - } - } - - APSETUILOGGER_LEAVEFN( EOther,"SelQuery::~CApSelQueryDialog") - } - - - -// Constructor -CApSelQueryDialog::CApSelQueryDialog( CApSettingsModel& aModel, - TUint32* aIndex ) -:CAknListQueryDialog( (TInt*)aIndex ), -iNeedUnlock( EFalse ) - { - iDataModel = &aModel; - iSelected = aIndex; - } - - - -// --------------------------------------------------------- -// CApSelQueryDialog::HandleApDbEventL -// called by the active access point framework -// --------------------------------------------------------- -// -void CApSelQueryDialog::HandleApDbEventL( TEvent anEvent ) - { - APSETUILOGGER_ENTERFN( EOther,"SelQuery::HandleApDbEventL") - - switch ( anEvent ) - { - case EDbChanged: - { - FillListBoxWithDataL(); - break; - } - case EDbClosing: - { - break; - } - case EDbAvailable: - { - if ( iNeedUnlock ) - { - FillListBoxWithDataL(); - } - break; - } - default: - { - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - break; - } - } - - APSETUILOGGER_LEAVEFN( EOther,"SelQuery::HandleApDbEventL") - } - - - - -// --------------------------------------------------------- -// CApSelQueryDialog::PostLayoutDynInitL(); -// called by framework before dialog is shown -// --------------------------------------------------------- -// -void CApSelQueryDialog::PreLayoutDynInitL() - { - APSETUILOGGER_ENTERFN( EOther,"SelQuery::PreLayoutDynInitL") - - // parent creates the private listbox - CAknListQueryDialog::PreLayoutDynInitL(); - // and now we get access to it... - CAknListQueryControl *control = - ( CAknListQueryControl* )Control( EListQueryControl ); - iList = control->Listbox(); - LoadIconsL(); - FillListBoxWithDataL(); - iDataModel->Database()->AddObserverL( this ); - - APSETUILOGGER_LEAVEFN( EOther,"SelQuery::PreLayoutDynInitL") - } - - -// --------------------------------------------------------- -// CApSelQueryDialog::PostLayoutDynInitL(); -// called by framework before dialog is shown -// --------------------------------------------------------- -// -void CApSelQueryDialog::PostLayoutDynInitL() - { - APSETUILOGGER_ENTERFN( EOther,"SelQuery::PostLayoutDynInitL") - - CAknListQueryDialog::PostLayoutDynInitL(); - - APSETUILOGGER_LEAVEFN( EOther,"SelQuery::PostLayoutDynInitL") - } - - -// --------------------------------------------------------- -// CApSelQueryDialog::OkToExitL( TInt aButtonId ) -// called by framework when the OK button is pressed -// --------------------------------------------------------- -// -TBool CApSelQueryDialog::OkToExitL( TInt aButtonId ) - { - APSETUILOGGER_ENTERFN( EOther,"SelQuery::OkToExitL") - - // Translate the button presses into commands for the appui & current - // view to handle - TBool retval( EFalse ); - if ( aButtonId == EAknSoftkeySelect ) - { - TInt idx = iList->CurrentItemIndex(); - if ( idx >= 0 ) - { - if ( iModel->At( iList->CurrentItemIndex() )->IsReadOnly() ) - { // read only, do not accept - // show note - ShowNoteL( R_APUI_NOTE_CANNOT_USE_PROTECTED_AP ); - retval = EFalse; - } - else - { - *iSelected = iModel->At( iList->CurrentItemIndex() )->Uid(); - retval = ETrue; - } - } - } - else - { - if ( aButtonId == EAknSoftkeyBack ) - { - retval = ETrue; - } - } - - APSETUILOGGER_LEAVEFN( EOther,"SelQuery::OkToExitL") - return retval; - } - - - - -// From CCoeControl -// --------------------------------------------------------- -// CApSelQueryDialog::OfferKeyEventL -// --------------------------------------------------------- -// -TKeyResponse CApSelQueryDialog::OfferKeyEventL( const TKeyEvent& aKeyEvent, - TEventCode aType) - { - APSETUILOGGER_ENTERFN( EOther,"SelQuery::OfferKeyEventL") - - TKeyResponse retval; - if ( aType == EEventKey ) - { - if ( aKeyEvent.iCode == EKeyOK ) - { // process only if command is available... - ProcessCommandL( EApSelCmdSelect ); - retval = EKeyWasConsumed; - } - else - { - retval = CAknListQueryDialog::OfferKeyEventL( - aKeyEvent, aType ); - } - } - else - { - retval = CAknListQueryDialog::OfferKeyEventL( aKeyEvent, aType ); - } - - APSETUILOGGER_LEAVEFN( EOther,"SelQuery::OfferKeyEventL") - return retval; - } - - - -// From MEikCommandObserver -// --------------------------------------------------------- -// CApSelQueryDialog::ProcessCommandL -// --------------------------------------------------------- -// -void CApSelQueryDialog::ProcessCommandL( TInt aCommandId ) - { - APSETUILOGGER_ENTERFN( EOther,"SelQuery::ProcessCommandL") - - if ( MenuShowing() ) - { - HideMenu(); - } - - switch ( aCommandId ) - { - case EAknSoftkeyOptions: - { - DisplayMenuL(); - break; - } - case EAknSoftkeyBack: - { - TryExitL( EFalse ); - break; - } - case EApSelCmdSelect: - { - TryExitL( EAknSoftkeySelect ); - break; - } - case EAknCmdHelp: - { - FeatureManager::InitializeLibL(); - TBool helpSupported = FeatureManager::FeatureSupported( KFeatureIdHelp ); - FeatureManager::UnInitializeLib(); - if ( helpSupported ) - { - iDataModel->LaunchHelpL(); - } - break; - } - case EApSelCmdExit: - case EEikCmdExit: - { - TryExitL( EFalse ); - break; - } - default: - { - // silently ignore it - break; - } - } - - APSETUILOGGER_LEAVEFN( EOther,"SelQuery::ProcessCommandL") - } - - - -// --------------------------------------------------------- -// CApSelQueryDialog::FillListBoxWithDataL() -// called when listbopx needs to be filled with data -// --------------------------------------------------------- -// -void CApSelQueryDialog::FillListBoxWithDataL() - { - APSETUILOGGER_ENTERFN( EOther,"SelQuery::FillListBoxWithDataL") - - TBool needtopop( EFalse ); - - if ( ! iModel ) - { - // we must use temp var to satisfy CodeScanner - CApSelectorListboxModel* tmp = new( ELeave )CApSelectorListboxModel( - CApSelectorListboxModel::EGraphicProtection ); - // although it will be member, but mainly owned by the listbox, - // so as long as ownership is not transferred, MUST push it - CleanupStack::PushL( tmp ); - iModel = tmp; - // we need to Pop after ownership is passed to listbox - needtopop = ETrue; - } - TBool isLocked( EFalse ); - iNeedUnlock = EFalse; - iDataModel->AllListItemDataL( isLocked, *iModel, KEApIspTypeAll, - EApBearerTypeAll, KEApSortNameAscending, - iDataModel->RequestedIPvType(), - EVpnFilterNoVpn, - EFalse ); - - if ( isLocked ) - { - iNeedUnlock = ETrue; - } - - SetItemTextArray( iModel ); - if ( needtopop ) - { - // it signals that ownership of iModel had JUST been passed, - // so we can Pop it. - CleanupStack::Pop( iModel); - } - - APSETUILOGGER_LEAVEFN( EOther,"SelQuery::FillListBoxWithDataL") - } - - - - -// --------------------------------------------------------- -// CApSelQueryDialog::LoadIconsL() -// called when listbox is constructed -// --------------------------------------------------------- -// -TInt CApSelQueryDialog::LoadIconsL() - { - APSETUILOGGER_ENTERFN( EOther,"SelQuery::LoadIconsL") - - CArrayPtr< CGulIcon >* icons = new( ELeave ) CAknIconArray( KGranularity ); - CleanupStack::PushL( icons ); - - MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance(); - - TParse mbmFile; - User::LeaveIfError( mbmFile.Set( KFileIcons, &KDC_APP_BITMAP_DIR, NULL ) ); - - icons->AppendL( AknsUtils::CreateGulIconL( - skinInstance, - KAknsIIDQgnIndiSettProtectedAdd, - mbmFile.FullName(), - EMbmApsettingsQgn_indi_sett_protected_add, - EMbmApsettingsQgn_indi_sett_protected_add_mask ) ); - - SetIconArrayL( icons ); - - CleanupStack::Pop(); // icons - - APSETUILOGGER_LEAVEFN( EOther,"SelQuery::LoadIconsL") - return 0; - } - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/src/ApSelectorDialog.cpp --- a/apengine/apsettingshandlerui/src/ApSelectorDialog.cpp Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,964 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Defines dialog CApSelectorDialog for access point selection. -* -*/ - - -// INCLUDE FILES -#include "APSettingsHandlerUIVariant.hrh" - -#include -#include -#include - -#include -#include - -#include - -#include "ApSelectorDialog.h" -#include "ApSelectorListBoxModel.h" -#include "ApSelectorListbox.h" -#include "ApSettingsModel.h" -#include "ApsettingshandleruiImpl.h" -#include "ApSettingsHandlerUI.hrh" -#include "TextOverrides.h" - -#include "ApSettingsHandlerLogger.h" - -#include -// CONSTANTS - - - -// ================= MEMBER FUNCTIONS ======================= -// --------------------------------------------------------- -// CApSelectorDialog::ConstructAndRunLD -// Constructs the dialog and runs it. -// --------------------------------------------------------- -// -TInt CApSelectorDialog::ConstructAndRunLD( CApSettingsModel& aModel, - CApSettingsHandlerImpl& aHandler, - TUint32 aHighLight, - TUint32& aSelected ) - { - APSETUILOGGER_ENTERFN( EDialog,"SelDIalog::ConstructAndRunLD") - - CleanupStack::PushL( this ); - - FeatureManager::InitializeLibL(); - iHelpSupported = FeatureManager::FeatureSupported( KFeatureIdHelp ); - FeatureManager::UnInitializeLib(); - -#ifdef __TEST_OOMDEBUG - RFs fs; - User::LeaveIfError( fs.Connect() ); - CleanupClosePushL( fs ); - TUint att; - if ( fs.Att( KTestFileName, att ) == KErrNone ) - { - iMemTestOn = ETrue; - } - else - { - iMemTestOn = EFalse; - } - CleanupStack::PopAndDestroy(); // fs, will also close it -#endif // __TEST_OOMDEBUG - - - TInt retValue = KErrNone; - - iHighLight = aHighLight; - iSelected = &aSelected; - - iDataModel = &aModel; - iHandler = &aHandler; - iVariant = iHandler->iExt->iVariant; - - TInt aMenuTitleResourceId; - switch ( iSelMenuType ) - { - case EApSettingsSelMenuSelectOnly: - { - aMenuTitleResourceId = R_APSETTINGSUI_SELECT_ONLY_MENUBAR; - break; - } - case EApSettingsSelMenuSelectNormal: - { - aMenuTitleResourceId = R_APSETTINGSUI_SELECT_NORMAL_MENUBAR; - break; - } - case EApSettingsSelMenuNormal: - default: // defensive ! treat all error cases like normal! - { - aMenuTitleResourceId = R_APSETTINGSUI_NORMAL_MENUBAR; - break; - } - } - ConstructL( aMenuTitleResourceId ); - - TInt aDlgResourceId; - switch ( iListType ) - { - case EApSettingsSelListIsPopUp: - case EApSettingsSelListIsPopUpWithNone: - { - aDlgResourceId = R_APSELECTOR_POPUP_DIALOG; - break; - } - case EApSettingsSelListIsListPane: - default:// defensive ! treat all error cases like normal! - { - aDlgResourceId = R_APSELECTOR_PANE_DIALOG; - break; - } - } - - iModel = new( ELeave )CApSelectorListboxModel; - - TBool islocked; - iDataModel->AllListItemDataL( islocked, *iModel, iIspFilter, - iBearerFilter, iSortType, - iReqIpvType ); - - - if ( !iModel->Count() ) - { - // no ap defined, ask query if editable, - // show note if not - if ( iNoEdit ) - { - // show note first, - ShowNoteL( R_APUI_VIEW_NO_IAP_DEFINED_INFO ); - // then simply go back: - User::Leave(KLeaveWithoutAlert); - } - else - { - // no ap defined, ask query - if ( !AskQueryL( R_APUI_IAP_CREATE_NEW ) ) - { // do not create, simply go back - User::Leave(KLeaveWithoutAlert); - } - else - { // create new AP - // just ket it pass, later in it will be handled in CheckIfEmptyL() - } - } - } - - CleanupStack::Pop(); // this, it will be PushL-d by executeLD... - - retValue = ExecuteLD( aDlgResourceId ); - - APSETUILOGGER_LEAVEFN( EDialog,"SelDIalog::ConstructAndRunLD") - - return retValue; - } - - - - -// --------------------------------------------------------- -// CApSelectorDialog::~CApSelectorDialog -// Destructor -// --------------------------------------------------------- -// -CApSelectorDialog::~CApSelectorDialog() - { - APSETUILOGGER_ENTERFN( EDialog,"SelDIalog::~CApSelectorDialog") - - if ( iDataModel ) - { - if ( iDataModel->Database() ) - { - iDataModel->Database()->RemoveObserver( this ); - } - } - - // iModel is deleted by the ListBox because LB owns the model... - // of course only after we passed ownership... - if ( !iModelPassed ) - { - delete iModel; - } - if ( iNaviDecorator ) - { - delete iNaviDecorator; - } - if ( iTitlePane ) - { - // set old text back, if we have it... - if ( iOldTitleText ) - { - if ( iExitReason != EShutDown ) - { - TRAP_IGNORE( iTitlePane->SetTextL( *iOldTitleText ) ); - } - delete iOldTitleText; - } - } - - APSETUILOGGER_LEAVEFN( EDialog,"SelDIalog::~CApSelectorDialog") - } - - - -// --------------------------------------------------------- -// CApSelectorDialog::NewLC -// Two-phase dconstructor, second phase is ConstructAndRunLD -// --------------------------------------------------------- -// -CApSelectorDialog* CApSelectorDialog::NewL( - TSelectionListType aListType, - TSelectionMenuType aSelMenuType, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TUint32& aEventStore, - TBool aNoEdit, - TInt aReqIpvType - ) - { - APSETUILOGGER_ENTERFN( EDialog,"SelDIalog::NewL") - - CApSelectorDialog* db = - new ( ELeave )CApSelectorDialog( aListType, aSelMenuType, - aIspFilter, aBearerFilter, - aSortType, aEventStore, - aNoEdit, - aReqIpvType ); - - APSETUILOGGER_LEAVEFN( EDialog,"SelDIalog::NewL") - return db; - } - - - - -// --------------------------------------------------------- -// CApSelectorDialog::CApSelectorDialog -// Constructor -// --------------------------------------------------------- -// -CApSelectorDialog::CApSelectorDialog( TSelectionListType aListType, - TSelectionMenuType aSelMenuType, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TUint32& aEventStore, - TBool aNoEdit, - TInt aReqIpvType - ) -:iListType( aListType ), -iSelMenuType( aSelMenuType ), -iIspFilter( aIspFilter ), -iBearerFilter( aBearerFilter ), -iSortType( aSortType ), -iEventStore( &aEventStore ), -iNeedUnlock( EFalse ), -iModelPassed( EFalse ), -iExitReason( EExitNone ), -iReqIpvType( aReqIpvType ), -iInitialised( EFalse ), -iNoEdit(aNoEdit) - { - - } - - - -// --------------------------------------------------------- -// CApSelectorDialog::InitTextsL -// called before the dialog is shown -// to initialize localized textual data -// --------------------------------------------------------- -// -void CApSelectorDialog::InitTextsL() - { - APSETUILOGGER_ENTERFN( EDialog,"SelDIalog::InitTextsL") - - // set pane text if neccessary... - // pane text needed if not pop-up... - __ASSERT_DEBUG( iTextOverrides, Panic( ENullPointer ) ); - if ( iListType == EApSettingsSelListIsListPane ) - { - iStatusPane = iEikonEnv->AppUiFactory()->StatusPane(); - iTitlePane = - ( CAknTitlePane* )iStatusPane->ControlL( - TUid::Uid( EEikStatusPaneUidTitle ) ); - - iOldTitleText = iTitlePane->Text()->AllocL(); - iTitlePane->SetTextL( - *iEikonEnv->AllocReadResourceLC( R_APUI_NAVI_AP ) ); - - CleanupStack::PopAndDestroy(); // resource R_APUI_NAVI_AP - - iNaviPane = ( CAknNavigationControlContainer* ) - iStatusPane->ControlL( - TUid::Uid( EEikStatusPaneUidNavi ) ); - iNaviDecorator = iNaviPane->CreateNavigationLabelL( KEmpty ); - iNaviPane->PushL( *iNaviDecorator ); - } - - APSETUILOGGER_LEAVEFN( EDialog,"SelDIalog::InitTextsL") - } - - - -// --------------------------------------------------------- -// CApSelectorDialog::HandleListboxDataChangeL -// called before the dialog is shown to initialize listbox data -// --------------------------------------------------------- -// -void CApSelectorDialog::HandleListboxDataChangeL() - { - APSETUILOGGER_ENTERFN( EDialog,"SelDIalog::HandleListboxDataChangeL") - - iPreferredLine = iList->CurrentItemIndex(); - if ( iPreferredLine < 0 ) - { - iPreferredLine = 0; - } - if ( !iPreferredUid ) - { // if not specified explicitly, get current and use as 'preferred' - if ( iPreferredLine >= 0 ) - { - if ( iModel->Count() ) - { - iPreferredUid = iModel->At( iPreferredLine )->Uid(); - } - } - } - - - TBool isLocked(EFalse); - iNeedUnlock = EFalse; - iDataModel->AllListItemDataL( isLocked, *iModel, iIspFilter, - iBearerFilter, iSortType, - iReqIpvType ); - if ( isLocked ) - { - iNeedUnlock = ETrue; - } - - iList->View()->SetDisableRedraw( ETrue ); - iList->HandleItemAdditionL(); - - SetHighlighted(); - - iList->View()->SetDisableRedraw( EFalse ); - iList->HandleItemAdditionL(); - - APSETUILOGGER_LEAVEFN( EDialog,"SelDIalog::HandleListboxDataChangeL") - } - - - -// --------------------------------------------------------- -// CApSelectorDialog::SetTextOverrides -// called by framework before dialog is shown -// --------------------------------------------------------- -// -void CApSelectorDialog::SetTextOverrides( CTextOverrides *aOverrides ) - { - APSETUILOGGER_ENTERFN( EDialog,"SelDIalog::SetTextOverrides<->") - - __ASSERT_DEBUG( aOverrides, Panic( ENullPointer ) ); - iTextOverrides = aOverrides; - } - - - - -// --------------------------------------------------------- -// CApSelectorDialog::CheckIfEmptyL() -// called on activation and after the db has changed -// used to handle empty list - query -// --------------------------------------------------------- -// -void CApSelectorDialog::CheckIfEmptyL() - { - APSETUILOGGER_ENTERFN( EDialog,"SelDIalog::CheckIfEmptyL") - - if ( !iModel->Count() ) - { - ProcessCommandL( EApSelCmdNewBlank ); - } - iInitialised = ETrue; - - APSETUILOGGER_LEAVEFN( EDialog,"SelDIalog::CheckIfEmptyL") - } - - -// --------------------------------------------------------- -// CApSelectorDialog::ActivateL() -// called after the dialog is shown -// used to handle empty list - query -// --------------------------------------------------------- -// -void CApSelectorDialog::ActivateL() - { - APSETUILOGGER_ENTERFN( EDialog,"SelDIalog::ActivateL") - - CAknDialog::ActivateL(); - // put empty list checking & required actions here. - CheckIfEmptyL(); - - APSETUILOGGER_LEAVEFN( EDialog,"SelDIalog::ActivateL") - } - - - -// --------------------------------------------------------- -// CApSelectorDialog::GetHelpContext() -// --------------------------------------------------------- -// -void CApSelectorDialog::GetHelpContext(TCoeHelpContext& aContext) const - { - APSETUILOGGER_ENTERFN( EDialog,"SelDIalog::GetHelpContext<->") - - aContext.iMajor = iHandler->iHelpMajor; - } - - - -// --------------------------------------------------------- -// CApSelectorDialog::HandleApDbEventLw -// called by the active access point framework -// --------------------------------------------------------- -// -void CApSelectorDialog::HandleApDbEventL( TEvent anEvent ) - { - APSETUILOGGER_ENTERFN( EDialog,"SelDIalog::HandleApDbEventL") - - switch ( anEvent ) - { - case EDbChanged: - { - HandleListboxDataChangeL(); - break; - } - case EDbClosing: - { - break; - } - case EDbAvailable: - { - if ( iNeedUnlock ) - { - HandleListboxDataChangeL(); - } - break; - } - default: - { - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - break; - } - } - - APSETUILOGGER_LEAVEFN( EDialog,"SelDIalog::HandleApDbEventL") - } - - - -// From MEikCommandObserver -void CApSelectorDialog::ProcessCommandL( TInt aCommandId ) - { - APSETUILOGGER_ENTERFN( EDialog,"SelDIalog::ProcessCommandL") - - if ( MenuShowing() ) - { - HideMenu(); - } - DoProcessCommandL( aCommandId ); - - APSETUILOGGER_LEAVEFN( EDialog,"SelDIalog::ProcessCommandL") - } - - - - -// From MEikListBoxObserver -void CApSelectorDialog::HandleListBoxEventL( CEikListBox* /*aListBox*/, - TListBoxEvent aEventType ) - { - APSETUILOGGER_ENTERFN( EDialog,"SelDIalog::HandleListBoxEventL") - - switch ( aEventType ) - { - case EEventItemSingleClicked: - case EEventEnterKeyPressed: - // both handled in the same way for now... - case EEventItemDoubleClicked: - { - ProcessCommandL( EApSelCmdOpen ); - break; - } - case EEventItemClicked: - { - break; - } - case EEventEditingStarted: - { - break; - } - case EEventEditingStopped: - { - break; - } - default: - { - }; - }; - - APSETUILOGGER_LEAVEFN( EDialog,"SelDIalog::HandleListBoxEventL") - } - - - -//---------------------------------------------------------- -// CApSelectorDialog::CreateCustomControlL -//---------------------------------------------------------- -// -SEikControlInfo CApSelectorDialog::CreateCustomControlL -( TInt aControlType ) - { - APSETUILOGGER_ENTERFN( EDialog,"SelDIalog::CreateCustomControlL") - - SEikControlInfo controlInfo; - controlInfo.iTrailerTextId = 0; - controlInfo.iFlags = 0; - if ( aControlType == KApSelectorListboxType ) - { - controlInfo.iControl = new ( ELeave ) CApSelectorListbox; - } - else - { - controlInfo.iControl = NULL; - } - - APSETUILOGGER_LEAVEFN( EDialog,"SelDIalog::CreateCustomControlL") - return controlInfo; - } - - -//---------------------------------------------------------- -// CApSelectorDialog::DynInitMenuPaneL -//---------------------------------------------------------- -// -void CApSelectorDialog::DynInitMenuPaneL( TInt aResourceId, - CEikMenuPane* aMenuPane ) - { - APSETUILOGGER_ENTERFN( EDialog,"SelDIalog::DynInitMenuPaneL") - - CAknDialog::DynInitMenuPaneL( aResourceId, aMenuPane ); - - TInt itemCount = iList->Model()->NumberOfItems(); -// TUint32 itemUid = iModel->At( iList->CurrentItemIndex() )->Uid(); - - TUint32 itemUid(0); - if ( itemCount > 0 ) - { - itemUid = iModel->At( iList->CurrentItemIndex() )->Uid(); - } - - if ( iHandler->iModel->Need2DeleteSelect( aResourceId, itemCount ) ) - { - aMenuPane->DeleteMenuItem( EApSelCmdSelect ); - } - if ( iHandler->iModel->Need2DeleteOpen( aResourceId, itemCount, - itemUid, EFalse ) ) - { - aMenuPane->DeleteMenuItem( EApSelCmdOpen ); - } - if ( iHandler->iModel->Need2DeleteDeleteL( aResourceId, itemCount, - itemUid, EFalse ) ) - { - aMenuPane->DeleteMenuItem( EApSelCmdDelete ); - } - if ( iHandler->iModel->Need2DeleteNewUseExisting( aResourceId, - itemCount ) ) - { - aMenuPane->DeleteMenuItem( EApSelCmdNewUseExisting ); - } - if ( iHandler->iModel->Need2DeleteNewL( aResourceId ) ) - { - aMenuPane->DeleteMenuItem( EApSelCmdNewBlank ); - } - - if ( iHandler->iModel->Need2DeleteHelp( aResourceId ) ) - { - aMenuPane->DeleteMenuItem( EAknCmdHelp ); - } - - APSETUILOGGER_LEAVEFN( EDialog,"SelDIalog::DynInitMenuPaneL") - } - - - -// --------------------------------------------------------- -// CApSelectorDialog::OfferKeyEventL(); -// --------------------------------------------------------- -// -TKeyResponse CApSelectorDialog::OfferKeyEventL(const TKeyEvent& aKeyEvent, - TEventCode aType) - { - APSETUILOGGER_ENTERFN( EDialog,"SelDIalog::OfferKeyEventL") - - TKeyResponse retval( EKeyWasConsumed ); - if ( ( aType == EEventKey ) && - ( ( aKeyEvent.iCode == EKeyDelete ) || - ( aKeyEvent.iCode == EKeyBackspace ) ) ) - { - if (!iNoEdit) - { - ProcessCommandL( EApSelCmdDelete ); - } - } - else - { - if ( ( aType == EEventKey ) && ( aKeyEvent.iCode == EKeyOK ) ) - { // process only if command is available... - if ( iList->Model()->NumberOfItems() > 0) - { - if (!iNoEdit) - { - ProcessCommandL( EApSelCmdOpen ); - } - } - } - else - { - if ( iList ) - { - // as list IS consuming, must handle because - // it IS the SHUTDOWN... - // or, a view switch is shutting us down... - if ( aKeyEvent.iCode == EKeyEscape ) - { - ProcessCommandL( EEikCmdExit ); - retval = EKeyWasConsumed; - } - else - { - retval = iList->OfferKeyEventL( aKeyEvent, aType ); - } - } - else - { - retval = CAknDialog::OfferKeyEventL( aKeyEvent, aType ); - } - } - } - - APSETUILOGGER_LEAVEFN( EDialog,"SelDIalog::OfferKeyEventL") - return retval; - } - - -// --------------------------------------------------------- -// CApSelectorDialog::PreLayoutDynInitL(); -// called by framework before dialog is shown -// --------------------------------------------------------- -// -void CApSelectorDialog::PreLayoutDynInitL() - { - APSETUILOGGER_ENTERFN( EDialog,"SelDIalog::PreLayoutDynInitL") - - iList = - STATIC_CAST( CApSelectorListbox*, Control( KApSelectorListboxId ) ); - iList->CreateScrollBarFrameL( ETrue ); - iList->ScrollBarFrame()->SetScrollBarVisibilityL - ( CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto ); - iList->SetListBoxObserver( this ); - - iList->Model()->SetItemTextArray( iModel ); - iModelPassed = ETrue; - iList->LoadIconsL(); - HandleListboxDataChangeL(); - iList->HandleItemAdditionL(); - InitTextsL(); - - APSETUILOGGER_LEAVEFN( EDialog,"SelDIalog::PreLayoutDynInitL") - } - - -// --------------------------------------------------------- -// CApSelectorDialog::PreLayoutDynInitL(); -// called by framework before dialog is shown -// --------------------------------------------------------- -// -void CApSelectorDialog::PostLayoutDynInitL() - { - APSETUILOGGER_ENTERFN( EDialog,"SelDIalog::PostLayoutDynInitL") - - iDataModel->Database()->AddObserverL( this ); - - APSETUILOGGER_LEAVEFN( EDialog,"SelDIalog::PostLayoutDynInitL") - } - - -// --------------------------------------------------------- -// CApSelectorDialog::OkToExitL( TInt aButtonId ) -// called by framework when the OK button is pressed -// --------------------------------------------------------- -// -TBool CApSelectorDialog::OkToExitL( TInt aButtonId ) - { - APSETUILOGGER_ENTERFN( EDialog,"SelDIalog::OkToExitL") - - // Translate the button presses into commands for the appui & current - // view to handle - TBool retval( EFalse ); - - if ( aButtonId == EAknSoftkeyOptions ) - { - if ( iSelMenuType == EApSettingsSelMenuSelectOnly ) - { - *iSelected = iList->CurrentItemUid(); - retval = ETrue; - } - else - { - DisplayMenuL(); - } - } - else if (aButtonId == EApSelCmdOpen) - { - ProcessCommandL(aButtonId); - retval = EFalse; // don't exit the dialog - } - else - { - retval = ETrue; - } - - APSETUILOGGER_LEAVEFN( EDialog,"SelDIalog::OkToExitL") - return retval; - } - - -// --------------------------------------------------------- -// CApSelectorDialog::SetHighlighted() -// called when needs to change the highlighting -// --------------------------------------------------------- -// -void CApSelectorDialog::SetHighlighted() - { - APSETUILOGGER_ENTERFN( EDialog,"SelDIalog::SetHighlighted") - - TBool done( EFalse ); - - if ( iPreferredUid ) - { - TInt err( KErrNone ); - TInt idx = iModel->Item4Uid( iPreferredUid, err ); - // if UID exists, set as current, else set 0 as current. - if ( err == KErrNone ) - { - iList->SetCurrentItemIndexAndDraw( idx ); - iPreferredUid = 0; - done = ETrue; - } - } - if ( !done ) - { // try to use iPreferredLine, as previous selection had been deleted - TInt count( iModel->Count() ); - if ( count <= iPreferredLine ) - { - // less elements, preferred line is out of the screen, - // select last one - if ( count ) - { - iList->SetCurrentItemIndexAndDraw( count - 1 ); - } - else - { - iList->SetCurrentItemIndexAndDraw( 0 ); - } - done = ETrue; - } - else - { // count > iPreferredLine, select preferred line - iList->SetCurrentItemIndexAndDraw( iPreferredLine ); - done = ETrue; - } - } - - APSETUILOGGER_LEAVEFN( EDialog,"SelDIalog::SetHighlighted") - } - - - - - - -// --------------------------------------------------------- -// CApSelectorDialog::DoProcessCommandL -// called when needs to change the highlighting -// --------------------------------------------------------- -// -void CApSelectorDialog::DoProcessCommandL( TInt aCommandId ) - { - APSETUILOGGER_ENTERFN( EDialog,"SelDIalog::DoProcessCommandL") - - switch ( aCommandId ) - { - case EApSelCmdSelect: - { - *iSelected = iList->CurrentItemUid(); - *iEventStore |= KApUiEventSelected; - iPreferredUid = iList->CurrentItemUid(); - SetHighlighted(); - // Can not exit here, as it would delete this, - // Exit will be handled at the end of this function! - // TryExitL( EAknSoftkeyBack ); - break; - } - case EApSelCmdOpen: - { - // when using __UHEAP_MARK;/MARKEND, TitlePane old text setback is - // reported as a mem. leak, but it is not as the lifetime of - // the text is longer than this part. - iPreferredUid = iList->CurrentItemUid(); - iHandler->DoRunViewerL( iPreferredUid ); - break; - } - case EApSelCmdNewBlank: - { // put the new's UID into iPreferredUid to set highlight onto it - // when using __UHEAP_MARK;/MARKEND, TitlePane old text setback is - // reported as a mem. leak, but it is not as the lifetime of - // the text is longer than this part. - iPreferredUid = - iHandler->HandleApBlankNewL( iBearerFilter, iIspFilter ); - SetHighlighted(); - break; - } - case EApSelCmdNewUseExisting: - { // put the new's UID into iPreferredUid to set highlight onto it - // when using __UHEAP_MARK;/MARKEND, TitlePane old text setback is - // reported as a mem. leak, but it is not as the lifetime of - // the text is longer than this part. - iPreferredUid = - iHandler->HandleDuplicateL( iList->CurrentItemUid() ); - SetHighlighted(); - break; - } - case EApSelCmdDelete: - { - // put the UID of the next Ap into iPreferredUid to set - // highlight onto it... - // if next does not exists, put it onto prev. - // if no next & no prev. exists, set it to 0 (don't care). - // As it might have been started by the Clear key, - // we must check if there is any... - if ( iModel->Count() ) - { - // As we must be standing on an item, it must exist... - // So no problem on iModel->At( ...) - if ( iList->CurrentItemIndex() < ( iModel->Count()-1 ) ) - { - // move to next one if possible - iPreferredUid = - iList->Uid4Item( iList->CurrentItemIndex()+1 ); - } - else - { - // if it is the last, move to previous if possible. - // if not, set to 0 - if ( iModel->Count()> 1 ) - { - // move to prev. one if possible - iPreferredUid = - iList->Uid4Item( iList->CurrentItemIndex()-1 ); - } - else - { - iPreferredUid = 0; - } - } - iHandler->HandleApDeleteCmdL( iList->CurrentItemUid(), - iModel->Count() == 1 ); - } - break; - } - case EAknCmdHelp: - { - if ( iHelpSupported ) - { - iDataModel->LaunchHelpL(); - } - break; - } - default: - { - // silently ignore it - break; - } - } - // check if user wants to exit... - if ( *iEventStore & KApUiEventExitRequested ) - { - if ( iInitialised ) - { - TryExitL( EAknSoftkeyBack ); - } - else - { - *iEventStore |= KApUiEventInternal; - User::Leave(KLeaveWithoutAlert); - } - } - else - { // handle possible exit reasons/request here. - switch ( aCommandId ) - { - case EApSelCmdSelect: - { - TryExitL( EAknSoftkeyBack ); - break; - } - case EApSelCmdExit: - { - iExitReason = EExit; - *iEventStore |= KApUiEventExitRequested; - TryExitL( EAknSoftkeyBack ); - break; - } - case EEikCmdExit: - { - iExitReason = EShutDown; - *iEventStore |= KApUiEventShutDownRequested; - TryExitL( EAknSoftkeyBack ); - break; - } - default: - { - break; - } - } - } - - APSETUILOGGER_LEAVEFN( EDialog,"SelDIalog::DoProcessCommandL") - } - - - -// End of File - diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/src/ApSelectorListBox.cpp --- a/apengine/apsettingshandlerui/src/ApSelectorListBox.cpp Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,297 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implementation of CApSelectorListbox. -* -*/ - - -// INCLUDE FILES - -#include -#include -//#include -#include -#include -#include -#include - -#include "ApSelectorListbox.h" -#include "ApSelectorListBoxModel.h" -#include "ApListItem.h" - -#include -#include -#include - -#include "ApSettingsHandlerLogger.h" - -// CONSTANTS -// Drive and file name of the MBM file containing icons for Protection -_LIT( KFileIcons, "z:ApSettings.mbm" ); - - -// ================= MEMBER FUNCTIONS ======================= - -// --------------------------------------------------------- -// CApSelectorListbox::NewL -// --------------------------------------------------------- -// -CApSelectorListbox* CApSelectorListbox::NewL -( const CCoeControl* aParent ) - { - APSETUILOGGER_ENTERFN( EListbox,"SelListbox::NewL") - - CApSelectorListbox* listbox = - new ( ELeave ) CApSelectorListbox(); - CleanupStack::PushL( listbox ); - listbox->ConstructL( aParent, EAknListBoxSelectionList ); - CleanupStack::Pop(); // listbox - - APSETUILOGGER_LEAVEFN( EListbox,"SelListbox::NewL") - return listbox; - } - - -// --------------------------------------------------------- -// CApSelectorListbox::CApSelectorListbox -// --------------------------------------------------------- -// -CApSelectorListbox::CApSelectorListbox() - { - } - - -// --------------------------------------------------------- -// CApSelectorListbox::~CApSelectorListbox -// --------------------------------------------------------- -// -CApSelectorListbox::~CApSelectorListbox() - { - - } - - -// --------------------------------------------------------- -// CApSelectorListbox::OfferKeyEventL -// --------------------------------------------------------- -// -TKeyResponse CApSelectorListbox::OfferKeyEventL -( const TKeyEvent& aKeyEvent, TEventCode aType ) - { - APSETUILOGGER_ENTERFN( EListbox,"SelListbox::OfferKeyEventL") - - TKeyResponse retval; - if ( aKeyEvent.iCode == EKeyOK && - !( aKeyEvent.iModifiers & EModifierShift ) - ) - { - // Enter pressed (not Shift-Enter). This will report an - // EEnterKeyPressed event sent to the observer (the view), which may - // delete this listbox. The code which processes keypresses by - // default, will continue (on the already deleted listbox), and - // will crash. So we grab this keypress here, and generate the - // same event, but after that, quit immediately! - ReportListBoxEventL( MEikListBoxObserver::EEventEnterKeyPressed ); - // By now the listbox may have been deleted! - // Do not access it after this point! - retval = EKeyWasConsumed; - } - else - { - retval = CAknSingleGraphicStyleListBox::OfferKeyEventL - ( aKeyEvent, aType ); - } - - APSETUILOGGER_LEAVEFN( EListbox,"SelListbox::OfferKeyEventL") - return retval; - } - - - -// --------------------------------------------------------- -// CApSelectorListbox::FocusChanged -// --------------------------------------------------------- -// -void CApSelectorListbox::FocusChanged( TDrawNow aDrawNow ) - { - APSETUILOGGER_ENTERFN( EListbox,"SelListbox::FocusChanged") - - // Do nothing until the listbox is fully constructed - // The dialogpage sets the focus before calling ConstructL - if ( iView ) - { - CAknSingleGraphicStyleListBox::FocusChanged( aDrawNow ); - } - - APSETUILOGGER_LEAVEFN( EListbox,"SelListbox::FocusChanged") - } - - - -// --------------------------------------------------------- -// CApSelectorListbox::LoadIconsL -// --------------------------------------------------------- -// -void CApSelectorListbox::LoadIconsL() - { - APSETUILOGGER_ENTERFN( EListbox,"SelListbox::LoadIconsL") - - CArrayPtr< CGulIcon >* icons = new( ELeave ) CAknIconArray( KGranularity ); - CleanupStack::PushL( icons ); - - MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance(); - - TParse mbmFile; - User::LeaveIfError( mbmFile.Set( KFileIcons, &KDC_APP_BITMAP_DIR, NULL ) ); - - icons->AppendL( AknsUtils::CreateGulIconL( - skinInstance, - KAknsIIDQgnPropWmlGprs, - mbmFile.FullName(), - EMbmApsettingsQgn_prop_wml_gprs, - EMbmApsettingsQgn_prop_wml_gprs_mask ) ); - - icons->AppendL( AknsUtils::CreateGulIconL( - skinInstance, - KAknsIIDQgnPropWmlCsd, - mbmFile.FullName(), - EMbmApsettingsQgn_prop_wml_csd, - EMbmApsettingsQgn_prop_wml_csd_mask ) ); - - icons->AppendL( AknsUtils::CreateGulIconL( - skinInstance, - KAknsIIDQgnPropWmlHscsd, - mbmFile.FullName(), - EMbmApsettingsQgn_prop_wml_hscsd, - EMbmApsettingsQgn_prop_wml_hscsd_mask ) ); - - icons->AppendL( AknsUtils::CreateGulIconL( - skinInstance, - KAknsIIDQgnPropWmlSms, - mbmFile.FullName(), - EMbmApsettingsQgn_prop_wml_sms, - EMbmApsettingsQgn_prop_wml_sms_mask ) ); - - icons->AppendL( AknsUtils::CreateGulIconL( - skinInstance, - KAknsIIDQgnPropWlanBearer, - mbmFile.FullName(), - EMbmApsettingsQgn_prop_wlan_bearer, - EMbmApsettingsQgn_prop_wlan_bearer_mask ) ); - - - icons->AppendL( AknsUtils::CreateGulIconL( - skinInstance, - KAknsIIDQgnPropWlanBearer, - mbmFile.FullName(), - EMbmApsettingsQgn_prop_wlan_easy, - EMbmApsettingsQgn_prop_wlan_easy_mask ) ); - - - FeatureManager::InitializeLibL(); - TBool protsupported = FeatureManager::FeatureSupported( - KFeatureIdSettingsProtection ); - FeatureManager::UnInitializeLib(); - if ( protsupported ) - { - icons->AppendL( AknsUtils::CreateGulIconL( - skinInstance, - KAknsIIDQgnIndiSettProtectedAdd, - mbmFile.FullName(), - EMbmApsettingsQgn_indi_sett_protected_add, - EMbmApsettingsQgn_indi_sett_protected_add_mask ) ); - } - - ItemDrawer()->ColumnData()->SetIconArray( icons ); - - CleanupStack::Pop(); // icons - - APSETUILOGGER_LEAVEFN( EListbox,"SelListbox::LoadIconsL") - } - - -// --------------------------------------------------------- -// CApSelectorListbox::Uid4Item -// --------------------------------------------------------- -// -TUint32 CApSelectorListbox::Uid4Item( TInt aItem ) const - { - APSETUILOGGER_ENTERFN( EListbox,"SelListbox::Uid4Item<->") - - CApSelectorListboxModel* lbmodel = - STATIC_CAST( CApSelectorListboxModel*, Model()->ItemTextArray() ); - return lbmodel->At( aItem )->Uid(); - } - - -// --------------------------------------------------------- -// CApSelectorListbox::CurrentItemUid -// --------------------------------------------------------- -// -TUint32 CApSelectorListbox::CurrentItemUid() const - { - APSETUILOGGER_ENTERFN( EListbox,"SelListbox::CurrentItemUid") - - CApSelectorListboxModel* lbmodel = - STATIC_CAST( CApSelectorListboxModel*, Model()->ItemTextArray() ); - TInt idx = CurrentItemIndex(); - TUint32 retval( 0 ); - if ( idx >= 0 ) - { - retval = lbmodel->At( idx )->Uid(); - } - - APSETUILOGGER_LEAVEFN( EListbox,"SelListbox::CurrentItemUid") - return retval; - } - - - -// --------------------------------------------------------- -// CApSelectorListbox::CurrentItemNameL -// --------------------------------------------------------- -// -const TDesC& CApSelectorListbox::CurrentItemNameL() - { - APSETUILOGGER_ENTERFN( EListbox,"SelListbox::CurrentItemNameL") - - CApSelectorListboxModel* lbmodel = new( ELeave )CApSelectorListboxModel; - lbmodel = - STATIC_CAST( CApSelectorListboxModel*, Model()->ItemTextArray() ); - - APSETUILOGGER_LEAVEFN( EListbox,"SelListbox::CurrentItemNameL") - return lbmodel->At( CurrentItemIndex() )->Name(); - } - - -// --------------------------------------------------------- -// CApSelectorListbox::HandleResourceChange -// --------------------------------------------------------- -// -void CApSelectorListbox::HandleResourceChange(TInt aType) - { - APSETUILOGGER_ENTERFN( EListbox,"SelListbox::HandleResourceChange") - - if ( aType == KAknsMessageSkinChange ) - { - TRAP_IGNORE( LoadIconsL() ); - SizeChanged(); - } - - CAknSingleGraphicStyleListBox::HandleResourceChange( aType ); - - APSETUILOGGER_LEAVEFN( EListbox,"SelListbox::HandleResourceChange") - } - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/src/ApSelectorListBoxModel.cpp --- a/apengine/apsettingshandlerui/src/ApSelectorListBoxModel.cpp Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,352 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implementation of CApSelectorListboxModel. -* -*/ - - -// INCLUDE FILES - -#include "ApSelectorListBoxModel.h" -#include "ApListItem.h" -#include - -#include - -#include "ApSettingsHandlerLogger.h" - -// CONSTANTS -const TInt KGPRS_ICON_ID = 0; -// No icon for CDMA (yet?) -> use GPRS icon. -const TInt KCDMA_ICON_ID = KGPRS_ICON_ID; -const TInt KCSD_ICON_ID = 1; -const TInt KHSCSD_ICON_ID = 2; -// const TInt KSMS_ICON_ID = 3; // DEPRECATED -const TInt KWLAN_ICON_ID = 4; -// fith icon element is the KEASY_WLAN_ICON_ID but it is not shown -// in our UI, but is used by other modules using our -// resources!!! const TInt KEASY_WLAN_ICON_ID = 5; - -const TInt KPROTECTED_ICON_ID = 6; -// get real icons !!! now using GPRS... -#ifdef __TEST_LAN_BEARER - const TInt KLAN_ICON_ID = KGPRS_ICON_ID; -#endif // __TEST_LAN_BEARER - - -// ================= MEMBER FUNCTIONS ======================= - -// --------------------------------------------------------- -// CApSelectorListboxModel::CApSelectorListboxModel -// --------------------------------------------------------- -// -CApSelectorListboxModel::CApSelectorListboxModel( TGraphicType aGraphicType ) -:CApListItemList(), -iOffset( 0 ), -iFeatureInitialised(EFalse), -iProtectionSupported(EFalse) - { - APSETUILOGGER_ENTERFN( EListbox,"SelListboxModel::CApSelectorListboxModel<->") - iGraphicType = aGraphicType; - } - -// --------------------------------------------------------- -// CApSelectorListboxModel::~CApSelectorListboxModel -// --------------------------------------------------------- -// -CApSelectorListboxModel::~CApSelectorListboxModel() - { - APSETUILOGGER_ENTERFN( EListbox,"SelListboxModel::~CApSelectorListboxModel<->") - ResetAndDestroy(); // deletes all elements... - } - -// --------------------------------------------------------- -// CApSelectorListboxModel::MdcaCount -// --------------------------------------------------------- -// -TInt CApSelectorListboxModel::MdcaCount() const - { - APSETUILOGGER_ENTERFN( EListbox,"SelListboxModel::MdcaCount<->") - - return Count(); - } - -// --------------------------------------------------------- -// CApSelectorListboxModel::MdcaPoint -// --------------------------------------------------------- -// -TPtrC CApSelectorListboxModel::MdcaPoint( TInt aIndex ) const - { - APSETUILOGGER_ENTERFN( EListbox,"SelListboxModel::MdcaPoint") - - // We need to cast away the const-ness from the buffer. - // It was definitely made for formatting! - FormatListboxText( aIndex, - ( MUTABLE_CAST( TBuf&, iBuf ) ) ); - - APSETUILOGGER_LEAVEFN( EListbox,"SelListboxModel::MdcaPoint") - return iBuf; - } - - -// --------------------------------------------------------- -// CApSelectorListboxModel::Item4Uid -// --------------------------------------------------------- -// -TInt CApSelectorListboxModel::Item4Uid( TUint32 aUid, TInt& aErr ) const - { - APSETUILOGGER_ENTERFN( EListbox,"SelListboxModel::Item4Uid") - - aErr = KErrNone; - TInt retval( KErrNotFound ); - for ( TInt i=0; iUid() == aUid ) - { - retval = i; - break; - } - } - if ( retval == KErrNotFound ) - { - aErr = KErrNotFound; - } - - APSETUILOGGER_LEAVEFN( EListbox,"SelListboxModel::Item4Uid") - return retval; - } - - - -// --------------------------------------------------------- -// CApSelectorListboxModel::SetOwnIconOffset -// --------------------------------------------------------- -// -void CApSelectorListboxModel::SetOwnIconOffset( TInt aOffset ) - { - APSETUILOGGER_ENTERFN( EListbox,"SelListboxModel::SetOwnIconOffset<->") - - iOffset = aOffset; - } - - -// --------------------------------------------------------- -// CApSelectorListboxModel::FormatListboxText -// --------------------------------------------------------- -// -void CApSelectorListboxModel::FormatListboxText( TInt aIndex, - TDes& aBuf ) const - { - APSETUILOGGER_ENTERFN( EListbox,"SelListboxModel::FormatListboxText") - - if ( !iFeatureInitialised ) - { - TRAPD(err, FeatureManager::InitializeLibL()); - if (err == KErrNone) - { - CApSelectorListboxModel* tmp = CONST_CAST(CApSelectorListboxModel*, this); - tmp->iProtectionSupported = FeatureManager::FeatureSupported( - KFeatureIdSettingsProtection ); - FeatureManager::UnInitializeLib(); - tmp->iFeatureInitialised = ETrue; - } - } - switch ( iGraphicType ) - { - case EGraphicBearer: - { - TInt iIconId; - switch ( At( aIndex )->BearerType() ) - { - case EApBearerTypeCDMA: - { - iIconId = KCDMA_ICON_ID; - break; - } - case EApBearerTypeGPRS: - { - iIconId = KGPRS_ICON_ID; - break; - } - case EApBearerTypeCSD: - { - iIconId = KCSD_ICON_ID; - break; - } - case EApBearerTypeHSCSD: - { - iIconId = KHSCSD_ICON_ID; - break; - } - case EApBearerTypeWLAN: - { - iIconId = KWLAN_ICON_ID; - break; - } -#ifdef __TEST_LAN_BEARER - case EApBearerTypeLAN: - { - iIconId = KLAN_ICON_ID; - break; - } -#endif // __TEST_LAN_BEARER - case EApBearerTypeLANModem: - { // LANMODEM get real icon ID - iIconId = KWLAN_ICON_ID; - break; - } - default: - { - // in release, shall not leave here, - // it is checked when filled... - __ASSERT_DEBUG( EFalse, Panic( EInvalidBearerType ) ); - iIconId = KGPRS_ICON_ID; - break; - } - } - if ( iProtectionSupported ) - { - if ( At( aIndex )->IsReadOnly() ) - { - TInt iProtectedIconId = KPROTECTED_ICON_ID; - aBuf.Format( - KListItemFormatGraphicProtected, - iOffset+iIconId, - Min( At( aIndex )->Name().Length(), - KMaxListItemNameLength ), - &At( aIndex )->Name(), - iOffset+iProtectedIconId - ); - } - else - { // protection supported, but not protected - aBuf.Format( - KListItemFormatGraphicBearer, - iOffset+iIconId, - Min( At( aIndex )->Name().Length(), - KMaxListItemNameLength ), - &At( aIndex )->Name() - ); - } - } - else - { // protection not supported - aBuf.Format( - KListItemFormatGraphicBearer, - iOffset+iIconId, - Min( At( aIndex )->Name().Length(), - KMaxListItemNameLength ), - &At( aIndex )->Name() - ); - } - break; - } - case EGraphicNone: - { - aBuf.Format( - KListItemFormatGraphicNone, - Min( At( aIndex )->Name().Length(), - KMaxListItemNameLength ), - &At( aIndex )->Name() - ); - break; - } - case EGraphicOnOff: - { - if ( iProtectionSupported ) - { - TInt ProtectedIconId( 0 ); - if ( At( aIndex )->IsReadOnly() ) - { - ProtectedIconId = KPROTECTED_ICON_ID; - aBuf.Format( - KListItemFormatGraphicOnOffWithLock, - 1, - Min( At( aIndex )->Name().Length(), - KMaxListItemNameLength ), - &At( aIndex )->Name(), - iOffset + ProtectedIconId - ); - } - else - { - aBuf.Format( - KListItemFormatGraphicOnOff, - 1, - Min( At( aIndex )->Name().Length(), - KMaxListItemNameLength ), - &At( aIndex )->Name() - ); // magic Number, does not works with anything else - } - } - else - { - aBuf.Format( - KListItemFormatGraphicOnOff, - 1, - Min( At( aIndex )->Name().Length(), - KMaxListItemNameLength ), - &At( aIndex )->Name() - ); - } - break; - } - case EGraphicProtection: - { - if ( iProtectionSupported ) - { - TInt ProtectedIconId( 0 ); - if ( At( aIndex )->IsReadOnly() ) - { - ProtectedIconId = 0; - aBuf.Format( - KListItemFormatGraphicWithLock, - Min( At( aIndex )->Name().Length(), - KMaxListItemNameLength ), - &At( aIndex )->Name(), - iOffset + ProtectedIconId - ); - } - else - { - aBuf.Format( - KListItemFormatGraphicNone, - Min( At( aIndex )->Name().Length(), - KMaxListItemNameLength ), - &At( aIndex )->Name() - ); - } - } - else - { - aBuf.Format( - KListItemFormatGraphicNone, - Min( At( aIndex )->Name().Length(), - KMaxListItemNameLength ), - &At( aIndex )->Name() - ); - } - break; - } - default: - { - __ASSERT_DEBUG( EFalse, Panic( EInvalidBitmapType ) ); - break; - } - } - - APSETUILOGGER_LEAVEFN( EListbox,"SelListboxModel::FormatListboxText") - } - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/src/ApSettingsCommons.cpp --- a/apengine/apsettingshandlerui/src/ApSettingsCommons.cpp Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,151 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Defines common methods. -* -*/ - - - -// INCLUDE FILES -#include -#include -#include -#include -#include "ApSettingsHandlerUI.hrh" -#include -#include -#include -#include - -#include -#include - -#include "ApSettingsHandlerLogger.h" - -void Panic( TApSettingsHandlerUiPanicCodes aPanic ) - { - APSETUILOGGER_ENTERFN( EOther,"Commons::Panic") - - _LIT( kApSet, "APSettingsHandlerUi" ) ; - User::Panic( kApSet, aPanic ) ; - } - - -// --------------------------------------------------------- -// AskQueryL -// --------------------------------------------------------- -// -TInt AskQueryL( TInt aResId, TDesC* aVar ) - { - APSETUILOGGER_ENTERFN( EOther,"Commons::AskQueryL") - - HBufC* temp; - if ( aVar ) - { - temp = StringLoader::LoadL( aResId, *aVar ); - CleanupStack::PushL( temp ); - } - else - { - temp = CEikonEnv::Static()->AllocReadResourceLC( aResId ); - } - CAknQueryDialog* qd = - CAknQueryDialog::NewL( CAknQueryDialog::EConfirmationTone ); - TInt retval = qd->ExecuteLD( R_CONFIRMATION_QUERY, *temp ); - CleanupStack::PopAndDestroy(); // temp - - APSETUILOGGER_LEAVEFN( EOther,"Commons::AskQueryL") - return retval; - } - - - -// --------------------------------------------------------- -// ShowNoteL -// --------------------------------------------------------- -// -TInt ShowNoteL( TInt aResId, TDesC* aVar ) - { - APSETUILOGGER_ENTERFN( EOther,"Commons::ShowNoteL") - - HBufC* temp; - if ( aVar ) - { - temp = StringLoader::LoadL( aResId, *aVar ); - CleanupStack::PushL( temp ); - } - else - { - temp = CEikonEnv::Static()->AllocReadResourceLC( aResId ); - } - CAknNoteDialog* dlg = - new ( ELeave ) CAknNoteDialog - ( - REINTERPRET_CAST( CEikDialog**, &dlg ), - CAknNoteDialog::ENoTone, - CAknNoteDialog::EShortTimeout - ); - dlg->PrepareLC( R_GENERAL_NOTE ); - dlg->SetTextL( *temp ); - TInt retval = dlg->RunLD(); - CleanupStack::PopAndDestroy(); // temp - - APSETUILOGGER_LEAVEFN( EOther,"Commons::ShowNoteL") - return retval; - } - - -#ifdef __TEST_OOMDEBUG - TInt GetTestStateL() - { - APSETUILOGGER_ENTERFN( EOther,"Commons::GetTestStateL") - - TInt retval( 0 ); - RFs fs; - User::LeaveIfError( fs.Connect() ); - CleanupClosePushL( fs ); - TUint att; - if ( fs.Att( KTestFileName, att ) == KErrNone ) - { - RFile file; - TInt err = file.Open( fs, KTestFileName, - EFileShareAny | EFileStreamText | - EFileRead - ); - if ( err == KErrNone ) - { - TBuf8<256> buf; - err = file.Read( buf ); - if ( err == KErrNone ) - { - TInt val; - TLex8 lex( buf ); - err = lex.Val( val ); - if ( err == KErrNone ) - { - retval = val; - } - } - } - file.Close(); - } - CleanupStack::PopAndDestroy(); // fs, will also close it - - APSETUILOGGER_LEAVEFN( EOther,"Commons::GetTestStateL") - return retval; - } -#endif // __TEST_OOMDEBUG - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/src/ApSettingsDlg.cpp --- a/apengine/apsettingshandlerui/src/ApSettingsDlg.cpp Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6346 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Defines dialog for access point view/edit. -* -*/ - - -// INCLUDE FILES -#include "APSettingsHandlerUIVariant.hrh" - - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS -#include -#endif - - -#include "ApSettingsLookups.h" -#include "ApSettingsDlg.h" -#include "ApSettingsModel.h" -#include - -#include "ApSettingsHandlerUI.hrh" -#include "ApsettingshandleruiImpl.h" -#include "ApSettingsHandlerConsts.h" -#include - -#include "ApSettingsHandlerLogger.h" - -#include - -#include "ApNetSelPopupList.h" - -#include "AccessPointTextSettingPage.h" - - -#include - -#include "FeatureManagerWrapper.h" -#include "ApMultiLineDataQueryDialog.h" - -#include -#include -#include - -// CONSTANTS -// General Settings UID, Hardcoded -// const TUid KGeneralSettingsUid={0X100058EC}; -// const TInt KOptionalDefaultValue = 1; - - - -const TInt KIspCallAnalogue = 0; -const TInt KIspCallIsdn110 = 1; -const TInt KIspCallIsdn120 = 2; - -const TInt KBearerListGprs = 0; -const TInt KBearerListWLAN = 1; -const TInt KBearerListCSD = 2; -const TInt KBearerListHSCSD = 3; - - - -// They provide the indexes. -const TInt KBearerArrayCSD = 0; -const TInt KBearerArrayGPRS = 1; -const TInt KBearerArrayHSCSD = 2; -const TInt KBearerArrayWLAN = 3; - -const TInt KBoolMaxNumber = 1; - -_LIT( KEmptyText, "" ); -_LIT( KTxtListItemFormat, " \t%S\t\t%S" ); -_LIT( KTxtMenuListItemFormat, " \t%S\t\t" ); -_LIT( KTxtCompulsory, "\t*" ); - -_LIT( KTxtNumber, "%d" ); - - -_LIT( KKnownNameServer1, "fec0:000:0000:ffff::1" ); -_LIT( KKnownNameServer2, "fec0:000:0000:ffff::2" ); - - -const TInt KStaredPasswordLength = 4; - -const TUint32 KDefAdhocChannel = 7; - - -const TInt KItemIndex0 = 0; -const TInt KItemIndex1 = 1; -const TInt KItemIndex2 = 2; -const TInt KItemIndex3 = 3; - -// ================= MEMBER FUNCTIONS ======================= -// --------------------------------------------------------- -// CApSettingsDlg::ConstructAndRunLD -// Constructs the dialog and runs it. -// --------------------------------------------------------- -// -TInt CApSettingsDlg::ConstructAndRunLD( CApSettingsModel& aModel, - CApSettingsHandlerImpl& aHandler, - TUint32& aUid, - CApAccessPointItem* aItem ) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::ConstructAndRunLD") - - CleanupStack::PushL( this ); - - iFeatureManagerWrapper = CFeatureManagerWrapper::NewL(); - - iHelpSupported = FeatureManager::FeatureSupported( KFeatureIdHelp ); - -#ifdef __TEST_OOMDEBUG - RFs fs; - User::LeaveIfError( fs.Connect() ); - CleanupClosePushL( fs ); - TUint att; - if ( fs.Att( KTestFileName, att ) == KErrNone ) - { - iMemTestOn = ETrue; - } - else - { - iMemTestOn = EFalse; - } - CleanupStack::PopAndDestroy(); // fs, will also close it -#endif // __TEST_OOMDEBUG - - - iUid = &aUid; - - iDataModel = &aModel; - iHandler = &aHandler; - iVariant = iHandler->iExt->iVariant; - - - CApAccessPointItem* ap = CApAccessPointItem::NewLC(); - - iBearerItemArray = - new( ELeave )CArrayPtrFlat( KBearers ); - iBearerItemArray->ResetAndDestroy(); - for ( TInt i=0; iAppendL( NULL ); - } - TApBearerType ab = ap->BearerTypeL(); - iBearerItemArray->At( BearerToArrayIndexL( ab ) ) = ap; - // Now iApItem is part of array-> destructed member var, pop it. - CleanupStack::Pop( ap ); - - iApItem = ap; - - if ( !aItem ) - { - iDataModel->AccessPointDataL( *iUid, *iApItem ); - } - else - { - iApItem->CopyFromL( *aItem ); - } - iDataModel->ClearWEPAndWPASettings(); - - iOldApItem = CApAccessPointItem::NewLC(); - CleanupStack::Pop(); // member var - - iOldApItem->CopyFromL( *iApItem ); - - iOriginalBearerType = iApItem->BearerTypeL(); - - ConstructL( R_APSETTINGS_MENUBAR ); - - SetBearerTypeL( iApItem->BearerTypeL() ); - // ExecuteLD will PushL( this ), so we have to Pop it... - CleanupStack::Pop(); // this - - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::ConstructAndRunLD") - return ExecuteLD( R_APSETTINGS_DIALOG ); - } - - - -// Destructor -CApSettingsDlg::~CApSettingsDlg() - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::~CApSettingsDlg") - - delete iFeatureManagerWrapper; - - if ( iDataModel ) - {// Remove ourselves from observers... - iDataModel->Database()->RemoveObserver( this ); - } - - if ( iOldApItem ) - { - delete iOldApItem; - } - - if ( iNaviDecorator ) - { - delete iNaviDecorator; - } - - if ( iTitlePane ) - { - // set old text back, if we have it... - if ( iOldTitleText ) - { - if ( iExitReason != EShutDown ) - { - TRAP_IGNORE( iTitlePane->SetTextL( *iOldTitleText ) ); - } - delete iOldTitleText; - } - } - - if ( iBearerItemArray ) - { - iBearerItemArray->ResetAndDestroy(); - delete iBearerItemArray; - } - - if (iBackupApItem) - { - delete iBackupApItem; - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::~CApSettingsDlg") - } - - - -// --------------------------------------------------------- -// CApSettingsDlg::OfferKeyEventL( const TKeyEvent& aKeyEvent, -// TEventCode aType ) -// Handles key events -// --------------------------------------------------------- -// -TKeyResponse CApSettingsDlg::OfferKeyEventL( const TKeyEvent& aKeyEvent, - TEventCode aType ) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::OfferKeyEventL") - - TKeyResponse retval( EKeyWasNotConsumed ); - // Only interested in standard key events - if ( aType == EEventKey ) - { - // If a menu is showing offer key events to it. - if ( CAknDialog::MenuShowing() ) - { - retval = CAknDialog::OfferKeyEventL( aKeyEvent, aType ); - } - else - { - if ( iList ) - { - // as list IS consuming, must handle because it - // IS the SHUTDOWN... - // or, a view switch is shutting us down... - if ( aKeyEvent.iCode == EKeyEscape ) - { - ProcessCommandL( EEikCmdExit ); - retval = EKeyWasConsumed; - } - else - { - retval = iList->OfferKeyEventL( aKeyEvent, aType ); - if ( iSecSettingsExitReason ) - { - if ( iSecSettingsExitReason - & KApUiEventShutDownRequested ) - { - ProcessCommandL( EAknCmdExit ); - } - else - { - if ( iSecSettingsExitReason - & KApUiEventExitRequested ) - { - ProcessCommandL( EApSelCmdExit ); - } - } - } - } - } - else - { - if ( aKeyEvent.iCode == EKeyOK ) - { - ProcessCommandL( EApSelCmdChange ); - retval = EKeyWasConsumed; - } - } - } - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::OfferKeyEventL") - return retval; - } - - - -// --------------------------------------------------------- -// CApSettingsDlg::NewL -// Two-phase dconstructor, second phase is ConstructAndRunLD -// --------------------------------------------------------- -// -CApSettingsDlg* CApSettingsDlg::NewL( TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TUint32& aEventStore, - TInt aReqIpvType - ) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::NewL") - - CApSettingsDlg* db = - new ( ELeave )CApSettingsDlg( aIspFilter, - aBearerFilter, - aSortType, - aEventStore, - aReqIpvType - ); - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::NewL") - return db; - - } - - - - -// Constructor -CApSettingsDlg::CApSettingsDlg( TInt aIspFilter, TInt aBearerFilter, - TInt aSortType, TUint32& aEventStore, - TInt aReqIpvType ) -: -iLevel( 0 ), -iOldIndex( 0 ), -iOldTopIndex( 0 ), -iAdvIndex( 0 ), -iBearerType( EApBearerTypeAll ), -iIspFilter( aIspFilter ), -iBearerFilter( aBearerFilter ), -iSortType( aSortType ), -iEventStore( &aEventStore ), -iFieldCount( 0 ), -iAdvancedFieldCount( 0 ), -iExitReason( EExitNone ), -iReqIpvType( aReqIpvType ), -iL2Ipv4( ETrue ), -iSecSettingsExitReason(0) - { - iBackupApItem = NULL; - } - - -// --------------------------------------------------------- -// CApSettingsDlg::OkToExitL( TInt aButtonId) -// called by framework when the OK button is pressed -// --------------------------------------------------------- -// -TBool CApSettingsDlg::OkToExitL( TInt aButtonId ) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::OkToExitL") - - // Translate the button presses into commands for the appui & current - // view to handle - TBool retval( EFalse ); - if ( aButtonId == EAknSoftkeyOptions ) - { - DisplayMenuL() ; - } - else - { - if ( (aButtonId == EApSelCmdChange) - || (aButtonId == EApSelCmdQuickChange)) - { - ProcessCommandL(aButtonId); - if ( iSecSettingsExitReason ) - { - if ( iSecSettingsExitReason - & KApUiEventShutDownRequested ) - { - ProcessCommandL( EAknCmdExit ); -// retval = ETrue; // exit the dialog - } - else - { - if ( iSecSettingsExitReason - & KApUiEventExitRequested ) - { - ProcessCommandL( EApSelCmdExit ); -// retval = ETrue; // exit the dialog - } - } - } - } - else - { - if ( aButtonId == EAknSoftkeyBack ) - { - if ( iLevel ) - { - TSaveAction cansave( EApNoAction ); - if ( iLevel == 2 ) - {// coming back from Ipv4 settings - // check if Wlan and has compulsory fields - if (iBearerType == EApBearerTypeWLAN) - { // WLAN - TApMember member; - cansave = CanSaveWlanCompulsoriesL( member ); - switch (cansave) - { - case EApCanSave: - { - // nothing to do in this case, simply go on. - iLevel --; - break; - } - case EApMustDelete: - { - // user said quit without save, - // restore from iBackupApItem - RestoreIpv4SettingsL(); - iLevel --; - break; - } - case EApShallGoBack: - { - // user wants to re-edit, do not come back... - // no change in iLevel - - // Set correct item to edit - switch ( member ) - { - case EApWlanIpNetMask: - case EApIspIPNetMask: - { - if ( IsWlanSupported() ) - { - SelectItem( KListIndexWLANSubnetMask ); - retval = EFalse; - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - case EApIspIPGateway: - case EApWlanIpGateway: - { - if ( IsWlanSupported() ) - { - SelectItem( KListIndexWLANDefaultGateway ); - retval = EFalse; - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - default: - {// otherwise, nothing to do... - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - break; - } - } - break; - } - case EApNoAction: - default: - { - // this is not a valid case as it always one from - // the above 3, - // nothing to do, - iLevel --; - break; - } - } - } - else - { - iLevel--; - } - } - else - { - iLevel--; - } - HandleListboxDataChangeL( EFalse ); - if ( iOldIndex >=0 ) - { - if ( cansave != EApShallGoBack ) - { - iList->SetTopItemIndex( iOldTopIndex ); - iList->SetCurrentItemIndexAndDraw( iOldIndex ); - } - if ( *iEventStore & KApUiEventExitRequested ) - { - ProcessCommandL( EApSelCmdExit ); - } - } - } - else - { - if ( iExitReason == EShutDown ) - { - retval = ETrue; - } - else - { - if ( !(*iEventStore & KApUiEventShutDownRequested ) ) - { - retval = SaveDataL( ); - } - else - { - retval = ETrue; - } - } - } - } - } - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::OkToExitL") - return retval; - } - - - - -// --------------------------------------------------------- -// CApSettingsDlg::InitTextsL -// called before the dialog is shown -// to initialize localized textual data -// --------------------------------------------------------- -// -void CApSettingsDlg::InitTextsL() - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::InitTextsL") - - // set pane texts - // first get StatusPane - iStatusPane = iEikonEnv->AppUiFactory()->StatusPane(); - // then get TitlePane - iTitlePane = ( CAknTitlePane* ) iStatusPane->ControlL( - TUid::Uid( EEikStatusPaneUidTitle ) ); - // if not already stored, store it for restoring - if ( !iOldTitleText ) - { - iOldTitleText = iTitlePane->Text()->AllocL(); - } - // set new titlepane text - iTitlePane->SetTextL( iApItem->ConnectionName() ); - // if not already done, clear NaviPane with adding en empty one - if ( !iNaviDecorator ) - { - iNaviPane = ( CAknNavigationControlContainer* ) - iStatusPane->ControlL( - TUid::Uid( EEikStatusPaneUidNavi ) ); - iNaviDecorator = iNaviPane->CreateNavigationLabelL( KEmpty ); - iNaviPane->PushL( *iNaviDecorator ); - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::InitTextsL") - } - - - - -// --------------------------------------------------------- -// CApSettingsDlg::DynInitMenuPaneL -// --------------------------------------------------------- -// -void CApSettingsDlg::DynInitMenuPaneL -( TInt aResourceId, CEikMenuPane* aMenuPane ) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::DynInitMenuPaneL") - - CAknDialog::DynInitMenuPaneL( aResourceId, aMenuPane ); - if ( aResourceId == R_APSETTINGS_MENU ) - { - if ( iLevel ) - { - // Disallow Advanced settings item if already in advanced - // or in SMS. - aMenuPane->DeleteMenuItem( EApSelCmdAdvanced ); - } - if ( !iHelpSupported ) - { - aMenuPane->DeleteMenuItem( EAknCmdHelp ); - } - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::DynInitMenuPaneL") - } - - - -// --------------------------------------------------------- -// CApSettingsDlg::HandleListboxDataChangeL -// called before the dialog is shown to initialize listbox data -// --------------------------------------------------------- -// -void CApSettingsDlg::HandleListboxDataChangeL( TBool aReRead ) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::HandleListboxDataChangeL") - - if ( aReRead && ( *iUid != KApNoneUID ) ) - { // reload the whole ApItem ! - // if it does not yet exists, no need to do so... - iDataModel->AccessPointDataL( *iUid, *iApItem ); - iDataModel->ClearWEPAndWPASettings(); - } - - iBearerType = iApItem->BearerTypeL(); - - // fill up our new list with data - CDesCArrayFlat* ItemArray = new ( ELeave ) CDesCArrayFlat( 4 ); - CleanupStack::PushL( ItemArray ); - switch ( iLevel ) - { - case 0: - { - FillListWithDataL( *ItemArray, *iField, iFieldCount, - iTitles, iCompulsory ); - break; - } - case 1: - { - FillListWithDataL( *ItemArray, *iFieldAdvanced, - iAdvancedFieldCount, iTitlesAdvanced, - iCompulsoryAdvanced ); - break; - } - case 2: - { - FillListWithDataL( *ItemArray, *iFieldL2, iFieldCountL2, - iTitlesL2, iCompulsoryL2 ); - break; - } - default: - { - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - break; - } - } - - - // if not already stored, store it for restoring - if ( !iOldTitleText ) - { - iOldTitleText = iTitlePane->Text()->AllocL(); - } - // set new title text - if ( iLevel == 2 ) - { - HBufC* value; - if ( iL2Ipv4 ) - { - value = iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_IPV4_SETTINGS ); - } - else - { - value = iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_IPV6_SETTINGS ); - } - iTitlePane->SetTextL( *value ); - CleanupStack::PopAndDestroy( value ); - } - else - { - iTitlePane->SetTextL( iApItem->ConnectionName() ); - } - - iList->Model()->SetItemTextArray( ItemArray ); - // now it is owned by the LB, so pop it - CleanupStack::Pop(); // do not destroy ! - iItemArray = ItemArray; - - iList->HandleItemAdditionL(); - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::HandleListboxDataChangeL") - } - - - -// --------------------------------------------------------- -// CApSettingsDlg::SetTextOverrides -// --------------------------------------------------------- -// -void CApSettingsDlg::SetTextOverrides( CTextOverrides* aOverrides ) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::SetTextOverrides<->") - - __ASSERT_DEBUG( aOverrides, Panic( ENullPointer ) ); - iTextOverrides = aOverrides; - } - - - -// --------------------------------------------------------- -// CApSettingsDlg::HandleApDbEventL -// called by the active access point framework -// --------------------------------------------------------- -// -void CApSettingsDlg::HandleApDbEventL( TEvent anEvent ) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::HandleApDbEventL") - - switch ( anEvent ) - { - case EDbChanged: - { - HandleListboxDataChangeL( ETrue ); - break; - } - case EDbClosing: - { - break; - } - case EDbAvailable: - { - break; - } - default: - { - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - break; - } - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::HandleApDbEventL") - } - - - -// --------------------------------------------------------- -// CApSettingsDlg::GetHelpContext() -// --------------------------------------------------------- -// -void CApSettingsDlg::GetHelpContext(TCoeHelpContext& aContext) const - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::GetHelpContext") - - aContext.iMajor = iHandler->iHelpMajor; - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::GetHelpContext") - } - - -// --------------------------------------------------------- -// CApSettingsDlg::PreLayoutDynInitL(); -// called by framework before dialog is shown -// --------------------------------------------------------- -// -void CApSettingsDlg::PreLayoutDynInitL() - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::PreLayoutDynInitL") - - InitTextsL(); - - iList = STATIC_CAST( CAknSettingStyleListBox*, - Control( KApSettingsListboxId ) ); - - iList->CreateScrollBarFrameL( ETrue ); - iList->ScrollBarFrame()->SetScrollBarVisibilityL - ( CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto ); - HandleListboxDataChangeL( EFalse ); - iList->SetCurrentItemIndex( 0 ); - iList->SetListBoxObserver( this ); - - iDataModel->Database()->AddObserverL( this ); - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::PreLayoutDynInitL") - } - - - - -// From MEikCommandObserver -void CApSettingsDlg::ProcessCommandL( TInt aCommandId ) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::ProcessCommandL") - - if ( MenuShowing() ) - { - HideMenu(); - } - - switch ( aCommandId ) - { - case EApSelCmdQuickChange: - { - ChangeSettingsL( ETrue ); - break; - } - case EApSelCmdChange: - { - ChangeSettingsL( EFalse ); - break; - } - case EApSelCmdAdvanced: - { - if ( iLevel == 0 ) - { - iLevel ++; - iOldIndex = iList->CurrentItemIndex(); - iOldTopIndex = iList->TopItemIndex(); - iList->SetCurrentItemIndex( 0 ); - TRAPD( err, HandleListboxDataChangeL( EFalse ) ); - if ( err ) - { - iLevel--; - User::Leave( err ); - } - } - break; - } - case EAknCmdHelp: - { - if ( iHelpSupported ) - { - iDataModel->LaunchHelpL(); - } - break; - } -// case EAknSoftkeyBack: - case EApSelCmdExit: - { - iExitReason = EExit; - *iEventStore |= KApUiEventExitRequested; - TryExitL( EAknSoftkeyBack ); - break; - } - case EAknCmdExit: - case EEikCmdExit: - { - *iEventStore |= KApUiEventShutDownRequested; - iExitReason = EShutDown; - TryExitL( EAknSoftkeyBack ); - break; - } - default: - { - // silently ignore it - break; - } - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::ProcessCommandL") - } - - -// From MEikListBoxObserver -void CApSettingsDlg::HandleListBoxEventL( CEikListBox* /*aListBox*/, - TListBoxEvent aEventType ) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::HandleListBoxEventL") - - switch ( aEventType ) - { - case EEventEnterKeyPressed: - // both handled in the same way for now... - case EEventItemDoubleClicked: - case EEventItemSingleClicked: - { - ChangeSettingsL( ETrue ); - break; - } - case EEventItemClicked: - { - break; - } - case EEventEditingStarted: - { - break; - } - case EEventEditingStopped: - { - break; - } - default: - { -// __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - }; - }; - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::HandleListBoxEventL") - } - - - - -//---------------------------------------------------------- -// CApSettingsDlg::FillListWithDataL -//---------------------------------------------------------- -// -void CApSettingsDlg::FillListWithDataL( CDesCArrayFlat& aItemArray, - const TApMember& arr, TInt aLength, - const TInt* aRes, - const TInt* aCompulsory ) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::FillListWithDataL") - - TInt i; - TApMember* sgd = MUTABLE_CAST( TApMember*, &arr ); - for( i=0; iBearerTypeL() == EApBearerTypeGPRS ) - { - TUint32 tint; - iApItem->ReadUint( EApGprsPdpType, tint ); - if ( tint != EIPv6 ) - { - AddTextualListBoxItemL( aItemArray, *sgd, - *aRes, *aCompulsory ); - } - } - else - { // CSD - if ( iL2Ipv4 ) - { - AddTextualListBoxItemL( aItemArray, *sgd, - *aRes, *aCompulsory ); - } - } - break; - } - case EApWapCurrentBearer: - case EApWapSecurity: - case EApWapWspOption: - case EApIspPromptForLogin: - case EApGprsDisablePlainTextAuth: - case EApIspDisablePlainTextAuth: - case EApIspBearerCallTypeIsdn: - case EApIspIfCallbackEnabled: - case EApIspIfCallbackType: - case EApIspEnableSWCompression: - case EApGprsHeaderCompression: - case EApIspUseLoginScript: - case EApIspBearerSpeed: - case EApGprsPdpType: - case EApIP6DNSAddrFromServer: - case EApWlanNetworkMode: - case EApWlanSecurityMode: - case EApWlanScanSSID: - { - AddOnOffListBoxItemL( aItemArray, *sgd, *aRes, *aCompulsory ); - break; - } - case EApWlanChannelId: - { - if ( IsAdhocChannelVisible() ) - { - AddOnOffListBoxItemL( aItemArray, *sgd, *aRes, - *aCompulsory ); - } - break; - } - case EApIpv4Settings: - case EApIpv6Settings: - { - AddMenuListBoxItemL( aItemArray, *sgd, *aRes, *aCompulsory ); - break; - } - case EApWlanSecuritySettings: - { - AddMenuListBoxItemL( aItemArray, *sgd, *aRes, *aCompulsory ); - break; - } - default: - { - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - break; - } - } - sgd++; - aRes++; - aCompulsory++; - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::FillListWithDataL") - } - - -//---------------------------------------------------------- -// CApSettingsDlg::AddTextualListBoxItemL -//---------------------------------------------------------- -// -void CApSettingsDlg::AddTextualListBoxItemL( CDesCArrayFlat& aItemArray, - TApMember aMember, TInt aRes, - TInt aCompulsory ) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::AddTextualListBoxItemL") - - HBufC* sgd = CreateTextualListBoxItemL( aMember, aRes, aCompulsory ); - CleanupStack::PushL( sgd ); - aItemArray.AppendL( sgd->Des() ); - CleanupStack::PopAndDestroy( sgd ); - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::AddTextualListBoxItemL") - } - - -//---------------------------------------------------------- -// CApSettingsDlg::AddOnOffListBoxItem -//---------------------------------------------------------- -// -void CApSettingsDlg::AddOnOffListBoxItemL( CDesCArrayFlat& aItemArray, - TApMember aMember, TInt aRes, - TInt aCompulsory ) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::AddOnOffListBoxItemL") - - // Read up title text from resource - HBufC* sgd = CreateOnOffListBoxItemL( aMember, aRes, aCompulsory ); - CleanupStack::PushL( sgd ); - aItemArray.AppendL( sgd->Des() ); - CleanupStack::PopAndDestroy( sgd ); - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::AddOnOffListBoxItemL") - } - - -//---------------------------------------------------------- -// CApSettingsDlg::UpdateOnOffListBoxItemL -//---------------------------------------------------------- -// -void CApSettingsDlg::UpdateOnOffListBoxItemL( TApMember aMember, TInt aRes, - TInt aPos, TInt aCompulsory ) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::UpdateOnOffListBoxItemL") - - // Read up title text from resource - HBufC* sgd = CreateOnOffListBoxItemL( aMember, aRes, aCompulsory ); - CleanupStack::PushL( sgd ); - // first try to add, if Leaves, list will be untouched - iItemArray->InsertL( aPos, sgd->Des() ); - // if successful, previous item is scrolled up with one, - // so delete that one... - if ( ++aPos < iItemArray->MdcaCount() ) - { - iItemArray->Delete( aPos ); - } - CleanupStack::PopAndDestroy( sgd ); - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::UpdateOnOffListBoxItemL") - } - - -//---------------------------------------------------------- -// CApSettingsDlg::TextualListBoxItemL -//---------------------------------------------------------- -// -void CApSettingsDlg::UpdateTextualListBoxItemL( TApMember aMember, TInt aRes, - TInt aPos, TInt aCompulsory ) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::UpdateTextualListBoxItemL") - - HBufC* sgd = CreateTextualListBoxItemL( aMember, aRes, aCompulsory ); - CleanupStack::PushL( sgd ); - // first try to add, if Leaves, list will be untouched - iItemArray->InsertL( aPos, sgd->Des() ); - // if successful, previous item is scrolled up with one, - // so delete that one... - if ( ++aPos < iItemArray->MdcaCount() ) - { - iItemArray->Delete( aPos ); - } - CleanupStack::PopAndDestroy( sgd ); - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::UpdateTextualListBoxItemL") - } - - -//---------------------------------------------------------- -// CApSettingsDlg::CreateTextualListBoxItem -//---------------------------------------------------------- -// -HBufC* CApSettingsDlg::CreateTextualListBoxItemL( TApMember aMember, - TInt aRes, - TInt aCompulsory ) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::CreateTextualListBoxItemL") - - // both variables needed independently of the following - // conditions so I must declare them here... - HBufC16* value; - TBool Pushed( EFalse ); - if ( ( aMember == EApIspLoginScript ) || ( aMember == EApWapStartPage ) - || ( aMember == EApGprsAccessPointName ) - || ( aMember == EApProxyServerAddress ) ) - { - // allocates as much as needed... - value = iApItem->ReadConstLongTextL( aMember )->AllocLC(); - } - else - { - value = HBufC::NewLC( KModifiableTextLength ); - // handle different 'types' (8 bit or 16 bit) descriptors - // and bring them to common base (16 bit...) - if ( ( aMember == EApIspIfCallbackInfo ) - || ( aMember == EApIspInitString ) ) - { - HBufC8* tmpValue8 = HBufC8::NewLC( KModifiableTextLength ); - TPtr8 ptr( tmpValue8->Des() ); - iApItem->ReadTextL( aMember, ptr ); - value->Des().Copy( *tmpValue8 ); - CleanupStack::PopAndDestroy(); // tmpValue8 - } - else - { - if ( aMember == EApProxyPortNumber ) - { - TUint32 tempint; - iApItem->ReadUint( aMember, tempint ); - TPtr ptr( value->Des() ); - ptr.Format( KTxtNumber, tempint ); - } - else - { - TPtr16 ptr( value->Des() ); - if ( ( aMember == EApIspIfAuthPass ) - || ( aMember == EApIspLoginPass ) ) - { - ptr.SetLength( KStaredPasswordLength ); - ptr.Fill( '*' ); - } - else - { - iApItem->ReadTextL( aMember, ptr ); - } - } - } - switch ( aMember ) - { - case EApIspIPAddr: - { - if ( ( value->Compare( KDynIpAddress ) == 0 ) - || ( value->Compare( KEmptyText ) == 0 ) ) - { - value = iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_IP_ADDR_DYNAMIC ); - Pushed = ETrue; - } - break; - } - case EApIspIPNetMask: - case EApIspIPGateway: - case EApWlanIpNetMask: - case EApWlanIpGateway: - { - if ( ( value->Compare( KDynIpAddress ) == 0 ) - || ( value->Compare( KEmptyText ) == 0 ) ) - { - value = iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_COMPULSORY ); - Pushed = ETrue; - } - break; - } - case EApGprsIPNameServer1: - case EApIspIPNameServer1: - case EApGprsIPNameServer2: - case EApIspIPNameServer2: - { - if ( ( value->Compare( KDynIpAddress ) == 0 ) - || ( value->Compare( KEmptyText ) == 0 ) ) - { - value = iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_NEW_AP_DNS_SERVER_AUTOMATIC ); - Pushed = ETrue; - } - break; - } - case EApIspDefaultTelNumber: - case EApWlanNetworkName: - { - if ( value->Compare( KEmptyText ) == 0 ) - { - value = iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_AVKON_COMPULSORY ); - Pushed = ETrue; - } - break; - } - default: - { - break; - } - } - } - // Define a heap descriptor to hold all the item text - // HBufC is non-modifiable - HBufC* title = iEikonEnv->AllocReadResourceLC( aRes ); - - HBufC* value1 = ReplaceWhiteSpaceCharactersLC( *value ); - - if ( value1->CompareC( KEmpty ) == 0 ) - { // empty, get 'None' as value - HBufC* temp = NULL; - switch ( aMember ) - { - case EApWapStartPage: - { // get special None for homepage - temp = iEikonEnv->AllocReadResourceLC( - R_APUI_SETT_HOME_PAGE_NONE ); - break; - } - case EApIspIfAuthName: - { // user name none - temp = iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_NEW_AP_USER_NAME_NONE ); - break; - } - case EApProxyServerAddress: - { // proxy server address none - temp = iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_NEW_AP_PROXY_SERVER_ADDR_NONE ); - break; - } - case EApIspIfCallbackInfo: - { // callback number none - temp = iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_NEW_AP_CB_NUMBER_NONE ); - break; - } - case EApIspLoginScript: - { // login script none - temp = iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_NEW_AP_LOGIN_SCRIPT_NONE ); - break; - } - case EApIspInitString: - { // modem init string none - temp = iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_NEW_AP_MODEM_INIT_NONE ); - break; - } - default: - { // get 'normal' None for others - temp = - iEikonEnv->AllocReadResourceLC( - R_APUI_SETT_VAL_FIELD_NONE ); - break; - } - } - CleanupStack::Pop(); // temp - CleanupStack::PopAndDestroy( value1 ); - CleanupStack::PushL( temp ); - value1 = temp; - } - - // Define a heap descriptor to hold all the item text - TInt length = title->Length() + value1->Length() + 10; - if ( aCompulsory ) - { - length += 3; - } - HBufC* itemText = HBufC::NewLC( length ); - - // handle exotic language number conversion here - TPtr t(title->Des()); - TPtr v(value1->Des()); - AknTextUtils::LanguageSpecificNumberConversion( t ); - AknTextUtils::LanguageSpecificNumberConversion( v ); - - // Define a modifiable pointer descriptor to be able to append text to the - // non-modifiable heap descriptor itemText - TPtr itemTextPtr = itemText->Des(); - itemTextPtr.Format( KTxtListItemFormat, title, value1 ); - if ( aCompulsory ) - { - itemTextPtr.Append( KTxtCompulsory ); - } - CleanupStack::Pop(); // itemtext, - if ( Pushed ) - { - // "Dynamic" text from resource if needed - CleanupStack::PopAndDestroy(); - } - // title, value, value1. !value is allocated with LC in both cases...! - CleanupStack::PopAndDestroy( 3 ); - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::CreateTextualListBoxItemL") - return itemText; - } - - - -//---------------------------------------------------------- -// CApSettingsDlg::CreateOnOffListBoxItemL -//---------------------------------------------------------- -// -HBufC* CApSettingsDlg::CreateOnOffListBoxItemL( TApMember aMember, TInt aRes, - TInt aCompulsory ) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::CreateOnOffListBoxItemL") - - // Read up title text from resource - HBufC* title = iEikonEnv->AllocReadResourceLC( aRes ); - - TUint32 aValueResourceID = 0; - TBool bvar; - - switch ( aMember ) - { - case EApIspBearerCallTypeIsdn: - {// Data call type "Analogue"/"ISDN" - TUint32 tempint; - iApItem->ReadUint( EApIspBearerCallTypeIsdn, tempint ); - switch ( tempint ) - { - case ECallTypeISDNv110: - { - aValueResourceID = R_APUI_VIEW_DATACALL_ISDN_110; - break; - } - case ECallTypeISDNv120: - { - aValueResourceID = R_APUI_VIEW_DATACALL_ISDN_120; - break; - } - case ECallTypeAnalogue: - default: - { - aValueResourceID = R_APUI_VIEW_DATACALL_ANALOLGUE; - break; - } - } - break; - } - case EApWapWspOption: - { // "Continuous"/"Temporary" - TUint32 tval; - iApItem->ReadUint( aMember, tval ); - if ( tval == EWapWspOptionConnectionOriented ) - { - aValueResourceID = R_APUI_VIEW_CONN_TYPE_CONTIN; - } - else - { - aValueResourceID = R_APUI_VIEW_CONN_TYPE_TEMP; - } - break; - } - case EApIspIfCallbackType: - { // "Use server number"/"Use other number" - TUint32 tval; - iApItem->ReadUint( aMember, tval ); - if ( tval == ECallbackActionMSCBCPAcceptServerSpecifiedNumber ) - { - aValueResourceID = R_APUI_VIEW_CB_USE_SERVER_NUMBER; - } - else - { - if ( tval == - ECallbackActionMSCBCPRequireClientSpecifiedNumber ) - { - aValueResourceID = R_APUI_VIEW_CB_USE_OTHER_NUMBER; - } - } - break; - } - case EApWapSecurity: - { // on/off - iApItem->ReadBool( aMember, bvar ); - if ( bvar ) - { - aValueResourceID = R_APUI_VIEW_WTLS_SECURITY_ON; - } - else - { - aValueResourceID = R_APUI_VIEW_WTLS_SECURITY_OFF; - } - break; - } - case EApIspUseLoginScript: - { - iApItem->ReadBool( aMember, bvar ); - if ( bvar ) - { - aValueResourceID = R_APUI_VIEW_USE_LOGINS_YES; - } - else - { - aValueResourceID = R_APUI_VIEW_USE_LOGINS_NO; - } - break; - } - - case EApIspEnableSWCompression: - case EApGprsHeaderCompression: - { - iApItem->ReadBool( aMember, bvar ); - if ( bvar ) - { - aValueResourceID = R_APUI_VIEW_PPP_COMP_YES; - } - else - { - aValueResourceID = R_APUI_VIEW_PPP_COMP_NO; - } - break; - } - case EApIspPromptForLogin: - { - iApItem->ReadBool( aMember, bvar ); - if ( bvar ) - { - aValueResourceID = R_APUI_VIEW_PROMPT_PASSWD_YES; - } - else - { - aValueResourceID = R_APUI_VIEW_PROMPT_PASSWD_NO; - } - break; - } - case EApIspIfCallbackEnabled: - { // yes/no - iApItem->ReadBool( aMember, bvar ); - if ( bvar ) - { - aValueResourceID = R_APUI_VIEW_USE_CB_YES; - } - else - { - aValueResourceID = R_APUI_VIEW_USE_CB_NO; - } - break; - } - case EApWapCurrentBearer: - { // "Packet data"/"SMS"/"Data call" - if ( iBearerType == EApBearerTypeCSD ) - { - aValueResourceID = R_APUI_VIEW_BEARER_TYPE_CSD; - } - else - { - if ( iBearerType == EApBearerTypeHSCSD ) - { - aValueResourceID = R_APUI_VIEW_BEARER_TYPE_HSCSD; - } - else - { - if ( iBearerType == EApBearerTypeGPRS ) - { - aValueResourceID = R_APUI_VIEW_BEARER_TYPE_GPRS; - } - else - { - if ( IsWlanSupported() ) - { - if ( iBearerType == EApBearerTypeWLAN ) - { - aValueResourceID = - R_APUI_VIEW_BEARER_TYPE_WLAN; - } - else - { - User::Leave( KErrInvalidBearerType ); - } - } - else - { - User::Leave( KErrInvalidBearerType ); - } - } - } - } - break; - } - case EApGprsDisablePlainTextAuth: - case EApIspDisablePlainTextAuth: - { // "Normal"/"Secure" - iApItem->ReadBool( aMember, bvar ); - if ( bvar ) - { - aValueResourceID = R_APUI_VIEW_PASSWORD_AUTH_SECURE; - } - else - { - aValueResourceID = R_APUI_VIEW_PASSWORD_AUTH_NORMAL; - } - break; - } - case EApIspBearerSpeed: - { - TUint32 uvar; - iApItem->ReadUint( aMember, uvar ); - switch ( TApCallSpeed( uvar ) ) - { - case KSpeedAutobaud: - { - aValueResourceID = R_APUI_VIEW_SPEED_AUTODETECT; - break; - } - case KSpeed9600: - { - aValueResourceID = R_APUI_VIEW_SPEED_9600; - break; - } - case KSpeed14400: - { - aValueResourceID = R_APUI_VIEW_SPEED_14400; - break; - } - case KSpeed19200: - { - aValueResourceID = R_APUI_VIEW_SPEED_19200; - break; - } - case KSpeed28800: - { - aValueResourceID = R_APUI_VIEW_SPEED_28800; - break; - } - case KSpeed38400: - { - aValueResourceID = R_APUI_VIEW_SPEED_38400; - break; - } - case KSpeed43200: - { - aValueResourceID = R_APUI_VIEW_SPEED_43200; - break; - } - case KSpeed56000: - { - aValueResourceID = R_APUI_VIEW_SPEED_56000; - break; - } - default: - { - // auto-repair corrupted value - // use 9600 if previous data was not valid... - aValueResourceID = R_APUI_VIEW_SPEED_9600; - } - } - - break; - } - case EApGprsPdpType: - { - TUint32 uvar( 0 ); - iApItem->ReadUint( aMember, uvar ); - if ( uvar == EIPv6 ) - { - aValueResourceID = R_APUI_VIEW_PDP_TYPE_IPV6; - } - else - { - aValueResourceID = R_APUI_VIEW_PDP_TYPE_IPV4; - } - break; - } - case EApIP6DNSAddrFromServer: - { - // Change the 'magic numbers' - // Add the three possibilities here - iApItem->ReadBool( aMember, bvar ); - TInt stype = GetDomainNameServersTypeL(); - - switch ( stype ) - { - case 0: - { - aValueResourceID = - R_APUI_VIEW_NEW_AP_DNS_SERVERS_AUTOMATIC; - break; - } - case 1: - { - aValueResourceID = R_APUI_VIEW_SET_IP_WELL_KNOWN; - break; - } - case 2: - { - aValueResourceID = R_APUI_VIEW_SET_IP_USER_DEFINED; - break; - } - default: - { - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - break; - } - } - break; - } - case EApWlanNetworkMode: - { - TUint32 netmode( 0 ); - iApItem->ReadUint( aMember, netmode ); - if ( netmode == EAdhoc ) - { - aValueResourceID = R_APUI_VIEW_WLAN_NETWORK_MODE_ADHOC; - } - else - { - aValueResourceID = R_APUI_VIEW_WLAN_NETWORK_MODE_INFRA; - } - break; - } - case EApWlanSecurityMode: - { - TUint32 secmode( 0 ); - iApItem->ReadUint( aMember, secmode ); - switch ( secmode ) - { - case EOpen: - { - aValueResourceID = R_APUI_VIEW_WLAN_SECURITY_MODE_OPEN; - break; - } - case EWep: - { - aValueResourceID = R_APUI_VIEW_WLAN_SECURITY_MODE_WEP; - break; - } - case E802_1x: - { - aValueResourceID = R_APUI_VIEW_WLAN_SECURITY_MODE_802_1X; - break; - } - case EWpa: - case EWpa2: - { - aValueResourceID = R_APUI_VIEW_WLAN_SECURITY_MODE_WPA; - break; - } - default: - { - aValueResourceID = R_APUI_VIEW_WLAN_SECURITY_MODE_OPEN; - break; - } - } - - break; - } - case EApWlanScanSSID: - { // yes/no - iApItem->ReadBool( aMember, bvar ); - if ( bvar ) - { - aValueResourceID = R_APUI_VIEW_HIDDEN_NETWORK_YES; - } - else - { - aValueResourceID = R_APUI_VIEW_HIDDEN_NETWORK_NO; - } - break; - } - case EApWlanChannelId: - { // ad-hoc channel auto / user defined - TUint32 channel(0); - iApItem->ReadUint( aMember, channel ); - if ( channel ) - { - aValueResourceID = R_APUI_VIEW_AD_HOC_CHANNEL_USER_DEFINED; - } - else - { - aValueResourceID = R_APUI_VIEW_AD_HOC_CHANNEL_AUTO; - } - break; - } - default: - { - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - break; - } - } - - HBufC* value; - if ( aValueResourceID ) - { - // Read up value text from resource - value = iEikonEnv->AllocReadResourceLC( aValueResourceID ); - } - else - { - value = HBufC::NewLC( 0 ); - } - - - // Define a heap descriptor to hold all the item text - TInt length = title->Length() + value->Length() + 10 ; - if ( aCompulsory ) - { - length += 3; - } - - HBufC* itemText = HBufC::NewLC( length); - - // Define a modifiable pointer descriptor to be able to append text to the - // non-modifiable heap descriptor itemText - TPtr itemTextPtr = itemText->Des(); - itemTextPtr.Format( KTxtListItemFormat, title, value); - if ( aCompulsory ) - { - itemTextPtr.Append( KTxtCompulsory ); - } - - CleanupStack::Pop(); // itemText - CleanupStack::PopAndDestroy( 2 ); // value, title - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::CreateOnOffListBoxItemL") - return itemText; - } - - - -//---------------------------------------------------------- -// CApSettingsDlg::ChangeSettingsL -//---------------------------------------------------------- -// -void CApSettingsDlg::ChangeSettingsL( TBool aQuick ) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::ChangeSettingsL") - -#ifdef __TEST_OOMDEBUG - if ( iMemTestOn ) - { - TInt leavecode( KErrNoMemory ); - - TInt ts( GetTestStateL() ); - - if ( ts == KEditingTest ) - { - TBuf<48> buf; - APSETUILOGGER_WRITE_BUF( _L("Starting Editing memtest") ); - - TUint32 rate( 0 ); - TUint32 retrycount( KOOMRetryCount ); - TUint32 retryoffset( KOOMRetryOffset ); - for ( - rate = 1; - ((rate < 50000) && (leavecode == KErrNoMemory)) || retrycount; - rate++ - ) - { - __UHEAP_SETFAIL( RHeap::EDeterministic, rate ); - TRAP( leavecode, DoChangeSettingsL( aQuick ) ); - __UHEAP_RESET; - if ( !leavecode ) - { - retrycount--; - rate += retryoffset; - } - } - User::LeaveIfError( leavecode ); - buf.Format( _L("\t Memtest finished, max. rate was: %d )"), rate ); - APSETUILOGGER_WRITE_BUF( buf ); - } - else - { - DoChangeSettingsL( aQuick ); - } - } - else - { - DoChangeSettingsL( aQuick ); - } -#else - DoChangeSettingsL( aQuick ); -#endif // __TEST_OOMDEBUG - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::ChangeSettingsL") - } - - - -//---------------------------------------------------------- -// CApSettingsDlg::SetBearerTypeL -//---------------------------------------------------------- -// -void CApSettingsDlg::SetBearerTypeL( TApBearerType aBearer ) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::SetBearerTypeL") - - iBearerType = aBearer; - - HandleListStructureChangeL(); - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::SetBearerTypeL") - } - - - -//---------------------------------------------------------- -// CApSettingsDlg::InvertSettingsL -//---------------------------------------------------------- -// -void CApSettingsDlg::InvertSettingsL( TApMember aDataMember ) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::InvertSettingsL") - - switch ( aDataMember ) - { - case EApIspIfCallbackType: - { - TUint32 ctype( ECallbackActionMSCBCPRequireClientSpecifiedNumber ); - iApItem->ReadUint( EApIspIfCallbackType, ctype ); - if ( ctype == ECallbackActionMSCBCPRequireClientSpecifiedNumber ) - { - iApItem->WriteUint( EApIspIfCallbackType, - ECallbackActionMSCBCPAcceptServerSpecifiedNumber ); - } - else - { - iApItem->WriteUint( EApIspIfCallbackType, - ECallbackActionMSCBCPRequireClientSpecifiedNumber ); - } - break; - } - case EApGprsPdpType: - { - TUint32 ipnettype( 0 ); - iApItem->ReadUint( EApGprsPdpType, ipnettype ); - if ( ipnettype == EIPv6 ) - { - iApItem->WriteUint( EApGprsPdpType, EIPv4 ); - } - else - { - iApItem->WriteUint( EApGprsPdpType, EIPv6 ); - } - break; - } - case EApWlanNetworkMode: - { - TUint32 netmode( 0 ); - iApItem->ReadUint( EApWlanNetworkMode, netmode ); - if ( netmode == EAdhoc ) - { - iApItem->WriteUint( EApWlanNetworkMode, EInfra ); - } - else - { - iApItem->WriteUint( EApWlanNetworkMode, EAdhoc ); - LimitSecMode(); - } - break; - } - case EApWapWspOption: - { - TUint32 intvar; - if ( iApItem->ReadUint( aDataMember, intvar ) == KErrNone ) - { - if ( intvar == EWapWspOptionConnectionless ) - { - intvar = EWapWspOptionConnectionOriented; - } - else - { - intvar = EWapWspOptionConnectionless; - } - iApItem->WriteUint( aDataMember, intvar ); - } - break; - } - default: - { - TBool bvar; - if ( iApItem->ReadBool( aDataMember, bvar ) == KErrNone ) - { - bvar = !bvar; - iApItem->WriteBool( aDataMember, bvar ); - } - } - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::InvertSettingsL") - } - - -//---------------------------------------------------------- -// CApSettingsDlg::ShowPopupSettingPageL -//---------------------------------------------------------- -// -TBool CApSettingsDlg::ShowPopupSettingPageL( TApMember aData ) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::ShowPopupSettingPageL") - - TInt currvalue( 0 ); - TBool retval( EFalse ); - TBool mustrepeat( EFalse ); - - CDesCArrayFlat* items = FillPopupSettingPageLC( aData, currvalue ); - - TInt attr_resid( 0 ); - GetResId( aData, attr_resid ); - - do - { - HBufC* titlebuf; - CAknRadioButtonSettingPage* dlg; - if ( attr_resid ) - { - titlebuf = iEikonEnv->AllocReadResourceLC( attr_resid ); - dlg = new ( ELeave )CAknRadioButtonSettingPage( - R_RADIO_BUTTON_SETTING_PAGE, - currvalue, - items ); - // must push 'cause SetSettingTextL can leave... - CleanupStack::PushL( dlg ); - TPtrC ptr( titlebuf->Des() ); - dlg->SetSettingTextL( ptr ); - CleanupStack::Pop(); // dlg - } - else - { - dlg = new ( ELeave )CAknRadioButtonSettingPage( - R_RADIO_BUTTON_SETTING_PAGE, - currvalue, - items ); - } - if ( dlg->ExecuteLD( CAknSettingPage::EUpdateWhenAccepted ) ) - { - if( AskQueryIfWcdmaL( aData , currvalue) ) - { - UpdateFromPopupSettingPageL( aData, currvalue ); - retval = ETrue; - mustrepeat = EFalse; - } - else - { - mustrepeat = ETrue; - } - } - else - { - mustrepeat = EFalse; - } - if ( attr_resid ) - { - // titlebuf, text title readed from resource... - CleanupStack::PopAndDestroy(); - } - }while( mustrepeat ); - - - // items, will also delete all elements in the array! - CleanupStack::PopAndDestroy( items ); - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::ShowPopupSettingPageL") - return retval; - } - - - - - - - -//---------------------------------------------------------- -// CApSettingsDlg::ShowPopupTextSettingPageL -//---------------------------------------------------------- -// -TBool CApSettingsDlg::ShowPopupTextSettingPageL( TApMember aData ) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::ShowPopupTextSettingPageL") - - TBool retval( EFalse ); - - // must be prepared for the worst case... - TBuf textToChange; - - HBufC* aBuf1 = GetTextLC( aData ); - - HBufC* aBuf = ConvertPerNToDelimLC( aBuf1->Des() ); - - TPtr16 ptr( aBuf->Des() ); - textToChange.Append( ptr ); - - TInt page_resid( 0 ); - TInt TextSettingPageFlags( EAknSettingPageNoOrdinalDisplayed ); - GetTextResId( aData, page_resid, TextSettingPageFlags ); - - - TBool isLatin ( aData == EApWapStartPage ); - - CAccessPointTextSettingPage* dlg = - new( ELeave )CAccessPointTextSettingPage( page_resid, textToChange, - TextSettingPageFlags, - isLatin ); - - if ( dlg->ExecuteLD( CAknSettingPage::EUpdateWhenAccepted ) ) - { - switch ( aData ) - { - case EApWapStartPage: - case EApGprsAccessPointName: - case EApIspLoginScript: - case EApIspInitString: - case EApWapAccessPointName: - case EApIspLoginName: - case EApIspLoginPass: - case EApIspIfAuthName: - case EApIspIfAuthPass: - { - HBufC* tmp = ConvertDelimToPerNLC( textToChange ); - textToChange.Zero(); - textToChange.Append( tmp->Des() ); - CleanupStack::PopAndDestroy( tmp ); - break; - } - case EApProxyServerAddress: - { - textToChange.Trim(); - break; - } - default: - { // no need for conversion - break; - } - } - if ( ( aData == EApIspLoginScript ) || ( aData == EApWapStartPage ) - || ( aData == EApGprsAccessPointName ) - || ( aData == EApProxyServerAddress ) ) - { - iApItem->WriteLongTextL( aData, textToChange ); - } - else - { - if ( aData == EApProxyPortNumber ) - { - // first remove non-number chars - HBufC* num = StripNonNumberLC( textToChange ); - textToChange.Zero(); - textToChange.Append( num->Des() ); - CleanupStack::PopAndDestroy( num ); - // and now get real numberic value - TInt tempint; - TLex lex; - lex.Assign( textToChange ); - if ( lex.Val( tempint ) ) - { // this means some error, set it to 0 - tempint = 0; - } - iApItem->WriteUint( EApProxyPortNumber, tempint ); - } - else - { - if ( ( aData == EApIspInitString ) ) - { - // must be prepared for the worst case... - TBuf8 textToChange8; - textToChange8.Copy( textToChange ); - iApItem->WriteTextL( aData, textToChange8 ); - } - else - { - if ( aData == EApWapAccessPointName ) - { - iApItem->SetNamesL( textToChange ); - } - else - { - iApItem->WriteTextL( aData, textToChange ); - } - } - } - } - retval = ETrue; - } - *iEventStore |= KApUiEventEdited; - CleanupStack::PopAndDestroy( 2 ); // aBuf, aBuf1 - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::ShowPopupTextSettingPageL") - return retval; - } - - - -//---------------------------------------------------------- -// CApSettingsDlg::GetTextLC -//---------------------------------------------------------- -// -HBufC* CApSettingsDlg::GetTextLC( TApMember aData ) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::GetTextLC") - - HBufC* ret; - switch ( aData ) - { - case EApWapStartPage: - { // Long text !!! - if ( iApItem->ReadTextLengthL( aData ) ) - { - // allocates as much as needed... - ret = iApItem->ReadConstLongTextL( aData )->AllocLC(); - } - else - { - ret = iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_WAP_START_PAGE_DEFAULT ); - } - break; - } - case EApGprsAccessPointName: - { - // allocates as much as needed... - ret = iApItem->ReadConstLongTextL( aData )->AllocLC(); - break; - } - case EApIspLoginScript: - { - // allocates as much as needed... - ret = iApItem->ReadConstLongTextL( aData )->AllocLC(); - break; - } - case EApProxyServerAddress: - { - // allocates as much as needed... - ret = iApItem->ReadConstLongTextL( aData )->AllocLC(); - break; - } - case EApWapGatewayAddress: - case EApIspIPAddr: - case EApIspIPNetMask: - case EApWlanIpNetMask: - case EApIspIPGateway: - case EApWlanIpGateway: - case EApGprsIPNameServer1: - case EApIspIPNameServer1: - case EApGprsIPNameServer2: - case EApIspIPNameServer2: - { - ret = HBufC::NewLC( KModifiableTextLength ); - TPtr16 ptr( ret->Des() ); - iApItem->ReadTextL( aData, ptr ); - if ( ptr.Compare( KEmptyText ) == 0 ) - { - *ret = KDynIpAddress; - } - break; - } - case EApIspInitString: - { - ret = HBufC::NewLC( KModifiableTextLength ); - HBufC8* tmpValue8 = HBufC8::NewLC( KModifiableTextLength ); - TPtr8 ptr( tmpValue8->Des() ); - iApItem->ReadTextL( aData, ptr ); - ret->Des().Copy( ptr ); - CleanupStack::PopAndDestroy(); // tmpValue8 - break; - } - case EApProxyPortNumber: - { - TUint32 tempint; - iApItem->ReadUint( EApProxyPortNumber, tempint ); - ret = HBufC::NewLC( KMaxProxyPortNumberLength ); - TPtr itemTextPtr = ret->Des(); - itemTextPtr.Format( KTxtNumber, tempint ); - break; - } - default: - { - ret = HBufC::NewLC( KModifiableTextLength ); - TPtr16 ptr( ret->Des() ); - iApItem->ReadTextL( aData, ptr ); - break; - } - } - - switch ( aData ) - { - case EApWapStartPage: - case EApGprsAccessPointName: - case EApIspLoginScript: - case EApIspInitString: - case EApWapAccessPointName: - case EApIspLoginName: - case EApIspLoginPass: - case EApIspIfAuthName: - case EApIspIfAuthPass: - { - break; - } - default: - { - // nothing to do - break; - } - } - - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::GetTextLC") - return ret; - } - - -//---------------------------------------------------------- -// CApSettingsDlg::GetTextResId -//---------------------------------------------------------- -// -void CApSettingsDlg::GetTextResId( TApMember aData, TInt& apage, - TInt& aTextSettingPageFlags ) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::GetTextResId") - - if ( ( aData != EApWapAccessPointName ) - && ( aData != EApIspDefaultTelNumber ) ) - { - aTextSettingPageFlags |= CAknTextSettingPage::EZeroLengthAllowed; - } - else - { - aTextSettingPageFlags &= (~CAknTextSettingPage::EZeroLengthAllowed); - } - - switch ( aData ) - { - case EApIspInitString: - { - apage = R_TEXT_SETTING_PAGE_MODEM_INIT_STRING; - break; - } - case EApWapAccessPointName: - { - apage = R_TEXT_SETTING_PAGE_CONN_NAME; - break; - } - case EApGprsAccessPointName: - { - apage = R_TEXT_SETTING_PAGE_GPRSAP_NAME; - break; - } - case EApIspLoginScript:// use EDWIN for script. - { - apage = R_TEXT_SETTING_PAGE_LOGIN_SCRIPT; - break; - } - case EApIspLoginName: - case EApIspIfAuthName: - { - apage = R_TEXT_SETTING_PAGE_LOGIN_NAME; - break; - } - case EApWapStartPage: - { - apage = R_TEXT_SETTING_PAGE_STARTING_PAGE; - break; - } - // use EDWINS as no such thing as PhoneNumber editor... - case EApIspDefaultTelNumber: - { - apage = R_TEXT_SETTING_PAGE_ACCESS_NUM; - break; - } - case EApIspIfCallbackInfo: - { - apage = R_TEXT_SETTING_PAGE_CB_NUM; - break; - } - case EApWapGatewayAddress: - { - apage = R_TEXT_SETTING_PAGE_GW_ADDR; - break; - } - case EApProxyServerAddress: - { - apage = R_TEXT_SETTING_PAGE_PROXY_SERVER_ADDR; - break; - } - case EApProxyPortNumber: - { - apage = R_TEXT_SETTING_PAGE_PROXY_PORT_NUMBER; - break; - } - case EApIspIPAddr: - { - apage = R_TEXT_SETTING_PAGE_ISPIP_ADDR; - break; - } - case EApIspIPNetMask: - case EApWlanIpNetMask: - { - apage = R_TEXT_SETTING_PAGE_ISP_NET_MASK; - break; - } - case EApIspIPGateway: - case EApWlanIpGateway: - { - apage = R_TEXT_SETTING_PAGE_ISP_GATEWAY; - break; - } - case EApGprsIPNameServer1: - case EApIspIPNameServer1: - { - apage = R_TEXT_SETTING_PAGE_NAME_SERV1; - break; - } - case EApGprsIPNameServer2: - case EApIspIPNameServer2: - { - apage = R_TEXT_SETTING_PAGE_NAME_SERV2; - break; - } - case EApIspLoginPass: - case EApIspIfAuthPass: - { // use EEikCtSecretEd - apage = R_TEXT_SETTING_PAGE_LOGIN_PASSWD; - break; - } - - case EApIspUseLoginScript: - {// use EDWIN: - apage = R_SETTING_APP_EDWIN_LOGIN_SCRIPT; - break; - } - case EApWlanNetworkName: - { - apage = R_TEXT_SETTING_PAGE_NETW_NAME; - break; - } - default: - { - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - apage = 0; - break; - } - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::GetTextResId") - } - - - -//---------------------------------------------------------- -// CApSettingsDlg::GetResId -//---------------------------------------------------------- -// -void CApSettingsDlg::GetResId( TApMember aData, TInt& aattr ) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::GetResId") - - // not text based ones: - switch ( aData ) - { - case EApWapCurrentBearer: - { - aattr = R_APUI_VIEW_BEARER_TYPE; - break; - } - case EApWapSecurity: - { - aattr = R_APUI_VIEW_WTLS_SECURITY; - break; - } - case EApWapWspOption: - { - aattr = R_APUI_VIEW_CONNECTION_TYPE; - break; - } - case EApIspPromptForLogin: - { - aattr = R_APUI_VIEW_PROMPT_PASSWORD; - break; - } - case EApGprsDisablePlainTextAuth: - case EApIspDisablePlainTextAuth: - { - aattr = R_APUI_VIEW_PASSWORD_AUTH; - break; - } - case EApIspBearerCallTypeIsdn: // used for data call type - { - aattr = R_APUI_VIEW_DATA_CALL_TYPE; - break; - } - case EApIspBearerSpeed: - { - aattr = R_APUI_VIEW_MAX_CONN_SPEED; - break; - } - case EApIspIfCallbackEnabled: - { - aattr = R_APUI_VIEW_USE_CALL_BACK; - break; - } - case EApIspIfCallbackType: - { - aattr = R_APUI_VIEW_CALL_BACK_TYPE; - break; - } - case EApIspEnableSWCompression: - case EApGprsHeaderCompression: - { - aattr = R_APUI_VIEW_ENABLE_PPP_COMP; - break; - } - case EApIspInitString: - { - aattr = R_APUI_VIEW_MODEM_INIT_STRING; - break; - } - case EApIspUseLoginScript: - { - aattr = R_APUI_VIEW_USE_LOGIN_SCRIPT; - break; - } - case EApGprsPdpType: - { - aattr = R_APUI_VIEW_PDP_TYPE; - break; - } - case EApIP6DNSAddrFromServer: - { - aattr = R_APUI_VIEW_SET_DNS_SERVERS_IP; - break; - } - case EApWlanNetworkName: - { - aattr = R_APUI_VIEW_WLAN_NETWORK_NAME; - break; - } - case EApWlanNetworkMode: - { - aattr = R_APUI_VIEW_WLAN_NETWORK_MODE; - break; - } - case EApWlanSecurityMode: - { - aattr = R_APUI_VIEW_WLAN_SECURITY_MODE; - break; - } - case EApWlanScanSSID: - { - aattr = R_APUI_VIEW_WLAN_HIDDEN_NETWORK; - break; - } - case EApWlanChannelId: - { - aattr = R_APUI_VIEW_AD_HOC; - break; - } - default: - { - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - aattr = 0; - break; - } - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::GetResId") - } - - - - -// --------------------------------------------------------- -// CApSettingsDlg::FillPopupSettingPageL -// --------------------------------------------------------- -// -CDesCArrayFlat* CApSettingsDlg::FillPopupSettingPageLC( TApMember aData, - TInt& aCurrvalue ) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::FillPopupSettingPageLC") - - CDesCArrayFlat* items = new( ELeave)CDesCArrayFlat( 1 ); - CleanupStack::PushL( items ); - - TUint32 tval( 0 ); - - switch ( aData ) - { - case EApIspPromptForLogin: - { - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_PROMPT_PASSWD_YES ) ); - CleanupStack::PopAndDestroy(); - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_PROMPT_PASSWD_NO ) ); - CleanupStack::PopAndDestroy(); - GetBoolDataValue( aData, ETrue, aCurrvalue ); - break; - } - case EApWapSecurity: - { - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_WTLS_SECURITY_ON ) ); - CleanupStack::PopAndDestroy(); - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_WTLS_SECURITY_OFF ) ); - CleanupStack::PopAndDestroy(); - GetBoolDataValue( aData, ETrue, aCurrvalue ); - break; - } - case EApIspIfCallbackEnabled: - { - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_USE_CB_YES ) ); - CleanupStack::PopAndDestroy(); - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_USE_CB_NO ) ); - CleanupStack::PopAndDestroy(); - GetBoolDataValue( aData, ETrue, aCurrvalue ); - break; - } - case EApIspEnableSWCompression: - case EApGprsHeaderCompression: - { - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_PPP_COMP_YES ) ); - CleanupStack::PopAndDestroy(); - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_PPP_COMP_NO ) ); - CleanupStack::PopAndDestroy(); - GetBoolDataValue( aData, ETrue, aCurrvalue ); - break; - } - case EApWapCurrentBearer: - { - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_BEARER_TYPE_GPRS ) ); - CleanupStack::PopAndDestroy(); - - if ( IsWlanSupported() ) - { - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_BEARER_TYPE_WLAN ) ); - CleanupStack::PopAndDestroy(); - } - - TBool isCsdSupported = - FeatureManager::FeatureSupported( KFeatureIdAppCsdSupport ); -#ifdef __TEST_CSD_SUPPORT - isCsdSupported = ETrue; -#endif // __TEST_CSD_SUPPORT - - if ( isCsdSupported ) - { - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_BEARER_TYPE_CSD ) ); - CleanupStack::PopAndDestroy(); - - if ( IsHSCSDEnabledL() ) - { - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_BEARER_TYPE_HSCSD ) ); - CleanupStack::PopAndDestroy(); - } - } - aCurrvalue = BearerType2BearerItemPosL( iBearerType ); - break; - } - case EApGprsDisablePlainTextAuth: - case EApIspDisablePlainTextAuth: - { - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_PASSWORD_AUTH_NORMAL ) ); - CleanupStack::PopAndDestroy(); - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_PASSWORD_AUTH_SECURE ) ); - CleanupStack::PopAndDestroy(); - GetBoolDataValue( aData, EFalse, aCurrvalue ); - // needs to be inverted? - break; - } - case EApWapWspOption: - { - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_CONN_TYPE_CONTIN ) ); - CleanupStack::PopAndDestroy(); - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_CONN_TYPE_TEMP ) ); - CleanupStack::PopAndDestroy(); - iApItem->ReadUint( aData, tval ); - aCurrvalue = Min( 1, tval ); - aCurrvalue = !aCurrvalue; - break; - } - case EApIspBearerCallTypeIsdn: // used for data call type - { - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_DATACALL_ANALOLGUE ) ); - CleanupStack::PopAndDestroy(); - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_DATACALL_ISDN_110 ) ); - CleanupStack::PopAndDestroy(); - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_DATACALL_ISDN_120 ) ); - CleanupStack::PopAndDestroy(); - iApItem->ReadUint( EApIspBearerCallTypeIsdn, tval ); - switch ( tval ) - { - case ECallTypeISDNv110: - { - aCurrvalue = KIspCallIsdn110; - break; - } - case ECallTypeISDNv120: - { - aCurrvalue = KIspCallIsdn120; - break; - } - default: - case ECallTypeAnalogue: - { - aCurrvalue = KIspCallAnalogue; - break; - } - } - break; - } - case EApIspBearerSpeed: - { - FillUpBearerSpeedValuesL( *items, aCurrvalue ); - break; - } - case EApIspIfCallbackType: - { - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_CB_USE_SERVER_NUMBER ) ); - CleanupStack::PopAndDestroy(); - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_CB_USE_OTHER_NUMBER ) ); - CleanupStack::PopAndDestroy(); - iApItem->ReadUint( aData, tval ); - if ( tval == ECallbackActionMSCBCPRequireClientSpecifiedNumber ) - { - aCurrvalue = 1; - } - else - { - aCurrvalue = 0; - } - break; - } - case EApIspUseLoginScript: - { - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_USE_LOGINS_YES ) ); - CleanupStack::PopAndDestroy(); - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_USE_LOGINS_NO ) ); - CleanupStack::PopAndDestroy(); - GetBoolDataValue( aData, ETrue, aCurrvalue ); - break; - } - case EApGprsPdpType: - { - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_PDP_TYPE_IPV4 ) ); - CleanupStack::PopAndDestroy(); - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_PDP_TYPE_IPV6 ) ); - CleanupStack::PopAndDestroy(); - iApItem->ReadUint( aData, tval ); - if ( tval == EIPv6 ) - { - aCurrvalue = 1; - } - else - { - aCurrvalue = 0; - } - break; - } - case EApIP6DNSAddrFromServer: - { - TApBearerType b = iApItem->BearerTypeL(); - TBool hasAuto = ( b != EApBearerTypeCSD ) - && ( b != EApBearerTypeHSCSD ) ; - if ( hasAuto ) - { - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_NEW_AP_DNS_SERVERS_AUTOMATIC ) ); - CleanupStack::PopAndDestroy(); - } - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_SET_IP_WELL_KNOWN ) ); - CleanupStack::PopAndDestroy(); - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_SET_IP_USER_DEFINED ) ); - CleanupStack::PopAndDestroy(); - TBool bval; - iApItem->ReadBool( aData, bval ); - if ( !bval ) - { - aCurrvalue = GetIPv6DNSTypeL(); - if ( !hasAuto ) - { // no Auto item, dec. currvalue - aCurrvalue--; - } - } - else - { - aCurrvalue = 0; - } - break; - } - case EApWlanNetworkName: - { - if ( IsWlanSupported() ) - { - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_WLAN_NETWORK_NAME_USER ) ); - CleanupStack::PopAndDestroy(); - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_WLAN_NETWORK_NAME_SCAN ) ); - CleanupStack::PopAndDestroy(); - // set current value as user defined: if not yet given, - // it is true, if it had been already specified, - // we could not know if it was the user or was it scanned - aCurrvalue = 0; - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - case EApWlanNetworkMode: - { - if ( IsWlanSupported() ) - { - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_WLAN_NETWORK_MODE_INFRA ) ); - CleanupStack::PopAndDestroy(); - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_WLAN_NETWORK_MODE_ADHOC ) ); - CleanupStack::PopAndDestroy(); - iApItem->ReadUint( aData, tval ); - if ( tval == EAdhoc ) - { - aCurrvalue = 1; - } - else - { - aCurrvalue = 0; - } - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - case EApWlanScanSSID: - { - if ( IsWlanSupported() ) - { - TBool bval(EFalse); - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_HIDDEN_NETWORK_NO ) ); - CleanupStack::PopAndDestroy(); - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_HIDDEN_NETWORK_YES ) ); - CleanupStack::PopAndDestroy(); - iApItem->ReadBool( aData, bval ); - if ( bval ) - { - aCurrvalue = 1; - } - else - { - aCurrvalue = 0; - } - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - case EApWlanChannelId: - { - if ( IsWlanSupported() ) - { - TUint32 channel(0); - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_AD_HOC_CHANNEL_AUTO ) ); - CleanupStack::PopAndDestroy(); - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_AD_HOC_CHANNEL_USER_DEFINED ) ); - CleanupStack::PopAndDestroy(); - iApItem->ReadUint( aData, channel ); - if ( channel ) - { - aCurrvalue = 1; - } - else - { - aCurrvalue = 0; - } - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - case EApWlanSecurityMode: - { - if ( IsWlanSupported() ) - { - TUint32 netmode(0); - - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_WLAN_SECURITY_MODE_OPEN ) ); - CleanupStack::PopAndDestroy(); - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_WLAN_SECURITY_MODE_WEP ) ); - CleanupStack::PopAndDestroy(); - - iApItem->ReadUint( EApWlanNetworkMode, netmode ); - if ( netmode == EInfra ) - { - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_WLAN_SECURITY_MODE_802_1X ) ); - CleanupStack::PopAndDestroy(); - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_WLAN_SECURITY_MODE_WPA ) ); - CleanupStack::PopAndDestroy(); - } - - iApItem->ReadUint( aData, tval ); - switch ( tval ) - { - case EOpen: - { - aCurrvalue = 0; - break; - } - case EWep: - { - aCurrvalue = 1; - break; - } - case E802_1x: - { - aCurrvalue = 2; - if ( netmode != EInfra ) - { - aCurrvalue--; - } - break; - } - case EWpa: - case EWpa2: - { - aCurrvalue = 3; - if ( netmode != EInfra ) - { - aCurrvalue-= 2; - } - break; - } - default: - { - aCurrvalue = 0; - break; - } - } - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - default: - { - __ASSERT_DEBUG( EFalse, Panic ( EUnknownCase ) ); - User::Leave( KErrInvalidColumn ); - break; - } - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::FillPopupSettingPageLC") - return items; - } - - - - -// --------------------------------------------------------- -// CApSettingsDlg::UpdateFromPopupSettingPageL -// --------------------------------------------------------- -// -void CApSettingsDlg::UpdateFromPopupSettingPageL( TApMember aData, - TInt aCurrvalue ) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::UpdateFromPopupSettingPageL") - - switch ( aData ) - { - case EApWapSecurity: - case EApIspPromptForLogin: - case EApIspIfCallbackEnabled: - case EApIspEnableSWCompression: - case EApGprsHeaderCompression: - case EApIspUseLoginScript: - { // INVERTED! - iApItem->WriteBool( aData, !( TBool( aCurrvalue ) ) ); - break; - } - case EApWlanScanSSID: - case EApGprsDisablePlainTextAuth: - case EApIspDisablePlainTextAuth: - { // NOT INVERTED! - iApItem->WriteBool( aData, ( TBool( aCurrvalue ) ) ); - break; - } - case EApWapWspOption: - { - if ( aCurrvalue ) - { - iApItem->WriteUint( EApWapWspOption, - EWapWspOptionConnectionless ); - } - else - { - iApItem->WriteUint( EApWapWspOption, - EWapWspOptionConnectionOriented ); - } - break; - } - case EApWapCurrentBearer: - { - DoBearerChangeL( aCurrvalue ); - break; - } - case EApIspBearerSpeed: - { - iApItem->WriteUint( EApIspBearerSpeed, - GetBearerSpeedForSelection( aCurrvalue ) - ); - break; - } - case EApIspIfCallbackType: - { // UINT - if ( aCurrvalue ) - { - iApItem->WriteUint( EApIspIfCallbackType, - ECallbackActionMSCBCPRequireClientSpecifiedNumber ); - } - else - { - iApItem->WriteUint( EApIspIfCallbackType, - ECallbackActionMSCBCPAcceptServerSpecifiedNumber ); - } - break; - } - case EApIspBearerCallTypeIsdn: // used for data call type - { - // as order is the same in UI and in enum, simply write it - iApItem->WriteUint( EApIspBearerCallTypeIsdn, aCurrvalue ); - LimitSpeed(); - break; - } - case EApGprsPdpType: - { - // get value to write - if ( aCurrvalue ) - { - aCurrvalue = EIPv6; - } - else - { - aCurrvalue = EIPv4; - } - iApItem->WriteUint( EApGprsPdpType, aCurrvalue ); - break; - } - case EApIP6DNSAddrFromServer: - { - // if it is CSD or HSCSD, there is NO AUTOMATIC value, - // just the next two: Well-known & User defined... - // So in those cases, aCurrvalue must be 0 & 1, which - // corresponds to the normal 1, 2 so it should be incremented - TInt realvalue = aCurrvalue; - TApBearerType b = iApItem->BearerTypeL(); - if ( ( b == EApBearerTypeCSD ) || ( b == EApBearerTypeHSCSD ) ) - { - realvalue++; - } - - if ( realvalue == 2 ) - { // user defined!!! - TBool isip6( EFalse ); - if ( iApItem->BearerTypeL() == EApBearerTypeGPRS ) - { - TUint32 ival(0); - iApItem->ReadUint( EApGprsPdpType, ival ); - if ( ival == EIPv6 ) - { - isip6 = ETrue; - } - } - else - { - isip6 = !iL2Ipv4; - } - GetNameServersL( isip6 ); - } - else - { - if ( realvalue == 1 ) - { // well-known - // write default well known name server values - iApItem->WriteTextL( EApIP6NameServer1, - KKnownNameServer1 ); - iApItem->WriteTextL( EApIP6NameServer2, - KKnownNameServer2 ); - } - else - { - iApItem->WriteTextL( EApIP6NameServer1, KDynIpv6Address ); - iApItem->WriteTextL( EApIP6NameServer2, KDynIpv6Address ); - } - } - break; - } - case EApWlanNetworkMode: - { - if ( IsWlanSupported() ) - { - if ( aCurrvalue ) - { - iApItem->WriteUint( EApWlanNetworkMode, EAdhoc ); - LimitSecMode(); - } - else - { - iApItem->WriteUint( EApWlanNetworkMode, EInfra ); - } - - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - case EApWlanSecurityMode: - { - if ( IsWlanSupported() ) - { - TInt secmode(EOpen); - switch ( aCurrvalue ) - { - case KItemIndex0: - { - secmode = EOpen; - break; - } - case KItemIndex1: - { - secmode = EWep; - break; - } - case KItemIndex2: - { - secmode = E802_1x; - break; - } - case KItemIndex3: - { - secmode = EWpa; - break; - } - default: - { - secmode = EOpen; - break; - } - } - iApItem->WriteUint( EApWlanSecurityMode, secmode ); - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - case EApWlanChannelId: - { - if ( IsWlanSupported() ) - { - if ( aCurrvalue ) - { // user defined, ask number from user, offer 7 as default - TUint32 channel = GetAdHocChannelL(); - iApItem->WriteUint( EApWlanChannelId, channel ); - } - else - { // auto, write 0 - iApItem->WriteUint( EApWlanChannelId, aCurrvalue ); - } - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - default: - { - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - User::Leave( KErrInvalidColumn ); - break; - } - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::UpdateFromPopupSettingPageL") - } - - - -// --------------------------------------------------------- -// CApSettingsDlg::CanSaveL( ) -// --------------------------------------------------------- -// -CApSettingsDlg::TSaveAction CApSettingsDlg::CanSaveL( TApMember& aDataNeeded ) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::CanSaveL") - - TSaveAction retval( EApCanSave ); - - // it is used in two cases, less code by doing it here - HBufC *sgd = HBufC::NewLC( KModifiableTextLength ); - TPtr16 ptr( sgd->Des() ); - - switch ( iBearerType ) - { - case EApBearerTypeCSD: - case EApBearerTypeHSCSD: - { - iApItem->ReadTextL( EApIspDefaultTelNumber, ptr ); - if ( *sgd == KEmptyText ) - { - retval = EApMustDelete; - if ( !( *iEventStore & KApUiEventExitRequested ) ) - { - if ( ! AskQueryL( R_APUI_AP_ACCESS_NUMBER_NOT ) ) - { - retval = EApShallGoBack; - aDataNeeded = EApIspDefaultTelNumber; - } - } - } - break; - } - case EApBearerTypeGPRS: - { - // nothing to do... - break; - } - case EApBearerTypeWLAN: - { - if ( IsWlanSupported() ) - { - iApItem->ReadTextL( EApWlanNetworkName, ptr ); - if ( *sgd == KEmptyText ) - { - retval = EApShallGoBack; - aDataNeeded = EApWlanNetworkName; - if ( !( *iEventStore & KApUiEventExitRequested ) ) - { - if ( AskQueryL( R_APUI_AP_WLAN_NAME_NOT_DEFINED ) ) - { - retval = EApMustDelete; - } - } - } - if ( (retval != EApShallGoBack) && (retval != EApMustDelete) - && IsNetMaskAndGatewayVisibleL() ) - { // now check compulsory fields - iApItem->ReadTextL( EApWlanIpNetMask, ptr ); - if ( ( ptr.Compare( KDynIpAddress ) == 0 ) - || ( ptr.Compare( KEmptyText ) == 0 ) ) - { - retval = EApShallGoBack; - aDataNeeded = EApWlanIpNetMask; - if ( AskQueryL( - R_APUI_VIEW_NETW_QUEST_IAP_INCOMPLETE_DELETE ) ) - { - retval = EApMustDelete; - } - } - else - { - iApItem->ReadTextL( EApIspIPGateway, ptr ); - if ( ( sgd->Compare( KDynIpAddress ) == 0 ) - || ( sgd->Compare( KEmptyText ) == 0 ) ) - { - retval = EApShallGoBack; - aDataNeeded = EApIspIPGateway; - if ( AskQueryL( - R_APUI_VIEW_NETW_QUEST_IAP_INCOMPLETE_DELETE ) - ) - { - retval = EApMustDelete; - } - } - } - } - if ( (retval != EApShallGoBack) && (retval != EApMustDelete) - && (!HasSecuritySettingsFilledL()) ) - { - retval = EApShallGoBack; - aDataNeeded = EApWlanSecuritySettings; - if ( !( *iEventStore & KApUiEventExitRequested ) ) - { - if ( AskQueryL( R_APUI_AP_WLAN_SEC_SETT_EMPTY ) ) - { - retval = EApMustDelete; - } - } - } - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - default: - { // in release, leave, in debug, PANIC - __ASSERT_DEBUG( EFalse, Panic( EInvalidBearerType ) ); - User::Leave( KErrInvalidBearerType ); - break; - } - } - CleanupStack::PopAndDestroy( sgd ); // sgd - - if ( ( retval == EApShallGoBack ) && - ( *iEventStore & KApUiEventExitRequested ) ) - { - retval = EApNoAction; - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::CanSaveL") - return retval; - } - - - - - - -//---------------------------------------------------------- -// CApSettingsDlg::ShowPopupIpAddrSettingPageL -//---------------------------------------------------------- -// -void CApSettingsDlg::ShowPopupIpAddrSettingPageL( TApMember aData ) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::ShowPopupIpAddrSettingPageL") - - HBufC* aBuf = HBufC::NewLC( KModifiableTextLength ); - TPtr16 ptr( aBuf->Des() ); - - iApItem->ReadTextL( aData, ptr ); - - TBuf textToChange; - - textToChange.Append( ptr ); - - TInt page_resid( 0 ); - TInt TextSettingPageFlags( EAknSettingPageNoOrdinalDisplayed ); - GetTextResId( aData, page_resid, TextSettingPageFlags ); - - TInetAddr AddrToChange; - AddrToChange.Input( textToChange ); - CAknIpFieldSettingPage* dlg = - new( ELeave )CAknIpFieldSettingPage( page_resid, AddrToChange ); - if ( dlg->ExecuteLD( CAknSettingPage::EUpdateWhenAccepted ) ) - { - // first need to check phone number validity, if not, - // display error msg, - AddrToChange.Output( textToChange ); - iApItem->WriteTextL( aData, textToChange ); - } - CleanupStack::PopAndDestroy(); // aBuf - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::ShowPopupIpAddrSettingPageL") - } - - - - - - -//---------------------------------------------------------- -// CApSettingsDlg::ShowPopupPhoneNumSettingPageL -//---------------------------------------------------------- -// -void CApSettingsDlg::ShowPopupPhoneNumSettingPageL( TApMember aData ) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::ShowPopupPhoneNumSettingPageL") - - HBufC* aBuf = HBufC::NewLC( KModifiableTextLength ); - TPtr16 ptr( aBuf->Des() ); - - if ( aData == EApIspIfCallbackInfo ) - { // 8 bit text - HBufC8* tmpValue8 = HBufC8::NewLC( KModifiableTextLength ); - TPtr8 ptr8( tmpValue8->Des() ); - iApItem->ReadTextL( aData, ptr8 ); - ptr.Copy( ptr8 ); - CleanupStack::PopAndDestroy(); // tmpvalue8 - } - else - { - iApItem->ReadTextL( aData, ptr ); - } - - TBuf textToChange; - - textToChange.Append( ptr ); - - TInt page_resid( 0 ); - TInt TextSettingPageFlags( EAknSettingPageNoOrdinalDisplayed ); - GetTextResId( aData, page_resid, TextSettingPageFlags ); - TBool mustgoon( ETrue ); - do - { - CAknSettingPage* dlg = - new( ELeave )CAknTextSettingPage( page_resid, - textToChange, - TextSettingPageFlags ); - if ( dlg->ExecuteLD( CAknSettingPage::EUpdateWhenAccepted ) ) - { - // first need to check phone number validity, - // if not, dispaly error msg, - // bearing in mind that if empty is not allowed, - // we can not got empty text from editor, so IF it is not a valid - // phone number, but it is empty, thna it is allowed and - // it is the user's wish, so go on as valid... - // MNAN-6XBFNB: Digits that are not western should also be accepted - // Convert digits to western and check the phone number like this. - TBuf temp; - temp = textToChange; - AknTextUtils::ConvertDigitsTo( temp, EDigitTypeWestern ); - - if ( CommonPhoneParser::IsValidPhoneNumber - ( temp, CommonPhoneParser::EContactCardNumber ) - || ( temp.Compare( KEmpty ) == 0) ) - { - if ( aData == EApIspIfCallbackInfo ) - { // 8 bit text - HBufC8* tmpValue8 = HBufC8::NewLC( KModifiableTextLength ); - TPtr8 ptr8( tmpValue8->Des() ); - iApItem->ReadTextL( aData, ptr8 ); - ptr8.Copy( textToChange ); - iApItem->WriteTextL( aData, ptr8 ); - CleanupStack::PopAndDestroy(); // tmpvalue8 - } - else - { - iApItem->WriteTextL( aData, textToChange ); - } - mustgoon = EFalse; - } - else - { // give invalid number message - ShowNoteL( R_APUI_VIEW_INVALID_NUMBER ); - } - } - else - { - mustgoon = EFalse; - } - } - while( mustgoon ); - CleanupStack::PopAndDestroy(); // aBuf - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::ShowPopupPhoneNumSettingPageL") - } - - - - -//---------------------------------------------------------- -// CApSettingsDlg::ShowPopupPasswordPageL -//---------------------------------------------------------- -// -void CApSettingsDlg::ShowPopupPasswordPageL( TApMember aData ) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::ShowPopupPasswordPageL") - - // must be prepared for the worst case... - TBuf newpass; - - TUint32 txtLength = iApItem->ReadTextLengthL( aData ); - // allocates as much as needed... - HBufC* oldpass = HBufC::NewLC( txtLength ); - TPtr16 ptr( oldpass->Des() ); - iApItem->ReadTextL( aData, ptr ); - - CAknAlphaPasswordSettingPage* dlg = - new( ELeave )CAknAlphaPasswordSettingPage( - R_TEXT_SETTING_PAGE_LOGIN_PASSWD, - newpass, ptr ); - CleanupStack::PushL(dlg); - // As password is asked only once... - dlg->SetMaxPasswordLength( KMaxLoginPasswordLength ); - CleanupStack::Pop(); - if ( dlg->ExecuteLD(CAknSettingPage::EUpdateWhenChanged) ) - { - iApItem->WriteTextL( aData, newpass ); - } - CleanupStack::PopAndDestroy(); // oldpass - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::ShowPopupPasswordPageL") - } - - - -//---------------------------------------------------------- -// CApSettingsDlg::GetBoolDataValue -//---------------------------------------------------------- -// -void CApSettingsDlg::GetBoolDataValue( TApMember aData, TBool aInvert, - TInt& aCurrvalue) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::GetBoolDataValue") - - iApItem->ReadBool( aData, aCurrvalue); - // just to be on the sure side... - aCurrvalue = Min( KBoolMaxNumber, aCurrvalue); - if ( aInvert) - { - aCurrvalue = !aCurrvalue; - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::GetBoolDataValue") - } - - -//---------------------------------------------------------- -// CApSettingsDlg::DoBearerChangeL -//---------------------------------------------------------- -// -void CApSettingsDlg::DoBearerChangeL( TInt aCurrvalue) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::DoBearerChangeL") - - TApBearerType newbearer = BearerItemPos2BearerTypeL( aCurrvalue ); - HandleBearerChangeL( newbearer ); - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::DoBearerChangeL") - } - - - -//---------------------------------------------------------- -// CApSettingsDlg::HandleBearerChangeL -//---------------------------------------------------------- -// -void CApSettingsDlg::HandleBearerChangeL( TApBearerType aBearer) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::HandleBearerChangeL") - - if ( iBearerItemArray->At( BearerToArrayIndexL( aBearer)) == NULL) - { - CApAccessPointItem* ap = CApAccessPointItem::NewLC(); - ap->CopyFromL( *iApItem); - ap->WriteUint( EApWapAccessPointID, iApItem->WapUid()); - iBearerItemArray->At( BearerToArrayIndexL( aBearer)) = ap; - iApItem = ap; - CleanupStack::Pop(); // ap - } - else - { - iApItem = iBearerItemArray->At( BearerToArrayIndexL( aBearer)); - } - iApItem->SetBearerTypeL( aBearer ); - SetBearerTypeL( aBearer ); - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::HandleBearerChangeL") - } - - -//---------------------------------------------------------- -// CApSettingsDlg::BearerToArrayIndexL -//---------------------------------------------------------- -// -TInt32 CApSettingsDlg::BearerToArrayIndexL( TApBearerType aBearer) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::BearerToArrayIndexL") - - TInt32 retval( KBearerArrayGPRS ); - switch( aBearer ) - { - case EApBearerTypeCSD: - { - retval = KBearerArrayCSD; - break; - } - case EApBearerTypeGPRS: - { - retval = KBearerArrayGPRS; - break; - } - case EApBearerTypeHSCSD: - { - retval = KBearerArrayHSCSD; - break; - } - case EApBearerTypeWLAN: - { - if ( IsWlanSupported() ) - { - retval = KBearerArrayWLAN; - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - default: - { - __ASSERT_DEBUG( EFalse, Panic( EInvalidBearerType ) ); - User::Leave( KErrInvalidBearerType ); - break; - } - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::BearerToArrayIndexL") - return retval; - } - -/* -//---------------------------------------------------------- -// CApSettingsDlg::ArrayIndexToBearer -//---------------------------------------------------------- -// -TApBearerType CApSettingsDlg::ArrayIndexToBearer( TInt32 aIndex) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::ArrayIndexToBearer") - - TApBearerType retval( EApBearerTypeGPRS ); - switch( aIndex ) - { - case KBearerArrayCSD: - { - retval = EApBearerTypeCSD; - break; - } - case KBearerArrayGPRS: - { - retval = EApBearerTypeGPRS; - break; - } - case KBearerArrayHSCSD: - { - retval = EApBearerTypeHSCSD; - break; - } - case KBearerArrayWLAN: - { - if ( IsWlanSupported() ) - { - retval = EApBearerTypeWLAN; - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - default: - { - __ASSERT_DEBUG( EFalse, Panic( EInvalidBearerType ) ); - break; - } - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::ArrayIndexToBearer") - return retval; - } - -*/ - - -//---------------------------------------------------------- -// CApSettingsDlg::FillUpBearerSpeedValuesL -//---------------------------------------------------------- -// -void CApSettingsDlg::FillUpBearerSpeedValuesL( CDesCArrayFlat& aItems, - TInt& aCurrvalue ) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::FillUpBearerSpeedValuesL") - - TUint32 tval( 0 ); - TUint32 bval( 0 ); - - iApItem->ReadUint( EApIspBearerSpeed, tval ); - iApItem->ReadUint( EApIspBearerCallTypeIsdn, bval ); - TApBearerType btype = iApItem->BearerTypeL(); - const TInt* actResSpeeds = NULL; - const TInt* actSpeeds = NULL; - - TBool isWcdma = - FeatureManager::FeatureSupported( KFeatureIdProtocolWcdma ); - - switch ( bval ) - { - case ECallTypeAnalogue: - { // CSD/HSCSD, Analogue - if ( btype == EApBearerTypeHSCSD ) - { - actResSpeeds = KResHcsdAnalogue; - actSpeeds = KHcsdAnalogue; - } - else - { - actResSpeeds = KResCsdAnalogue; - actSpeeds = KCsdAnalogue; - if ( isWcdma ) - { - actResSpeeds = KResCsdAnalogueWcdma; - actSpeeds = KCsdAnalogueWcdma; - } - } - break; - } - case ECallTypeISDNv110: - { // CSD/HSCSD, ISDN v110: - if ( btype == EApBearerTypeHSCSD ) - { - actResSpeeds = KResHcsdIsdn110; - actSpeeds = KHcsdIsdn110; - } - else - { - actResSpeeds = KResCsdIsdn110; - actSpeeds = KCsdIsdn110; - if ( isWcdma ) - { - actResSpeeds = KResCsdIsdn110Wcdma; - actSpeeds = KCsdIsdn110Wcdma; - } - } - break; - } - case ECallTypeISDNv120: - { - if ( btype == EApBearerTypeHSCSD ) - { - actResSpeeds = KResHcsdIsdn120; - actSpeeds = KHcsdIsdn120; - } - else - { - actResSpeeds = KResCsdIsdn120; - actSpeeds = KCsdIsdn120; - if ( isWcdma ) - { - actResSpeeds = KResCsdIsdn120Wcdma; - actSpeeds = KCsdIsdn120Wcdma; - } - } - break; - } - default: - { - break; - } - } - - if ( actResSpeeds ) - { - while ( *actResSpeeds != KEndOfArray ) - { - aItems.AppendL( *iEikonEnv->AllocReadResourceLC( *actResSpeeds ) ); - CleanupStack::PopAndDestroy(); - ++actResSpeeds; - } - } - - if( actSpeeds ) - { - aCurrvalue = 0; - TInt nextSpeed = *( actSpeeds + aCurrvalue + 1) ; - while ( ( nextSpeed != KEndOfArray ) - && ( *( actSpeeds + aCurrvalue) < ( TInt )tval ) - && ( nextSpeed <= ( TInt )tval ) ) - { - ++aCurrvalue; - nextSpeed = *( actSpeeds + aCurrvalue + 1) ; - } - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::FillUpBearerSpeedValuesL") - } - - - -//---------------------------------------------------------- -// CApSettingsDlg::SaveDataL -//---------------------------------------------------------- -// -TBool CApSettingsDlg::SaveDataL( ) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::SaveDataL") - - TApMember aDataNeeded; - TSaveAction action(EApCanSave); - TBool retval( ETrue ); - TInt err (KErrNone ); - - // first handle ALL db stuff because Symbian DB does handles - // consequtive transactions wrongly... - TTransactionResult ownTransaction = - iDataModel->StartTransactionLC( - /*aWrite*/EFalse, - /*aShowNote*/ETrue, - /*aRetry*/ETrue ); - if ( ownTransaction != EFailedWithLocked ) - { - action = CanSaveL(aDataNeeded); - switch ( action ) - { - case EApCanSave: -#ifdef __WINS__ - case EApMustDelete: -#endif // __WINS__ - { // save data - if ( ( *iOldApItem != *iApItem ) || ( *iUid == KApNoneUID ) - || iDataModel->iWepSecSettings - || iDataModel->iWpaSecSettings ) - { // save if different or NEW BLANK - *iEventStore |= KApUiEventEdited; - if ( *iUid == KApNoneUID ) - { - HBufC* buf = HBufC::NewLC( KApMaxConnNameLength ); - // now check if name is unique, if it is, - // save and commit, if it is not, show note - // and no save at all, Rollback! - TPtr16 ptr( buf->Des() ); - iApItem->ReadTextL( EApWapAccessPointName, ptr ); - TBool b(EFalse); - TRAP( err, b = - iDataModel->ApUtils()->IsValidNameL( ptr ) ); - CleanupStack::PopAndDestroy( buf ); - if ( b ) - { - TRAP( err, - iDataModel->CreateFromDataL( *iApItem ) ); - if ( err == KErrNone ) - { - iApItem->ReadUint( EApWapAccessPointID, - *iUid ); - *iEventStore |= KApUiEventCreatedBlank; - } - } - else - { - err = KErrAlreadyExists; - // no DB call after this point, as transaction must be rolled back, - // but we can do it only at the end - if ( ownTransaction == EOwnTransaction ) - { - CleanupStack::PopAndDestroy(); //Rollback - // set as if no need to commit... - ownTransaction = EUsingAlreadyStarted; - } - } - } - else - { - // If the name is not unique, - // it will leave with KErrAlreadyExists - TRAP( err, - iDataModel->UpdateAccessPointDataL( *iApItem ) ); - } - } - break; - } -#ifndef __WINS__ - case EApMustDelete: - { - if ( *iUid != KApNoneUID ) - { - TUint32 WapUid( 0 ); - iApItem->ReadUint( EApWapAccessPointID, WapUid ); - iDataModel->RemoveApL( WapUid ); - } - break; - } -#endif // __WINS__ - case EApShallGoBack: - { - switch ( aDataNeeded ) - { - case EApIspDefaultTelNumber: - { - SelectItem( KListIndexCSDAccessNumber ); - retval = EFalse; - break; - } - case EApWlanNetworkName: - { - if ( IsWlanSupported() ) - { - SelectItem( KListIndexWLANNetworkName ); - retval = EFalse; - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - case EApWlanIpNetMask: - case EApIspIPNetMask: - { - if ( IsWlanSupported() ) - { - SelectItem( KListIndexWLANSubnetMask ); - retval = EFalse; - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - case EApIspIPGateway: - case EApWlanIpGateway: - { - if ( IsWlanSupported() ) - { - SelectItem( KListIndexWLANDefaultGateway ); - retval = EFalse; - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - case EApWlanSecuritySettings: - { - if ( IsWlanSupported() ) - { - SelectItem( KListIndexWLANSecuritySettings ); - retval = EFalse; - ChangeSettingsL( EFalse ); - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - default: - {// otherwise, nothing to do... - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - break; - } - } - break; - } - case EApNoAction: - { // can not save, do not go back: Exit, do nothing but ignore... - break; - } - default: - { - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - break; - } - } - - if ( ownTransaction == EOwnTransaction ) - { - err = iDataModel->Database()->Database()->CommitTransaction(); - User::LeaveIfError( err ); - CleanupStack::Pop(); // RollbackTransaction - } - } - else - { - User::Leave( KErrLocked ); - } - // end transaction stuff - // and handle possible other stuff like - // displaying notifications, redirecting the user, etc... - - if ( err == KErrAlreadyExists ) - { - // Check if exit and if it is, Exit, - // if it is not, then show note - // and move user back to editor... - if ( !( *iEventStore & KApUiEventExitRequested ) ) - { - HBufC* buf = HBufC::NewLC( KApMaxConnNameLength ); - TPtr16 ptr( buf->Des() ); - iApItem->ReadTextL( EApWapAccessPointName, ptr ); - ShowNoteL( R_APUI_IAP_NAME_ALREADY_EXISTS, buf ); - CleanupStack::PopAndDestroy( buf ); // buf - SelectItem( KListIndexConnectionName ); - retval = EFalse; - ChangeSettingsL( EFalse ); - } - } - else - { - if ( err == KErrInvalidName ) - { - ShowNoteL( R_APUI_VIEW_INVALID_CONN_NAME ); - SelectItem( KListIndexConnectionName ); - retval = EFalse; - } - else - { - if ( !( *iEventStore & KApUiEventExitRequested ) ) - { - User::LeaveIfError( err ); - } - iOldApItem->CopyFromL( *iApItem ); - } - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::SaveDataL") - return retval; - } - - - -//---------------------------------------------------------- -// CApSettingsDlg::HandleListStructureChangeL -//---------------------------------------------------------- -// -void CApSettingsDlg::HandleListStructureChangeL() - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::HandleListStructureChangeL") - - TUint32 l = iApItem->ReadTextLengthL( EApWapGatewayAddress ); - HBufC* buf = HBufC::NewLC( l ); - TPtr16 ptr( buf->Des() ); - iApItem->ReadTextL( EApWapGatewayAddress, ptr ); - - if ( ( iBearerType == EApBearerTypeCSD ) - || ( iBearerType == EApBearerTypeHSCSD ) ) - { - GetCSDSettingArrays( iVariant ); - } - else - { - if ( iBearerType == EApBearerTypeGPRS ) - { - GetGPRSSettingArrays( iVariant ); - } - else - { - if ( IsWlanSupported() ) - { - if ( iBearerType == EApBearerTypeWLAN ) - { - GetWLANSettingArraysL( iVariant ); - } - else - { - User::Leave( KErrInvalidBearer ); - } - } - else - { - User::Leave( KErrInvalidBearer ); - } - } - } - CleanupStack::PopAndDestroy( buf ); - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::HandleListStructureChangeL") - } - - - -//---------------------------------------------------------- -// CApSettingsDlg::LimitSpeed -//---------------------------------------------------------- -// -void CApSettingsDlg::LimitSpeed() - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::LimitSpeed") - - // now 'limit' the speeds - TUint32 speed( 0 ); - iApItem->ReadUint( EApIspBearerSpeed, speed ); - TUint32 calltype( EFalse ); - iApItem->ReadUint( EApIspBearerCallTypeIsdn, calltype ); - const TInt* actSpeeds = NULL; - TBool isWcdma = - FeatureManager::FeatureSupported( KFeatureIdProtocolWcdma ) ; - switch ( iBearerType ) - { - case EApBearerTypeCSD: - { - switch ( calltype ) - { - case ECallTypeISDNv110: - { - actSpeeds = isWcdma ? KCsdIsdn110Wcdma : KCsdIsdn110; - break; - } - case ECallTypeISDNv120: - { - actSpeeds = isWcdma ? KCsdIsdn120Wcdma : KCsdIsdn120; - break; - } - case ECallTypeAnalogue: - default: - { - actSpeeds = isWcdma ? KCsdAnalogueWcdma : KCsdAnalogue; - } - } - break; - } - case EApBearerTypeHSCSD: - { - switch ( calltype ) - { - case ECallTypeISDNv110: - { - actSpeeds = KHcsdIsdn110; - break; - } - case ECallTypeISDNv120: - { - actSpeeds = KHcsdIsdn120; - break; - } - case ECallTypeAnalogue: - default: - { - actSpeeds = KHcsdAnalogue; - } - } - break; - } - default: - { - break; - } - } - - if( actSpeeds ) - { - TInt tempSpeed = *actSpeeds; - TInt nextSpeed = *( actSpeeds + 1 ); - while ( ( nextSpeed != KEndOfArray ) - && ( tempSpeed < ( TInt )speed ) - && ( nextSpeed <= ( TInt )speed ) ) - { - tempSpeed = *( ++actSpeeds ); - nextSpeed = *( actSpeeds + 1 ); - } - speed = tempSpeed ; - } - - - iApItem->WriteUint( EApIspBearerSpeed, speed ); - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::LimitSpeed") - } - - -//---------------------------------------------------------- -// CApSettingsDlg::SelectItem -//---------------------------------------------------------- -// -void CApSettingsDlg::SelectItem( TInt aItemIndex ) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::SelectItem") - - iList->ScrollToMakeItemVisible( aItemIndex ); - iList->SetCurrentItemIndexAndDraw( aItemIndex ); - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::SelectItem") - } - - - - - -// Converting EParagraphDelimiters to \ns -// --------------------------------------------------------- -// CApSettingsDlg::ConvertDelimToPerNLC -// --------------------------------------------------------- -// -HBufC* CApSettingsDlg::ConvertDelimToPerNLC( const TDesC& aInText ) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::ConvertDelimToPerNLC") - - TInt size = aInText.Length(); - HBufC* outText = HBufC::NewLC( size ); - TPtr ptr = outText->Des(); - - for ( TInt ii=0; iiDes(); - - TText ch; - for (TInt ii=0; iiCurrentItemIndex(), 0 ) ); - TApMember* ptr; - TInt* tptr; - TInt* compulsptr; - switch ( iLevel ) - { - case 0: - { - ptr = iField; - tptr = iTitles; - compulsptr = iCompulsory; - break; - } - case 1: - { - ptr = iFieldAdvanced; - tptr = iTitlesAdvanced; - compulsptr = iCompulsoryAdvanced; - break; - } - case 2: - { - ptr = iFieldL2; - tptr = iTitlesL2; - compulsptr = iCompulsoryL2; - break; - } - default: - { - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - return; // just to suppress warnings about ptr's - // beeing used uninitialised - } - } - - - - ptr += itemnum; - tptr += itemnum; - compulsptr += itemnum; - TInt topitem( iList->TopItemIndex() ); - - TApBearerType bearer = iApItem->BearerTypeL(); - if ( bearer == EApBearerTypeGPRS ) - { - TUint32 tint; - iApItem->ReadUint( EApGprsPdpType, tint ); - if ( tint == EIPv6 ) - { - if ( iLevel == 1 ) - { - if ( itemnum ) - { - ptr++; - tptr++; - compulsptr++; - } - } - } - } - else - { // others - if ( bearer == EApBearerTypeWLAN ) - { - // if we are in iL2Ipv4, AND - // EApIspIPNetMask and EApIspIPGateway fields are not added - // skip those items... - if ( !IsNetMaskAndGatewayVisibleL() ) - { - if ( *ptr == EApIspIPNetMask ) - { - ptr++; - tptr++; - compulsptr++; - } - if ( *ptr == EApIspIPGateway ) - { - ptr++; - tptr++; - compulsptr++; - } - } - if ( !IsAdhocChannelVisible() ) - { - if ( ( *ptr == EApWlanChannelId ) - || ( *ptr == EApProxyServerAddress ) ) - { - ptr++; - tptr++; - compulsptr++; - } - } - } - else - { - // CSD - if ( *ptr == EApIspIPAddr ) - { - if ( !iL2Ipv4 ) - { - ptr++; - tptr++; - compulsptr++; - } - } - } - } - - - switch ( *ptr ) - { - case EApIspPromptForLogin: - case EApWapSecurity: - case EApIspIfCallbackEnabled: - case EApIspEnableSWCompression: - case EApGprsHeaderCompression: - case EApIspUseLoginScript: - case EApGprsDisablePlainTextAuth: - case EApIspDisablePlainTextAuth: - case EApWapWspOption: - case EApIspIfCallbackType: - case EApGprsPdpType: - case EApWlanNetworkMode: - case EApWlanScanSSID: - { // type 4 setting item with two available values - TBool changed( ETrue ); - if ( aQuick ) - { - InvertSettingsL( *ptr ); - } - else - { - changed = ShowPopupSettingPageL( *ptr ); - } - if ( changed ) - { - if ( *ptr == EApGprsPdpType ) - { - HandleListboxDataChangeL( EFalse ); - } - UpdateOnOffListBoxItemL( *ptr, *tptr, itemnum, *compulsptr ); - if ( *ptr == EApWlanNetworkMode ) - { - UpdateOnOffListBoxItemL( *( ptr+1 ), *( tptr+1 ), - itemnum+1, - *( compulsptr + 1 ) ); - if ( (itemnum+1) <= iList->BottomItemIndex() ) - { - iList->DrawItem( itemnum+1 ); - } - } - } - break; - } - case EApIspDefaultTelNumber: - case EApIspIfCallbackInfo: - { // type 1, Phone number editor - ShowPopupPhoneNumSettingPageL( *ptr ); - UpdateTextualListBoxItemL( *ptr, *tptr, itemnum, *compulsptr ); - break; - } - case EApWapGatewayAddress: - case EApIspIPAddr: - case EApIspIPNetMask: - case EApWlanIpNetMask: - case EApIspIPGateway: - case EApWlanIpGateway: - case EApGprsIPNameServer1: - case EApIspIPNameServer1: - case EApGprsIPNameServer2: - case EApIspIPNameServer2: - {// above ones are type 1, IP Address editors! - ShowPopupIpAddrSettingPageL( *ptr ); - UpdateTextualListBoxItemL( *ptr, *tptr, itemnum, *compulsptr ); - if ( *ptr == EApWapGatewayAddress ) - { - HandleListStructureChangeL(); - HandleListboxDataChangeL( EFalse ); - } - if ( *ptr == EApIspIPAddr ) - { - HandleListboxDataChangeL( EFalse ); - } - break; - } - case EApWapAccessPointName: - case EApGprsAccessPointName: - case EApIspLoginName: - case EApIspIfAuthName: - case EApIspLoginScript: - case EApWapStartPage: - case EApIspInitString: - case EApProxyServerAddress: - case EApProxyPortNumber: - { // type 1, Text setting item - if ( ShowPopupTextSettingPageL( *ptr ) ) - { - UpdateTextualListBoxItemL( *ptr, *tptr, itemnum, *compulsptr ); - if ( *ptr == EApWapAccessPointName ) - { - iTitlePane->SetTextL( iApItem->ConnectionName() ); - } - } - break; - } - case EApIspLoginPass: - case EApIspIfAuthPass: - - { // re-confirm, secreted, etc, - ShowPopupPasswordPageL( *ptr ); - UpdateTextualListBoxItemL( *ptr, *tptr, itemnum, *compulsptr ); - break; - } - case EApWapCurrentBearer: - case EApIspBearerCallTypeIsdn: // used for data call type - case EApIspBearerSpeed: - case EApWlanChannelId: - { // type 2, Pop-up setting item - if ( ShowPopupSettingPageL( *ptr ) ) - { - if ( *ptr == EApWapCurrentBearer ) - { - // if ==, the whole list needs to be updated ! - SetBearerTypeL( iApItem->BearerTypeL() ); - LimitSpeed(); - HandleListboxDataChangeL( EFalse ); - iList->SetTopItemIndex( topitem ); - iList->DrawNow(); - } - else - { - if ( *ptr == EApIspBearerCallTypeIsdn ) - { // first limit the speed if neccessary - LimitSpeed(); - // need to redraw EApIspBearerSpeed, too - // because it is possible that it had been changed - // to keep constrains simply update next field, - // too, 'cause they are next to each other... - UpdateOnOffListBoxItemL( *( ptr+1 ), *( tptr+1 ), - itemnum+1, - *( compulsptr + 1 ) ); - iList->DrawItem( itemnum+1 ); - } - UpdateOnOffListBoxItemL( *ptr, *tptr, - itemnum, *compulsptr ); - } - } - break; - } - case EApWlanSecurityMode: - { // type 2, Pop-up setting item - if ( ShowPopupSettingPageL( *ptr ) ) - { - // security mode has changed, re-create security settings! - UpdateOnOffListBoxItemL( *ptr, *tptr, - itemnum, *compulsptr ); - iHandler->iModel->UpdateSecurityModeL( *iApItem ); - } - break; - } - case EApIP6DNSAddrFromServer: - { - // if GPRS, PDP type Ipv4, DNS data query - // if GPRS, PDP type Ipv6, type 2, Pop-up setting item - TUint32 ival(0); - iApItem->ReadUint( EApGprsPdpType, ival ); - TBool changed( EFalse ); - if ( iApItem->BearerTypeL() == EApBearerTypeGPRS ) - { - if ( ival == EIPv6 ) - { - // GPRS, PDP type Ipv6, DNS pop-up setting item - changed = ShowPopupSettingPageL( *ptr ); - } - else - { - // GPRS, PDP type Ipv4, DNS data query - changed = GetNameServersL( EFalse ); - } - } - else - { // CSD/HSCSD - if ( iL2Ipv4 ) - { - changed = GetNameServersL( EFalse ); - } - else - { - changed = ShowPopupSettingPageL( *ptr ); - } - } - if ( changed ) - { - UpdateOnOffListBoxItemL( *ptr, *tptr, itemnum, *compulsptr ); - } - break; - } - case EApNetworkName: - { - ChangeNetworkGroupL(); - UpdateTextualListBoxItemL( *ptr, *tptr, itemnum, *compulsptr ); - break; - } - case EApIpv4Settings: - case EApIpv6Settings: - { - iL2Ipv4 = ( *ptr == EApIpv4Settings ); - if ( iLevel ) - { - // enter Ipv4 or Ipv6 settings - if ( iL2Ipv4 ) - { - // save current state so we can roll back to it - // if needed, e.g. if user fills but discards values... - if (!iBackupApItem ) - { - iBackupApItem = CApAccessPointItem::NewLC(); - CleanupStack::Pop(); // member var - } - iBackupApItem->CopyFromL( *iApItem ); - } - iLevel++; - HandleListStructureChangeL(); - iOldIndex = iList->CurrentItemIndex(); - iOldTopIndex = iList->TopItemIndex(); - iList->SetCurrentItemIndex( 0 ); - HandleListboxDataChangeL( EFalse ); - itemnum = 0; - } - break; - } - case EApWlanNetworkName: - { - if ( IsWlanSupported() ) - { - // Temporarily use plain text editor to input - // network name... - ChangeWlanNetworkNameL(); - // as it sets connection mode and security mode, - // we must update the full list... - HandleListboxDataChangeL( EFalse ); - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - case EApWlanSecuritySettings: - { - if ( IsWlanSupported() ) - { - iSecSettingsExitReason = ChangeWlanSecuritySettingsL(); - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } -/* - case EApWlanChannelId: - { - breaaak; - } -*/ - default: - { - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - break; - } - } - SelectItem( itemnum ); - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::DoChangeSettingsL") - } - - - - -//---------------------------------------------------------- -// CApSettingsDlg::GetSpeedForSelection -//---------------------------------------------------------- -// -TApCallSpeed CApSettingsDlg::GetBearerSpeedForSelection( TInt aCurrvalue ) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::GetBearerSpeedForSelection") - - TApCallSpeed sp( KSpeed9600 ); - - - TUint32 tval( 0 ); - iApItem->ReadUint( EApIspBearerCallTypeIsdn, tval ); - - const TInt* actSpeeds = NULL; - TBool isWcdma = - FeatureManager::FeatureSupported( KFeatureIdProtocolWcdma ); - - switch ( tval ) - { - case ECallTypeAnalogue: - { // CSD/HSCSD, Analogue - switch ( iBearerType ) - { - case EApBearerTypeCSD: - { - actSpeeds = isWcdma ? KCsdAnalogueWcdma : KCsdAnalogue; - break; - } - case EApBearerTypeHSCSD: - { - actSpeeds = KHcsdAnalogue; - break; - } - default: - { - // this can only mean programmer error as no other - // bearer type is supperted with speed settings - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - break; - } - } - break; - } - case ECallTypeISDNv110: - { - switch ( iBearerType ) - { - case EApBearerTypeCSD: - { - actSpeeds = isWcdma ? KCsdIsdn110Wcdma : KCsdIsdn110; - break; - } - case EApBearerTypeHSCSD: - { - actSpeeds = KHcsdIsdn110; - break; - } - default: - { - // this can only mean programmer error as no other - // bearer type is supperted with speed settings - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - break; - } - } - break; - } - case ECallTypeISDNv120: - { - switch ( iBearerType ) - { - case EApBearerTypeCSD: - { - actSpeeds = isWcdma ? KCsdIsdn120Wcdma : KCsdIsdn120; - break; - } - case EApBearerTypeHSCSD: - { - actSpeeds = KHcsdIsdn120; - break; - } - default: - { - // this can only mean programmer error as no other - // bearer type is supperted with speed settings - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - break; - } - } - break; - } - default: - { - // this can only mean programmer error as no other - // bearer type is supperted with speed settings - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - break; - } - } - - sp = (TApCallSpeed) *(actSpeeds + aCurrvalue); - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::GetBearerSpeedForSelection") - return sp; - } - - - -//---------------------------------------------------------- -// CApSettingsDlg::GetCurrIndexFromBearerSpeed -//---------------------------------------------------------- -// -TInt CApSettingsDlg::GetCurrIndexFromBearerSpeed( ) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::GetCurrIndexFromBearerSpeed") - - TUint32 tval( 0 ); - TUint32 bval( 0 ); - TInt retval( 0 ); - - iApItem->ReadUint( EApIspBearerSpeed, tval ); - iApItem->ReadUint( EApIspBearerCallTypeIsdn, bval ); - - TBool isWcdma = - FeatureManager::FeatureSupported( KFeatureIdProtocolWcdma ); - - const TInt* actSpeeds = NULL; - - switch ( bval ) - { - case ECallTypeAnalogue: - { // CSD/HSCSD, Analogue - switch ( iBearerType ) - { - case EApBearerTypeCSD: - { - actSpeeds = isWcdma ? KCsdAnalogueWcdma : KCsdAnalogue; - break; - } - case EApBearerTypeHSCSD: - { - actSpeeds = KHcsdAnalogue; - break; - } - default: - { - // this can only mean programmer error as no other - // bearer type is supperted with speed settings - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - break; - } - } - break; - } - case ECallTypeISDNv110: - { - switch ( iBearerType ) - { - case EApBearerTypeCSD: - { - actSpeeds = isWcdma ? KCsdIsdn110Wcdma : KCsdIsdn110; - break; - } - case EApBearerTypeHSCSD: - { - actSpeeds = KHcsdIsdn110; - break; - } - default: - { - // this can only mean programmer error as no other - // bearer type is supperted with speed settings - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - break; - } - } - break; - } - case ECallTypeISDNv120: - { - switch ( iBearerType ) - { - case EApBearerTypeCSD: - { - actSpeeds = isWcdma ? KCsdIsdn120Wcdma : KCsdIsdn120; - break; - } - case EApBearerTypeHSCSD: - { - actSpeeds = KHcsdIsdn120; - break; - } - default: - { - // this can only mean programmer error as no other - // bearer type is supperted with speed settings - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - break; - } - } - break; - } - default: - { - // this can only mean programmer error as no other - // bearer type is supperted with speed settings - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - break; - } - } - - if( actSpeeds ) - { - retval = 0; - while ( ( *( actSpeeds + retval + 1) != KEndOfArray ) - && ( *( actSpeeds + retval) < ( TInt )tval ) - && ( *( actSpeeds + retval + 1) <= ( TInt )tval ) ) - { - ++retval; - } - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::GetCurrIndexFromBearerSpeed") - return retval; - } - - -//---------------------------------------------------------- -// CApSettingsDlg::ReplaceNonPrintingCharactersLC -//---------------------------------------------------------- -// -HBufC* CApSettingsDlg::ReplaceWhiteSpaceCharactersLC( const TDesC& aInText ) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::ReplaceWhiteSpaceCharactersLC") - - TInt size = aInText.Length(); - HBufC* aOutText = HBufC::NewLC( size ); - - TPtr ptr = aOutText->Des(); - - for ( TInt ii=0; iiiModel->EikEnv()->AllocReadResourceLC - ( - R_APUI_VIEW_NETWORK_GROUP - ); - - // needs this Dummy array to pass it to CAknSettingPage's constructor... - CDesCArrayFlat* aItemArray = new ( ELeave ) CDesCArrayFlat( 1 ); - CleanupStack::PushL( aItemArray ); - TUint32 prefUid( 0 ); - TInt currsel( -1 ); - iApItem->ReadUint( EApNetworkID, prefUid ); - - TInt prefInt( prefUid ); - CApNetSelPopupList* dlg = - CApNetSelPopupList::NewL( *iDataModel, *iHandler, currsel, - prefInt, *iEventStore, - aItemArray, ETrue ); - - CleanupStack::PushL( dlg ); - TPtrC ptr( titlebuf->Des() ); - dlg->SetSettingTextL( ptr ); - // dlg must be Pop-ed because ExecuteLD starts with PushL()... - CleanupStack::Pop(); - if ( dlg->ExecuteLD( CAknSettingPage::EUpdateWhenChanged ) ) - { - // update value in iApItem - // get networkitem and add it to item... - iApItem->WriteUint( EApNetworkID, prefInt ); - // update network data according to new ID - iDataModel->DataHandler()->ReadNetworkPartL( *iApItem ); - } - CleanupStack::PopAndDestroy( aItemArray ); // aItemArray - CleanupStack::PopAndDestroy( titlebuf ); // titlebuf - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::ChangeNetworkGroupL") - } - - - - -//---------------------------------------------------------- -// CApSettingsDlg::IsHSCSDEnabledL -//---------------------------------------------------------- -// -TInt CApSettingsDlg::IsHSCSDEnabledL() - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::IsHSCSDEnabledL") - - TInt EnableHSCSD( ETrue ); - -/* - // Connecting and initialization: - TInt err( KErrNone ); - CRepository* repository; - TRAP( err, repository = CRepository::NewL( KGeneralSettingsUid ) ); -// repository->Get( KGSHSCSDAccessPoints, EnableHSCSD ); - delete repository; -*/ - -#ifdef __TEST_NO_HSCSD - EnableHSCSD = EFalse; -#endif -#ifdef __TEST_HSCSD_SUPPORT - EnableHSCSD = ETrue; -#endif // __TEST_HSCSD_SUPPORT - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::IsHSCSDEnabledL") - return EnableHSCSD; - } - - - - - - - -//---------------------------------------------------------- -// CApSettingsDlg::GetCSDSettingArrays -//---------------------------------------------------------- -// -void CApSettingsDlg::GetCSDSettingArrays( TInt variant ) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::GetCSDSettingArrays") - - // If IPv6 support requested, is the only place where L2 level needed, - // so it is the only place when it is variated... - if ( iReqIpvType & EIPv6 ) - { - if ( iL2Ipv4 ) - { - iFieldL2 = - (TApMember*) &Fields_CSD_L2_IPv4[KApMember][0]; - iFieldCountL2 = - sizeof( Fields_CSD_L2_IPv4[KApMember] )/sizeof( TApMember ); - iTitlesL2 = - MUTABLE_CAST( TInt*, - &Fields_CSD_L2_IPv4[KResourceID][0] ); - iCompulsoryL2 = - MUTABLE_CAST( TInt*, - &Fields_CSD_L2_IPv4[KCompulsory][0] ); - } - else - { - iFieldL2 = - (TApMember*) &Fields_CSD_L2_IPv6[KApMember][0]; - iFieldCountL2 = - sizeof( Fields_CSD_L2_IPv6[KApMember] )/sizeof( TApMember ); - iTitlesL2 = - MUTABLE_CAST( TInt*, - &Fields_CSD_L2_IPv6[KResourceID][0] ); - iCompulsoryL2 = - MUTABLE_CAST( TInt*, - &Fields_CSD_L2_IPv6[KCompulsory][0] ); - } - } - - - - if ( variant & KWSPSettingsVisible ) - { - if ( iReqIpvType & EIPv6 ) - { - iField = (TApMember*) &Fields_CSD_WSP_IPv6[KApMember][0]; - iFieldCount = - sizeof( Fields_CSD_WSP_IPv6[KApMember] )/sizeof( TApMember ); - - iFieldAdvanced = - (TApMember*) &Fields_CSD_Advanced_WSP_IPv6[KApMember][0]; - iAdvancedFieldCount = - sizeof( Fields_CSD_Advanced_WSP_IPv6[KApMember] ) - / sizeof( TApMember ); - - iTitles = - MUTABLE_CAST( TInt*, &Fields_CSD_WSP_IPv6[KResourceID][0] ); - iTitlesAdvanced = - MUTABLE_CAST( TInt*, - &Fields_CSD_Advanced_WSP_IPv6[KResourceID][0] ); - - iCompulsory = - MUTABLE_CAST( TInt*, - &Fields_CSD_WSP_IPv6[KCompulsory][0] ); - iCompulsoryAdvanced = - MUTABLE_CAST( TInt*, - &Fields_CSD_Advanced_WSP_IPv6[KCompulsory][0] ); - - } - else - { - iField = (TApMember*) &Fields_CSD_WSP[KApMember][0]; - iFieldCount = - sizeof( Fields_CSD_WSP[KApMember] )/sizeof( TApMember ); - - iFieldAdvanced = - (TApMember*) &Fields_CSD_Advanced_WSP[KApMember][0]; - iAdvancedFieldCount = - sizeof( Fields_CSD_Advanced_WSP[KApMember] ) - / sizeof( TApMember ); - - iTitles = - MUTABLE_CAST( TInt*, &Fields_CSD_WSP[KResourceID][0] ); - iTitlesAdvanced = - MUTABLE_CAST( TInt*, - &Fields_CSD_Advanced_WSP[KResourceID][0] ); - - iCompulsory = - MUTABLE_CAST( TInt*, &Fields_CSD_WSP[KCompulsory][0] ); - iCompulsoryAdvanced = - MUTABLE_CAST( TInt*, - &Fields_CSD_Advanced_WSP[KCompulsory][0] ); - } - } - else - { - if ( iReqIpvType & EIPv6 ) - { - iField = (TApMember*) &Fields_CSD_IPv6[KApMember][0]; - iFieldCount = - sizeof( Fields_CSD_IPv6[KApMember] )/sizeof( TApMember ); - - iFieldAdvanced = - (TApMember*) &Fields_CSD_Advanced_IPv6[KApMember][0]; - iAdvancedFieldCount = - sizeof( Fields_CSD_Advanced_IPv6[KApMember] ) - / sizeof( TApMember ); - - iTitles = - MUTABLE_CAST( TInt*, - &Fields_CSD_IPv6[KResourceID][0] ); - iTitlesAdvanced = - MUTABLE_CAST( TInt*, - &Fields_CSD_Advanced_IPv6[KResourceID][0] ); - - iCompulsory = - MUTABLE_CAST( TInt*, - &Fields_CSD_IPv6[KCompulsory][0] ); - iCompulsoryAdvanced = - MUTABLE_CAST( TInt*, - &Fields_CSD_Advanced_IPv6[KCompulsory][0] ); - } - else - { - iField = (TApMember*) &Fields_CSD[KApMember][0]; - iFieldCount = sizeof( Fields_CSD[KApMember] )/sizeof( TApMember ); - - iFieldAdvanced = (TApMember*) &Fields_CSD_Advanced[KApMember][0]; - iAdvancedFieldCount = - sizeof( Fields_CSD_Advanced[KApMember] )/sizeof( TApMember ); - - iTitles = MUTABLE_CAST( TInt*, &Fields_CSD[KResourceID][0] ); - iTitlesAdvanced = - MUTABLE_CAST( TInt*, &Fields_CSD_Advanced[KResourceID][0] ); - - iCompulsory = MUTABLE_CAST( TInt*, &Fields_CSD[KCompulsory][0] ); - iCompulsoryAdvanced = - MUTABLE_CAST( TInt*, &Fields_CSD_Advanced[KCompulsory][0] ); - } - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::GetCSDSettingArrays") - } - - - -//---------------------------------------------------------- -// CApSettingsDlg::GetGPRSSettingArrays -//---------------------------------------------------------- -// -void CApSettingsDlg::GetGPRSSettingArrays( TInt variant ) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::GetGPRSSettingArrays") - - if ( variant & KWSPSettingsVisible ) - { - if ( iReqIpvType & EIPv6 ) - { - iField = ( TApMember* ) &Fields_GPRS_WSP_IPv6[ KApMember ][0]; - iFieldCount = sizeof( Fields_GPRS_WSP_IPv6[0] ) - / sizeof( TApMember ); - iFieldAdvanced = - ( TApMember* ) &Fields_GPRS_Advanced_WSP_IPv6[ KApMember ][0]; - iAdvancedFieldCount = - sizeof( Fields_GPRS_Advanced_WSP_IPv6[ KApMember ]) - / sizeof( TApMember ); - iTitles = - MUTABLE_CAST( TInt*, &Fields_GPRS_WSP_IPv6[ KResourceID ][0] ); - iTitlesAdvanced = - MUTABLE_CAST( - TInt*, - &Fields_GPRS_Advanced_WSP_IPv6[ KResourceID ][0] ); - iCompulsory = - MUTABLE_CAST( TInt*, &Fields_GPRS_WSP_IPv6[ KCompulsory ][0] ); - iCompulsoryAdvanced = - MUTABLE_CAST( - TInt*, - &Fields_GPRS_Advanced_WSP_IPv6[ KCompulsory ][0] ); - } - else - { - iField = ( TApMember* ) &Fields_GPRS_WSP[ KApMember ][0]; - iFieldCount = sizeof( Fields_GPRS_WSP[0] )/sizeof( TApMember ); - iFieldAdvanced = - ( TApMember* ) &Fields_GPRS_Advanced_WSP[ KApMember ][0]; - iAdvancedFieldCount = - sizeof( Fields_GPRS_Advanced_WSP[ KApMember ]) - / sizeof( TApMember ); - iTitles = - MUTABLE_CAST( TInt*, &Fields_GPRS_WSP[ KResourceID ][0] ); - iTitlesAdvanced = - MUTABLE_CAST( - TInt*, - &Fields_GPRS_Advanced_WSP[ KResourceID ][0] ); - iCompulsory = - MUTABLE_CAST( TInt*, &Fields_GPRS_WSP[ KCompulsory ][0] ); - iCompulsoryAdvanced = - MUTABLE_CAST( - TInt*, - &Fields_GPRS_Advanced_WSP[ KCompulsory ][0] ); - } - } - else - { - if ( iReqIpvType & EIPv6 ) - { - iField = ( TApMember* ) &Fields_GPRS_IPv6[ KApMember ][0]; - iFieldCount = sizeof( Fields_GPRS_IPv6[0] )/sizeof( TApMember ); - iFieldAdvanced = - ( TApMember* ) &Fields_GPRS_Advanced_IPv6[ KApMember ][0]; - iAdvancedFieldCount = - sizeof( Fields_GPRS_Advanced_IPv6[ KApMember ]) - / sizeof( TApMember ); - iTitles = - MUTABLE_CAST( TInt*, &Fields_GPRS_IPv6[ KResourceID ][0] ); - iTitlesAdvanced = - MUTABLE_CAST( TInt*, - &Fields_GPRS_Advanced_IPv6[ KResourceID ][0] ); - iCompulsory = - MUTABLE_CAST( TInt*, &Fields_GPRS_IPv6[ KCompulsory ][0] ); - iCompulsoryAdvanced = - MUTABLE_CAST( TInt*, - &Fields_GPRS_Advanced_IPv6[ KCompulsory ][0] ); - } - else - { - iField = ( TApMember* ) &Fields_GPRS[ KApMember ][0]; - iFieldCount = sizeof( Fields_GPRS[0] )/sizeof( TApMember ); - iFieldAdvanced = - ( TApMember* ) &Fields_GPRS_Advanced[ KApMember ][0]; - iAdvancedFieldCount = - sizeof( Fields_GPRS_Advanced[ KApMember ])/sizeof( TApMember ); - iTitles = - MUTABLE_CAST( TInt*, &Fields_GPRS[ KResourceID ][0] ); - iTitlesAdvanced = - MUTABLE_CAST( TInt*, &Fields_GPRS_Advanced[ KResourceID ][0] ); - iCompulsory = - MUTABLE_CAST( TInt*, &Fields_GPRS[ KCompulsory ][0] ); - iCompulsoryAdvanced = - MUTABLE_CAST( TInt*, &Fields_GPRS_Advanced[ KCompulsory ][0] ); - } - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::GetGPRSSettingArrays") - } - - - - -//---------------------------------------------------------- -// CApSettingsDlg::GetWLANSettingArraysL -//---------------------------------------------------------- -// -void CApSettingsDlg::GetWLANSettingArraysL( TInt /*aVariant*/ ) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::GetWLANSettingArraysL") - - if ( IsWlanSupported() ) - { - // If IPv6 support requested, is the only place where L2 level needed, - // so it is the only place when it is variated... - if ( iReqIpvType & EIPv6 ) - { - if ( iL2Ipv4 ) - { - iFieldL2 = - (TApMember*) &Fields_WLAN_L2_IPv4[KApMember][0]; - iFieldCountL2 = - sizeof( Fields_WLAN_L2_IPv4[KApMember] ) - / sizeof( TApMember ); - iTitlesL2 = - MUTABLE_CAST( TInt*, - &Fields_WLAN_L2_IPv4[KResourceID][0] ); - iCompulsoryL2 = - MUTABLE_CAST( TInt*, - &Fields_WLAN_L2_IPv4[KCompulsory][0] ); - } - else - { - iFieldL2 = - (TApMember*) &Fields_CSD_L2_IPv6[KApMember][0]; - iFieldCountL2 = - sizeof( Fields_CSD_L2_IPv6[KApMember] ) - / sizeof( TApMember ); - iTitlesL2 = - MUTABLE_CAST( TInt*, - &Fields_CSD_L2_IPv6[KResourceID][0] ); - iCompulsoryL2 = - MUTABLE_CAST( TInt*, - &Fields_CSD_L2_IPv6[KCompulsory][0] ); - } - } - - - if ( iReqIpvType & EIPv6 ) - { - iField = ( TApMember* ) &Fields_WLAN_IPv6[ KApMember ][0]; - iFieldCount = sizeof( Fields_WLAN_IPv6[0] )/sizeof( TApMember ); - iFieldAdvanced = - ( TApMember* ) &Fields_WLAN_Advanced_IPv6[ KApMember ][0]; - iAdvancedFieldCount = - sizeof( Fields_WLAN_Advanced_IPv6[ KApMember ]) - / sizeof( TApMember ); - iTitles = - MUTABLE_CAST( TInt*, &Fields_WLAN_IPv6[ KResourceID ][0] ); - iTitlesAdvanced = - MUTABLE_CAST( TInt*, - &Fields_WLAN_Advanced_IPv6[ KResourceID ][0] ); - iCompulsory = - MUTABLE_CAST( TInt*, &Fields_WLAN_IPv6[ KCompulsory ][0] ); - iCompulsoryAdvanced = - MUTABLE_CAST( TInt*, - &Fields_WLAN_Advanced_IPv6[ KCompulsory ][0] ); - } - else - { - iField = ( TApMember* ) &Fields_WLAN_IPv4[ KApMember ][0]; - iFieldCount = sizeof( Fields_WLAN_IPv4[0] )/sizeof( TApMember ); - iFieldAdvanced = - ( TApMember* ) &Fields_WLAN_Advanced_IPv4[ KApMember ][0]; - iAdvancedFieldCount = - sizeof( Fields_WLAN_Advanced_IPv4[ KApMember ]) - / sizeof( TApMember ); - iTitles = - MUTABLE_CAST( TInt*, &Fields_WLAN_IPv4[ KResourceID ][0] ); - iTitlesAdvanced = - MUTABLE_CAST( TInt*, - &Fields_WLAN_Advanced_IPv4[ KResourceID ][0] ); - iCompulsory = - MUTABLE_CAST( TInt*, &Fields_WLAN_IPv4[ KCompulsory ][0] ); - iCompulsoryAdvanced = - MUTABLE_CAST( TInt*, - &Fields_WLAN_Advanced_IPv4[ KCompulsory ][0] ); - } - } - else - { - User::Leave( KErrNotSupported ); - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::GetWLANSettingArraysL") - } - - - -//---------------------------------------------------------- -// CApSettingsDlg::GetNameServersL -//---------------------------------------------------------- -// -TInt CApSettingsDlg::GetNameServersL( TBool aIp6 ) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::GetNameServersL") - - TInt retval( 0 ); - - if ( (iReqIpvType & EIPv6) && aIp6 ) - { - retval = GetIpv6NameServerL(); - } - else - { - retval = GetIpv4NameServerL(); - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::GetNameServersL") - return retval; - } - - - - - - -//---------------------------------------------------------- -// CApSettingsDlg::AddMenuListBoxItemL -//---------------------------------------------------------- -// -void CApSettingsDlg::AddMenuListBoxItemL( CDesCArrayFlat& aItemArray, - TApMember /*aMember*/, TInt aRes, - TInt aCompulsory ) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::AddMenuListBoxItemL") - - // Define a heap descriptor to hold all the item text - // HBufC is non-modifiable - HBufC* title = iEikonEnv->AllocReadResourceLC( aRes ); - - // Define a heap descriptor to hold all the item text - TInt length = title->Length() + 10; - if ( aCompulsory ) - { - length += 3; - } - HBufC* itemText = HBufC::NewLC( length ); - - - // Define a modifiable pointer descriptor to be able to append text to the - // non-modifiable heap descriptor itemText - TPtr itemTextPtr = itemText->Des(); - itemTextPtr.Format( KTxtMenuListItemFormat, title ); - if ( aCompulsory ) - { - itemTextPtr.Append( KTxtCompulsory ); - } - - aItemArray.AppendL( *itemText ); - CleanupStack::PopAndDestroy( itemText ); - CleanupStack::PopAndDestroy( title ); // title - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::AddMenuListBoxItemL") - } - - -//---------------------------------------------------------- -// CApSettingsDlg::AskQueryIfWcdmaL -//---------------------------------------------------------- -// -TBool CApSettingsDlg::AskQueryIfWcdmaL( TApMember aMember, TInt aCurrvalue ) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::AskQueryIfWcdmaL") - - TBool accept = ETrue ; - TBool isWcdma = - FeatureManager::FeatureSupported( KFeatureIdProtocolWcdma ); - if ( isWcdma && iBearerType == EApBearerTypeCSD && - aMember == EApIspBearerSpeed ) - { - TApCallSpeed newSpeed = GetBearerSpeedForSelection( aCurrvalue ); - switch ( newSpeed) - { - case KSpeed28800: - case KSpeed38400: - case KSpeed56000: - { - accept = AskQueryL( R_APUI_IAP_CONF_MAX_SPEED_WCDMA ); - break; - } - default: - { - break; - } - - } - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::AskQueryIfWcdmaL") - return accept; - } - - - -//---------------------------------------------------------- -// CApSettingsDlg::GetDomainNameServersTypeL -//---------------------------------------------------------- -// -TInt CApSettingsDlg::GetDomainNameServersTypeL() - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::GetDomainNameServersTypeL") - - TInt retval( 0 ); - // GPRS, net type 4: - // if IspNameServ <> 0.0.0.0 => User defined - // GPRS, net type 6: - // if IspIPv6NameServ <> 0.0.0.0 => User defined OR well-known - // CSD: - // if in IPv4settings: - // if IspNameServ <> 0.0.0.0 => User defined - // CSD: - // if in IPv6settings: - // if IspIPv6NameServ <> 0.0.0.0 => User defined OR well-known - - if ( iApItem->BearerTypeL() == EApBearerTypeGPRS ) - { - TUint32 ipnettype( 0 ); - iApItem->ReadUint( EApGprsPdpType, ipnettype ); - if ( ipnettype == EIPv6 ) - { - retval = GetIPv6DNSTypeL(); - } - else - { - retval = GetIPv4DNSTypeL(); - } - } - else - { // CSD - // IPv4settings: IspNameServ <> 0.0.0.0 => User defined - // IPv6settings: - // IspIPv6NameServ <> 0.0.0.0 => User defined OR well-known - if ( iL2Ipv4 ) - { // IPv4 settings - retval = GetIPv4DNSTypeL(); - } - else - { // IPv6 settings - retval = GetIPv6DNSTypeL(); - } - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::GetDomainNameServersTypeL") - return retval; - } - - - -//---------------------------------------------------------- -// CApSettingsDlg::GetIpv4NameServerL -//---------------------------------------------------------- -// -TInt CApSettingsDlg::GetIpv4NameServerL() - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::GetIpv4NameServerL") - - HBufC* dns1 = HBufC::NewLC( KModifiableTextLength ); - HBufC* dns2 = HBufC::NewLC( KModifiableTextLength ); - TPtr dns1ptr( dns1->Des() ); - TPtr dns2ptr( dns2->Des() ); - - TInt ResId( 0 ); - - iApItem->ReadTextL( EApGprsIPNameServer1, dns1ptr ); - iApItem->ReadTextL( EApGprsIPNameServer2, dns2ptr ); - ResId = R_DNSIP4_QUERY; - - TInetAddr dns1Addr; - TInetAddr dns2Addr; - dns1Addr.Input( dns1ptr ); - dns2Addr.Input( dns2ptr ); - - CAknMultiLineIpQueryDialog* ipquery = - CAknMultiLineIpQueryDialog::NewL( dns1Addr, dns2Addr ); - - TInt retval = ipquery->ExecuteLD( ResId ); - if ( retval ) - { - dns1Addr.Output( dns1ptr ); - dns2Addr.Output( dns2ptr ); - if ( dns1ptr.Compare( KDynIpAddress ) == 0 ) - { // move 2nd to first, set second to Dynamic... - iApItem->WriteTextL( EApGprsIPNameServer1, dns2ptr ); - iApItem->WriteTextL( EApGprsIPNameServer2, KDynIpAddress ); - } - else - { - iApItem->WriteTextL( EApGprsIPNameServer1, dns1ptr ); - iApItem->WriteTextL( EApGprsIPNameServer2, dns2ptr ); - } - } - CleanupStack::PopAndDestroy( 2 ); // dns1, dns2 - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::GetIpv4NameServerL") - return retval; - } - - -//---------------------------------------------------------- -// CApSettingsDlg::GetIpv6NameServerL -//---------------------------------------------------------- -// -TInt CApSettingsDlg::GetIpv6NameServerL() - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::GetIpv6NameServerL") - - HBufC* dns1 = HBufC::NewLC( KModifiableTextLength ); - HBufC* dns2 = HBufC::NewLC( KModifiableTextLength ); - TPtr dns1ptr( dns1->Des() ); - TPtr dns2ptr( dns2->Des() ); - - TInt ResId( 0 ); - - iApItem->ReadTextL( EApIP6NameServer1, dns1ptr ); - iApItem->ReadTextL( EApIP6NameServer2, dns2ptr ); - ResId = R_DNSIP6_QUERY; - - if ( ( dns1ptr.Compare( KKnownNameServer1 ) == 0 ) - && ( dns2ptr.Compare( KKnownNameServer2 ) == 0 ) ) - { // special value, well-known - // in this case 'dynamic' string must be offered so - // temp data must be changed to 'dynamic' - dns1ptr = KDynIpv6Address; - dns2ptr = KDynIpv6Address; - } - - CApMultiLineDataQueryDialog* ipquery = - CApMultiLineDataQueryDialog::NewL( dns1ptr, dns2ptr ); - - TInt retval = ipquery->ExecuteLD( ResId ); - if ( retval ) - { - TInetAddr dns1Addr; - TInetAddr dns2Addr; - TInt err1( KErrNone ); - TInt err2( KErrNone ); - if ( dns1ptr.Compare( KEmpty ) != 0 ) - { - err1 = dns1Addr.Input( dns1ptr ); - } - if ( dns2ptr.Compare( KEmpty ) != 0 ) - { - err2 = dns2Addr.Input( dns2ptr ); - } - if ( err1 || err2 ) - { - ShowNoteL( R_APUI_VIEW_SET_INFO_INVALID_IP ); - GetIpv6NameServerL(); - } - else - { - if ( - ( dns1ptr.Compare( KDynIpv6Address ) == 0 ) || - ( dns1ptr.Compare( KEmpty ) == 0 ) - ) - { // swap them: move 2nd to first, set second to Dynamic... - iApItem->WriteTextL( EApIP6NameServer1, dns2ptr ); - iApItem->WriteTextL( EApIP6NameServer2, KDynIpv6Address ); - } - else - { // keep the original order - iApItem->WriteTextL( EApIP6NameServer1, dns1ptr ); - iApItem->WriteTextL( EApIP6NameServer2, dns2ptr ); - } - } - } - CleanupStack::PopAndDestroy( 2 ); // dns1, dns2 - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::GetIpv6NameServerL") - return retval; - } - - - -//---------------------------------------------------------- -// CApSettingsDlg::GetIPv6DNSTypeL -//---------------------------------------------------------- -// -TInt CApSettingsDlg::GetIPv6DNSTypeL() - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::GetIPv6DNSTypeL") - - TInt retval( 0 ); - - HBufC* buf1 = HBufC::NewLC( KModifiableTextLength ); - TPtr16 ptr1( buf1->Des() ); - - HBufC* buf2 = HBufC::NewLC( KModifiableTextLength ); - TPtr16 ptr2( buf2->Des() ); - - // net type 6: if IspIPv6NameServ <> 0.0.0.0 - // => User defined OR well-known - iApItem->ReadTextL( EApIP6NameServer1, ptr1 ); - iApItem->ReadTextL( EApIP6NameServer2, ptr2 ); - - if ( ( ptr1.Compare( KKnownNameServer1 ) == 0 ) - && ( ptr2.Compare( KKnownNameServer2 ) == 0 ) ) - { // special value, well-known - retval = 1; - } - else - { - // dynamic, if 0:0:... - // OR EMPTY text... - if ( ( ( ptr1.Compare( KDynIpv6Address ) == 0 ) - || ( ptr1.Compare( KEmpty ) == 0 ) ) - &&( ( ptr2.Compare( KDynIpv6Address ) == 0 ) - ||( ptr2.Compare( KEmpty ) == 0 ) ) ) - { // dynamic, 0:0:... - // OR in case of CSD, HSCSD, it might be user defined, - // as for those bearers Dynamic is not possible... - TApBearerType bt = iApItem->BearerTypeL(); - switch (bt) - { - case EApBearerTypeCSD: - case EApBearerTypeHSCSD: - { - retval = 2; // consider it user defined - break; - } - default: - { - retval = 0; - break; - } - } - } - else - { // other value, user defined - retval = 2; - } - } - - CleanupStack::PopAndDestroy( 2 ); - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::GetIPv6DNSTypeL") - return retval; - } - - - - - -//---------------------------------------------------------- -// CApSettingsDlg::GetIPv4DNSTypeL -//---------------------------------------------------------- -// -TInt CApSettingsDlg::GetIPv4DNSTypeL() - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::GetIPv4DNSTypeL") - - TInt retval( 0 ); - - HBufC* buf1 = HBufC::NewLC( KModifiableTextLength ); - TPtr16 ptr1( buf1->Des() ); - - HBufC* buf2 = HBufC::NewLC( KModifiableTextLength ); - TPtr16 ptr2( buf2->Des() ); - - // net type 4: if IspNameServ <> 0.0.0.0 => User defined - iApItem->ReadTextL( EApGprsIPNameServer1, ptr1 ); - iApItem->ReadTextL( EApGprsIPNameServer2, ptr2 ); - - if ( ( ptr1.Compare( KDynIpAddress ) == 0 ) - && ( ptr2.Compare( KDynIpAddress ) == 0 ) ) - { // dynamic, 0:0:... - retval = 0; - } - else - { // other value, user defined - retval = 2; - } - - CleanupStack::PopAndDestroy( 2 ); - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::GetIPv4DNSTypeL") - return retval; - } - - - - - -// --------------------------------------------------------- -// CApSettingsDlg::StripNonNumberLC -// --------------------------------------------------------- -// -HBufC* CApSettingsDlg::StripNonNumberLC( const TDesC16& aInText ) - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::StripNonNumberLC") - -// CLOG( ( EApItem, 0, _L( "-> CApSettingsDlg::StripNonNumberLC" ) ) ); - - TInt size = aInText.Length(); - HBufC* aOutText = HBufC::NewLC( size ); - TPtr ptr = aOutText->Des(); - - for ( TInt ii=0; ii* bearerlist = - new(ELeave) CArrayFixFlat(4); - CleanupStack::PushL( bearerlist ); - - bearerlist->AppendL( EApBearerTypeGPRS ); - - if ( IsWlanSupported() ) - { - bearerlist->AppendL( EApBearerTypeWLAN ); - } - - TBool isCsdSupported = - FeatureManager::FeatureSupported( KFeatureIdAppCsdSupport ); - if ( isCsdSupported ) - { - bearerlist->AppendL( EApBearerTypeCSD ); - } - if ( IsHSCSDEnabledL() && isCsdSupported ) - { - bearerlist->AppendL( EApBearerTypeHSCSD ); - } - - __ASSERT_DEBUG( ( aPos < bearerlist->Count() ), \ - Panic( EInvalidBearerType ) ); - __ASSERT_DEBUG( ( aPos >= 0 ), Panic( EInvalidBearerType ) ); - - aPos = Max( aPos, 0 ); - aPos = Min( aPos, ( bearerlist->Count() - 1 ) ); - - bearer = bearerlist->At( aPos ); - - CleanupStack::PopAndDestroy( bearerlist ); - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::BearerItemPos2BearerTypeL") - return bearer; - } - - - -//---------------------------------------------------------- -// CApSettingsDlg::ChangeWlanNetworkNameL -//---------------------------------------------------------- -// -void CApSettingsDlg::ChangeWlanNetworkNameL() - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::ChangeWlanNetworkNameL") - - // Implement WLAN network name change - TInt currvalue( 0 ); - CDesCArrayFlat* items = FillPopupSettingPageLC( EApWlanNetworkName, - currvalue ); - - TInt attr_resid( 0 ); - GetResId( EApWlanNetworkName, attr_resid ); - HBufC* titlebuf; - CAknRadioButtonSettingPage* dlg; - if ( attr_resid ) - { - titlebuf = iEikonEnv->AllocReadResourceLC( attr_resid ); - dlg = new ( ELeave )CAknRadioButtonSettingPage( - R_RADIO_BUTTON_SETTING_PAGE, - currvalue, items ); - // must push 'cause SetSettingTextL can leave... - CleanupStack::PushL( dlg ); - TPtrC ptr( titlebuf->Des() ); - dlg->SetSettingTextL( ptr ); - CleanupStack::Pop(); // dlg - } - else - { - dlg = new ( ELeave )CAknRadioButtonSettingPage( - R_RADIO_BUTTON_SETTING_PAGE, currvalue, items ); - } - if ( dlg->ExecuteLD( CAknSettingPage::EUpdateWhenAccepted ) ) - { - if ( !currvalue ) - {// user defined - QueryWlanNetworkNameL(); - } - else - { // scan for, select one! - CConnectionUiUtilities* connUiUtils = - CConnectionUiUtilities::NewL(); - CleanupStack::PushL( connUiUtils ); - - TWlanSsid ssid; - TWlanConnectionMode connmode; - TWlanConnectionSecurityMode secmode; - TBool ret = connUiUtils->SearchWLANNetwork( ssid, - connmode, - secmode ); - if ( ret ) - { - HBufC* tmp = HBufC::NewLC( KCommsDbSvrMaxFieldLength ); - TPtr16 tmpPtr16 = tmp->Des(); - CnvUtfConverter::ConvertToUnicodeFromUtf8( tmpPtr16, ssid); - - iApItem->WriteTextL( EApWlanNetworkName, *tmp ); - CleanupStack::PopAndDestroy( tmp ); - // now handle connmode & secmode settings - if ( connmode == EWlanConnectionModeInfrastructure ) - { - iApItem->WriteUint( EApWlanNetworkMode, EInfra ); - } - else - { - if ( connmode == EWlanConnectionModeAdhoc ) - { - iApItem->WriteUint( EApWlanNetworkMode, EAdhoc ); - } - else - { - User::Leave( KErrNotSupported ); - } - } - switch (secmode) - { - case EWlanConnectionSecurityOpen: - { - iApItem->WriteUint( EApWlanSecurityMode, EOpen ); - break; - } - case EWlanConnectionSecurityWep: - { - iApItem->WriteUint( EApWlanSecurityMode, EWep ); - break; - } - case EWlanConnectionSecurity802d1x: - { - iApItem->WriteUint( EApWlanSecurityMode, E802_1x ); - break; - } - case EWlanConnectionSecurityWpa: - { - iApItem->WriteUint( EApWlanSecurityMode, EWpa ); - break; - } - case EWlanConnectionSecurityWpaPsk: - { - iApItem->WriteUint( EApWlanSecurityMode, EWpa ); - break; - } - default: - { - break; - } - } - - } - CleanupStack::PopAndDestroy( connUiUtils ); - } - } - if ( attr_resid ) - { - // titlebuf, text title readed from resource... - CleanupStack::PopAndDestroy(); - } - // items, will also delete all elements in the array! - CleanupStack::PopAndDestroy( items ); - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::ChangeWlanNetworkNameL") - } - - -//---------------------------------------------------------- -// CApSettingsDlg::ChangeWlanSecuritySettings -//---------------------------------------------------------- -// -TInt CApSettingsDlg::ChangeWlanSecuritySettingsL() - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::ChangeWlanSecuritySettingsL") - - TInt retval(0); - TUint32 secmode( 0 ); - iApItem->ReadUint( EApWlanSecurityMode, secmode ); - - TBool need2changeid( EFalse ); - TUint32 origServiceId(0); - iApItem->ReadUint( EApIapServiceId, origServiceId ); - if ( iOriginalBearerType != iApItem->BearerTypeL() ) - { - need2changeid = ETrue; - iApItem->WriteUint( EApIapServiceId, 0 ); - } - - switch ( secmode ) - { - case EOpen: - { - ShowNoteL( R_APUI_VIEW_NO_SECURITY_SETTINGS ); - break; - } - case EWep: - { - retval = ChangeWepSecuritySettingsL(); - break; - } - case E802_1x: - { - retval = Change8021xSecuritySettingsL(); - break; - } - case EWpa: - case EWpa2: - { - retval = ChangeWpaSecuritySettingsL(); - break; - } - default: - { - // some weird error, repair it... - __ASSERT_DEBUG( EFalse, Panic( EInvalidBearerType ) ); - break; - } - } - if ( need2changeid ) - { - iApItem->WriteUint( EApIapServiceId, origServiceId ); - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::ChangeWlanSecuritySettingsL") - return retval; - } - - -//---------------------------------------------------------- -// CApSettingsDlg::ChangeWepSecuritySettingsL -//---------------------------------------------------------- -// -TInt CApSettingsDlg::ChangeWepSecuritySettingsL() - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::ChangeWepSecuritySettingsL<->") - - return iHandler->iModel->ChangeWepSettingsL( iApItem ); - } - - - -//---------------------------------------------------------- -// CApSettingsDlg::ChangeWpaSecuritySettingsL -//---------------------------------------------------------- -// -TInt CApSettingsDlg::ChangeWpaSecuritySettingsL() - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::ChangeWpaSecuritySettingsL<->") - - return iHandler->iModel->ChangeWpaSettingsL( iApItem ); - } - - -//---------------------------------------------------------- -// CApSettingsDlg::Change8021xSecuritySettingsL -//---------------------------------------------------------- -// -TInt CApSettingsDlg::Change8021xSecuritySettingsL() - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::Change8021xSecuritySettingsL<->") - - return iHandler->iModel->Change8021xSettingsL( iApItem ); - } - - - - -//---------------------------------------------------------- -// CApSettingsDlg::IsWlanSupported -//---------------------------------------------------------- -// -TBool CApSettingsDlg::IsWlanSupported() - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::IsWlanSupported") - - TBool retval = FeatureManager::FeatureSupported( KFeatureIdProtocolWlan ); -#ifdef __TEST_WLAN_SUPPORT - retval = ETrue; -#endif // __TEST_WLAN_SUPPORT - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::IsWlanSupported") - return retval; - } - - - -//---------------------------------------------------------- -// CApSettingsDlg::QueryWlanNetworkNameL -//---------------------------------------------------------- -// -TBool CApSettingsDlg::QueryWlanNetworkNameL() - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::QueryWlanNetworkNameL") - - TBool retval( EFalse ); - - HBufC* buff = HBufC::NewLC( KModifiableTextLength ); - TPtr16 ptr( buff->Des() ); - iApItem->ReadTextL( EApWlanNetworkName, ptr ); - - CAknQueryDialog* dlg = - CAknQueryDialog::NewL( ptr, CAknQueryDialog::ENoTone ); - - if ( dlg->ExecuteLD( R_APUI_WLAN_NAME_QUERY ) ) - { - iApItem->WriteTextL( EApWlanNetworkName, ptr ); - retval = ETrue; - } - CleanupStack::PopAndDestroy( buff ); - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::QueryWlanNetworkNameL") - return retval; - } - - -//---------------------------------------------------------- -// CApSettingsDlg::IsNetMaskAndGatewayVisible -//---------------------------------------------------------- -// -TBool CApSettingsDlg::IsNetMaskAndGatewayVisibleL() - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::IsNetMaskAndGatewayVisibleL") - - TBool retval(EFalse); - // display only if: - // Phone IP Addr. <> Automatic (0.0.0.0) - HBufC* tmpValue = HBufC::NewLC( KModifiableTextLength ); - TPtr ptr( tmpValue->Des() ); - iApItem->ReadTextL( EApIspIPAddr, ptr ); - if ( ( tmpValue->Compare( KDynIpAddress ) != 0 ) - && ( tmpValue->Compare( KEmptyText ) != 0 ) ) - { - retval = ETrue; - } - CleanupStack::PopAndDestroy( tmpValue ); - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::IsNetMaskAndGatewayVisibleL") - return retval; - } - - - -//---------------------------------------------------------- -// CApSettingsDlg::GetAdHocChannelL -//---------------------------------------------------------- -// -TUint32 CApSettingsDlg::GetAdHocChannelL() - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::GetAdHocChannelL") - - // Get real ad-hoc channel - // Default: KDefAdhocChannel - TInt channel( KDefAdhocChannel ); - TUint32 retval(0); - iApItem->ReadUint( EApWlanChannelId, retval ); - channel = TInt(retval); - if ( !channel ) - { - channel = KDefAdhocChannel; - } - - CAknNumberQueryDialog* dlg = - CAknNumberQueryDialog::NewL( channel, CAknQueryDialog::ENoTone ); - - if ( dlg->ExecuteLD( R_APUI_WLAN_ADHOC_CHANNEL_QUERY ) ) - { - retval = channel; - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::GetAdHocChannelL") - return retval; - } - - - -//---------------------------------------------------------- -// CApSettingsDlg::IsAdhocChannelVisible -//---------------------------------------------------------- -// -TBool CApSettingsDlg::IsAdhocChannelVisible() - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::IsAdhocChannelVisible") - - TBool retval(EFalse); - TUint32 netmode( 0 ); - iApItem->ReadUint( EApWlanNetworkMode, netmode ); - if ( netmode == EAdhoc ) - { - retval = ETrue; - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::IsAdhocChannelVisible") - return retval; - } - - - -//---------------------------------------------------------- -// CApSettingsDlg::HasSecuritySettingsFilledL -//---------------------------------------------------------- -// -TBool CApSettingsDlg::HasSecuritySettingsFilledL() - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::HasSecuritySettingsFilledL<->") - - return iDataModel->HasWlanSecSettingsFilledL( *iApItem ); - } - - - -//---------------------------------------------------------- -// CApSettingsDlg::LimitSecMode -//---------------------------------------------------------- -// -void CApSettingsDlg::LimitSecMode() - { - APSETUILOGGER_ENTERFN( ESettings,"Settings::LimitSecMode") - - TUint32 secmode( 0 ); - iApItem->ReadUint( EApWlanSecurityMode, secmode ); - switch ( secmode ) - { - case EOpen: - case EWep: - // nothing to do in this case - { - break; - } - case E802_1x: - case EWpa: - case EWpa2: - default: - { - iApItem->WriteUint( EApWlanSecurityMode, EOpen ); - break; - } - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::LimitSecMode") - } - - - - -// --------------------------------------------------------- -// CApSettingsDlg::CanSaveWlanCompulsoriesL( ) -// --------------------------------------------------------- -// -CApSettingsDlg::TSaveAction CApSettingsDlg::CanSaveWlanCompulsoriesL( - TApMember& aDataNeeded ) - { - TSaveAction retval( EApCanSave ); - - HBufC *sgd = HBufC::NewLC( KModifiableTextLength ); - TPtr16 ptr( sgd->Des() ); - - if ( (retval != EApShallGoBack) && (retval != EApMustDelete) - && IsNetMaskAndGatewayVisibleL() ) - { // now check compulsory fields - iApItem->ReadTextL( EApWlanIpNetMask, ptr ); - if ( ( ptr.Compare( KDynIpAddress ) == 0 ) - || ( ptr.Compare( KEmptyText ) == 0 ) ) - { - retval = EApShallGoBack; - aDataNeeded = EApWlanIpNetMask; - if ( AskQueryL( - R_APUI_VIEW_NETW_QUEST_IAP_INCOMPLETE_DELETE ) ) - { - retval = EApMustDelete; - } - } - else - { - iApItem->ReadTextL( EApIspIPGateway, ptr ); - if ( ( sgd->Compare( KDynIpAddress ) == 0 ) - || ( sgd->Compare( KEmptyText ) == 0 ) ) - { - retval = EApShallGoBack; - aDataNeeded = EApIspIPGateway; - if ( AskQueryL( - R_APUI_VIEW_NETW_QUEST_IAP_INCOMPLETE_DELETE ) - ) - { - retval = EApMustDelete; - } - } - } - } - CleanupStack::PopAndDestroy( sgd ); // sgd - - return retval; - } - - -// --------------------------------------------------------- -// CApSettingsDlg::RestoreIpv4SettingsL() -// --------------------------------------------------------- -// -void CApSettingsDlg::RestoreIpv4SettingsL() - { - HBufC* buf = HBufC::NewLC( KModifiableTextLength ); - TPtr ptr( buf->Des() ); - - iBackupApItem->ReadTextL( EApIspIPAddr, ptr ); - iApItem->WriteTextL( EApIspIPAddr, ptr ); - - iBackupApItem->ReadTextL( EApIspIPNetMask, ptr ); - iApItem->WriteTextL( EApIspIPNetMask, ptr ); - - iBackupApItem->ReadTextL( EApIspIPGateway, ptr ); - iApItem->WriteTextL( EApIspIPGateway, ptr ); - - iBackupApItem->ReadTextL( EApIspIPNameServer1, ptr ); - iApItem->WriteTextL( EApIspIPNameServer1, ptr ); - - iBackupApItem->ReadTextL( EApIspIPNameServer2, ptr ); - iApItem->WriteTextL( EApIspIPNameServer2, ptr ); - - CleanupStack::PopAndDestroy( buf ); - - } - - - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/src/ApSettingsModel.cpp --- a/apengine/apsettingshandlerui/src/ApSettingsModel.cpp Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1175 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implementation of CApSettingsModel. -* -*/ - - -// INCLUDE FILES -#include "APSettingsHandlerUIVariant.hrh" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "ApSettingsHandlerUI.hrh" - -#include "ApSettingsModel.h" -#include -#include "Apsettingsdeleteoperation.h" - -#include -#include - - -#include "ApNetworks.h" -#include "FeatureManagerWrapper.h" - -#include - -#include "ApSettingsHandlerLogger.h" - -//#define __TEST_PERFORMANCE - -// CONSTANTS - - - - -/** -* Estimated number of bytes in FFS for one writing operation. This amount -* is checked to be available before each transaction which places write-lock. -* Exact size is not known (because what happens in a transaction is unknown). -* A typical access point is estimated to be less than ~2000 bytes; -* so assuming the typical operation of adding one access point -* (with database transaction overhead and safety) is estimated -* to be 2000 bytes. This should be a safe guess. -*/ -LOCAL_C const TInt KEstimatedFfsUsage = 2000; - - - -// ================= MEMBER FUNCTIONS ======================= - -// --------------------------------------------------------- -// CApSettingsModel::NewL -// --------------------------------------------------------- -// -CApSettingsModel* CApSettingsModel::NewL( TInt aIspFilter, TInt aBearerFilter, - TInt aSortType, TInt aReqIpvType, - TVpnFilterType aVpnFilterType, - TInt aVariant, - TBool aIncludeEasyWlan, - TBool aNoEdit ) - { - APSETUILOGGER_ENTERFN( EModel,"Model::NewL") - CApSettingsModel* db = - new( ELeave ) CApSettingsModel( aIspFilter, aBearerFilter, - aSortType, aReqIpvType, aVariant, - aVpnFilterType, aIncludeEasyWlan, - aNoEdit ); - CleanupStack::PushL( db ); - db->ConstructL( NULL ); - CleanupStack::Pop(); // db - APSETUILOGGER_LEAVEFN( EModel,"Model::NewL") - return db; - } - - - -// --------------------------------------------------------- -// CApSettingsModel::NewL -// --------------------------------------------------------- -// -CApSettingsModel* CApSettingsModel::NewL( CActiveApDb& aDb, TInt aIspFilter, - TInt aBearerFilter, TInt aSortType, - TInt aReqIpvType, - TVpnFilterType aVpnFilterType, - TInt aVariant, - TBool aIncludeEasyWlan, - TBool aNoEdit ) - { - APSETUILOGGER_ENTERFN( EModel,"Model::NewL2") - CApSettingsModel* db = - new( ELeave ) CApSettingsModel( aIspFilter, aBearerFilter, - aSortType, aReqIpvType, aVariant, - aVpnFilterType, aIncludeEasyWlan, - aNoEdit ); - CleanupStack::PushL( db ); - db->ConstructL( &aDb ); - CleanupStack::Pop(); // db - APSETUILOGGER_LEAVEFN( EModel,"Model::NewL2") - return db; - } - - -/** -* Destructor. -*/ -CApSettingsModel::~CApSettingsModel( ) - { - APSETUILOGGER_ENTERFN( EModel,"~Model") - delete iFeatureManagerWrapper; - - delete iApData; - delete iUtils; - delete iVpnApEngine; - if ( iDbOwned ) - { - delete iDb; - } - if (iop) - { - delete iop; - } - - APSETUILOGGER_LEAVEFN( EModel,"~Model") - } - - -/** -* Constructor -*/ -CApSettingsModel::CApSettingsModel( TInt aIspFilter, TInt aBearerFilter, - TInt aSortType, TInt aReqIpvType, - TInt aVariant, - TVpnFilterType aVpnFilterType, - TBool aIncludeEasyWlan, - TBool aNoEdit ) - - { - APSETUILOGGER_ENTERFN( EModel,"Model") - - iWepUiExitReason = 0; - iParams.iIspFilter = aIspFilter; - iParams.iBearerFilter = aBearerFilter; - iParams.iSortType = aSortType; - iReqIpvType = aReqIpvType; - iApData = NULL; - iDb = NULL; - iUtils = NULL; - iDbOwned = ETrue; - iVpnFilterType = aVpnFilterType; - iVariant = aVariant; - iIncludeEasyWlan = aIncludeEasyWlan; - iNoEdit = aNoEdit; - iInRefresh = EFalse; - iNeedRefresh = EFalse; - APSETUILOGGER_LEAVEFN( EModel,"Model") - } - - - -// --------------------------------------------------------- -// CApSettingsModel::ConstructL -// --------------------------------------------------------- -// -void CApSettingsModel::ConstructL( CActiveApDb* aDb ) - { - APSETUILOGGER_ENTERFN( EModel,"Model::ConstructL") - if ( aDb ) - { - iDbOwned = EFalse; - iDb = aDb; - } - else - { - iDb = CActiveApDb::NewL( EDatabaseTypeIAP ); - iDbOwned = ETrue; - } - iApData = CApDataHandler::NewLC( *iDb->Database() ); - CleanupStack::Pop( iApData ); // as it is a member - iUtils = CApUtils::NewLC( *iDb->Database() ); - CleanupStack::Pop( iUtils ); // - iVpnApEngine = CVpnApEngine::NewLC( iDb->Database() ); - CleanupStack::Pop( iVpnApEngine ); // - - iFeatureManagerWrapper = CFeatureManagerWrapper::NewL(); - iHelpSupported = FeatureManager::FeatureSupported( KFeatureIdHelp ); - iProtectionSupported = FeatureManager::FeatureSupported( - KFeatureIdSettingsProtection ); - - APSETUILOGGER_LEAVEFN( EModel,"Model::ConstructL") - } - - - -// --------------------------------------------------------- -// CApSettingsModel::Database -// --------------------------------------------------------- -// -CActiveApDb* CApSettingsModel::Database() - { - APSETUILOGGER_ENTERFN( EModel,"Model::Database<->") - return iDb; - } - - - - -// --------------------------------------------------------- -// CApSettingsModel::AllListItemDataL -// --------------------------------------------------------- -// -TInt CApSettingsModel::AllListItemDataL( TBool& aFailedLocked, - CApListItemList& aList, - TInt aIspFilter, TInt aBearerFilter, - TInt aSortType, TInt aReqIpvType ) - { - APSETUILOGGER_ENTERFN( EModel,"Model::AllListItemDataL<->") - return AllListItemDataL( aFailedLocked, aList, aIspFilter, - aBearerFilter, aSortType, aReqIpvType, - iVpnFilterType, iIncludeEasyWlan ); - } - - - -// --------------------------------------------------------- -// CApSettingsModel::AllListItemDataL -// --------------------------------------------------------- -// -TInt CApSettingsModel::AllListItemDataL( - TBool& aFailedLocked, - CApListItemList& aList, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TInt aReqIpvType, - TVpnFilterType aVpnFilterType, - TBool aIncludeEasyWlan - ) - { - APSETUILOGGER_ENTERFN( EModel,"Model::AllListItemDataL2") - TInt retval( 0 ); - if (iInRefresh) - { - APSETUILOGGER_WRITE( EModel,"AllListItemData overrun->"); - iNeedRefresh = ETrue; - } - else - { - iInRefresh = ETrue; - aFailedLocked = EFalse; - CApSelect* apselect = CApSelect::NewLC( *iDb->Database(), aIspFilter, - aBearerFilter, aSortType, - aReqIpvType, - aVpnFilterType, - aIncludeEasyWlan ); - APSETUILOGGER_WRITE( EModel,"ApSelect::NewLC returned"); - - retval = apselect->AllListItemDataL( aList ); - - APSETUILOGGER_WRITE( EModel,"ApSelect::AllListItemDataL returned"); - - CleanupStack::PopAndDestroy( apselect ); // apselect - retval = aList.Count(); - - iInRefresh = EFalse; - } - if (iNeedRefresh && !iInRefresh) - { - APSETUILOGGER_WRITE( EModel,"add. refresh starts"); - retval = AllListItemDataL( aFailedLocked, aList, aIspFilter, - aBearerFilter, aSortType, aReqIpvType, - aVpnFilterType, aIncludeEasyWlan ); - iNeedRefresh = EFalse; - APSETUILOGGER_WRITE( EModel,"add. refresh ends"); - } - APSETUILOGGER_LEAVEFN( EModel,"Model::AllListItemDataL2") - return retval; - } - - - -// --------------------------------------------------------- -// CApSettingsModel::AllListItemDataL -// --------------------------------------------------------- -// -TInt CApSettingsModel::AllListItemDataL( TBool& aFailedLocked, - CApListItemList& aList ) - { - APSETUILOGGER_ENTERFN( EModel,"Model::AllListItemDataL ->") - return AllListItemDataL( aFailedLocked, aList, iParams.iIspFilter, - iParams.iBearerFilter, - iParams.iSortType, - iReqIpvType, iVpnFilterType, - iIncludeEasyWlan ); - } - - - -// --------------------------------------------------------- -// CApSettingsModel::AccessPointDataL -// --------------------------------------------------------- -// -void CApSettingsModel::AccessPointDataL( TUint32 aUid, - CApAccessPointItem& aApItem ) - { - APSETUILOGGER_ENTERFN( EModel,"Model::AccessPointDataL") - TTransactionResult ownTransaction = StartTransactionLC( /*aWrite*/EFalse, - /*aShowNote*/ETrue, - /*aRetry*/ETrue ); - if ( ownTransaction != EFailedWithLocked ) - { - iApData->AccessPointDataL( aUid, aApItem ); // adds normal ap - // Load wlan data, only loads if WLAN ap. - TRAPD( err, LoadWlanL( aApItem ) ); - if ( err != KErrUnknown) - { - User::LeaveIfError( err ); - } - - if ( ownTransaction == EOwnTransaction ) - { - TInt err = CommitTransaction(); - User::LeaveIfError( err ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - } - - APSETUILOGGER_LEAVEFN( EModel,"Model::AccessPointDataL") - } - - - -// --------------------------------------------------------- -// CApSettingsModel::UpdateAccessPointDataL -// --------------------------------------------------------- -// -TBool CApSettingsModel::UpdateAccessPointDataL( CApAccessPointItem& aApItem ) - { - APSETUILOGGER_ENTERFN( EModel,"Model::UpdateAccessPointDataL") - TBool nameChanged( EFalse ); -// It should be aWrite ETrue, but there is an error in Symbian stuff -// causing a memory leak -// TTransactionResult ownTransaction = StartTransactionLC( /*aWrite*/ETrue, - TTransactionResult ownTransaction = StartTransactionLC( /*aWrite*/EFalse, - /*aShowNote*/ETrue, - /*aRetry*/ETrue ); - if ( ownTransaction != EFailedWithLocked ) - { - TBool isnew(EFalse); - if ( aApItem.BearerTypeL() == EApBearerTypeWLAN ) - { // it is WLAN... - // check that there were no bearer-change, because if orig. bearer - // was NOT wlan, then we shouls consider it as a new record!!! - if ( iUtils->BearerTypeL( aApItem.WapUid() ) != EApBearerTypeWLAN ) - { - isnew = ETrue; - } - } - iApData->UpdateAccessPointDataL( aApItem, nameChanged ); - // write wlan data, only writes if WLAN ap. - WriteWlanL( aApItem, isnew ); - -#ifdef __WINS__ - ShowNoteL( R_APUI_VIEW_SAVED ); -#endif - if ( ownTransaction == EOwnTransaction ) - { - TInt err = CommitTransaction(); - User::LeaveIfError( err ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - } - - APSETUILOGGER_LEAVEFN( EModel,"Model::UpdateAccessPointDataL") - return nameChanged; - } - - - - -// --------------------------------------------------------- -// CApSettingsModel::DataHandler -// --------------------------------------------------------- -// -CApDataHandler* CApSettingsModel::DataHandler() - { - APSETUILOGGER_ENTERFN( EModel,"Model::DataHandler <->") - return iApData; - } - - - -// --------------------------------------------------------- -// CApSettingsModel::ApUtils -// --------------------------------------------------------- -// -CApUtils* CApSettingsModel::ApUtils() - { - APSETUILOGGER_ENTERFN( EModel,"Model::ApUtils <->") - return iUtils; - } - - -// --------------------------------------------------------- -// CApSettingsModel::SetParams -// --------------------------------------------------------- -// -void CApSettingsModel::SetParams( TApSettingsParams aParams ) - { - APSETUILOGGER_ENTERFN( EModel,"Model::SetParams <->") - iParams = aParams; - } - - -// --------------------------------------------------------- -// CApSettingsModel::Params -// --------------------------------------------------------- -// -TApSettingsParams CApSettingsModel::Params() - { - APSETUILOGGER_ENTERFN( EModel,"Model::Params <->") - return iParams; - } - - - -// --------------------------------------------------------- -// CApSettingsModel::VpnEngine -// --------------------------------------------------------- -// -CVpnApEngine* CApSettingsModel::VpnEngine() - { - APSETUILOGGER_ENTERFN( EModel,"Model::VpnEngine <->") - return iVpnApEngine; - } - - -// --------------------------------------------------------- -// CApSettingsModel::LaunchHelpL -// --------------------------------------------------------- -// -void CApSettingsModel::LaunchHelpL() - { -#ifdef __SERIES60_HELP - APSETUILOGGER_ENTERFN( EModel,"Model::LaunchHelpL") - HlpLauncher::LaunchHelpApplicationL( - EikEnv()->WsSession(), - EikEnv()->EikAppUi()->AppHelpContextL() ); - APSETUILOGGER_LEAVEFN( EModel,"Model::LaunchHelpL") -#endif // __SERIES60_HELP - } - - -// --------------------------------------------------------- -// CApSettingsModel::RemoveApL -// --------------------------------------------------------- -// -void CApSettingsModel::RemoveApL( TUint32 aUid ) - { - APSETUILOGGER_ENTERFN( EModel,"Model::RemoveApL") -// DELETE OPERATION STARTS HERE - TBuf sgd; - iUtils->NameL( aUid, sgd ); - HBufC* temp = StringLoader::LoadLC( R_APUI_VIEW_DELETING_AP, sgd ); - - APSETUILOGGER_WRITE( EModel,"Creating thread"); - - if (!iop) - { - iop = CApSettingsDeleteOperation::NewL( - KApWaitNote, R_APUI_VIEW_WAIT_NOTE, - aUid, *temp - ); - APSETUILOGGER_WRITE( EModel,"Thread created"); - } - else - { - if (iop->State() != CApSettingsDeleteOperation::EProcOffDialogOff ) - { - ShowNoteL( R_APUI_VIEW_TEXT_CANNOT_ACCESS_DB ); - User::Leave( KErrInUse ); - } - else - { - iop->SetUid( aUid ); - iop->SetNoteTextL( *temp ); - } - } - - TRAPD(err, iop->StartL() ); - - APSETUILOGGER_WRITE_FORMAT( EModel, "Thread StartL returned, code:%d", err); - - if ( err != KErrNone ) - { - User::Leave( err ); - } - - CleanupStack::PopAndDestroy( temp ); - APSETUILOGGER_LEAVEFN( EModel,"Model::RemoveApL") -// DELETE OPERATION ENDS HERE - - } - - - - -// --------------------------------------------------------- -// CApSettingsModel::StarTransactionLC -// --------------------------------------------------------- -// -TTransactionResult CApSettingsModel::StartTransactionLC( - TBool aWrite, TBool aShowNote, - TBool aRetry, TBool aLFFSChecking /* ETrue */ ) - { - APSETUILOGGER_ENTERFN( EModel,"Model::StartTransactionLC") - TTransactionResult retval( EOwnTransaction ); - - // Before attempting db modification, check if we would go below Critical - // Level in FFS (disk). The value used for checking is an estimate. - // Reading the db also allocates some bytes (transaction log), but - // this is not estimated and not checked, because it should be small - // enough, and would slow down operation. (Typical use is to read a lot - // and write much less.) - if ( aLFFSChecking && - aWrite && - FFSSpaceBelowCriticalLevelL - ( /*aShowErrorNote=*/EFalse, KEstimatedFfsUsage ) - ) - { - User::Leave( KErrDiskFull ); - } - - CCommsDatabase* aDb = iDb->Database(); - TInt err( KErrNone ); - if ( !aDb->InTransaction() ) - { - TInt retriesLeft( aRetry ? KRetryCount : 1 ); - err = aDb->BeginTransaction(); - while ( ( ( err == KErrLocked ) || ( err == KErrAccessDenied ) ) - && --retriesLeft ) - { - User::After( KRetryWait ); - err = aDb->BeginTransaction(); - if (aWrite ) - { - TRAP(err, GetWriteLockL() ); - } - } - if ( err && aShowNote ) - { - ShowNoteL( R_APUI_VIEW_TEXT_CANNOT_ACCESS_DB ); - } - switch ( err ) - { - case KErrNone: - { - CleanupStack::PushL( - TCleanupItem( RollbackTransactionOnLeave, aDb ) ); - break; - } - case KErrLocked: - case KErrAccessDenied: - { - retval = EFailedWithLocked; - break; - } - default: - { - User::LeaveIfError( err ); - break; - } - } - } - else - { - if ( aWrite ) - { - TRAP(err, GetWriteLockL() ); - } - if ( err && aShowNote ) - { - ShowNoteL( R_APUI_VIEW_TEXT_CANNOT_ACCESS_DB ); - } - if ( err != KErrLocked ) - { - User::LeaveIfError( err ); - } - if ( err ) - { - retval = EFailedWithLocked; - } - else - { - retval = EUsingAlreadyStarted; - } - } - APSETUILOGGER_LEAVEFN( EModel,"Model::StartTransactionLC") - return retval; - } - - -// --------------------------------------------------------- -// CApSettingsModel::GetWriteLockL -// --------------------------------------------------------- -// -void CApSettingsModel::GetWriteLockL( ) - { - APSETUILOGGER_ENTERFN( EModel,"Model::GetWriteLockL") - CCommsDbTableView* v = - iDb->Database()->OpenTableLC( TPtrC(WAP_ACCESS_POINT ) ); - TUint32 dummyUid( KApNoneUID ); - TInt err = v->InsertRecord( dummyUid ); - User::LeaveIfError( err ); - v->CancelRecordChanges(); - User::LeaveIfError( err ); - CleanupStack::PopAndDestroy( v ); - APSETUILOGGER_LEAVEFN( EModel,"Model::GetWriteLockL") - } - -// --------------------------------------------------------- -// CApSettingsModel::RollbackTransactionOnLeave -// --------------------------------------------------------- -// -void CApSettingsModel::RollbackTransactionOnLeave( TAny* aDb ) - { - APSETUILOGGER_ENTERFN( EModel,"Model::RollbackTransactionOnLeave") - CCommsDatabase* db = STATIC_CAST( CCommsDatabase*, aDb ); - db->RollbackTransaction(); - APSETUILOGGER_LEAVEFN( EModel,"Model::RollbackTransactionOnLeave") - } - - - -// --------------------------------------------------------- -// CApSettingsModel::CommitTransaction -// --------------------------------------------------------- -// -TInt CApSettingsModel::CommitTransaction() - { - APSETUILOGGER_ENTERFN( EModel,"Model::CommitTransaction") - TInt err = iDb->Database()->CommitTransaction(); - APSETUILOGGER_LEAVEFN( EModel,"Model::CommitTransaction") - return err; - } - - - -// --------------------------------------------------------- -// CApSettingsModel::FFSSpaceBelowCriticalLevelL -// --------------------------------------------------------- -// -TBool CApSettingsModel::FFSSpaceBelowCriticalLevelL - ( TBool aShowErrorNote, TInt aBytesToWrite /*=0*/ ) - { - APSETUILOGGER_ENTERFN( EModel,"Model::FFSSpaceBelowCriticalLevelL") - TBool ret( EFalse ); - if ( SysUtil::FFSSpaceBelowCriticalLevelL - ( &( EikEnv()->FsSession()), aBytesToWrite ) ) - { - ret = ETrue; - if ( aShowErrorNote ) - { - CErrorUI* errorUi = CErrorUI::NewLC( *EikEnv() ); - errorUi->ShowGlobalErrorNoteL( KErrDiskFull ); - CleanupStack::PopAndDestroy(); // errorUi - } - } - APSETUILOGGER_LEAVEFN( EModel,"Model::FFSSpaceBelowCriticalLevelL") - return ret; - } - - - - -// --------------------------------------------------------- -// CApSettingsModel::NetWorkListDataL -// --------------------------------------------------------- -// -TInt CApSettingsModel::NetWorkListDataL( TBool& aFailedLocked, - CApNetworkItemList& aList ) - { - APSETUILOGGER_ENTERFN( EModel,"Model::NetWorkListDataL") - TInt retval( KErrNone ); - aFailedLocked = EFalse; - TTransactionResult ownTransaction = StartTransactionLC( /*aWrite*/EFalse, - /*aShowNote*/EFalse, - /*aRetry*/ETrue ); - if ( ownTransaction != EFailedWithLocked ) - { - CApNetworks* apnet = CApNetworks::NewLC( *iDb->Database() ); - retval = apnet->AllListItemDataL( aList ); - CleanupStack::PopAndDestroy( apnet ); // apSelect - if ( ownTransaction == EOwnTransaction ) - { - TInt err = CommitTransaction(); - User::LeaveIfError( err ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - } - else - { - aFailedLocked = ETrue; - } - APSETUILOGGER_LEAVEFN( EModel,"Model::NetWorkListDataL") - return retval; - } - - - -// --------------------------------------------------------- -// CApSettingsModel::RequestedIPvType -// --------------------------------------------------------- -// -TInt CApSettingsModel::RequestedIPvType( ) - { - APSETUILOGGER_ENTERFN( EModel,"Model::RequestedIPvType<->") - return iReqIpvType; - } - - - - -// --------------------------------------------------------- -// CApSettingsModel::Need2DeleteSelect -// called when menu needs to be displayed -// --------------------------------------------------------- -// -TBool CApSettingsModel::Need2DeleteSelect( TInt aResourceId, TInt aCount ) - { - APSETUILOGGER_ENTERFN( EModel,"Model::Need2DeleteSelect") - TBool retval( EFalse ); - - if ( ( aCount == 0 ) - && - ( aResourceId == R_APSETTINGSUI_MENU_SELECT_NORMAL ) ) - { - retval = ETrue; - } - APSETUILOGGER_LEAVEFN( EModel,"Model::Need2DeleteSelect") - return retval; - } - - -// --------------------------------------------------------- -// CApSettingsModel::Need2DeleteOpen -// called when menu needs to be displayed -// --------------------------------------------------------- -// -TBool CApSettingsModel::Need2DeleteOpen( TInt aResourceId, TInt aCount, - TUint32 aUid, TBool aNeedsNone ) - { - APSETUILOGGER_ENTERFN( EModel,"Model::Need2DeleteOpen") - TBool retval( EFalse ); - TBool noItem( EFalse ); - TBool onlyItemIsNone( EFalse ); - TBool editOnlyVPN( EFalse ); - TBool noEdit( EFalse ); - - noItem = ( aCount == 0) && - ( ( aResourceId == R_APSETTINGSUI_MENU_NORMAL ) || - ( aResourceId == R_APSETTINGSUI_MENU_SELECT_NORMAL ) ); - - onlyItemIsNone = ( aNeedsNone ) && ( aUid == KApNoneUID ) - && ( ( aResourceId == R_APSETTINGSUI_MENU_SELECT_ONLY ) || - ( aResourceId == R_APSETTINGSUI_MENU_SELECT_NORMAL ) || - ( aResourceId == R_APSETTINGSUI_MENU_NORMAL ) ); - - editOnlyVPN = ( iVariant & KApUiEditOnlyVPNs ) - && ( ( aResourceId == R_APSETTINGSUI_SELECT_ONLY_MENUBAR ) || - ( aResourceId == R_APSETTINGSUI_SELECT_NORMAL_MENUBAR ) || - ( aResourceId == R_APSETTINGSUI_MENU_NORMAL ) ); - noEdit = ( iNoEdit ) - && ( ( aResourceId == R_APSETTINGSUI_MENU_SELECT_NORMAL ) || - ( aResourceId == R_APSETTINGSUI_MENU_NORMAL ) ); - - retval = noItem || onlyItemIsNone || editOnlyVPN || noEdit; - - APSETUILOGGER_LEAVEFN( EModel,"Model::Need2DeleteOpen") - return retval; - } - - -// --------------------------------------------------------- -// CApSettingsModel::Need2DeleteDeleteL -// called when menu needs to be displayed -// --------------------------------------------------------- -// -TBool CApSettingsModel::Need2DeleteDeleteL( TInt aResourceId, TInt aCount, - TUint32 aUid, TBool aNeedsNone ) - { - APSETUILOGGER_ENTERFN( EModel,"Model::Need2DeleteDeleteL") - TBool retval( EFalse ); - TBool noItem( EFalse ); - TBool onlyItemIsNone( EFalse ); - TBool editOnlyVPN( EFalse ); - TBool noEdit( EFalse ); - - noItem = ( aCount == 0) && - ( ( aResourceId == R_APSETTINGSUI_MENU_NORMAL ) || - ( aResourceId == R_APSETTINGSUI_MENU_SELECT_NORMAL ) ); - - onlyItemIsNone = ( aNeedsNone ) && ( aUid == KApNoneUID ) - && ( ( aResourceId == R_APSETTINGSUI_MENU_SELECT_ONLY ) || - ( aResourceId == R_APSETTINGSUI_MENU_SELECT_NORMAL ) || - ( aResourceId == R_APSETTINGSUI_MENU_NORMAL ) ); - - editOnlyVPN = ( iVariant & KApUiEditOnlyVPNs ) - && ( ( aResourceId == R_APSETTINGSUI_SELECT_ONLY_MENUBAR ) || - ( aResourceId == R_APSETTINGSUI_SELECT_NORMAL_MENUBAR ) || - ( aResourceId == R_APSETTINGSUI_MENU_NORMAL ) ); - - noEdit = ( iNoEdit ) - && ( ( aResourceId == R_APSETTINGSUI_MENU_SELECT_NORMAL ) || - ( aResourceId == R_APSETTINGSUI_MENU_NORMAL ) ); - - if ( editOnlyVPN ) - { - // check if current item is VPN... - if ( ( aCount != 0 ) && ( aUid != KApNoneUID ) ) - { - retval = ! iVpnApEngine->IsVpnApL( aUid ); - } - else - { - retval = ETrue; - } - } - else - { - if ( onlyItemIsNone || noItem ) - { - retval = ETrue; - } - } - if ( !retval ) - { - if (noEdit) - { - retval = ETrue; - } - } - APSETUILOGGER_LEAVEFN( EModel,"Model::Need2DeleteDeleteL") - return retval; - } - - -// --------------------------------------------------------- -// CApSettingsModel::Need2DeleteNewUseExisting -// called when menu needs to be displayed -// --------------------------------------------------------- -// -TBool CApSettingsModel::Need2DeleteNewUseExisting( - TInt aResourceId, - TInt aCount ) - { - APSETUILOGGER_ENTERFN( EModel,"Model::Need2DeleteNewUseExisting") - TBool noEdit( EFalse ); - TBool retval( EFalse ); - - if ( iProtectionSupported ) - { - if ( aResourceId == R_APSETTINGSUI_MENU_SELECT_NORMAL || - aResourceId == R_APSETTINGSUI_MENU_NORMAL ) - { - TRAP_IGNORE( retval = CApProtHandler::IsTableProtectedL( iDb->Database() )); - } - } - - if ( aCount == 0) - { - if ( ( aResourceId == R_APSETTINGSUI_MENU_NORMAL ) || - ( aResourceId == R_APSETTINGSUI_MENU_SELECT_NORMAL ) ) - { - retval = ETrue; - } - } - - noEdit = ( iNoEdit ) - && ( ( aResourceId == R_APSETTINGSUI_MENU_SELECT_NORMAL ) || - ( aResourceId == R_APSETTINGSUI_MENU_NORMAL ) ); - - if (noEdit) - { - retval = ETrue; - } - APSETUILOGGER_LEAVEFN( EModel,"Model::Need2DeleteNewUseExisting") - return retval; - } - - -// --------------------------------------------------------- -// CApSettingsModel::Need2DeleteNewL -// called when menu needs to be displayed -// --------------------------------------------------------- -// -TBool CApSettingsModel::Need2DeleteNewL( TInt aResourceId ) - { - APSETUILOGGER_ENTERFN( EModel,"Model::Need2DeleteNewL") - TBool noEdit( EFalse ); - TBool retval( EFalse ); - - if ( iProtectionSupported ) - { - if ( aResourceId == R_APSETTINGSUI_MENU_SELECT_NORMAL || - aResourceId == R_APSETTINGSUI_MENU_NORMAL ) - { - if ( CApProtHandler::IsTableProtectedL( iDb->Database() )) - { - retval = ETrue; - } - } - } - - if ( iVariant & KApUiEditOnlyVPNs ) - { - if ( ( aResourceId == R_APSETTINGSUI_MENU_SELECT_NORMAL ) || - ( aResourceId == R_APSETTINGSUI_MENU_NORMAL ) - ) - { - retval = ETrue; - } - } - - noEdit = ( iNoEdit ) - && ( ( aResourceId == R_APSETTINGSUI_MENU_SELECT_NORMAL ) || - ( aResourceId == R_APSETTINGSUI_MENU_NORMAL ) ); - - if (noEdit) - { - retval = ETrue; - } - APSETUILOGGER_LEAVEFN( EModel,"Model::Need2DeleteNewL") - return retval; - } - - - -// --------------------------------------------------------- -// CApSettingsModel::Need2DeleteHelp -// called when menu needs to be displayed -// --------------------------------------------------------- -// -TBool CApSettingsModel::Need2DeleteHelp( TInt aResourceId ) - { - APSETUILOGGER_ENTERFN( EModel,"Model::Need2DeleteHelp") - TBool retval( EFalse ); - - if ( !iHelpSupported ) - { - if ( aResourceId == R_APSETTINGSUI_MENU_NORMAL ) - { - retval = ETrue; - } - } - - APSETUILOGGER_LEAVEFN( EModel,"Model::Need2DeleteHelp") - return retval; - } - - - - - - - - - -// --------------------------------------------------------- -// CApSettingsModel::GetLinkedVpnAccessPointLC -// --------------------------------------------------------- -// -HBufC* CApSettingsModel::GetLinkedVpnAccessPointLC( TUint32 aUid ) - { - APSETUILOGGER_ENTERFN( EModel,"Model::GetLinkedVpnAccessPointLC") - HBufC* retval = HBufC::NewLC( KCommsDbSvrMaxFieldLength ); - - // Get iap for the above WAP, aUid - TUint32 homeiap = iUtils->IapIdFromWapIdL( aUid ); - - // now get ALL VPN_SERVICE entry ID where HOME_IAP == iap - // Select * from VPN_SERVICE where HOME_IAP == homeiap - CCommsDbTableView* t; - t = iDb->Database()->OpenViewMatchingUintLC( TPtrC(VPN_SERVICE), - TPtrC(VPN_SERVICE_IAP), - homeiap ); - TInt err = t->GotoFirstRecord(); - // if not found, no such, simply exit, no change in passed array - if ( err != KErrNotFound ) - { - User::LeaveIfError( err ); - TPtr sgd = retval->Des(); - t->ReadTextL( TPtrC(COMMDB_NAME), sgd ); - CleanupStack::PopAndDestroy( t );//t - } - else - { - CleanupStack::PopAndDestroy( 2, retval );// retval, t - retval = NULL; - } - - APSETUILOGGER_LEAVEFN( EModel,"Model::GetLinkedVpnAccessPointLC") - return retval; - } - - - -// --------------------------------------------------------- -// CApSettingsModel::EikEnv -// --------------------------------------------------------- -// -CEikonEnv* CApSettingsModel::EikEnv() - { - APSETUILOGGER_ENTERFN( EModel,"Model::EikEnv<->") - if ( !iEikEnv ) - { - iEikEnv = CEikonEnv::Static(); - } - return iEikEnv; - } - - - -// --------------------------------------------------------- -// CApSettingsModel::CreateFromDataL -// --------------------------------------------------------- -// -TUint32 CApSettingsModel::CreateFromDataL( CApAccessPointItem& aApItem ) - { - APSETUILOGGER_ENTERFN( EModel,"Model::CreateFromDataL") - TTransactionResult ownTransaction = StartTransactionLC( /*aWrite*/EFalse, - /*aShowNote*/ETrue, - /*aRetry*/ETrue ); - if ( ownTransaction != EFailedWithLocked ) - { - iApData->CreateFromDataL( aApItem ); // adds normal ap - // write wlan data, only writes if WLAN ap. - WriteWlanL( aApItem, ETrue ); - - if ( ownTransaction == EOwnTransaction ) - { - TInt err = CommitTransaction(); - User::LeaveIfError( err ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - } - - APSETUILOGGER_LEAVEFN( EModel,"Model::CreateFromDataL") - return aApItem.WapUid(); - } - - - - - -// --------------------------------------------------------- -// CApSettingsModel::ChangeWepSettingsL -// --------------------------------------------------------- -// -TInt CApSettingsModel::ChangeWepSettingsL( CApAccessPointItem* aApItem ) - { - APSETUILOGGER_ENTERFN( EModel,"Model::ChangeWepSettingsL - ERROR: not suported") - aApItem = aApItem; - return KErrNotSupported; - } - - - -// --------------------------------------------------------- -// CApSettingsModel::ChangeWpaSettingsL -// --------------------------------------------------------- -// -TInt CApSettingsModel::ChangeWpaSettingsL( CApAccessPointItem* aApItem ) - { - APSETUILOGGER_ENTERFN( EModel,"Model::ChangeWpaSettingsL - ERROR: not suported") - aApItem = aApItem; - return KErrNotSupported; - } - - - -// --------------------------------------------------------- -// CApSettingsModel::Change8021xSettingsL -// --------------------------------------------------------- -// -TInt CApSettingsModel::Change8021xSettingsL( CApAccessPointItem* aApItem ) - { - APSETUILOGGER_ENTERFN( EModel,"Model::Change8021xSettingsL - ERROR: not suported") - aApItem = aApItem; - return KErrNotSupported; - } - - - -// --------------------------------------------------------- -// CApSettingsModel::ClearWEPAndWPASettings -// --------------------------------------------------------- -// -void CApSettingsModel::ClearWEPAndWPASettings() - { - APSETUILOGGER_ENTERFN( EModel,"Model::ClearWEPAndWPASettings - ERROR: not suported") - } - - -// --------------------------------------------------------- -// CApSettingsModel::WriteWlanL -// --------------------------------------------------------- -// -void CApSettingsModel::WriteWlanL( CApAccessPointItem& aApItem, - TBool aIsNew ) - { - APSETUILOGGER_ENTERFN( EModel,"Model::WriteWlanL - ERROR: not supported") - aApItem; - aIsNew; - User::Leave( KErrNotSupported ); - } - - -// --------------------------------------------------------- -// CApSettingsModel::LoadWlanL -// --------------------------------------------------------- -// -void CApSettingsModel::LoadWlanL( CApAccessPointItem& aApItem ) - { - APSETUILOGGER_ENTERFN( EModel,"Model::LoadWlanL - ERROR: not supported") - aApItem; - User::Leave( KErrNotSupported ); - } - - -//---------------------------------------------------------- -// CApSettingsModel::HasWlanSecSettingsFilledL -//---------------------------------------------------------- -// -TBool CApSettingsModel::HasWlanSecSettingsFilledL( CApAccessPointItem& aApItem ) - { - APSETUILOGGER_ENTERFN( EModel,"Model::HasWlanSecSettingsFilledL - ERROR: not supported") - aApItem; - return EFalse; - } - - -//---------------------------------------------------------- -// CApSettingsModel::UpdateSecurityModeL -//---------------------------------------------------------- -// -void CApSettingsModel::UpdateSecurityModeL( CApAccessPointItem& aApItem ) - { - APSETUILOGGER_ENTERFN( EModel,"Model::UpdateSecurityModeL - ERROR: not supported") - aApItem; - User::Leave( KErrNotSupported ); - } - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/src/FeatureManagerWrapper.cpp --- a/apengine/apsettingshandlerui/src/FeatureManagerWrapper.cpp Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,85 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implementation of CFeatureManagerWrapper. -* -*/ - - -// INCLUDE FILES -#include "FeatureManagerWrapper.h" -#include "ApSettingsHandlerLogger.h" - -// ================= MEMBER FUNCTIONS ======================= - -// --------------------------------------------------------- -// CFeatureManagerWrapper::CFeatureManagerWrapper -// --------------------------------------------------------- -// -CFeatureManagerWrapper::CFeatureManagerWrapper() : CBase() - { - APSETUILOGGER_ENTERFN( EOther,"FeatureWrapper::CFeatureManagerWrapper<->") - } - -// --------------------------------------------------------- -// CFeatureManagerWrapper::~CFeatureManagerWrapper -// --------------------------------------------------------- -// -CFeatureManagerWrapper::~CFeatureManagerWrapper() - { - APSETUILOGGER_ENTERFN( EOther,"FeatureWrapper::~CFeatureManagerWrapper") - - if ( iIsFeatureMgrInitialized ) - { - FeatureManager::UnInitializeLib(); - } - - APSETUILOGGER_LEAVEFN( EOther,"FeatureWrapper::~CFeatureManagerWrapper") - } - - -// --------------------------------------------------------- -// CFeatureManagerWrapper::ConstructL -// --------------------------------------------------------- -// -void CFeatureManagerWrapper::ConstructL() - { - APSETUILOGGER_ENTERFN( EOther,"FeatureWrapper::ConstructL") - - FeatureManager::InitializeLibL(); - iIsFeatureMgrInitialized = ETrue ; - - APSETUILOGGER_LEAVEFN( EOther,"FeatureWrapper::ConstructL") - } - - -// --------------------------------------------------------- -// CFeatureManagerWrapper::NewL -// --------------------------------------------------------- -// -CFeatureManagerWrapper* CFeatureManagerWrapper::NewL() - { - APSETUILOGGER_ENTERFN( EOther,"FeatureWrapper::NewL") - - CFeatureManagerWrapper* self = new ( ELeave ) CFeatureManagerWrapper; - - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop( self ); - - APSETUILOGGER_LEAVEFN( EOther,"FeatureWrapper::NewL") - return self; - } - -//End of file. - diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/src/TextOverrides.cpp --- a/apengine/apsettingshandlerui/src/TextOverrides.cpp Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,166 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Declares the CTextOverrides class. -* -*/ - - -// INCLUDE FILES -#include "TextOverrides.h" -#include -#include "ApSettingsHandlerLogger.h" - -// CLASS DECLARATION - -// ================= MEMBER FUNCTIONS ======================= - -// --------------------------------------------------------- -// CTextOverrides::NewL -// --------------------------------------------------------- -// -CTextOverrides* CTextOverrides::NewL( ) - { - APSETUILOGGER_ENTERFN( EOther,"TxtOverride::NewL") - - CTextOverrides* db = new( ELeave ) CTextOverrides(); - CleanupStack::PushL( db ); - db->ConstructL( ); - CleanupStack::Pop(); // db - - APSETUILOGGER_LEAVEFN( EOther,"TxtOverride::NewL") - return db; - } - - - -// Destructor -CTextOverrides::~CTextOverrides() - { - APSETUILOGGER_ENTERFN( EOther,"TxtOverride::~CTextOverrides") - - if ( iTxtArray ) - { - iTxtArray->ResetAndDestroy(); - } - delete iTxtArray; - - APSETUILOGGER_LEAVEFN( EOther,"TxtOverride::~CTextOverrides") - } - - -// Constructor -CTextOverrides::CTextOverrides() - { - } - - -// --------------------------------------------------------- -// CTextOverrides::ConstructL -// --------------------------------------------------------- -// -void CTextOverrides::ConstructL( ) - { - APSETUILOGGER_ENTERFN( EOther,"TxtOverride::ConstructL") - - iTxtArray = new( ELeave ) CArrayPtrFlat( KTxtOverrideGran ); - for (TInt i=0; i<=KTTextIdMax; i++ ) - { - iTxtArray->AppendL( NULL); - } - - APSETUILOGGER_LEAVEFN( EOther,"TxtOverride::ConstructL") - } - - -// --------------------------------------------------------- -// CTextOverrides::SetTextOverridesL -// --------------------------------------------------------- -// -void CTextOverrides::SetTextOverrideL( TTextID aText2Change, - const TDesC& aNewText ) - { - APSETUILOGGER_ENTERFN( EOther,"TxtOverride::SetTextOverrideL") - - ValidateIdL( aText2Change ); - - HBufC* a = aNewText.AllocL(); - iTxtArray->Delete( aText2Change ); - iTxtArray->InsertL( aText2Change, a ); - - APSETUILOGGER_LEAVEFN( EOther,"TxtOverride::SetTextOverrideL") - } - - -// --------------------------------------------------------- -// CTextOverrides::TextOverridesL -// --------------------------------------------------------- -// -const TDesC& CTextOverrides::TextOverrideL( TTextID aTextId ) - { - APSETUILOGGER_ENTERFN( EOther,"TxtOverride::TextOverrideL") - - ValidateIdL( aTextId ); - if ( !IsTextOverridenL( aTextId ) ) - { - User::Leave( KTxtNotOverriden ); - } - - APSETUILOGGER_LEAVEFN( EOther,"TxtOverride::TextOverrideL") - return *iTxtArray->At( aTextId ); - } - - -// --------------------------------------------------------- -// CTextOverrides::IsTextOverridenL -// --------------------------------------------------------- -// -TBool CTextOverrides::IsTextOverridenL( TTextID aTextId ) - { - APSETUILOGGER_ENTERFN( EOther,"TxtOverride::IsTextOverridenL") - - TBool retval( EFalse ); - ValidateIdL( aTextId ); - if ( iTxtArray->At( aTextId ) ) - { - retval = ETrue; - } - else - { - retval = EFalse; - } - - APSETUILOGGER_LEAVEFN( EOther,"TxtOverride::IsTextOverridenL") - return retval; - } - - -// --------------------------------------------------------- -// CTextOverrides::ValidateIdL -// --------------------------------------------------------- -// -void CTextOverrides::ValidateIdL( TTextID aTextId ) - { - APSETUILOGGER_ENTERFN( EOther,"TxtOverride::ValidateIdL") - - if ( ( aTextId < KTTextIdMin ) || ( aTextId > KTTextIdMax ) ) - { - User::Leave( KErrInvalidTextId ); - } - - APSETUILOGGER_LEAVEFN( EOther,"TxtOverride::ValidateIdL") - } - - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/src/apsettingsdeleteoperation.cpp --- a/apengine/apsettingshandlerui/src/apsettingsdeleteoperation.cpp Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,628 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implementation of class CApSettingsDeleteOperation -* -*/ - - -// INCLUDE FILES -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "Apsettingsdeleteoperation.h" - -#include - -// Following includes are needed only for the test -// when ALL APs are deleted (checking delays, etc.) -// For testing purpose only, to make process time longer. -// TEST STARTS -#include -#include -#include -#include "ApSelectorListBoxModel.h" -#include "ApSettingsHandlerLogger.h" - -#include -// TEST ENDS - - -// Stack size of the receiver thread. -LOCAL_C const TInt KDeleteThreadStackSize = 40960; - -// Name of the receiver thread. -_LIT( KDeleteThreadName, "Access Point Settings UI Delete Operation" ); - - -// --------------------------------------------------------- -// CApSettingsDeleteOperation::NewL -// --------------------------------------------------------- -// -CApSettingsDeleteOperation* CApSettingsDeleteOperation::NewL( - TInt aNoteControlId, - TInt aResourceID, - TUint32 aUid, - const TDesC& aNoteText - ) - { - APSETUILOGGER_ENTERFN( EDelete,"DeleteOp::NewL") - - CApSettingsDeleteOperation* db = - new ( ELeave ) CApSettingsDeleteOperation( - aNoteControlId, - aResourceID, - aUid - ); - CleanupStack::PushL( db ); - db->ConstructL( aNoteText ); - CleanupStack::Pop(); - - APSETUILOGGER_LEAVEFN( EDelete,"DeleteOp::NewL") - return db; - } - - -// --------------------------------------------------------- -// CApSettingsDeleteOperation::ConstructL -// --------------------------------------------------------- -// -void CApSettingsDeleteOperation::ConstructL( const TDesC& aNoteText ) - { - APSETUILOGGER_ENTERFN( EDelete,"DeleteOp::ConstructL") - - iErrorUi = CErrorUI::NewL( *CCoeEnv::Static() ); - iNoteText = aNoteText.AllocL(); - - APSETUILOGGER_LEAVEFN( EDelete,"DeleteOp::ConstructL") - } - - -// --------------------------------------------------------- -// CApSettingsDeleteOperation::CApSettingsDeleteOperation -// --------------------------------------------------------- -// -CApSettingsDeleteOperation::CApSettingsDeleteOperation( - TInt aNoteControlId, - TInt aResourceID, - TUint32 aUid - ) -: CActive( EPriorityLow ), - iNoteControlId( aNoteControlId ), - iResourceID( aResourceID ), - iUid( aUid ) - { - CActiveScheduler::Add(this); - APSETUILOGGER_WRITE( EModel,"Thread added to scheduler"); - } - - -// --------------------------------------------------------- -// CApSettingsDeleteOperation::~CApSettingsDeleteOperation -// --------------------------------------------------------- -// -CApSettingsDeleteOperation::~CApSettingsDeleteOperation() - { - APSETUILOGGER_ENTERFN( EDelete,"DeleteOp::~CApSettingsDeleteOperation") - - if(iDeleteOperation.Handle() != 0) - { - // wait for deletion to finish - TRequestStatus status; - iDeleteOperation.Logon(status); - User::WaitForRequest(status); - - iDeleteOperation.Close(); - } - - Cancel(); - - delete iWaitDialog; - - delete iNoteText; - delete iErrorUi; - - APSETUILOGGER_LEAVEFN( EDelete,"DeleteOp::~CApSettingsDeleteOperation") - } - - - - -// --------------------------------------------------------- -// CApSettingsDeleteOperation::RunL -// --------------------------------------------------------- -// -void CApSettingsDeleteOperation::RunL() - { - APSETUILOGGER_ENTERFN( EDelete,"DeleteOp::RunL") - - switch ( iState ) - { - case EProcOnDialogOn: - { // two chances : - // 1. Process finished normally - // 2. Process leaved with error - iState = EProcOffDialogOn; - if ( iWaitDialog ) - { - iWaitDialog->ProcessFinishedL(); - } - if ( iStatus.Int() != KErrNone ) - { - // some error has occured - iErr = iStatus.Int(); - } - Next(); - break; - } - case EProcOffDialogOn: - { - // now we wait for the dialog to be dismissed - // just to be able to delete it - // stays in this state as long as DialogDismissedL() - // is not called, it will move it out into - // EProcOffDialogOff and it also deletes - Next(); - break; - } - case EProcOnDialogOff: - { // this can't be, as dialog MUST stay as long as operation... - iState = EProcOffDialogOff; - Next(); - break; - } - case EProcOffDialogOff: - { // now we can safely delete the dialog - if ( iWaitDialog ) - { - delete iWaitDialog; - } - if ( iErr != KErrNone ) - { - // some error has occured - iErrorUi->ShowGlobalErrorNoteL( iErr ); - } - iDeleteOperation.Kill( iErr ); - iDeleteOperation.Close(); -// delete this; - break; - } - default: - { - __ASSERT_DEBUG( EFalse, Panic( EInvalidState ) ); - break; - } - } - - APSETUILOGGER_LEAVEFN( EDelete,"DeleteOp::RunL") - } - - -// --------------------------------------------------------- -// CApSettingsDeleteOperation::DoCancel -// --------------------------------------------------------- -// -void CApSettingsDeleteOperation::DoCancel() - { // must be here as it is pure virtual in base... - APSETUILOGGER_ENTERFN( EDelete,"DeleteOp::DoCancel") - - if (iDeleteOperation.Handle() != 0 && iStatus == KRequestPending) - { - iDeleteOperation.LogonCancel(iStatus); - } - - APSETUILOGGER_LEAVEFN( EDelete,"DeleteOp::DoCancel") - } - - - -// --------------------------------------------------------- -// CApSettingsDeleteOperation::DialogDismissedL -// --------------------------------------------------------- -// -void CApSettingsDeleteOperation::DialogDismissedL( TInt /*aButtonId*/ ) - { - APSETUILOGGER_ENTERFN( EDelete,"DeleteOp::DialogDismissedL") - - switch ( iState ) - { - case EProcOnDialogOn: - { // can't be, it means that dialog is dismissed by user - // but process is still runing... - iState = EProcOnDialogOff; - break; - } - case EProcOffDialogOn: - { - // set dialog off - iState = EProcOffDialogOff; - // as proc is already off, it circles in RunL, - break; - } - case EProcOnDialogOff: - { // can't be, it is already off... - iState = EProcOnDialogOff; - Next(); - break; - } - case EProcOffDialogOff: - {// can't be, it is already off... - iState = EProcOffDialogOff; - Next(); - break; - } - default: - { - __ASSERT_DEBUG( EFalse, Panic( EInvalidState ) ); - break; - } - } - - APSETUILOGGER_LEAVEFN( EDelete,"DeleteOp::DialogDismissedL") - } - - -// --------------------------------------------------------- -// CApSettingsDeleteOperation::StartL -// --------------------------------------------------------- -// -void CApSettingsDeleteOperation::StartL() - { - APSETUILOGGER_ENTERFN( EDelete,"DeleteOp::StartL") - - iStatus = KRequestPending; - // set the internal state as both is running - iState = EProcOnDialogOn; - - // now we can start wait note... - StartWaitNoteL(); - - // now start new thread with operation - StartDeleteOperationThreadL(); - - SetActive(); - // now we can wait on it... - // wait until the started thread completes (delete operation completes) - // and it will enter RunL. RunL will notify the wait dialog about the - // completion of the process. - // As the dialog shall wait ~0.5 sec till display AND must be visible - // for ~1.5 sec. as a minimum, but must stay up as long as the 'process' - // on it is waiting for does not completes, we have the following chances: - // if the process is shorter than 0.5, - // after operation completes, state moves to EProcOffDialogOn, - // dialog will be notified about completion by RunL, and RunL starts - // circle and wait for the dialog to finish, multiply re-entering - // and leaving RunL, as long as the state is EProcOffDialogOn. - // As time was shorter than 0.5, thus dialog will not show itself - // and will call DialogDismissedL, which will change the - // state to EProcOffDialogOff, which, on entering - // RunL again, will delete the dialog and kill the thread. - // if the process was longer than 0.5 but shorter than 0.5+1.5sec, - // after operation completes, state moves to EProcOffDialogOn, - // dialog will be notified about completion by RunL, and RunL starts - // circle and wait for the dialog to finish, multiply re-entering - // and leaving RunL, as long as the state is EProcOffDialogOn. - // As time was longer than 0.5, thus dialog will show itself - // and will stay up for 1.5 sec, as process ended between - // 0.5 and (0.5+1.5). After it dialog will call DialogDismissedL, - // which will change the state to EProcOffDialogOff, which, on - // entering RunL again, will delete the dialog and kill the thread. - // if the process was longer than 0.5+1.5 - // after operation completes, state moves to EProcOffDialogOn, - // dialog will be notified about completion by RunL, and RunL starts - // circle and wait for the dialog to finish, multiply re-entering - // and leaving RunL, as long as the state is EProcOffDialogOn. - // As time was longer than 0.5+1.5, thus dialog will show itself - // and will stay up for as long as 'process/operation' is not finished. - // As thread completes, notifies dialog, after it dialog will - // call back DialogDismissedL, which will change the state - // to EProcOffDialogOff, which, on entering RunL again, - // will delete the dialog and kill the thread. - - APSETUILOGGER_LEAVEFN( EDelete,"DeleteOp::StartL") - } - - - -// --------------------------------------------------------- -// CApSettingsDeleteOperation::Next -// --------------------------------------------------------- -// -void CApSettingsDeleteOperation::Next() - { - APSETUILOGGER_ENTERFN( EDelete,"DeleteOp::Next") - - iStatus = KRequestPending; - SetActive(); - TRequestStatus *status = &iStatus; - User::RequestComplete( status, KErrNone ); // Invoke RunL() - - APSETUILOGGER_LEAVEFN( EDelete,"DeleteOp::Next") - } - - - - -// --------------------------------------------------------- -// CApSettingsDeleteOperation::RunDeleteThread -// --------------------------------------------------------- -// -TInt CApSettingsDeleteOperation::RunDeleteThread( TAny* aPtr ) - { - APSETUILOGGER_ENTERFN( EDelete,"DeleteOp::RunDeleteThread") - - CApSettingsDeleteOperation* aop = - STATIC_CAST( CApSettingsDeleteOperation*, aPtr ); - - - CTrapCleanup* TheTrapCleanup = CTrapCleanup::New(); // get cleanup stack - - TRAPD(r, aop->DoRunDeleteThreadL( aop ) ); - - delete TheTrapCleanup; // destroy cleanup stack - - aop->iErr = r; - - APSETUILOGGER_LEAVEFN( EDelete,"DeleteOp::RunDeleteThread") - return ( r ); - } - - - -// --------------------------------------------------------- -// CApSettingsDeleteOperation::DoRunDeleteThreadL -// --------------------------------------------------------- -// -TInt CApSettingsDeleteOperation::DoRunDeleteThreadL( - CApSettingsDeleteOperation* aop ) - { - APSETUILOGGER_ENTERFN( EDelete,"DeleteOp::DoRunDeleteThreadL") - - CCommsDatabase* db = CCommsDatabase::NewL( EDatabaseTypeIAP ); - CleanupStack::PushL( db ); - - APSETUILOGGER_WRITE( EDelete,"Commsdb created"); - - CApDataHandler* handler = CApDataHandler::NewLC( *db ); - - APSETUILOGGER_WRITE( EDelete,"CApDataHandler created"); - - CVpnApEngine* vpnengine = CVpnApEngine::NewLC( db ); - - APSETUILOGGER_WRITE( EDelete,"CVpnApEngine created"); - - TBool ownTransaction = StartTransactionLC( db, - /*aWrite*/ETrue, - /*aRetry*/ETrue ); - - APSETUILOGGER_WRITE( EDelete,"Tr.started"); - -// NORMAL OPERATION STARTS - TBool isvpn = vpnengine->IsVpnApL( aop->iUid ); - - APSETUILOGGER_WRITE( EDelete,"IsVpnApL returned"); - - // if linked to a VPN, the VPN also must be deleted - // deleting the VPN part is the delete operation's responsibility... - if ( isvpn ) - { - vpnengine->DeleteVpnL( aop->iUid ); - } - else - { - handler->RemoveAPL( aop->iUid ); - } - - APSETUILOGGER_WRITE( EDelete,"RemoveAPL returned"); - - - if ( ownTransaction ) - { - TInt err = db->CommitTransaction(); - User::LeaveIfError( err ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - APSETUILOGGER_WRITE( EDelete," delete finished"); - - CleanupStack::PopAndDestroy( 3, db ); //db,handler,vpnengine - -// NORMAL OPERATION ENDS - - - APSETUILOGGER_LEAVEFN( EDelete,"DeleteOp::DoRunDeleteThreadL") - return KErrNone; - } - - - -// --------------------------------------------------------- -// CApSettingsDeleteOperation::StartWaitNoteL -// --------------------------------------------------------- -// -void CApSettingsDeleteOperation::StartWaitNoteL() - { - APSETUILOGGER_ENTERFN( EDelete,"DeleteOp::StartWaitNoteL") - - if ( iWaitDialog ) - { - delete iWaitDialog; - iWaitDialog = NULL; - } - iWaitDialog = - new ( ELeave ) CAknWaitDialog - ( REINTERPRET_CAST(CEikDialog**,&iWaitDialog) ); - iWaitDialog->PrepareLC( iResourceID ); - iWaitDialog->SetTone( CAknNoteDialog::ENoTone ); - iWaitDialog->SetTextL( *iNoteText ); - iWaitDialog->SetCallback( this ); - iWaitDialog->RunLD(); - - APSETUILOGGER_LEAVEFN( EDelete,"DeleteOp::StartWaitNoteL") - } - - - -// --------------------------------------------------------- -// CApSettingsDeleteOperation::StartDeleteOperationThreadL -// --------------------------------------------------------- -// -void CApSettingsDeleteOperation::StartDeleteOperationThreadL() - { - APSETUILOGGER_ENTERFN( EDelete,"DeleteOp::StartDeleteOperationThreadL") - - TInt err = iDeleteOperation.Create - ( - KDeleteThreadName, // aName - RunDeleteThread, // aFunction - KDeleteThreadStackSize, // aStackSize - NULL, // Use this heap. - this // aPtr - ); - APSETUILOGGER_WRITE_FORMAT( EDelete, "iDeleteOperation create returned, code:%d", err); - - User::LeaveIfError( err ); - // on termination/death of this thread, it will call RunL - iDeleteOperation.Logon( iStatus ); - // let's start the thread - iDeleteOperation.Resume(); - // set the internal state as both is running - iState = EProcOnDialogOn; - - APSETUILOGGER_LEAVEFN( EDelete,"DeleteOp::StartDeleteOperationThreadL") - } - - - - - -// --------------------------------------------------------- -// CApSettingsDeleteOperation::StarTransactionLC -// --------------------------------------------------------- -// -TBool CApSettingsDeleteOperation::StartTransactionLC( CCommsDatabase* aDb, - TBool aWrite, - TBool aRetry /*ETrue*/ ) - { - APSETUILOGGER_ENTERFN( EDelete,"DeleteOp::StartTransactionLC") - - TBool retval( EFalse ); - if ( !aDb->InTransaction() ) - { - TInt retriesLeft( aRetry ? KRetryCount : 1 ); - TInt err = aDb->BeginTransaction(); - while ( ( err == KErrLocked ) && --retriesLeft ) - { - User::After( KRetryWait ); - err = aDb->BeginTransaction(); - if (aWrite ) - { - TRAP_IGNORE( GetWriteLockL( aDb ) ); - } - } - if ( err ) - { - ShowNoteL( R_APUI_VIEW_TEXT_CANNOT_ACCESS_DB ); - } - User::LeaveIfError( err ); - CleanupStack::PushL( TCleanupItem( RollbackTransactionOnLeave, aDb ) ); - retval = ETrue; - } - else - { - retval = EFalse; - } - - APSETUILOGGER_LEAVEFN( EDelete,"DeleteOp::StartTransactionLC") - return retval; - } - - -// --------------------------------------------------------- -// CApSettingsDeleteOperation::GetWriteLockL -// --------------------------------------------------------- -// -void CApSettingsDeleteOperation::GetWriteLockL( CCommsDatabase* aDb ) - { - APSETUILOGGER_ENTERFN( EDelete,"DeleteOp::GetWriteLockL") - - CCommsDbTableView* v = aDb->OpenTableLC( TPtrC(WAP_ACCESS_POINT ) ); - TUint32 aDummyUid( KApNoneUID ); - TInt err = v->InsertRecord( aDummyUid ); - User::LeaveIfError( err ); - v->CancelRecordChanges(); - User::LeaveIfError( err ); - CleanupStack::PopAndDestroy(); // v - - APSETUILOGGER_LEAVEFN( EDelete,"DeleteOp::GetWriteLockL") - } - -// --------------------------------------------------------- -// CApSettingsDeleteOperation::RollbackTransactionOnLeave -// --------------------------------------------------------- -// -void CApSettingsDeleteOperation::RollbackTransactionOnLeave( TAny* aDb ) - { - APSETUILOGGER_ENTERFN( EDelete,"DeleteOp::RollbackTransactionOnLeave") - - CCommsDatabase* db = STATIC_CAST( CCommsDatabase*, aDb ); - db->RollbackTransaction(); - - APSETUILOGGER_LEAVEFN( EDelete,"DeleteOp::RollbackTransactionOnLeave") - } - - -// --------------------------------------------------------- -// CApSettingsDeleteOperation::ReadUintL -// --------------------------------------------------------- -// -TInt CApSettingsDeleteOperation::ReadUintL( CCommsDbTableView* atable, - const TDesC& aColumn, - TUint32& aValue ) - { - APSETUILOGGER_ENTERFN( EDelete,"DeleteOp::ReadUintL") - - __ASSERT_DEBUG( (atable), Panic( ENullPointer ) ) ; - TRAPD( err, atable->ReadUintL( aColumn, aValue ) ); - if ( err != KErrNone ) - { // do not leave if readed value is not present in table... - if ( err != KErrUnknown ) - User::Leave( err ); - } - - APSETUILOGGER_LEAVEFN( EDelete,"DeleteOp::ReadUintL") - return err; - } - - -// --------------------------------------------------------- -// CApSettingsDeleteOperation::SetNoteTextL -// --------------------------------------------------------- -// -void CApSettingsDeleteOperation::SetNoteTextL( const TDesC& aNoteText ) - { - APSETUILOGGER_ENTERFN( EDelete,"DeleteOp::SetNoteTextL") - - delete iNoteText; - iNoteText = NULL; // must NULL it to satisfy CodeScanner... - iNoteText = aNoteText.AllocL(); - - APSETUILOGGER_LEAVEFN( EDelete,"DeleteOp::SetNoteTextL") - } -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/src/apsettingshandlerui.cpp --- a/apengine/apsettingshandlerui/src/apsettingshandlerui.cpp Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,839 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Defines the main handler, CApSettingsHandler and public API for -* the Access Point settings. -* -*/ - - -// INCLUDE FILES -#include - -#include "ApSettingsHandlerUI.h" -#include "ApsettingshandleruiImpl.h" -#include "ApSettingsHandlerLogger.h" -#include - - -// UID of general settings app, in which help texts are included -const TUid KHelpUidApSettingsHandler = { 0x100058EC }; - - -// ================= MEMBER FUNCTIONS ======================= - -// --------------------------------------------------------- -// CApSettingsHandler::NewLC -// --------------------------------------------------------- -// -EXPORT_C CApSettingsHandler* CApSettingsHandler::NewLC( - TBool aStartWithSelection, - TSelectionListType aListType, - TSelectionMenuType aSelMenuType, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType ) - { - APSETUILOGGER_CREATE; - APSETUILOGGER_ENTERFN( EAPI,"Handler::NewLC") - - CApSettingsHandler* db = - new( ELeave ) CApSettingsHandler( aStartWithSelection, - aListType, - aSelMenuType ); - CleanupStack::PushL( db ); - - - - db->ConstructL( aIspFilter, aBearerFilter, aSortType ); - - APSETUILOGGER_LEAVEFN( EAPI,"Handler::NewLC") - - return db; - } - - - - -// --------------------------------------------------------- -// CApSettingsHandler::NewLC -// --------------------------------------------------------- -// -EXPORT_C CApSettingsHandler* CApSettingsHandler::NewLC( - CActiveApDb& aDb, - TBool aStartWithSelection, - TSelectionListType aListType, - TSelectionMenuType aSelMenuType, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType - ) - { - APSETUILOGGER_CREATE; - APSETUILOGGER_ENTERFN( EAPI,"Handler::NewLC2") - - CApSettingsHandler* db = - new( ELeave ) CApSettingsHandler( aStartWithSelection, - aListType, - aSelMenuType ); - CleanupStack::PushL( db ); - - db->ConstructL( aDb, aIspFilter, aBearerFilter, aSortType ); - - APSETUILOGGER_LEAVEFN( EAPI,"Handler::NewLC2") - - return db; - } - - - -// --------------------------------------------------------- -// CApSettingsHandler::NewLC -// --------------------------------------------------------- -// -EXPORT_C CApSettingsHandler* CApSettingsHandler::NewLC( - TBool aStartWithSelection, - TSelectionListType aListType, - TSelectionMenuType aSelMenuType, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TInt aReqIpvType - ) - { - APSETUILOGGER_CREATE; - APSETUILOGGER_ENTERFN( EAPI,"Handler::NewLC3") - - CApSettingsHandler* db = - new( ELeave ) CApSettingsHandler( aStartWithSelection, - aListType, - aSelMenuType, - aReqIpvType - ); - CleanupStack::PushL( db ); - - db->ConstructL( aIspFilter, aBearerFilter, aSortType ); - - APSETUILOGGER_LEAVEFN( EAPI,"Handler::NewLC3") - - return db; - } - - - - -// --------------------------------------------------------- -// CApSettingsHandler::NewLC -// --------------------------------------------------------- -// -EXPORT_C CApSettingsHandler* CApSettingsHandler::NewLC( - CActiveApDb& aDb, - TBool aStartWithSelection, - TSelectionListType aListType, - TSelectionMenuType aSelMenuType, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TInt aReqIpvType - ) - { - APSETUILOGGER_CREATE; - APSETUILOGGER_ENTERFN( EAPI,"Handler::NewLC4") - - CApSettingsHandler* db = - new( ELeave ) CApSettingsHandler( aStartWithSelection, - aListType, - aSelMenuType, - aReqIpvType - ); - CleanupStack::PushL( db ); - - db->ConstructL( aDb, aIspFilter, aBearerFilter, aSortType ); - - APSETUILOGGER_LEAVEFN( EAPI,"Handler::NewLC4") - - return db; - } - - - - - -// --------------------------------------------------------- -// CApSettingsHandler::NewLC -// --------------------------------------------------------- -// -EXPORT_C CApSettingsHandler* CApSettingsHandler::NewLC( - TBool aStartWithSelection, - TSelectionListType aListType, - TSelectionMenuType aSelMenuType, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TInt aReqIpvType, - TVpnFilterType aVpnFilterType - ) - { - APSETUILOGGER_CREATE; - APSETUILOGGER_ENTERFN( EAPI,"Handler::NewLC5") - - CApSettingsHandler* db = - new( ELeave ) CApSettingsHandler( aStartWithSelection, - aListType, - aSelMenuType, - aReqIpvType - ); - CleanupStack::PushL( db ); - - db->ConstructL( aIspFilter, aBearerFilter, - aSortType, aVpnFilterType ); - - APSETUILOGGER_LEAVEFN( EAPI,"Handler::NewLC5") - - return db; - } - - -// --------------------------------------------------------- -// CApSettingsHandler::NewLC -// --------------------------------------------------------- -// -EXPORT_C CApSettingsHandler* CApSettingsHandler::NewLC( - CActiveApDb& aDb, - TBool aStartWithSelection, - TSelectionListType aListType, - TSelectionMenuType aSelMenuType, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TInt aReqIpvType, - TVpnFilterType aVpnFilterType - ) - { - APSETUILOGGER_CREATE; - APSETUILOGGER_ENTERFN( EAPI,"Handler::NewLC6") - - CApSettingsHandler* db = - new( ELeave ) CApSettingsHandler( aStartWithSelection, - aListType, - aSelMenuType, - aReqIpvType - ); - CleanupStack::PushL( db ); - - db->ConstructL( aDb, aIspFilter, aBearerFilter, - aSortType, aVpnFilterType ); - - APSETUILOGGER_LEAVEFN( EAPI,"Handler::NewLC6") - - return db; - } - - - - - - -// --------------------------------------------------------- -// CApSettingsHandler::NewLC -// --------------------------------------------------------- -// -EXPORT_C CApSettingsHandler* CApSettingsHandler::NewLC( - CActiveApDb& aDb, - TBool aStartWithSelection, - TSelectionListType aListType, - TSelectionMenuType aSelMenuType, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TInt aReqIpvType, - TVpnFilterType aVpnFilterType, - TBool aIncludeEasyWlan - ) - { - APSETUILOGGER_CREATE; - APSETUILOGGER_ENTERFN( EAPI,"Handler::NewLC7") - - CApSettingsHandler* db = - new( ELeave ) CApSettingsHandler( aStartWithSelection, - aListType, - aSelMenuType, - aReqIpvType - ); - CleanupStack::PushL( db ); - - db->ConstructL( aDb, aIspFilter, aBearerFilter, - aSortType, aVpnFilterType, aIncludeEasyWlan ); - - APSETUILOGGER_LEAVEFN( EAPI,"Handler::NewLC7") - return db; - } - - -// Destructor -EXPORT_C CApSettingsHandler::~CApSettingsHandler() - { - APSETUILOGGER_DELETE; - - APSETUILOGGER_WRITE( EAPI,"Handler:: deleting implementation"); - - delete iImpl; - - APSETUILOGGER_WRITE( EAPI,"Handler::~finished"); - } - - - -// Constructor -EXPORT_C CApSettingsHandler::CApSettingsHandler( TBool aStartWithSelection, - TSelectionListType aListType, - TSelectionMenuType aSelMenuType - ) -:iStartWithSelection( aStartWithSelection ), -iListType( aListType ), -iSelMenuType( aSelMenuType ), -iIspFilter( KEApIspTypeAll ), -iBearerFilter( EApBearerTypeAll ), -iReqIpvType( EIPv4 ), -iEventStore( KApUiEventNone ) - { - iHelpMajor = KHelpUidApSettingsHandler; - } - - - - - -// Constructor -CApSettingsHandler::CApSettingsHandler( TBool aStartWithSelection, - TSelectionListType aListType, - TSelectionMenuType aSelMenuType, - TInt aReqIpvType - ) -:iStartWithSelection( aStartWithSelection ), -iListType( aListType ), -iSelMenuType( aSelMenuType ), -iIspFilter( KEApIspTypeAll ), -iBearerFilter( EApBearerTypeAll ), -iReqIpvType( aReqIpvType ), -iEventStore( KApUiEventNone ) - { - iHelpMajor = KHelpUidApSettingsHandler; - } - - - -// --------------------------------------------------------- -// CApSettingsHandler::ConstructL -// --------------------------------------------------------- -// -EXPORT_C void CApSettingsHandler::ConstructL( TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType ) - { - APSETUILOGGER_ENTERFN( EAPI,"Handler::ConstructL") - - DoConstructL( NULL, aIspFilter, aBearerFilter, - aSortType, EVpnFilterBoth, EFalse ); - - APSETUILOGGER_LEAVEFN( EAPI,"Handler::ConstructL") - } - - - -// --------------------------------------------------------- -// CApSettingsHandler::ConstructL -// --------------------------------------------------------- -// -EXPORT_C void CApSettingsHandler::ConstructL( CActiveApDb& aDb, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType ) - { - APSETUILOGGER_ENTERFN( EAPI,"Handler::ConstructL2") - - DoConstructL( &aDb, aIspFilter, aBearerFilter, - aSortType, EVpnFilterBoth, EFalse ); - - APSETUILOGGER_LEAVEFN( EAPI,"Handler::ConstructL2") - } - - - -// --------------------------------------------------------- -// CApSettingsHandler::ConstructL -// --------------------------------------------------------- -// -EXPORT_C void CApSettingsHandler::ConstructL( - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TVpnFilterType aVpnFilterType - ) - { - APSETUILOGGER_ENTERFN( EAPI,"Handler::ConstructL3") - - DoConstructL( NULL, aIspFilter, aBearerFilter, - aSortType, aVpnFilterType, EFalse ); - - APSETUILOGGER_LEAVEFN( EAPI,"Handler::ConstructL3") - } - - - -// --------------------------------------------------------- -// CApSettingsHandler::ConstructL -// --------------------------------------------------------- -// -EXPORT_C void CApSettingsHandler::ConstructL( - CActiveApDb& aDb, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TVpnFilterType aVpnFilterType - ) - { - APSETUILOGGER_ENTERFN( EAPI,"Handler::ConstructL4") - - DoConstructL( &aDb, aIspFilter, aBearerFilter, - aSortType, aVpnFilterType, EFalse ); - - APSETUILOGGER_LEAVEFN( EAPI,"Handler::ConstructL4") - } - - - - -// --------------------------------------------------------- -// CApSettingsHandler::ConstructL -// --------------------------------------------------------- -// -EXPORT_C void CApSettingsHandler::ConstructL( - CActiveApDb& aDb, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TVpnFilterType aVpnFilterType, - TBool aIncludeEasyWlan - ) - { - APSETUILOGGER_ENTERFN( EAPI,"Handler::ConstructL5") - - DoConstructL( &aDb, aIspFilter, aBearerFilter, - aSortType, aVpnFilterType, aIncludeEasyWlan ); - - APSETUILOGGER_LEAVEFN( EAPI,"Handler::ConstructL5") - } - - -// --------------------------------------------------------- -// CApSettingsHandler::SetFilter -// --------------------------------------------------------- -// -EXPORT_C void CApSettingsHandler::SetFilterL( TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType ) - { - APSETUILOGGER_ENTERFN( EAPI,"Handler::SetFilterL") - - iImpl->SetFilterL( aIspFilter, aBearerFilter, aSortType ); - - APSETUILOGGER_LEAVEFN( EAPI,"Handler::SetFilterL") - } - - - - -// --------------------------------------------------------- -// CApSettingsHandler::SetTextOverrideL -// --------------------------------------------------------- -// -EXPORT_C void CApSettingsHandler::SetTextOverrideL( TTextID aText2Change, - const TDesC& aNewText ) - { - APSETUILOGGER_ENTERFN( EAPI,"Handler::SetTextOverrideL") - - __ASSERT_DEBUG( iImpl, Panic( ENullPointer ) ); - iImpl->SetTextOverrideL( aText2Change, aNewText ); - - APSETUILOGGER_LEAVEFN( EAPI,"Handler::SetTextOverrideL") - } - - -// --------------------------------------------------------- -// CApSettingsHandler::TextOverrideL -// --------------------------------------------------------- -// -EXPORT_C const TDesC& CApSettingsHandler::TextOverrideL( TTextID aTextId ) - { - APSETUILOGGER_ENTERFN( EAPI,"Handler::TextOverrideL<->") - - __ASSERT_DEBUG( iImpl, Panic( ENullPointer ) ); - return iImpl->TextOverrideL( aTextId ); - } - - - -// --------------------------------------------------------- -// CApSettingsHandler::RunSettingsL -// --------------------------------------------------------- -// -EXPORT_C TInt CApSettingsHandler::RunSettingsL( TUint32 aHighLight, - TUint32& aSelected ) - { - APSETUILOGGER_ENTERFN( EAPI,"Handler::RunSettingsL") - - iImpl->RunSettingsL( aHighLight, aSelected ); - - APSETUILOGGER_LEAVEFN( EAPI,"Handler::RunSettingsL") - - return iImpl->EventStore(); - } - - - -// --------------------------------------------------------- -// CApSettingsHandler::Cvt() -// --------------------------------------------------------- -// -EXPORT_C TInt CApSettingsHandler::Cvt() - { - APSETUILOGGER_ENTERFN( EAPI,"Handler::Cvt<->") - return KErrNone; - } - - -// --------------------------------------------------------- -// CApSettingsHandler::DoRunSettingsL -// --------------------------------------------------------- -// -TInt CApSettingsHandler::DoRunSettingsL( TUint32 /*aHighLight*/, - TUint32& /*aSelected*/ ) - { - APSETUILOGGER_ENTERFN( EAPI,"Handler::DoRunSettingsL@Deprecated") - - // Deprecated as moved to iImpl - __ASSERT_DEBUG( EFalse, Panic( ENullPointer ) ); - User::Leave(KErrNotSupported); - return KErrNone; - } - - -// --------------------------------------------------------- -// CApSettingsHandler::RunViewerL -// --------------------------------------------------------- -// -EXPORT_C TInt CApSettingsHandler::RunViewerL( TUint32 aUid ) - { - APSETUILOGGER_ENTERFN( EAPI,"Handler::RunViewerL") - - iImpl->RunViewerL( aUid ); - - APSETUILOGGER_LEAVEFN( EAPI,"Handler::RunViewerL") - - return iImpl->EventStore(); - } - - - -// --------------------------------------------------------- -// CApSettingsHandler::DoRunViewerL -// --------------------------------------------------------- -// -TInt CApSettingsHandler::DoRunViewerL( TUint32 /*aUid*/ ) - { - APSETUILOGGER_ENTERFN( EAPI,"Handler::DoRunViewerL@Deprecated") - - // Deprecated as moved to iImpl - __ASSERT_DEBUG( EFalse, Panic( ENullPointer ) ); - User::Leave(KErrNotSupported); - return KErrNone; - } - - - -//---------------------------------------------------------- -// CApSettingsHandler::HandleApDeleteCmdL -//---------------------------------------------------------- -// -void CApSettingsHandler::HandleApDeleteCmdL( TUint32 /*aUid*/, - TBool /*aIsLast*/ ) - { - APSETUILOGGER_ENTERFN( EAPI,"Handler::HandleApDeleteCmdL@Deprecated") - - // Deprecated as moved to iImpl - __ASSERT_DEBUG( EFalse, Panic( ENullPointer ) ); - User::Leave(KErrNotSupported); - } - - -//---------------------------------------------------------- -// CApSettingsHandler::HandleApBlankNewL -//---------------------------------------------------------- -// -TUint32 CApSettingsHandler::HandleApBlankNewL( TInt /*aBearers*/, - TInt /*aIsps*/ ) - { - APSETUILOGGER_ENTERFN( EAPI,"Handler::HandleApBlankNewL@Deprecated") - - // Deprecated as moved to iImpl - __ASSERT_DEBUG( EFalse, Panic( ENullPointer ) ); - User::Leave(KErrNotSupported); - return KErrNone; - } - - - -//---------------------------------------------------------- -// CApSettingsHandler::HandleApUseOldNewL -//---------------------------------------------------------- -// -TUint32 CApSettingsHandler::HandleApUseOldNewL() - { - APSETUILOGGER_ENTERFN( EAPI,"Handler::HandleApUseOldNewL@Deprecated") - - // Deprecated as moved to iImpl - __ASSERT_DEBUG( EFalse, Panic( ENullPointer ) ); - User::Leave(KErrNotSupported); - return KErrNone; - } - - - -//---------------------------------------------------------- -// CApSettingsHandler::EditAfterCreateL -//---------------------------------------------------------- -// -TUint32 CApSettingsHandler::EditAfterCreateL( TUint32 /*aUid*/, - CApAccessPointItem* /*aItem*/ ) - { - APSETUILOGGER_ENTERFN( EAPI,"Handler::EditAfterCreateL@Deprecated") - - // Deprecated as moved to iImpl - __ASSERT_DEBUG( EFalse, Panic( ENullPointer ) ); - User::Leave(KErrNotSupported); - return KErrNone; - } - - - -//---------------------------------------------------------- -// CApSettingsHandler::DoConstructL -//---------------------------------------------------------- -// -void CApSettingsHandler::DoConstructL( CActiveApDb* aDb, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TVpnFilterType aVpnFilterType, - TBool aIncludeEasyWlan ) - { - APSETUILOGGER_ENTERFN( EAPI,"Handler::DoConstructL") - - // must place it to a temp variable, otherwise CodeScanner reports - // it as a bad practice putting up member to Cleanupstack, but - // we have NO NewL so we must use this. - CApSettingsHandlerImpl* tmp = CApSettingsHandlerImpl::NewLC( - *aDb, iStartWithSelection, - iListType, iSelMenuType, - aIspFilter, aBearerFilter, - aSortType, iReqIpvType, - aVpnFilterType, aIncludeEasyWlan, - ETrue ); - CleanupStack::Pop(tmp); // will soon be a member, need to pop - iImpl = tmp; - - APSETUILOGGER_LEAVEFN( EAPI,"Handler::DoConstructL") - } - - - - -//---------------------------------------------------------- -// CApSettingsHandler::DoRunSetPageSettingsL -//---------------------------------------------------------- -// -void CApSettingsHandler::DoRunSetPageSettingsL( TUint32 /*aHighLight*/, - TUint32& /*aSelected*/ ) - { - APSETUILOGGER_ENTERFN( EAPI,"Handler::DoRunSetPageSettingsL@Deprecated") - - // Deprecated as moved to iImpl - __ASSERT_DEBUG( EFalse, Panic( ENullPointer ) ); - User::Leave(KErrNotSupported); - } - - - -//---------------------------------------------------------- -// CApSettingsHandler::DoRunListSettingsL -//---------------------------------------------------------- -// -void CApSettingsHandler::DoRunListSettingsL( TUint32 /*aHighLight*/, - TUint32& /*aSelected*/ ) - { - APSETUILOGGER_ENTERFN( EAPI,"Handler::DoRunListSettingsL@Deprecated") - - // Deprecated as moved to iImpl - __ASSERT_DEBUG( EFalse, Panic( ENullPointer ) ); - User::Leave(KErrNotSupported); - } - - - -//---------------------------------------------------------- -// CApSettingsHandler::DoHandleApUseOldNewL -//---------------------------------------------------------- -// -TUint32 CApSettingsHandler::DoHandleApUseOldNewL( TUint32 /*aSelected*/ ) - { - APSETUILOGGER_ENTERFN( EAPI,"Handler::DoHandleApUseOldNewL@Deprecated") - - // Deprecated as moved to iImpl - __ASSERT_DEBUG( EFalse, Panic( ENullPointer ) ); - User::Leave(KErrNotSupported); - return KErrNone; - } - - - -//---------------------------------------------------------- -// CApSettingsHandler::SelectApToCopyL -//---------------------------------------------------------- -// -TUint32 CApSettingsHandler::SelectApToCopyL() - { - APSETUILOGGER_ENTERFN( EAPI,"Handler::SelectApToCopyL@Deprecated") - - // Deprecated as moved to iImpl - __ASSERT_DEBUG( EFalse, Panic( ENullPointer ) ); - User::Leave(KErrNotSupported); - return KErrNone; - } - - - -//---------------------------------------------------------- -// CApSettingsHandler::DoHandleApBlankNewL -//---------------------------------------------------------- -// -TUint32 CApSettingsHandler::DoHandleApBlankNewL( TInt /*aBearers*/, TInt /*aIsps*/ ) - { - APSETUILOGGER_ENTERFN( EAPI,"Handler::DoHandleApBlankNewL@Deprecated") - - // Deprecated as moved to iImpl - __ASSERT_DEBUG( EFalse, Panic( ENullPointer ) ); - User::Leave(KErrNotSupported); - return KErrNone; - } - - - - -//---------------------------------------------------------- -// CApSettingsHandler::HandleNetworkDeleteCmdL -//---------------------------------------------------------- -// -void CApSettingsHandler::HandleNetworkDeleteCmdL( TUint32 /*aUid*/ ) - { - APSETUILOGGER_ENTERFN( EAPI,"Handler::HandleNetworkDeleteCmdL@Deprecated") - - // Deprecated as moved to iImpl - __ASSERT_DEBUG( EFalse, Panic( ENullPointer ) ); - User::Leave(KErrNotSupported); - } - - - -//---------------------------------------------------------- -// CApSettingsHandler::GetVariantL -//---------------------------------------------------------- -// -TInt CApSettingsHandler::GetVariantL() - { - APSETUILOGGER_ENTERFN( EAPI,"Handler::GetVariantL@Deprecated") - - // Deprecated as moved to iImpl - __ASSERT_DEBUG( EFalse, Panic( ENullPointer ) ); - User::Leave(KErrNotSupported); - return KErrNone; - } - - -//---------------------------------------------------------- -// CApSettingsHandler::ConfirmDeleteL -//---------------------------------------------------------- -// -TInt CApSettingsHandler::ConfirmDeleteL( TUint32 /*aUid*/, TBool /*aIsLast*/ ) - { - APSETUILOGGER_ENTERFN( EAPI,"Handler::ConfirmDeleteL@Deprecated") - - // Deprecated as moved to iImpl - __ASSERT_DEBUG( EFalse, Panic( ENullPointer ) ); - User::Leave(KErrNotSupported); - return KErrNone; - } - - - -//---------------------------------------------------------- -// CApSettingsHandler::HandleRunSettingsL -//---------------------------------------------------------- -// -void CApSettingsHandler::HandleRunSettingsL( TUint32 /*aHighLight*/, - TUint32& /*aSelected*/ ) - { - APSETUILOGGER_ENTERFN( EAPI,"Handler::HandleRunSettingsL@Deprecated") - - // Deprecated as moved to iImpl - __ASSERT_DEBUG( EFalse, Panic( ENullPointer ) ); - User::Leave(KErrNotSupported); - } - - - -//---------------------------------------------------------- -// CApSettingsHandler::ChooseBearerTypeL -//---------------------------------------------------------- -// -void CApSettingsHandler::ChooseBearerTypeL( TInt /*aBearers*/, - CApAccessPointItem& /*aItem*/ ) - { - APSETUILOGGER_ENTERFN( EAPI,"Handler::ChooseBearerTypeL@Deprecated") - - // Deprecated as moved to iImpl - __ASSERT_DEBUG( EFalse, Panic( ENullPointer ) ); - User::Leave(KErrNotSupported); - } - - - - -//---------------------------------------------------------- -// CApSettingsHandler::HandleDuplicateL -//---------------------------------------------------------- -// -TUint32 CApSettingsHandler::HandleDuplicateL( TUint32 /*aUid*/ ) - { - APSETUILOGGER_ENTERFN( EAPI,"Handler::HandleDuplicateL@Deprecated") - - // Deprecated as moved to iImpl - __ASSERT_DEBUG( EFalse, Panic( ENullPointer ) ); - User::Leave(KErrNotSupported); - return KErrNone; - } - - -// End of File - diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/src/apsettingshandleruiImpl.cpp --- a/apengine/apsettingshandlerui/src/apsettingshandleruiImpl.cpp Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2020 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Defines the main handler, CApSettingsHandlerImpl for -* the Access Point settings. -* -*/ - - -// INCLUDE FILES -#include "APSettingsHandlerUIVariant.hrh" - -#include -#include -#include -#include - -#include "ApsettingshandleruiImpl.h" -#include "ApSettingsHandlerUI.hrh" -#include "ApSelectorDialog.h" - -#include "ApSettingsDlg.h" - -#include "TextOverrides.h" -#include "ApSettingsModel.h" -#include "ApSelPopupList.h" -#include "ApSelQueryDialog.h" - -#include -#include - -#include - -#include "ApSettingsHandlerLogger.h" -#include - - -#include "ApSettingsHandlerUiPrivateCRKeys.h" -#include - -#include - -#include - -#include -#include - -#include - -#include - -// UID of general settings app, in which help texts are included -const TUid KHelpUidApSettingsHandler = { 0x100058EC }; - - -//#define __TEST_PERFORMANCE -/// ROM drive. -_LIT( KApSettingsResDriveZ, "z:" ); -/// Access point settings handler UI resource file name. -_LIT( KApSettingsResFileName, "apsetui.rsc" ); - - - -/// Estimated FFS overhead for deleting (in bytes). -LOCAL_C const TInt KEstimatedDeleteFfsOverhead = 48 * 1024; - - - -//KFeatureIdIPv6 -// #define KFeatureIdIPv6 KOtherFeatureFirst+88 - -// ================= MEMBER FUNCTIONS ======================= - -// --------------------------------------------------------- -// CApSettingsHandlerImpl::NewLC -// --------------------------------------------------------- -// -CApSettingsHandlerImpl* CApSettingsHandlerImpl::NewLC( - TBool aStartWithSelection, - TSelectionListType aListType, - TSelectionMenuType aSelMenuType, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TBool aNoEdit ) - { - APSETUILOGGER_CREATE; - - CApSettingsHandlerImpl* db = - new( ELeave ) CApSettingsHandlerImpl( aStartWithSelection, - aListType, - aSelMenuType, - aNoEdit ); - CleanupStack::PushL( db ); - - db->ConstructL( aIspFilter, aBearerFilter, aSortType ); - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::NewLC") - - return db; - } - - - - -// --------------------------------------------------------- -// CApSettingsHandlerImplImpl::NewLC -// --------------------------------------------------------- -// -CApSettingsHandlerImpl* CApSettingsHandlerImpl::NewLC( - CActiveApDb& aDb, - TBool aStartWithSelection, - TSelectionListType aListType, - TSelectionMenuType aSelMenuType, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TBool aNoEdit - ) - { - APSETUILOGGER_CREATE; - - CApSettingsHandlerImpl* db = - new( ELeave ) CApSettingsHandlerImpl( aStartWithSelection, - aListType, - aSelMenuType, - aNoEdit ); - CleanupStack::PushL( db ); - - db->ConstructL( aDb, aIspFilter, aBearerFilter, aSortType ); - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::NewLC2") - - return db; - } - - - -// --------------------------------------------------------- -// CApSettingsHandlerImpl::NewLC -// --------------------------------------------------------- -// -CApSettingsHandlerImpl* CApSettingsHandlerImpl::NewLC( - TBool aStartWithSelection, - TSelectionListType aListType, - TSelectionMenuType aSelMenuType, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TInt aReqIpvType, - TBool aNoEdit - ) - { - APSETUILOGGER_CREATE; - - CApSettingsHandlerImpl* db = - new( ELeave ) CApSettingsHandlerImpl( aStartWithSelection, - aListType, - aSelMenuType, - aReqIpvType, - aNoEdit - ); - CleanupStack::PushL( db ); - - db->ConstructL( aIspFilter, aBearerFilter, aSortType ); - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::NewLC3") - - return db; - } - - - - -// --------------------------------------------------------- -// CApSettingsHandlerImpl::NewLC -// --------------------------------------------------------- -// -CApSettingsHandlerImpl* CApSettingsHandlerImpl::NewLC( - CActiveApDb& aDb, - TBool aStartWithSelection, - TSelectionListType aListType, - TSelectionMenuType aSelMenuType, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TInt aReqIpvType, - TBool aNoEdit - ) - { - APSETUILOGGER_CREATE; - - CApSettingsHandlerImpl* db = - new( ELeave ) CApSettingsHandlerImpl( aStartWithSelection, - aListType, - aSelMenuType, - aReqIpvType, - aNoEdit - ); - CleanupStack::PushL( db ); - - db->ConstructL( aDb, aIspFilter, aBearerFilter, aSortType ); - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::NewLC4") - - return db; - } - - - - - -// --------------------------------------------------------- -// CApSettingsHandlerImpl::NewLC -// --------------------------------------------------------- -// -CApSettingsHandlerImpl* CApSettingsHandlerImpl::NewLC( - TBool aStartWithSelection, - TSelectionListType aListType, - TSelectionMenuType aSelMenuType, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TInt aReqIpvType, - TVpnFilterType aVpnFilterType, - TBool aNoEdit - ) - { - APSETUILOGGER_CREATE; - - CApSettingsHandlerImpl* db = - new( ELeave ) CApSettingsHandlerImpl( aStartWithSelection, - aListType, - aSelMenuType, - aReqIpvType, - aNoEdit - ); - CleanupStack::PushL( db ); - - db->ConstructL( aIspFilter, aBearerFilter, - aSortType, aVpnFilterType ); - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::NewLC5") - - return db; - } - - -// --------------------------------------------------------- -// CApSettingsHandlerImpl::NewLC -// --------------------------------------------------------- -// -CApSettingsHandlerImpl* CApSettingsHandlerImpl::NewLC( - CActiveApDb& aDb, - TBool aStartWithSelection, - TSelectionListType aListType, - TSelectionMenuType aSelMenuType, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TInt aReqIpvType, - TVpnFilterType aVpnFilterType, - TBool aNoEdit - ) - { - APSETUILOGGER_CREATE; - - CApSettingsHandlerImpl* db = - new( ELeave ) CApSettingsHandlerImpl( aStartWithSelection, - aListType, - aSelMenuType, - aReqIpvType, - aNoEdit - ); - CleanupStack::PushL( db ); - - db->ConstructL( aDb, aIspFilter, aBearerFilter, - aSortType, aVpnFilterType ); - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::NewLC6") - - return db; - } - - - - - - -// --------------------------------------------------------- -// CApSettingsHandlerImpl::NewLC -// --------------------------------------------------------- -// -CApSettingsHandlerImpl* CApSettingsHandlerImpl::NewLC( - CActiveApDb& aDb, - TBool aStartWithSelection, - TSelectionListType aListType, - TSelectionMenuType aSelMenuType, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TInt aReqIpvType, - TVpnFilterType aVpnFilterType, - TBool aIncludeEasyWlan, - TBool aNoEdit - ) - { - APSETUILOGGER_CREATE; - - CApSettingsHandlerImpl* db = - new( ELeave ) CApSettingsHandlerImpl( aStartWithSelection, - aListType, - aSelMenuType, - aReqIpvType, - aNoEdit - ); - CleanupStack::PushL( db ); - db->ConstructL( aDb, aIspFilter, aBearerFilter, - aSortType, aVpnFilterType, aIncludeEasyWlan ); - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::NewLC7") - - return db; - } - - - -// Destructor -CApSettingsHandlerImpl::~CApSettingsHandlerImpl() - { - APSETUILOGGER_DELETE; - - if ( iTextOverrides ) - { - delete iTextOverrides; - iTextOverrides = NULL; - APSETUILOGGER_WRITE( EAPI,"EApImpl::txtoverrides deleted"); - } - if ( iExt ) - { - if ( iExt->iResOffset ) - { - iModel->EikEnv()->DeleteResourceFile( iExt->iResOffset ); - APSETUILOGGER_WRITE( EAPI,"EApImpl::Resource file deleted"); - } - if ( iExt->iIsFeatureManagerInitialised ) - { - FeatureManager::UnInitializeLib(); - APSETUILOGGER_WRITE( EAPI,"EApImpl::FeatMan. uninitialised"); - } - } - - if ( iModel ) - { - delete iModel; - iModel = NULL; - } - - APSETUILOGGER_WRITE( EAPI,"EApImpl::imodel deleted"); - - delete iExt; - - APSETUILOGGER_WRITE( EAPI,"EApImpl::iext deleted"); - } - - -// Constructor -CApSettingsHandlerImpl::CApSettingsHandlerImpl( TBool aStartWithSelection, - TSelectionListType aListType, - TSelectionMenuType aSelMenuType, - TBool aNoEdit - ) -:iStartWithSelection( aStartWithSelection ), -iListType( aListType ), -iSelMenuType( aSelMenuType ), -iIspFilter( KEApIspTypeAll ), -iBearerFilter( EApBearerTypeAll ), -iReqIpvType( EIPv4 ), -iEventStore( KApUiEventNone ), -iNoEdit( aNoEdit ) - { - iHelpMajor = KHelpUidApSettingsHandler; - } - - - - - -// Constructor -CApSettingsHandlerImpl::CApSettingsHandlerImpl( TBool aStartWithSelection, - TSelectionListType aListType, - TSelectionMenuType aSelMenuType, - TInt aReqIpvType, - TBool aNoEdit - ) -:iStartWithSelection( aStartWithSelection ), -iListType( aListType ), -iSelMenuType( aSelMenuType ), -iIspFilter( KEApIspTypeAll ), -iBearerFilter( EApBearerTypeAll ), -iReqIpvType( aReqIpvType ), -iEventStore( KApUiEventNone ), -iNoEdit( aNoEdit ) - { - iHelpMajor = KHelpUidApSettingsHandler; - } - - - -// --------------------------------------------------------- -// CApSettingsHandlerImpl::ConstructL -// --------------------------------------------------------- -// -void CApSettingsHandlerImpl::ConstructL( TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType ) - { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::ConstructL") - - DoConstructL( NULL, aIspFilter, aBearerFilter, - aSortType, EVpnFilterBoth, EFalse ); - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::ConstructL") - } - - - -// --------------------------------------------------------- -// CApSettingsHandlerImpl::ConstructL -// --------------------------------------------------------- -// -void CApSettingsHandlerImpl::ConstructL( CActiveApDb& aDb, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType ) - { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::ConstructL2") - - DoConstructL( &aDb, aIspFilter, aBearerFilter, - aSortType, EVpnFilterBoth, EFalse ); - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::ConstructL2") - } - - - -// --------------------------------------------------------- -// CApSettingsHandlerImpl::ConstructL -// --------------------------------------------------------- -// -void CApSettingsHandlerImpl::ConstructL( - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TVpnFilterType aVpnFilterType - ) - { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::ConstructL3") - - DoConstructL( NULL, aIspFilter, aBearerFilter, - aSortType, aVpnFilterType, EFalse ); - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::ConstructL3") - } - - - -// --------------------------------------------------------- -// CApSettingsHandlerImpl::ConstructL -// --------------------------------------------------------- -// -void CApSettingsHandlerImpl::ConstructL( - CActiveApDb& aDb, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TVpnFilterType aVpnFilterType - ) - { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::ConstructL4") - - DoConstructL( &aDb, aIspFilter, aBearerFilter, - aSortType, aVpnFilterType, EFalse ); - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::ConstructL4") - } - - - - -// --------------------------------------------------------- -// CApSettingsHandlerImpl::ConstructL -// --------------------------------------------------------- -// -void CApSettingsHandlerImpl::ConstructL( - CActiveApDb& aDb, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TVpnFilterType aVpnFilterType, - TBool aIncludeEasyWlan - ) - { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::ConstructL5") - - DoConstructL( &aDb, aIspFilter, aBearerFilter, - aSortType, aVpnFilterType, aIncludeEasyWlan ); - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::ConstructL5") - } - - -// --------------------------------------------------------- -// CApSettingsHandlerImpl::SetFilter -// --------------------------------------------------------- -// -void CApSettingsHandlerImpl::SetFilterL( TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType ) - { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::SetFilterL") - - iIspFilter = aIspFilter; - iBearerFilter = aBearerFilter; - iExt->iSortType = aSortType; - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::SetFilterL") - } - - - - -// --------------------------------------------------------- -// CApSettingsHandlerImpl::SetTextOverrideL -// --------------------------------------------------------- -// -void CApSettingsHandlerImpl::SetTextOverrideL( TTextID aText2Change, - const TDesC& aNewText ) - { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::SetTextOverrideL") - - __ASSERT_DEBUG( iTextOverrides, Panic( ENullPointer ) ); - iTextOverrides->SetTextOverrideL( aText2Change, aNewText ); - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::SetTextOverrideL") - } - - -// --------------------------------------------------------- -// CApSettingsHandlerImpl::TextOverrideL -// --------------------------------------------------------- -// -const TDesC& CApSettingsHandlerImpl::TextOverrideL( TTextID aTextId ) - { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::TextOverrideL <- ->") - - __ASSERT_DEBUG( iTextOverrides, Panic( ENullPointer ) ); - return iTextOverrides->TextOverrideL( aTextId ); - } - - - -// --------------------------------------------------------- -// CApSettingsHandlerImpl::RunSettingsL -// --------------------------------------------------------- -// -TInt CApSettingsHandlerImpl::RunSettingsL( TUint32 aHighLight, - TUint32& aSelected ) - { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::RunSettingsL") - - // this function is only called from outside, need to init iEventStore - iEventStore = KApUiEventNone; - - TRAPD( err, HandleRunSettingsL( aHighLight, aSelected ) ); - if ( iEventStore & KApUiEventInternal ) - { - // internal 'exit', not an error, - // clear flag and return normally - iEventStore &= (~KApUiEventInternal); - } - else - { - User::LeaveIfError(err); - } - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::RunSettingsL") - - return iEventStore; - } - - - -// --------------------------------------------------------- -// CApSettingsHandlerImpl::Cvt() -// --------------------------------------------------------- -// -TInt CApSettingsHandlerImpl::Cvt() - { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::Cvt") - - return KErrNone; - } - - -// --------------------------------------------------------- -// CApSettingsHandlerImpl::DoRunSettingsL -// --------------------------------------------------------- -// -TInt CApSettingsHandlerImpl::DoRunSettingsL( TUint32 aHighLight, - TUint32& aSelected ) - { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::DoRunSettingsL") - - __ASSERT_DEBUG( iTextOverrides, Panic( ENullPointer ) ); - - if ( ( iListType == EApSettingsSelListIsPopUp ) || - ( iListType == EApSettingsSelListIsPopUpWithNone ) ) - { - DoRunSetPageSettingsL( aHighLight, aSelected ); - } - else - { - DoRunListSettingsL( aHighLight, aSelected ); - } - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::DoRunSettingsL") - return 0; - } - - -// --------------------------------------------------------- -// CApSettingsHandlerImpl::RunViewerL -// --------------------------------------------------------- -// -TInt CApSettingsHandlerImpl::RunViewerL( TUint32 aUid ) - { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::RunViewerL") - - // this function is only called from outside, need to init iEventStore - iEventStore = KApUiEventNone; - -#ifdef __TEST_OOMDEBUG - if ( iMemTestOn ) - { - TInt leavecode( KErrNoMemory ); - TInt ts( GetTestStateL() ); - - TBuf<48> buf; - buf.Format( _L("\r\n\t( ts: %d )"), ts ); - APSETUILOGGER_WRITE_BUF( EApImpl, buf ); - - if ( ts == KViewerTest ) - { - TBuf<48> buf; - APSETUILOGGER_WRITE_BUF( EApImpl, _L("Starting KViewerTest memtest") ); - - TUint32 rate( 0 ); - TUint32 retrycount( KOOMRetryCount ); - TUint32 retryoffset( KOOMRetryOffset ); - for ( - rate = 1; - ((rate < 50000) && (leavecode == KErrNoMemory)) - || retrycount; - rate++ - ) - { - __UHEAP_SETFAIL( RHeap::EDeterministic, rate ); - TRAP( leavecode, DoRunViewerL( aUid ) ); - __UHEAP_RESET; - if ( !leavecode ) - { - retrycount--; - rate += retryoffset; - } - } - User::LeaveIfError( leavecode ); - buf.Format( _L("\t Memtest finished, max. rate was: %d )"), rate ); - APSETUILOGGER_WRITE_BUF( EApImpl, buf ); - } - else - { - DoRunViewerL( aUid ); - } - } - else - { - DoRunViewerL( aUid ); - } -#else - DoRunViewerL( aUid ); -#endif // __TEST_OOMDEBUG - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::RunViewerL") - - return iEventStore; - } - - - -// --------------------------------------------------------- -// CApSettingsHandlerImpl::DoRunViewerL -// --------------------------------------------------------- -// -TInt CApSettingsHandlerImpl::DoRunViewerL( TUint32 aUid ) - { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::DoRunViewerL") - - TInt retval( KErrNone ); - - TBool protSupported = FeatureManager::FeatureSupported( - KFeatureIdSettingsProtection ); - - - TTransactionResult ownTransaction = iModel->StartTransactionLC - ( - /*aWrite*/EFalse, - /*aShowNote*/ETrue, - /*aRetry*/ETrue - ); - if ( ownTransaction != EFailedWithLocked ) - { - TBool isinuse = iModel->ApUtils()->IsAPInUseL( aUid ); - TBool isprotected(EFalse); - if ( protSupported ) - { - isprotected = iModel->ApUtils()->IsReadOnlyL( aUid ); - isprotected |= CApProtHandler::IsTableProtectedL( - iModel->Database()->Database() ); - } - - TBool isvpn = iModel->VpnEngine()->IsVpnApL( aUid ); - - if ( ownTransaction == EOwnTransaction ) - { - TInt err = iModel->CommitTransaction(); - User::LeaveIfError( err ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - if ( isinuse ) - { - // Ap is in use right now, can not edit or delete, - // show information note qtn_set_note_iap_in_use - ShowNoteL( R_APUI_NOTE_AP_IN_USE_EDIT ); - } - else - { - if ( protSupported && isprotected ) - { - ShowNoteL( R_APUI_NOTE_PROTECTED_AP_SETT ); - } - else - { // not in use, not protected, check if it is vpn - if ( isvpn ) - { - ShowNoteL( R_APUI_NOTE_VPN_AP_SETT ); - } - else - { // may start wondering about editing... - TApBearerType bearer = iModel->ApUtils()->BearerTypeL( aUid ); -#ifdef __TEST_LAN_BEARER - if ( bearer == EApBearerTypeLAN ) - { - User::Leave( KErrNotSupported ); - // ShowNoteL( R_APUI_AP_LAN_NOT_SUPPORTED ); - // Leave needed? - } - else - { - CApSettingsDlg* iMyDialog = - CApSettingsDlg::NewL( iIspFilter, - iBearerFilter, - iExt->iSortType, - iEventStore, - iReqIpvType - ); - - iMyDialog->SetTextOverrides( iTextOverrides ); - - retval = iMyDialog->ConstructAndRunLD( - *iModel, *this, aUid ); - } -#else - if ( bearer == EApBearerTypeLANModem ) - { - User::Leave( KErrNotSupported ); - // ShowNoteL( R_APUI_AP_LAN_NOT_SUPPORTED ); - // Leave needed? - } - else - { - CApSettingsDlg* iMyDialog = - CApSettingsDlg::NewL( iIspFilter, - iBearerFilter, - iExt->iSortType, - iEventStore, - iReqIpvType - ); - - iMyDialog->SetTextOverrides( iTextOverrides ); - - retval = iMyDialog->ConstructAndRunLD( - *iModel, *this, aUid ); - } -#endif // __TEST_LAN_BEARER - } - } - } - } - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::DoRunViewerL") - - return retval; - } - - - -//---------------------------------------------------------- -// CApSettingsHandlerImpl::HandleApDeleteCmdL -//---------------------------------------------------------- -// -void CApSettingsHandlerImpl::HandleApDeleteCmdL( TUint32 aUid, TBool aIsLast ) - { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::HandleApDeleteCmdL") - - // OOD handling. If disk space is low, - // we try to get some spare. - RFs fs; - User::LeaveIfError( fs.Connect() ); - CleanupClosePushL( fs ); - TBool diskLow = SysUtil::FFSSpaceBelowCriticalLevelL - ( &fs, KEstimatedDeleteFfsOverhead ); - - RSharedDataClient sdClient; - if ( diskLow ) - { - User::LeaveIfError( sdClient.Connect() ); - CleanupClosePushL( sdClient ); - sdClient.RequestFreeDiskSpaceLC - ( KEstimatedDeleteFfsOverhead ); - } - - // check that the Ap is not used so it can be deleted!! - TTransactionResult ownTransaction = iModel->StartTransactionLC( - /*aWrite*/EFalse, - /*aShowNote*/ETrue, - /*aRetry*/ETrue ); - if ( ownTransaction != EFailedWithLocked ) - { - TBool isinuse = iModel->ApUtils()->IsAPInUseL( aUid ); - TApBearerType bearer = iModel->ApUtils()->BearerTypeL( aUid ); -#ifdef __TEST_LAN_BEARER - if ( bearer == EApBearerTypeLAN ) - { - User::Leave( KErrNotSupported ); - } -#endif // __TEST_LAN_BEARER - if ( bearer == EApBearerTypeLANModem ) - { - User::Leave( KErrNotSupported ); - // Leave needed? - } - - TBool protSupported = FeatureManager::FeatureSupported( - KFeatureIdSettingsProtection ); - TBool isprotected(EFalse); - if ( protSupported ) - { - isprotected = iModel->ApUtils()->IsReadOnlyL( aUid ); - } - - if ( ownTransaction == EOwnTransaction ) - { - TInt err = iModel->CommitTransaction(); - User::LeaveIfError( err ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - if ( isinuse ) - { - // Ap is in use right now, can not edit or delete, - // show information note qtn_set_note_iap_in_use - ShowNoteL( R_APUI_NOTE_AP_IN_USE_DELETE ); - } - else - { // not in use, maybe protected? - if ( protSupported && isprotected ) - { - ShowNoteL( R_APUI_NOTE_PROTECTED_AP ); - } - else - { // not in use or protected, may start wondering about delete... - // need to check whether it is the last one... - TBool candelete( ETrue ); - // Linked to VPN? - TBool isvpn = iModel->VpnEngine()->IsVpnApL( aUid ); - if ( !isvpn ) - { - if ( iExt->iVariant & KApUiEditOnlyVPNs ) - { - candelete = EFalse; - } - else - { - HBufC* sgd = NULL; - sgd = iModel->GetLinkedVpnAccessPointLC( aUid ); - if ( sgd ) - {// has linked VPN, - // According to current spec. there should - // be something like linked to VPN, Delete? - // BUT it causes incomplete access point to exist - // hard to handle, therefore last minute change - // is that it can not be delted. - /* - if ( !AskQueryL( R_APUI_IAP_DEL_IAP_ASSOCIATED, sgd ) ) - { - candelete = EFalse; - } - */ - ShowNoteL( R_APUI_NOTE_AP_IN_USE_DELETE ); - candelete = EFalse; - - CleanupStack::PopAndDestroy( sgd ); - } - else - { // simply confirm - candelete = ConfirmDeleteL( aUid, aIsLast ); - } - } - } - else - { // simply confirm - candelete = ConfirmDeleteL( aUid, aIsLast ); - } - if ( candelete ) - { // seems that we can delete it, so let's go on - iModel->RemoveApL( aUid ); - iEventStore |= KApUiEventDeleted; - } - } - } - } - - if ( diskLow ) - { - // Cancel RequestFreeDiskSpaceLC (by popping off an destroy); - // close sdClient. - CleanupStack::PopAndDestroy( 2 ); - } - CleanupStack::PopAndDestroy(); // fs, will also close it - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::HandleApDeleteCmdL") - } - - -//---------------------------------------------------------- -// CApSettingsHandlerImpl::HandleApBlankNewL -//---------------------------------------------------------- -// -TUint32 CApSettingsHandlerImpl::HandleApBlankNewL( TInt aBearers, TInt aIsps ) - { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::HandleApBlankNewL") - - TUint32 retval( KErrNone ); - -#ifdef __TEST_OOMDEBUG - if ( iMemTestOn ) - { - TInt leavecode( KErrNoMemory ); - - TInt ts( GetTestStateL() ); - - if ( ts == KCreateBlankTest ) - { - TBuf<48> buf; - APSETUILOGGER_WRITE_BUF( EApImpl, _L("Starting KCreateBlankTest memtest") ); - - TUint32 rate( 0 ); - TUint32 retrycount( KOOMRetryCount ); - TUint32 retryoffset( KOOMRetryOffset ); - for ( - rate = 1; - ((rate < 50000) && (leavecode == KErrNoMemory)) - || retrycount; - rate++ - ) - { - __UHEAP_SETFAIL( RHeap::EDeterministic, rate ); - TRAP( leavecode, - retval = DoHandleApBlankNewL( aBearers, aIsps ) ); - __UHEAP_RESET; - if ( !leavecode ) - { - retrycount--; - rate += retryoffset; - } - } - User::LeaveIfError( leavecode ); - buf.Format( _L("\t Memtest finished, max. rate was: %d )"), rate ); - APSETUILOGGER_WRITE_BUF( EApImpl, buf ); - } - else - { - retval = DoHandleApBlankNewL( aBearers, aIsps ); - } - } - else - { - retval = DoHandleApBlankNewL( aBearers, aIsps ); - } -#else - retval = DoHandleApBlankNewL( aBearers, aIsps ); -#endif // __TEST_OOMDEBUG - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::HandleApBlankNewL") - return retval; - } - - - - -//---------------------------------------------------------- -// CApSettingsHandlerImpl::HandleApUseOldNewL -//---------------------------------------------------------- -// -TUint32 CApSettingsHandlerImpl::HandleApUseOldNewL() - { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::HandleApUseOldNewL") - - TUint32 retval = KErrNone; - -#ifdef __TEST_OOMDEBUG - if ( iMemTestOn ) - { - TInt leavecode( KErrNoMemory ); - TInt ts( GetTestStateL() ); - - TBuf<48> buf; - buf.Format( _L("\r\n\t( ts: %d )"), ts ); - APSETUILOGGER_WRITE_BUF( EApImpl, buf ); - - if ( ts == KQueryTest ) - { - TBuf<48> buf; - APSETUILOGGER_WRITE_BUF( EApImpl, _L("Starting KQueryTest memtest") ); - TUint32 rate( 0 ); - TUint32 retrycount( KOOMRetryCount ); - TUint32 retryoffset( KOOMRetryOffset ); - for ( - rate = 1; - ((rate < 50000) && (leavecode == KErrNoMemory)) - || retrycount; - rate++ - ) - { - __UHEAP_MARK; - __UHEAP_SETFAIL( RHeap::EDeterministic, rate ); - TRAP( leavecode, retval = SelectApToCopyL() ); - __UHEAP_RESET; - __UHEAP_MARKEND; - if ( !leavecode ) - { - retrycount--; - rate += retryoffset; - } - } - User::LeaveIfError( leavecode ); - buf.Format( _L("\t Memtest finished, max. rate was: %d )"), rate ); - APSETUILOGGER_WRITE_BUF( EApImpl, buf ); - } - else - { - retval = SelectApToCopyL(); - } - } - else - { - retval = SelectApToCopyL(); - } -#else - retval = SelectApToCopyL(); -#endif // __TEST_OOMDEBUG - - if ( retval != (TUint32)KErrNone ) - { // so user had chosen something -#ifdef __TEST_OOMDEBUG - if ( iMemTestOn ) - { - TInt leavecode( KErrNoMemory ); - TInt ts( GetTestStateL() ); - if ( ts == KCreateUseExistTest ) - { - TBuf<48> buf; - APSETUILOGGER_WRITE_BUF - ( _L("Starting KCreateUseExistTest memtest") ); - TUint32 rate( 0 ); - TUint32 retrycount( KOOMRetryCount ); - TUint32 retryoffset( KOOMRetryOffset ); - for ( - rate = 1; - ((rate < 50000) && (leavecode == KErrNoMemory)) - || retrycount; - rate++ - ) - { - __UHEAP_SETFAIL( RHeap::EDeterministic, rate ); - TRAP( leavecode, retval = DoHandleApUseOldNewL( retval ) ); - __UHEAP_RESET; - if ( !leavecode ) - { - retrycount--; - rate += retryoffset; - } - } - User::LeaveIfError( leavecode ); - buf.Format( _L("\t Memtest finished, max. rate was: %d )"), - rate ); - APSETUILOGGER_WRITE_BUF( EApImpl, buf ); - } - else - { - retval = DoHandleApUseOldNewL( retval ); - } - } - else - { - retval = DoHandleApUseOldNewL( retval ); - } -#else - retval = DoHandleApUseOldNewL( retval ); -#endif // __TEST_OOMDEBUG - } - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::HandleApUseOldNewL") - - return retval; - } - - - -//---------------------------------------------------------- -// CApSettingsHandlerImpl::EditAfterCreateL -//---------------------------------------------------------- -// -TUint32 CApSettingsHandlerImpl::EditAfterCreateL( TUint32 aUid, - CApAccessPointItem* aItem ) - { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::EditAfterCreateL") - - CApSettingsDlg* iMySetDialog = CApSettingsDlg::NewL - ( - KEApIspTypeAll, - EApBearerTypeAll, - KEApSortNameAscending, - iEventStore, - iReqIpvType - ); - - iMySetDialog->SetTextOverrides( iTextOverrides ); - iMySetDialog->ConstructAndRunLD( *iModel, *this, aUid, aItem ); - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::EditAfterCreateL") - - return aUid; - } - - - -//---------------------------------------------------------- -// CApSettingsHandlerImpl::DoConstructL -//---------------------------------------------------------- -// -void CApSettingsHandlerImpl::DoConstructL( CActiveApDb* aDb, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TVpnFilterType aVpnFilterType, - TBool aIncludeEasyWlan ) - { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::DoConstructL") - - iExt = new ( ELeave )TApSetHandlerImplExtra; - iExt->iResOffset = 0; - iExt->iIsIpv6Supported = EFalse; - iExt->iIsFeatureManagerInitialised = EFalse; - iExt->iExtra = 0; - iExt->iSortType = KEApSortNameAscending; - iExt->iVpnFilterType = aVpnFilterType; - iExt->iVariant = GetVariantL(); - iExt->iIncludeEasyWlan = aIncludeEasyWlan; - -#ifdef __TEST_CDMA_WRITE_PROTECT - iExt->iVariant |= KApUiEditOnlyVPNs; -#endif // __TEST_CDMA_WRITE_PROTECT - iIspFilter = KEApIspTypeAll; - iBearerFilter = aBearerFilter; - - // get IPv6 features from feature manager - FeatureManager::InitializeLibL(); - iExt->iIsFeatureManagerInitialised = ETrue; - - iExt->iIsIpv6Supported = - FeatureManager::FeatureSupported( KFeatureIdIPv6 ); -#ifdef __TEST_IPV6_SUPPORT - iExt->iIsIpv6Supported = ETrue; -#endif // __TEST_IPV6_SUPPORT - - // we ask IPv6 only if it is asked by client AND supported by the phone - iReqIpvType = iExt->iIsIpv6Supported ? iReqIpvType : EIPv4; - - -#ifdef __TEST_OOMDEBUG - RFs fs; - User::LeaveIfError( fs.Connect() ); - CleanupClosePushL( fs ); - TUint att; - if ( fs.Att( KTestFileName, att ) == KErrNone ) - { - iMemTestOn = ETrue; - } - else - { - iMemTestOn = EFalse; - } - CleanupStack::PopAndDestroy(); // fs, will also close it -#endif // __TEST_OOMDEBUG - iTextOverrides = CTextOverrides::NewL(); - // No need to PushL( iTextOverrides ), it's pointer is owned - // & will be deleted in destructor, because 'this' is already - // on the CleanupStack... - if ( aDb ) - { - iModel = CApSettingsModel::NewL( *aDb, aIspFilter, - aBearerFilter, aSortType, - iReqIpvType, - iExt->iVpnFilterType, - iExt->iVariant, - iExt->iIncludeEasyWlan, - iNoEdit ); - } - else - { - iModel = CApSettingsModel::NewL( aIspFilter, aBearerFilter, - aSortType, iReqIpvType, - iExt->iVpnFilterType, - iExt->iVariant, - iExt->iIncludeEasyWlan, - iNoEdit ); - } - SetFilterL( aIspFilter, aBearerFilter, aSortType ); - - // can't use resource here because it has not been added yet.... - TFileName resourceFile; - resourceFile.Append( KApSettingsResDriveZ ); - resourceFile.Append( KDC_RESOURCE_FILES_DIR ); - resourceFile.Append( KApSettingsResFileName ); - BaflUtils::NearestLanguageFile( iModel->EikEnv()->FsSession(), - resourceFile ); - // as we are not an Application having iCoeEnv, we must figure it out, - // no matter what it takes. Also it is getted once per construction... - iExt->iResOffset = iModel->EikEnv()->AddResourceFileL( resourceFile ); - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::DoConstructL") - } - - - - -//---------------------------------------------------------- -// CApSettingsHandlerImpl::DoRunSetPageSettingsL -//---------------------------------------------------------- -// -void CApSettingsHandlerImpl::DoRunSetPageSettingsL( TUint32 aHighLight, - TUint32& aSelected ) - { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::DoRunSetPageSettingsL") - - TInt aHigh = aHighLight; - - HBufC* titlebuf; - - if ( iTextOverrides->IsTextOverridenL( EPopupPromptText ) ) - { - titlebuf = iTextOverrides->TextOverrideL( - EPopupPromptText - ).AllocLC(); - } - else - { - titlebuf = iModel->EikEnv()->AllocReadResourceLC - ( - R_APUI_VIEW_DEFAULT_AP - ); - } - /* - * We need to pass an int& as starting selection to - * CAknRadioButtonSettingPage - * But we use preferred UID & not list-item nuber... - * Also it sets selection in it's ConstructL() but our list is filled - * up dynamically and it must be done after ConstructL() - * (list must be already constructed...) - * Therefore we pass a dummy int& initialized to 0 as - * selecting the 0th element does no harm... - */ - TInt Dummy( -1 ); - // needs this Dummy array to pass it to CAknSettingPage's constructor... - CDesCArrayFlat* aItemArray = new ( ELeave ) CDesCArrayFlat( 1 ); - CleanupStack::PushL( aItemArray ); - CApSelPopupList* dlg = CApSelPopupList::NewL - ( - *iModel, - *this, - Dummy, - aHigh, - iSelMenuType, - iIspFilter, - iBearerFilter, - iExt->iSortType, - iEventStore, - aItemArray, - iListType == EApSettingsSelListIsPopUpWithNone, - iReqIpvType, - iExt->iVpnFilterType, - iExt->iIncludeEasyWlan, - iNoEdit - ); - CleanupStack::PushL( dlg ); - TPtrC ptr( titlebuf->Des() ); - dlg->SetSettingTextL( ptr ); - // dlg must be Pop-ed because ExecuteLD starts with PushL()... - CleanupStack::Pop(); - if ( dlg->ExecuteLD( CAknSettingPage::EUpdateWhenChanged ) ) - { - aSelected = aHigh; - } - CleanupStack::PopAndDestroy( 2 ); // aItemArray, titlebuf - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::DoRunSetPageSettingsL") - } - - - -//---------------------------------------------------------- -// CApSettingsHandlerImpl::DoRunListSettingsL -//---------------------------------------------------------- -// -void CApSettingsHandlerImpl::DoRunListSettingsL( TUint32 aHighLight, - TUint32& aSelected ) - { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::DoRunListSettingsL") - - CApSelectorDialog* iMyDialog = CApSelectorDialog::NewL - ( - iListType, - iSelMenuType, - iIspFilter, - iBearerFilter, - iExt->iSortType, - iEventStore, - iNoEdit, - iReqIpvType - ); - iMyDialog->SetTextOverrides( iTextOverrides ); - - iMyDialog->ConstructAndRunLD( *iModel, *this, aHighLight, aSelected ); - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::DoRunListSettingsL") - } - - - -//---------------------------------------------------------- -// CApSettingsHandlerImpl::DoHandleApUseOldNewL -//---------------------------------------------------------- -// -TUint32 CApSettingsHandlerImpl::DoHandleApUseOldNewL( TUint32 aSelected ) - { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::DoHandleApUseOldNewL") - - TInt retval = KErrNone; - - TTransactionResult ownTransaction = iModel->StartTransactionLC - ( /*aWrite*/ETrue, - /*aShowNote*/ETrue, - /*aRetry*/ETrue - ); - if ( ownTransaction != EFailedWithLocked ) - { - // check the original bearer's type - TApBearerType bearer = iModel->ApUtils()->BearerTypeL( aSelected ); -#ifdef __TEST_LAN_BEARER - if ( bearer == EApBearerTypeLAN ) - { - User::Leave( KErrNotSupported ); -// ShowNoteL( R_APUI_AP_LAN_NOT_SUPPORTED ); -// User::Leave( KLeaveWithoutAlert ); - } -#endif // __TEST_LAN_BEARER - if ( bearer == EApBearerTypeLANModem ) - { - User::Leave( KErrNotSupported ); -// ShowNoteL( R_APUI_AP_LAN_NOT_SUPPORTED ); -// User::Leave( KLeaveWithoutAlert ); - } - TBool isprotected( EFalse ); - - TBool protSupported = FeatureManager::FeatureSupported( - KFeatureIdSettingsProtection ); - - if ( protSupported ) - { - isprotected = iModel->ApUtils()->IsReadOnlyL( aSelected ); - isprotected |= CApProtHandler::IsTableProtectedL( - iModel->Database()->Database() ); - } - if ( isprotected ) - { - ShowNoteL( R_APUI_NOTE_PROTECTED_AP_SETT ); - } - if ( !isprotected ) - { - TUint32 aUid = iModel->DataHandler()->CreateCopyFromL( aSelected ); - if ( ownTransaction == EOwnTransaction ) - { - TInt err = iModel->CommitTransaction(); - User::LeaveIfError( err ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - iEventStore |= KApUiEventCreatedUsedOld; - retval = aUid; - EditAfterCreateL( aUid ); - } - else - { - if ( ownTransaction == EOwnTransaction ) - { - TInt err = iModel->CommitTransaction(); - User::LeaveIfError( err ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - } - } - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::DoHandleApUseOldNewL") - return retval; - } - - - -//---------------------------------------------------------- -// CApSettingsHandlerImpl::SelectApToCopyL -//---------------------------------------------------------- -// -TUint32 CApSettingsHandlerImpl::SelectApToCopyL() - { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::SelectApToCopyL") - - // = KErrNone just to suppress compiler warning C4701 - TUint32 aSelected = KErrNone; - TUint32 retval = KErrNone; - - CApSelQueryDialog* dlg = new ( ELeave ) CApSelQueryDialog( *iModel, - &aSelected ); - TInt iQueryOk = dlg->ExecuteLD( R_LIST_QUERY ); - if ( iQueryOk ) - { - retval = aSelected; - } - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::SelectApToCopyL") - return retval; - } - - - - - -//---------------------------------------------------------- -// CApSettingsHandlerImpl::DoHandleApBlankNewL -//---------------------------------------------------------- -// -TUint32 CApSettingsHandlerImpl::DoHandleApBlankNewL( TInt aBearers, TInt aIsps ) - { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::DoHandleApBlankNewL") - - CApAccessPointItem* apitem = CApAccessPointItem::NewLC(); -/* -KEApIspTypeInternetOnly: - EApBearerTypeCSD, EApBearerTypeHSCSD, EApBearerTypeGPRS - -KEApIspTypeInternetAndWAP - EApBearerTypeCSD, EApBearerTypeHSCSD, EApBearerTypeGPRS - -KEApIspTypeWAPOnly - EApBearerTypeCSD, EApBearerTypeHSCSD, EApBearerTypeSMS, EApBearerTypeGPRS - -KEApIspTypeWAPMandatory - EApBearerTypeCSD, EApBearerTypeHSCSD, EApBearerTypeSMS, EApBearerTypeGPRS - -KEApIspTypeAll - All - - - EIspTypeInternetOnly, - EIspTypeWAPOnly, - EIspTypeInternetAndWAP - -*/ - ChooseBearerTypeL( aBearers, *apitem ); - - if ( aIsps & KEApIspTypeAll ) - { - apitem->WriteUint( EApIspIspType, EIspTypeInternetAndWAP ); - } - else - { - if ( aIsps & KEApIspTypeWAPOnly ) - { // EApBearerTypeCSD, EApBearerTypeHSCSD, EApBearerTypeGPRS, - apitem->WriteUint( EApIspIspType, EIspTypeWAPOnly ); - } - else - { - if ( aIsps & - ( KEApIspTypeWAPMandatory | KEApIspTypeMMSMandatory ) ) - { // EApBearerTypeCSD, EApBearerTypeHSCSD, EApBearerTypeGPRS - apitem->WriteUint( EApIspIspType, EIspTypeInternetAndWAP ); - } - else - { - if ( aIsps & KEApIspTypeInternetAndWAP ) - { - apitem->WriteUint( EApIspIspType, EIspTypeInternetAndWAP ); - } - else - { - if ( aIsps & KEApIspTypeInternetOnly ) - { - apitem->WriteUint( EApIspIspType, - EIspTypeInternetOnly ); - } - else - { - __ASSERT_DEBUG( EFalse, Panic( EInvalidIspRequest ) ); - } - } - } - } - } -/* -KEApIspTypeInternetOnly -KEApIspTypeWAPOnly -KEApIspTypeInternetAndWAP -KEApIspTypeWAPMandatory -KEApIspTypeAll -*/ - -// apitem->WriteUint( EApIspIspType, EIspTypeInternetOnly ); - - TUint32 aUid( KApNoneUID ); - HBufC* buf = HBufC::NewLC( KApMaxConnNameLength ); - TPtr16 ptr( buf->Des() ); - apitem->ReadTextL( EApWapAccessPointName, ptr ); - - TTransactionResult ownTransaction = iModel->StartTransactionLC( - ETrue, // aWrite - ETrue, // aShowNote - ETrue ); // aRetry - if ( ownTransaction != EFailedWithLocked ) - { - if ( iModel->ApUtils()->MakeValidNameL( ptr ) ) - { - apitem->SetNamesL( ptr ); - } - if ( ownTransaction == EOwnTransaction ) - { - TInt err = iModel->CommitTransaction(); - User::LeaveIfError( err ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - } - - aUid = EditAfterCreateL( KApNoneUID, apitem ); - CleanupStack::PopAndDestroy( 2 ); // apitem, buf - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::DoHandleApBlankNewL") - return aUid; - } - - - - -//---------------------------------------------------------- -// CApSettingsHandlerImpl::HandleNetworkDeleteCmdL -//---------------------------------------------------------- -// -void CApSettingsHandlerImpl::HandleNetworkDeleteCmdL( TUint32 aUid ) - { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::HandleNetworkDeleteCmdL") - - // check that the Ap is not used so it can be deleted!! - TTransactionResult ownTransaction = iModel->StartTransactionLC( - /*aWrite*/EFalse, - /*aShowNote*/ETrue, - /*aRetry*/ETrue ); - if ( ownTransaction != EFailedWithLocked ) - { - TBool protSupported = FeatureManager::FeatureSupported( - KFeatureIdSettingsProtection ); - if ( protSupported ) - { - TBool isprotected = iModel->ApUtils()->IsReadOnlyL( aUid ); - if ( isprotected ) - { - ShowNoteL( R_APUI_NOTE_PROTECTED_AP ); - return; - } - } - if ( ownTransaction == EOwnTransaction ) - { - TInt err = iModel->CommitTransaction(); - User::LeaveIfError( err ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - // not protected, may start wondering about delete... - // simply confirm - - // OOD handling. If disk space is low, - // we try to get some spare. - RFs fs; - User::LeaveIfError( fs.Connect() ); - CleanupClosePushL( fs ); - TBool diskLow = SysUtil::FFSSpaceBelowCriticalLevelL - ( &fs, KEstimatedDeleteFfsOverhead ); - RSharedDataClient sdClient; - if ( diskLow ) - { - User::LeaveIfError( sdClient.Connect() ); - CleanupClosePushL( sdClient ); - sdClient.RequestFreeDiskSpaceLC - ( KEstimatedDeleteFfsOverhead ); - } - // Handle getting the name, showing the query, - // and deleting the network group. - // get the name: - CApNetworkItem* net = CApNetworkItem::NewLC(); - iModel->DataHandler()->ReadNetworkL( aUid, *net ); - HBufC* buf = net->Name().AllocLC(); - if ( AskQueryL( R_APUI_IAP_ARE_YOU_SURE_TO_DEL, buf ) ) - { - iModel->DataHandler()->RemoveNetworkL( aUid ); - } - CleanupStack::PopAndDestroy( buf ); // buf - CleanupStack::PopAndDestroy( net ); - if ( diskLow ) - { - // Cancel RequestFreeDiskSpaceLC (by popping off an destroy); - // close scClient. - CleanupStack::PopAndDestroy( 2 ); - } - CleanupStack::PopAndDestroy(); // fs, will also close it - } - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::HandleNetworkDeleteCmdL") - } - - - -//---------------------------------------------------------- -// CApSettingsHandlerImpl::GetVariantL -//---------------------------------------------------------- -// -TInt CApSettingsHandlerImpl::GetVariantL() - { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::GetVariantL") - - TInt variant( 0 ); - // Connecting and initialization: - CRepository* repository = - CRepository::NewL( KCRUidApSettingsHandlerUiLV ); - repository->Get( KApSettingsHandlerUiLVFlags, variant ); - delete repository; - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::GetVariantL") - return variant; - } - - -//---------------------------------------------------------- -// CApSettingsHandlerImpl::ConfirmDeleteL -//---------------------------------------------------------- -// -TInt CApSettingsHandlerImpl::ConfirmDeleteL( TUint32 aUid, TBool aIsLast ) - { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::ConfirmDeleteL") - - TInt retval( 0 ); - HBufC* sgd = HBufC::NewLC( KModifiableTextLength ); - TPtr ptr( sgd->Des() ); - - // OOD handling. If disk space is low, - // we try to get some spare. - RFs fs; - User::LeaveIfError( fs.Connect() ); - CleanupClosePushL( fs ); - TBool diskLow = SysUtil::FFSSpaceBelowCriticalLevelL - ( &fs, KEstimatedDeleteFfsOverhead ); - - RSharedDataClient sdClient; - if ( diskLow ) - { - User::LeaveIfError( sdClient.Connect() ); - CleanupClosePushL( sdClient ); - sdClient.RequestFreeDiskSpaceLC - ( KEstimatedDeleteFfsOverhead ); - } - - TTransactionResult ownTransaction = iModel->StartTransactionLC - ( - /*aWrite*/ETrue, - /*aShowNote*/ETrue, - /*aRetry*/ETrue, - /*aLFFSChecking*/EFalse - ); - if ( ownTransaction != EFailedWithLocked ) - { - iModel->ApUtils()->NameL( aUid, ptr ); - if ( ownTransaction == EOwnTransaction ) - { - TInt err = iModel->CommitTransaction(); - User::LeaveIfError( err ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - if ( aIsLast ) - { // we are deleting the last one, needs to confirm - retval = AskQueryL( R_APUI_IAP_DEL_LAST_AP, sgd ); - } - else - { // not the last one, simply confirm - // handle exotic language number conversion here - TPtr t(sgd->Des()); - AknTextUtils::LanguageSpecificNumberConversion( t ); - retval = AskQueryL( R_APUI_IAP_ARE_YOU_SURE_TO_DEL, sgd ); - } - } - - - CleanupStack::PopAndDestroy(); // sgd - if ( diskLow ) - { - // Cancel RequestFreeDiskSpaceLC (by popping off an destroy); - // close scClient. - CleanupStack::PopAndDestroy( 2 ); - } - CleanupStack::PopAndDestroy(); // fs, will also close it - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::ConfirmDeleteL") - return retval; - } - - - - - -//---------------------------------------------------------- -// CApSettingsHandlerImpl::HandleRunSettingsL -//---------------------------------------------------------- -// -void CApSettingsHandlerImpl::HandleRunSettingsL( TUint32 aHighLight, - TUint32& aSelected ) - { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::HandleRunSettingsL") - - if ( iStartWithSelection == EFalse ) - { - RunViewerL( aHighLight ); - } - else - { -#ifdef __TEST_OOMDEBUG - if ( iMemTestOn ) - { - TInt leavecode( KErrNoMemory ); - TInt state( GetTestStateL() ); - - if ( ( ( - ( iListType == EApSettingsSelListIsPopUp ) || - ( iListType == EApSettingsSelListIsPopUpWithNone ) ) && - ( state == KPopupListTest ) ) - || - ( - ( iListType == EApSettingsSelListIsListPane ) && - ( state == KDialogListTest ) ) ) - { - TBuf<48> buf; - if ( state == KDialogListTest ) - { - APSETUILOGGER_WRITE_BUF( EApImpl, \ - _L("Doing memtest KDialogListTest") ); - } - if ( state == KPopupListTest ) - { - APSETUILOGGER_WRITE_BUF( EApImpl, \ - _L("Doing memtest KPopupListTest") ); - } - TUint32 rate( 0 ); - TUint32 retrycount( KOOMRetryCount ); - TUint32 retryoffset( KOOMRetryOffset ); - for ( - rate = 1; - ((rate < 50000) && (leavecode == KErrNoMemory)) - || retrycount; - rate++ - ) - { - __UHEAP_SETFAIL( RHeap::EDeterministic, rate ); - TRAP( leavecode, - DoRunSettingsL( aHighLight, aSelected ) ); - __UHEAP_RESET; - if ( !leavecode ) - { - retrycount--; - rate += retryoffset; - } - } - User::LeaveIfError( leavecode ); - buf.Format( _L("\t Memtest finished, max. rate was: %d )"), - rate ); - APSETUILOGGER_WRITE_BUF( EApImpl, buf ); - } - else - { - DoRunSettingsL( aHighLight, aSelected ); - } - } - else - { - DoRunSettingsL( aHighLight, aSelected ); - } -#else - DoRunSettingsL( aHighLight, aSelected ); -#endif // __TEST_OOMDEBUG - } - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::HandleRunSettingsL") - } - - -//---------------------------------------------------------- -// CApSettingsHandlerImpl::ChooseBearerTypeL -//---------------------------------------------------------- -// -void CApSettingsHandlerImpl::ChooseBearerTypeL( TInt aBearers, - CApAccessPointItem& aItem ) - { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::ChooseBearerTypeL") - - // Check for support in each case!!!!! - TBool gprssupported = ETrue; - TBool csdsupported = ETrue; // OK - TBool hscsdsupported = ETrue; // NO WAY TO CHECK IT - TBool wlansupported = ETrue; // OK - TBool lansupported = ETrue; // NO WAY TO CHECK IT - TBool lanmodemsupported = ETrue; // NO WAY TO CHECK IT - TBool cdmasupported = ETrue; // OK - - if ( iExt->iIsFeatureManagerInitialised ) - { - cdmasupported = FeatureManager::FeatureSupported( KFeatureIdProtocolWcdma ); - csdsupported = FeatureManager::FeatureSupported( KFeatureIdAppCsdSupport ); - wlansupported = FeatureManager::FeatureSupported( KFeatureIdProtocolWlan ); - } - - if ( ( ( aBearers & EApBearerTypeAll ) || - ( aBearers & EApBearerTypeGPRS ) ) && - gprssupported ) - { - aItem.SetBearerTypeL( EApBearerTypeGPRS ); - } - else - { - if ( ( ( aBearers & EApBearerTypeAll ) || - ( aBearers & EApBearerTypeHSCSD ) ) - && hscsdsupported ) - { - aItem.SetBearerTypeL( EApBearerTypeHSCSD ); - } - else - { - if ( ( ( aBearers & EApBearerTypeAll ) || - (aBearers & EApBearerTypeCSD ) ) && csdsupported ) - { - aItem.SetBearerTypeL( EApBearerTypeCSD ); - } - else - { - if ( ( ( aBearers & EApBearerTypeAll ) || - ( aBearers & EApBearerTypeWLAN ) ) - && wlansupported ) - { - aItem.SetBearerTypeL( EApBearerTypeWLAN ); - } - else - { - if ( ( ( aBearers & EApBearerTypeAll ) || - ( aBearers & EApBearerTypeLAN ) ) - && lansupported ) - { - aItem.SetBearerTypeL( EApBearerTypeLAN ); - } - else - { - if ( ( ( aBearers & EApBearerTypeAll ) || - ( aBearers & EApBearerTypeLANModem ) ) - && lanmodemsupported ) - { - aItem.SetBearerTypeL( EApBearerTypeLANModem ); - } - else - { - if ( ( ( aBearers & EApBearerTypeAll ) || - ( aBearers & EApBearerTypeCDMA ) ) - && cdmasupported ) - { - aItem.SetBearerTypeL( EApBearerTypeCDMA ); - } - else - { - User::Leave( KErrInvalidBearerType ); - } - } - } - } - } - } - } - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::ChooseBearerTypeL") - } - - - - -//---------------------------------------------------------- -// CApSettingsHandlerImpl::HandleDuplicateL -//---------------------------------------------------------- -// -TUint32 CApSettingsHandlerImpl::HandleDuplicateL( TUint32 aUid ) - { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::HandleDuplicateL") - - TUint32 retval(KErrNone); - // so user had chosen something -#ifdef __TEST_OOMDEBUG - if ( iMemTestOn ) - { - TInt leavecode( KErrNoMemory ); - TInt ts( GetTestStateL() ); - if ( ts == KCreateUseExistTest ) - { - TBuf<48> buf; - APSETUILOGGER_WRITE_BUF - ( _L("Starting KCreateUseExistTest memtest") ); - TUint32 rate( 0 ); - TUint32 retrycount( KOOMRetryCount ); - TUint32 retryoffset( KOOMRetryOffset ); - for ( - rate = 1; - ((rate < 50000) && (leavecode == KErrNoMemory)) - || retrycount; - rate++ - ) - { - __UHEAP_SETFAIL( RHeap::EDeterministic, rate ); - TRAP( leavecode, retval = DoHandleApUseOldNewL( aUid ) ); - __UHEAP_RESET; - if ( !leavecode ) - { - retrycount--; - rate += retryoffset; - } - } - User::LeaveIfError( leavecode ); - buf.Format( _L("\t Memtest finished, max. rate was: %d )"), - rate ); - APSETUILOGGER_WRITE_BUF( EApImpl, buf ); - } - else - { - retval = DoHandleApUseOldNewL( aUid ); - } - } - else - { - retval = DoHandleApUseOldNewL( aUid ); - } -#else - retval = DoHandleApUseOldNewL( aUid ); -#endif // __TEST_OOMDEBUG - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::HandleDuplicateL") - return retval; - } - - -// End of File - diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/apsettingshandlerui/src/apsettingsui.cpp --- a/apengine/apsettingshandlerui/src/apsettingsui.cpp Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,146 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Defines the handler, CApSettingsUi and oem API for -* the Access Point settings. -* -*/ - - -// INCLUDE FILES - -#include - -#include -#include "apsettingsui.h" -#include "ApsettingshandleruiImpl.h" - -#include "ApSettingsHandlerLogger.h" -#include - - -// ================= MEMBER FUNCTIONS ======================= - -// --------------------------------------------------------- -// CApSettingsUi::NewLC -// --------------------------------------------------------- -// -EXPORT_C CApSettingsUi* CApSettingsUi::NewLC( - TBool aStartWithSelection, - TSelectionListType aListType, - TSelectionMenuType aSelMenuType, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TInt aReqIpvType, - TVpnFilterType aVpnFilterType - ) - { - APSETUILOGGER_CREATE; - APSETUILOGGER_ENTERFN( EAPI,"SettingsUi::NewLC") - - CApSettingsUi* db = - new( ELeave ) CApSettingsUi( aStartWithSelection, - aListType, - aSelMenuType, - aReqIpvType - ); - CleanupStack::PushL( db ); - - - db->ConstructL( aIspFilter, aBearerFilter, - aSortType, aVpnFilterType ); - APSETUILOGGER_LEAVEFN( EAPI,"SettingsUi::NewLC") - return db; - } - - - -// Destructor -EXPORT_C CApSettingsUi::~CApSettingsUi() - { - APSETUILOGGER_DELETE; - - delete iImpl; - } - - - - -// Constructor -CApSettingsUi::CApSettingsUi( TBool aStartWithSelection, - TSelectionListType aListType, - TSelectionMenuType aSelMenuType, - TInt aReqIpvType ) -:iStartWithSelection( aStartWithSelection ), -iListType( aListType ), -iSelMenuType( aSelMenuType ), -iReqIpvType( aReqIpvType ) - { - } - - - -// --------------------------------------------------------- -// CApSettingsUi::ConstructL -// --------------------------------------------------------- -// -EXPORT_C void CApSettingsUi::ConstructL( TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TVpnFilterType aVpnFilterType - ) - { - APSETUILOGGER_ENTERFN( EAPI,"SettingsUi::ConstructL"); - - // must place it to a temp variable, otherwise CodeScanner reports - // it as a bad practice putting up member to Cleanupstack, but - // we have NO NewL so we must use this. - CApSettingsHandlerImpl* tmp = CApSettingsHandlerImpl::NewLC( - iStartWithSelection, - iListType, iSelMenuType, - aIspFilter, aBearerFilter, - aSortType, iReqIpvType, - aVpnFilterType, - EFalse ); - - CleanupStack::Pop( tmp ); // soon will be a member, need to pop - iImpl = tmp; - - APSETUILOGGER_LEAVEFN( EAPI,"SettingsUi::ConstructL") - } - - - -// --------------------------------------------------------- -// CApSettingsUi::RunSettingsL -// --------------------------------------------------------- -// -EXPORT_C TInt CApSettingsUi::RunSettingsL( TUint32 aHighLight, - TUint32& aSelected ) - { - APSETUILOGGER_ENTERFN( EAPI,"SettingsUi::RunSettingsL") - __ASSERT_DEBUG( iImpl, Panic( ENullPointer ) ); - - iImpl->RunSettingsL( aHighLight, aSelected ); - - APSETUILOGGER_LEAVEFN( EAPI,"SettingsUi::RunSettingsL") - - return iImpl->EventStore(); - } - - - -// End of File - diff -r 2709c04a4af5 -r 8b0c979bbe8c apengine/group/bld.inf --- a/apengine/group/bld.inf Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -/* -* Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Build information file -* -*/ - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES -#include "../apeng/group/bld.inf" -#include "../apsettingshandlerui/group/bld.inf" - -PRJ_TESTMMPFILES \ No newline at end of file diff -r 2709c04a4af5 -r 8b0c979bbe8c bearermanagement/S60MCPR/inc/s60mcpr.h --- a/bearermanagement/S60MCPR/inc/s60mcpr.h Fri Sep 03 09:38:26 2010 +0300 +++ b/bearermanagement/S60MCPR/inc/s60mcpr.h Thu Sep 16 12:50:24 2010 +0300 @@ -63,6 +63,7 @@ EMPMStartIAPNotificationMsg, EMPMErrorNotificationMsg, EMPMStartupErrorIgnoredMsg, + EMPMStopIAPNotificationMsg, }; public: typedef Messages::TMessageSigVoid TMPMReselectBestIAPCompletedMsg; @@ -72,6 +73,7 @@ typedef Messages::TMessageSigNumber TMPMStartIAPNotificationMsg; typedef Messages::TMessageSigNumber TMPMErrorNotificationMsg; typedef Messages::TMessageSigVoid TMPMStartupErrorIgnoredMsg; + typedef Messages::TMessageSigNumber TMPMStopIAPNotificationMsg; }; /** diff -r 2709c04a4af5 -r 8b0c979bbe8c bearermanagement/S60MCPR/inc/s60mcpractivities.h --- a/bearermanagement/S60MCPR/inc/s60mcpractivities.h Fri Sep 03 09:38:26 2010 +0300 +++ b/bearermanagement/S60MCPR/inc/s60mcpractivities.h Thu Sep 16 12:50:24 2010 +0300 @@ -30,11 +30,6 @@ // Forward declarations class CS60MetaConnectionProvider; -enum TS60MCprActivities - { - ECFActivityS60McprServiceIdMessage2Handler = ESock::ECFActivityCustom + 10 - }; - /** * S60MCprActivities namespace contains the * definition of S60MCPR's activity map. diff -r 2709c04a4af5 -r 8b0c979bbe8c bearermanagement/S60MCPR/inc/s60mcpractivityids.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bearermanagement/S60MCPR/inc/s60mcpractivityids.h Thu Sep 16 12:50:24 2010 +0300 @@ -0,0 +1,34 @@ +/* +* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: S60 MCPR's activities. +* +*/ + +/** +@file s60mcpractivityids.h +S60 MCPR's activity id's. +*/ + +#ifndef S60MCPRACTIVITYIDS_H +#define S60MCPRACTIVITYIDS_H + +enum TS60MCprActivities + { + ECFActivityS60McprServiceIdMessage2Handler = ESock::ECFActivityCustom + 10, + ECFActivityS60McprStopIAP, + ECFActivityS60McprDataClientIdle, + ECFActivityS60DataClientStatusChangeConsumeActivity + }; + +#endif //S60MCPRACTIVITYIDS_H diff -r 2709c04a4af5 -r 8b0c979bbe8c bearermanagement/S60MCPR/inc/s60mcprstates.h --- a/bearermanagement/S60MCPR/inc/s60mcprstates.h Fri Sep 03 09:38:26 2010 +0300 +++ b/bearermanagement/S60MCPR/inc/s60mcprstates.h Thu Sep 16 12:50:24 2010 +0300 @@ -30,6 +30,7 @@ #include "s60mcpr.h" #include "s60mpmrequests.h" +#include "s60mcpractivityids.h" /** * S60McprState namespace packages all S60 specific state, forks and @@ -58,6 +59,7 @@ const TInt KConsumeRejectedMsg = 11054; const TInt KInformMigrationCompleted = 11055; const TInt KRequestReConnectToCurrentSP = 11056; + const TInt KStopActivityNotRunning = 11057; /** * Execution context @@ -172,6 +174,68 @@ virtual void DoL(); DECLARE_SMELEMENT_FOOTER( TRetrieveServiceId ) + /** + * STATE: Waits for StopIAPNotification message. + * @return ETrue if message is accepted. + */ + DECLARE_SMELEMENT_HEADER( TAwaitingStopIAPNotification, + MeshMachine::TState, + NetStateMachine::MState, + TContext ) + virtual TBool Accept(); + DECLARE_SMELEMENT_FOOTER( TAwaitingStopIAPNotification ) + + /** + * TRANSITION/ACTION: Sends Stop to Service Provider + */ + DECLARE_SMELEMENT_HEADER( TSendStop, + MeshMachine::TStateTransition, + NetStateMachine::MStateTransition, + TContext ) + virtual void DoL(); + DECLARE_SMELEMENT_FOOTER( TSendStop ) + + + /** + * STATE: Waits for Stopped or Error + * @return ETrue if message is accepted. + */ + DECLARE_SMELEMENT_HEADER( TAwaitingStoppedOrError, + MeshMachine::TState, + NetStateMachine::MState, + TContext ) + virtual TBool Accept(); + DECLARE_SMELEMENT_FOOTER( TAwaitingStoppedOrError ) + + + /** + * STATE: Waits for TIdle + */ + DECLARE_SMELEMENT_HEADER( TAwaitingDataClientIdle, + MeshMachine::TState, + NetStateMachine::MState, + TContext ) + virtual TBool Accept(); + DECLARE_SMELEMENT_FOOTER( TAwaitingDataClientIdle ) + + /** + * STATE: Waits for TDataClientStatusChange + */ + DECLARE_SMELEMENT_HEADER( TAwaitingDataClientStatusChange, + MeshMachine::TState, + NetStateMachine::MState, + TContext ) + virtual TBool Accept(); + DECLARE_SMELEMENT_FOOTER( TAwaitingDataClientStatusChange ) + + + /** + * FORK/MUTEX: Waits for StopIAPActivity to complete + */ + DECLARE_SERIALIZABLE_STATE( TStopActivityNotRunning, + MeshMachine::TActivityIdMutex, + MeshMachine::TTag ) + class CS60ErrorRecoveryActivity : public MeshMachine::CNodeRetryActivity { public: diff -r 2709c04a4af5 -r 8b0c979bbe8c bearermanagement/S60MCPR/src/s60mcpr.cpp --- a/bearermanagement/S60MCPR/src/s60mcpr.cpp Fri Sep 03 09:38:26 2010 +0300 +++ b/bearermanagement/S60MCPR/src/s60mcpr.cpp Thu Sep 16 12:50:24 2010 +0300 @@ -381,23 +381,14 @@ TMpmNotificationStopIAP& notification = static_cast( const_cast( aNotification ) ); - // Allow TStop message only when ServiceProvider exists and the IAP matches or is unspecified. - // - if ( ServiceProvider() && - (((RMetaServiceProviderInterface*)ServiceProvider())->ProviderInfo().APId() == notification.iInfo.iIap || - notification.iInfo.iIap == 0 )) - { - S60MCPRLOGSTRING2("S60MCPR<%x>::PolicyNotification() EMPMStopIAPNotification IAP %d",(TInt*)this,notification.iInfo.iIap); - PostToClients( TNodeCtxId( 0, Id() ), - TCFServiceProvider::TStop( KErrDisconnected ).CRef(), - TClientType( TCFClientType::EServProvider) ); - } -#ifdef _DEBUG - else - { - S60MCPRLOGSTRING2("S60MCPR<%x>::PolicyNotification() EMPMStopIAPNotification NO MATCH! IAP %d",(TInt*)this,notification.iInfo.iIap); - } -#endif + S60MCPRLOGSTRING2("S60MCPR<%x>::PolicyNotification() EMPMStopIAPNotification IAP %d",(TInt*)this, notification.iInfo.iIap); + + // Send stop notification into meshmachine. + // + RNodeInterface ni; + ni.OpenPostMessageClose( NodeId(), + NodeId(), + TCFS60MCPRMessage::TMPMStopIAPNotificationMsg( notification.iInfo.iIap ).CRef() ); break; } default: diff -r 2709c04a4af5 -r 8b0c979bbe8c bearermanagement/S60MCPR/src/s60mcpractivities.cpp --- a/bearermanagement/S60MCPR/src/s60mcpractivities.cpp Fri Sep 03 09:38:26 2010 +0300 +++ b/bearermanagement/S60MCPR/src/s60mcpractivities.cpp Thu Sep 16 12:50:24 2010 +0300 @@ -21,6 +21,7 @@ */ #include "s60mcpractivities.h" +#include "s60mcpractivityids.h" using namespace Messages; using namespace MeshMachine; @@ -183,6 +184,7 @@ DECLARE_DEFINE_NODEACTIVITY( ECFActivityMonitorProviderStatus, MCprDataClientStatusChange, TCFControlProvider::TDataClientStatusChange ) + SINGLE_NODEACTIVITY_ENTRY( S60MCprStates::THandleMPMAndCoreDataClientStatusChangeAndDestroyOrphans, CoreNetStates::TAwaitingDataClientStatusChange ) NODEACTIVITY_END() @@ -406,12 +408,78 @@ } // S60MCprServiceIdRMessage2HandlerActivity // ----------------------------------------------------------------------------- +// S60MCprStopIAPActivity +// ----------------------------------------------------------------------------- +// + +namespace S60MCprStopIAPActivity + { + DECLARE_DEFINE_NODEACTIVITY( ECFActivityS60McprStopIAP, + MCprStopIAPActivity, + TCFS60MCPRMessage::TMPMStopIAPNotificationMsg) + + FIRST_NODEACTIVITY_ENTRY( S60MCprStates::TAwaitingStopIAPNotification, + MeshMachine::TNoTag ) + + NODEACTIVITY_ENTRY( KNoTag, + S60MCprStates::TSendStop, + S60MCprStates::TAwaitingStoppedOrError, + MeshMachine::TNoTag ) + + LAST_NODEACTIVITY_ENTRY( KNoTag, + MeshMachine::TDoNothing ) + + NODEACTIVITY_END() + } // S60MCprStopIAPActivity + +// ----------------------------------------------------------------------------- +// S60MCprDataClientIdleActivity +// ----------------------------------------------------------------------------- +// + +namespace S60MCprDataClientIdleActivity + { + DECLARE_DEFINE_CUSTOM_NODEACTIVITY( ECFActivityS60McprDataClientIdle, + MCprDataClientIdleActivity, + TCFControlProvider::TIdle, + MeshMachine::CNodeRetryActivity::NewL) + + FIRST_NODEACTIVITY_ENTRY( CoreNetStates::TAwaitingDataClientIdle, + S60MCprStates::TStopActivityNotRunning ) + + LAST_NODEACTIVITY_ENTRY( S60MCprStates::KStopActivityNotRunning, + CoreNetStates::THandleDataClientIdle ) + + NODEACTIVITY_END() + } // S60MCprDataClientIdleActivity + +// ----------------------------------------------------------------------------- +// S60MCprDataClientStatusChangeConsumeActivity +// ----------------------------------------------------------------------------- +// + +namespace S60MCprDataClientStatusChangeConsumeActivity + { + DECLARE_DEFINE_NODEACTIVITY( ECFActivityS60DataClientStatusChangeConsumeActivity, + MCprDataClientStatusChangeConsumeActivity, + TCFControlProvider::TDataClientStatusChange) + + SINGLE_NODEACTIVITY_ENTRY( MeshMachine::TDoNothing, + S60MCprStates::TAwaitingDataClientStatusChange ) + + NODEACTIVITY_END() + } // S60MCprDataClientStatusChangeConsumeActivity + + + +// ----------------------------------------------------------------------------- // S60MCprActivities - activitymap // ----------------------------------------------------------------------------- // namespace S60MCprActivities { DEFINE_ACTIVITY_MAP(S60MCprActivityMap) + ACTIVITY_MAP_ENTRY(S60MCprDataClientStatusChangeConsumeActivity, MCprDataClientStatusChangeConsumeActivity) ACTIVITY_MAP_ENTRY(S60MCprMonitorDataClientStatusActivity, MCprDataClientStatusChange) ACTIVITY_MAP_ENTRY(S60MCprSelectActivity, S60MCprSelect) // in s60mcprsimpleselectactivity.cpp ACTIVITY_MAP_ENTRY(S60MCprSimpleSelectActivity, MCprSimpleSelect) // in s60mcprsimpleselectactivity.cpp @@ -419,6 +487,8 @@ ACTIVITY_MAP_ENTRY(S60MCprMobilityActivity, MCprMobility) // in s60mcprmobilityactivity.cpp ACTIVITY_MAP_ENTRY(S60MCprConnectionGoneDownRecoveryActivity, MCprConnectionGoneDownRecovery) ACTIVITY_MAP_ENTRY(S60MCprServiceIdRMessage2HandlerActivity, S60MCprServiceIdLegacyRMessage2Handler) + ACTIVITY_MAP_ENTRY(S60MCprStopIAPActivity, MCprStopIAPActivity) + ACTIVITY_MAP_ENTRY(S60MCprDataClientIdleActivity, MCprDataClientIdleActivity) ACTIVITY_MAP_END_BASE(MobilityMCprActivities, mobilityMCprActivities) } diff -r 2709c04a4af5 -r 8b0c979bbe8c bearermanagement/S60MCPR/src/s60mcprstates.cpp --- a/bearermanagement/S60MCPR/src/s60mcprstates.cpp Fri Sep 03 09:38:26 2010 +0300 +++ b/bearermanagement/S60MCPR/src/s60mcprstates.cpp Thu Sep 16 12:50:24 2010 +0300 @@ -21,6 +21,7 @@ */ #include +#include #include "s60mcprstates.h" @@ -390,6 +391,129 @@ } } + +// ----------------------------------------------------------------------------- +// TAwaitingStopIAPNotification::Accept +// ----------------------------------------------------------------------------- +// +DEFINE_SMELEMENT( TAwaitingStopIAPNotification, NetStateMachine::MState, TContext ) +TBool TAwaitingStopIAPNotification::Accept() + { + TUint32 iapId( 0 ); + TCFS60MCPRMessage::TMPMStopIAPNotificationMsg* msg = + message_cast(&iContext.iMessage); + if ( msg ) + { + iapId = msg->iValue; + // Only accept the notification if it matches current service provider, or if the IAP is undefined + if ( iContext.Node().ServiceProvider() && + (((RMetaServiceProviderInterface*)iContext.Node().ServiceProvider())->ProviderInfo().APId() == iapId || + iapId == 0 ) ) + { + return ETrue; + } +#ifdef _DEBUG + else + { + S60MCPRLOGSTRING2("S60MCPR<%x>::TAwaitingStopIAPNotification() NO MATCH! IAP %d",(TInt*)this,iapId); + } +#endif + } + return EFalse; + } + +// ----------------------------------------------------------------------------- +// TProcessError::DoL +// ----------------------------------------------------------------------------- +// +DEFINE_SMELEMENT( TSendStop, NetStateMachine::MStateTransition, TContext ) +void TSendStop::DoL() // codescanner::leave + { + __ASSERT_DEBUG(iContext.iNodeActivity, User::Panic(KS60MCprPanic, KPanicNoActivity)); + __ASSERT_DEBUG(iContext.Node().ServiceProvider(), User::Panic(KS60MCprPanic, KPanicNoServiceProvider)); + + // Send TStop to current Service Provider. + iContext.iNodeActivity->PostRequestTo( + iContext.Node().ServiceProvider()->RecipientId(), + TCFServiceProvider::TStop( KErrDisconnected ).CRef() ); + } + +// ----------------------------------------------------------------------------- +// TAwaitingStoppedOrError::Accept +// ----------------------------------------------------------------------------- +// +DEFINE_SMELEMENT( TAwaitingStoppedOrError, NetStateMachine::MState, TContext ) +TBool TAwaitingStoppedOrError::Accept() + { + __ASSERT_DEBUG(iContext.iNodeActivity, User::Panic(KS60MCprPanic, KPanicNoActivity)); + + if ( iContext.iMessage.IsMessage() ) + { + return ETrue; + } + + // Error is returned if S60MCPR leaves IPProtoMCPr before Stopped is received + if( iContext.iMessage.IsMessage() ) + { + // Ignore the error code. It's better than crashing. + // Propagating might lead to situation where self-posted message ends up to a dead node. + return ETrue; + } + + // Rare scenario: if the stopping service provider is sending a TStateChange message, + // and a mobility activity is ongoing, the message must be ignored in order to keep + // harmful connection stages such as KLinkLayerClosed from reaching the client + TUint32 mobilityActivities = iContext.Node().CountActivities( ECFActivityMCprMobility ); + TBool isStateChange = iContext.iMessage.IsMessage(); + TBool isServProvider = + iContext.iPeer && + iContext.iPeer->Type() == TCFClientType::EServProvider && + iContext.iPeer->Flags() & TCFClientType::EActive; + + S60MCPRLOGSTRING4("S60MCPR<%x>::TAwaitingStoppedOrError() M %d, SC %d, SP %d",(TInt*)this, + mobilityActivities, isStateChange, isServProvider ); + + if ( isStateChange && isServProvider && mobilityActivities > 0 ) + { + // Discard the message + iContext.iMessage.ClearMessageId(); + } + + return EFalse; + } + +// ----------------------------------------------------------------------------- +// TAwaitingDataClientIdle::Accept +// ----------------------------------------------------------------------------- +// +DEFINE_SMELEMENT( TAwaitingDataClientIdle, NetStateMachine::MState, TContext ) +TBool TAwaitingDataClientIdle::Accept() + { + if (!iContext.iMessage.IsMessage()) + { + return EFalse; + } + __ASSERT_DEBUG(iContext.iPeer, User::Panic(KS60MCprPanic, KPanicPeerMessage)); + iContext.iPeer->ClearFlags(TCFClientType::EActive); + return ETrue; + } + +// ----------------------------------------------------------------------------- +// TAwaitingDataClientStatusChange::Accept +// ----------------------------------------------------------------------------- +// +DEFINE_SMELEMENT( TAwaitingDataClientStatusChange, NetStateMachine::MState, TContext ) +TBool TAwaitingDataClientStatusChange::Accept() + { + // Consume the received DataClientStatusChange if a DataClientIdle activity is running + if (iContext.iMessage.IsMessage() && + (iContext.Node().CountActivities( ECFActivityS60McprDataClientIdle ) > 0)) + { + return ETrue; + } + return EFalse; + } + // ----------------------------------------------------------------------------- // TRetrieveServiceId::DoL // ----------------------------------------------------------------------------- diff -r 2709c04a4af5 -r 8b0c979bbe8c bearermanagement/mpm/src/mpmcommsdataccess.cpp --- a/bearermanagement/mpm/src/mpmcommsdataccess.cpp Fri Sep 03 09:38:26 2010 +0300 +++ b/bearermanagement/mpm/src/mpmcommsdataccess.cpp Thu Sep 16 12:50:24 2010 +0300 @@ -1313,9 +1313,6 @@ { MPMLOGSTRING( "CMPMCommsDatAccess::CheckWlanL: IAP is WLAN" ) wlan = EWlanIap; - TInt ssidLength( 0 ); - commsDbWlanTableView->ReadColumnLengthL( TPtrC( NU_WLAN_SSID ), - ssidLength ); } else { diff -r 2709c04a4af5 -r 8b0c979bbe8c bearermanagement/mpm/src/mpmserversession.cpp --- a/bearermanagement/mpm/src/mpmserversession.cpp Fri Sep 03 09:38:26 2010 +0300 +++ b/bearermanagement/mpm/src/mpmserversession.cpp Thu Sep 16 12:50:24 2010 +0300 @@ -885,6 +885,23 @@ ERoaming, *this ); + TWlanIapType iapType = MyServer().CommsDatAccess()->CheckWlanL( iMigrateIap ); + + // If this is a cellular IAP, we must check the current cellular data usage setting in case it + // has changed to disabled mode while MPM was waiting for a migrate confirmation. If cellular + // data usage has been disabled, terminate the connection attempt with KErrPermissionDenied. + if ( iapType == ENotWlanIap ) + { + TInt cellularUsage = MyServer().DataUsageWatcher()->CellularDataUsage(); + if ( cellularUsage == ECmCellularDataUsageDisabled ) + { + MPMLOGSTRING( "Trying to migrate to cellular IAP, but cellular data usage is disabled, stopping" ) + iMigrateState = EMigrateNone; + RoamingConfirmationCompletedL( KErrPermissionDenied, EMsgQueryThisTime, EFalse ); + return; + } + } + iMigrateState = EMigrateUserConfirmation; // Confirm only if this IAP is not already in use @@ -910,13 +927,13 @@ reconnect = ETrue; } - //Display confirm dialog only if we are moving to cellular IAP - if ( MyServer().CommsDatAccess()->CheckWlanL( iMigrateIap ) == ENotWlanIap ) + // Display confirm dialog only if we are moving to cellular IAP + if ( iapType == ENotWlanIap ) { // Check that connection preferences don't deny queries, and // enough time has elapsed from the last query cancelled by the user. if ( !( iIapSelection->MpmConnPref().NoteBehaviour() & TExtendedConnPref::ENoteBehaviourConnDisableQueries ) && - !MyServer().IsConnPermQueryTimerOn() ) + !MyServer().IsConnPermQueryTimerOn() ) { if ( MyServer().RoamingWatcher()->RoamingStatus() == EMPMInternationalRoaming ) { @@ -1719,7 +1736,7 @@ availableIAPs = GetAvailableIAPs(); MPMLOGSTRING2( "CMPMServerSession::HandleServerRegisterPrefIAPNotifL \ -- IAPs count: %d", availableIAPs.iCount) +- available IAPs count: %d", availableIAPs.iCount) #ifdef _DEBUG for (TUint i = 0; i < availableIAPs.Count(); i++) @@ -1739,12 +1756,6 @@ PrefIAPNotificationL( availableIAPs, EBearerMan ); } - // In case the mobility application register to preferred IAP notification - // we have to make sure we get availability every once in a while. - // - RArray iapPath; - CleanupClosePushL( iapPath ); - CleanupStack::PopAndDestroy( &iapPath ); aMessage.Complete( KErrNone ); } diff -r 2709c04a4af5 -r 8b0c979bbe8c cmmanager/cmmgr/cmmpluginbase/src/ccmpluginbaseeng.cpp --- a/cmmanager/cmmgr/cmmpluginbase/src/ccmpluginbaseeng.cpp Fri Sep 03 09:38:26 2010 +0300 +++ b/cmmanager/cmmgr/cmmpluginbase/src/ccmpluginbaseeng.cpp Thu Sep 16 12:50:24 2010 +0300 @@ -2471,6 +2471,11 @@ aClientPluginInstance->iBearerSpecRecordArray ); } } + + if( retVal ) + { + retVal = ETrue; + } OstTraceFunctionExit0( CCMPLUGINBASEENG_GETBOOLATTRIBUTEL_EXIT ); return retVal; diff -r 2709c04a4af5 -r 8b0c979bbe8c cmmanager/cmmgr/cmmplugins/cmpluginpacketdata/src/cmpluginpacketdata.cpp --- a/cmmanager/cmmgr/cmmplugins/cmpluginpacketdata/src/cmpluginpacketdata.cpp Fri Sep 03 09:38:26 2010 +0300 +++ b/cmmanager/cmmgr/cmmplugins/cmpluginpacketdata/src/cmpluginpacketdata.cpp Thu Sep 16 12:50:24 2010 +0300 @@ -216,7 +216,7 @@ CRepository* repository = CRepository::NewLC( KCRUidCoreApplicationUIs ); TInt connAllowed( ECoreAppUIsNetworkConnectionAllowed ); - repository->Get( KCoreAppUIsNetworkConnectionAllowed, connAllowed ); + (void) repository->Get( KCoreAppUIsNetworkConnectionAllowed, connAllowed ); CleanupStack::PopAndDestroy( repository ); if ( !connAllowed ) diff -r 2709c04a4af5 -r 8b0c979bbe8c cmmanager/cmmgr/cmmplugins/cmpluginwlan/rom/cmmpluginwlan.iby --- a/cmmanager/cmmgr/cmmplugins/cmpluginwlan/rom/cmmpluginwlan.iby Fri Sep 03 09:38:26 2010 +0300 +++ b/cmmanager/cmmgr/cmmplugins/cmpluginwlan/rom/cmmpluginwlan.iby Thu Sep 16 12:50:24 2010 +0300 @@ -18,8 +18,11 @@ #ifndef CMMPLUGINWLAN_IBY__ #define CMMPLUGINWLAN_IBY__ +#ifdef __PROTOCOL_WLAN + ECOM_PLUGIN(cmpluginwlan.dll,10281BB2.rsc) +#endif // __PROTOCOL_WLAN #endif // CMMPLUGINWLAN_IBY__ diff -r 2709c04a4af5 -r 8b0c979bbe8c cmmanager/cmmgr/cmmserver/inc/cmmcache.h --- a/cmmanager/cmmgr/cmmserver/inc/cmmcache.h Fri Sep 03 09:38:26 2010 +0300 +++ b/cmmanager/cmmgr/cmmserver/inc/cmmcache.h Thu Sep 16 12:50:24 2010 +0300 @@ -587,6 +587,12 @@ * changed in commsdat. */ void NotifyPluginsForTableChangesL( const TUint32 aTableId ); + + /** + * Try to load unknown plugin dynamically during running-time + * Return the index number if loaded successfully; otherwise, return -1 + */ + TInt RefreshPluginL( const TUint32 aBearerType ); private: // Monitors changes in the database. diff -r 2709c04a4af5 -r 8b0c979bbe8c cmmanager/cmmgr/cmmserver/src/cmmcache.cpp --- a/cmmanager/cmmgr/cmmserver/src/cmmcache.cpp Fri Sep 03 09:38:26 2010 +0300 +++ b/cmmanager/cmmgr/cmmserver/src/cmmcache.cpp Thu Sep 16 12:50:24 2010 +0300 @@ -457,7 +457,18 @@ } if ( !plugin ) { - User::Leave( KErrArgument ); + TInt index = RefreshPluginL( aBearerType ); + if ( index < 0 || index >= iPlugins->Count() ) + { + User::Leave( KErrArgument ); + } + else + { + TCmPluginInitParam pluginParams( Session() ); + plugin = ( *iPlugins )[index]->CreateInstanceL( pluginParams ); + CleanupStack::PushL( plugin ); + plugin->CreateNewL( aConnMethodId ); + } } @@ -1789,6 +1800,61 @@ } // --------------------------------------------------------------------------- +// Try to load unknown plugin dynamically during running-time. Some plugin +// (e.g., VPN) might be installed after CmManager starts up. So, try to load +// it. Only one plugin can be possibly loaded in a time. +// --------------------------------------------------------------------------- +// +TInt CCmmCache::RefreshPluginL( const TUint32 aBearerType ) + { + OstTraceFunctionEntry0( CCMMCACHE_REFRESHPLUGIN_ENTRY ); + + TInt ret( KErrNotFound ); + + // Get a list of all the bearer types. + RPointerArray implArray; + CmmCleanupResetAndDestroyPushL( implArray ); + REComSession::ListImplementationsL( TUid::Uid( KCMPluginInterfaceUid ), implArray ); + + CCmPluginBaseEng* plugin = NULL; + for ( TInt i = 0; i < implArray.Count(); i++ ) + { + TUid uid = ( implArray )[i]->ImplementationUid(); + + if ( uid.iUid == aBearerType ) + { + TCmPluginInitParam params( iTrans->Session() ); + + TRAPD( err, plugin = STATIC_CAST( CCmPluginBaseEng*, REComSession::CreateImplementationL( + uid, + _FOFF( CCmPluginBaseEng, iDtor_ID_Key ), + ( TAny* )¶ms ) ) ); + + if ( !err ) + { + CleanupStack::PushL( plugin ); + + // We may not think the priority position in the plugin array for this newly loaded plugin + // and just simply append it in the end of the plugin array + iPlugins->AppendL( plugin ); + + ret = iPlugins->Count() - 1; + + CleanupStack::Pop( plugin ); + } + + // Don't need to go further in the for loop + break; + } + } + + CleanupStack::PopAndDestroy( &implArray ); + + OstTraceFunctionExit0( CCMMCACHE_REFRESHPLUGIN_EXIT ); + return ret; + } + +// --------------------------------------------------------------------------- // Tells the cache that an error has occured with a database listener. Any // reads to this table need go through the database, since cache can't know if // it has up-to-date information. diff -r 2709c04a4af5 -r 8b0c979bbe8c cmmanager/cmmgr/cmmserver/src/cmmdestinationinstance.cpp --- a/cmmanager/cmmgr/cmmserver/src/cmmdestinationinstance.cpp Fri Sep 03 09:38:26 2010 +0300 +++ b/cmmanager/cmmgr/cmmserver/src/cmmdestinationinstance.cpp Thu Sep 16 12:50:24 2010 +0300 @@ -460,9 +460,16 @@ break; case CMManager::ESnapPurposeIntranet: { - _LIT( KDestinationTextId, "txt_occ_dblist_intranet"); - resolvedText = CCmManagerTextResolver::ResolveTextL( KDestinationTextId ); - isLocalised = ETrue; + // Intranet is handled in a special way. If localised metadata is OFF + // destination's network record name is returned + TUint32 localized( 0 ); + GetMetadataL( CMManager::ESnapMetadataDestinationIsLocalised, localized ); + if ( localized ) + { + _LIT( KDestinationTextId, "txt_occ_dblist_intranet"); + resolvedText = CCmManagerTextResolver::ResolveTextL( KDestinationTextId ); + isLocalised = ETrue; + } } break; default: @@ -1631,15 +1638,10 @@ User::Leave( KErrArgument ); } - TUint32 temp = ~( - CMManager::ESnapMetadataInternet | - CMManager::ESnapMetadataDestinationIsLocalised | - CMManager::ESnapMetadataPurpose ); if ( aMetadata == CMManager::ENotLocalisedDest ) { - // Clear old ESnapMetadataInternet-bit, - // ESnapMetadataDestinationIsLocalised-bits and ESnapMetadataPurpose-bits. - iMetadataRecord->iMetadata = iMetadataRecord->iMetadata & temp; + // Clear old ESnapMetadataDestinationIsLocalised-bits. + iMetadataRecord->iMetadata = iMetadataRecord->iMetadata & ~( CMManager::ESnapMetadataDestinationIsLocalised ); } else { @@ -1648,6 +1650,11 @@ User::Leave( KErrAlreadyExists ); } + TUint32 temp = ~( + CMManager::ESnapMetadataInternet | + CMManager::ESnapMetadataDestinationIsLocalised | + CMManager::ESnapMetadataPurpose ); + // Clear old ESnapMetadataInternet-bit, // ESnapMetadataDestinationIsLocalised-bits and ESnapMetadataPurpose-bits. TUint32 value = iMetadataRecord->iMetadata & temp; diff -r 2709c04a4af5 -r 8b0c979bbe8c cmmanager/cpdestinationplugin/src/cpdestinationentryitem.cpp --- a/cmmanager/cpdestinationplugin/src/cpdestinationentryitem.cpp Fri Sep 03 09:38:26 2010 +0300 +++ b/cmmanager/cpdestinationplugin/src/cpdestinationentryitem.cpp Thu Sep 16 12:50:24 2010 +0300 @@ -151,8 +151,7 @@ if (mDestinationId != 0 && mAps->count() > 1) { HbToolBar *tb = view->toolBar(); HbIcon arrangeIcon("qtg_mono_sort"); - HbAction *arrangeAction - = tb->addAction(arrangeIcon, "", this, SLOT(activateArrangeMode())); + (void) tb->addAction(arrangeIcon, "", this, SLOT(activateArrangeMode())); } OstTraceFunctionExit0(CPDESTINATIONENTRYITEMDATA_CREATESETTINGVIEW_EXIT); return view; @@ -656,8 +655,7 @@ // Toolbar HbToolBar *tb = view->toolBar(); HbIcon okIcon("qtg_mono_tick"); - HbAction *doneAction - = tb->addAction(okIcon, "", this, SLOT(viewDone())); + (void) tb->addAction(okIcon, "", this, SLOT(viewDone())); OstTraceFunctionExit0(CPDESTINATIONENTRYITEMDATA_CREATEARRANGEMODEVIEW_EXIT); } diff -r 2709c04a4af5 -r 8b0c979bbe8c connectionmonitoring/connmon/connectionmonitor/BWINSCW/CONNMON_EKA2U.def --- a/connectionmonitoring/connmon/connectionmonitor/BWINSCW/CONNMON_EKA2U.def Fri Sep 03 09:38:26 2010 +0300 +++ b/connectionmonitoring/connmon/connectionmonitor/BWINSCW/CONNMON_EKA2U.def Thu Sep 16 12:50:24 2010 +0300 @@ -97,4 +97,6 @@ ?NewL@CConnMonWlanNetwork@@SAPAV1@ABV?$TBuf@$0CA@@@IIIIIABV?$TBuf8@$05@@ABVTDesC16@@@Z @ 96 NONAME ; class CConnMonWlanNetwork * CConnMonWlanNetwork::NewL(class TBuf<32> const &, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, class TBuf8<6> const &, class TDesC16 const &) ?SecurityModeV2@CConnMonWlanNetwork@@QAEIXZ @ 97 NONAME ; unsigned int CConnMonWlanNetwork::SecurityModeV2(void) ?IsProtectedSetupSupported@CConnMonWlanNetwork@@QAEHXZ @ 98 NONAME ; int CConnMonWlanNetwork::IsProtectedSetupSupported(void) + ??0TConnMonIapInfo@@QAE@ABV0@@Z @ 99 NONAME ; TConnMonIapInfo::TConnMonIapInfo(class TConnMonIapInfo const &) + ??4TConnMonIapInfo@@QAEAAV0@ABV0@@Z @ 100 NONAME ; class TConnMonIapInfo & TConnMonIapInfo::operator=(class TConnMonIapInfo const &) diff -r 2709c04a4af5 -r 8b0c979bbe8c connectionmonitoring/connmon/connectionmonitor/EABI/ConnMon_EKA2U.def --- a/connectionmonitoring/connmon/connectionmonitor/EABI/ConnMon_EKA2U.def Fri Sep 03 09:38:26 2010 +0300 +++ b/connectionmonitoring/connmon/connectionmonitor/EABI/ConnMon_EKA2U.def Thu Sep 16 12:50:24 2010 +0300 @@ -161,4 +161,7 @@ _ZN19CConnMonWlanNetwork14SecurityModeV2Ev @ 160 NONAME _ZN19CConnMonWlanNetwork25IsProtectedSetupSupportedEv @ 161 NONAME _ZN19CConnMonWlanNetwork4NewLERK4TBufILi32EEjjjjjRK5TBuf8ILi6EERK7TDesC16 @ 162 NONAME + _ZN15TConnMonIapInfoC1ERKS_ @ 163 NONAME + _ZN15TConnMonIapInfoC2ERKS_ @ 164 NONAME + _ZN15TConnMonIapInfoaSERKS_ @ 165 NONAME diff -r 2709c04a4af5 -r 8b0c979bbe8c connectionmonitoring/connmon/connectionmonitor/group/ConnMon.mmp --- a/connectionmonitoring/connmon/connectionmonitor/group/ConnMon.mmp Fri Sep 03 09:38:26 2010 +0300 +++ b/connectionmonitoring/connmon/connectionmonitor/group/ConnMon.mmp Thu Sep 16 12:50:24 2010 +0300 @@ -11,7 +11,7 @@ * * Contributors: * -* Description: Builds ConnMon.dll. +* Description: Builds connmon.dll. * */ @@ -19,7 +19,7 @@ MACRO EPOC_SDK=0x07010000 -TARGET ConnMon.dll +TARGET connmon.dll TARGETTYPE dll UID 0x1000008d 0x101F6CEE diff -r 2709c04a4af5 -r 8b0c979bbe8c connectionmonitoring/connmon/connectionmonitor/group/ConnMonExe.mmp --- a/connectionmonitoring/connmon/connectionmonitor/group/ConnMonExe.mmp Fri Sep 03 09:38:26 2010 +0300 +++ b/connectionmonitoring/connmon/connectionmonitor/group/ConnMonExe.mmp Thu Sep 16 12:50:24 2010 +0300 @@ -11,13 +11,13 @@ * * Contributors: * -* Description: Builds ConnMonExe.exe. +* Description: Builds connmonexe.exe. * */ #include -target ConnMonExe.exe +target connmonexe.exe targettype exe uid 0x1000008c 0x101F6CF0 diff -r 2709c04a4af5 -r 8b0c979bbe8c connectionmonitoring/connmon/connectionmonitor/inc/ConnMonServ.h --- a/connectionmonitoring/connmon/connectionmonitor/inc/ConnMonServ.h Fri Sep 03 09:38:26 2010 +0300 +++ b/connectionmonitoring/connmon/connectionmonitor/inc/ConnMonServ.h Thu Sep 16 12:50:24 2010 +0300 @@ -20,7 +20,6 @@ #include -_LIT( KConnMonDLL, "ConnMon.dll" ); _LIT( KConnMonStartupSemaphore, "ConnMonStartupSemaphore" ); // Security policy diff -r 2709c04a4af5 -r 8b0c979bbe8c connectionmonitoring/connmon/connectionmonitor/rom/connmon.iby --- a/connectionmonitoring/connmon/connectionmonitor/rom/connmon.iby Fri Sep 03 09:38:26 2010 +0300 +++ b/connectionmonitoring/connmon/connectionmonitor/rom/connmon.iby Thu Sep 16 12:50:24 2010 +0300 @@ -18,7 +18,7 @@ #ifndef __CONNMON_IBY__ #define __CONNMON_IBY__ -file=ABI_DIR\BUILD_DIR\CONNMON.DLL SHARED_LIB_DIR\CONNMON.DLL -file=ABI_DIR\BUILD_DIR\CONNMONEXE.EXE PROGRAMS_DIR\CONNMONEXE.EXE +file=ABI_DIR\BUILD_DIR\connmon.dll SHARED_LIB_DIR\connmon.dll +file=ABI_DIR\BUILD_DIR\connmonexe.exe PROGRAMS_DIR\connmonexe.exe #endif diff -r 2709c04a4af5 -r 8b0c979bbe8c connectionmonitoring/connmon/connectionmonitor/src/CWlanSupport.cpp --- a/connectionmonitoring/connmon/connectionmonitor/src/CWlanSupport.cpp Fri Sep 03 09:38:26 2010 +0300 +++ b/connectionmonitoring/connmon/connectionmonitor/src/CWlanSupport.cpp Thu Sep 16 12:50:24 2010 +0300 @@ -3090,6 +3090,7 @@ if ( err != KErrNone ) { LOGIT2("UnpackToL: error <%d> reading data, stopping. i %d", err, i) + delete net; break; } diff -r 2709c04a4af5 -r 8b0c979bbe8c connectionmonitoring/connmon/connectionmonitor/src/ConnMonSess.cpp --- a/connectionmonitoring/connmon/connectionmonitor/src/ConnMonSess.cpp Fri Sep 03 09:38:26 2010 +0300 +++ b/connectionmonitoring/connmon/connectionmonitor/src/ConnMonSess.cpp Thu Sep 16 12:50:24 2010 +0300 @@ -2196,6 +2196,13 @@ } } } + else // ( rc != KErrNone ) + { + if ( ptrData ) + { + delete ptrData; + } + } break; } case EReqPluginGetQuery: @@ -2416,6 +2423,8 @@ if ( globalThBefore != globalThAfter ) { // Global threshold has changed -> send to plug-in engines + // Dead code in else-clause is for possible future use. Static analysis exception added. + // coverity[dead_error_line] if ( internal ) { if ( aValue == 1 ) @@ -2615,7 +2624,7 @@ // This method gets the bearer only for an internal connection. This is OK // since data volume events are not supported for external connections. - iCmServer->Iap()->GetBearer( aConnId, bearer, bearerInfo ); + (void) iCmServer->Iap()->GetBearer( aConnId, bearer, bearerInfo ); // Set minimum if ( bearer == EBearerWLAN || bearer == EBearerLAN ) @@ -2630,7 +2639,7 @@ { minimum = KMinimumWCDMADataThreshold; } - + // Check threshold if ( aThreshold < minimum ) { diff -r 2709c04a4af5 -r 8b0c979bbe8c connectionmonitoring/connmon/connectionmonitor/src/RConnMon.cpp --- a/connectionmonitoring/connmon/connectionmonitor/src/RConnMon.cpp Fri Sep 03 09:38:26 2010 +0300 +++ b/connectionmonitoring/connmon/connectionmonitor/src/RConnMon.cpp Thu Sep 16 12:50:24 2010 +0300 @@ -1320,4 +1320,49 @@ aBearerGroups2 = iBearerGroups2; } +// ----------------------------------------------------------------------------- +// TConnMonIapInfo Copy constructor +// ----------------------------------------------------------------------------- +// +EXPORT_C TConnMonIapInfo::TConnMonIapInfo( const TConnMonIapInfo& aConnMonIapInfo ) + :iCount( 0 ) + { + if ( aConnMonIapInfo.iCount <= KConnMonMaxIAPCount ) + { + iCount = aConnMonIapInfo.iCount; + for ( TInt i=0; i < iCount; i++ ) + { + iIap[ i ] = aConnMonIapInfo.iIap[ i ]; + } + } + else + { + LOGIT1("Client [%d]: TConnMonIapInfo iCount out of range", this) + } + } + +// ----------------------------------------------------------------------------- +// TConnMonIapInfo::operator= +// ----------------------------------------------------------------------------- +// +EXPORT_C TConnMonIapInfo& TConnMonIapInfo::operator=( const TConnMonIapInfo& aConnMonIapInfo ) + { + if ( this != &aConnMonIapInfo ) + { + if ( aConnMonIapInfo.iCount <= KConnMonMaxIAPCount ) + { + iCount = aConnMonIapInfo.iCount; + for ( TInt i=0; i < iCount; i++ ) + { + iIap[ i ] = aConnMonIapInfo.iIap[ i ]; + } + } + else + { + LOGIT1("Client [%d]: TConnMonIapInfo iCount out of range", this) + } + } + return *this; + } + // End-of-file diff -r 2709c04a4af5 -r 8b0c979bbe8c connectionmonitoring/connmon/dataconnectionlogger/group/dcl.mmp --- a/connectionmonitoring/connmon/dataconnectionlogger/group/dcl.mmp Fri Sep 03 09:38:26 2010 +0300 +++ b/connectionmonitoring/connmon/dataconnectionlogger/group/dcl.mmp Thu Sep 16 12:50:24 2010 +0300 @@ -11,7 +11,7 @@ * * Contributors: * -* Description: Builds DataConnectionLogger.exe. +* Description: Builds dataconnectionlogger.exe. * */ @@ -19,7 +19,7 @@ MACRO EPOC_SDK=0x07010000 -TARGET DataConnectionLogger.exe +TARGET dataconnectionlogger.exe TARGETTYPE exe UID 0x1000008D 0x101F6CFE diff -r 2709c04a4af5 -r 8b0c979bbe8c connectionmonitoring/connmon/dataconnectionlogger/rom/DataConnectionLogger.iby --- a/connectionmonitoring/connmon/dataconnectionlogger/rom/DataConnectionLogger.iby Fri Sep 03 09:38:26 2010 +0300 +++ b/connectionmonitoring/connmon/dataconnectionlogger/rom/DataConnectionLogger.iby Thu Sep 16 12:50:24 2010 +0300 @@ -20,7 +20,7 @@ #include -file=ABI_DIR\BUILD_DIR\Dataconnectionlogger.exe PROGRAMS_DIR\Dataconnectionlogger.exe +file=ABI_DIR\BUILD_DIR\dataconnectionlogger.exe PROGRAMS_DIR\dataconnectionlogger.exe #ifndef __COMMDB_PROTECTION data=DATAZ_\private\101F6CFE\backup_registration.xml private\101F6CFE\backup_registration.xml diff -r 2709c04a4af5 -r 8b0c979bbe8c connectionmonitoring/connmon/dataconnectionlogger/src/dcl.cpp --- a/connectionmonitoring/connmon/dataconnectionlogger/src/dcl.cpp Fri Sep 03 09:38:26 2010 +0300 +++ b/connectionmonitoring/connmon/dataconnectionlogger/src/dcl.cpp Thu Sep 16 12:50:24 2010 +0300 @@ -963,8 +963,8 @@ CleanupStack::Pop( eventUpdate ); } + break; // for } - break; // for } LOGEXITFN("CEngine::LogDataChangeEventL()") } diff -r 2709c04a4af5 -r 8b0c979bbe8c connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/cellulardataconfirmation.h --- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/cellulardataconfirmation.h Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,107 +0,0 @@ -/* -* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Prompt Dialog implementation -* -*/ - -#ifndef __CELLULARDATACONFIRMATION_H__ -#define __CELLULARDATACONFIRMATION_H__ - -#include -#include -#include -#include "ConnectionDialogsNotifBase.h" -#include "ConnectionUiUtilitiesCommon.h" - -class CDeviceDialogObserver; - - -NONSHARABLE_CLASS ( CCellularDataConfirmation ) : public CConnectionDialogsNotifBase - { - public: - /** - * Two-phased constructor. - */ - static CCellularDataConfirmation* NewL( - const TBool aResourceFileResponsible ); - - /** - * Destructor - */ - ~CCellularDataConfirmation(); - - /** - * Start the Notifier - * @param aBuffer Buffer - * @param aReplySlot Identifies which message argument to use for the - * reply. This message argument will refer to a - * modifiable descriptor, a TDes8 type, into which - * data can be returned. - * @param aMessage Message - * return - - */ - void StartL( const TDesC8& aBuffer, - TInt aReplySlot, - const RMessagePtr2& aMessage ); - - /** - * Cancel() the notifier - * @param - - * return - - */ - void Cancel(); - - /** - * RegisterL register the client notifier function - * @param - - * return TNotifierInfo - */ - TNotifierInfo RegisterL(); - - /** - * CompleteL the notifier is complete - * @param aStatus status - * return - - */ - void CompleteL( TInt aStatus ); - /** - * Sets the selected choice of the presented dialog - * @param aChoice TInt - * return - - */ - void SetSelectedChoice( TInt aChoice ); - - private: - /** - * Constructor - */ - CCellularDataConfirmation(); - - private: - /** Pointer to the device dialog interface for handling the dialog */ - CHbDeviceDialogSymbian* iDialog; - /** The observer to handle the data received from the orbit dialog */ - CDeviceDialogObserver* iObserver; - /* The choice selected by the user from the dialog */ - TMsgQueryLinkedResults iChoice; - /* Information if request was already completed, in case the - * observer receives the data signal and the signal about closing the - * dialog. - */ - TBool iCompleted; - - - }; - -#endif //__CELLULARDATACONFIRMATION_H__ diff -r 2709c04a4af5 -r 8b0c979bbe8c connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/devicedialogobserver.h --- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/devicedialogobserver.h Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,69 +0,0 @@ -/* -* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Prompt Dialog implementation -* -*/ - -#ifndef __DEVICEDIALOGOBSERVER_H__ -#define __DEVICEDIALOGOBSERVER_H__ - -#include "cellulardataconfirmation.h" - -NONSHARABLE_CLASS ( CDeviceDialogObserver ) : public CBase, public MHbDeviceDialogObserver - { - public: - /** - * Two-phased constructor. - */ - static CDeviceDialogObserver* NewL( CCellularDataConfirmation* aNotifier ); - - /** - * Destructor - */ - ~CDeviceDialogObserver(); - - /** - * Handles the user input received from the dialog - * @param aData CHbSymbianVariantMap& - */ - void DataReceived(CHbSymbianVariantMap& aData); - - /** - * Handles the closing of the dialog - * @param aCompletionCode TInt - */ - void DeviceDialogClosed(TInt /*aCompletionCode*/); - /** - * Sets the available choices for the query into the class variable - * @param aChoices RArray - */ - void SetChoices( RArray& aChoices ); - private: - /** - * Constructor - */ - CDeviceDialogObserver( CCellularDataConfirmation* aNotifier ); - - private: - /* Pointer to the object that triggered the dialog opening, - * needed to update the information about the user input. - */ - CCellularDataConfirmation* iNotifier; - /* The order of the buttons in the dialog, in order to map the - * data received from the dialog into the actual selected choice. - */ - RArray iChoiceIds; - }; - -#endif /* __DEVICEDIALOGOBSERVER_H__ */ diff -r 2709c04a4af5 -r 8b0c979bbe8c connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ActiveOfflineWlanDisabledNote.cpp --- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ActiveOfflineWlanDisabledNote.cpp Fri Sep 03 09:38:26 2010 +0300 +++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ActiveOfflineWlanDisabledNote.cpp Thu Sep 16 12:50:24 2010 +0300 @@ -20,9 +20,13 @@ #include "ActiveOfflineWlanDisabledNote.h" #include -#include +#include #include +// CONSTANTS + +// Empty string +_LIT( KEmpty, "" ); // ================= MEMBER FUNCTIONS ======================= @@ -60,10 +64,8 @@ HBufC* stringLabel = StringLoader::LoadLC( R_OFFLINE_NOT_POSSIBLE ); CleanupStack::PushL( stringLabel ); - CAknGlobalNote* globalNote = CAknGlobalNote::NewLC(); - globalNote->ShowNoteL( EAknGlobalInformationNote, *stringLabel ); - - CleanupStack::PopAndDestroy( globalNote ); + CHbDeviceNotificationDialogSymbian::NotificationL( + KEmpty, stringLabel->Des(), KEmpty); CleanupStack::PopAndDestroy( stringLabel ); iNotif->SetCancelledFlag( ETrue ); diff -r 2709c04a4af5 -r 8b0c979bbe8c connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ActiveSelectWLanDlgPlugin.cpp --- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ActiveSelectWLanDlgPlugin.cpp Fri Sep 03 09:38:26 2010 +0300 +++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ActiveSelectWLanDlgPlugin.cpp Thu Sep 16 12:50:24 2010 +0300 @@ -19,12 +19,11 @@ // INCLUDE FILES #include #include -#include +#include #include #include #include #include -//#include #include "ActiveSelectWLanDlgPlugin.h" #include "SelectWLANDlg.h" @@ -34,6 +33,9 @@ // CONSTANTS +// Empty string +_LIT( KEmpty, "" ); + /** * For iPeriodic Timer, 10 seconds * The interval between refreshing available wlan networks. @@ -291,7 +293,12 @@ CleanupStack::PopAndDestroy( stringLabel ); ***/ -//// 3.1 solution: prevent deadlock, does not work in 3.0 because of avkon +//// 10.1 solution: ditch avkon altogether + CHbDeviceNotificationDialogSymbian::NotificationL( + KEmpty, stringLabel->Des(), KEmpty); + CleanupStack::PopAndDestroy( stringLabel ); + +/*** 3.1 solution: prevent deadlock, does not work in 3.0 because of avkon RAknUiServer* globalNote = CAknSgcClient::AknSrv(); if ( globalNote->Handle() ) { @@ -300,7 +307,7 @@ } CleanupStack::PopAndDestroy( stringLabel ); -//// End of 3.1 solution +*** End of 3.1 solution ***/ /*** 3.0 solution CAknInformationNote* myLocalGlobalNote = new ( ELeave ) diff -r 2709c04a4af5 -r 8b0c979bbe8c connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ActiveWLANNetworkUnavailableNote.cpp --- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ActiveWLANNetworkUnavailableNote.cpp Fri Sep 03 09:38:26 2010 +0300 +++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ActiveWLANNetworkUnavailableNote.cpp Thu Sep 16 12:50:24 2010 +0300 @@ -20,12 +20,16 @@ #include "ActiveWLANNetworkUnavailableNote.h" #include -#include +#include #include // CONSTANTS +// Empty string +_LIT( KEmpty, "" ); + + // ================= MEMBER FUNCTIONS ======================= @@ -70,10 +74,8 @@ R_WLAN_NETWORK_UNAVAILABLE ); } - CAknGlobalNote* globalNote = CAknGlobalNote::NewLC(); - globalNote->ShowNoteL( EAknGlobalErrorNote, *stringLabel ); - - CleanupStack::PopAndDestroy( globalNote ); + CHbDeviceNotificationDialogSymbian::NotificationL( + KEmpty, stringLabel->Des(), KEmpty); CleanupStack::PopAndDestroy( stringLabel ); } diff -r 2709c04a4af5 -r 8b0c979bbe8c connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ConnUiUtilsNotif.cpp --- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ConnUiUtilsNotif.cpp Fri Sep 03 09:38:26 2010 +0300 +++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ConnUiUtilsNotif.cpp Thu Sep 16 12:50:24 2010 +0300 @@ -28,7 +28,6 @@ #include "WLANNetworkUnavailableNoteNotif.h" #include "wlanpowersavetestnotif.h" #include "easywapidlgnotif.h" -#include "cellulardataconfirmation.h" // CONSTANTS @@ -110,11 +109,6 @@ CleanupStack::PushL( serNotify ); aNotifiers->AppendL( serNotify ); CleanupStack::Pop( serNotify ); - - serNotify = CCellularDataConfirmation::NewL( resourceFileResponsible ); - CleanupStack::PushL( serNotify ); - aNotifiers->AppendL( serNotify ); - CleanupStack::Pop( serNotify ); serNotify = CWlanPowerSaveQueryNotif::NewL( resourceFileResponsible ); CleanupStack::PushL( serNotify ); diff -r 2709c04a4af5 -r 8b0c979bbe8c connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/SelectWLANDlg.cpp --- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/SelectWLANDlg.cpp Fri Sep 03 09:38:26 2010 +0300 +++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/SelectWLANDlg.cpp Thu Sep 16 12:50:24 2010 +0300 @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include "ConnUiUtilsNotif.hrh" #include "SelectWLANDlg.h" @@ -53,6 +53,8 @@ // Name of the MBM file containing icons _LIT( KFileIcons, "ConnectionUiUtilities.mbm" ); +// Empty string +_LIT( KEmpty, "" ); LOCAL_D const TInt KIconsGranularity = 4; @@ -232,16 +234,8 @@ HBufC* stringLabel = StringLoader::LoadLC( R_INFO_NO_NETWORKS_FOUND ); - //RAknUiServer* globalNote = CAknSgcClient::AknSrv(); - //if ( globalNote->Handle() ) - // { - // globalNote->ShowGlobalNoteL( *stringLabel, - // EAknGlobalInformationNote ); - // } - - CAknGlobalNote* globalNote = CAknGlobalNote::NewLC(); - globalNote->ShowNoteL( EAknGlobalInformationNote, *stringLabel ); - CleanupStack::PopAndDestroy( globalNote ); + CHbDeviceNotificationDialogSymbian::NotificationL( + KEmpty, stringLabel->Des(), KEmpty); CleanupStack::PopAndDestroy( stringLabel ); // set network prefs because we still need ssid diff -r 2709c04a4af5 -r 8b0c979bbe8c connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/WlanNetworkDataProvider.cpp --- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/WlanNetworkDataProvider.cpp Fri Sep 03 09:38:26 2010 +0300 +++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/WlanNetworkDataProvider.cpp Thu Sep 16 12:50:24 2010 +0300 @@ -355,7 +355,7 @@ CRepository* repository = CRepository::NewLC( KCRUidCoreApplicationUIs ); TInt connAllowed = 1; - repository->Get( KCoreAppUIsNetworkConnectionAllowed, connAllowed ); + (void) repository->Get( KCoreAppUIsNetworkConnectionAllowed, connAllowed ); CleanupStack::PopAndDestroy(); // repository if ( !connAllowed ) { diff -r 2709c04a4af5 -r 8b0c979bbe8c connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/cellulardataconfirmation.cpp --- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/cellulardataconfirmation.cpp Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,198 +0,0 @@ -/* -* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Prompt Dialog implementation -* -*/ - - -// INCLUDE FILES -#include -#include -#include -#include "ConnectionDialogsLogger.h" -#include "cellulardataconfirmation.h" -#include "ConnectionDialogsNotifBase.h" -#include "ConnectionDialogsUidDefs.h" -#include "ConnUiUtilsNotif.h" -#include "devicedialogobserver.h" - - -// CONSTANTS -const TInt KVariableLength = 30; -_LIT( KHomenetwork, "homenetwork"); -_LIT(KType, "com.nokia.ipconnmgmt.promptdialog/1.0"); - -// --------------------------------------------------------- -// CCellularDataConfirmation::CCellularDataConfirmation() -// --------------------------------------------------------- -// -CCellularDataConfirmation::CCellularDataConfirmation() - { - iCompleted = EFalse; - iChoice = EMsgQueryCancelled; - iObserver = NULL; - iDialog = NULL; - } - -// --------------------------------------------------------- -// CCellularDataConfirmation::~CCellularDataConfirmation() -// --------------------------------------------------------- -// -CCellularDataConfirmation::~CCellularDataConfirmation() - { - CLOG_ENTERFN( "CCellularDataConfirmation::~CCellularDataConfirmation" ); - delete iDialog; - delete iObserver; - CLOG_LEAVEFN( "CCellularDataConfirmation::~CCellularDataConfirmation" ); - } - -// --------------------------------------------------------- -// CCellularDataConfirmation* CCellularDataConfirmation::NewL -// --------------------------------------------------------- -// -CCellularDataConfirmation* CCellularDataConfirmation::NewL( - const TBool aResourceFileResponsible ) - { - CLOG_ENTERFN( "CCellularDataConfirmation::NewL" ); - CCellularDataConfirmation* self = new ( ELeave ) CCellularDataConfirmation(); - CleanupStack::PushL( self ); - self->ConstructL( KResourceFileName, aResourceFileResponsible ); - CleanupStack::Pop(); - CLOG_LEAVEFN( "CCellularDataConfirmation::NewL" ); - return self; - } - -// --------------------------------------------------------- -// void CCellularDataConfirmation::StartL -// --------------------------------------------------------- -// -void CCellularDataConfirmation::StartL( const TDesC8& aBuffer, - TInt aReplySlot, - const RMessagePtr2& aMessage ) - { - CLOG_ENTERFN( "CCellularDataConfirmation::StartL" ); - iChoice = EMsgQueryCancelled; - TPckgBuf input; - TConnUiUiDestConnMethodNoteId noteInfo; - input.Copy( aBuffer ); - noteInfo = input(); - iReplySlot = aReplySlot; - iMessage = aMessage; - - // Create the list box items - RArray choices; - - // Observer is needed in order to get the user inputs - iObserver = CDeviceDialogObserver::NewL( this ); - iDialog = CHbDeviceDialogSymbian::NewL(); - - // The variant map is needed to construct the dialog correctly, - // information whether we are in home network is needed - TBuf key(KHomenetwork); - TBool homeNetwork; - if ( noteInfo.iNoteId == EConfirmMethodUsageQueryInHomeNetwork ) - { - homeNetwork = ETrue; - choices.Append(EMsgQueryAutomatically); - choices.Append(EMsgQueryThisTime); - choices.Append(EMsgQueryCancelled); - } - else - { - homeNetwork = EFalse; - choices.Append(EMsgQueryThisTime); - choices.Append(EMsgQueryAutomatically); - choices.Append(EMsgQueryCancelled); - } - // Set the choice order for the observer so that it knows which button press - // means which choice - iObserver->SetChoices(choices); - - // Create the variant data information for the plugin - CHbSymbianVariantMap* map = CHbSymbianVariantMap::NewL(); - CleanupStack::PushL( map ); - CHbSymbianVariant *variant = CHbSymbianVariant::NewL ( &homeNetwork, CHbSymbianVariant::EBool ); - CleanupStack::PushL( variant ); - TInt error = map->Add( key, variant); - User::LeaveIfError( error ); - CleanupStack::Pop( variant ); // map's cleanup sequence handles variant. - - // Show the dialog. - error = iDialog->Show( KType, *map, iObserver ); - User::LeaveIfError( error ); - CleanupStack::PopAndDestroy( map ); - CLOG_LEAVEFN( "CCellularDataConfirmation::StartL" ); - } - -// --------------------------------------------------------- -// void CConfirmationQueryNotif::CompleteL( TInt aStatus ) -// --------------------------------------------------------- -// -void CCellularDataConfirmation::CompleteL( TInt aStatus ) - { - CLOG_ENTERFN( "CCellularDataConfirmation::CompleteL" ); - if ( !iCompleted ) - { - if ( !iMessage.IsNull() ) - { - iMessage.WriteL( iReplySlot, TPckg( iChoice ) ); - iMessage.Complete( aStatus ); - iCompleted = ETrue; - } - } - CLOG_LEAVEFN( "CCellularDataConfirmation::CompleteL" ); - } - -// --------------------------------------------------------------- -// void CConfirmationQueryNotif::SetSelectedChoiceL( TInt aChoice ) -// ---------------------------------------------------------------- -// -void CCellularDataConfirmation::SetSelectedChoice ( TInt aChoice ) - { - CLOG_ENTERFN( "CCellularDataConfirmation::SetSelectedChoice" ); - iChoice = (TMsgQueryLinkedResults)aChoice; - CLOG_LEAVEFN( "CCellularDataConfirmation::SetSelectedChoice" ); - } - -// --------------------------------------------------------------- -// void CCellularDataConfirmation::Cancel() -// ---------------------------------------------------------------- -// -void CCellularDataConfirmation::Cancel() - { - CLOG_ENTERFN( "CCellularDataConfirmation::Cancel" ); - if ( !iCompleted ) - { - iDialog->Cancel(); - TRAP_IGNORE( iMessage.WriteL( iReplySlot, - TPckg( EMsgQueryCancelled ) )); - iMessage.Complete( KErrCancel ); - } - CLOG_LEAVEFN( "CCellularDataConfirmation::Cancel" ); - } - -// --------------------------------------------------------------- -// CCellularDataConfirmation::TNotifierInfo -// CCellularDataConfirmation::RegisterL() -// ---------------------------------------------------------------- -// -CCellularDataConfirmation::TNotifierInfo CCellularDataConfirmation::RegisterL() - { - CLOG_ENTERFN( "CCellularDataConfirmation::RegisterL" ); - iInfo.iUid = KUidConfirmationQuery; - iInfo.iPriority = ENotifierPriorityHigh; - iInfo.iChannel = KUidConfirmationQuery; - CLOG_LEAVEFN( "CCellularDataConfirmation::RegisterL" ); - return iInfo; - } diff -r 2709c04a4af5 -r 8b0c979bbe8c connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/devicedialogobserver.cpp --- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/devicedialogobserver.cpp Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,90 +0,0 @@ -/* -* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Prompt Dialog implementation -* -*/ - -#include -#include "devicedialogobserver.h" - -_LIT(KButton, "button"); - -// --------------------------------------------------------- -// CDeviceDialogObserver* CDeviceDialogObserver::NewL -// --------------------------------------------------------- -// -CDeviceDialogObserver* CDeviceDialogObserver::NewL( CCellularDataConfirmation* aNotifier ) - { - CDeviceDialogObserver* self = new ( ELeave ) CDeviceDialogObserver( aNotifier ); - return self; - } - -// --------------------------------------------------------- -// CDeviceDialogObserver::CDeviceDialogObserver -// --------------------------------------------------------- -// -CDeviceDialogObserver::CDeviceDialogObserver( CCellularDataConfirmation* aNotifier ): - iNotifier( aNotifier ) - { - - } - -// --------------------------------------------------------- -// CDeviceDialogObserver::~CDeviceDialogObserver() -// --------------------------------------------------------- -// -CDeviceDialogObserver::~CDeviceDialogObserver() - { - - } - -// --------------------------------------------------------- -// void CConfirmationQuery::SetChoices -// --------------------------------------------------------- -// -void CDeviceDialogObserver::SetChoices( RArray& aChoices ) - { - iChoiceIds = aChoices; - } - -// --------------------------------------------------------- -// void CDeviceDialogObserver::DataReceived -// --------------------------------------------------------- -// -void CDeviceDialogObserver::DataReceived( CHbSymbianVariantMap& aData ) -{ - // The key that is returned by the promptdialog is "button", - // meaning the id of the pressed button. - TInt intData = *(TInt*)(aData.Get(KButton)->Data()); - - TInt status = KErrNone; - - iNotifier->SetSelectedChoice( iChoiceIds[intData-1] ); - TRAP_IGNORE( iNotifier->CompleteL( status )); - -} - -// --------------------------------------------------------- -// void CDeviceDialogObserver::DeviceDialogClosed -// --------------------------------------------------------- -// -void CDeviceDialogObserver::DeviceDialogClosed( TInt /*aCompletionCode*/ ) -{ - // Dialog was closed, let's complete with that error code - TInt status = KErrCancel; - iNotifier->SetSelectedChoice( EMsgQueryCancelled ); - TRAP_IGNORE( iNotifier->CompleteL( status )); -} - - diff -r 2709c04a4af5 -r 8b0c979bbe8c connectionutilities/ConnectionDialogs/ConnectionUiUtilities/inc/ConnectionUiUtilitiesImpl.h --- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/inc/ConnectionUiUtilitiesImpl.h Fri Sep 03 09:38:26 2010 +0300 +++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/inc/ConnectionUiUtilitiesImpl.h Thu Sep 16 12:50:24 2010 +0300 @@ -41,6 +41,7 @@ class TConnectionPrefs; class CAknGlobalNote; class CConnectionStatusPopup; +class CCellularDataConfirmation; // CLASS DECLARATION @@ -479,6 +480,9 @@ // Connection status (via, error) implementation CConnectionStatusPopup* iConnStatusPopup; + // Cellular confirmation prompt + CCellularDataConfirmation* iCellularConfirmation; + }; diff -r 2709c04a4af5 -r 8b0c979bbe8c connectionutilities/ConnectionDialogs/ConnectionUiUtilities/inc/cellulardataconfirmation.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/inc/cellulardataconfirmation.h Thu Sep 16 12:50:24 2010 +0300 @@ -0,0 +1,104 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Prompt Dialog implementation +* +*/ + +#ifndef __CELLULARDATACONFIRMATION_H__ +#define __CELLULARDATACONFIRMATION_H__ + +#include +#include +#include +#include "ConnectionUiUtilitiesCommon.h" + +class CDeviceDialogObserver; + + +NONSHARABLE_CLASS ( CCellularDataConfirmation ) : public CBase + { + public: + /** + * Two-phased constructor. + */ + static CCellularDataConfirmation* NewL( ); + + /** + * Destructor + */ + ~CCellularDataConfirmation(); + + /** + * Start the Notifier + * @param aResult Result of user selection + * @param aHomeNetwork Home or foreign network. + * @param aStatus Status object of notifier + */ + void StartL( TMsgQueryLinkedResults& aResult, + const TBool aHomeNetwork, + TRequestStatus& aStatus ); + + /** + * Cancel() the notifier + * @param - + * return - + */ + void Cancel(); + + /** + * CompleteL the notifier is complete + * @param aStatus status + * return - + */ + void CompleteL( TInt aStatus ); + /** + * Sets the selected choice of the presented dialog + * @param aChoice TInt + * return - + */ + void SetSelectedChoice( TInt aChoice ); + + private: + /** + * Constructor + */ + CCellularDataConfirmation(); + + /** + * Second-phase constructor + */ + void ConstructL(); + + + private: + /** Pointer to the device dialog interface for handling the dialog */ + CHbDeviceDialogSymbian* iDialog; + /** The observer to handle the data received from the orbit dialog */ + CDeviceDialogObserver* iObserver; + + /* Information if request was already completed, in case the + * observer receives the data signal and the signal about closing the + * dialog. + */ + TBool iCompleted; + + /** Request status. Not owned. */ + TRequestStatus* iStatus; + + /** Result of query. Not owned. */ + TMsgQueryLinkedResults* iResult; + + }; + +#endif //__CELLULARDATACONFIRMATION_H__ diff -r 2709c04a4af5 -r 8b0c979bbe8c connectionutilities/ConnectionDialogs/ConnectionUiUtilities/inc/devicedialogobserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/inc/devicedialogobserver.h Thu Sep 16 12:50:24 2010 +0300 @@ -0,0 +1,69 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Prompt Dialog implementation +* +*/ + +#ifndef __DEVICEDIALOGOBSERVER_H__ +#define __DEVICEDIALOGOBSERVER_H__ + +#include "cellulardataconfirmation.h" + +NONSHARABLE_CLASS ( CDeviceDialogObserver ) : public CBase, public MHbDeviceDialogObserver + { + public: + /** + * Two-phased constructor. + */ + static CDeviceDialogObserver* NewL( CCellularDataConfirmation* aNotifier ); + + /** + * Destructor + */ + ~CDeviceDialogObserver(); + + /** + * Handles the user input received from the dialog + * @param aData CHbSymbianVariantMap& + */ + void DataReceived(CHbSymbianVariantMap& aData); + + /** + * Handles the closing of the dialog + * @param aCompletionCode TInt + */ + void DeviceDialogClosed(TInt /*aCompletionCode*/); + /** + * Sets the available choices for the query into the class variable + * @param aChoices RArray + */ + void SetChoices( RArray& aChoices ); + private: + /** + * Constructor + */ + CDeviceDialogObserver( CCellularDataConfirmation* aNotifier ); + + private: + /* Pointer to the object that triggered the dialog opening, + * needed to update the information about the user input. + */ + CCellularDataConfirmation* iNotifier; + /* The order of the buttons in the dialog, in order to map the + * data received from the dialog into the actual selected choice. + */ + RArray iChoiceIds; + }; + +#endif /* __DEVICEDIALOGOBSERVER_H__ */ diff -r 2709c04a4af5 -r 8b0c979bbe8c connectionutilities/ConnectionDialogs/ConnectionUiUtilities/src/ConnectionUiUtilitiesImpl.cpp --- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/src/ConnectionUiUtilitiesImpl.cpp Fri Sep 03 09:38:26 2010 +0300 +++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/src/ConnectionUiUtilitiesImpl.cpp Thu Sep 16 12:50:24 2010 +0300 @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include @@ -45,6 +44,7 @@ #include "ChangeConnectionDlg.h" #include "ActiveCChangeConnectionDlg.h" #include "connectionstatuspopup.h" +#include "cellulardataconfirmation.h" #include #include @@ -89,7 +89,8 @@ iDummy( EFalse ), iDummySecMode( EWlanConnectionSecurityOpen ), iDummyExtSecMode( EWlanConnectionExtentedSecurityModeOpen ), - iConnStatusPopup( NULL ) + iConnStatusPopup( NULL ), + iCellularConfirmation( NULL ) { for ( TInt i = 0; i < KNumberOfWrappedDialogs; i++ ) { @@ -111,6 +112,7 @@ FeatureManager::FeatureSupported( KFeatureIdProtocolWlan ); FeatureManager::UnInitializeLib(); iConnStatusPopup = CConnectionStatusPopup::NewL(); + iCellularConfirmation = CCellularDataConfirmation::NewL(); } @@ -132,6 +134,7 @@ } delete iConnStatusPopup; + delete iCellularConfirmation; } // --------------------------------------------------------- @@ -163,6 +166,7 @@ TBool CConnectionUiUtilitiesImpl::AlwaysAskPageL( TCuuAlwaysAskResults& aResult ) { + // Not used LoadResourceFileL(); // options array CDesCArrayFlat* values = new( ELeave )CDesCArrayFlat( 1 ); @@ -370,6 +374,7 @@ TWlanConnectionExtentedSecurityMode& aExtSecurityMode, TBool& aProtectedSetupSupported ) { + // Used only in to-be-removed apengine TBool result( EFalse ); if ( iIsWlanSupported ) @@ -518,6 +523,9 @@ // TBool CConnectionUiUtilitiesImpl::OffLineWlanNote() { + // Maps to KUidCOfflineWlanNoteDlg + // Not used + CLOG_ENTERFN( "CConnectionUiUtilitiesImpl::OffLineWlanNote" ); if ( iIsWlanSupported ) @@ -552,7 +560,7 @@ void CConnectionUiUtilitiesImpl::OffLineWlanNote( TRequestStatus& aStatus ) { CLOG_ENTERFN( "CConnectionUiUtilitiesImpl::OffLineWlanNote Async" ); - + // Not used if ( iIsWlanSupported ) { if ( iActiveWrapper[EOffLineWlan] ) @@ -573,6 +581,7 @@ // void CConnectionUiUtilitiesImpl::CancelOffLineWlanNote() { + // Not used if ( iIsWlanSupported ) { if ( iActiveWrapper[EOffLineWlan] ) @@ -592,6 +601,8 @@ // void CConnectionUiUtilitiesImpl::OffLineWlanDisabledNote() { + // Maps to KUidCOfflineWlanNoteDlg + // Not used if ( iIsWlanSupported ) { if ( !iActiveWrapper[EWlanDisabled] ) @@ -613,6 +624,7 @@ // TBool CConnectionUiUtilitiesImpl::EasyWepDlg( TDes* aKey, TBool& aHex ) { + // Not used TInt status = KErrNone; if ( iIsWlanSupported ) @@ -640,6 +652,7 @@ // void CConnectionUiUtilitiesImpl::EasyWepDlgAsync( TRequestStatus& aStatus, TDes* aKey, TBool& aHex ) { + // Not used if ( iIsWlanSupported ) { if ( !iActiveWrapper[EWlanEasyWep] ) @@ -675,6 +688,7 @@ // TBool CConnectionUiUtilitiesImpl::EasyWpaDlg( TDes* aKey ) { + // Not used TInt status = KErrNone; if ( iIsWlanSupported ) { @@ -721,6 +735,7 @@ // void CConnectionUiUtilitiesImpl::CancelEasyWpaDlg() { + // Not used if ( iIsWlanSupported ) { iActiveWrapper[EWlanEasyWpa]->Cancel(); @@ -733,6 +748,9 @@ // void CConnectionUiUtilitiesImpl::WLANNetworkUnavailableNote() { + // Maps to KUidCOfflineWlanNoteDlg + // Not used + if ( iIsWlanSupported ) { if ( !iActiveWrapper[EWlanNetwUnavail] ) @@ -771,6 +789,7 @@ TWlanConnectionSecurityMode& aSecurityMode, TBool& aProtectedSetupSupported ) { + // Not used TBool result( EFalse ); if ( iIsWlanSupported ) @@ -883,6 +902,7 @@ TWlanConnectionExtentedSecurityMode& aExtSecurityMode, TBool& aProtectedSetupSupported ) { + // Not used CLOG_ENTERFN( "CConnectionUiUtilitiesImpl::SearchWLANNetworkAsync" ); if ( iIsWlanSupported ) @@ -916,8 +936,8 @@ TMsgQueryLinkedResults& aResult, const TBool aHomeNetwork, TRequestStatus& aStatus ) - { - iNotif.ConfirmMethodUsageQuery( aResult, aHomeNetwork, aStatus ); + { + TRAP_IGNORE( iCellularConfirmation->StartL( aResult, aHomeNetwork, aStatus ) ); } // --------------------------------------------------------- @@ -926,7 +946,7 @@ // void CConnectionUiUtilitiesImpl::CancelConfirmMethodUsageQuery() { - iNotif.CancelConfirmMethodUsageQuery(); + iCellularConfirmation->Cancel(); } @@ -938,6 +958,7 @@ TBool& aDisable, TRequestStatus& aStatus ) { + // Not used iNotif.WlanPowerSaveTestNote( aDisable, aStatus ); } @@ -957,6 +978,7 @@ // TBool CConnectionUiUtilitiesImpl::EasyWapiDlg( TDes* aKey ) { + // Not used TInt status( KErrNone ); if ( iIsWlanSupported ) diff -r 2709c04a4af5 -r 8b0c979bbe8c connectionutilities/ConnectionDialogs/ConnectionUiUtilities/src/cellulardataconfirmation.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/src/cellulardataconfirmation.cpp Thu Sep 16 12:50:24 2010 +0300 @@ -0,0 +1,171 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Prompt Dialog implementation +* +*/ + + +// INCLUDE FILES +#include +#include +#include +#include "ConnectionDialogsLogger.h" +#include "cellulardataconfirmation.h" +#include "ConnectionDialogsNotifBase.h" +#include "ConnectionDialogsUidDefs.h" +#include "devicedialogobserver.h" + + +// CONSTANTS +_LIT( KHomenetwork, "homenetwork" ); +_LIT( KType, "com.nokia.ipconnmgmt.promptdialog/1.0" ); + +// --------------------------------------------------------- +// CCellularDataConfirmation::CCellularDataConfirmation() +// --------------------------------------------------------- +// +CCellularDataConfirmation::CCellularDataConfirmation(): +iDialog( NULL ), iObserver( NULL ), iCompleted( EFalse ), +iStatus( NULL ), iResult( NULL ) + { + } + +// --------------------------------------------------------- +// CCellularDataConfirmation::~CCellularDataConfirmation() +// --------------------------------------------------------- +// +CCellularDataConfirmation::~CCellularDataConfirmation() + { + CLOG_ENTERFN( "CCellularDataConfirmation::~CCellularDataConfirmation" ); + delete iDialog; + delete iObserver; + CLOG_LEAVEFN( "CCellularDataConfirmation::~CCellularDataConfirmation" ); + } + +// --------------------------------------------------------- +// CCellularDataConfirmation* CCellularDataConfirmation::NewL +// --------------------------------------------------------- +// +CCellularDataConfirmation* CCellularDataConfirmation::NewL( ) + { + CLOG_ENTERFN( "CCellularDataConfirmation::NewL" ); + CCellularDataConfirmation* self = new ( ELeave ) CCellularDataConfirmation(); + CleanupStack::PushL( self ); + self->ConstructL( ); + CleanupStack::Pop(); + CLOG_LEAVEFN( "CCellularDataConfirmation::NewL" ); + return self; + } + +void CCellularDataConfirmation::ConstructL() + { + } + +// --------------------------------------------------------- +// void CCellularDataConfirmation::StartL +// --------------------------------------------------------- +// +void CCellularDataConfirmation::StartL( TMsgQueryLinkedResults& aResult, + const TBool aHomeNetwork, + TRequestStatus& aStatus ) + { + CLOG_ENTERFN( "CCellularDataConfirmation::StartL" ); + aResult = EMsgQueryCancelled; + iResult = &aResult; + aStatus = KRequestPending; + iStatus = &aStatus; + + // Create the list box items + RArray choices; + + // The variant map is needed to construct the dialog correctly, + // information whether we are in home network is needed + if ( aHomeNetwork ) + { + choices.Append( EMsgQueryAutomatically ); + choices.Append( EMsgQueryThisTime ); + choices.Append( EMsgQueryCancelled ); + } + else + { + choices.Append( EMsgQueryThisTime ); + choices.Append( EMsgQueryAutomatically ); + choices.Append( EMsgQueryCancelled ); + } + + // Observer is needed in order to get the user inputs + iObserver = CDeviceDialogObserver::NewL( this ); + iDialog = CHbDeviceDialogSymbian::NewL(); + + // Set the choice order for the observer so that it knows which button press + // means which choice + iObserver->SetChoices( choices ); + + // Create the variant data information for the plugin + CHbSymbianVariantMap* map = CHbSymbianVariantMap::NewL(); + CleanupStack::PushL( map ); + CHbSymbianVariant *variant + = CHbSymbianVariant::NewL( &aHomeNetwork, CHbSymbianVariant::EBool ); + CleanupStack::PushL( variant ); + User::LeaveIfError( map->Add( KHomenetwork, variant ) ); + CleanupStack::Pop( variant ); // map's cleanup sequence handles variant. + + // Show the dialog. + User::LeaveIfError( iDialog->Show( KType, *map, iObserver ) ); + + CleanupStack::PopAndDestroy( map ); + CLOG_LEAVEFN( "CCellularDataConfirmation::StartL" ); + } + +// --------------------------------------------------------- +// void CConfirmationQueryNotif::CompleteL( TInt aStatus ) +// --------------------------------------------------------- +// +void CCellularDataConfirmation::CompleteL( TInt aStatus ) + { + CLOG_ENTERFN( "CCellularDataConfirmation::CompleteL" ); + if ( !iCompleted ) + { + iCompleted = ETrue; + User::RequestComplete( iStatus, aStatus ); + } + CLOG_LEAVEFN( "CCellularDataConfirmation::CompleteL" ); + } + +// --------------------------------------------------------------- +// void CConfirmationQueryNotif::SetSelectedChoiceL( TInt aChoice ) +// ---------------------------------------------------------------- +// +void CCellularDataConfirmation::SetSelectedChoice ( TInt aChoice ) + { + CLOG_ENTERFN( "CCellularDataConfirmation::SetSelectedChoice" ); + *iResult = (TMsgQueryLinkedResults)aChoice; + CLOG_LEAVEFN( "CCellularDataConfirmation::SetSelectedChoice" ); + } + +// --------------------------------------------------------------- +// void CCellularDataConfirmation::Cancel() +// ---------------------------------------------------------------- +// +void CCellularDataConfirmation::Cancel() + { + CLOG_ENTERFN( "CCellularDataConfirmation::Cancel" ); + if ( !iCompleted ) + { + iDialog->Cancel(); + User::RequestComplete( iStatus, KErrCancel ); + } + CLOG_LEAVEFN( "CCellularDataConfirmation::Cancel" ); + } + diff -r 2709c04a4af5 -r 8b0c979bbe8c connectionutilities/ConnectionDialogs/ConnectionUiUtilities/src/devicedialogobserver.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/src/devicedialogobserver.cpp Thu Sep 16 12:50:24 2010 +0300 @@ -0,0 +1,90 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Prompt Dialog implementation +* +*/ + +#include +#include "devicedialogobserver.h" + +_LIT(KButton, "button"); + +// --------------------------------------------------------- +// CDeviceDialogObserver* CDeviceDialogObserver::NewL +// --------------------------------------------------------- +// +CDeviceDialogObserver* CDeviceDialogObserver::NewL( CCellularDataConfirmation* aNotifier ) + { + CDeviceDialogObserver* self = new ( ELeave ) CDeviceDialogObserver( aNotifier ); + return self; + } + +// --------------------------------------------------------- +// CDeviceDialogObserver::CDeviceDialogObserver +// --------------------------------------------------------- +// +CDeviceDialogObserver::CDeviceDialogObserver( CCellularDataConfirmation* aNotifier ): + iNotifier( aNotifier ) + { + + } + +// --------------------------------------------------------- +// CDeviceDialogObserver::~CDeviceDialogObserver() +// --------------------------------------------------------- +// +CDeviceDialogObserver::~CDeviceDialogObserver() + { + + } + +// --------------------------------------------------------- +// void CConfirmationQuery::SetChoices +// --------------------------------------------------------- +// +void CDeviceDialogObserver::SetChoices( RArray& aChoices ) + { + iChoiceIds = aChoices; + } + +// --------------------------------------------------------- +// void CDeviceDialogObserver::DataReceived +// --------------------------------------------------------- +// +void CDeviceDialogObserver::DataReceived( CHbSymbianVariantMap& aData ) +{ + // The key that is returned by the promptdialog is "button", + // meaning the id of the pressed button. + TInt intData = *(TInt*)(aData.Get(KButton)->Data()); + + TInt status = KErrNone; + + iNotifier->SetSelectedChoice( iChoiceIds[intData-1] ); + TRAP_IGNORE( iNotifier->CompleteL( status )); + +} + +// --------------------------------------------------------- +// void CDeviceDialogObserver::DeviceDialogClosed +// --------------------------------------------------------- +// +void CDeviceDialogObserver::DeviceDialogClosed( TInt /*aCompletionCode*/ ) +{ + // Dialog was closed, let's complete with that error code + TInt status = KErrCancel; + iNotifier->SetSelectedChoice( EMsgQueryCancelled ); + TRAP_IGNORE( iNotifier->CompleteL( status )); +} + + diff -r 2709c04a4af5 -r 8b0c979bbe8c connectionutilities/ConnectionDialogs/DisconnectDlg/src/DisconnectDlgUi.cpp --- a/connectionutilities/ConnectionDialogs/DisconnectDlg/src/DisconnectDlgUi.cpp Fri Sep 03 09:38:26 2010 +0300 +++ b/connectionutilities/ConnectionDialogs/DisconnectDlg/src/DisconnectDlgUi.cpp Thu Sep 16 12:50:24 2010 +0300 @@ -53,8 +53,9 @@ EXPORT_C CArrayPtr* NotifierArray() { - CArrayPtrFlat* array = new( ELeave ) - CArrayPtrFlat( KPluginGranularity ); + CArrayPtrFlat* array = NULL; + TRAP_IGNORE( array = new (ELeave) + CArrayPtrFlat( KPluginGranularity ); ) if ( array ) { diff -r 2709c04a4af5 -r 8b0c979bbe8c connectionutilities/ConnectionDialogs/cconndlg/inc/ConnDlgPlugin.h --- a/connectionutilities/ConnectionDialogs/cconndlg/inc/ConnDlgPlugin.h Fri Sep 03 09:38:26 2010 +0300 +++ b/connectionutilities/ConnectionDialogs/cconndlg/inc/ConnDlgPlugin.h Thu Sep 16 12:50:24 2010 +0300 @@ -30,7 +30,6 @@ #include #include -#include // ENUMERATIONS diff -r 2709c04a4af5 -r 8b0c979bbe8c connectionutilities/ConnectionDialogs/ecomsrc/connectiondialogswrapper.cpp --- a/connectionutilities/ConnectionDialogs/ecomsrc/connectiondialogswrapper.cpp Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,215 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implementation of ecom plugin -* -*/ - - -// INCLUDE FILES -#include "ConnectionDialogsUidDefs.h" -#include "ConnectionDialogsLogger.h" - -#include -#include // link against aknnotifierwrapper.lib - - -// CONSTANTS -const TInt KMyPriority = MEikSrvNotifierBase2::ENotifierPriorityLow; -const TInt KArrayGranularity = 5; - - -// --------------------------------------------------------- -// CleanupArray() -// --------------------------------------------------------- -// -void CleanupArray( TAny* aArray ) - { - CArrayPtrFlat* - subjects = static_cast*>( aArray ); - TInt lastInd = subjects->Count()-1; - for ( TInt i = lastInd; i >= 0; i-- ) - { - subjects->At( i )->Release(); - } - - delete subjects; - } - -// --------------------------------------------------------- -// DoCreateNotifierArrayL() -// --------------------------------------------------------- -// -CArrayPtr* DoCreateNotifierArrayL() - { - CLOG_CREATE; - CArrayPtrFlat* subjects = - new ( ELeave )CArrayPtrFlat( KArrayGranularity ); - - CleanupStack::PushL( TCleanupItem( CleanupArray, subjects ) ); - - // Create Wrappers - - _LIT( KCConnDlgPluginName, "CCONNDLGPLUGIN.DLL" ); - _LIT( KDisconnectDlgName, "DISCONNECTDLG.DLL" ); - _LIT( KConnUiUtilsNotifName, "ConnUiUtilsNotif.DLL" ); - - // Session owning notifier(if default implementation is enough) - CAknCommonNotifierWrapper* master = - CAknCommonNotifierWrapper::NewL( KUidCConnDlgIap, - KUidCConnDlgIap, - KMyPriority, - KCConnDlgPluginName, - 1 ); // we don't use synch reply - - CleanupStack::PushL( master ); - subjects->AppendL( master ); - CleanupStack::Pop( master ); - - subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master, - KUidCConnDlgNewIap, - KUidCConnDlgNewIap, - KMyPriority ) ); - - subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master, - KUidCConnDlgAuthentication, - KUidCConnDlgAuthentication, - KMyPriority ) ); - - subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master, - KUidCConnDlgReconnect, - KUidCConnDlgReconnect, - KMyPriority ) ); - - subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master, - KUidCConnDlgQos, - KUidCConnDlgQos, - KMyPriority ) ); - - subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master, - KUidCConnDlgSelectConn, - KUidCConnDlgSelectConn, - KMyPriority ) ); - - // Disconnect dialog - subjects->AppendL( CAknCommonNotifierWrapper::NewL( KUidDisconnectDlg, - KUidDisconnectDlg, - KMyPriority, - KDisconnectDlgName, - 1 ) ); - - // WLAN wrappers - master = CAknCommonNotifierWrapper::NewL( KUidSelectWLanDlg, - KUidSelectWLanDlg, - KMyPriority, - KConnUiUtilsNotifName, - 1 ); - - CleanupStack::PushL( master ); - subjects->AppendL( master ); - CleanupStack::Pop( master ); - - - subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master, - KUidCOfflineWlanNoteDlg, - KUidCOfflineWlanNoteDlg, - KMyPriority ) ); - - subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master, - KUidCOfflineWlanDisabledNoteDlg, - KUidCOfflineWlanDisabledNoteDlg, - KMyPriority ) ); - - subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master, - KUidEasyWepDlg, - KUidEasyWepDlg, - KMyPriority ) ); - - subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master, - KUidEasyWpaDlg, - KUidEasyWpaDlg, - KMyPriority ) ); - - subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master, - KUidWLANNetworkUnavailableNoteDlg, - KUidWLANNetworkUnavailableNoteDlg, - KMyPriority ) ); - - // ALR WRAPPERS - - subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master, - KUidConfirmationQuery, - KUidConfirmationQuery, - KMyPriority ) ); - - subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master, - KUidConnectViaNote, - KUidConnectViaNote, - KMyPriority ) ); - - // WLAN wrappers - - subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master, - KUidWlanPowerSaveTestNote, - KUidWlanPowerSaveTestNote, - KMyPriority ) ); - - subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master, - KUidEasyWapiDlg, - KUidEasyWapiDlg, - KMyPriority ) ); - - CleanupStack::Pop(); // array cleanup - return( subjects ); - } - -// --------------------------------------------------------- -// NotifierArray() -// --------------------------------------------------------- -// -CArrayPtr* NotifierArray() - // old Lib main entry point - { - CArrayPtr* array = 0; - TRAP_IGNORE( array = DoCreateNotifierArrayL() ); - return array; - } - -// --------------------------------------------------------- -// ImplementationTable -// --------------------------------------------------------- -// -const TImplementationProxy ImplementationTable[] = - { -#ifdef __EABI__ - {{0x10207375}, ( TFuncPtr )NotifierArray} -#else - {{0x10207375}, NotifierArray} -#endif - }; - -// --------------------------------------------------------- -// ImplementationGroupProxy -// entry point -// --------------------------------------------------------- -// -EXPORT_C const TImplementationProxy* ImplementationGroupProxy( - TInt& aTableCount ) - { - aTableCount = sizeof( ImplementationTable ) / - sizeof( TImplementationProxy ) ; - return ImplementationTable; - } - - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c connectionutilities/ConnectionDialogs/group/ConnUiUtilsNotif.mmp --- a/connectionutilities/ConnectionDialogs/group/ConnUiUtilsNotif.mmp Fri Sep 03 09:38:26 2010 +0300 +++ b/connectionutilities/ConnectionDialogs/group/ConnUiUtilsNotif.mmp Thu Sep 16 12:50:24 2010 +0300 @@ -69,8 +69,6 @@ SOURCE wlanpowersavetest.cpp SOURCE wlanpowersavetestnotif.cpp SOURCE easywapidlgnotif.cpp -SOURCE cellulardataconfirmation.cpp -SOURCE devicedialogobserver.cpp SOURCEPATH ../src SOURCE ConnectionInfo.cpp @@ -92,11 +90,15 @@ SYSTEMINCLUDE /epoc32/include/libc SYSTEMINCLUDE /epoc32/include/uikon +// Hb orbit headers +SYSTEMINCLUDE /epoc32/include/mw/hb/hbcore +SYSTEMINCLUDE /epoc32/include/mw/hb/hbwidgets + + LIBRARY euser.lib eikdlg.lib eiksrv.lib cone.lib eikcore.lib eikcoctl.lib LIBRARY bafl.lib avkon.lib AknSkins.lib Ecom.lib LIBRARY eiksrvui.lib LIBRARY commonengine.lib -LIBRARY AKNNOTIFY.LIB LIBRARY AknIcon.lib LIBRARY egul.lib LIBRARY centralrepository.lib @@ -114,7 +116,7 @@ #if defined(ARMCC) DEFFILE ../ConnectionUiUtilities/EABI/ConnUiUtilsNotif.DEF #elif defined( WINSCW ) - DEFFILE ../ConnectionUiUtilities/BWinsCw/ConnUiUtilsNotif.DEF +DEFFILE ../ConnectionUiUtilities/BWinsCw/ConnUiUtilsNotif.DEF #endif DEBUGLIBRARY flogger.lib diff -r 2709c04a4af5 -r 8b0c979bbe8c connectionutilities/ConnectionDialogs/group/ConnectionUiUtilities.mmp --- a/connectionutilities/ConnectionDialogs/group/ConnectionUiUtilities.mmp Fri Sep 03 09:38:26 2010 +0300 +++ b/connectionutilities/ConnectionDialogs/group/ConnectionUiUtilities.mmp Thu Sep 16 12:50:24 2010 +0300 @@ -45,6 +45,8 @@ SOURCE ActiveCChangeConnectionDlg.cpp SOURCE ActiveWrapper.cpp SOURCE connectionstatuspopup.cpp +SOURCE cellulardataconfirmation.cpp +SOURCE devicedialogobserver.cpp SOURCEPATH ../src SOURCE ConnectionInfo.cpp @@ -71,7 +73,6 @@ LIBRARY euser.lib cone.lib eikcore.lib eikcoctl.lib avkon.lib eikdlg.lib LIBRARY bafl.lib commonengine.lib commdb.lib AknSkins.lib FeatMgr.lib -LIBRARY AknNotify.lib LIBRARY Ecom.lib LIBRARY centralrepository.lib LIBRARY aknlayout.lib diff -r 2709c04a4af5 -r 8b0c979bbe8c connectionutilities/ConnectionDialogs/group/bld.inf --- a/connectionutilities/ConnectionDialogs/group/bld.inf Fri Sep 03 09:38:26 2010 +0300 +++ b/connectionutilities/ConnectionDialogs/group/bld.inf Thu Sep 16 12:50:24 2010 +0300 @@ -49,8 +49,6 @@ //gnumakefile DisconnectDlgIcons.MK //gnumakefile ConnUiUtilsIcons.MK -./connectiondialogswrapper.mmp - ./CConnDlgClient.mmp ./CConnDlgPlugin.mmp diff -r 2709c04a4af5 -r 8b0c979bbe8c connectionutilities/ConnectionDialogs/group/connectiondialogswrapper.mmp --- a/connectionutilities/ConnectionDialogs/group/connectiondialogswrapper.mmp Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* This is project specification file for the connectiondialogswrapper -* -* -*/ - - -#include - -TARGET connectiondialogswrapper.DLL -CAPABILITY CAP_ECOM_PLUGIN -TARGETTYPE PLUGIN - -UID 0x10009D8D 0x10207374 - -LANG SC - -SOURCEPATH ../ecomsrc -SOURCE connectiondialogswrapper.cpp - -// Component specific internal headers -USERINCLUDE ../inc - -// ADO specific internal headers -SYSTEMINCLUDE ../../../inc - -//Macro to /epoc32 headers -MW_LAYER_SYSTEMINCLUDE - -START RESOURCE ../data/10207374.rss -TARGET connectiondialogswrapper.rsc -END - - -LIBRARY ECOM.LIB -LIBRARY AKNNOTIFIERWRAPPER.LIB -LIBRARY EUSER.LIB - -DEBUGLIBRARY flogger.lib -DEBUGLIBRARY efsrv.lib -DEBUGLIBRARY cone.lib - - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c connectionutilities/ConnectionDialogs/inc/ConnectionInfoKey.h --- a/connectionutilities/ConnectionDialogs/inc/ConnectionInfoKey.h Fri Sep 03 09:38:26 2010 +0300 +++ b/connectionutilities/ConnectionDialogs/inc/ConnectionInfoKey.h Thu Sep 16 12:50:24 2010 +0300 @@ -51,13 +51,6 @@ virtual TInt Compare( TInt aLeft, TInt aRight ) const; /** - * At function - * @param nIndex Index of the element ot be returned - * @return TAny* The element at the given index - */ - virtual TAny* At( TInt anIndex ) const; - - /** * TConnectionInfoKey constructor * @return - */ diff -r 2709c04a4af5 -r 8b0c979bbe8c connectionutilities/ConnectionDialogs/rom/ConnectionDialogs.iby --- a/connectionutilities/ConnectionDialogs/rom/ConnectionDialogs.iby Fri Sep 03 09:38:26 2010 +0300 +++ b/connectionutilities/ConnectionDialogs/rom/ConnectionDialogs.iby Thu Sep 16 12:50:24 2010 +0300 @@ -18,8 +18,9 @@ #ifndef __CONNECTIONDIALOGS_IBY__ #define __CONNECTIONDIALOGS_IBY__ - -ECOM_PLUGIN(connectiondialogswrapper.DLL,10207374.rsc) +// Dialog wrapper is not used anymore as dialogs and +// avkon notifier API has been deprecated. +// ECOM_PLUGIN(connectiondialogswrapper.DLL,10207374.rsc) #endif diff -r 2709c04a4af5 -r 8b0c979bbe8c connectionutilities/ConnectionDialogs/src/ActiveIAPListing.cpp --- a/connectionutilities/ConnectionDialogs/src/ActiveIAPListing.cpp Fri Sep 03 09:38:26 2010 +0300 +++ b/connectionutilities/ConnectionDialogs/src/ActiveIAPListing.cpp Thu Sep 16 12:50:24 2010 +0300 @@ -551,9 +551,9 @@ CRepository* cr = CRepository::NewLC( KCRUidProfileEngine ); - TInt selectedProfile; + TInt selectedProfile( 0 ); - TRAP_IGNORE( cr->Get( KProEngActiveProfile, selectedProfile ) ); + (void) cr->Get( KProEngActiveProfile, selectedProfile ); // To get also VPN APs TUint bearerSet = iPrefs.iBearerSet | ECommDbBearerVirtual; diff -r 2709c04a4af5 -r 8b0c979bbe8c connectionutilities/ConnectionDialogs/src/ConnectionInfoKey.cpp --- a/connectionutilities/ConnectionDialogs/src/ConnectionInfoKey.cpp Fri Sep 03 09:38:26 2010 +0300 +++ b/connectionutilities/ConnectionDialogs/src/ConnectionInfoKey.cpp Thu Sep 16 12:50:24 2010 +0300 @@ -136,18 +136,4 @@ return retval; } - -// --------------------------------------------------------- -// CConnectionInfoKey::At( TInt anIndex ) const -// --------------------------------------------------------- -// -TAny* CConnectionInfoKey::At( TInt anIndex ) const - { - TDesC16 tem( iPtr->At( anIndex )->Name() ); - TAny* ptr = ( TAny* )&tem; - - return ptr; - } - - // End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c dbcreator/commsdatcreator/inc/cdcprocessorglobal.h --- a/dbcreator/commsdatcreator/inc/cdcprocessorglobal.h Fri Sep 03 09:38:26 2010 +0300 +++ b/dbcreator/commsdatcreator/inc/cdcprocessorglobal.h Thu Sep 16 12:50:24 2010 +0300 @@ -36,7 +36,6 @@ class RCmConnectionMethodExt; class RCmDestinationExt; class CReaderBase; -class CommsDat::CMDBSession; struct TCmGenConnSettings; class RCmManagerExt; diff -r 2709c04a4af5 -r 8b0c979bbe8c dbcreator/commsdatcreator/src/cdcprocessorglobal.cpp --- a/dbcreator/commsdatcreator/src/cdcprocessorglobal.cpp Fri Sep 03 09:38:26 2010 +0300 +++ b/dbcreator/commsdatcreator/src/cdcprocessorglobal.cpp Thu Sep 16 12:50:24 2010 +0300 @@ -227,12 +227,16 @@ CleanupStack::PushL( defaultGPRS ); defaultGPRS->iRecordName.SetL( KDefaultGPRSRecordName ); - - defaultGPRS->FindL( *db ); + + if ( !defaultGPRS->FindL( *db ) ) + { + CLOG_WRITE( "! Error : CProcessorGlobal::ProcessTagL: Default AP not found" ); + User::Leave( KErrNotFound ); + } defaultGPRS->iAPN.SetL( *ptrTag ); - defaultGPRS->ModifyL( *db ); + defaultGPRS->ModifyL( *db ); CleanupStack::PopAndDestroy( defaultGPRS ); @@ -320,7 +324,11 @@ bearerRecord->iRecordName.SetL( KModemBearerPacketData ); } - bearerRecord->FindL( *iSession ); // CHECK: Leaves if record not found + if( !bearerRecord->FindL( *iSession ) ) + { + CLOG_WRITE( "! Error : CProcessorGlobal::ProcessTagL: Modem bearer record not found" ); + User::Leave( KErrNotFound ); + } // Convert input parameter TLex lex( *ptrTag ); @@ -371,7 +379,11 @@ // Open the record "WlanBearer" bearerRecord->iRecordName.SetL( KLANBearerWlan ); - User::LeaveIfError( bearerRecord->FindL( *iSession ) ); + if( !bearerRecord->FindL( *iSession ) ) + { + CLOG_WRITE( "! Error : CProcessorGlobal::ProcessTagL: LAN bearer record not found" ); + User::Leave( KErrNotFound ); + } // Convert the input paramater to UINT TLex lex( *ptrTag ); @@ -496,19 +508,22 @@ globalSettings->iRecordName.SetL( KGlobalSettingsRecordName ); - if( globalSettings->FindL( *db ) ) + if( !globalSettings->FindL( *db ) ) { - //Gprs attach mode - if ( iAttachWhenNeeded ) - { - CLOG_WRITE( "GPRS attach mode : attach when needed\n" ) - globalSettings->iGPRSAttachMode = RPacketService::EAttachWhenNeeded; - } - else - { - CLOG_WRITE( "GPRS attach mode : attach when available\n" ) - globalSettings->iGPRSAttachMode = RPacketService::EAttachWhenPossible; - } + CLOG_WRITE( "! Error : CProcessorGlobal::ProcessAPL: Global settings not found" ); + User::Leave( KErrNotFound ); + } + + //Gprs attach mode + if ( iAttachWhenNeeded ) + { + CLOG_WRITE( "GPRS attach mode : attach when needed\n" ) + globalSettings->iGPRSAttachMode = RPacketService::EAttachWhenNeeded; + } + else + { + CLOG_WRITE( "GPRS attach mode : attach when available\n" ) + globalSettings->iGPRSAttachMode = RPacketService::EAttachWhenPossible; } globalSettings->ModifyL( *db ); @@ -677,7 +692,11 @@ settingsTypeField->SetL( aTableType ); - deviceSettingsTable->FindL( *iSession ); + if( !deviceSettingsTable->FindL( *iSession ) ) + { + CLOG_WRITE( "! Error : CProcessorGlobal::SaveGlobalWlanParameterL: Table not found" ); + User::Leave( KErrNotFound ); + } // Convert the input parameter to integer TLex lex( *aValue ); diff -r 2709c04a4af5 -r 8b0c979bbe8c dbcreator/commsdatcreator/src/cdcreaderxml.cpp --- a/dbcreator/commsdatcreator/src/cdcreaderxml.cpp Fri Sep 03 09:38:26 2010 +0300 +++ b/dbcreator/commsdatcreator/src/cdcreaderxml.cpp Thu Sep 16 12:50:24 2010 +0300 @@ -742,73 +742,70 @@ { TPtrC8 ptrBuf8; ptrBuf8.Set( buf ); - - if (result == KErrNone || result == KErrEof) - { - switch ( iCharSet ) - { - case ECharSetUnicode: - { - //simply copy to a Unicode descriptor - TPtrC16 ptrBuf16( ( TText16* )ptrBuf8.Ptr(), \ - ptrBuf8.Length() / KAsciiUnicodeRatio ); + + switch ( iCharSet ) + { + case ECharSetUnicode: + { + //simply copy to a Unicode descriptor + TPtrC16 ptrBuf16( ( TText16* )ptrBuf8.Ptr(), \ + ptrBuf8.Length() / KAsciiUnicodeRatio ); - TPtrC16 ptrLine; - result = ExtractLine(ptrBuf16, ptrLine); + TPtrC16 ptrLine; + result = ExtractLine(ptrBuf16, ptrLine); - if ( result == KErrNone ) - { - delete iLine; - iLine = NULL; - iLine = ptrLine.AllocL(); - - //Increment the file position - iFilePos += iLine->Length() * KAsciiUnicodeRatio; - } - - break; - } - case ECharSetAscii: - case ECharSetUtf8: - default: - { - //conversion to Unicode is needed - HBufC16* hBuf16 = HBufC16::NewLC( KMaxLineSize ); - TPtr16 ptrBuf16( hBuf16->Des() ); + if ( result == KErrNone ) + { + delete iLine; + iLine = NULL; + iLine = ptrLine.AllocL(); - if( iCharSet == ECharSetUtf8 ) - { - CnvUtfConverter::ConvertToUnicodeFromUtf8 - ( ptrBuf16, ptrBuf8 ); - } - else - { - ptrBuf16.Copy( ptrBuf8 ); - } - - TPtrC16 ptrLine; - result = ExtractLine(ptrBuf16, ptrLine); + //Increment the file position + iFilePos += iLine->Length() * KAsciiUnicodeRatio; + } + + break; + } + case ECharSetAscii: + case ECharSetUtf8: + default: + { + //conversion to Unicode is needed + HBufC16* hBuf16 = HBufC16::NewLC( KMaxLineSize ); + TPtr16 ptrBuf16( hBuf16->Des() ); + + if( iCharSet == ECharSetUtf8 ) + { + CnvUtfConverter::ConvertToUnicodeFromUtf8 + ( ptrBuf16, ptrBuf8 ); + } + else + { + ptrBuf16.Copy( ptrBuf8 ); + } - if ( result == KErrNone ) - { - delete iLine; - iLine = NULL; - iLine = ptrLine.AllocL(); + TPtrC16 ptrLine; + result = ExtractLine(ptrBuf16, ptrLine); + + if ( result == KErrNone ) + { + delete iLine; + iLine = NULL; + iLine = ptrLine.AllocL(); - // Increment the file position - // Line in unicode format converted back to UTF-8 - // for getting the right lenght and osition in file - CnvUtfConverter::ConvertFromUnicodeToUtf8( - buf, iLine->Des() ); - iFilePos += buf.Length(); - } + // Increment the file position + // Line in unicode format converted back to UTF-8 + // for getting the right lenght and osition in file + CnvUtfConverter::ConvertFromUnicodeToUtf8( + buf, iLine->Des() ); + iFilePos += buf.Length(); + } - CleanupStack::PopAndDestroy( hBuf16 ); + CleanupStack::PopAndDestroy( hBuf16 ); - break; - }//case - }//switch - }//if + break; + }//case + }//switch }//if return result; diff -r 2709c04a4af5 -r 8b0c979bbe8c group/bld.inf --- a/group/bld.inf Fri Sep 03 09:38:26 2010 +0300 +++ b/group/bld.inf Thu Sep 16 12:50:24 2010 +0300 @@ -27,7 +27,6 @@ PRJ_MMPFILES #include "../alwayson_net_plugin/group/bld.inf" -#include "../apengine/group/bld.inf" #include "../bearermanagement/group/bld.inf" #include "../cmmanager/group/bld.inf" #include "../connectionmonitoring/group/bld.inf" diff -r 2709c04a4af5 -r 8b0c979bbe8c ipcm_plat/access_point_engine_misc_api/access_point_engine_misc_api.metaxml --- a/ipcm_plat/access_point_engine_misc_api/access_point_engine_misc_api.metaxml Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ - - - Access Point Engine Misc API - Some complementary features can be used by this API, such as management of protected access points, VPN Access Points. - c++ - networkingutilities - - - - - - - - - yes - no - - diff -r 2709c04a4af5 -r 8b0c979bbe8c ipcm_plat/access_point_engine_misc_api/group/bld.inf --- a/ipcm_plat/access_point_engine_misc_api/group/bld.inf Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: File that exports the files belonging to -: Access Point Engine Misc API -* -*/ - - -#include - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -../inc/VpnAPEngine.h MW_LAYER_PLATFORM_EXPORT_PATH(VpnApEngine.h) -../inc/VpnAPItem.h MW_LAYER_PLATFORM_EXPORT_PATH(VpnApItem.h) -../inc/ApProtHandler.h MW_LAYER_PLATFORM_EXPORT_PATH(ApProtHandler.h) diff -r 2709c04a4af5 -r 8b0c979bbe8c ipcm_plat/access_point_engine_misc_api/inc/ApProtHandler.h --- a/ipcm_plat/access_point_engine_misc_api/inc/ApProtHandler.h Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,239 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of the CApProtHandler class. -* -*/ - - -#ifndef CAPPROTHANDLER_H -#define CAPPROTHANDLER_H - -// Deprecation warning -#warning This header file has been deprecated and will be fully removed between weeks 12 and 18 of 2010. See Polonium CR #153 for details. - - -// INCLUDES -#include -#include - - - - -// FORWARD DECLARATION -class CCommsDatabase; -class CCommsDbTableView; - -// CLASS DECLARATION -/** -* A collection of access point protection handling routines. -*/ -NONSHARABLE_CLASS( CApProtHandler ) - { - public: // New functions - - /** - * Returns whether the Access Point Table is protected or not. - * If the table is protected, new access points can not be added, - * existing ones can not be modified and can not be deleted. - * @param aDb The database object - * @return TBool indicating whether the table is protected or not. - * - * @deprecated - */ - IMPORT_C static TBool IsTableProtectedL( CCommsDatabase* aDb ); - - - /** - * Returns whether the given Access Point is protected or not. - * If the access point is protected, it can not be modified and - * can not be deleted. - * @param aDb The database object - * @param aUid The uid of the access point - * @return TBool indicating whether the access point is protected or not - * - * @deprecated - */ - IMPORT_C static TBool IsApProtectedL( CCommsDatabase* aDb, - TUint32 aUid ); - - - /** - * Sets a given Access Point to protected. - * If the access point is protected, it can not be modified and - * can not be deleted. - * @param aDb The database object - * @param aUid The uid of the access point - * - * @deprecated - */ - IMPORT_C static void ProtectItemL( CCommsDatabase* aDb, TUint32 aUid ); - - - /** - * Sets a given Access Point to not-protected. - * If the access point is not protected, it can be modified and - * can be deleted. - * @param aDb The database object - * @param aUid The uid of the access point - * - * @deprecated - */ - IMPORT_C static void UnprotectItemL( CCommsDatabase* aDb, - TUint32 aUid ); - - /** - * Sets the access point table to protected. - * If the table is protected, new access points can not be added, - * existing ones can not be modified and can not be deleted. - * @param aDb The database object - * - * @deprecated - */ - IMPORT_C static void ProtectTableL( CCommsDatabase* aDb ); - - - /** - * Sets the access point table to not-protected. - * If the table is not protected, new access points can be added, - * existing ones can be modified and can be deleted. - * @param aDb The database object - * - * @deprecated - */ - IMPORT_C static void UnprotectTableL( CCommsDatabase* aDb ); - - - /** - * Gets whether the preferences are protected or not - * @param aDb The database object - * @returns TBool indicating whether the preferences are protected - * or not - * - * @deprecated - */ - IMPORT_C static TBool IsPreferencesProtectedL( CCommsDatabase* aDb ); - - - /** - * Sets the preferences to protected. - * @param aDb The database object - * - * @deprecated - */ - IMPORT_C static void ProtectPreferencesL( CCommsDatabase* aDb ); - - - /** - * Sets the preferences to not-protected. - * @param aDb The database object - * - * @deprecated - */ - IMPORT_C static void UnprotectPreferencesL( CCommsDatabase* aDb ); - - - // The following are not exported, for internal use only! - /** - * Returns whether the given record in the given table - * is protected or not. - * If the record is protected, it can not be modified and - * can not be deleted. - * @param aDb The database object in use - * @param the table to use - * @param the uid of the record - * @return whether the given record in the given table - * is protected or not. - */ - static TBool IsRecordProtectedL( CCommsDatabase* aDb, - const TDesC& aTable, TUint32 aUid ); - - /** - * Protects a given record in a given table. - * @param aDb The database object in use - * @param the table to use - * @param the uid of the record - */ - static void ProtectRecordL( CCommsDatabase* aDb, - const TDesC& aTable, TUint32 aUid ); - - - /** - * Unprotects a given record in a given table. - * @param aDb The database object in use - * @param the table to use - * @param the uid of the record - */ - static void UnprotectRecordL( CCommsDatabase* aDb, - const TDesC& aTable, TUint32 aUid ); - - - /** - * Returns whether the given table in a given database is - * protected or not. - * @param aDb The database object in use - * @param the table we need the info on - * @returns TBool indicating whether the given table in a given - * database is protected or not. - */ - static TBool IsTableProtectedL( CCommsDatabase* aDb, - const TDesC& aTable ); - - - /** - * Protects a given table in a given database. - * @param aDb The database object in use - * @param aTable The table to protect - */ - static void ProtectTableL( CCommsDatabase* aDb, const TDesC& aTable ); - - /** - * Unprotects a given table in a given database. - * @param aDb The database object in use - * @param aTable The table to unprotect - */ - static void UnprotectTableL( CCommsDatabase* aDb, - const TDesC& aTable ); - - /** - * Gets the current records' protection state - * aTable MUST be open and record cursor set to desired record - * @param aTable The table containign the record whose protection - * sate we would like to get - * @return The records' protection state - */ - static TBool GetProtectionStateL( CCommsDbTableView& aTable ); - - - - /** - * Remove all protected AP-s and sets the table to be 'updatable'. - * @param aDb The database object in use - * - * @deprecated - */ - IMPORT_C static void RemoveProtectedAccessPointsL(CCommsDatabase* aDb); - - - /** - * Remove all protected AP-s and sets the table to be 'updatable'. - * @param aDb The database object in use - */ - static void DoRemoveProtectedAccessPointsL( CCommsDatabase& aDb ); - - - }; - -#endif - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c ipcm_plat/access_point_engine_misc_api/inc/VpnAPEngine.h --- a/ipcm_plat/access_point_engine_misc_api/inc/VpnAPEngine.h Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,360 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Declares the main handler, CVpnAPEngine and the public API for -* the Vpn Access Point Engine. -* -*/ - - -#ifndef VPN_AP_ENGINE_H -#define VPN_AP_ENGINE_H - -// Deprecation warning -#warning This header file has been deprecated and will be fully removed between weeks 12 and 18 of 2010. See Polonium CR #153 for details. - - -// INCLUDES -#include - -// CONSTANTS - - -// FORWARD DECLARATIONS -class CCommsDatabase; -class CVpnApItem; - -// CLASS DECLARATION -/** -* CVpnApEngine class: It is the main handler for the VPN Access Point Engine. -* It contains the only public API for other (sub)systems. -* -*/ -NONSHARABLE_CLASS( CVpnApEngine ) : public CBase - { - - public: // Constructors and destructor - - - /** - * Two-phased constructor. Leaves on failure. - * This function shall be used to create the VPN access point engine - * object. This object is a thin layer above the VpnApEngine which - * uses Access Point Engine (ApEngine) and it provides a - * simple interface to the VPN ApEngine enabling creation, deletion - * and editing of VPN access points. - * @param aDb a pointer to a CCommsDataBase object, might be NULL - * @return The constructed CVpnApEngine object. - * - * @deprecated - */ - IMPORT_C static CVpnApEngine* NewLC( CCommsDatabase* aDb = NULL ); - - - - /** - * Destructor. - * - * @deprecated - */ - IMPORT_C ~CVpnApEngine( ); - - - - protected: - /** - * Second-phase constructor. - * @param aDb The database - * - * @deprecated - */ - IMPORT_C void ConstructL( CCommsDatabase* aDb ); - - - private: - /** - * Constructor. - * - * @deprecated - */ - IMPORT_C CVpnApEngine( ); - - - public: // New functions - - /** - * Creates a new VPN from the passed CVpnApItem - * @param aVpnApItem a CVpnApItem holding the data - * @return The WAP ID of the succesfully created VPN AP. - * - * @deprecated - */ - IMPORT_C TUint32 CreateVpnApL( CVpnApItem& aVpnApItem ); - - - /** - * Creates a new VPN from the passed VPN data - * @param aName The name of the access point. - * @param aIapId A TUint32 holding the real internet access point ID - * @param aPolicy a TDesC& Holding the policy for the VPN - * @param aProxyServerAddress a TDesC* holding the proxy server address - * @param aProxyPort A TUint32 specifying the proxy's port number - * @return The created VPN access point's WAP ID - * - * @deprecated - */ - IMPORT_C TUint32 CreateVpnApL( TDesC& aName, - TUint32 aIapId, - TDesC& aPolicy, - TDesC* aProxyServerAddress = NULL, - TUint32 aProxyPort = 0 ); - - - /** - * Deletes the VPN access poitn indentified by it's WAP ID - * @param aVpnApId A TUint32 The WAP ID of the vpn access point to be - * deleted - * Might Leave on error. - * - * @deprecated - */ - IMPORT_C void DeleteVpnL( TUint32 aVpnApId ); - - - - /** - * Reads up one VPN access point's data from the database. - * Expects that CVpnApEngine has been created and the database had - * been opened. - * In case of error, function leaves with error code. - *
Error conditions: - * - Insufficient memory, - * - AP does not exists, - * - Server connection failure. - * - * @param aUid The WAP Uid of the VPN access point to be read - * @param aApItem A reference to a CApAccessPointItem to hold the data. - * @return no return value. - * - * @deprecated - */ - IMPORT_C void VpnDataL( TUint32 aUid, CVpnApItem& aVpnApItem ); - - - - // update - /** - * Updates data stored in an existing VPN access point. - * Expects that CVpnApEngine has been created and the database had - * been opened. - * In case of error, no data is stored. - *
Error conditions: - * - Insufficient memory - * - Server connection failure - * - Lock already present by other task - * - Uid does not exists. - * - Attempting to update read-only records will result - * in KErrAccessDenied - * - * @param aApItem A reference to a CApAccessPointItem holding the data - * @return No return value. - * - * @deprecated - */ - IMPORT_C void UpdateVpnDataL( CVpnApItem& aVpnApItem ); - - - /** - * Gives whether the access point identified by the passed WAP ID - * is a VPN access point or not. - * @param aUid The UID of the access point - * - * @deprecated - */ - IMPORT_C TBool IsVpnApL( const TUint32 aUid ); - - - /** - * Component Validation Test. - * @return KErrNone. - * - * @deprecated - */ - IMPORT_C static TInt Cvt(); - - - protected: // New functions - /** - * Creates a new VPN from the passed VPN item - * @param aIsNew Booleasn stating whether it is a new AP or not - * @param aVpnApItem A CVpnApItem holding the VPN access point data - * @return The created VPN access point's WAP ID - */ - TUint32 DoCreateVpnApL( TBool aIsNew, CVpnApItem& aVpnApItem ); - - - /** - * Writes the VPN data part from the passed VPN item - * @param aIsNew Booleasn stating whether it is a new AP or not - * @param aVpnApItem A CVpnApItem holding the VPN access point data - */ - void WriteVpnDataL( TBool aIsNew, CVpnApItem& aVpnApItem ); - - - /** - * Creates a virtual bearer record if needed - * @return The virtual bearer record ID - */ - TUint32 CreateVirtBearerIfNeededL(); - - - /** - * Writes the VPN-IAP data part from the passed VPN item - * @param aIsNew Booleasn stating whether it is a new AP or not - * @param aVpnApItem A CVpnApItem holding the VPN access point data - * @return The IAP ID for the VPN part - */ - TUint32 WriteVpnIapRecordL( TBool aIsNew, CVpnApItem& aVpnApItem ); - - - /** - * Gets the location record ID - * @return The ID of the location record - */ - TUint32 GetLocationIdL(); - - - /** - * Writes the VPN-WAP data part from the passed VPN item - * @param aIsNew Booleasn stating whether it is a new AP or not - * @param aVpnApItem A CVpnApItem holding the VPN access point data - */ - void WriteVpnWapApDataL( TBool aIsNew, CVpnApItem& aVpnApItem ); - - - /** - * Writes the VPN-WAP bearer data part from the passed VPN item - * @param aIsNew Booleasn stating whether it is a new AP or not - * @param aVpnApItem A CVpnApItem holding the VPN access point data - */ - void WriteVpnWapBearerDataL( TBool aIsNew, CVpnApItem& aVpnApItem ); - - - /** - * Reads up the VPN-WAP bearer data part into the passed VPN item - * @param aUid The WAP-bearer part's record ID - * @param aVpnApItem A CVpnApItem to hold the readed data - */ - void ReadVpnWapBearerDataL( TUint32 aUid, CVpnApItem& aVpnApItem ); - - - /** - * Reads up the VPN-WAP data part into the passed VPN item - * The WAP record ID should already been set by an earlier call to - * ReadVpnWapBearerDataL - * @param aVpnApItem A CVpnApItem to hold the readed data - */ - void ReadVpnWapApDataL( CVpnApItem& aVpnApItem ); - - - /** - * Reads up the VPN-IAP data part into the passed VPN item - * The IAP record ID should already been set by an earlier call to - * ReadVpnWapApDataL - * @param aVpnApItem A CVpnApItem to hold the readed data - */ - void ReadVpnIapRecordL( CVpnApItem& aVpnApItem ); - - - /** - * Reads up the VPN data part into the passed VPN item - * The VPN record ID should already been set by an earlier call to - * ReadVpnIapRecordL - * @param aVpnApItem A CVpnApItem to hold the readed data - */ - void ReadVpnDataL( CVpnApItem& aVpnApItem ); - - - /** - * Writes the proxy data of the passed VPN access point item - * @param aIsNew Boolean stating whether the access point is new - * @param aVpnApItem A CVpnApItem holding the current VPN data - */ - void WriteProxyDataL( TBool aIsNew, const CVpnApItem& aVpnApItem ); - - - /** - * Reads the proxy data into the passed VPN access point item - * @param aVpnApItem A CVpnApItem holding the current VPN data - */ - void ReadProxyDataL( CVpnApItem& aVpnApItem ); - - - /** - * Deletes the VPN proxy data - * @param aIspId The Isp record ID for which the proxy data should be - * deleted - */ - void RemoveVpnProxyDataL( TUint32 aIspId ); - - - /** - * Deletes the VPN data - * @param aUid The UID of the VPN access point to be deleted. - */ - void DoDeleteVpnL( TUint32 aUid ); - - - - /** - * Removes a record from a table - * @param aTable The table to remove from - * @param aUid The record ID to remove - */ - void RemoveRecordL( const TDesC& aTable, TUint32 aUid ); - - - /** - * Writes the network data of the passed VPN access point item - * @param aIsNew Boolean stating whether the access point is new - * @param aVpnApItem A CVpnApItem holding the current network data - */ - void WriteNetworkDataL( TBool aIsNew, CVpnApItem& aVpnApItem ); - - - /** - * Reads up the network data into the passed VPN access point item - * @param aVpnApItem A CVpnApItem holding the current VPN data - */ - void ReadNetworkDataL( CVpnApItem& aVpnApItem ); - - - /** - * Removes a network data - * @param aIspId The Network record ID which should be deleted - */ - void RemoveNetworkDataL( TUint32 aIspId ); - - - protected: // Functions from base classes - - - private: //data - TBool iOwnDb; - CCommsDatabase* iDb; - }; - -#endif - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c ipcm_plat/access_point_engine_misc_api/inc/VpnAPItem.h --- a/ipcm_plat/access_point_engine_misc_api/inc/VpnAPItem.h Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,352 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Declares the main handler, CVpnAPItem and the API for -* the Vpn Access Point Engine. -* -*/ - - -#ifndef VPN_AP_ITEM_H -#define VPN_AP_ITEM_H - -// Deprecation warning -#warning This header file has been deprecated and will be fully removed between weeks 12 and 18 of 2010. See Polonium CR #153 for details. - - -// INCLUDES -#include - -// CONSTANTS -enum TVpnApMember - { - // WAP Access Point Table - EApVpnWapAccessPointID, ///< The Uid of the VPN access point. - ///< READ ONLY, assigned by the database. - ///< TUint32 - EApVpnWapAccessPointName, ///< The name of the access point, TDesC16 - - EApVpnRealWapID, ///< WAP ID of the real IAP ap, TUint32 - EApVpnIapID, ///< IAP ID of the VPN IAP record, TUint32 - EApVpnRealIapID, ///< IAP ID of the real IAP record used - ///< to create connection, TUint32 - EApVpnRealIapName, ///< IAP name of the real IAP record used - ///< to create connection, Text - EApVpnPolicy, ///< The VPN policy to be used, TDesC16 - EApVpnPolicyId, ///< The VPN policy to be used, TDesC16 - EApVpnProxyServerAddress, ///< Proxy server address, long text - EApVpnProxyPortNumber, ///< Proxy port number, TUint32 - - EApVpnHomeNetworkID, ///< The ID of the home netwokr, TUint32 - EApVpnIapNetworkID, ///< The ID of the home netwokr, TUint32 - EApVpnIapNetworkName, ///< The name of the home netwokr, TDesC16 - }; - - - - - -// FORWARD DECLARATIONS -class CCommsDatabase; - -// CLASS DECLARATION -/** -* This class encapsulates VPN related data in addition to a 'normal' -* access point. It provides Get/Set methods for every member. -* Member set is not limited by the API. -* It is used to read-write VPN data to and form CommsDb. -* Main user is CVpnApEngine class but also UI might use this one. -*/ -NONSHARABLE_CLASS( CVpnApItem ) : public CBase - { // holds VPN specific data - - public: // Constructors and destructor - /** - * Two-phased constructor. Leaves on failure, places instance - * on cleanup stack. Instance is initialised to default values. - * @return The constructed CApAccessPointItem. - * - * @deprecated - */ - IMPORT_C static CVpnApItem* NewLC(); - - - /** - * Destructor. - * - * @deprecated - */ - IMPORT_C virtual ~CVpnApItem(); - - - protected: // Constructors - - /** - * Second-phase constructor. - * - * @deprecated - */ - IMPORT_C void ConstructL(); - - - private: // Data - /** - * C++ default constructor. - * - * @deprecated - */ - IMPORT_C CVpnApItem(); - - - - public: // other public, exported functions - /** - * Copies the data from another CVpnApItem. - * Substitute for the "assignment operator". It requires allocation - * thus can leave. - * Wap Access Point Uid is not copied. - * - * @deprecated - */ - IMPORT_C void CopyFromL( const CVpnApItem& aCopyFrom ); - - - /** - * Equality operator. Wap Access Point Uid is not counted. - * - * @deprecated - */ - IMPORT_C TBool operator==( const CVpnApItem& aitem ) const; - - - /** - * Inequality operator. Wap Access Point Uid is not counted. - * - * @deprecated - */ - IMPORT_C TBool operator!=( const CVpnApItem& aitem ) const; - - - - /** - * This function reads up a 16-bit text value from the specified column. - * @param aColumn Enum value indicating the column to read. - * @param aValue Reference to a 16-bit descriptor to hold the value - * @return no return value - * - * @deprecated - */ - IMPORT_C void ReadTextL( const TVpnApMember aColumn, TDes16& aValue ); - - - /** - * This function reads up a long text value from the specified column. - * The ownership is not passed to the caller. It means that the caller - * should not delete the received value. - * If the caller must take the ownership for any reason, must make a - * copy and use that and delete the copy when no longer needed. - * @param aColumn Enum value indicating the column to read. - * @return A const HBufC* to the value. - * - * @deprecated - */ - IMPORT_C const HBufC* ReadConstLongTextL( const TVpnApMember aColumn ); - - - /** - * This function reads up a TUint32 value from the specified column. - * If the specified column does not exist (that is, not part of the - * database structure), it will Panic in debug builds and it will - * return KErrInvalidColumn in release builds without Panicking. - * Panic is used in debug builds because it indicates a programming - * error. In release, it 'notifies' the caller about the error through - * the return value but enables system to continue operation. - * @param aColumn Enum value indicating the column to read. - * @param aValue A reference to a TUint32 to hold the value - * @return Error code. - * - * @deprecated - */ - IMPORT_C TInt ReadUint( const TVpnApMember aColumn, TUint32& aValue ); - - /** - * This function reads up a boolean value from the specified column. - * If the specified column does not exist (that is, not part of the - * database structure), it will Panic in debug builds and it will - * return KErrInvalidColumn in release builds without Panicking. - * Panic is used in debug builds because it indicates a programming - * error. In release, it 'notifies' the caller about the error through - * the return value but enables system to continue operation. - * @param aColumn Enum value indicating the column to read. - * @param aValue A reference to a boolean to hold the value - * @return Error code. - * - * @deprecated - */ - IMPORT_C TInt ReadBool( const TVpnApMember aColumn, TBool& aValue ); - - - - /** - * This function writes a 16-bit text value to the specified column. - * If the specified column does not exist (that is, not part of the - * database structure), it will Panic in debug builds and it will - * return KErrInvalidColumn in release builds without Panicking. - * Panic is used in debug builds because it indicates a programming - * error. In release, it 'notifies' the caller about the error through - * the return value but enables system to continue operation. - * This function can Leave if the copying of the text does not succeed. - * @param aColumn Enum value indicating the column to write. - * @param aValue Reference to a 16-bit text descriptor to the value - * @return Error code. - * - * @deprecated - */ - IMPORT_C TInt WriteTextL( const TVpnApMember aColumn, - const TDesC16& aValue ); - - - - /** - * This function writes a long text value to the specified column. - * If the specified column does not exist (that is, not part of the - * database structure), it will Panic in debug builds and it will - * return KErrInvalidColumn in release builds without Panicking. - * Panic is used in debug builds because it indicates a programming - * error. In release, it 'notifies' the caller about the error through - * the return value but enables system to continue operation. - * This function can Leave if the copying of the text does not succeed. - * @param aColumn Enum value indicating the column to write. - * @param aValue Reference to a 16-bit text descriptor to the value - * @return Error code. - * - * @deprecated - */ - IMPORT_C TInt WriteLongTextL( const TVpnApMember aColumn, - const TDesC& aValue ); - - - /** - * This function writes a TUint32 value to the specified column. - * If the specified column does not exist (that is, not part of the - * database structure), it will Panic in debug builds and it will - * return KErrInvalidColumn in release builds without Panicking. - * Panic is used in debug builds because it indicates a programming - * error. In release, it 'notifies' the caller about the error through - * the return value but enables system to continue operation. - * @param aColumn Enum value indicating the column to write. - * @param aValue A const reference to a TUint32 value - * @return Error code. - * - * @deprecated - */ - IMPORT_C TInt WriteUint( const TVpnApMember aColumn, - const TUint32& aValue ); - - /** - * This function writes a boolean value to the specified column. - * If the specified column does not exist (that is, not part of the - * database structure), it will Panic in debug builds and it will - * return KErrInvalidColumn in release builds without Panicking. - * Panic is used in debug builds because it indicates a programming - * error. In release, it 'notifies' the caller about the error through - * the return value but enables system to continue operation. - * @param aColumn Enum value indicating the column to write. - * @param aValue A const reference to a boolean value - * @return Error code. - * - * @deprecated - */ - IMPORT_C TInt WriteBool( const TVpnApMember aColumn, - const TBool& aValue ); - - - - // Query - // COMMON - /** - * This function returns the ID of the access point - * @return The ID of this access point - * - * @deprecated - */ - IMPORT_C TUint32 WapUid() const; - - - /** - * This function returns the name of the connection - * Ownership is not passed. - * @return The name of the connection - * - * @deprecated - */ - IMPORT_C const TDesC& Name() const; - -protected: - /** - * Reallocates a passed 16-bit descriptor. Passed descriptor is deleted, - * new one is AllocL-ed - * Passed descriptor MUST NOT BE on the CleanupStack - */ - void ReAllocL(HBufC*& aDes, const TDesC16& aValue); - - - /** - * Removes invalid chars from the passed text - * Invalid chars are: TAB - * @return a HBufC16 holding the new text - */ - HBufC* RemoveInvalidCharsLC( const TDesC16& aInText ); - - - /** - * Returns whether this VPN access point has proxy data or not. - * - */ - TBool HasProxy() const; - -private: // Data - - - HBufC* iName; - TUint32 iVpnTableId; - TUint32 iVpnIapId; - TUint32 iRealIapId; - - TUint32 iVpnRealWapId; - TUint32 iVpnWapId; - - TUint32 iVirtualBearerID; - - HBufC* iPolicyId; - - HBufC* iPolicy; - HBufC* iProxyServerAddress; - HBufC* iRealIapName; - TUint32 iProxyPort; - TUint32 iHomeNetwork; - TUint32 iVpnIapNetwork; - HBufC* iVpnIapNetworkName; - - - protected: // Friend classes - friend class CVpnApEngine; - - }; - - - -#endif - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c ipcm_plat/group/bld.inf --- a/ipcm_plat/group/bld.inf Fri Sep 03 09:38:26 2010 +0300 +++ b/ipcm_plat/group/bld.inf Thu Sep 16 12:50:24 2010 +0300 @@ -15,7 +15,6 @@ * */ -#include "../access_point_engine_misc_api/group/bld.inf" #include "../bearer_settings_plugin_api/group/bld.inf" #include "../commsdat_wlan_api/group/bld.inf" #include "../connection_monitor_extension_api/group/bld.inf" diff -r 2709c04a4af5 -r 8b0c979bbe8c ipcm_pub/access_point_engine_api/access_point_engine_api.metaxml --- a/ipcm_pub/access_point_engine_api/access_point_engine_api.metaxml Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ - - - Access Point Engine API - Provides applications the possibility to access the Access Point information stored in the communications database. - c++ - networkingutilities - - - - - - - - - yes - no - - diff -r 2709c04a4af5 -r 8b0c979bbe8c ipcm_pub/access_point_engine_api/group/bld.inf --- a/ipcm_pub/access_point_engine_api/group/bld.inf Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: File that exports the files belonging to -: Access Point Engine API -* -*/ - - -#include - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -../inc/APUtils.h MW_LAYER_PUBLIC_EXPORT_PATH(ApUtils.h) -../inc/APDataHandler.h MW_LAYER_PUBLIC_EXPORT_PATH(ApDataHandler.h) -../inc/ActiveApDb.h MW_LAYER_PUBLIC_EXPORT_PATH(ActiveApDb.h) -../inc/ApEngineConsts.h MW_LAYER_PUBLIC_EXPORT_PATH(ApEngineConsts.h) -../inc/ApEngineVer.h MW_LAYER_PUBLIC_EXPORT_PATH(ApEngineVer.h) -../inc/Aplistitemlist.h MW_LAYER_PUBLIC_EXPORT_PATH(ApListItemList.h) -../inc/ApNetworkItemlist.h MW_LAYER_PUBLIC_EXPORT_PATH(ApNetworkItemList.h) -../inc/ApListItem.h MW_LAYER_PUBLIC_EXPORT_PATH(ApListItem.h) -../inc/APSelect.h MW_LAYER_PUBLIC_EXPORT_PATH(ApSelect.h) -../inc/APNetworks.h MW_LAYER_PUBLIC_EXPORT_PATH(ApNetworks.h) -../inc/ApNetworkItem.h MW_LAYER_PUBLIC_EXPORT_PATH(ApNetworkItem.h) -../inc/APAccessPointItem.h MW_LAYER_PUBLIC_EXPORT_PATH(ApAccessPointItem.h) diff -r 2709c04a4af5 -r 8b0c979bbe8c ipcm_pub/access_point_engine_api/inc/APAccessPointItem.h --- a/ipcm_pub/access_point_engine_api/inc/APAccessPointItem.h Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1307 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of the class CApAccessPointItem -* -*/ - - -#ifndef ACCESSPOINTITEM_H -#define ACCESSPOINTITEM_H - -// Deprecation warning -#warning This header file has been deprecated and will be fully removed between weeks 12 and 18 of 2010. See Polonium CR #153 for details. - - -// INCLUDES -#include -#include -#include -#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS -#include -#endif -#include -#include - - -// DATA TYPES -/** -* This enum is used to identify the data when reading or writing -* CApAccessPointItem data. -*
Field types: -*
-* 8 - bit text: -*
ReadTextL( const TApMember aColumn, TDes8& aValue ) -*
WriteTextL( const TApMember aColumn, const TDesC8& aValue ) -*
EApIspIfCallbackInfo -*
EApIspInitString -*
-*
-* 16-bit text: -*
ReadTextL( const TApMember aColumn, TDes16& aValue ) -*
WriteTextL( const TApMember aColumn, const TDesC16& aValue ) -*
EApWapAccessPointName -*
EApWapCurrentBearer -*
EApWapGatewayAddress -*
EApWapServiceCentreAddress -*
EApIapName -*
EApIapServiceType -*
EApIspName -*
EApIspDescription -*
EApIspDefaultTelNumber -*
EApIspLoginName -*
EApIspLoginPass -*
EApIspIfName -*
EApGprsIfName -*
EApIspIfParams -*
EApGprsIfParams -*
EApIspIfNetworks -*
EApGprsIfNetworks -*
EApIspIfAuthName -*
EApGprsIfAuthName -*
EApIspIfAuthPass -*
EApGprsIfAuthPassword -*
EApIspIPAddr -*
EApGprsIpAddr -*
EApIspIPNetMask -*
EApGprsIpNetMask -*
EApIspIPGateway -*
EApGprsIpGateway -*
EApIspIPNameServer1 -*
EApGprsIPNameServer1 -*
EApIspIPNameServer2 -*
EApGprsIPNameServer2 -*
EApGprsPdpAddress -*
EApProxyProtocolName -*
EApNetworkName -*
EApProxyLoginName -*
EApProxyLoginPass -*
EApIP6NameServer1 -*
EApIP6NameServer2 -*
EApLanBearerName -*
-*
Long text, 16 bit: -*
const HBufC* ReadConstLongTextL( const TApMember aColumn ) -*
WriteLongTextL( const TApMember aColumn, const TDesC& aValue ) -*
EApWapStartPage -*
EApIspLoginScript -*
EApGprsAccessPointName -*
EApProxyServerAddress -*
EApProxyExceptions -*
-*
Uint: -*
ReadUint( const TApMember aColumn, TUint32& aValue ) -*
WriteUint( const TApMember aColumn, const TUint32& aValue ) -*
EApWapAccessPointID - -// DEPRECATED -*
EApWapIsp - -// DEPRECATED -*
EApWapChargecard - -*
EApWapIap - -// DEPRECATED -*
EApWapIspType - -*
EApIapServiceId -*
EApIapChargecard -*
EApIspIspType -*
EApIspAuthRetries -*
EApGprsIfAuthRetries -*
EApIspIfCallbackType -*
EApIspCallBackTimeOut -*
EApIspBearerName -*
EApIspBearerSpeed -*
EApIspBearerCE -*
EApIspBearerType -*
EApIspBearerCallTypeIsdn -*
EApIspChannelCoding -*
EApIspAIUR -*
EApIspRequestedTimeSlots -*
EApIspMaximumTimeSlots -*
EApGprsPdpType -*
EApGprsReqPrecedence -*
EApGprsReqDelay -*
EApGprsReqReliability -*
EApGprsReqPeakThroughput -*
EApGprsReqMeanPeakThroughput -*
EApGprsMinPrecedence -*
EApGprsMinDelay -*
EApGprsMinReliability -*
EApGprsMinPeakThroughput -*
EApGprsMinMeanThroughput -*
EApWapWspOption -*
EApIspBearerCallTypeIsdn -*
EApProxyPortNumber -*
EApNetworkID -*
EApWapProxyPort -*
EApIapBearerService -*
EApIapBearerID -*
-*
Bool: -*
ReadBool( const TApMember aColumn, TBool& aValue ) -*
WriteBool( const TApMember aColumn, const TBool& aValue ) -*
EApWapSecurity -*
EApIspDialResolution -*
EApIspUseLoginScript -*
EApIspPromptForLogin -*
EApIspDisplayPCT -*
EApIspIfPromptForAuth -*
EApGprsIfPromptForAuth -*
EApIspIfCallbackEnabled -*
EApIspIPAddrFromServer -*
EApGprsIpAddrFromServer -*
EApIspIPDnsAddrFromServer -*
EApGprsIpDnsAddrFromServer -*
EApIspEnableIpHeaderComp -*
EApGprsHeaderCompression -*
EApIspEnableLCPExtensions -*
EApGprsEnableLCPExtensions -*
EApIspDisablePlainTextAuth -*
EApGprsDisablePlainTextAuth -*
EApIspEnableSWCompression -*
EApGprsDataCompression -*
EApGprsUseAnonymAccess -*
EApIsReadOnly -*
EApProxyUseProxy -*
EApHasProxySettings -*
EApIP6DNSAddrFromServer -*/ -enum TApMember - { - // WAP Access Point Table - EApWapAccessPointID, ///< The Uid of the access point. - ///< READ ONLY, assigned by the database. - EApWapAccessPointName, ///< The name of the access point - EApWapCurrentBearer, ///< Indicates the name of the table from - ///< which to read the bearer information - EApWapStartPage, ///< WAP start page URL, LONG TEXT! - - // WAP Common (present in both tables) - EApWapGatewayAddress, ///< WAP gateway address (IP address) - EApWapWspOption, ///< Enum value indicating whether - ///< connection-oriented or connectionless - ///< API should be used. - ///< Type is TCommsDbWapWspOption. - EApWapSecurity, ///< Attepmt secure WTLS connection to - ///< the gateway - - // WAP IP Bearer Table -//* DEPRECATED - EApWapIsp, ///< Identifier of the ISP to use if this - ///< is an ISP type database -//* DEPRECATED - EApWapChargecard, ///< Identifier for the chargecard to use - ///< if this is an ISP type database - EApWapIap, ///< Identifier of a record in the IAP - ///< table to be used if this is an IAP - ///< type database -//* DEPRECATED - EApWapIspType, ///< Enum value indicating whether IAP/ISP - ///< is a dial in or a dial out - - // WAP SMS Bearer Table - // EApSmsWapGatewayAddress is mapped to EApWapGatewayAddress, - // different enum needed only for being able to - // distinguish when editing... - - // IAP Table - EApIapName, ///< The name of this IAP - EApIapServiceType, ///< Name of service table in this IAP - EApIapServiceId, ///< Identifier of service in this IAP - EApIapChargecard, ///< Identifier of the chargecard in - ///< this IAP - - // ISP table - EApIspName, ///< The name of this ISP - EApIspDescription, ///< Application's description of this ISP - EApIspIspType, ///< Enum value indicating ISP type, e.g. - ///< Internet ISP, WAP Isp.TCommsDbIspType. - EApIspDefaultTelNumber, ///< Default phone number - EApIspDialResolution, ///< Perform dialing resolution for default - ///< phone number? - EApIspUseLoginScript, ///< Use login script? - EApIspLoginScript, ///< Login script (used only if Use Login - ///< Script is true), LONG TEXT. - EApIspPromptForLogin, ///< Prompt user for username and password? - EApIspLoginName, ///< Login name - EApIspLoginPass, ///< Login password - EApIspDisplayPCT, ///< Display PCT (without scanning script - ///< for READ command) UNUSED, always FALSE - EApIspIfName, ///< Interface name - EApIspIfParams, ///< Interface parameter string - EApIspIfNetworks, ///< Comma separated list of network - ///< protocols - EApIspIfPromptForAuth, ///< Prompt user for authentication - ///< username and password? - EApIspIfAuthName, ///< Authentication username used by PPP - EApIspIfAuthPass, ///< Authentication password used by PPP - EApIspAuthRetries, ///< Number of times to retry - ///< authentication if it fails - EApIspIfCallbackEnabled, ///< Is callback enabled? - EApIspIfCallbackType, ///< Enum value indicating the type of - ///< callback (if enabled). - ///< enum TCallbackAction. - EApIspIfCallbackInfo, ///< Info for callback request (if enabled) - ///< 8-bit text field. - EApIspCallBackTimeOut, ///< Time to wait for callback in - ///< microseconds (if enabled) - EApIspIPAddrFromServer, ///< Get IP address from server? - EApIspIPAddr, ///< IP address of interface - EApIspIPNetMask, ///< IP net mask of interface - EApIspIPGateway, ///< IP address of gateway - EApIspIPDnsAddrFromServer, ///< Get DNS address from server? - EApIspIPNameServer1, ///< IP address of primary name server - EApIspIPNameServer2, ///< IP address of secondary name server - EApIspEnableIpHeaderComp, ///< Enable IP header compression? - EApIspEnableLCPExtensions, ///< Enable LCP extensions? - EApIspDisablePlainTextAuth, ///< Disable plain text authentication? - EApIspEnableSWCompression, ///< Enable software compression? - EApIspBearerName, ///< Enum value specifying the name of the - ///< bearer, e.g. Asunchronous Modem, - ///< RBasicGsmCall::TBearerName - EApIspBearerSpeed, ///< Enum value specifying the bearer speed - ///< TApCallSpeed. - EApIspBearerCallTypeIsdn, ///< call type is ISDN or Analogue... - EApIspBearerCE, ///< Enum value specifying the bearer CE, - ///< RBasicGsmCall::TBearerCE - EApIspInitString, ///< Modem initialization string to be used - ///< when this ISP is in use.This string - ///< will be copied into the - ///< MODEM_ISP_INIT_STRING field by - ///< NetDial. 8-bit text field. - EApIspBearerType, ///< Enum value indicating connection type - ///< (CSD or HSCSD), TCommsDbBearerType - EApIspChannelCoding, ///< Enum value specifying HSCSD channel - ///< coding - EApIspAIUR, ///< Enum value specifying AIUR for HSCSD - EApIspRequestedTimeSlots, ///< Requested number of time slots for - ///< HSCSD - EApIspMaximumTimeSlots, ///< Maximum number of time slots for HSCSD - ///< which could be requested during this - ///< connection - - EApGprsAccessPointName, ///< Access Point Name, LONG TEXT! - EApGprsPdpType, ///< PDP type - EApGprsPdpAddress, ///< PDP address - EApGprsReqPrecedence, ///< Requested quality of service - ///< precedence class - EApGprsReqDelay, ///< Requested quality of service - ///< delay class - EApGprsReqReliability, ///< Requested quality of service - ///< reliability class - EApGprsReqPeakThroughput, ///< Requested quality of service - ///< peak throughput class - EApGprsReqMeanPeakThroughput, ///< Requested quality of service - ///< mean throughput class - EApGprsMinPrecedence, ///< Minimum quality of service - ///< precedence class - EApGprsMinDelay, ///< Minimum quality of service - ///< delay class - EApGprsMinReliability, ///< Minimum quality of service - ///< reliability class - EApGprsMinPeakThroughput, ///< Minimum quality of service - ///< peak throughput class - EApGprsMinMeanThroughput, ///< Minimum quality of service - ///< mean throughput class - EApGprsUseAnonymAccess, ///< Use anonymous access on? - - // followings are mapped to ISP... fields - EApGprsDataCompression, ///< Data compression on? - EApGprsHeaderCompression, ///< IP header compression on? - EApGprsIfName, ///< Interface name - EApGprsIfParams, ///< Interface parameter string - EApGprsIfNetworks, ///< Comma separated list of network - ///< protocols - EApGprsIfPromptForAuth, ///< Prompt user for authentication - ///< username and password? - EApGprsIfAuthName, ///< Authentication username used by PPP - EApGprsIfAuthPassword, ///< Authentication password used by PPP - EApGprsIfAuthRetries, ///< Number of times to retry - ///< authentication if it fails - EApGprsIpNetMask, ///< IP net mask of interface - EApGprsIpGateway, ///< IP address of gateway - EApGprsIpAddrFromServer, ///< Get IP adresses (for Symbian OS) - ///< from server? - EApGprsIpAddr, ///< IP address of Symbian OS - EApGprsIpDnsAddrFromServer, ///< Get DNS addresses from server? - EApGprsIPNameServer1, ///< IP address of primary name server - EApGprsIPNameServer2, ///< IP address of secondary name server - EApGprsEnableLCPExtensions, ///< Enable LCP extension? - EApGprsDisablePlainTextAuth, ///< Disable plain text authentication? - EApIsReadOnly ///< Is the current record read only? - - -// expanding this enum is safe and will not cause any trouble as all public -// part of this module uses it as a const parameter and NEVER as -// a return value, therefore non-aware clients will NEVER meet with the new -// ones, thus it can not cause any problems that they do not expect them... - , - EApProxyServerAddress, ///< Proxy server address, long text - EApProxyProtocolName, ///< Proxy protocol name, Text - EApProxyPortNumber, ///< Proxy port number, TUint32 - EApProxyUseProxy, ///< Use proxy server?, TBool - EApProxyExceptions, ///< ';' separated list of addr. for wich - ///< the server should not be used. - ///< Long text - EApHasProxySettings, ///< Has proxy settings? READ ONLY. - EApNetworkID, ///< The network ID - EApNetworkName, ///< The network name - - EApWapProxyPort, ///< The wap proxy port number - EApProxyLoginName, ///< The proxy login name - EApProxyLoginPass, ///< The proxy login password - EApIapBearerService, ///< Bearer service - - EApIP6DNSAddrFromServer, ///< Get IPv6 DNS addresses from server? - EApIP6NameServer1, ///< IP address of primary name server - EApIP6NameServer2, ///< IP address of secondary name server - - // CDMA2000 - EApCdmaIwfName, ///< IWF name, Text - EApCdmaServiceOption, ///< Service Option, TUint32 - EApCdmaPdpType, ///< PDP type, TUin32 - EApCdmaPdpAddress, ///< PDP address, Text - EApCdmaReqFwdPriority, ///< Requested forward priority, TUint32 - EApCdmaReqRevPriority, ///< Requested reverse priority, TUint32 - EApCdmaReqFwdBitrate, ///< Requested forward bitrate, TUint32 - EApCdmaReqRevBitrate, ///< Requested reverse bitrate, TUint32 - EApCdmaReqFwdLoss, ///< Req. forward frame loss rate, TUint32 - EApCdmaReqRevLoss, ///< Req. reverse frame loss rate, TUint32 - EApCdmaReqFwdMaxDelay, ///< Requested forward delay, TUint32 - EApCdmaReqRevMaxDelay, ///< Requested reverse delay, TUint32 - EApCdmaMinFwdBitrate, ///< Min. acceptable fwd bitrate, TUint32 - EApCdmaMinRevBitrate, ///< Min. acceptable rev bitrate, TUint32 - EApCdmaAccptFwdLoss, ///< Max. acc. fwd frame loss rate, TUint32 - EApCdmaAccptRevLoss, ///< Max. acc. rev frame loss rate, TUint32 - EApCdmaAccptFwdMaxDelay, ///< Max. acceptable forward delay, TUint32 - EApCdmaAccptRevMaxDelay, ///< Max. acceptable reverse delay, TUint32 - - // CDMA2000, mapped to ISP... fields - EApCdmaDataCompression, ///< Data compression on? TBool - EApCdmaHeaderCompression, ///< IP header compression on? TBool - EApCdmaAnonymousAccess, ///< Use anonymous access on? TBool - EApCdmaIfName, ///< Interface name - EApCdmaIfParams, ///< Interface parameter string - EApCdmaIfNetworks, ///< Comma separated list of network - ///< protocols - EApCdmaIfPromptForAuth, ///< Prompt user for authentication - ///< username and password? - EApCdmaIfAuthName, ///< Authentication username used by PPP - EApCdmaIfAuthPassword, ///< Authentication password used by PPP - EApCdmaIfAuthRetries, ///< Number of times to retry - ///< authentication if it fails - EApCdmaIpNetMask, ///< IP net mask of interface - EApCdmaIpGateway, ///< IP address of gateway - EApCdmaIpAddrFromServer, ///< Get IP adresses (for Symbian OS) - ///< from server? - EApCdmaIpAddr, ///< IP address of Symbian OS - EApCdmaIpDnsAddrFromServer, ///< Get DNS addresses from server? - EApCdmaIPNameServer1, ///< IP address of primary name server - EApCdmaIPNameServer2, ///< IP address of secondary name server - EApCdmaEnableLCPExtensions, ///< Enable LCP extension? - EApCdmaDisablePlainTextAuth, ///< Disable plain text authentication? - - // CDMA2000 - EApCdmaApType, ///< Internet / WAP or both? TUint32 - EApCdmaQosWarningTimeout, ///< Notify user if the requested QOS - ///< cannot be satisfied for this time in - ///< microseconds, TUint32 - EApCdmaRlpMode, ///< Transparent or non-transparent - ///< radio link protocol, TUint32 - // CDMA2000 deprecated Mobile IP fields - EApCdmaMip, ///< Attempt to use mobile IP, TBool - EApCdmaHomeAgentAddress, ///< Home Agent address, Text - EApCdmaMipTimeout, ///< A normal reconnect (informing the - ///< user) takes place if both the PPP link - ///< drops and a change in SID or NID is - ///< received within this time in - ///< milliseconds, TUint32 - // CDMA2000 specific CDMA parameters provisioned through OTA and defined - // in TIA-683B section 3.5.8 - // These fields replace the old Mobile IP fields (above). - EApCdmaNaiType, ///< Type of NAI, TUint32 - EApCdmaSimpleIpAuthAlgorithm, ///< SimpleIP auth.algorithm, TUint32 - EApCdmaSimpleIpPapSsHandle, ///< SimpleIP PAP shared secret handle, - ///< TUint32 - EApCdmaSimpleIpChapSsHandle, ///< SimpleIP CHAP shared secret handle, - ///< TUint32 - EApCdmaMipTBit, ///< Reverse-tunneling reqd flag, TUint32 - EApCdmaMipHomeAddress, ///< Home address, Text - EApCdmaMipPrimaryHomeAgent, ///< IP address of mobile node's - ///< primary home agent, Text - EApCdmaMipSecondaryHomeAgent, ///< IP address of mobile node's - ///< secondary home agent, Text - EApCdmaMipMnAaaAuthAlgorithm, ///< MN-AAA auth algorithm, TUint32 - EApCdmaMipMnAaaSpi, ///< MN-AAA security param index, TUint32 - EApCdmaMipMnAaaSsHandle, ///< MN-AAA shared secret handle, TUint32 - EApCdmaMipMnHaAuthAlgorithm, ///< MN-HA auth algorithm, TUint32 - EApCdmaMipMnHaSpi, ///< MN-HA security param index, TUint32 - EApCdmaMipMnHaSsHandle, ///< MN-HA shared secret handle, TUint32 - - - // WLAN specific fields - EApWlanNetworkName, ///< The network name, Text - EApWlanNetworkMode, ///< Gives network mode, TUint32 - EApWlanSecurityMode, ///< The security mode, TUint32 - - // WLAN, mapped to ISP... fields - EApWlanIfNetworks, ///< Comma separated list of network - ///< protocols - EApWlanIfPromptForAuth, ///< Prompt user for authentication - ///< username and password? - EApWlanIfAuthName, ///< Authentication username used by PPP - EApWlanIfAuthPassword, ///< Authentication password used by PPP - EApWlanIfAuthRetries, ///< Number of times to retry - ///< authentication if it fails - EApWlanIpNetMask, ///< IP net mask of interface - EApWlanIpGateway, ///< IP address of gateway - EApWlanIpAddrFromServer, ///< Get IP adresses (for Symbian OS) - ///< from server? - EApWlanIpAddr, ///< IP address of Symbian OS - EApWlanIpDnsAddrFromServer, ///< Get DNS addresses from server? - EApWlanIPNameServer1, ///< IP address of primary name server - EApWlanIPNameServer2, ///< IP address of secondary name server - EApWlanSettingsId, ///< COMMDB_ID of the WLAN settings, - ///< TUint32 - EApWlanScanSSID, ///< TBool, whether need to scan the SSID - EApWlanChannelId, ///< In ad-hoc network mode, the channel - ///< ID, TUint32 - EApLanBearerName, ///< The name of the LAN bearer - EApIapBearerID, ///< UID of the bearer record (LAN/Modem) - EApIapBearerType, ///< The name of the iap bearer - ///< table (LAN/Modem) - // some defines for UI ONLY, NOT TO BE USED BY ANYONE ELSE!!! - EApIpv4Settings = 0x00010000, - EApIpv6Settings, - EApWlanSecuritySettings ///< The security settings launcher - }; - - - -// CONSTANTS -// D E P R E C A T E D, please do not use it!!!!!!!!!! -// can not remove as it was part of the public API... -const TInt KApMemberNum = EApGprsDisablePlainTextAuth+1; - -// FORWARD -class CApItemExtra; - -// CLASS DECLARATION - - -/** -* CApAccessPointItem is used to exchange data between engine and client. -* It holds the information for an access point including WAP, IAP, ISP -* (if present & applies). -* This class uses the same approach as CommDB to read and write data: it -* has functions for each data type implemented. To read or write the data, -* we have to know the data type and the enum name of the 'column'. -* The column values has the names of the database columns with the 'EAp' -* prefix. The reason for this (not using the database column descriptors) -* is performance. It is much faster to compare enum values than literals. -*/ -class CApAccessPointItem :public CBase - { - - public: // Constructors and destructor - /** - * Two-phased constructor. Leaves on failure, places instance - * on cleanup stack. Instance is initialised to default values. - * The created instance is suitable for passing to CApDataHandler's - * functions, contains all necessary information. - * @return The constructed CApAccessPointItem. - * - * @deprecated - */ - IMPORT_C static CApAccessPointItem* NewLC(); - - - /** - * Destructor. - * - * @deprecated - */ - IMPORT_C virtual ~CApAccessPointItem(); - - - /** - * Copies the data from another CApAccessPointItem. - * Substitute for the "assignment operator". It requires allocation - * thus can leave. - * Wap Access Point Uid is not copied. - * - * @deprecated - */ - IMPORT_C void CopyFromL( const CApAccessPointItem& aCopyFrom ); - - - /** - * Equality operator. Wap Access Point Uid is not counted. - * - * @deprecated - */ - IMPORT_C TBool operator==( const CApAccessPointItem& aitem ) const; - - - /** - * Inequality operator. Wap Access Point Uid is not counted. - * - * @deprecated - */ - IMPORT_C TBool operator!=( const CApAccessPointItem& aitem ) const; - - - protected: // Constructors - - /** - * C++ default constructor. - * - * @deprecated - */ - IMPORT_C CApAccessPointItem(); - - /** - * Second-phase constructor. - * - * @deprecated - */ - IMPORT_C void ConstructL(); - - - - - public: // New functions - - - /** - * This function reads up an 8-bit text value from the specified column. - * @param aColumn Enum value indicating the column to read. - * @param aValue Reference to an 8-bit descriptor to hold the value - * @return no return value - * - * @deprecated - */ - IMPORT_C void ReadTextL( const TApMember aColumn, TDes8& aValue ); - - /** - * This function reads up a 16-bit text value from the specified column. - * @param aColumn Enum value indicating the column to read. - * @param aValue Reference to a 16-bit descriptor to hold the value - * @return no return value - * - * @deprecated - */ - IMPORT_C void ReadTextL( const TApMember aColumn, TDes16& aValue ); - - /** - * NOTE: This function is deprecated. Use ReadConstLongTextL! - * This function reads up a long text value from the specified column. - * The ownership is not passed to the caller. It means that the caller - * should not delete the received value. - * If the caller must take the ownership for any reason, must make a - * copy and use that and delete the copy when no longer needed. - * @param aColumn Enum value indicating the column to read. - * @return A HBufC* to the value. - * - * @deprecated - */ - IMPORT_C HBufC* ReadLongTextL( const TApMember aColumn ); - - - /** - * This function reads up a long text value from the specified column. - * The ownership is not passed to the caller. It means that the caller - * should not delete the received value. - * If the caller must take the ownership for any reason, must make a - * copy and use that and delete the copy when no longer needed. - * @param aColumn Enum value indicating the column to read. - * @return A const HBufC* to the value. - * - * @deprecated - */ - IMPORT_C const HBufC* ReadConstLongTextL( const TApMember aColumn ); - - - - /** - * This function reads the length of the text in the specified column. - * @param aColumn Enum value indicating the column to read. - * @return The length of the text in that column. - * - * @deprecated - */ - IMPORT_C TUint32 ReadTextLengthL( const TApMember aColumn ); - - - /** - * This function reads up a TUint32 value from the specified column. - * In case the given value was not written to the database, - * it will return KErrValueUnspecified. - * If the specified column does not exist (that is, not part of the - * database structure), it will Panic in debug builds and it will - * return KErrInvalidColumn in release builds without Panicking. - * Panic is used in debug builds because it indicates a programming - * error. In release, it 'notifies' the caller about the error through - * the return value but enables system to continue operation. - * @param aColumn Enum value indicating the column to read. - * @param aValue A reference to a TUint32 to hold the value - * @return Error code. - * - * @deprecated - */ - IMPORT_C TInt ReadUint( const TApMember aColumn, TUint32& aValue ); - - /** - * This function reads up a boolean value from the specified column. - * If the specified column does not exist (that is, not part of the - * database structure), it will Panic in debug builds and it will - * return KErrInvalidColumn in release builds without Panicking. - * Panic is used in debug builds because it indicates a programming - * error. In release, it 'notifies' the caller about the error through - * the return value but enables system to continue operation. - * @param aColumn Enum value indicating the column to read. - * @param aValue A reference to a boolean to hold the value - * @return Error code. - * - * @deprecated - */ - IMPORT_C TInt ReadBool( const TApMember aColumn, TBool& aValue ); - - - // Update - /** - * This function writes an 8-bit text value to the specified column. - * If the specified column does not exist (that is, not part of the - * database structure), it will Panic in debug builds and it will - * return KErrInvalidColumn in release builds without Panicking. - * Panic is used in debug builds because it indicates a programming - * error. In release, it 'notifies' the caller about the error through - * the return value but enables system to continue operation. - * This function can Leave if the copying of the text does not succeed. - * Possible leave codes are the system leave codes. - * @param aColumn Enum value indicating the column to write. - * @param aValue Reference to an 8-bit text descriptor to the value - * @return Error code. - * - * @deprecated - */ - IMPORT_C TInt WriteTextL( const TApMember aColumn, - const TDesC8& aValue ); - - /** - * This function writes a 16-bit text value to the specified column. - * If the specified column does not exist (that is, not part of the - * database structure), it will Panic in debug builds and it will - * return KErrInvalidColumn in release builds without Panicking. - * Panic is used in debug builds because it indicates a programming - * error. In release, it 'notifies' the caller about the error through - * the return value but enables system to continue operation. - * This function can Leave if the copying of the text does not succeed. - * @param aColumn Enum value indicating the column to write. - * @param aValue Reference to a 16-bit text descriptor to the value - * @return Error code. - * - * @deprecated - */ - IMPORT_C TInt WriteTextL( const TApMember aColumn, - const TDesC16& aValue ); - - /** - * This function writes a long text value to the specified column. - * If the specified column does not exist (that is, not part of the - * database structure), it will Panic in debug builds and it will - * return KErrInvalidColumn in release builds without Panicking. - * Panic is used in debug builds because it indicates a programming - * error. In release, it 'notifies' the caller about the error through - * the return value but enables system to continue operation. - * This function can Leave if the copying of the text does not succeed. - * @param aColumn Enum value indicating the column to write. - * @param aValue Reference to a 16-bit text descriptor to the value - * @return Error code. - * - * @deprecated - */ - IMPORT_C TInt WriteLongTextL( const TApMember aColumn, - const TDesC& aValue ); - - /** - * This function writes a TUint32 value to the specified column. - * If the specified column does not exist (that is, not part of the - * database structure), it will Panic in debug builds and it will - * return KErrInvalidColumn in release builds without Panicking. - * Panic is used in debug builds because it indicates a programming - * error. In release, it 'notifies' the caller about the error through - * the return value but enables system to continue operation. - * @param aColumn Enum value indicating the column to write. - * @param aValue A const reference to a TUint32 value - * @return Error code. - * - * @deprecated - */ - IMPORT_C TInt WriteUint( const TApMember aColumn, - const TUint32& aValue ); - - /** - * This function writes a boolean value to the specified column. - * If the specified column does not exist (that is, not part of the - * database structure), it will Panic in debug builds and it will - * return KErrInvalidColumn in release builds without Panicking. - * Panic is used in debug builds because it indicates a programming - * error. In release, it 'notifies' the caller about the error through - * the return value but enables system to continue operation. - * @param aColumn Enum value indicating the column to write. - * @param aValue A const reference to a boolean value - * @return Error code. - * - * @deprecated - */ - IMPORT_C TInt WriteBool( const TApMember aColumn, - const TBool& aValue ); - - - // Query - // COMMON - /** - * This function returns the ID of the access point - * @return The ID of this access point - * - * @deprecated - */ - IMPORT_C TUint32 WapUid() const; - - - /** - * This function returns the name of the connection - * Ownership is not passed. - * @return The name of the connection - * - * @deprecated - */ - IMPORT_C const TDesC& ConnectionName() const; - - - // WAP-spec. - /** - * This function returns the current WAP bearer for the access point - * Ownership is not passed. - * @return The current WAP bearer for the access point - * - * @deprecated - */ - IMPORT_C const TDesC& WapBearer() const; - - - /** - * This function returns the bearer type for the current access point - * @return The current bearer type for the access point - * - * @deprecated - */ - IMPORT_C TApBearerType BearerTypeL(); - - - /** - * This function sets the bearer type for the current access point - * @param aBearer TApBearerType enum indicating the desired bearer type. - * @return No return value. - * - * @deprecated - */ - IMPORT_C void SetBearerTypeL( TApBearerType aBearer ); - - - /** - * This function writes a 16-bit text value to the 'name' fields - * of the access point. - * This includes: WAP_ACCESS_POINT, IAP, Dial/in/out/Gprs In/Out - * table's COMM_DB_NAME fields. - * These fields are (by TApMember): EApWapAccessPointName, EApIapName, - * EApIspName. - * It is useful if we need to use same names. - * @param aValue A const reference to a 16-bit text descriptor to - * the value. - * @return No return value. - * - * @deprecated - */ - IMPORT_C void SetNamesL( const TDesC16& aValue ); - - - /** - * This function checks the integrity of the CApAccessPointItem. - * Currently checks: - * IF WAP_IP_BEARER, WAP_ISP_TYPE conforms to IAP_SERVICE_TYPE - * @return Boolean indicating whether the sanity check has - * passed(ETrue) or not(EFalse) - * - * @deprecated - */ - IMPORT_C TBool SanityCheckOk(); - - - /** - * This function compares this and the passed CApAccessPointItem - * whether they have the same ISP and bearer - * Returns true if the APs have the same phone number - * @param aItem a CApAccessPointItem to compare with - * @return whether the APs have the same isp and bearer - * - * @deprecated - */ - IMPORT_C TBool HasSameIspAndBearerL( CApAccessPointItem& aItem ); - - /** - * This function returns whether the access point is read-only or not. - * @return Whether the current access point is read-only or not. - * - * @deprecated - */ - IMPORT_C TBool IsReadOnly() const; - - public: // public, not exported, available only inside the ApEngine dll - /** - * Returnes whether the given access point is a VPN ap or not. - */ - TBool IsVpnAp() const; - - /** - * Sets the current access point as VPN or as normal AP. - * Internal use only! - * @param aIsVpn a TBool specifiyng that the current AP is VPN or not. - */ - void SetVpnAp( TBool aIsVpn ); - - private: - /** - * Returns whether a given member is specified (after reading it from - * the DB) or not. - * @param aMember The member we would like to knopw if it is specified - * or not. - * @return whether a given member is specified (after reading it from - * the DB) or not. - */ - TBool Specified( TApMember aMember ); - - /** - * Sets a given member as specified or not - * @param aMember The member to set - * @param aOn The value to set - */ - void Specify( TApMember aMember, TBool aOn ); - - /** - * Sets all WAP member as specified or not - * @param aOn The value to set - */ - void SpecifyWap( TBool aOn ); - - /** - * Sets all IP bearer member as specified or not - * @param aOn The value to set - */ - void SpecifyIpBearer( TBool aOn ); - - /** - * Sets all IAP member as specified or not - * @param aOn The value to set - */ - void SpecifyIAP( TBool aOn ); - - /** - * Sets all ISP member as specified or not - * @param aOn The value to set - */ - void SpecifyISP( TBool aOn ); - - /** - * Sets all GPRS member as specified or not - * @param aOn The value to set - */ - void SpecifyGPRS( TBool aOn ); - - /** - * Sets all CDMA member as specified or not - * @param aOn The value to set - */ - void SpecifyCDMA( TBool aOn ); - - /** - * Sets all WLAN member as specified or not - * @param aOn The value to set - */ - void SpecifyWLAN( TBool aOn ); - - /** - * Sets all member as specified or not - * @param aOn The value to set - */ - void SpecifyAll( TBool aOn ); - - /** - * Sets iGetDNSIPFromServer according the currently valid iPrimaryDNS - * & iSecondaryDNS values. Called internally, after every setting of - * the above two values - */ - void SetDnsIpFromServer(); - - /** - * Sets iIspIPAddrFromServer according the currently valid iIspIPAddr - * value. Called internally, after every setting of iIspIPAddr values - */ - void SetIpFromServer(); - - - /** - * Sets iExt->iIpv6GetDNSIPFromServer according the currently valid - * iExt->iIpv6PrimaryDNS & iExt->iIpv6SecondaryDNS values. - * Called internally, after every setting of the above two values - */ - void SetDns6IpFromServer(); - - - /** - * Reallocates a passed 16-bit descriptor. Passed descriptor is deleted, - * new one is AllocL-ed - * Passed descriptor MUST NOT BE on the CleanupStack - * @param aDes The descriptor to hold the value - * @param aValue The value to pass to the aDes descriptor. - */ - void ReAllocL(HBufC*& aDes, const TDesC16& aValue); - - /** - * Reallocates a passed 8-bit descriptor. Passed descriptor is deleted, - * new one is AllocL-ed - * Passed descriptor MUST NOT BE on the CleanupStack - * @param aDes The descriptor to hold the value - * @param aValue The value to pass to the aDes descriptor. - */ - void ReAllocL(HBufC8*& aDes, const TDesC8& aValue); - - - /** - * Compares THIS and the passed aItem. - * @param aItem The item to compare this to - * @return Whether the item is equal with this or not - */ - TBool DoCompareApL( const CApAccessPointItem& aItem ) const; - - - /** - * Compares the WAP part of THIS and the passed aItem. - * Does not compares IAP ID - * @param aItem The item to compare this to - * @return Whether the WAP part is equal with this or not - */ - TBool CompareWap( const CApAccessPointItem& aItem ) const; - - - /** - * Compares the IAP part of THIS and the passed aItem. - * @param aItem The item to compare this to - * @return Whether the IAP part is equal with this or not - */ - TBool CompareIap( const CApAccessPointItem& aItem ) const; - - - /** - * Compares the IsP part of THIS and the passed aItem. - * @param aItem The item to compare this to - * @return Whether the ISP part is equal with this or not - */ - TBool CompareIsp( const CApAccessPointItem& aItem ) const; - - - /** - * Compares the Gprs part of THIS and the passed aItem. - * @param aItem The item to compare this to - * @return Whether the GPRS part is equal with this or not - */ - TBool CompareGprs( const CApAccessPointItem& aItem ) const; - - - /** - * Compares the Cdma part of THIS and the passed aItem. - * @param aItem The item to compare this to - * @return Whether the CDMA part is equal with this or not - */ - TBool CompareCdma( const CApAccessPointItem& aItem ) const; - - - /** - * Compares the Wlan part of THIS and the passed aItem. - * @param aItem The item to compare this to - * @return Whether the WLAN part is equal with this or not - */ - TBool CompareWlan( const CApAccessPointItem& aItem ) const; - - - /** - * Removes leading 0s from the passed IP address. - * @param aValue A descriptor holding the IP address to remove - * leading 0s from - * @return A newly allocated HBufC holding the resulting string. - */ - HBufC* GetCleanIpAddressLC( const TDesC& aValue ); - - - - /** - * Removes invalid chars e.g. space, () from the passed phone number. - * (valid are 0,1,2,..9,p,w,+,*,#) - * Strips pre- and postfixes, prefix separator is#, - * postfix separators are p, w or + - * @param aValue A descriptor holding the phone number - * @return A newly allocated HBufC holding the resulting string. - */ - HBufC* GetPlainPhoneNumberLC( const TDesC& aNumber ); - - - /** - * Compares the 'default phone number' (ISP dial-in number) of this - * and the passed CApAccessPointItem - * @param aItem The item to compare this to - * @return a TBool indicating whether the phone numbers are - * the same or not. - */ - TBool IsSamePhoneNumberL( CApAccessPointItem& aItem ); - - - /** - * Removes invalid chars from the passed phone number - * @param aIntext Text to remove invalid characters from phone number - * @return a HBufC holding the new text - */ - HBufC* RemoveInvalidPhoneCharsLC( const TDesC16& aInText ); - - - /** - * Removes invalid chars from the passed text - * Invalid chars are: TAB - * @param aIntext Text to remove invalid characters from - * @return a HBufC16 holding the new text - */ - HBufC* RemoveInvalidCharsLC( const TDesC16& aInText ); - - - /** - * Removes invalid chars from the passed text - * Invalid chars are: TAB - * @param aIntext Text to remove invalid characters from - * @return a HBufC8 holding the new text - */ - HBufC8* RemoveInvalidCharsLC( const TDesC8& aInText ); - - - /** - * Compares the proxy data of this and the passed CApAccessPointItem. - * @param aItem The item to compare this to - * @return Whether the Proxy part is equal with this or not - */ - TBool CompareProxy( const CApAccessPointItem& aItem ) const; - - - /** - * Returns whether the Ap has proxy data or not. - * @return Whether the Ap has proxy data or not. - */ - TBool HasProxy() const; - - - /** - * Sets the proxy flag. - */ - void SetProxyFlag(); - - - /** - * Limits the speed after changing e.g. bearer type - */ - void LimitSpeedL(); - - - /** - * Sets the IfNetworks value according to the bearer type and - * the IPv6 support availability. The required values are: - * IPv4: - * GPRS/CDMA, pdptype ipv4 "ip", - * CSD "ip" - * HSCSD "ip" - * IPv6: - * GPRS/CDMA, pdptype ipv4 "ip", - * GPRS/CDMA, pdptype ipv6 "ip6", - * CSD "ip,ip6" - * HSCSD "ip,ip6" - * - */ - void SetIfNetworksL(); - - - /** - * Check if aColumn is supported. - * @param aColumn Enum value indicating the column to check. - * @return Whether the given member is supported or not - */ - TBool IsSupported( TApMember aColumn ); - - - /** - * Leave with KErrNotSupported if aColumn is not supported. - * @param aColumn Enum value indicating the column to check. - */ - void LeaveIfUnsupportedL( TApMember aColumn ); - - - /** - * Returns whether this item has WLAN or not - * @return Whether this item has WLAN or not - */ - TBool IsWlan(); - - - /** - * Limit the Ip6 DNS address - * In case of CSD, HSCSD, only Well-known and User defined is supported, - * so if the bearer is changed from something else to these bearer - * types, the possible 'Dynamic' should be replaced with Well-known - */ - void LimitIp6DNSL(); - -private: // Data - - // member data - // COMMON - TUint32 iWapUid; ///< The unique identifier of the AP record. - HBufC* iWapAccessPointName; - - - // WAP-spec. - HBufC* iWapBearer; - HBufC* iStartingPage; - - // common for bearers - HBufC* iWapGatewayAddress; ///< The WAP gateway address - TBool iIsWTLSSecurityOn; - TUint32 iIsConnectionTypeContinuous; - - CApItemExtra* iExt; - TUint32 iChargeCard; - TUint32 iWapIap; - TUint32 iWapIspType; // deprecated, not used but kept - // to keep member positions - - - // IAP-part - HBufC* iIapName; - - TUint32 iIapServiceId; - HBufC* iIapServiceType; - - TUint32 iIapChargeCardId; - - // ISP-part - HBufC* iIspName; - HBufC* iIspDescription; - TCommsDbIspType iIspType; - HBufC* iIspDefaultTelNumber; - TBool iIspDialResolution; - TBool iUseLoginScript; - HBufC* iLoginScript; - TBool iPromptPassword; - HBufC* iUserName; - HBufC* iPassword; - TBool iDisplayTerminalWindow; - HBufC* iIspIfName; - HBufC* iIspIfParams; - HBufC* iIspIfNetworks; - TBool iIspIfPromptForAuth; - HBufC* iIspIfAuthName; - HBufC* iIspIfAuthPass; - TUint32 iIspIfAuthRetries; - TBool iUseCallBack; - TCallbackAction iCallBackTypeIsServerNum; - HBufC8* iIspIfCallbackInfo; - TUint32 iIspCallbackTimeOut; - TBool iIspIPAddrFromServer; - HBufC* iIspIPAddr; - HBufC* iIspIPNetMask; - HBufC* iIspGateway; - TBool iGetDNSIPFromServer; - HBufC* iPrimaryDNS; - HBufC* iSecondaryDNS; - TBool iEnablePPPCompression; - TBool iIspEnableLCPExtensions; - TBool iIsPasswordAuthenticationSecure; - TBool iIspEnableSwCompression; - /***************************************************** - * Series 60 Customer / ETel - * Series 60 ETel API - *****************************************************/ - TInt iIspBearerName; // RMobileCall::TMobileCallDataServiceCaps - TApCallSpeed iMaxConnSpeed; - TApCallType iBearerCallTypeIsdn; //RMobileCall::TMobileCallDataProtocol - TInt iIspBearerCE; // RMobileCall::TMobileCallDataQoS - HBufC8* iIspInitString; - TUint32 iIspBearerType; - TUint32 iIspChannelCoding; - TUint32 iIspAIUR; - TUint32 iIspRequestedTimeSlots; - TUint32 iIspMaximumTimeSlots; - - // GPRS part - HBufC* iGprsAccessPointName; - TUint32 iGprsPdpType; - HBufC* iGprsPdpAddress; - TUint32 iGprsReqPrecedence; - TUint32 iGprsReqDelay; - TUint32 iGprsReqReliability; - TUint32 iGprsReqPeakThroughput; - TUint32 iGprsReqMeanPeakThroughput; - TUint32 iGprsMinPrecedence; - - TUint32 iGprsMinDelay; - TUint32 iGprsMinReliability; - TUint32 iGprsMinPeakThroughput; - TUint32 iGprsMinMeanThroughput; - TBool iGprsUseAnonymAccess; - - CArrayFixFlat *iSpecified; - TBool iIsReadOnly; - - HBufC* iApProxyProtocolName; - HBufC* iApProxyServerAddress; - TUint32 iApProxyPortNumber; - TBool iApProxyUseProxy; - HBufC* iApProxyExceptions; - TBool iApHasProxySettings; - - TUint32 iNetworkId; - TUint32 iWapProxyPort; - HBufC* iNetworkName; - HBufC* iWapProxyLoginName; - HBufC* iWapProxyLoginPass; - TUint32 iApIapBearerService; // RMobileCall::TMobileCallDataServiceCaps - - - - protected: // Friend classes - friend class CApDataHandler; - - - }; - -#endif // ACCESSPOINTITEM_H - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c ipcm_pub/access_point_engine_api/inc/APDataHandler.h --- a/ipcm_pub/access_point_engine_api/inc/APDataHandler.h Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1131 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of class CApDataHandler -* -*/ - - -#ifndef APDATAHANDLER_H -#define APDATAHANDLER_H - -// Deprecation warning -#warning This header file has been deprecated and will be fully removed between weeks 12 and 18 of 2010. See Polonium CR #153 for details. - - -// INCLUDES -#include -#include -#include -#include - - -// FORWARD DECLARATIONS -class CApAccessPointItem; -class CApNetworkItem; - -// extra data holder. -typedef struct - { - TInt iIsIpv6Supported; // Is Ipv6 Supported? - TBool iIsFeatureManagerInitialised;// Is FeatureManager Initialised? - - /** - * Indicates if HSCSD Access point is supported or not. - */ - TBool iIsAppHscsdSupport; - - TInt iVariant; /// Local variant value - - - }THandlerExtra; - -// CLASS DECLARATION - -/** -* Representation of the access point handler. -* Encapsulates a session with the CommsDB -* Provides a way to access the database and manipulate its data. -*/ -class CApDataHandler :public CBase - { - public: // Constructors and destructor - - /** - * Two-phased constructor. Leaves on failure, places instance - * on cleanup stack. - * @param aDb a reference to a CCommsDataBase object. - * @return The constructed CApDataHandler. - * - * @deprecated - */ - IMPORT_C static CApDataHandler* NewLC( CCommsDatabase& aDb ); - - - /** - * Destructor. - * - * @deprecated - */ - IMPORT_C virtual ~CApDataHandler(); - - -protected: // Constructors - - /** - * C++ default constructor. - * - * @deprecated - */ - IMPORT_C CApDataHandler(); - - /** - * Second-phase constructor. - * - * @deprecated - */ - IMPORT_C void ConstructL( CCommsDatabase& aDb ); - - - private: - - - public: // New functions - // query - /** - * Reads up one access point's data from the database. - * Expects that CApDataHandler has been created and the database had - * been opened. - * In case of error, function leaves with error code. - *
Error conditions: - * - Insufficient memory, - * - AP does not exists, - * - Server connection failure. - * - * @param aUid The Uid of the access point to be read - * @param aApItem A reference to a CApAccessPointItem to hold the data. - * @return no return value. - * - * @deprecated - */ - IMPORT_C void AccessPointDataL( TUint32 aUid, - CApAccessPointItem& aApItem ); - - - // update - /** - * Updates data stored in an existing access point. - * Expects that CApDataHandler has been created and the database had - * been opened. - * In case of error, no data is stored. - *
Error conditions: - * - Insufficient memory - * - Server connection failure - * - Lock already present by other task - * - Uid does not exists. - * - Attempting to update read-only records will result - * in KErrAccessDenied - * - * @param aApItem A reference to a CApAccessPointItem holding the data - * @param aNameChanged a reference to a TBool that will indicate - * whether the name has changed or not. - * @return No return value. - * - * @deprecated - */ - IMPORT_C void UpdateAccessPointDataL( CApAccessPointItem& aApItem, - TBool& aNameChanged ); - - - // Creating new AP - /** - * Creates a copy of a previously existing access point. - * Expects that CApDataHandler has been created and the database had - * been opened. - * In case of error, no access point will be created. - *
Error conditions: - * - Insufficient memory - * - Server connection failure. - * - Lock already present by other task. - * - Access point does not exist. - * - Attempting to create new in protected tables will results - * in KErrAccessDenied - * - * @param aBaseId The UID of the existing access point to copy from. - * @return The Uid of the newly constructed and saved access point. - * - * @deprecated - */ - IMPORT_C TUint32 CreateCopyFromL( TUint32 aBaseId ); - - - /** - * Create a new access point from supplied data - * Expects that CApDataHandler has been created and the database had - * been opened. - * The name of the AP will be corrected to be unique if necessary and - * returned in the passed aApItem. - * In case of error, no access point will be created and the passed - * one will remain intact. - *
Error conditions: - * - Insufficient memory - * - Server connection failure. - * - Lock already present by other task. - * - Attempting to create new in protected tables will result - * in KErrAccessDenied - * - * @param aApItem Reference to a CApAccessPointItem holding the data - * @return The UID of the newly created and saved access point. - * - * @deprecated - */ - IMPORT_C TUint32 CreateFromDataL( CApAccessPointItem& aApItem ); - - - // Remove - /** - * Removes the given access point from the database. - * Expects that CApDataHandler has been created and the database had - * been opened. - * In case of error, access point will not be removed. - *
Error conditions: - * - Insufficient memory, - * - Server connection failure. - * - Lock already present by other task. - * - Access point does not exist. - * - Attempting to remove read-only records will result - * in KErrAccessDenied - * - * @param aUid The UID of the access point to remove. - * @return no return value. - * - * @deprecated - */ - IMPORT_C void RemoveAPL( TUint32 aUid ); - - - // Getting default access point - /** - * Reads the UID of the default access point. - * Expects that CApDataHandler has been created and the database had - * been opened. - * In case of error, leaves with CommsDb or system error codes. - *
Error conditions: - * - Insufficient memory; - * - Server connection failure; - * - Lock already present; - * - Access point does not exists. - * - * @param aIsWAP A boolean indicating whether to read the default - * WAP or the default IAP/ISP (dep. on the database type) access point. - * @return The UID of the default access point. - * - * @deprecated - */ - IMPORT_C TUint32 DefaultL( TBool aIsWap ) const; - - - // Setting as default - /** - * Sets the default access point. - * Expects that CApDataHandler has been created and the database had - * been opened. - * In case of error, leaves with CommsDb or system error codes. - *
Error conditions: - * - Insufficient memory; - * - Server connection failure; - * - Lock already present; - * - Access point does not exists. - * - Given Access Point is not of the desired type. - * - * @param aUid The UID of the access point to be set as default. - * @param aIntendedType The default type ( IAP, WAP, Both). - * - * @deprecated - */ - IMPORT_C void SetAsDefaultL(TUint32 aUid, - TCommsDbIspType aIntendedType ); - - - - // Setting preferences - /** - * Sets the access point preference. Can be used only if the - * database type is IAP. - * Expects that CApDataHandler has been created and the database had - * been opened. - * In case of error, leaves with CommsDb or system error codes. - *
Error conditions: - * - Insufficient memory; - * - Server connection failure; - * - Lock already present; - * Can also leave with KErrAlreadyExists (if aOverWrite is EFalse ). - * @param aRank The ranking of the connection preference. - * @param aDircetion Specifies the direction of this connection - * preference - * @param aBearers The bearer set being valid for this connection - * preference - * @param aPrompt Enum value indicating whether or not the user - * should be prompted or warned on connection - * @param aIAP The identifier of the preferred IAP for this connection. - * @param aOverwrite Boolean value indicating that if a same record - * present, overwrite it or not. - * - * @deprecated - */ - IMPORT_C void SetPreferredIfDbIapTypeL - ( - TUint32 aRank, - TCommDbConnectionDirection aDirection, - TUint32 aBearers, - TCommDbDialogPref aPrompt, - TUint32 aIAP, - TBool aOverwrite - ); - - /** - * Sets the access point preference. Can be used only if the - * database type is ISP. - * Expects that CApDataHandler has been created and the database had - * been opened. - * In case of error, leaves with CommsDb or system error codes. - *
Error conditions: - * - Insufficient memory; - * - Server connection failure; - * - Lock already present; - * Can also leave with KErrAlreadyExists (if aOverWrite is EFalse ). - * @param aRank The ranking of the connection preference. - * @param aDircetion Specifies the direction of this connection - * preference - * @param aBearers The bearer set beeing valid for this connection - * preference - * @param aPrompt Enum value indicating whether or not the user - * should be prompted or warned on connection - * @param aISP The identifier of the preferred ISP for this connection. - * @param aChargeCard Identifier of the preferred chargecard for - * this connection. - * @param aServiceType The type of the service. - * @param aOverwrite Boolean value indicating that if a same record is - * present, overwrite it or not. - * - * @deprecated - */ - IMPORT_C void SetPreferredIfDbIspTypeL - ( - TUint32 aRank, - TCommDbConnectionDirection aDirection, - TUint32 aBearers, - TCommDbDialogPref aPrompt, - TUint32 aISP, - TUint32 aChargeCard, - const TDesC& aServiceType, - TBool aOverwrite - ); - - - - /** - * Gets the access point preference. Can be used only if the - * database type is IAP. - * Expects that CApDataHandler has been created and the database had - * been opened. - * In case of error, leaves with CommsDb or system error codes. - *
Error conditions: - * - Insufficient memory; - * - Server connection failure; - * - Lock already present; - * @param aRank The ranking of the desired connection preference. - * @param aDircetion Specifies the direction of the desired connection - * preference - * @param aBearers The bearer set beeing valid for this connection - * preference - * @param aPrompt Enum value indicating whether or not the user - * should be prompted or warned on connection - * @param aIAP The identifier of the preferred IAP for this - * connection preference. - * - * @deprecated - */ - IMPORT_C void GetPreferredIfDbIapTypeL - ( - TUint32 aRank, - TCommDbConnectionDirection aDirection, - TUint32& aBearers, - TUint32& aPrompt, - TUint32& aIAP - ); - - /** - * Gets the access point preference. Can be used only if the - * database type is ISP. - * Expects that CApDataHandler has been created and the database had - * been opened. - * In case of error, leaves with CommsDb or system error codes. - *
Error conditions: - * - Insufficient memory; - * - Server connection failure; - * - Lock already present; - * @param aRank The ranking of the desired connection preference. - * @param aDircetion Specifies the direction of the desired connection - * preference - * @param aBearers The bearer set beeing valid for this connection - * preference - * @param aPrompt Enum value indicating whether or not the user - * should be prompted or warned on connection - * @param aISP The identifier of the preferred ISP for this - * connection preference. - * @param aChargeCard Identifier of the preferred chargecard for - * this connection preference. - * @return The type of the service. - * - * @deprecated - */ - IMPORT_C const TDesC& GetPreferredIfDbIspTypeL - ( - TUint32 aRank, - TCommDbConnectionDirection aDirection, - TUint32& aBearers, - TUint32& aPrompt, - TUint32& aISP, - TUint32& aChargeCard - ); - - - // Getting default access point - /** - * Reads the UID of the default access point. - * Expects that CApDataHandler has been created and the database had - * been opened. - * In case of error, leaves with CommsDb or system error codes. - *
Error conditions: - * - Insufficient memory; - * - Server connection failure; - * - Lock already present; - * - Access point does not exists. - * - * @param aIsWAP A boolean indicating whether to read the default - * WAP or the default IAP/ISP (dep. on the database type) access point. - * @param aReadOnly A TBool passed by reference to hold whether the - * the default access point record is read-only or not. - * @return The UID of the default access point. - * - * @deprecated - */ - IMPORT_C TUint32 DefaultL( TBool aIsWap, TBool& aReadOnly )const; - - - - - // Remove - /** - * Removes the given network group from the database. - * Expects that CApDataHandler has been created and the database had - * been opened. - * In case of error, network group will not be removed. - *
Error conditions: - * - Insufficient memory, - * - Server connection failure. - * - Lock already present by other task. - * - network group does not exist. - * - Attempting to remove read-only records will result - * in KErrAccessDenied - * - * @param aUid The UID of the network group to remove. - * @return no return value. - * - * @deprecated - */ - IMPORT_C void RemoveNetworkL( TUint32 aUid ); - - - /** - * Creates a network group from the data. - * Expects that CApDataHandler has been created and the database had - * been opened. - * In case of error, network group will not be created. - *
Error conditions: - * - Insufficient memory, - * - Server connection failure. - * - Lock already present by other task. - * - network group does not exist. - * - Attempting to remove read-only records will result - * in KErrAccessDenied - * - * @param aNetwork The network item to create/write into db. - * @return no return value. - * - * @deprecated - */ - IMPORT_C void CreateNetworkL( CApNetworkItem& aNetwork ); - - - /** - * Reads up a network part of the access point - * Network is identified by the iNetworkId of the passed access point - * - * @deprecated - */ - IMPORT_C void ReadNetworkPartL( CApAccessPointItem& aItem ); - - - - /** - * Reads up a network - * Network is identified by passed uid - * - * @deprecated - */ - IMPORT_C void ReadNetworkL( TUint32 aUid, CApNetworkItem& aNetwork ); - - - protected: // New functions - /** - * Reads the WAP part of the data from the database. - * In case of error, leaves with CommDb error codes. - * @param aWapId The UID of the Access Point to read the data from. - * @param aApItem A reference to a CApAccessPointItem to hold the data - * @return No return value. - */ - void ReadWapDataL( TUint32 aWapId, CApAccessPointItem& aApItem ); - - - /** - * Reads the IAP part of the data from the database. - * In case of error, leaves with CommDb error codes. - * @param aIapId The UID of the record in the IAP table to read - * the data. - * @param aApItem A reference to a CApAccessPointItem to hold the data - * @return No return value. - */ - void ReadIapDataL( TUint32 aIapId, CApAccessPointItem& aApItem ); - - - /** - * Reads the ISP part of the data from the database. - * In case of error, leaves with CommDb error codes. - * @param aIspId The UID of the record in the ISP table to - * read the data. - * @param aApItem A reference to a CApAccessPointItem to hold the data - * @return No return value. - */ - void ReadIspDataL( TUint32 aIspId, CApAccessPointItem& aApItem ); - - - /** - * Reads the GPRS data from the database. - * In case of error, leaves with CommDb error codes. - * @param aIspId The UID of the record in the GPRS table to - * read the data from. - * @param aApItem A reference to a CApAccessPointItem to hold the data - * @return No return value. - */ - void ReadGprsDataL( TUint32 aIspId, CApAccessPointItem& aApItem ); - - - /** - * Reads the LAN data from the database. - * In case of error, leaves with CommDb error codes. - * @param aIspId The UID of the record in the LAN table to - * read the data from. - * @param aApItem A reference to a CApAccessPointItem to hold the data - * @return No return value. - */ - void ReadLanDataL( TUint32 aIspId, CApAccessPointItem& aApItem ); - - - /** - * Reads the DialIn/Out ISP data from the database. - * In case of error, leaves with CommDb error codes. - * @param aIspId The UID of the record in the Dialup table to - * read the data from. - * @param aApItem A reference to a CApAccessPointItem to hold the data - * @return No return value. - */ - void ReadDialInOutDataL( TUint32 aIspId, CApAccessPointItem& aApItem ); - - - /** - * Reads up the VPN bearer type info in case of a VPN access point - * In case of error, leaves with CommDb error codes. - * @param aIspId The UID of the record in the VPN table to - * read the data from. - * @param aApItem A reference to a CApAccessPointItem to hold the data - * @return No return value. - */ - void ReadVpnInfoL( TUint32 aIspId, CApAccessPointItem& aApItem); - - - /** - * Writes the WAP bearer part of the data to the database. - * In case of error, leaves with CommDb error codes. - * @param aIsNew A Boolean indicating whether it is a new record or it - * is an update operation. - * @param aWapId The UID of the WAP Access Point record to update. - * Used only if aIsNew EFalse. - * @param aApItem Reference to a CApAccessPointItem which holds the data - * @return No return value. - */ - void WriteWapBearerDataL - ( - TBool aIsNew, - TUint32 aWapId, - CApAccessPointItem& aApItem - ); - - - /** - * Writes the WAP AP part of the data to the database. - * In case of error, leaves with CommDb error codes. - * @param aIsNew A Boolean indicating whether it is a new record or it - * is an update operation. - * @param aWapId The UID of the WAP Access Point record to update. - * Used only if aIsNew EFalse. - * @param aApItem Reference to a CApAccessPointItem which holds the data - * @return No return value. - */ - void WriteWapApDataL - ( - TBool aIsNew, - TUint32 aWapId, - CApAccessPointItem& aApItem - ); - - - - /** - * Writes the IAP part of the data to the database. - * In case of error, leaves with CommDb error codes. - * @param aIsNew A Boolean indicating whether it is a new record or it - * is an update operation. - * @param aIapId The UID of the IAP Access Point record to update. - * Used only if aIsNew EFalse. - * @param aApItem Reference to a CApAccessPointItem which holds the data - * @return No return value. - */ - void WriteIapDataL - ( - TBool aIsNew, - TUint32 aIapId, - CApAccessPointItem& aApItem - ); - - /** - * Writes the ISP part of the data to the database. - * In case of error, leaves with CommDb error codes. - * @param aIsNew A Boolean indicating whether it is a new record or it - * is an update operation. - * @param aIspId The UID of the ISP Access Point record to update. - * Used only if aIsNew EFalse. - * @param aApItem Reference to a CApAccessPointItem which holds the data - * @return No return value. - */ - void WriteIspDataL( TBool aIsNew, TUint32 aIspId, - CApAccessPointItem& aApItem ); - - /** - * Writes the Gprs data to the database. - * In case of error, leaves with CommDb error codes. - * @param aIsNew A Boolean indicating whether it is a new record or it - * is an update operation. - * @param aApItem Reference to a CApAccessPointItem which holds the data - * @return No return value. - */ - void WriteGprsDataL( TBool aIsNew, - CApAccessPointItem& aApItem ); - - /** - * Writes the LAN data to the database. - * In case of error, leaves with CommDb error codes. - * @param aIsNew A Boolean indicating whether it is a new record or it - * is an update operation. - * @param aApItem Reference to a CApAccessPointItem which holds the data - * @return No return value. - */ - void WriteLanDataL( TBool aIsNew, - CApAccessPointItem& aApItem ); - - - /** - * Writes the data to the database. - * In case of error, leaves with CommDb error codes. - * @param aApItem Reference to a CApAccessPointItem which holds the data - * @param aIsNew A Boolean indicating whether it is a new record or it - * is an update operation. - * @return No return value. - */ - TUint32 DoUpdateAccessPointDataL( CApAccessPointItem& aApItem, - TBool aIsNew, TBool& aNameChanged ); - - - /** - * Sets the default IAP & ISP records in Global Settings. - * In case of error, leaves with CommDb error codes. - * @param aApItem A UID to the WAP Access Point record to - * be used as a default. - * @return No return value. - */ - void SetDefaultIapIspL( TUint32 aUid ); - - // Remove - /** - * Removes the WAP_BEARER table part of the access point from - * the database. - * Expects that CApDataHandler has been created and the database had - * been opened. - * In case of error, access point will not be removed. - * @param aUid The UID of the access point to remove. - * @return No return value. - */ - void RemoveWapBearerApL( TUint32 aUid ); - - - /** - * Removes the WAP_ACCESS_POINT table part of the access point from - * the database. - * Expects that CApDataHandler has been created and the database had - * been opened. - * In case of error, access point will not be removed. - * @param aUid The UID of the access point to remove. - * @return No return value. - */ - void RemoveWapApL( TUint32 aUid ); - - - /** - * Removes the IAP part of the access point from the database. - * Expects that CApDataHandler has been created and the database had - * been opened. - * In case of error, access point will not be removed. - * @param aUid The UID of the IAP part of the access point to remove. - * @return No return value. - */ - void RemoveIapL( TUint32 aUid ); - - - /** - * Removes the ISP part of the access point from the database. - * Expects that CApDataHandler has been created and the database had - * been opened. - * In case of error, access point will not be removed. - * @param aUid The UID of the ISP part of the access point to remove. - * @param aOut TBool indicating whether Dial out or dial in ISP. - * @return No return value. - */ - void RemoveIspL( TUint32 aUid, TBool aOut ); - - - /** - * Removes the GPRS part of the access point from the database. - * Expects that CApDataHandler has been created and the database had - * been opened. - * In case of error, access point will not be removed. - * @param aUid The UID of the GPRS part of the access point to remove. - * @return No return value. - */ - void RemoveGprsL( TUint32 aUid, TBool aOut ); - - - /** - * Removes the LAN part of the access point from the database. - * Expects that CApDataHandler has been created and the database had - * been opened. - * In case of error, access point will not be removed. - * @param aUid The UID of the LAN part of the access point to remove. - * @return No return value. - */ - void RemoveLanL( TUint32 aUid ); - - - /** - * Removes the WLAN part of the access point from the database. - * Expects that CApDataHandler has been created and the database had - * been opened. - * In case of error, access point will not be removed. - * @param aUid The UID of the LAN part of the access point to remove. - * @return No return value. - */ - void RemoveWlanL( TUint32 aUid ); - - - /** - * Handles the bearer change related things (deleting old links, - * inserting new ones if needed in the database). - * Expects that CApDataHandler has been created and the database had - * been opened. - * In case of error, access point data will not be changed. - * @param aApItem A reference to a CApAccessPointItem holding the - * CHANGED data. - * @return Boolean indicating whether bearer has changed or not. - */ - TBool HandleBearerChangeIfNeededL( CApAccessPointItem& aApItem ); - - - - /** - * Reads up one access point's data from the database. - * Expects that CApDataHandler has been created and the database had - * been opened. - * In case of error, function leaves with error code. - *
Error conditions: - * - Insufficient memory, - * - AP does not exists, - * - Server connection failure. - * - * @param aUid The Uid of the access point to be read - * @param aApItem A reference to a CApAccessPointItem to hold the data. - * @return no return value. - */ - void DoAccessPointDataL( TUint32 aUid, CApAccessPointItem& aApItem ); - - - /** - * Removes the given access point from the database. - * Expects that CApDataHandler has been created and the database had - * been opened. - * In case of error, access point will not be removed. - *
Error conditions: - * - Insufficient memory, - * - Server connection failure. - * - Lock already present by other task. - * - Access point does not exist. - * - Attempting to remove read-only records will result - * in KErrAccessDenied - * - * @param aUid The UID of the access point to remove. - * @return no return value. - */ - void DoRemoveAPL( TUint32 aUid ); - - - /** - * Sets the default access point. - * Expects that CApDataHandler has been created and the database had - * been opened. - * In case of error, leaves with CommsDb or system error codes. - *
Error conditions: - * - Insufficient memory; - * - Server connection failure; - * - Lock already present; - * - Access point does not exists. - * - Given Access Point is not of the desired type. - * - * @param aUid The UID of the access point to be set as default. - * @param aIntendedType The default type ( IAP, WAP, Both). - */ - void DoSetAsDefaultL(TUint32 aUid, TCommsDbIspType aIntendedType ); - - - /** - * Sets the access point preference. Can be used only if the - * database type is IAP. - * Expects that CApDataHandler has been created and the database had - * been opened. - * In case of error, leaves with CommsDb or system error codes. - *
Error conditions: - * - Insufficient memory; - * - Server connection failure; - * - Lock already present; - * Can also leave with KErrAlreadyExists (if aOverWrite is EFalse ). - * @param aRank The ranking of the connection preference. - * @param aDircetion Specifies the direction of this connection - * preference - * @param aBearers The bearer set beeing valid for this connection - * preference - * @param aPrompt Enum value indicating whether or not the user - * should be prompted or warned on connection - * @param aIAP The identifier of the preferred IAP for this connection. - * @param aOverwrite Boolean value indicating that if a same record - * present, overwrite it or not. - */ - void DoSetPreferredIfDbIapTypeL - ( - TUint32 aRank, - TCommDbConnectionDirection aDirection, - TUint32 aBearers, - TCommDbDialogPref aPrompt, - TUint32 aIAP, - TBool aOverwrite - ); - - - /** - * Sets the access point preference. Can be used only if the - * database type is ISP. - * Expects that CApDataHandler has been created and the database had - * been opened. - * In case of error, leaves with CommsDb or system error codes. - *
Error conditions: - * - Insufficient memory; - * - Server connection failure; - * - Lock already present; - * Can also leave with KErrAlreadyExists (if aOverWrite is EFalse ). - * @param aRank The ranking of the connection preference. - * @param aDircetion Specifies the direction of this connection - * preference - * @param aBearers The bearer set beeing valid for this connection - * preference - * @param aPrompt Enum value indicating whether or not the user - * should be prompted or warned on connection - * @param aISP The identifier of the preferred ISP for this connection. - * @param aChargeCard Identifier of the preferred chargecard for - * this connection. - * @param aServiceType The type of the service. - * @param aOverwrite Boolean value indicating that if a same record - * present, overwrite it or not. - */ - void DoSetPreferredIfDbIspTypeL - ( - TUint32 aRank, - TCommDbConnectionDirection aDirection, - TUint32 aBearers, - TCommDbDialogPref aPrompt, - TUint32 aISP, - TUint32 aChargeCard, - const TDesC& aServiceType, - TBool aOverwrite - ); - - - /** - * Converts setted AP speed from TApCallSpeed to commsdb values - * @param The access point item whose speed needs to be converted - * @return no return value - */ - /***************************************************** - * Series 60 Customer / ETel - * Series 60 ETel API - *****************************************************/ - void ApSpeed2EtelL( CApAccessPointItem* aItem ); - - - /** - * Converts commsdb speed values to TApCallSpeed - * @param The access point item whose speed needs to be converted - * @return no return value - */ - /***************************************************** - * Series 60 Customer / ETel - * Series 60 ETel API - *****************************************************/ - void EtelSpeed2ApL( CApAccessPointItem& aItem ); - - - // Getting default access point - /** - * Reads the UID of the default access point. - * Expects that CApDataHandler has been created and the database had - * been opened. - * In case of error, leaves with CommsDb or system error codes. - *
Error conditions: - * - Insufficient memory; - * - Server connection failure; - * - Lock already present; - * - Access point does not exists. - * - * @param aIsWAP A boolean indicating whether to read the default - * WAP or the default IAP/ISP (dep. on the database type) access point. - * @param TBool*: if not NULL, a holder for the read-only flag of - * the default access point. Prepared for future products but also used - * here through passing NULL ptr. - * @return The UID of the default access point. - */ - TUint32 DoGetDefaultL( TBool aIsWap, TBool* aReadOnly ) const; - - - /** - * Writes the proxy data of an access point - * @param aIsNew Boolean stating whether the access point is new - * @param aApItem A CApAccessPointItem passed by reference - * holding the current access point data. It's record ID's will be - * updated if needed (in case it is a new item ) - */ - void WriteProxyDataL( TBool aIsNew, - const CApAccessPointItem& aApItem ); - - - /** - * Reads up the proxy data of an access point - * @param aApItem A CApAccessPointItem passed by reference - * holding the current access point data. - */ - void ReadProxyDataL( CApAccessPointItem& aApItem ); - - - /** - * Removes a proxy data - * @param aServiceType The service type to remove for - * @param aIspId The service record ID - */ - void RemoveProxyDataL( HBufC* aServiceType, TUint32 aIspId ); - - - /** - * Writes the network data of an access point - * @param aIsNew Boolean stating whether the access point is new - * @param aApItem A CApAccessPointItem passed by reference - * holding the current access point data. It's record ID's will be - * updated if needed (in case it is a new item ) - */ - void WriteNetworkDataL( TBool aIsNew, CApAccessPointItem& aApItem ); - - - /** - * Reads up the network data of an access point - * @param aApItem A CApAccessPointItem passed by reference - * holding the current access point data. - */ - void ReadNetworkDataL( CApAccessPointItem& aApItem ); - - - /** - * Removes the network data - * @param aIspId The record ID to remove - */ - void RemoveNetworkDataL( TUint32 aIspId ); - - - /** - * Gets the location record ID - * @return The UID of the location. - */ - TUint32 GetLocationIdL(); - - - /** - * Gets the modem record ID - * @return The UID of the modem record. - */ - TUint32 GetModemBearerIDL( CApAccessPointItem& aApItem ); - - - /** - * Returns the protocol for the passed item - * @param aApItem An access point item - * @return The protocol of the passed item. - */ - TUint32 ProtocolL( CApAccessPointItem& aApItem ); - - /** - * Returns the commsdb speed for the passed item - * @param aApItem An access point item - * @return The speed of the passed item. - */ - TUint32 CommsDbSpeedL( CApAccessPointItem& aApItem ); - - - /** - * Reads up common IP & PPP SERVICE data parts of an access point. - * Leaves if it is not persent in the database - * @param The table to read from - * @param The CApAccessPointItem to store into - */ - void ReadServiceL( CCommsDbTableView& ispt, - CApAccessPointItem& aApItem ); - - - /** - * Reads up CSD/GPRS IPv6 parts of an access point. - * Leaves if it is not persent in the database - * @param The table to read from - * @param The CApAccessPointItem to store into - */ - void ReadServiceIp6L( CCommsDbTableView& ispt, - CApAccessPointItem& aApItem ); - - - /** - * Writes common IP & PPP SERVICE data parts of an access point. - * Leaves if it is not persent in the database - * @param The table to write into - * @param The CApAccessPointItem holding the data to store - */ - void WriteServiceL( CCommsDbTableView& aTable, - CApAccessPointItem& aApItem ); - - - /** - * Writes the IPv6 parts of an access point. - * Leaves if it is not persent in the database - * @param The table to write to - * @param The CApAccessPointItem to read the data from - */ - void WriteServiceIp6L( CCommsDbTableView& ispt, - CApAccessPointItem& aApItem ); - - - /** - * Writes the CSD isp data to the database. - * In case of error, leaves with CommDb error codes. - * Leaves with KErrNotSupported if (HS)CSD bearer type is not supported. - * @param aIsNew A Boolean indicating whether it is a new record or it - * is an update operation. - * @param aApItem Reference to a CApAccessPointItem which holds the data - * @return No return value. - */ - void WriteCsdDataL( TBool aIsNew, CApAccessPointItem& aApItem ); - - - /** - * Gets the local variant value - * @return A TInt stating the variant - */ -// TInt GetVariantL(); - - - /** - * Reads up WLAN data parts of an access point. - * Leaves if it is not persent in the database - * @param The table to read from - * @param The CApAccessPointItem to store into - */ - void ReadWlanL( CCommsDbTableView& lant, - CApAccessPointItem& aApItem ); - - - /** - * Writes the WLAN parts of an access point. - * Leaves if it is not persent in the database - * @param The table to write to - * @param The CApAccessPointItem to read the data from - */ - void WriteWlanL( CCommsDbTableView& aTable, - CApAccessPointItem& aApItem ); - - /** - * Creates a new record in the LANBearer table if there is none for WLAN - * @return The UID of the LANBEarer record. - */ - TUint32 CreateLanBearerIfNeededL(); - - - - /** - * Reads up the name of the LAN/Modem bearer record - */ - void ReadModemBearerNameL( CApAccessPointItem& aApItem ); - - - private: // Data - CCommsDatabase* iDb; -// TCommDbDatabaseType iDbType; // deprecated and not used but kept - // to maintain class size for BC - // no change in size as deprecated removed, - // new added, with the same size... - THandlerExtra* iExt; - - - }; - -#endif // APDATAHANDLER_H - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c ipcm_pub/access_point_engine_api/inc/APNetworks.h --- a/ipcm_pub/access_point_engine_api/inc/APNetworks.h Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,139 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of the CApNetworks class. -* -*/ - - -#ifndef CAPNETWORKS_H -#define CAPNETWORKS_H - -// Deprecation warning -#warning This header file has been deprecated and will be fully removed between weeks 12 and 18 of 2010. See Polonium CR #153 for details. - - -// INCLUDES -#include -#include -#include - -// FORWARD DECLARATIONS -class CApNetworkItem; -class CApNetworkItemList; - -// CLASS DECLARATION - -/** -* This class is used to help client's network selection. -* -*/ -NONSHARABLE_CLASS( CApNetworks ) :public CBase - { - public: // Constructors and destructor - - /** - * Two-phased constructor. Leaves on failure, places instance - * on cleanup stack. - * @param aDb a reference to a CCommsDataBase. - * @return The constructed CApNetworks. - * - * @deprecated - */ - IMPORT_C static CApNetworks* NewLC( CCommsDatabase& aDb ); - - - /** - * Destructor. - * - * @deprecated - */ - IMPORT_C virtual ~CApNetworks(); - - - private: // Constructors - - /** - * C++ default constructor. - * - * @deprecated - */ - IMPORT_C CApNetworks(); - - /** - * Second-phase constructor. - * @param aDb The database - * - * @deprecated - */ - IMPORT_C void ConstructL( CCommsDatabase& aDb ); - - - - public: // New functions - - /** - * Counts the items in the list - * @return The number of items in the list. - * - * @deprecated - */ - IMPORT_C TUint32 Count() const; - - - /** - * Gets the name of the network group with the given UID - * Ownership of the returned text is not passed. - * @param aUid The uid of the network item - * @return The name of the network group - * - * @deprecated - */ - IMPORT_C const TDesC& NameL( TUint32 aUid ) const; - - - - /** - * Provides all data in a CApNetworkItemList array. - * @param aList A reference to a CApNetworkItemList object - * to hold the values. - * @return The number of items in the list. - * All elements in the aList array and their memory - * will be freed inside the routine. - * The routine expands or shrinks the array as necessary - * to minimize memory consumption. - * - * @deprecated - */ - IMPORT_C TInt AllListItemDataL( CApNetworkItemList& aList ); - - - private: - /** - * This function updates the member data according to the - * current filter settings. - * @return Error code. - */ - TInt DoUpdateL(); - - - - private: // Data - CCommsDatabase* iDb; // Does not own it! - CApNetworkItemList* iApList; - TInt iCount; - }; - -#endif // CAPNETWORKS_H - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c ipcm_pub/access_point_engine_api/inc/APSelect.h --- a/ipcm_pub/access_point_engine_api/inc/APSelect.h Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,738 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of the CApSelect class. -* -*/ - - -#ifndef CAPSELECT_H -#define CAPSELECT_H - -// Deprecation warning -#warning This header file has been deprecated and will be fully removed between weeks 12 and 18 of 2010. See Polonium CR #153 for details. - - -// INCLUDES -#include -#include -#include - - -// FORWARD DECLARATIONS -class CApListItem; -class CApListItemList; -class CApUtils; - - - -enum TVpnFilterType - { - EVpnFilterVpnOnly, ///< Shows only VPN access points - EVpnFilterNoVpn, ///< Shows only non-VPN access points - EVpnFilterBoth ///< Shows both normal and VPN access points - }; - - -// CLASS DECLARATION -// Extra data holder -typedef struct - { - TInt iMaxIndex; - TInt iReqIpvType; - TInt iIsIpv6Supported; - TInt iExtra; - TBool iIsFeatureManagerInitialised; - TBool iCdma; - TInt iVpnFilterType; // TVpnFilterType values !! - TBool iWlanSupported; - TBool iIncludeEasyWlan; - }TSelectExtra; - - - -typedef struct - { - TUint32 iVpnIapId; - TUint32 iHomeIapId; - TUint32 iHomeSnapId; - HBufC * iName; - }TVpnData; - - -/** -* This class is used to help client's access point selection. -* Selection can be tailored with specific filters, rules and sort order. -* Provides methods for setting and getting filters and sort order. -* -*/ -class CApSelect :public CBase - { - public: // Constructors and destructor - - /** - * Two-phased constructor. Leaves on failure, places instance - * on cleanup stack. - * @param aDb a pointer to a CCommsDataBase. - * @param aIspTypeFilter Filtering criteria on ISP type - * Possible values are: - * KEApIspTypeInternetOnly, KEApIspTypeWAPOnly, - * KEApIspTypeInternetAndWAP, KEApIspTypeWAPMandatory - * KEApIspTypeAll and their combinations. - * @param aBearerFilter Filtering criteria on bearer type - * Possible values are the TApBearer enums and - * their combinations (or-ed). - * @param aSortType Specifies the sort order to use. - * Possible values are: - * KEApSortUidAscending, KEApSortUidDescending, - * KEApSortNameAscending, KEApSortNameDescending - * @return The constructed CApSelect. - * - * @deprecated - */ - IMPORT_C static CApSelect* NewLC( - CCommsDatabase& aDb, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType - ); - - - /** - * Two-phased constructor. Leaves on failure, places instance - * on cleanup stack. - * @param aDb a pointer to a CCommsDataBase. - * @param aIspTypeFilter Filtering criteria on ISP type - * Possible values are: - * KEApIspTypeInternetOnly, KEApIspTypeWAPOnly, - * KEApIspTypeInternetAndWAP, KEApIspTypeWAPMandatory - * KEApIspTypeAll and their combinations. - * @param aBearerFilter Filtering criteria on bearer type - * Possible values are the TApBearer enums and - * their combinations (or-ed). - * @param aSortType Specifies the sort order to use. - * Possible values are: - * KEApSortUidAscending, KEApSortUidDescending, - * KEApSortNameAscending, KEApSortNameDescending - * @param aReqIpvType Filtering criteria on the IPv type of the - * access point. In case of GPRS, GPRS_PDP_TYPE holds it, while - * in case of CSD, all CSD access points are - * considered to be IPv4 & IPv6 (both) - * @return The constructed CApSelect. - * - * @deprecated - */ - IMPORT_C static CApSelect* NewLC( - CCommsDatabase& aDb, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TInt aReqIpvType - ); - - - - /** - * Two-phased constructor. Leaves on failure, places instance - * on cleanup stack. - * @param aDb a pointer to a CCommsDataBase. - * @param aIspTypeFilter Filtering criteria on ISP type - * Possible values are: - * KEApIspTypeInternetOnly, KEApIspTypeWAPOnly, - * KEApIspTypeInternetAndWAP, KEApIspTypeWAPMandatory - * KEApIspTypeAll and their combinations. - * @param aBearerFilter Filtering criteria on bearer type - * Possible values are the TApBearer enums and - * their combinations (or-ed). - * @param aSortType Specifies the sort order to use. - * Possible values are: - * KEApSortUidAscending, KEApSortUidDescending, - * KEApSortNameAscending, KEApSortNameDescending - * @param aReqIpvType Filtering criteria on the IPv type of the - * access point. In case of GPRS, GPRS_PDP_TYPE holds it, while - * in case of CSD, all CSD access points are - * considered to be IPv4 & IPv6 (both) - * @param aVpnFilterType a TVpnFilterType enum specifying the - * vpn filtering. - * @return The constructed CApSelect. - * - * @deprecated - */ - IMPORT_C static CApSelect* NewLC( - CCommsDatabase& aDb, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TInt aReqIpvType, - TVpnFilterType aVpnFilterType ); - - - /** - * Two-phased constructor. Leaves on failure, places instance - * on cleanup stack. - * @param aDb a pointer to a CCommsDataBase. - * @param aIspTypeFilter Filtering criteria on ISP type - * Possible values are: - * KEApIspTypeInternetOnly, KEApIspTypeWAPOnly, - * KEApIspTypeInternetAndWAP, KEApIspTypeWAPMandatory - * KEApIspTypeAll and their combinations. - * @param aBearerFilter Filtering criteria on bearer type - * Possible values are the TApBearer enums and - * their combinations (or-ed). - * @param aSortType Specifies the sort order to use. - * Possible values are: - * KEApSortUidAscending, KEApSortUidDescending, - * KEApSortNameAscending, KEApSortNameDescending - * @param aReqIpvType Filtering criteria on the IPv type of the - * access point. In case of GPRS, GPRS_PDP_TYPE holds it, while - * in case of CSD, all CSD access points are - * considered to be IPv4 & IPv6 (both) - * @param aVpnFilterType a TVpnFilterType enum specifying the - * vpn filtering. - * @param aIncludeEasyWlan TBool specifying whther to include - * EasyWlan access point in the list or not... - * @return The constructed CApSelect. - * - * @deprecated - */ - IMPORT_C static CApSelect* NewLC( - CCommsDatabase& aDb, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TInt aReqIpvType, - TVpnFilterType aVpnFilterType, - TBool aIncludeEasyWlan ); - - - /** - * Destructor. - * - * @deprecated - */ - IMPORT_C virtual ~CApSelect(); - - - protected: // Constructors - - /** - * C++ default constructor. - * - * @deprecated - */ - IMPORT_C CApSelect(); - - - /** - * Second-phase constructor. - * @param aDb a pointer to a CCommsDataBase. - * @param aIspTypeFilter Filtering criteria on ISP type - * Possible values are: - * KEApIspTypeInternetOnly, KEApIspTypeWAPOnly, - * KEApIspTypeInternetAndWAP, KEApIspTypeWAPMandatory - * KEApIspTypeAll and their combinations. - * @param aBearerFilter Filtering criteria on bearer type - * Possible values are the TApBearer enums and - * their combinations (or-ed). - * @param aSortType Specifies the sort order to use. - * Possible values are: - * KEApSortUidAscending, KEApSortUidDescending, - * KEApSortNameAscending, KEApSortNameDescending - * - * @deprecated - */ - IMPORT_C void ConstructL( - CCommsDatabase& aDb, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType - ); - - - /** - * Second-phase constructor. - * @param aDb a pointer to a CCommsDataBase. - * @param aIspTypeFilter Filtering criteria on ISP type - * Possible values are: - * KEApIspTypeInternetOnly, KEApIspTypeWAPOnly, - * KEApIspTypeInternetAndWAP, KEApIspTypeWAPMandatory - * KEApIspTypeAll and their combinations. - * @param aBearerFilter Filtering criteria on bearer type - * Possible values are the TApBearer enums and - * their combinations (or-ed). - * @param aSortType Specifies the sort order to use. - * Possible values are: - * KEApSortUidAscending, KEApSortUidDescending, - * KEApSortNameAscending, KEApSortNameDescending - * @param aReqIpvType Filtering criteria on the IPv type of the - * access point. In case of GPRS, GPRS_PDP_TYPE holds it, while - * in case of CSD, all CSD access points are - * considered to be IPv4 & IPv6 (both) - * - * @deprecated - */ - IMPORT_C void ConstructL( - CCommsDatabase& aDb, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TInt aReqIpvType - ); - - - /** - * Second-phase constructor. - * @param aDb a pointer to a CCommsDataBase. - * @param aIspTypeFilter Filtering criteria on ISP type - * Possible values are: - * KEApIspTypeInternetOnly, KEApIspTypeWAPOnly, - * KEApIspTypeInternetAndWAP, KEApIspTypeWAPMandatory - * KEApIspTypeAll and their combinations. - * @param aBearerFilter Filtering criteria on bearer type - * Possible values are the TApBearer enums and - * their combinations (or-ed). - * @param aSortType Specifies the sort order to use. - * Possible values are: - * KEApSortUidAscending, KEApSortUidDescending, - * KEApSortNameAscending, KEApSortNameDescending - * @param aReqIpvType Filtering criteria on the IPv type of the - * access point. In case of GPRS, GPRS_PDP_TYPE holds it, while - * in case of CSD, all CSD access points are - * considered to be IPv4 & IPv6 (both) - * @param aVpnFilterType a TVpnFilterType enum specifying the - * vpn filtering. - * - * @deprecated - */ - IMPORT_C void ConstructL( CCommsDatabase& aDb, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TInt aReqIpvType, - TVpnFilterType aVpnFilterType - ); - - /** - * Second-phase constructor. - * @param aDb a pointer to a CCommsDataBase. - * @param aIspTypeFilter Filtering criteria on ISP type - * Possible values are: - * KEApIspTypeInternetOnly, KEApIspTypeWAPOnly, - * KEApIspTypeInternetAndWAP, KEApIspTypeWAPMandatory - * KEApIspTypeAll and their combinations. - * @param aBearerFilter Filtering criteria on bearer type - * Possible values are the TApBearer enums and - * their combinations (or-ed). - * @param aSortType Specifies the sort order to use. - * Possible values are: - * KEApSortUidAscending, KEApSortUidDescending, - * KEApSortNameAscending, KEApSortNameDescending - * @param aReqIpvType Filtering criteria on the IPv type of the - * access point. In case of GPRS, GPRS_PDP_TYPE holds it, while - * in case of CSD, all CSD access points are - * considered to be IPv4 & IPv6 (both) - * @param aVpnFilterType a TVpnFilterType enum specifying the - * vpn filtering. - * @param aIncludeEasyWlan TBool specifying whther to include - * EasyWlan access point in the list or not... - * - * @deprecated - */ - IMPORT_C void ConstructL( CCommsDatabase& aDb, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TInt aReqIpvType, - TVpnFilterType aVpnFilterType, - TBool aIncludeEasyWlan ); - - public: // New functions - /** - * Sets filters and sorting order for the list of available - * access points - * @param aIspTypeFilter Filtering criteria on ISP type - * Possible values are: - * KEApIspTypeInternetOnly, KEApIspTypeWAPOnly, - * KEApIspTypeInternetAndWAP, - * KEApIspTypeWAPMandatory, KEApIspTypeAll and their combinations. - * @param aBearerFilter Filtering criteria on bearer type - * Possible values are the TApBearer enums and - * their combinations (or-ed). - * @param aSortType Specifies the sort order to use. - * Possible values are: - * KEApSortUidAscending, KEApSortUidDescending, - * KEApSortNameAscending, KEApSortNameDescending - * - * @deprecated - */ - IMPORT_C void SetFiltersL( - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType - ); - - - - /** - * Gets the current ISP-type filter - * @return The current ISP-type filter - * - * @deprecated - */ - IMPORT_C TInt IspTypeFilter(); - - - /** - * Gets the current bearer-type filter - * @return The current bearer-type filter - * - * @deprecated - */ - IMPORT_C TInt BearerFilter(); - - - /** - * Gets the current sorting order - * @return The current sorting order - * - * @deprecated - */ - IMPORT_C TInt SortOrder(); - - - /** - * Navigates to the first access point in the list. - * @return Boolean indicating the success of the operation. - * - * @deprecated - */ - IMPORT_C TBool MoveToFirst(); - - - /** - * Navigates to the next access point in the list. - * @return Boolean indicating the success of the operation. - * - * @deprecated - */ - IMPORT_C TBool MoveNext(); - - - /** - * Navigates to the last access point in the list. - * @return Boolean indicating the success of the operation. - * - * @deprecated - */ - IMPORT_C TBool MoveLast(); - - - /** - * Navigates to the previous access point in the list. - * @return Boolean indicating the success of the operation. - * - * @deprecated - */ - IMPORT_C TBool MovePrev(); - - - /** - * Counts the items in the list - * @return The number of items in the list. - * - * @deprecated - */ - IMPORT_C TUint32 Count(); - - - /** - * Gets the name of the 'current' access point - * Ownership of the returned text is not passed. - * @return The name of the current access point - * - * @deprecated - */ - IMPORT_C const TDesC& Name(); - - - /** - * Gets the UID of the current access point - * @return The UID of the current access point - * - * @deprecated - */ - IMPORT_C TUint32 Uid(); - - - /** - * Gets the ISP-type of the current access point - * @return The ISP-type of the current access point. - * - * @deprecated - */ - IMPORT_C TCommsDbIspType Type(); - - - /** - * Gets the bearer-type of the current access point - * @return The bearer-type of the current access point. - * - * @deprecated - */ - IMPORT_C TApBearerType BearerType(); - - - /** - * Provides all data in a CApListItemList array. - * @param aList A reference to a CApListItemList object - * to hold the values. - * @return The number of items in the list. - * All elements in the aList array and their memory - * will be freed inside the routine. - * The routine expands or shrinks the array as necessary - * to minimize memory consumption. - * - * @deprecated - */ - IMPORT_C TInt AllListItemDataL( CApListItemList& aList ); - - /** - * Returns whether the current item is read-only or not. - * @return Returns whether the current item is read-only or not. - * - * @deprecated - */ - IMPORT_C TBool IsReadOnly() const; - - private: - /** - * This function updates the member data according to the - * current filter settings. - * @return Error code. - */ - TInt DoUpdateL(); - - - /** - * Gets the filtered and sorted wap table - * and places it on the Cleanupstack - */ - CCommsDbTableView* GetFilteredSortedWapTableViewLC(); - - - /** - * Gets the filtered and sorted IP bearer table - * and places it on the Cleanupstack - */ - CCommsDbTableView* GetFilteredSortedIpBearerTableViewLC(); - - - /** - * Gets the filtered and sorted ISP table - * and places it on the Cleanupstack - */ - CCommsDbTableView* GetFilteredSortedIspOutTableViewLC(); - - - /** - * Gets the filtered and sorted GPRS table - * and places it on the Cleanupstack - */ - CCommsDbTableView* GetFilteredSortedGprsTableViewLC( TBool aIn ); - - /** - * Reads up the specified columns TUint32 values stored - * in the table and returns it in the passed array - */ - void GetUintValuesL - ( - CCommsDbTableView* aTable, - const TDesC& aField, - CArrayFixFlat& aArray - ); - - - /** - * Reads up the protection values stored - * in the table and returns it in the passed array - */ - void GetProtValuesL( CCommsDbTableView* aTable, - CArrayFixFlat& aArray ); - - /** - * Reads up the specified columns text values stored - * in the table and returns it in the passed array - */ - void GetTextValuesL - ( - CCommsDbTableView* aTable, - const TDesC& aField, - CArrayPtrFlat& aArray - ); - - - /** - * Reads up the specified columns long text values stored - * in the table and returns it in the passed array - */ - void GetLongTextValuesL - ( - CCommsDbTableView* aTable, - const TDesC& aField, - CArrayPtrFlat& aArray - ); - - - /** - * Returns whether a given value is in the given array or not - */ - TBool IsInArray( CArrayFixFlat* aArray, TUint32 aValue ); - - - /** - * Returns the position of a given value in the given array. - */ - TInt PosInArray( CArrayFixFlat* aArray, TUint32 aValue ); - - - /** - * Returns the position of an item with a given UID in the given list. - */ - TInt GetItemPos( CApListItemList* aTmpApList, TUint32 aId ); - - - /** - * Opens a view on the given table where a given text coloumn has - * a given value - * @return the opened view on the table - */ - CCommsDbTableView* OpenViewMatchingTextL - ( - const TDesC& aTableName, - const TDesC& aColumnToMatch, - const TDesC16& aValueToMatch - ); - - /** - * Gets the ISP values (ISP UID, ISP type, ISP bearer type) - * from a given table - * @param aTable the table to go through (already filtered & ordered) - * @param aArray An array to hold the readed values - * @param aColName Column name (different column names are used for - * CSD/GPRS/CDMA. - */ - void GetIspValuesL - ( - CCommsDbTableView* aTable, - CArrayFixFlat* aArray, - const TDesC& aColName - ); - - /** - * Gets the position of an element with a given IAP UID - */ - TInt GetIapPos - ( - CArrayFixFlat* aArray, - TUint32 aValue - ); - - /** - * Sorts the data according to localised sorting on the - * access point names, using CompareC - */ - void SortLocalisedNameL( TBool aAscending = ETrue ); - - - /** - * Sorts the data according to Uids - */ - void SortUidL( TBool aAscending = ETrue ); - - - - private: // New functions - /** - * Sets filters and sorting order for the list of available - * access points - * @param aIspTypeFilter Filtering criteria on ISP type - * Possible values are: - * KEApIspTypeInternetOnly, KEApIspTypeWAPOnly, - * KEApIspTypeInternetAndWAP, - * KEApIspTypeWAPMandatory, KEApIspTypeAll and their combinations. - * @param aBearerFilter Filtering criteria on bearer type - * Possible values are the TApBearer enums and - * their combinations (or-ed). - * @param aSortType Specifies the sort order to use. - * Possible values are: - * KEApSortUidAscending, KEApSortUidDescending, - * KEApSortNameAscending, KEApSortNameDescending - * @param aReqIpvType The filtering criteria for IPv type - * @param aVpnFilterType The Vpn filtering type, TVpnFilterType values - */ - void SetFiltersL( TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TInt aReqIpvType, - TInt aVpnFilterType - ); - - - /** - * Returns a pointer to the opened VPN_SERVICE table - */ - CCommsDbTableView* GetVpnTableViewLC(); - - - /** - * Gets the VPN values (VPN IAP UID, VPN HOME IAP UID, VPN Name ) - * from the given VPN table - * @param aTable the table to go through (already filtered & ordered) - * @param aVpnArray An array to hold the readed vpn data values - */ - void GetVpnValuesL( CCommsDbTableView* aTable, - CArrayFixFlat* aVpnArray ); - - - /** - * Returns the supported bearer set from the passed requested bearer set - * @param aBearerFilter The requested bearer set - * return The supported subset of the requested bearers. - */ - TInt GetSupportedBearerSet( TInt aBearerFilter ); - - - /** - * Adding WLAN or LAN access points to existing list. - * aWlan a TBool specifying whether WLAN or LAN - */ - void AddLanL( TBool aWlan ); - - - - - private: // Data - CCommsDatabase* iDb; // Does not own it! - TInt iIsp; - TInt iBearer; - TInt iSort; - CApListItemList* iApList; - TInt iCursor; - TInt iCount; - TSelectExtra* iExt; - - }; - -#endif // CAPSELECT_H - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c ipcm_pub/access_point_engine_api/inc/APUtils.h --- a/ipcm_pub/access_point_engine_api/inc/APUtils.h Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,422 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of the class CApUtils -* Contains utility functions for access point handling -* -*/ - - -#ifndef APUTILS_H -#define APUTILS_H - -// Deprecation warning -#warning This header file has been deprecated and will be fully removed between weeks 12 and 18 of 2010. See Polonium CR #153 for details. - - -// INCLUDES -#include -#include -#include - - - -// extra data holder. -typedef struct - { - TInt iVariant; /// Local variant value - TBool iWlanSupported; /// WLAN feature supported or not - TBool iIsFeatureManagerInitialised; - }TUtilsExtra; - - -// CLASS DECLARATION - -/** -* Representation of access point utilities. -* Provides utilities to access points for clients. -* Encapsulates database handling. -* This class provides utility functions for clients that need some -* specific information or parameters from (maybe more than one) AP. -* It is provided for ease of use so clients do not have to work with -* CApDataHandler's concept (one object-one Uid). -*/ -class CApUtils :public CBase - { - public: // Constructors and destructor - - /** - * Two-phased constructor. Leaves on failure, places instance - * on cleanup stack. - * @param aDb a reference to a CCommsDataBase object. - * @return The constructed CApUtils. - * - * @deprecated - */ - IMPORT_C static CApUtils* NewLC( CCommsDatabase& aDb ); - - - /** - * Destructor. - * - * @deprecated - */ - IMPORT_C virtual ~CApUtils(); - - -protected: // Constructors - /** - * C++ default constructor. - * - * @deprecated - */ - IMPORT_C CApUtils(); - - /** - * Second-phase constructor. - * - * @deprecated - */ - IMPORT_C void ConstructL( CCommsDatabase& aDb ); - - - - - public: // New functions - - /** - * Indicates whether a given access point is in use or not. - * If access point does not exists, return value is TRUE - * @param aUid The UID of the access point. - * @return Boolean indicating if it is in use (if used, TRUE) - * - * @deprecated - */ - IMPORT_C TBool IsAPInUseL( TUint32 aUid ); - - - /** - * Indicates the WAP bearer type of a given access point. - * Passed descriptor MUST be large enough to hold the new data, - * otherwise leaves with KErrDescOverflow. - * The maximum length is the maximum length of a 'normal' text fields - * length in Comms DB, KCommsDbSvrMaxFieldLength, - * which is defined in cdblen.h. - * @param aUid The UID of the access point. - * @param aBearer A reference to a TBearer to hold the bearer - * type of the access point. - * @return no return value. - * - * @deprecated - */ - IMPORT_C void WapBearerTypeL( TUint32 aUid, TDes& aBearer ); - - - /** - * Gets the bearer type of a given access point. Leaves on error. - * @param aUid The UID of the access point. - * @return The type of the bearer. - * - * @deprecated - */ - IMPORT_C TApBearerType BearerTypeL( TUint32 aUid ); - - - - /** - * Indicates the ISP type of a given access point. - * @param aUid The UID of the access point. - * @param aIspType A reference to a TCommsDbIspType to hold the value - * @return No return value. - * - * @deprecated - */ - IMPORT_C void ISPTypeL( TUint32 aUid, TCommsDbIspType& aIspType ); - - /** - * Indicates whether a given name is valid or not. - * @param aNameText The name to check. - * @return Boolean indicating if it is valid or not. - * - * @deprecated - */ - IMPORT_C TBool IsValidNameL( const TDesC& aNameText ); - - - /** - * TBool CApUtils::MakeValidNameL(TDes& aNameText); - * Creates a valid name based on the given one. - * @param aNameText The name to use for creating a valid name. - * The new name is returned in it, too. - * @return Whether the name was changed or not - * - * @deprecated - */ - IMPORT_C TBool MakeValidNameL( TDes& aNameText ); - - - /** - * Reads the Name of a given access point - * @param aUid The UID of the access point. - * @param A reference to hold the name of the access point. - * @return no return value. - * Passed descriptor MUST be large enough to hold the new data, - * otherwise leaves with KErrDescOverflow. - * - * @deprecated - */ - IMPORT_C void NameL( TUint32 aUid, TDes& aName ); - - - /** - * Sets the Name of a given access point - * Name is validated and modified if needed. - * Passed aName buffer MUST be large enough to hold the modified name. - * @param aName A reference to the name of the access point. - * The given name is returned in it. - * @param aUid The UID of the access point. - * @return no return value. - * - * @deprecated - */ - IMPORT_C void SetNameL( TDes& aName, TUint32 aUid ); - - - /** - * Sets the ISP type for a given access point - * @param aUid The UID of the access point - * @param aIspType The desired Isp type of the access point - * @return no return value. - * - * @deprecated - */ - IMPORT_C void SetISPTypeL( TUint32 aUid, TCommsDbIspType aIspType ); - - - /** - * Gets the Iap record ID for a given access point ID - * @param aUid The UID of the access point - * @return The Iap record ID. - * - * @deprecated - */ - IMPORT_C TUint32 IapIdFromWapIdL( TUint32 aUid ); - - - /** - * Gets the Wap record ID for a given Iap record ID - * @param aUid The UID of the Iap - * @return The Wap access point ID. - * - * @deprecated - */ - IMPORT_C TUint32 WapIdFromIapIdL( TUint32 aUid ); - - - - /** - * Returns whether the access point has the WAP-mandatory - * fields filled or not. - * Starts a transaction which is 'internal' to ApEngine if - * client not started one. - * @param aUid The UID of the access point - * @return TBool Are the WAP-mandatory fields filled in the access point? - * - * @deprecated - */ - IMPORT_C TBool HasMandatoryFieldsFilledL( TUint32 aUid ); - - /** - * Returns in a TBool whether the internet access point part - * identified by the passed aUid exists or not. - * param aUid the internet access point ID to check for - * (NOT equals to Wap access point ID). - * return TBool indicating whether an internet access point - * with the given ID exists or not. - * - * @deprecated - */ - IMPORT_C TBool IAPExistsL( TUint32 aUid ); - - /** - * Returns in a TBool whether the access point identified - * by the passed aUid exists or not. - * @param aUid the access point ID to check for.(Wap access point ID). - * @return TBool indicating whether an access point with the - * given ID exists or not. - * - * @deprecated - */ - IMPORT_C TBool WapApExistsL( TUint32 aUid ); - - /** - * Returns whether the access point has the WAP-mandatory - * fields filled or not. - * @param aUid The UID of the access point - * @return TBool Are the WAP-mandatory fields filled in the access point? - * - * @deprecated - */ - IMPORT_C TBool DoHasMandatoryFieldsFilledL( - TUint32 aUid, - CCommsDbTableView* aWapt = NULL, - TApBearerType aBearertype = EApBearerTypeAllBearers ); - - - /** - * Indicates whether a given name is valid or not. - * The name is valid if none, or only the aAcceptUid AP has it. - * @param aNameText The name to check. - * @param aAcceptUid A UID to accept with this name - * @return Boolean indicating if it is valid or not. - * - * @deprecated - */ - IMPORT_C TBool IsValidNameL( const TDesC& aNameText, - TUint32 aAcceptUid ); - - - /** - * Determines whether a given AP is read-only or not. - * @param aUid A UID to look for - * @return Boolean indicating if it is read-only or not. - * - * @deprecated - */ - IMPORT_C TBool IsReadOnlyL( TUint32 aUid ); - - - - /** - * Determines whether a given LAN_SERVICE commsdb id - * is linked to a WLAN data (thus is it a WLAN) or not. - * @param aUid A UID to look for - * @return Boolean indicating if it is WLAN or not. - */ - TBool IsWlanL( TUint32 aLanCommdbId ); - - - - - /** - * Determines whether a given LAN_SERVICE commsdb id - * which is linked to a WLAN data (thus is it a WLAN) - * has a valid SSID or it is empty - * @param aUid A UID to look for - * @return Boolean indicating if it has WLAN SSID or not. - */ - TBool HasWlanSSIDL( TUint32 aLanCommdbId ); - - protected: - - - /** - * Indicates the WAP bearer type of a given access point. - * Passed descriptor MUST be large enough to hold the new data, - * otherwise leaves with KErrDescOverflow. - * The maximum length is the maximum length of a 'normal' text fields - * length in Comms DB, KCommsDbSvrMaxFieldLength, - * which is defined in cdblen.h. - * @param aUid The UID of the access point. - * @param aBearer A reference to a TBearer to hold the bearer - * type of the access point. - * @return no return value. - */ - void DoWapBearerTypeL( TUint32 aUid, TDes& aBearer ); - - - /** - * Gets the bearer type of a given access point. Leaves on error. - * @param aUid The UID of the access point. - * @return The type of the bearer. - */ - TApBearerType DoBearerTypeL( TUint32 aUid ); - - - /** - * Indicates the ISP type of a given access point. - * @param aUid The UID of the access point. - * @param aIspType A reference to a TCommsDbIspType to hold the value - * @return No return value. - */ - void DoISPTypeL( TUint32 aUid, TCommsDbIspType& aIspType ); - - - /** - * Reads the Name of a given access point - * @param aUid The UID of the access point. - * @param A reference to hold the name of the access point. - * @return no return value. - * Passed descriptor MUST be large enough to hold the new data, - * otherwise leaves with KErrDescOverflow. - */ - void DoNameL( TUint32 aUid, TDes& aName ); - - - /** - * Sets the Name of a given access point - * Name is validated and modified if needed. - * Passed aName buffer MUST be large enough to hold the modified name. - * @param aName A reference to the name of the access point. - * The given name is returned in it. - * @param aUid The UID of the access point. - * @return no return value. - */ - void DoSetNameL( TDes& aName, TUint32 aUid ); - - - /** - * Sets the ISP type for a given access point - * @param aUid The UID of the access point - * @param aIspType The desired Isp type of the access point - * @return no return value. - */ - void DoSetISPTypeL( TUint32 aUid, TCommsDbIspType aIspType ); - - - /** - * Returns in a TBool whether the record - * identified by the passed aUid exists or not - * in the table identified by the passed table name. - * @param aTable The name of the table to check - * @param aUid The UID to check for - * @return TBool indicating whether the record - * with the given ID exists in the given table or not. - */ - TBool DoesExistsL( TPtrC aTable, TUint32 aUid ); - - - /** - * Wrapper for public API. - * Determines whether a given LAN_SERVICE commsdb id - * is linked to a WLAN data (thus is it a WLAN) or not. - * @param aUid A UID to look for - * @return Boolean indicating if it is WLAN or not. - */ - TBool DoIsWlanL( TUint32 aLanCommdbId ); - - - private: // Data - CCommsDatabase* iDb; - // TCommDbDatabaseType iDbType; // deprecated and not used but kept - // to maintain class size for BC - // Added a new iExt for expansion instead of TCommDbDatabaseType - // same size, no BC problem... - TUtilsExtra* iExt; - - - }; - -#endif // APUTILS_H - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c ipcm_pub/access_point_engine_api/inc/ActiveApDb.h --- a/ipcm_pub/access_point_engine_api/inc/ActiveApDb.h Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,194 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of classes CActiveApDb -* and MActiveApDbObserver. -* -*/ - - -#ifndef ACTIVE_APDB_H -#define ACTIVE_APDB_H - -// Deprecation warning -#warning This header file has been deprecated and will be fully removed between weeks 12 and 18 of 2010. See Polonium CR #153 for details. - -// INCLUDES -#include -#include - -/* -// Enum for DATABASE_TYPE field -// Will be deprecated in 7.0 -enum TCommDbDatabaseType - { - EUnspecified = 0, // not specifying which type it is - any type of - // database can be opened with this parameter - EIAP, - EISP - }; -*/ - -// CONSTANTS -const TInt KErrActiveApDbObserverNotFound = -500; - -// FORWARD DECLARATION -class CActiveApDbNotifier; - -// CLASS DECLARATION - -/** -* Mixin protocol for handling events from a CCommsDatabase. -* Events are related to database changes and availability. -*/ -class MActiveApDbObserver - { - public: // types - enum TEvent /// Events reported to the database observer. - { - EDbChanged, ///< Database has changed. - EDbClosing, ///< Database is about to close. - EDbAvailable ///< Database is available again.(E.g. after unlock) - }; - - public: // new methods - - /** - * Derived classes should implement this method, and act accordingly - * to database events. - * @param anEvent Database-related event. - * - * @deprecated - */ - IMPORT_C virtual void HandleApDbEventL( TEvent anEvent ) = 0; - - }; - -/** -* This class manages and guards database integrity -* by handling all events that are related to the database. These events -* may originate from the system (Shutdown, Backup/Restore) and from the -* database itself. The events are transformed into a simple protocol, -* defined by MActiveApDbObserver. -* Expects an active scheduler to be installed and running. -*/ -NONSHARABLE_CLASS( CActiveApDb ) : public CBase - { - - public: // Constructors and destructor - /** - * Two-phased constructor. Leaves on failure. - * @param aType The desired type of the CCommsDatabase object. - * Defaults to EDatabaseTypeIAP. - * @return The constructed CActiveApDb object. - * - * @deprecated - */ - IMPORT_C static CActiveApDb* NewL - ( TCommDbDatabaseType aType = EDatabaseTypeIAP ); - - - - /** - * Destructor. - * - * @deprecated - */ - IMPORT_C virtual ~CActiveApDb(); - - protected: // Constructors - - /** - * Second phase constructor. Leaves on failure. - * @param aType The desired type of the CCommsDatabase object. - * events. - */ - void ConstructL(); - - public: // new methods - /** - * Adds an observer to the list of observers to be notified - * about the DB events. - * Also automatically starts observation and notification. - * The order of notification will be exactly the order of registration. - * @param anObserver Observer to be notified about database-related - * events. - * - * @deprecated - */ - IMPORT_C void AddObserverL( MActiveApDbObserver* anObserver ); - - - /** - * Removes an observer. If not added, silently ignores. - * @param anObserver The observer. - * - * @deprecated - */ - IMPORT_C void RemoveObserver( MActiveApDbObserver* anObserver ); - - - /** - * Returns the CCommsDatabase. - * Required because we can not derive from CCommsDatabase... - * - * @deprecated - */ - IMPORT_C CCommsDatabase* Database(); - - private: - /** - * Handle events from the database (DBMS). - * The order of notification is the order of registration. - * @param anEvent Event generated by DBMS. Values from - * RDbNotifier::TEvent, or KErrCancel. - */ - void HandleDbEventL( TInt anEvent ); - - - /** - * Notify all observers about an event. - * @param anEvent Event to be sent to observers. - */ - void NotifyObserversL( MActiveApDbObserver::TEvent anEvent ); - - friend class CActiveApDbNotifier; - - private: // types - /** - * Default constructor. Can not leave. - */ - CActiveApDb(); - - - enum TState /// State of the finite state machine. - { - EClosed, ///< Closed and idle. - EReady, ///< Open and ready for use. - EWaitClose, ///< Closed, waiting for other users to close. - EWaitBackupRestore, ///< Closed, waiting Backup/Restore to finish. - EWaitShutdown ///< Closed, waiting to die. - }; - - private: // Data - CArrayPtrFlat* iObservers; ///< Observers. - - CCommsDatabase* iDb; // Creates & owns it ! - // CommsDb has its own RDbNotifier... - TState iState; ///< Current state of the database. - CActiveApDbNotifier* iDbNotifier; - }; - -#endif - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c ipcm_pub/access_point_engine_api/inc/ApEngineConsts.h --- a/ipcm_pub/access_point_engine_api/inc/ApEngineConsts.h Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,279 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Used constants of the ApEngine. -* -*/ - - -#ifndef APENGINE_CONSTS_H -#define APENGINE_CONSTS_H - -// Deprecation warning -#warning This header file has been deprecated and will be fully removed between weeks 12 and 18 of 2010. See Polonium CR #153 for details. - - -#include - - -// ERROR CODES -// Used either as return values or leave codes. Apart from these, system error -// codes can also be returned or leaved with. - -/// Attempting to read or write a column which does not exists. -const TInt KErrInvalidColumn = -300; - -/// The given bearer is not valid. -const TInt KErrInvalidBearer = -301; - -/// The type of the database is not valid -const TInt KErrInvalidDatabaseType = -302; - -/// The name of the AP is not valid (length = 0) -const TInt KErrInvalidName = -303; - -const TInt KErrDescOverflow = -304; - -/// The passed pointer was invalid = NULL -const TInt KErrNullPointerPassed = -305; - -/// The filter is not valid -const TInt KErrInvalidFilterType = -310; - -/// The bearer is not valid -const TInt KErrInvalidBearerType = -311; - -/// The ISP type given is invalid -const TInt KErrInvalidIspRequest = -312; - -/// Used when the requested value was not specified in the database -const TInt KErrValueUnspecified = -323; - -const TInt KApEngineMaxSql = 255; - - - -/// These constants are used to represent the sorting order used in CApSelect. -const TInt KEApSortUidAscending = 0x00000001; ///< The sorting is - ///< done according to - ///< the ID of the - ///< access points in - ///< ascending order. -const TInt KEApSortUidDescending = 0x00000002; ///< The sorting is - ///< done according to - ///< the ID of the - ///< access points in - ///< descending order. -const TInt KEApSortNameAscending = 0x00000003; ///< The sorting is - ///< done according to - ///< the name of the - ///< access points in - ///< ascending order. -const TInt KEApSortNameDescending = 0x00000004; ///< The sorting is - ///< done according to - ///< the name of the - ///< access points in - ///< descending order. - - -/// These enums are used to represent one the filtering criterias in CApSelect. -const TInt KEApIspTypeInternetOnly = 0x00000001; ///< Filter allows only - ///< access points that - ///< are capable of - ///< only internet - ///< access. -const TInt KEApIspTypeWAPOnly = 0x00000002; ///< Filter allows only - ///< access points that - ///< are capable of - ///< only WAP access. -const TInt KEApIspTypeInternetAndWAP = 0x00000004; ///< Filter allows only - ///< access points that - ///< are capable of - ///< internet AND - ///< WAP access. -const TInt KEApIspTypeWAPMandatory = 0x00000008; ///< Filter allows only - ///< access points that - ///< are capable of - ///< WAP access AND - ///< contain mandatory - ///< WAP settings. -const TInt KEApIspTypeAll = 0x00000010; ///< No filtering is - ///< done, all access - ///< points are shown. -const TInt KEApIspTypeMMSMandatory = 0x00000020; ///< Filter allows only - ///< access points that - ///< are capable of MMS - ///< and contain MMS - ///< mandatory settings - ///< Starting Page - - - - -const TInt KModifiableTextLength = 100; -const TInt KModifiableLongTextLength = 1000; - - -// typedef -enum TApBearerType /// These enums are used to represent the possible - /// bearer types and the filtering criteria - /// in CApSelect. - { - EApBearerTypeCSD = 0x00000001, ///< Filter allows only access - ///< points that has CSD as bearer. - EApBearerTypeGPRS = 0x00000002, ///< Filter allows only access - ///< points that has GPRS as bearer - EApBearerTypeHSCSD = 0x00000004, ///< Filter allows only access - ///< points that has HSCSD - ///< as bearer. - -// Will be deprecated, use EApBearerTypeAllBearers instead ! - EApBearerTypeAll = 0x00000008, ///< No filtering is done, - ///< all access points are shown. - - EApBearerTypeCDMA = 0x00000010, ///< Filter allows only access - ///< points that has CDMA as bearer - EApBearerTypeWLAN = 0x00000020, ///< Filter allows only access - ///< points that has WLAN as bearer - EApBearerTypeLAN = 0x00000040, ///< Filter allows only access - ///< points that has LAN as bearer - EApBearerTypeLANModem = 0x00000080, ///< Filter allows only access - ///< points with LAN modem bearer - EApBearerTypeAllBearers = 0xffffffff ///< No filtering is done, - ///< all access points are shown. - }; - - -enum TApCallSpeed /// These enums are used to represent - /// the connection speed. - { - KSpeedAutobaud=0x00000000, ///< Autodetect - KSpeed9600=0x00000001, ///< 9600 - KSpeed14400=0x00000002, ///< 14400 - KSpeed19200=0x00000003, ///< 19200 - KSpeed28800=0x00000004, ///< 28800 - KSpeed38400=0x00000005, ///< 38400 - KSpeed43200=0x00000006, ///< 43200 - KSpeed56000=0x00000007 ///< 56000 - }; - - -enum TApCallType /// These enums are used to represent - /// the conn. type Analogue/ISDNv110/ISDNv120 - { - ECallTypeAnalogue, ///< Analogue - ECallTypeISDNv110, ///< ISDN v. 110 - ECallTypeISDNv120 ///< ISDN v. 120 - }; - -const TUint32 KMaxAnalogueSpeed = KSpeed28800; -const TUint32 KMaxIsdnSpeed = KSpeed43200; - -//if WCDMA is enabled, then the max speed are : -const TUint32 KMaxAnalogueSpeedWcdma = KSpeed28800; -const TUint32 KMaxIsdnSpeedWdma = KSpeed56000; - - -enum TIPvType - { - EIPv4 = 1, - EIPv6 = 2 - }; - - -enum TWlanNetMode - { - EAdhoc = 0, - EInfra = 1 - }; - - -enum TWlanSecMode - { - EOpen = 1, - EWep = 2, - E802_1x = 4, - EWpa = 8, - EWpa2 = 16 - }; - - -#define KApMaxConnNameLength 30 - -// The following constants are deprecated, DO NOT USE THEM! -// DO NOT USE STARTS -#define KApMaxGprsApNameLength 100 -#define KApMaxLoginNameLength 32 -#define KApMaxStartPageLength 1000 -#define KApMaxAccessNumLength 21 -#define KApCBInfoLength 21 -#define KApMaxServiceCentreAddrLength 21 -#define KApMaxIpAddressLength 100 -#define KApMaxLoginScriptLength 1000 -#define KApMaxLoginPasswordLength 20 -// DO NOT USE ENDS - - -_LIT( KSqlSelectNum, "SELECT %s from %s WHERE %s=%d" ); -_LIT( KSqlSelectBaseNum, "SELECT * from %s WHERE %s=%d" ); - -/// 'Dynamic' IP address to use in comparisons -_LIT( KDynIpAddress, "0.0.0.0" ); - -/// A start page, which have to be considered as invalid. -_LIT( KInvStartPage, "http://" ); - -/// A name for the 'location' to use -_LIT( KLocation, "Mobile" ); - - -/// Modem bearer names for (HS)CSD Access Points -_LIT( KModemBearerCSD, "CSD Modem" ); - -/// Modem bearer names for GPRS/WCDMA Access Points -_LIT( KModemBearerGPRS, "GPRS Modem" ); - -/// Modem bearer names for CDMA Access Points -_LIT( KModemBearerCDMA, "CDMA Modem" ); - -/// Modem bearer names for WLAN Access Points -_LIT( KModemBearerWLAN, "WLANBearer" ); - -/// Modem bearer names for LAN Access Points -_LIT( KModemBearerLAN, "LANBearer" ); - -/// Modem bearer names for LAN Modem Access Points -_LIT( KModemBearerLANModem, "LANModem" ); - - -/// Number of retries that are used in database operations -const TInt KRetryCount = 5; - - -/// Time to wait before retry database operation -// (==0.10 secs = 100000microsec.) -#define KRetryWait 100000 /* in TTimeIntervalMicroSeconds32 */ - -// callback timeout in microseconds -const TUint32 KCallBackTimeOut = 60000000; - -_LIT( KDynIpv6Address, "0:0:0:0:0:0:0:0" ); - - -_LIT( KDaemonManagerName, "NetCfgExtnDhcp" ); -_LIT( KConfigDaemonName, "!DhcpServ" ); - - -#endif - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c ipcm_pub/access_point_engine_api/inc/ApEngineVer.h --- a/ipcm_pub/access_point_engine_api/inc/ApEngineVer.h Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Defines used for version/behavioural control for the ApEngine. -* -*/ - - -#ifndef APENGINE_VER_H -#define APENGINE_VER_H - -// Deprecation warning -#warning This header file has been deprecated and will be fully removed between weeks 12 and 18 of 2010. See Polonium CR #153 for details. - -// #define __PROXY_SETTINGS - -#endif - -// End of File - diff -r 2709c04a4af5 -r 8b0c979bbe8c ipcm_pub/access_point_engine_api/inc/ApListItem.h --- a/ipcm_pub/access_point_engine_api/inc/ApListItem.h Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,318 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Declaration of the CApSelect class. -* -*/ - - -#ifndef CAPLISTITEM_H -#define CAPLISTITEM_H - -// Deprecation warning -#warning This header file has been deprecated and will be fully removed between weeks 12 and 18 of 2010. See Polonium CR #153 for details. - - -// INCLUDES -#include -#include -#include - - -typedef struct - { - TBool iReadOnly; ///< Is the AP protected or not - TUint32 iIapId; ///< The IAP UID of the item - TBool iIsVpn; ///< Is it a VPN or not? - }TApListItemExtra; - - -// CLASS DECLARATION -/** -* Representation of a list item. -*/ -class CApListItem :public CBase - ///< This class is used to hold - ///< the main information of an - ///< access point. - ///< It is used in CApSelect. - { - public: // Constructors and destructor - - /** - * Two-phased constructor. Leaves on failure, places instance - * on cleanup stack. - * @return The constructed CApListItem. - * - * @deprecated - */ - IMPORT_C static CApListItem* NewLC(); - - - /** - * NOTE: This function is deprecated, use the one with the additional - * aStartPage parameter below. - * Two-phased constructor. Leaves on failure, places instance - * on cleanup stack. - * @param aIspType The type of the access point - * (Internet only, Wap only, Internet AND Wap) - * @param aUid The ID of the access point - * @param aName The name of the access point - * @param aBearerType The bearer type of the access point - * @return The constructed CApListItem. - * - * @deprecated - */ - IMPORT_C static CApListItem* NewLC( TCommsDbIspType aIspType, - TUint32 aUid, - const TDesC& aName, - TApBearerType aBearerType ); - - - /** - * Two-phased constructor. Leaves on failure, places instance - * on cleanup stack. - * @param aIspType The type of the access point - * (Internet only, Wap only, Internet AND Wap) - * @param aUid The ID of the access point - * @param aName The name of the access point - * @param aBearerType The bearer type of the access point - * @param aStartpage The starting page of the access point - * @param aReadOnly Whether the given item is read-only or not - * @return The constructed CApListItem. - * - * @deprecated - */ - IMPORT_C static CApListItem* NewLC( TCommsDbIspType aIspType, - TUint32 aUid, - const TDesC& aName, - TApBearerType aBearerType, - const TDesC& aStartPage, - TBool aReadOnly = ETrue - ); - - /** - * Two-phased constructor. Leaves on failure, places instance - * on cleanup stack. - * @param aItem a pointer to a CApListItem. - * @return The constructed CApListItem. - * - * @deprecated - */ - IMPORT_C static CApListItem* NewLC( CApListItem* aItem ); - - - /** - * Destructor. - * - * @deprecated - */ - IMPORT_C virtual ~CApListItem(); - - - /** - * Copies the data from another CApListItem - * Substitutes the "Assignment operator." - * @return No return value. - * - * @deprecated - */ - IMPORT_C void CopyFromL( const CApListItem& aCopyFrom ); - - - - protected: // Constructors - /** - * C++ default constructor. - * - * @deprecated - */ - IMPORT_C CApListItem(); - - /** - * NOTE: This function is deprecated, use the one with the additional - * aStartPage parameter below. - * Second-phase constructor. - * @param aIspType The type of the access point - * (Internet only, Wap only, Internet AND Wap) - * @param aUid The ID of the access point - * @param aName The name of the access point - * @param aBearerType The bearer type of the access point - * - * @deprecated - */ - IMPORT_C void ConstructL( TCommsDbIspType aIspType, - TUint32 aUid, - const TDesC& aName, - TApBearerType aBearerType ); - - /** - * Second-phase constructor. - * @param aIspType The type of the access point - * (Internet only, Wap only, Internet AND Wap) - * @param aUid The ID of the access point - * @param aName The name of the access point - * @param aBearerType The bearer type of the access point - * @param aStartpage The starting page of the access point - * - * @deprecated - */ - IMPORT_C void ConstructL( TCommsDbIspType aIspType, - TUint32 aUid, - const TDesC& aName, - TApBearerType aBearerType, - const TDesC& aStartPage - ); - - - /** - * Second-phase constructor. - * - * @deprecated - */ - IMPORT_C void ConstructL(); - - - public: // New functions - - /** - * NOTE: This function is deprecated, use the one with the additional - * aStartPage parameter below. - * Sets item values of the access point. Leaves on failure. - * @param aIspType The type of the access point - * (Internet only, Wap only, Internet AND Wap) - * @param aUid The ID of the access point - * @param aName The name of the access point - * @param aBearerType The bearer type of the access point - * - * @deprecated - */ - IMPORT_C void SetItemL( TCommsDbIspType aIspType, - TUint32 aUid, - const TDesC& aName, - TApBearerType aBearerType ); - - /** - * Sets item values of the access point. Leaves on failure. - * @param aIspType The type of the access point - * (Internet only, Wap only, Internet AND Wap) - * @param aUid The ID of the access point - * @param aName The name of the access point - * @param aBearerType The bearer type of the access point - * @param aStartpage The starting page of the access point - * - * @deprecated - */ - IMPORT_C void SetItemL( TCommsDbIspType aIspType, - TUint32 aUid, - const TDesC& aName, - TApBearerType aBearerType, - const TDesC& aStartpage - ); - - - /** - * Gets the name of the 'current' access point - * Ownership of the returned text is not passed. - * @return The name of the current access point - * - * @deprecated - */ - IMPORT_C const TDesC& Name(); - - - /** - * Gets the UID of the current access point - * @return The UID of the current access point - * - * @deprecated - */ - IMPORT_C TUint32 Uid(); - - - /** - * Gets the ISP-type of the current access point - * @return The ISP-type of the current access point. - * - * @deprecated - */ - IMPORT_C TCommsDbIspType Type(); - - - /** - * Gets the bearer-type of the current access point - * @return The bearer-type of the current access point. - * - * @deprecated - */ - IMPORT_C TApBearerType BearerType(); - - - /** - * Returns the startpage of the current access point if any, - * otherwise, an empty string is returned. - * Ownership of the returned text is not passed. - * @return The startpage of the current access point. - * - * @deprecated - */ - IMPORT_C const TDesC& StartPage() const; - - - /** - * Returns whether the access point is read-only or not. - * @return Whether the access point is read-only or not. - * - * @deprecated - */ - IMPORT_C TBool IsReadOnly() const; - - - /** - * Returnes whether the given access point is a VPN ap or not. - * @return whether the given access point is a VPN ap or not. - */ - TBool IsVpnAp() const; - - /** - * Sets whether the given access point is a VPN ap or not. - */ - void SetVpnFlag( TBool aIsVpn ); - - protected: - void CreateExtraL(); ///< Construct the extra data - - private: // Data - TCommsDbIspType iIspType; ///< The type of the access point - ///< (Internet only, Wap only, - ///< Internet AND Wap) - TUint32 iUid; ///< The ID of the access point - HBufC* iName; ///< The name of the access point - HBufC* iStartPage; ///< The startpage of the access point - - TApBearerType iBearerType; ///< Bearer type of the access point - TApListItemExtra* iExt; ///< Extra data structure - - - protected: // Friend classes - friend class CApSelect; - friend class TApListItemUidKey; - - }; - - - -#endif // CAPLISTITEM_H - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c ipcm_pub/access_point_engine_api/inc/ApNetworkItem.h --- a/ipcm_pub/access_point_engine_api/inc/ApNetworkItem.h Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,162 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Declaration of the CApNetworkItem class. -* -*/ - - -#ifndef CAPNETWORKITEM_H -#define CAPNETWORKITEM_H - -// Deprecation warning -#warning This header file has been deprecated and will be fully removed between weeks 12 and 18 of 2010. See Polonium CR #153 for details. - - -// INCLUDES -#include -#include -#include - -// CLASS DECLARATION -/** -* Representation of a Network item. -*/ -NONSHARABLE_CLASS( CApNetworkItem ) :public CBase - ///< This class is used to hold - ///< the main information of a - ///< Network item. - ///< It is used in CApNetworks. - { - public: // Constructors and destructor - - /** - * Two-phased constructor. Leaves on failure, places instance - * on cleanup stack. - * @return The constructed CApNetworkItem. - * - * @deprecated - */ - IMPORT_C static CApNetworkItem* NewLC(); - - - /** - * Two-phased constructor. Leaves on failure, places instance - * on cleanup stack. - * @param aItem a pointer to a CApNetworkItem. - * @return The constructed CApNetworkItem. - * - * @deprecated - */ - IMPORT_C static CApNetworkItem* NewLC( CApNetworkItem* aItem ); - - - /** - * Destructor. - * - * @deprecated - */ - IMPORT_C virtual ~CApNetworkItem(); - - - /** - * Copies the data from another CApNetworkItem - * Substitutes the "Assignment operator." - * @return No return value. - * - * @deprecated - */ - IMPORT_C void CopyFromL( const CApNetworkItem& aCopyFrom ); - - - private: // Constructors - /** - * C++ default constructor. - * - * @deprecated - */ - IMPORT_C CApNetworkItem(); - - - /** - * Second-phase constructor. - * @param aUid The UID - * @param aName The name - * - * @deprecated - */ - IMPORT_C void ConstructL( TUint32 aUid, - const TDesC& aName - ); - - - /** - * Second-phase constructor. - * - * @deprecated - */ - IMPORT_C void ConstructL(); - - - public: // New functions - - /** - * Gets the name of the network group - * Ownership of the returned text is not passed. - * @return The name of the network group - * - * @deprecated - */ - IMPORT_C const TDesC& Name() const; - - - /** - * Gets the UID of this network group - * @return The UID of this network group - * - * @deprecated - */ - IMPORT_C TUint32 Uid() const; - - - - /** - * Sets a UID of the network group. - * @param aUid a uid to set. - * - * @deprecated - */ - IMPORT_C void SetUid( TUint32 aUid ); - - - /** - * Sets the network name - * @param aName The name to set. - * - * @deprecated - */ - IMPORT_C void SetNameL( const TDesC& aName ); - - - private: // Data - TUint32 iUid; ///< The ID of the network group - HBufC* iName; ///< The name of the network group - - }; - - - -#endif // CAPNETWORKITEM_H - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c ipcm_pub/access_point_engine_api/inc/ApNetworkItemlist.h --- a/ipcm_pub/access_point_engine_api/inc/ApNetworkItemlist.h Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,74 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of the CApNetworkItemList class. -* -*/ - - -#ifndef CAPNETWORKITEMLIST_H -#define CAPNETWORKITEMLIST_H - -// Deprecation warning -#warning This header file has been deprecated and will be fully removed between weeks 12 and 18 of 2010. See Polonium CR #153 for details. - - -// INCLUDES -#include -#include - -// FORWARD DECLARATION - -class CApNetworkItem; - -// CLASS DECLARATION -/** -* A list of CApNetworkItem-s pointers; items are owned. -*/ -class CApNetworkItemList : public CArrayPtrFlat - { - public: // Constructors and destructor - - /** - * C++ default constructor. - * - * @deprecated - */ - IMPORT_C CApNetworkItemList(); - - /** - * Destructor. Items in the list are destroyed. - * - * @deprecated - */ - IMPORT_C virtual ~CApNetworkItemList(); - - public: // New methods - - /** - * Get pointer to the item having aUid, - * or NULL if no such item is in the - * list. - * @param aUid Uid of item to get. - * @return Pointer to the item having uid aUid, or NULL. Ownership - * not passed (the list still owns the item). - * - * @deprecated - */ - IMPORT_C const CApNetworkItem* ItemForUid( TUint32 aUid ) const; - - }; - -#endif // CAPNETWORKITEMLIST_H - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c ipcm_pub/access_point_engine_api/inc/Aplistitemlist.h --- a/ipcm_pub/access_point_engine_api/inc/Aplistitemlist.h Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,74 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of the CApListItemList class. -* -*/ - - -#ifndef CAPLISTITEMLIST_H -#define CAPLISTITEMLIST_H - -// Deprecation warning -#warning This header file has been deprecated and will be fully removed between weeks 12 and 18 of 2010. See Polonium CR #153 for details. - - -// INCLUDES -#include -#include - -// FORWARD DECLARATION - -class CApListItem; - -// CLASS DECLARATION -/** -* A list of CApListItem-s pointers; items are owned. -*/ -class CApListItemList : public CArrayPtrFlat - { - public: // Constructors and destructor - - /** - * C++ default constructor. - * - * @deprecated - */ - IMPORT_C CApListItemList(); - - /** - * Destructor. Items in the list are destroyed. - * - * @deprecated - */ - IMPORT_C virtual ~CApListItemList(); - - public: // New methods - - /** - * Get pointer to the item having aUid, - * or NULL if no such item is in the - * list. - * @param aUid Uid of item to get. - * @return Pointer to the item having uid aUid, or NULL. Ownership - * not passed (the list still owns the item). - * - * @deprecated - */ - IMPORT_C CApListItem* ItemForUid( TUint32 aUid ) const; - - }; - -#endif - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c ipcm_pub/access_point_settings_handler_api/access_point_settings_handler_api.metaxml --- a/ipcm_pub/access_point_settings_handler_api/access_point_settings_handler_api.metaxml Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ - - - Access Point Settings Handler API - Provides applications with the possibility to include Access Point choice. - c++ - networkingutilities - - - - - - - - - yes - no - - diff -r 2709c04a4af5 -r 8b0c979bbe8c ipcm_pub/access_point_settings_handler_api/group/bld.inf --- a/ipcm_pub/access_point_settings_handler_api/group/bld.inf Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: File that exports the files belonging to -: Access Point Settings Handler API -* -*/ - - -#include - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -../inc/ApSettingsHandlerCommons.h MW_LAYER_PUBLIC_EXPORT_PATH(ApSettingsHandlerCommons.h) -../inc/Apsettingshandlerui.h MW_LAYER_PUBLIC_EXPORT_PATH(ApSettingsHandlerUI.h) diff -r 2709c04a4af5 -r 8b0c979bbe8c ipcm_pub/access_point_settings_handler_api/inc/ApSettingsHandlerCommons.h --- a/ipcm_pub/access_point_settings_handler_api/inc/ApSettingsHandlerCommons.h Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,179 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Contains common consts, typedefs for the Access Point settings. -* -*/ - - -#ifndef APSETTINGS_HANDLER_COMMONS_H -#define APSETTINGS_HANDLER_COMMONS_H - -// Deprecation warning -#warning This header file has been deprecated and will be fully removed between weeks 12 and 18 of 2010. See Polonium CR #153 for details. - - -// INCLUDES -#include - - -//#define __TEST_OOMDEBUG - - -// CONSTANTS -_LIT( KEmpty, ""); - -_LIT( KTestFileName, "C:\\Data\\ApSetUiTest\\TestState.txt" ); - -const TInt KApSelectionCanceled = -350; -const TInt KTxtNotOverriden = -351; -const TInt KErrInvalidTextId = -355; - -#ifdef __TEST_OOMDEBUG - const TInt KDialogListTest = 1; // Done - const TInt KPopupListTest = 2; // Done - const TInt KQueryTest = 3; // Done - const TInt KEditingTest = 4; // Done - const TInt KViewerTest = 5; // impl. - const TInt KCreateBlankTest = 6; // Impl - const TInt KCreateUseExistTest = 7; // Impl - const TInt KDeleteTest = 8; // N/I! - - const TUint32 KOOMRetryCount = 10; - const TUint32 KOOMRetryOffset = 5; -#endif // __TEST_OOMDEBUG - -// DATA TYPES -enum TTextID /// These enums are used to identify the 'overridable' - /// text items in CApSettingsHandler. - { - EApSettingsSelStatusPaneText = 0x00, - EApSettingsSelListEmptyText, - EPopupPromptText /// Only this last one is used & implemented. - }; - - -enum TTransactionResult ///< Transaction results - { - EOwnTransaction, ///< Own transaction started - EUsingAlreadyStarted, ///< Used already started one - EFailedWithLocked ///< Transaction start failed with KErrLocked - }; - - -enum TApUiExitReason - { - EExitNone, - EExit, - EShutDown - }; - - -// CONSTANTS -const TInt KTTextIdMin = EApSettingsSelStatusPaneText; -const TInt KTTextIdMax = EPopupPromptText; - -const TInt KMaxNumOfLockedDbRetries= 3; - -/// Ui return code flags. They indicate what has happened inside the module. -/// They can be combined. -/** -* Ui return code flags. They indicate what has happened inside the module. -* They can be combined. The most important one is KApUiEventSelected and it -* indicates that the user selected an access point (in case of selection...) -*/ -const TInt KApUiEventNone = 0x00000000; ///< Nothign happend -const TInt KApUiEventSelected = 0x00000001; ///< Item was selected -const TInt KApUiEventCreatedBlank = 0x00000002; ///< New item created - ///< from blank -const TInt KApUiEventCreatedUsedOld = 0x00000004; ///< New item created - ///< from an existing - ///< one -const TInt KApUiEventEdited = 0x00000008; ///< Item edited -const TInt KApUiEventDeleted = 0x00000010; ///< Item deleted -const TInt KApUiEventExitRequested = 0x00000020; ///< User choosed Exit -const TInt KApUiEventShutDownRequested = 0x00000040; ///< System shutdown - -// INTERNAL flag -const TUint32 KApUiEventInternal = 0x80000000; ///< Internal flag - - -const TUint32 KApNoneUID = 0x00000000; - - -enum TSelectionListType ///< Defines the list type to be used - { - EApSettingsSelListIsPopUp, - EApSettingsSelListIsListPane, - EApSettingsSelListIsPopUpWithNone - }; - - -enum TSelectionMenuType ///< Defines the Options menu type to be used - { - EApSettingsSelMenuNormal, - EApSettingsSelMenuSelectOnly, - EApSettingsSelMenuSelectNormal - }; - - - -enum TApSettingsHandlerUiPanicCodes ///< Defines the Panic codes - { - EMenuCommandUnknown, ///< Unknonw menu command - EInvalidDbType, ///< Invalid database type - EInvalidBitmapType, ///< Invalid bitmap type - EInvalidBearerType, ///< Invalid bearer type - EInvalidIspRequest, ///< Invalid ISP request - ENullPointer, ///< Null pointer passed - EUnknownCase, ///< Unknown 'case' - EInvalidTextType, ///< Invalid text type - EInvalidState ///< Invalid state - } ; - - - -/** -* Panic -* @param aPanic Panic code -*/ -void Panic( TApSettingsHandlerUiPanicCodes aPanic ); - - -/** -* Ask a query -* @param aResId Resource id -* @param aVar variable part of the query, if any -* @return The result of the query -*/ -TInt AskQueryL( TInt aResId, TDesC* aVar = NULL ); - - -/** -* Shows a note -* @param aResId Resource id -* @param aVar variable part of the note, if any -* @return The result of the note -*/ -TInt ShowNoteL( TInt aResId, TDesC* aVar = NULL ); - - -#ifdef __TEST_OOMDEBUG - TInt GetTestState(); -#endif // __TEST_OOMDEBUG - -#endif - - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c ipcm_pub/access_point_settings_handler_api/inc/Apsettingshandlerui.h --- a/ipcm_pub/access_point_settings_handler_api/inc/Apsettingshandlerui.h Fri Sep 03 09:38:26 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1365 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Declares the main handler, CApSettingsHandler and public API for the -* Access Point settings. -* -*/ - - -#ifndef APSETTINGS_HANDLER_H -#define APSETTINGS_HANDLER_H - -// Deprecation warning -#warning This header file has been deprecated and will be fully removed between weeks 12 and 18 of 2010. See Polonium CR #153 for details. - - -// INCLUDES -#include -#include -#include - -// CONSTANTS -const TUid KUidApSettingsHandler = { 0x10008d3B }; - -typedef struct ///< Extra data holder - { - TInt iResOffset; - TBool iIsIpv6Supported; // Default is NO - TBool iIsFeatureManagerInitialised; - TInt iExtra; - TInt iSortType; - TVpnFilterType iVpnFilterType; - TInt iVariant; /// Local variant value - TBool iIncludeEasyWlan; - }TApSetHandlerExtra; - -// FORWARD DECLARATIONS -class CActiveApDb; -class CApSelector; -class CApSettingsModel; -class CApSettings; -class CTextOverrides; -class CApAccessPointItem; - -class CApSettingsHandlerImpl; - -// CLASS DECLARATION -/** -* CApSettingsHandler class: It is the main handler for the Access Point -* settings. It contains the only public API for other (sub)systems. -* -*/ -class CApSettingsHandler : public CBase - { - - public: // Constructors and destructor - - - /** - * Two-phased constructor. Leaves on failure. - * This function shall be used to create the access point - * settings/selection handling UI object. It is customizable through - * the parameters. This object is a small layer above the UI part and - * it provides a standard interface to select, edit, create access - * points. It has two main parts, Select and Edit. The first parameter, - * aStartWithSelection gives whether we would like to select or edit. - * In case of selection, there is the possibility to use this module in - * many applications. For this, two layouts are implemented, - * one is list pane used by General Settings which provides the list in - * a list-pane. The other layout is for the other applications - * requiring access point selection, a popup-list style as the decision - * I know about was that General Settings will use list-pane and all - * other apps. popup-list style. It is the caller who selects the style - * so if spec. says otherwise, this module still can be used. - * It is also possible to start the UI without selection, so if any - * module has a 'linked/default/etc.' access point and stored it's UID, - * the module can simply call the editor part of the UI without having - * to select the AP once more. In case of editing only, - * (aStartWithSelection is EFalse), all other construction parameters - * are ignored and after construction caller can simply call - * RunSettingsL(..). In case of selection, a lot of other parameters - * can be specified to fulfil all requirements. There are three types - * of Options menu available: - * EApSettingsSelMenuNormal, - * EApSettingsSelMenuSelectOnly, - * EApSettingsSelMenuSelectNormal. - *
- *-EApSettingsSelMenuSelectOnly: Only Select is visible, - * no way to edit, delete, create, etc. - *
- * -EApSettingsSelMenuNormal: Options menu specified in General - * Settings, contains Edit, Delete, - * Create new, etc. menu items. - *
- * -EApSettingsSelMenuSelectNormal: Same as in EApSettingsSelMenuNormal - * BUT the first item is Select. - * This one makes it possible to select - * an access point and also possible to - * edit, create, delete, etc. - *
- * The following three parameters specify the filtering and ordering - * criteria for the selection list creation. First, it is possible to - * specify which ISP-type we are looking for. The possible values are: - *
- * KEApIspTypeInternetOnly: Filter allows only access points that are - * capable of only internet access. - *
- * KEApIspTypeWAPOnly: Filter allows only access points that are - * capable of only WAP access. - *
- * KEApIspTypeInternetAndWAP: Filter allows only access points that are - * capable of internet AND WAP access. - *
- * KEApIspTypeWAPMandatory: Filter allows only access points that are - * capable of WAP access AND contain - * mandatory WAP settings. - *
- * KEApIspTypeAll: No filtering is done for the isp-type, - * all types of access points are shown. - *
- * It is possible to combine them by simply adding/or-ing together - * the values, filtering will be done in such a way that only access - * points with the listed ISP-types will be shown. Second filtering - * possibility (aBearerFilter) is the desired bearer type. The possible - * values are the values of the TApBearerType enum type and their - * combinations, as in case of the ISP type. The ordering of the list - * can be specified with the aSortType parameter. It can have the - * following values: - * KEApSortUidAscending: The sorting is done according to the ID - * of the access points in ascending order. - * KEApSortUidDescending: The sorting is done according to the ID - * of the access points in descending order. - * KEApSortNameAscending: The sorting is done according to the name - * of the access points in ascending order. - * KEApSortNameDescending: The sorting is done according to the name - * of the access points in descending order. - * Caution! The ordering values can not be combined! - * @param aStartWithSelection A boolean value indicating whether to - * select or edit an ap. - * @param aListType A TSelectionListType enum indicating the - * desired list type. - * @param aSelMenuType A TSelectionMenuType enum indicating the - * desired menu type. - * @param aIspTypeFilter Filtering criteria on ISP type - * @param aBearerFilter Filtering criteria on bearer type - * @param aSortType Specifies the sort order to use. - * @return The constructed CApSettingsHandler object. - * - * @deprecated - */ - IMPORT_C static CApSettingsHandler* NewLC( - TBool aStartWithSelection, - TSelectionListType aListType, - TSelectionMenuType aSelMenuType, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType - ); - - - - /** - * Two-phased constructor. Leaves on failure. - * This function shall be used to create the access point - * settings/selection handling UI object. It is customizable through - * the parameters. This object is a small layer above the UI part and - * it provides a standard interface to select, edit, create - * access points. It has two main parts, Select and Edit. The first - * parameter, aStartWithSelection gives whether we would like to select - * or edit. In case of selection, there is the possibility to use this - * module in many applications. For this, two layouts are implemented, - * one is list pane used by General Settings which provides the list - * in a list-pane. The other layout is for the other applications - * requiring access point selection, a popup-list style as the - * decision I know about was that General Settings will use list-pane - * and all other apps. popup-list style. It is the caller who selects - * the style so if spec. says otherwise, this module still can be used. - * It is also possible to start the UI without selection, so if any - * module has a 'linked/default/etc.' access point and stored it's UID, - * the module can simply call the editor part of the UI without having - * to select the AP once more. - * In case of editing only, (aStartWithSelection is EFalse), all other - * construction parameters are ignored and after construction caller - * can simply call RunSettingsL(..). - * In case of selection, a lot of other parameters can be specified - * to fulfil all requirements. There are three types of Options menu - * available: - * EApSettingsSelMenuNormal, - * EApSettingsSelMenuSelectOnly, - * EApSettingsSelMenuSelectNormal. - *
- *-EApSettingsSelMenuSelectOnly: Only Select is visible, no way to - * edit, delete, create, etc. - *
- * -EApSettingsSelMenuNormal: Options menu specified in General - * Settings, contains Edit, Delete, - * Create new, etc. menu items. - *
- * -EApSettingsSelMenuSelectNormal: Same as in EApSettingsSelMenuNormal - * BUT the first item is Select. - * This one makes it possible to - * select an access point and also - * possible to edit, create, - * delete, etc. - *
- * The following three parameters specify the filtering and ordering - * criteria for the selection list creation. First, it is possible to - * specify which ISP-type we are looking for. The possible values are: - *
- * KEApIspTypeInternetOnly: Filter allows only access points that - * are capable of only internet access. - *
- * KEApIspTypeWAPOnly: Filter allows only access points that - * are capable of only WAP access. - *
- * KEApIspTypeInternetAndWAP: Filter allows only access points that - * are capable of internet AND WAP access. - *
- * KEApIspTypeWAPMandatory: Filter allows only access points that - * are capable of WAP access AND contain - * mandatory WAP settings. - *
- * KEApIspTypeAll: No filtering is done for the isp-type, - * all types of access points are shown. - *
- * It is possible to combine them by simply adding/or-ing together the - * values, filtering will be done in such a way that only access points - * with the listed ISP-types will be shown. - * Second filtering possibility (aBearerFilter) is the desired bearer - * type. The possible values are the values of the TApBearerType enum - * type and their combinations, as in case of the ISP type. - * The ordering of the list can be specified with the aSortType - * parameter. It can have the following values: - * KEApSortUidAscending: The sorting is done according to the ID - * of the access points in ascending order. - * KEApSortUidDescending: The sorting is done according to the ID - * of the access points in descending order. - * KEApSortNameAscending: The sorting is done according to the name - * of the access points in ascending order. - * KEApSortNameDescending: The sorting is done according to the name - * of the access points in descending order. - * Caution! The ordering values can not be combined! - * @param aDb A database to work on - * @param aStartWithSelection A boolean value indicating whether to - * select or edit an ap. - * @param aListType A TSelectionListType enum indicating the desired - * list type. - * @param aSelMenuType A TSelectionMenuType enum indicating the desired - * menu type. - * @param aIspTypeFilter Filtering criteria on ISP type - * @param aBearerFilter Filtering criteria on bearer type - * @param aSortType Specifies the sort order to use. - * @return The constructed CApSettingsHandler object. - * - * @deprecated - */ - IMPORT_C static CApSettingsHandler* NewLC( - CActiveApDb& aDb, - TBool aStartWithSelection, - TSelectionListType aListType, - TSelectionMenuType aSelMenuType, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType - ); - - - - - - - - - /** - * Two-phased constructor. Leaves on failure. - * This function shall be used to create the access point - * settings/selection handling UI object.It is customizable through the - * parameters. This object is a small layer above the UI part and - * it provides a standard interface to select, edit, create access - * points. It has two main parts, Select and Edit. The first parameter, - * aStartWithSelection gives whether we would like to select or edit. - * In case of selection, there is the possibility to use this module in - * many applications. For this, two layouts are implemented, one is - * list pane used by General Settings which provides the list in a - * list-pane. The other layout is for the other applications requiring - * access point selection, a popup-list style as the decision was that - * General Settings will use list-pane and all other apps. popup-list - * style. It is the caller who selects the style so if spec. says - * otherwise, this module still can be used. - * It is also possible to start the UI without selection, so if any - * module has a 'linked/default/etc.' access point and stored it's UID, - * the module can simply call the editor part of the UI without having - * to select the AP once more. - * In case of editing only, (aStartWithSelection is EFalse), all other - * construction parameters are ignored and after construction caller - * can simply call RunSettingsL(..). - * In case of selection, a lot of other parameters can be specified to - * fulfil all requirements. There are three types of Options menu - * available: EApSettingsSelMenuNormal, EApSettingsSelMenuSelectOnly, - * EApSettingsSelMenuSelectNormal. - *
- *-EApSettingsSelMenuSelectOnly: Only Select is visible, no way to edit, - * delete, create, etc. - *
- * -EApSettingsSelMenuNormal:Options menu specified in General Settings, - * contains Edit, Delete, Create new, etc. menu items. - *
- * -EApSettingsSelMenuSelectNormal: Same as in EApSettingsSelMenuNormal - * BUT the first item is Select. This one makes it possible to select - * an access point and also possible to edit, create, delete, etc. - *
- * The following three parameters specify the filtering and ordering - * criteria for the selection list creation. First, it is possible to - * specify which ISP-type we are looking for. The possible values are: - *
- * KEApIspTypeInternetOnly: Filter allows only access points that are - * capable of only internet access. - *
- * KEApIspTypeWAPOnly: Filter allows only access points that are - * capable of only WAP access. - *
- * KEApIspTypeInternetAndWAP: Filter allows only access points that are - * capable of internet AND WAP access. - *
- * KEApIspTypeWAPMandatory: Filter allows only access points that are - * capable of WAP access AND contain mandatory WAP settings. - *
- * KEApIspTypeAll: No filtering is done for the isp-type, all types of - * access points are shown. - *
- * It is possible to combine them by simply adding/or-ing together the - * values, filtering will be done in such a way that only access points - * with the listed ISP-types will be shown. - * Second filtering possibility (aBearerFilter) is the desired bearer - * type. The possible values are the values of the TApBearerType enum - * type and their combinations, as in case of the ISP type. - * The ordering of the list can be specified with the aSortType - * parameter. It can have the following values: - * KEApSortUidAscending: The sorting is done according to the ID of - * the access points in ascending order. - * KEApSortUidDescending: The sorting is done according to the ID of - * the access points in descending order. - * KEApSortNameAscending: The sorting is done according to the name of - * the access points in ascending order. - * KEApSortNameDescending: The sorting is done according to the name of - * the access points in descending order. - * Caution! The ordering values can not be combined! - * @param aStartWithSelection A boolean value indicating whether to - * select or edit an ap. - * @param aListType A TSelectionListType enum indicating the desired - * list type. - * @param aSelMenuType A TSelectionMenuType enum indicating the desired - * menu type. - * @param aIspTypeFilter Filtering criteria on ISP type - * @param aBearerFilter Filtering criteria on bearer type - * @param aSortType Specifies the sort order to use. - * @param aReqIpvType Specifies whether the caller would like to - * have IPv4, IPv6 or both access points. If it is IPv6 or Both, - * in case of IPv6 support is available as a feature, it will be - * supported. If IPv6 feature is not supported by the phone, it - * simply defaults to the normal IPv4 version. - * If it is IPv4, it uses the default IPv4 version independently - * from IPv6 feature beeing available or not. - * @return The constructed CApSettingsHandler object. - * - * @deprecated - */ - IMPORT_C static CApSettingsHandler* NewLC( - TBool aStartWithSelection, - TSelectionListType aListType, - TSelectionMenuType aSelMenuType, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TInt aReqIpvType - ); - - - - /** - * Two-phased constructor. Leaves on failure. - * This function shall be used to create the access point - * settings/selection handling UI object. It is customizable through - * the parameters. This object is a small layer above the UI part and - * it provides a standard interface to select, edit, create access - * points. It has two main parts, Select and Edit. The first parameter, - * aStartWithSelection gives whether we would like to select or edit. - * In case of selection, there is the possibility to use this module in - * many applications. For this, two layouts are implemented, one is list - * pane used by General Settings which provides the list in a list-pane. - * The other layout is for the other applications requiring access point - * selection, a popup-list style as the decision was that General - * Settings will use list-pane and all other apps. popup-list style. - * It is the caller who selects the style so if spec. says otherwise, - * this module still can be used. It is also possible to start the UI - * without selection, so if any module has a 'linked/default/etc.' - * access point and stored it's UID, the module can simply call the - * editor part of the UI without having to select the AP once more. - * In case of editing only, (aStartWithSelection is EFalse), all other - * construction parameters are ignored and after construction caller can - * simply call RunSettingsL(..). In case of selection, a lot of other - * parameters can be specified to fulfil all requirements. There are - * three types of Options menu available: EApSettingsSelMenuNormal, - * EApSettingsSelMenuSelectOnly, EApSettingsSelMenuSelectNormal. - *
- *-EApSettingsSelMenuSelectOnly: Only Select is visible, no way to edit, - * delete, create, etc. - *
- * -EApSettingsSelMenuNormal:Options menu specified in General Settings, - * contains Edit, Delete, Create new, etc. menu items. - *
- * -EApSettingsSelMenuSelectNormal: Same as in EApSettingsSelMenuNormal - * BUT the first item is Select. This one makes it possible to select - * an access point and also possible to edit, create, delete, etc. - *
- * The following three parameters specify the filtering and ordering - * criteria for the selection list creation. First, it is possible to - * specify which ISP-type we are looking for. The possible values are: - *
- * KEApIspTypeInternetOnly: Filter allows only access points that are - * capable of only internet access. - *
- * KEApIspTypeWAPOnly: Filter allows only access points that are - * capable of only WAP access. - *
- * KEApIspTypeInternetAndWAP: Filter allows only access points that are - * capable of internet AND WAP access. - *
- * KEApIspTypeWAPMandatory: Filter allows only access points that are - * capable of WAP access AND contain mandatory WAP settings. - *
- * KEApIspTypeAll: No filtering is done for the isp-type, all types of - * access points are shown. - *
- * It is possible to combine them by simply adding/or-ing together the - * values, filtering will be done in such a way that only access points - * with the listed ISP-types will be shown. Second filtering possibility - * (aBearerFilter) is the desired bearer type. The possible values are - * the values of the TApBearerType enum type and their combinations, as - * in case of the ISP type. The ordering of the list can be specified - * with the aSortType parameter. It can have the following values: - * KEApSortUidAscending: The sorting is done according to the ID of - * the access points in ascending order. - * KEApSortUidDescending: The sorting is done according to the ID of - * the access points in descending order. - * KEApSortNameAscending: The sorting is done according to the name of - * the access points in ascending order. - * KEApSortNameDescending: The sorting is done according to the name of - * the access points in descending order. - * Caution! The ordering values can not be combined! - * @param aDb A database to work on - * @param aStartWithSelection A boolean value indicating whether to - * select or edit an ap. - * @param aListType A TSelectionListType enum indicating the desired - * list type. - * @param aSelMenuType A TSelectionMenuType enum indicating the desired - * menu type. - * @param aIspTypeFilter Filtering criteria on ISP type - * @param aBearerFilter Filtering criteria on bearer type - * @param aSortType Specifies the sort order to use. - * @param aReqIpvType Specifies whether the caller would like to - * have IPv4, IPv6 or both access points. If it is IPv6 or Both, - * in case of IPv6 support is available as a feature, it will be - * supported. If IPv6 feature is not supported by the phone, it - * simply defaults to the normal IPv4 version. - * If it is IPv4, it uses the default IPv4 version independently - * from IPv6 feature beeing available or not. - * @return The constructed CApSettingsHandler object. - * - * @deprecated - */ - IMPORT_C static CApSettingsHandler* NewLC( - CActiveApDb& aDb, - TBool aStartWithSelection, - TSelectionListType aListType, - TSelectionMenuType aSelMenuType, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TInt aReqIpvType - ); - - - - - /** - * Two-phased constructor. Leaves on failure. - * This function shall be used to create the access point - * settings/selection handling UI object.It is customizable through the - * parameters. This object is a small layer above the UI part and - * it provides a standard interface to select, edit, create access - * points. It has two main parts, Select and Edit. The first parameter, - * aStartWithSelection gives whether we would like to select or edit. - * In case of selection, there is the possibility to use this module in - * many applications. For this, two layouts are implemented, one is - * list pane used by General Settings which provides the list in a - * list-pane. The other layout is for the other applications requiring - * access point selection, a popup-list style as the decision was that - * General Settings will use list-pane and all other apps. popup-list - * style. It is the caller who selects the style so if spec. says - * otherwise, this module still can be used. - * It is also possible to start the UI without selection, so if any - * module has a 'linked/default/etc.' access point and stored it's UID, - * the module can simply call the editor part of the UI without having - * to select the AP once more. - * In case of editing only, (aStartWithSelection is EFalse), all other - * construction parameters are ignored and after construction caller - * can simply call RunSettingsL(..). - * In case of selection, a lot of other parameters can be specified to - * fulfil all requirements. There are three types of Options menu - * available: EApSettingsSelMenuNormal, EApSettingsSelMenuSelectOnly, - * EApSettingsSelMenuSelectNormal. - *
- *-EApSettingsSelMenuSelectOnly: Only Select is visible, no way to edit, - * delete, create, etc. - *
- * -EApSettingsSelMenuNormal:Options menu specified in General Settings, - * contains Edit, Delete, Create new, etc. menu items. - *
- * -EApSettingsSelMenuSelectNormal: Same as in EApSettingsSelMenuNormal - * BUT the first item is Select. This one makes it possible to select - * an access point and also possible to edit, create, delete, etc. - *
- * The following three parameters specify the filtering and ordering - * criteria for the selection list creation. First, it is possible to - * specify which ISP-type we are looking for. The possible values are: - *
- * KEApIspTypeInternetOnly: Filter allows only access points that are - * capable of only internet access. - *
- * KEApIspTypeWAPOnly: Filter allows only access points that are - * capable of only WAP access. - *
- * KEApIspTypeInternetAndWAP: Filter allows only access points that are - * capable of internet AND WAP access. - *
- * KEApIspTypeWAPMandatory: Filter allows only access points that are - * capable of WAP access AND contain mandatory WAP settings. - *
- * KEApIspTypeAll: No filtering is done for the isp-type, all types of - * access points are shown. - *
- * It is possible to combine them by simply adding/or-ing together the - * values, filtering will be done in such a way that only access points - * with the listed ISP-types will be shown. - * Second filtering possibility (aBearerFilter) is the desired bearer - * type. The possible values are the values of the TApBearerType enum - * type and their combinations, as in case of the ISP type. - * The ordering of the list can be specified with the aSortType - * parameter. It can have the following values: - * KEApSortUidAscending: The sorting is done according to the ID of - * the access points in ascending order. - * KEApSortUidDescending: The sorting is done according to the ID of - * the access points in descending order. - * KEApSortNameAscending: The sorting is done according to the name of - * the access points in ascending order. - * KEApSortNameDescending: The sorting is done according to the name of - * the access points in descending order. - * Caution! The ordering values can not be combined! - * @param aStartWithSelection A boolean value indicating whether to - * select or edit an ap. - * @param aListType A TSelectionListType enum indicating the desired - * list type. - * @param aSelMenuType A TSelectionMenuType enum indicating the desired - * menu type. - * @param aIspTypeFilter Filtering criteria on ISP type - * @param aBearerFilter Filtering criteria on bearer type - * @param aSortType Specifies the sort order to use. - * @param aReqIpvType Specifies whether the caller would like to - * have IPv4, IPv6 or both access points. If it is IPv6 or Both, - * in case of IPv6 support is available as a feature, it will be - * supported. If IPv6 feature is not supported by the phone, it - * simply defaults to the normal IPv4 version. - * If it is IPv4, it uses the default IPv4 version independently - * from IPv6 feature beeing available or not. - * @param aVpnFilterType a TVpnFilterType representing the possible - * additional VPN filtering. - * @return The constructed CApSettingsHandler object. - * - * @deprecated - */ - IMPORT_C static CApSettingsHandler* NewLC( - TBool aStartWithSelection, - TSelectionListType aListType, - TSelectionMenuType aSelMenuType, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TInt aReqIpvType, - TVpnFilterType aVpnFilterType - ); - - - - /** - * Two-phased constructor. Leaves on failure. - * This function shall be used to create the access point - * settings/selection handling UI object. It is customizable through - * the parameters. This object is a small layer above the UI part and - * it provides a standard interface to select, edit, create access - * points. It has two main parts, Select and Edit. The first parameter, - * aStartWithSelection gives whether we would like to select or edit. - * In case of selection, there is the possibility to use this module in - * many applications. For this, two layouts are implemented, one is list - * pane used by General Settings which provides the list in a list-pane. - * The other layout is for the other applications requiring access point - * selection, a popup-list style as the decision was that General - * Settings will use list-pane and all other apps. popup-list style. - * It is the caller who selects the style so if spec. says otherwise, - * this module still can be used. It is also possible to start the UI - * without selection, so if any module has a 'linked/default/etc.' - * access point and stored it's UID, the module can simply call the - * editor part of the UI without having to select the AP once more. - * In case of editing only, (aStartWithSelection is EFalse), all other - * construction parameters are ignored and after construction caller can - * simply call RunSettingsL(..). In case of selection, a lot of other - * parameters can be specified to fulfil all requirements. There are - * three types of Options menu available: EApSettingsSelMenuNormal, - * EApSettingsSelMenuSelectOnly, EApSettingsSelMenuSelectNormal. - *
- *-EApSettingsSelMenuSelectOnly: Only Select is visible, no way to edit, - * delete, create, etc. - *
- * -EApSettingsSelMenuNormal:Options menu specified in General Settings, - * contains Edit, Delete, Create new, etc. menu items. - *
- * -EApSettingsSelMenuSelectNormal: Same as in EApSettingsSelMenuNormal - * BUT the first item is Select. This one makes it possible to select - * an access point and also possible to edit, create, delete, etc. - *
- * The following three parameters specify the filtering and ordering - * criteria for the selection list creation. First, it is possible to - * specify which ISP-type we are looking for. The possible values are: - *
- * KEApIspTypeInternetOnly: Filter allows only access points that are - * capable of only internet access. - *
- * KEApIspTypeWAPOnly: Filter allows only access points that are - * capable of only WAP access. - *
- * KEApIspTypeInternetAndWAP: Filter allows only access points that are - * capable of internet AND WAP access. - *
- * KEApIspTypeWAPMandatory: Filter allows only access points that are - * capable of WAP access AND contain mandatory WAP settings. - *
- * KEApIspTypeAll: No filtering is done for the isp-type, all types of - * access points are shown. - *
- * It is possible to combine them by simply adding/or-ing together the - * values, filtering will be done in such a way that only access points - * with the listed ISP-types will be shown. Second filtering possibility - * (aBearerFilter) is the desired bearer type. The possible values are - * the values of the TApBearerType enum type and their combinations, as - * in case of the ISP type. The ordering of the list can be specified - * with the aSortType parameter. It can have the following values: - * KEApSortUidAscending: The sorting is done according to the ID of - * the access points in ascending order. - * KEApSortUidDescending: The sorting is done according to the ID of - * the access points in descending order. - * KEApSortNameAscending: The sorting is done according to the name of - * the access points in ascending order. - * KEApSortNameDescending: The sorting is done according to the name of - * the access points in descending order. - * Caution! The ordering values can not be combined! - * @param aDb A database to work on - * @param aStartWithSelection A boolean value indicating whether to - * select or edit an ap. - * @param aListType A TSelectionListType enum indicating the desired - * list type. - * @param aSelMenuType A TSelectionMenuType enum indicating the desired - * menu type. - * @param aIspTypeFilter Filtering criteria on ISP type - * @param aBearerFilter Filtering criteria on bearer type - * @param aSortType Specifies the sort order to use. - * @param aReqIpvType Specifies whether the caller would like to - * have IPv4, IPv6 or both access points. If it is IPv6 or Both, - * in case of IPv6 support is available as a feature, it will be - * supported. If IPv6 feature is not supported by the phone, it - * simply defaults to the normal IPv4 version. - * If it is IPv4, it uses the default IPv4 version independently - * from IPv6 feature beeing available or not. - * @param aVpnFilterType a TVpnFilterType representing the possible - * additional VPN filtering. - * @return The constructed CApSettingsHandler object. - * - * @deprecated - */ - IMPORT_C static CApSettingsHandler* NewLC( - CActiveApDb& aDb, - TBool aStartWithSelection, - TSelectionListType aListType, - TSelectionMenuType aSelMenuType, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TInt aReqIpvType, - TVpnFilterType aVpnFilterType - ); - - - - - - /** - * Two-phased constructor. Leaves on failure. - * This function shall be used to create the access point - * settings/selection handling UI object. It is customizable through - * the parameters. This object is a small layer above the UI part and - * it provides a standard interface to select, edit, create access - * points. It has two main parts, Select and Edit. The first parameter, - * aStartWithSelection gives whether we would like to select or edit. - * In case of selection, there is the possibility to use this module in - * many applications. For this, two layouts are implemented, one is list - * pane used by General Settings which provides the list in a list-pane. - * The other layout is for the other applications requiring access point - * selection, a popup-list style as the decision was that General - * Settings will use list-pane and all other apps. popup-list style. - * It is the caller who selects the style so if spec. says otherwise, - * this module still can be used. It is also possible to start the UI - * without selection, so if any module has a 'linked/default/etc.' - * access point and stored it's UID, the module can simply call the - * editor part of the UI without having to select the AP once more. - * In case of editing only, (aStartWithSelection is EFalse), all other - * construction parameters are ignored and after construction caller can - * simply call RunSettingsL(..). In case of selection, a lot of other - * parameters can be specified to fulfil all requirements. There are - * three types of Options menu available: EApSettingsSelMenuNormal, - * EApSettingsSelMenuSelectOnly, EApSettingsSelMenuSelectNormal. - *
- *-EApSettingsSelMenuSelectOnly: Only Select is visible, no way to edit, - * delete, create, etc. - *
- * -EApSettingsSelMenuNormal:Options menu specified in General Settings, - * contains Edit, Delete, Create new, etc. menu items. - *
- * -EApSettingsSelMenuSelectNormal: Same as in EApSettingsSelMenuNormal - * BUT the first item is Select. This one makes it possible to select - * an access point and also possible to edit, create, delete, etc. - *
- * The following three parameters specify the filtering and ordering - * criteria for the selection list creation. First, it is possible to - * specify which ISP-type we are looking for. The possible values are: - *
- * KEApIspTypeInternetOnly: Filter allows only access points that are - * capable of only internet access. - *
- * KEApIspTypeWAPOnly: Filter allows only access points that are - * capable of only WAP access. - *
- * KEApIspTypeInternetAndWAP: Filter allows only access points that are - * capable of internet AND WAP access. - *
- * KEApIspTypeWAPMandatory: Filter allows only access points that are - * capable of WAP access AND contain mandatory WAP settings. - *
- * KEApIspTypeAll: No filtering is done for the isp-type, all types of - * access points are shown. - *
- * It is possible to combine them by simply adding/or-ing together the - * values, filtering will be done in such a way that only access points - * with the listed ISP-types will be shown. Second filtering possibility - * (aBearerFilter) is the desired bearer type. The possible values are - * the values of the TApBearerType enum type and their combinations, as - * in case of the ISP type. The ordering of the list can be specified - * with the aSortType parameter. It can have the following values: - * KEApSortUidAscending: The sorting is done according to the ID of - * the access points in ascending order. - * KEApSortUidDescending: The sorting is done according to the ID of - * the access points in descending order. - * KEApSortNameAscending: The sorting is done according to the name of - * the access points in ascending order. - * KEApSortNameDescending: The sorting is done according to the name of - * the access points in descending order. - * Caution! The ordering values can not be combined! - * @param aDb A database to work on - * @param aStartWithSelection A boolean value indicating whether to - * select or edit an ap. - * @param aListType A TSelectionListType enum indicating the desired - * list type. - * @param aSelMenuType A TSelectionMenuType enum indicating the desired - * menu type. - * @param aIspTypeFilter Filtering criteria on ISP type - * @param aBearerFilter Filtering criteria on bearer type - * @param aSortType Specifies the sort order to use. - * @param aReqIpvType Specifies whether the caller would like to - * have IPv4, IPv6 or both access points. If it is IPv6 or Both, - * in case of IPv6 support is available as a feature, it will be - * supported. If IPv6 feature is not supported by the phone, it - * simply defaults to the normal IPv4 version. - * If it is IPv4, it uses the default IPv4 version independently - * from IPv6 feature beeing available or not. - * @param aVpnFilterType a TVpnFilterType representing the possible - * additional VPN filtering. - * @param aIncludeEasyWlan a TBool indicating whether it should - * include the easy wlan AP in the list or not. - * @return The constructed CApSettingsHandler object. - * - * @deprecated - */ - IMPORT_C static CApSettingsHandler* NewLC( - CActiveApDb& aDb, - TBool aStartWithSelection, - TSelectionListType aListType, - TSelectionMenuType aSelMenuType, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TInt aReqIpvType, - TVpnFilterType aVpnFilterType, - TBool aIncludeEasyWlan - ); - - - - - /** - * Destructor. - * - * @deprecated - */ - IMPORT_C ~CApSettingsHandler(); - - - protected: - /** - * Constructor. - * @param aStartWithSelection A boolean value indicating whether to - * select or edit an ap. - * @param aListType A TSelectionListType enum indicating the desired - * list type. - * @param aSelMenuType A TSelectionMenuType enum indicating the desired - * menu type. - * - * @deprecated - */ - IMPORT_C CApSettingsHandler( - TBool aStartWithSelection, - TSelectionListType aListType, - TSelectionMenuType aSelMenuType - ); - - /** - * Constructor. - * @param aStartWithSelection A boolean value indicating whether to - * select or edit an ap. - * @param aListType A TSelectionListType enum indicating the desired - * list type. - * @param aSelMenuType A TSelectionMenuType enum indicating the desired - * menu type. - * @param aHelpMajor Major help ID - * - * @deprecated - */ - IMPORT_C CApSettingsHandler( - TBool aStartWithSelection, - TSelectionListType aListType, - TSelectionMenuType aSelMenuType, - TUid aHelpMajor - ); - - - /** - * Constructor. - * @param aStartWithSelection A boolean value indicating whether to - * select or edit an ap. - * @param aListType A TSelectionListType enum indicating the desired - * list type. - * @param aSelMenuType A TSelectionMenuType enum indicating the desired - * menu type. - * @param aNeedIpv6Support Whether IPv6 is supported or not - */ - CApSettingsHandler( - TBool aStartWithSelection, - TSelectionListType aListType, - TSelectionMenuType aSelMenuType, - TBool aNeedIpv6Support - ); - - - - /** - * Second-phase constructor. - * @param aIspTypeFilter Filtering criteria on ISP type - * @param aBearerFilter Filtering criteria on bearer type - * @param aSortType Specifies the sort order to use. - * - * @deprecated - */ - IMPORT_C void ConstructL( - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType - ); - - - /** - * Second-phase constructor. - * @param aDb A database to work on - * @param aIspTypeFilter Filtering criteria on ISP type - * @param aBearerFilter Filtering criteria on bearer type - * @param aSortType Specifies the sort order to use. - * - * @deprecated - */ - IMPORT_C void ConstructL( - CActiveApDb& aDb, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType - ); - - - /** - * Second-phase constructor. - * @param aIspTypeFilter Filtering criteria on ISP type - * @param aBearerFilter Filtering criteria on bearer type - * @param aSortType Specifies the sort order to use. - * @param aVpnFilterType a TVpnFilterType representing the possible - * additional VPN filtering. - * - * @deprecated - */ - IMPORT_C void ConstructL( - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TVpnFilterType aVpnFilterType - ); - - - /** - * Second-phase constructor. - * @param aDb A database to work on - * @param aIspTypeFilter Filtering criteria on ISP type - * @param aBearerFilter Filtering criteria on bearer type - * @param aSortType Specifies the sort order to use. - * @param aVpnFilterType a TVpnFilterType representing the possible - * additional VPN filtering. - * - * @deprecated - */ - IMPORT_C void ConstructL( - CActiveApDb& aDb, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TVpnFilterType aVpnFilterType - ); - - - - - /** - * Second-phase constructor. - * @param aDb A database to work on - * @param aIspTypeFilter Filtering criteria on ISP type - * @param aBearerFilter Filtering criteria on bearer type - * @param aSortType Specifies the sort order to use. - * @param aVpnFilterType a TVpnFilterType representing the possible - * additional VPN filtering. - * @param aIncludeEasyWlan a TBool indicating whether it should - * include the easy wlan AP in the list or not. - * - * @deprecated - */ - IMPORT_C void ConstructL( - CActiveApDb& aDb, - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType, - TVpnFilterType aVpnFilterType, - TBool aIncludeEasyWlan - ); - - - public: // New functions - /** - * Sets the filtering used in the access point selection. - * @param aIspTypeFilter Filtering criteria on ISP type - * @param aBearerFilter Filtering criteria on bearer type - * @param aSortType Specifies the sort order to use. - * @return No return value. Leaves on error. - * - * @deprecated - */ - IMPORT_C void SetFilterL( - TInt aIspFilter, - TInt aBearerFilter, - TInt aSortType - ); - - - /** - * Sets possible overrides of some texts. - * By default, text is read from resources. This provides a way to - * change some of the text to a caller-supplied one. The text must - * be read from resource and must be already localized. - * More than one text can be substituted, they are stored internally - * in an array. - * Currently not supported and supporting it is under discussion. - * @param aText2Change TTextID to identify the text to be replaced with - * @param aNewText Reference to the substitute text. - * - * @deprecated - */ - IMPORT_C void SetTextOverrideL( TTextID aText2Change, - const TDesC& aNewText ); - - - /** - * Gets possible overrides of a text. - * By default, text is read from resources. This provides a way to - * change some of the text to a caller-supplied one. The text must - * be read from resource and must be already localized. - * More than one text can be substituted, they are stored internally - * in an array. - * Currently not supported and supporting it is under discussion - * @param aTextID TTextID type to identify the text to be replaced with - * @return Reference to the substitute text. - * - * @deprecated - */ - IMPORT_C const TDesC& TextOverrideL( TTextID aTextId ); - - - /** - * Starts the settings component. - * Creates dialog(s) from scratch, launches and executes them. - * Can leave with error codes. - * @param TUint32 aHighlight The UID of the AP to highlight by default - * @param TUint32 aSelected The UID of the access point selected - * by the user. - * @return The accomplished task's flag-codes: - *
- * KApUiEventNone, - *
- * KApUiEventSelected, - *
- * KApUiEventCreatedBlank, - *
- * KApUiEventCreatedUsedOld, - *
- * KApUiEventEdited, - *
- * KApUiEventDeleted, - *
- * KApUiEventExitRequested - *
and their combinations. ( Bitwise OR ) - *
- * aSelected will be modified only if KApUiEventSelected is included - * in the flags. - *
- * In case it returns KApUiEventExitRequested, the user had choosen - * the Exit option from the Options menu which means - * that the caller application MUST exit! - *
- * Returns after completion! - * - * @deprecated - */ - IMPORT_C TInt RunSettingsL( TUint32 aHighLight, TUint32& aSelected ); - - - /** - * Component Validation Test. - * @return KErrNone. - * - * @deprecated - */ - IMPORT_C static TInt Cvt(); - - - protected: // New functions - /** - * @Deprecated - * Starts the settings component. - * Creates dialog(s) from scratch, launches and executes them. - * In case of error, leaves with error codes. - * @param TUint32 aHighlight The UID of the AP to highlight by default - * @param TUint32 aSelected The UID of the AP selected by the user - * @return The accomplished task's flag-codes: - *
- * KApUiEventNone, - *
- * KApUiEventSelected, - *
- * KApUiEventCreatedBlank, - *
- * KApUiEventCreatedUsedOld, - *
- * KApUiEventEdited, - *
- * KApUiEventDeleted - *
- * and their combinations. ( Bitwise OR ) - *
- * aSelected will be modified only if KApUiEventSelected is included - * in the flags. - *
- * Returns after completion! - */ - TInt DoRunSettingsL( TUint32 aHighLight, TUint32& aSelected ); - - - /** - * Starts the viewer component. - * Creates dialog(s) from scratch, launches and executes it. - * In case of error, leaves with error codes. - * @param TUint32 aUid The UID of the AP to view/edit - * @return Returns the completed task's flags - * KApUiEventNone, KApUiEventSelected, KApUiEventCreatedBlank, - * KApUiEventCreatedUsedOld, KApUiEventEdited, KApUiEventDeleted, - * KApUiEventExitRequested and their combinations. ( Bitwise OR ) - * In case it returns KApUiEventExitRequested, the user had choosen - * the Exit option from the Options menu which means - * that the caller application MUST exit! - *
- * Returns after completion! - * - * @deprecated - */ - IMPORT_C TInt RunViewerL( TUint32 aUid ); - - - /** - * @Deprecated - * Starts the viewer component. - * Creates dialog(s) from scratch, launches and executes it. - * In case of error, leaves with error codes. - * @param TUint32 aUid The UID of the AP to view/edit - * @return Returns the completed task's flags - * KApUiEventNone, KApUiEventSelected, KApUiEventCreatedBlank, - * KApUiEventCreatedUsedOld, KApUiEventEdited, KApUiEventDeleted, - * KApUiEventExitRequested and their combinations. ( Bitwise OR ) - * Returns after completion! - */ - TInt DoRunViewerL( TUint32 aUid ); - - - // handles the Delete access Point command. - // @Deprecated - void HandleApDeleteCmdL( TUint32 aUid, TBool aIsLast ); - - - // handles the Create blank new access Point command. - // @Deprecated - TUint32 HandleApBlankNewL( TInt aBearers, TInt aIsps ); - - - // handles the Create new access Point by using existing one command. - // @Deprecated - TUint32 HandleApUseOldNewL(); - - - // handles the Editing of the newly created access Point. - // @Deprecated - TUint32 EditAfterCreateL( TUint32 aUid, - CApAccessPointItem* aItem = NULL ); - - - /** - * Second-phase internal constructor. - * @param aDb A database to work on - * @param aIspTypeFilter Filtering criteria on ISP type - * @param aBearerFilter Filtering criteria on bearer type - * @param aSortType Specifies the sort order to use. - * @param aVpnFilterType a TVpnFilterType representing the possible - * additional VPN filtering. - * @param aIncludeEasyWlan a TBool indicating whether it should - * include the easy wlan AP in the list or not. - */ - void DoConstructL( CActiveApDb* aDb, TInt aIspFilter, - TInt aBearerFilter, TInt aSortType, - TVpnFilterType aVpnFilterType, - TBool aIncludeEasyWlan ); - - - /** - * @Deprecated - * Starts the selector component as a list - * Creates dialog(s) from scratch, launches and executes them. - * In case of error, leaves with error codes. - * @param TUint32 aHighlight The UID of the AP to highlight by default - * @param TUint32 aSelected The UID of the AP selected by the user - * @return The accomplished task's flag-codes: - *
- * KApUiEventNone, - *
- * KApUiEventSelected, - *
- * KApUiEventCreatedBlank, - *
- * KApUiEventCreatedUsedOld, - *
- * KApUiEventEdited, - *
- * KApUiEventDeleted - *
- * and their combinations. ( Bitwise OR ) - *
- * aSelected will be modified only if KApUiEventSelected is included - * in the flags. - *
- * Returns after completion! - */ - void DoRunListSettingsL( TUint32 aHighLight, TUint32& aSelected ); - - - /** - * @Deprecated - * Starts the selector component in a setting page - * Creates dialog(s) from scratch, launches and executes them. - * In case of error, leaves with error codes. - * @param TUint32 aHighlight The UID of the AP to highlight by default - * @param TUint32 aSelected The UID of the AP selected by the user - * @return The accomplished task's flag-codes: - *
- * KApUiEventNone, - *
- * KApUiEventSelected, - *
- * KApUiEventCreatedBlank, - *
- * KApUiEventCreatedUsedOld, - *
- * KApUiEventEdited, - *
- * KApUiEventDeleted - *
- * and their combinations. ( Bitwise OR ) - *
- * aSelected will be modified only if KApUiEventSelected is included - * in the flags. - *
- * Returns after completion! - */ - void DoRunSetPageSettingsL( TUint32 aHighLight, TUint32& aSelected ); - - - /** - * @Deprecated - * handles the Create new access Point by using existing one command. - * Called after user has selected the AP to copy - * Creates the new Ap and offers it for editing. - * @param aSelected The UID of the AP to copy. Shall not be KErrNone. - * @return The UID of the newly created Ap - */ - TUint32 DoHandleApUseOldNewL( TUint32 aSelected ); - - /** - * @Deprecated - * Selects the Ap to Copy, returns its UID. - * If not selected, KErrNone is returned - */ - TUint32 SelectApToCopyL(); - - - /** - * @Deprecated - * handles the Create blank new access Point command. - */ - TUint32 DoHandleApBlankNewL( TInt aBearers, TInt aIsps ); - - - /** - * @Deprecated - * handles the Delete network group command. - * @param aUid The uid of the network to delete - */ - void HandleNetworkDeleteCmdL( TUint32 aUid ); - - - /** - * @Deprecated - * Gets the local variant value - * @return A TInt stating the variant - */ - TInt GetVariantL(); - - - /** - * @Deprecated - * Gets confirmation about deleting an access point - * @param aUid A TUint32 holding the WAP access point ID of the - * access point to be deleted. - * @param aIsLast A TBool specifying whether the access point to be - * deleted is the last one or not. - * @return A TInt stating the result - */ - TInt ConfirmDeleteL( TUint32 aUid, TBool aIsLast ); - - - /** - * @Deprecated - * Wrapper for the public API - */ - void HandleRunSettingsL( TUint32 aHighLight, TUint32& aSelected ); - - - protected: // Functions from base classes - - friend class CApSettingsDlg; - friend class CApSelectorDialog; - friend class CApSelPopupList; - friend class CApNetSelPopupList; - - private: - /** - * @Deprecated - * Selects an appropriate bearer type for a given item according to - * the current filtering criterias - * @param aBearers The current bearer filter set - * @param aItem The CApAccessPointItem whoose bearer type is to be set. - */ - void ChooseBearerTypeL( TInt aBearers, CApAccessPointItem& aItem ); - - /** - * @Deprecated - * Duplciates an existing access point identified by the passed WAP ID - * @param aUid The WAP Access Point ID of the access point to duplicate - * @return The WAP Access Point ID of the newly created access point. - */ - TUint32 HandleDuplicateL( TUint32 aUid ); - - - private: //data - TBool iStartWithSelection; - TSelectionListType iListType; - TSelectionMenuType iSelMenuType; - - TInt iIspFilter; - TInt iBearerFilter; - TApSetHandlerExtra* iExt; // Extra data holder structure - - TInt iReqIpvType; // Default is IPv4 - -// replacing iModel with iImpl, no size change -// CApSettingsModel* iModel; - CApSettingsHandlerImpl* iImpl; // owned - - CTextOverrides* iTextOverrides; - TUint32 iEventStore; // to hold the events - TUid iHelpMajor; - -#ifdef __TEST_OOMDEBUG - TBool iMemTestOn; -#endif // __TEST_OOMDEBUG - - }; - -#endif - -// End of File diff -r 2709c04a4af5 -r 8b0c979bbe8c ipcm_pub/connection_monitor_server_api/inc/rconnmon.h --- a/ipcm_pub/connection_monitor_server_api/inc/rconnmon.h Fri Sep 03 09:38:26 2010 +0300 +++ b/ipcm_pub/connection_monitor_server_api/inc/rconnmon.h Thu Sep 16 12:50:24 2010 +0300 @@ -694,6 +694,18 @@ { } /** + * Copy constructor. + */ + IMPORT_C TConnMonIapInfo( const TConnMonIapInfo& aConnMonIapInfo ); + + /** + * Assignment operator. + * + * @param aConnMonIapInfo The object which is assigned. + */ + IMPORT_C TConnMonIapInfo& operator=( const TConnMonIapInfo& aConnMonIapInfo ); + + /** * This method returns the number of IAPs contained in this class. * * @return Number of IAPs. diff -r 2709c04a4af5 -r 8b0c979bbe8c ipcm_pub/group/bld.inf --- a/ipcm_pub/group/bld.inf Fri Sep 03 09:38:26 2010 +0300 +++ b/ipcm_pub/group/bld.inf Thu Sep 16 12:50:24 2010 +0300 @@ -17,8 +17,6 @@ */ #include "../connection_settings_api/group/bld.inf" -#include "../access_point_engine_api/group/bld.inf" -#include "../access_point_settings_handler_api/group/bld.inf" #include "../data_connection_log_counters_api/group/bld.inf" #include "../connection_monitor_server_api/group/bld.inf" #include "../connection_settings_ui_api/group/bld.inf" diff -r 2709c04a4af5 -r 8b0c979bbe8c keepalive/flextimer/server/traces/OstTraceDefinitions.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/keepalive/flextimer/server/traces/OstTraceDefinitions.h Thu Sep 16 12:50:24 2010 +0300 @@ -0,0 +1,4 @@ +#ifndef __OSTTRACEDEFINITIONS_H__ +#define __OSTTRACEDEFINITIONS_H__ +#include +#endif diff -r 2709c04a4af5 -r 8b0c979bbe8c keepalive/flextimer/server/traces/fixed_id.definitions --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/keepalive/flextimer/server/traces/fixed_id.definitions Thu Sep 16 12:50:24 2010 +0300 @@ -0,0 +1,35 @@ +#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt. +[GROUP]TRACE_INTERNAL=0x40 +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSERVER_CONSTRUCTL=0x6 +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSERVER_DEL=0x1 +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSERVER_EXIT=0x5 +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSERVER_MAINERROR=0x7 +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSERVER_MAINEXIT=0x8 +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSERVER_NEWSESSIONL=0x3 +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSERVER_NEWSESSIONLVER=0x2 +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSERVER_START=0x4 +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSION=0x9 +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSIOND=0xa +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSION_ABORT=0xf +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSION_ABORT_ERROR=0x10 +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSION_ADDERROR=0x21 +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSION_ADDTIMER=0x1f +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSION_AFTERPANIC=0x15 +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSION_AFTERTICKSPANIC=0x17 +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSION_AFTERTICKSTIMER=0x18 +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSION_AFTERTIMER=0x16 +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSION_ATPANIC=0x11 +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSION_ATTIMER=0x12 +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSION_ATUTCPANIC=0x13 +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSION_ATUTCTIMER=0x14 +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSION_CANCEL=0x1a +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSION_CANCELERROR=0x19 +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSION_CONFIG=0x1c +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSION_CONFIGERROR=0x1b +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSION_CONFIGUNKNOWN=0x1e +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSION_CONFIGWIN=0x1d +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSION_DOADDTIMER=0x20 +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSION_ERROR=0xc +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSION_MSG=0xb +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSION_TIMEOUT=0xd +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSION_TIMEOUT_ERROR=0xe diff -r 2709c04a4af5 -r 8b0c979bbe8c package_definition.xml --- a/package_definition.xml Fri Sep 03 09:38:26 2010 +0300 +++ b/package_definition.xml Thu Sep 16 12:50:24 2010 +0300 @@ -5,10 +5,6 @@ - - - - @@ -61,14 +57,6 @@ - - - - - - - - @@ -95,14 +83,6 @@ - - - - - - - -