00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef __CONNECTIONMONITOR_H
00024 #define __CONNECTIONMONITOR_H
00025
00026
00027 #include <e32base.h>
00028
00029
00030
00031
00032
00033 const TUint KBearer =1;
00034 const TUint KNetworkStatus =2;
00035 const TUint KConnectionStatus =3;
00036 const TUint KProtocolType =4;
00037 const TUint KNetworkRegistration =5;
00038 const TUint KSignalStrength =6;
00039 const TUint KNetworkMode =7;
00040 const TUint KSecurityMode =8;
00041 const TUint KBearerInfo =9;
00042
00043 const TUint KTrafficClass =30;
00044 const TUint KDeliveryOrder =31;
00045 const TUint KErroneousSDUDelivery =32;
00046 const TUint KResidualBitErrorRatio =33;
00047 const TUint KSDUErrorRatio =34;
00048
00049
00050
00051 const TUint KDownlinkData =100;
00052 const TUint KUplinkData =101;
00053 const TUint KIAPId =102;
00054 const TUint KNetworkIdentifier =103;
00055 const TUint KTransmitPower =104;
00056 const TUint KMobilePhoneNetworkMode =105;
00057 const TUint KMaximumBitrateDownlink =130;
00058 const TUint KMaximumBitrateUplink =131;
00059 const TUint KMaximumSDUSize =132;
00060 const TUint KTransferDelay =133;
00061 const TUint KGuaranteedBitrateDownlink =134;
00062 const TUint KGuaranteedBitrateUplink =135;
00063 const TUint KTrafficHandlingPriority =136;
00064 const TUint KActivityTimeThreshold =150;
00065 const TUint KDownlinkDataThreshold =151;
00066 const TUint KUplinkDataThreshold =152;
00067 const TUint KBearerAvailabilityThreshold =153;
00068 const TUint KSignalStrengthThreshold =154;
00069 const TUint KBearerGroupThreshold =155;
00070
00071
00072
00073
00074
00075
00076
00077 const TUint KConnectionActive =200;
00078 const TUint KBearerAvailability =201;
00079 const TUint KPacketDataAvailability =202;
00080
00081
00082 const TUint KConnectionStop =250;
00083 const TUint KConnectionStopAll =251;
00084
00085
00086
00087 const TUint KIAPName =300;
00088 const TUint KAccessPointName =301;
00089 const TUint KTelNumber =302;
00090 const TUint KNetworkName =303;
00091
00092
00093
00094 const TUint KStartTime =400;
00095 const TUint KClientInfo =401;
00096 const TUint KNetworkNames =402;
00097 const TUint KIapAvailability =403;
00098 const TUint KWLANNetworks =404;
00099 const TUint KSNAPsAvailability =405;
00100 const TUint KAvailableSNAPsIds =406;
00101 const TUint KWlanNetworks =407;
00102 const TUint KBearerGroupInfo =408;
00103
00104
00105
00106 const TUint KConnMonPluginAttributeBase =3000000;
00107
00108
00109
00110
00111 enum TConnMonBearerType
00112 {
00113 EBearerUnknown = 0,
00114 EBearerCSD = 1,
00115 EBearerWCDMA = 2,
00116 EBearerLAN = 3,
00117 EBearerCDMA2000 = 4,
00118 EBearerGPRS = 5,
00119 EBearerHSCSD = 6,
00120 EBearerEdgeGPRS = 7,
00121 EBearerWLAN = 8,
00122 EBearerBluetooth = 9,
00123 EBearerVirtual = 10,
00124 EBearerVirtualVPN = 11,
00125 EBearerWcdmaCSD = 12,
00126
00127 EBearerExternalCSD = 30,
00128 EBearerExternalWCDMA = 31,
00129 EBearerExternalLAN = 32,
00130 EBearerExternalCDMA2000 = 33,
00131 EBearerExternalGPRS = 34,
00132 EBearerExternalHSCSD = 35,
00133 EBearerExternalEdgeGPRS = 36,
00134 EBearerExternalWLAN = 37,
00135 EBearerExternalBluetooth = 38,
00136 EBearerExternalWcdmaCSD = 39,
00137 };
00138
00139
00140 enum TConnMonBearerId
00141 {
00142 EBearerIdAll = 0,
00143 EBearerIdGPRS = 2000000,
00144 EBearerIdWCDMA = 2000001,
00145 EBearerIdCSD = 2000002,
00146 EBearerIdGSM = 2000003,
00147 EBearerIdWLAN = 2000004,
00148 EBearerIdLAN = 2000005,
00149 EBearerIdWcdmaCSD = 2000006,
00150 EBearerIdCDMA2000 = 2000007,
00151 EBearerIdVirtualVPN = 2000008
00152 };
00153
00154
00155 enum TConnMonNetworkStatus
00156 {
00157 EConnMonStatusNotAvailable = 0,
00158 EConnMonStatusUnattached,
00159 EConnMonStatusAttached,
00160 EConnMonStatusActive,
00161 EConnMonStatusSuspended
00162 };
00163
00164
00165
00166 enum TConnMonProtocolType
00167 {
00168 EProtocolTypeUnknown = 0,
00169 EProtocolTypeIPv4,
00170 EProtocolTypeIPv6,
00171 EProtocolTypeX25,
00172 EProtocolTypePPP,
00173 EProtocolTypeCDPD,
00174 EProtocolTypeIP
00175 };
00176
00177
00178 enum TConnMonAsyncRequest
00179 {
00180 EConnMonGetConnectionCount = 1,
00181 EConnMonGetIntAttribute,
00182 EConnMonGetUintAttribute,
00183 EConnMonGetBoolAttribute,
00184 EConnMonGetStringAttribute,
00185 EConnMonGetPckgAttribute
00186 };
00187
00188
00189 enum TConnMonEvent
00190 {
00191 EConnMonCreateConnection = 1,
00192 EConnMonDeleteConnection = 2,
00193 EConnMonCreateSubConnection = 3,
00194 EConnMonDeleteSubConnection = 4,
00195 EConnMonDownlinkDataThreshold = 5,
00196 EConnMonUplinkDataThreshold = 6,
00197 EConnMonNetworkStatusChange = 7,
00198 EConnMonConnectionStatusChange = 8,
00199 EConnMonConnectionActivityChange = 9,
00200 EConnMonNetworkRegistrationChange = 10,
00201 EConnMonBearerChange = 11,
00202 EConnMonSignalStrengthChange = 12,
00203 EConnMonBearerAvailabilityChange = 13,
00204 EConnMonIapAvailabilityChange = 14,
00205 EConnMonTransmitPowerChange = 15,
00206 EConnMonSNAPsAvailabilityChange = 16,
00207 EConnMonNewWLANNetworkDetected = 17,
00208 EConnMonOldWLANNetworkLost = 18,
00209 EConnMonPacketDataAvailable = 19,
00210
00211
00212
00213
00214 EConnMonPacketDataUnavailable = 20,
00215
00216
00217
00218 EConnMonBearerInfoChange = 21,
00219 EConnMonBearerGroupChange = 22,
00220
00221 EConnMonPluginEventBase = 4000000
00222 };
00223
00224
00225 enum TConnMonNetworkRegistration
00226 {
00227 ENetworkRegistrationNotAvailable = 0,
00228 ENetworkRegistrationUnknown,
00229 ENetworkRegistrationNoService,
00230 ENetworkRegistrationEmergencyOnly,
00231 ENetworkRegistrationSearching,
00232 ENetworkRegistrationBusy,
00233 ENetworkRegistrationHomeNetwork,
00234 ENetworkRegistrationDenied,
00235 ENetworkRegistrationRoaming
00236 };
00237
00238
00239 enum TQosTrafficClass
00240 {
00241 EQosTrafficClassConversational = 1,
00242 EQosTrafficClassStreaming,
00243 EQosTrafficClassInteractive,
00244 EQosTrafficClassBackground
00245 };
00246
00247
00248 enum TQosDeliveryOrder
00249 {
00250 EQosDeliveryOrderYes = 1,
00251 EQosDeliveryOrderNo
00252 };
00253
00254
00255 enum TQosErroneousSDUDelivery
00256 {
00257 EQosErroneousSDUDeliveryYes = 1,
00258 EQosErroneousSDUDeliveryNo,
00259 EQosErroneousSDUDeliveryUnspecified
00260 };
00261
00262
00263 enum TQosBitErrorRatio
00264 {
00265 EQosBERFivePerHundred = 1,
00266 EQosBEROnePerHundred,
00267 EQosBERFivePerThousand,
00268 EQosBEROnePerThousand,
00269 EQosBEROnePerTenThousand,
00270 EQosBEROnePerMillion
00271 };
00272
00273
00274 enum TQosSDUErrorRatio
00275 {
00276 EQosSDUErrorRatioOnePerHundred = 1,
00277 EQosSDUErrorRatioSevenPerThousand,
00278 EQosSDUErrorRatioOnePerThousand,
00279 EQosSDUErrorRatioOnePerTenThousand,
00280 EQosSDUErrorRatioOnePerHundredThousand
00281 };
00282
00283
00284 enum TConnMonRequests
00285 {
00286 EReqGetConnectionCount = 0,
00287 EReqGetConnectionInfo = 1,
00288 EReqGetSubConnectionInfo = 2,
00289 EReqGetIntAttribute = 3,
00290 EReqGetUintAttribute = 4,
00291 EReqGetBoolAttribute = 5,
00292 EReqGetStringAttribute = 6,
00293 EReqGetPckgAttribute = 7,
00294 EReqSetIntAttribute = 8,
00295 EReqSetUintAttribute = 9,
00296 EReqSetBoolAttribute = 10,
00297 EReqSetStringAttribute = 11,
00298 EReqSetPckgAttribute = 12,
00299 EReqCancelAsyncRequest = 13,
00300 EReqReceiveEvent = 14,
00301 EReqCancelReceiveEvent = 15,
00302
00303 EReqPluginCreateSubSession = 500,
00304 EReqPluginCloseSubSession = 501,
00305 EReqPluginRegisterAttribute = 502,
00306 EReqPluginCancelRegisterAttribute = 503,
00307 EReqPluginEvent = 504,
00308 EReqPluginGetQuery = 505,
00309 EReqPluginCancelGetQuery = 506,
00310 EReqPluginAttribute = 507,
00311
00312 EReqInternalSetThreshold = 600,
00313 EReqInternalResetThreshold = 601
00314 };
00315
00316
00317 enum TConnMonNetworkMode
00318 {
00319 EConnMonInfraStructure = 0,
00320 EConnMonAdHoc = 1,
00321 EConnMonSecureInfra = 2
00322 };
00323
00324
00325 enum TConnMonSecurityMode
00326 {
00327 EConnMonSecurityOpen = 0,
00328 EConnMonSecurityWep = 1,
00329 EConnMonSecurity802d1x = 2,
00330 EConnMonSecurityWpa = 3,
00331 EConnMonSecurityWpaPsk = 4
00332 };
00333
00337 enum TConnMonMobilePhoneNetworkMode
00338 {
00342 EConnMonNetworkModeUnknown = 0,
00346 EConnMonNetworkModeUnregistered,
00348 EConnMonNetworkModeGsm,
00352 EConnMonNetworkModeAmps,
00356 EConnMonNetworkModeCdma95,
00360 EConnMonNetworkModeCdma2000,
00364 EConnMonNetworkModeWcdma,
00368 EConnMonNetworkModeTdcdma
00369 };
00370
00371
00372
00373 const TUint KConnMonMaxPluginDataSize = 512;
00374 const TUint KConnMonMaxStringAttributeLength = 64;
00375
00376
00377
00378 typedef TPckgBuf< TTime > TConnMonTimeBuf;
00379
00380
00381 const TUint KConnMonMaxClientUids = 10;
00382
00383 class TConnMonClientEnum
00384 {
00385 public:
00386 inline TConnMonClientEnum():iCount(0){}
00387 public:
00388 TUint iCount;
00389 TUid iUid[ KConnMonMaxClientUids ];
00390 };
00391 typedef TPckgBuf< TConnMonClientEnum > TConnMonClientEnumBuf;
00392
00393
00394 const TUint KConnMonMaxNetworkCount = 10;
00395
00396 class TConnMonNetwork
00397 {
00398 public:
00399 inline TConnMonNetwork():iType(0), iSignalStrength(0){}
00400 public:
00401 TBuf8< 32 > iName;
00402 TInt8 iType;
00403 TUint8 iSignalStrength;
00404 };
00405
00406 class TConnMonNetworkNames
00407 {
00408 public:
00409 inline TConnMonNetworkNames():iCount(0){}
00410 inline TUint Count() {return iCount;}
00411 public:
00412 TUint iCount;
00413 TConnMonNetwork iNetwork[ KConnMonMaxNetworkCount ];
00414 };
00415
00416 typedef TPckgBuf< TConnMonNetworkNames > TConnMonNetworkNamesBuf;
00417
00418
00419 const TUint KConnMonMaxIAPCount = 25;
00420
00421 class TConnMonIap
00422 {
00423 public:
00424 inline TConnMonIap():iIapId(0){}
00425 public:
00426 TUint iIapId;
00427 };
00428
00429 class TConnMonIapInfo
00430 {
00431 public:
00432 inline TConnMonIapInfo():iCount(0){}
00433 inline TUint Count() {return iCount;}
00434 public:
00435 TUint iCount;
00436 TConnMonIap iIap[ KConnMonMaxIAPCount ];
00437 };
00438
00439 typedef TPckgBuf< TConnMonIapInfo > TConnMonIapInfoBuf;
00440
00441
00442 const TUint KConnMonMaxSNAPsCount = 25;
00443
00444 class TConnMonSNAPId
00445 {
00446 public:
00447 inline TConnMonSNAPId():iSNAPId(0){}
00448 public:
00449 TUint iSNAPId;
00450 };
00451
00452 class TConnMonSNAPInfo
00453 {
00454 public:
00455 inline TConnMonSNAPInfo():iCount(0){}
00456 inline TUint Count() {return iCount;}
00457 public:
00458 TUint iCount;
00459 TConnMonSNAPId iSNAP[ KConnMonMaxSNAPsCount ];
00460 };
00461
00462 typedef TPckgBuf< TConnMonSNAPInfo > TConnMonSNAPInfoBuf;
00463
00464
00465
00466 enum TConnMonBearerGroup
00467 {
00468 EBearerGroupUnknown = 0,
00469 EBearerGroupCellular = 0x00000001,
00470 EBearerGroupNonCellular = 0x00000002,
00471 EBearerGroupCellularPacket = 0x00000004,
00472 EBearerGroupCircuitSwitched = 0x00000008,
00473 EBearerGroup2G = 0x00000010,
00474 EBearerGroup2GPacket = 0x00000020,
00475 EBearerGroup3G = 0x00000040,
00476 EBearerGroup3GPacket = 0x00000080,
00477 EBearerGroupHSPA = 0x00000100,
00478 EBearerGroupLANBased = 0x00000200,
00479 EBearerGroupWLAN = 0x00000400,
00480 EBearerGroupIPOverConnectivityProtocol = 0x00000800,
00481 EBearerGroupWired = 0x00001000,
00482 EBearerGroupVirtual = 0x00002000
00483 };
00484
00485
00486
00487
00488 enum TConnMonBearerInfo
00489 {
00490 EBearerInfoUnknown = 0,
00491 EBearerInfoCSD,
00492 EBearerInfoWCDMA,
00493 EBearerInfoLAN,
00494 EBearerInfoCDMA2000,
00495 EBearerInfoGPRS,
00496 EBearerInfoHSCSD,
00497 EBearerInfoEdgeGPRS,
00498 EBearerInfoWLAN,
00499 EBearerInfoBluetooth,
00500 EBearerInfoVirtual,
00501 EBearerInfoVirtualVPN,
00502 EBearerInfoWcdmaCSD,
00503 EBearerInfoHSDPA,
00504 EBearerInfoHSUPA,
00505 EBearerInfoHSxPA
00506 };
00507
00508
00509 class TConnMonBearerGroupInfo
00510 {
00511 public:
00512 inline TConnMonBearerGroupInfo():iInternal( ETrue ),
00513 iBearerGroups( 0 ),
00514 iBearerGroups2( 0 ){}
00515 public:
00516 TBool iInternal;
00517 TUint iBearerGroups;
00518 TUint iBearerGroups2;
00519 };
00520
00521 typedef TPckgBuf<TConnMonBearerGroupInfo> TConnMonBearerGroupInfoBuf;
00522
00523
00532 NONSHARABLE_CLASS( CConnMonWlanNetwork ): public CBase
00533 {
00534 public:
00535
00536
00537 static const TUint KMaxNameLength = 32;
00538
00539
00540 static const TUint KWlanBssId = 6;
00541
00542
00543 static const TUint KExtraCount = 10;
00544
00556 IMPORT_C static CConnMonWlanNetwork* NewL( const TBuf<KMaxNameLength>& aName,
00557 TUint aConnectionMode,
00558 TUint aSignalStrength,
00559 TUint aSecurityMode,
00560 const TBuf8<KWlanBssId>& aBssId,
00561 const TDesC& aVendorData );
00562
00570 IMPORT_C static CConnMonWlanNetwork* NewL();
00571
00578 IMPORT_C static CConnMonWlanNetwork* NewL( CConnMonWlanNetwork& aConnMonWlanNetwork );
00579
00583 IMPORT_C ~CConnMonWlanNetwork();
00584
00590 IMPORT_C CConnMonWlanNetwork& operator=( CConnMonWlanNetwork& aConnMonWlanNetwork );
00591
00600 IMPORT_C static TInt CompareBySignal( const CConnMonWlanNetwork& aFirst,
00601 const CConnMonWlanNetwork& aSecond );
00602
00609 inline TBuf<KMaxNameLength> Name()
00610 {
00611 return iName;
00612 };
00613
00620 inline TUint ConnectionMode()
00621 {
00622 return iConnectionMode;
00623 };
00624
00630 inline TUint SignalStrength()
00631 {
00632 return iSignalStrength;
00633 };
00634
00640 inline TUint SecurityMode()
00641 {
00642 return iSecurityMode;
00643 };
00644
00651 inline TBuf8<KWlanBssId> WlanBssid()
00652 {
00653 return iWlanBssId;
00654 };
00655
00664 inline HBufC* VendorData()
00665 {
00666 return iVendorData;
00667 };
00668
00675 const HBufC* ToBuf() const;
00676
00683 static TInt FromPtrC( const TPtrC& aPtrC,
00684 CConnMonWlanNetwork* aConnMonWlanNetwork );
00685
00686 private:
00687
00692 CConnMonWlanNetwork();
00693
00704 CConnMonWlanNetwork( const TBuf<KMaxNameLength>& aName,
00705 TUint aConnectionMode,
00706 TUint aSignalStrength,
00707 TUint aSecurityMode,
00708 const TBuf8<KWlanBssId>& aBssId,
00709 const TDesC& aVendorData );
00710
00715 void ConstructL();
00716
00717
00718
00719 private:
00720
00721 TBuf<KMaxNameLength> iName;
00722 TUint iConnectionMode;
00723 TUint iSignalStrength;
00724 TUint iSecurityMode;
00725 TBuf8<KWlanBssId> iWlanBssId;
00726 HBufC* iVendorData;
00727 TUint iExtraBuf[KExtraCount];
00728 };
00729
00730
00731 typedef RPointerArray<CConnMonWlanNetwork> RConnMonWlanNetworksPtrArray;
00732
00733
00740 class CConnMonWlanNetworksPtrArrayPckg : public CBase
00741 {
00742 public:
00743
00751 CConnMonWlanNetworksPtrArrayPckg(const RPointerArray<CConnMonWlanNetwork>& aRef,
00752 TUint aBufSize);
00753
00759 IMPORT_C CConnMonWlanNetworksPtrArrayPckg(TUint aBufSize);
00760
00764 IMPORT_C virtual ~CConnMonWlanNetworksPtrArrayPckg();
00765
00772 IMPORT_C void UnpackToL(RPointerArray<CConnMonWlanNetwork>& aRef) const;
00773
00779 IMPORT_C HBufC* Buf() const;
00780
00781
00782 private:
00783
00787 HBufC* iBuf;
00788
00789 };
00790
00797 template <class T>
00798 class MDesSerializer
00799 {
00800 public:
00801
00808 virtual const HBufC* ToBuf() const = 0;
00809
00815 static T FromPtrC(const TPtrC& aPtrC);
00816
00817 };
00818
00826 class TConnMonId : public MDesSerializer<TConnMonId>
00827 {
00828
00829 public:
00830
00831
00832 static const TUint KMaxSize = (
00833 sizeof(TUid)
00834 )/ sizeof(TChar) + 1;
00835
00836
00837 enum FieldsShifts
00838 {
00839 EId = 0
00840 };
00841
00846 IMPORT_C TConnMonId(TUint aId);
00847
00854 IMPORT_C TUint Id() const;
00855
00856
00857
00861 IMPORT_C const HBufC* ToBuf() const;
00862
00866 IMPORT_C static TConnMonId FromPtrC(const TPtrC& aPtrC);
00867
00868 protected:
00869
00870 private:
00871
00872 protected:
00873
00877 const TUint iId;
00878
00879 private:
00880
00881 };
00882
00883
00884 typedef RArray<TConnMonId> RConnMonIdsArray;
00885
00892 class ConnMonIdsArrayPckg
00893 {
00894 public:
00895
00902 ConnMonIdsArrayPckg(const RArray<TConnMonId>& aRef, TUint aBufSize);
00903
00909 IMPORT_C ConnMonIdsArrayPckg(TUint aBufSize);
00910
00914 IMPORT_C virtual ~ConnMonIdsArrayPckg();
00915
00921 IMPORT_C void UnpackToL(RArray<TConnMonId>& aRef) const;
00922
00928 IMPORT_C HBufC* Buf() const;
00929
00930
00931 protected:
00932
00936 HBufC* iBuf;
00937
00938 };
00939
00940
00941 class CConnMonEventBase;
00942 class CConnMonEventHandler;
00943
00944
00954 class MConnectionMonitorObserver
00955 {
00956 public:
00963 virtual void EventL( const CConnMonEventBase &aConnMonEvent ) =0;
00964 };
00965
00971 class RConnectionMonitor : public RSessionBase
00972 {
00973 public:
00974 inline RConnectionMonitor() : RSessionBase(), iHandler( 0 ), iPtrArray(), iIndex( 0 ) {};
00975
00976 public:
00983 IMPORT_C TInt ConnectL();
00984
00991 IMPORT_C void Close();
00992
01000 IMPORT_C void GetConnectionCount( TUint& aConnectionCount, TRequestStatus& aStatus );
01001
01011 IMPORT_C TInt GetConnectionInfo( const TUint aIndex,
01012 TUint& aConnectionId,
01013 TUint& aSubConnectionCount ) const;
01014
01022 IMPORT_C TInt GetSubConnectionInfo( const TUint aConnectionId,
01023 const TUint aIndex,
01024 TUint& aSubConnectionId ) const;
01025
01035 IMPORT_C void GetIntAttribute( const TUint aConnectionId,
01036 const TUint aSubConnectionId,
01037 const TUint aAttribute,
01038 TInt& aValue,
01039 TRequestStatus& aStatus );
01040
01050 IMPORT_C void GetUintAttribute( const TUint aConnectionId,
01051 const TUint aSubConnectionId,
01052 const TUint aAttribute,
01053 TUint& aValue,
01054 TRequestStatus& aStatus );
01055
01065 IMPORT_C void GetBoolAttribute( const TUint aConnectionId,
01066 const TUint aSubConnectionId,
01067 const TUint aAttribute,
01068 TBool& aValue,
01069 TRequestStatus& aStatus );
01070
01080 IMPORT_C void GetStringAttribute( const TUint aConnectionId,
01081 const TUint aSubConnectionId,
01082 const TUint aAttribute,
01083 TDes& aValue,
01084 TRequestStatus& aStatus ) const;
01085
01095 IMPORT_C void GetPckgAttribute( const TUint aConnectionId,
01096 const TUint aSubConnectionId,
01097 const TUint aAttribute,
01098 TDes8& aValue,
01099 TRequestStatus& aStatus ) const;
01100
01110 IMPORT_C void GetPckgAttribute( const TUint aConnectionId,
01111 const TUint aSubConnectionId,
01112 const TUint aAttribute,
01113 TDes16& aValue,
01114 TRequestStatus& aStatus ) const;
01115
01124 IMPORT_C TInt SetIntAttribute( const TUint aConnectionId,
01125 const TUint aSubConnectionId,
01126 const TUint aAttribute,
01127 const TInt aValue ) const;
01128
01137 IMPORT_C TInt SetUintAttribute( const TUint aConnectionId,
01138 const TUint aSubConnectionId,
01139 const TUint aAttribute,
01140 const TUint aValue ) const;
01141
01151 IMPORT_C TInt SetBoolAttribute( const TUint aConnectionId,
01152 const TUint aSubConnectionId,
01153 const TUint aAttribute,
01154 const TBool aValue ) const;
01155
01164 IMPORT_C TInt SetStringAttribute( const TUint aConnectionId,
01165 const TUint aSubConnectionId,
01166 const TUint aAttribute,
01167 const TDes& aValue ) const;
01168
01177 IMPORT_C TInt SetPckgAttribute( const TUint aConnectionId,
01178 const TUint aSubConnectionId,
01179 const TUint aAttribute,
01180 const TDes8& aValue ) const;
01181
01188 IMPORT_C void CancelAsyncRequest( TInt aReqToCancel );
01189
01195 IMPORT_C TInt NotifyEventL( MConnectionMonitorObserver& aObserver );
01196
01201 IMPORT_C void CancelNotifications();
01202
01203 private:
01204 void ReceiveEvent( TDes8& aBuffer, TDes8& aExtraBuf, TRequestStatus& aStatus );
01205 void CancelReceiveEvent();
01206 TBool IsConnected() const;
01207 TPtr8& NextPtr();
01208
01209 private:
01210 CConnMonEventHandler* iHandler;
01211 RArray< TPtr8 > iPtrArray;
01212 TInt iIndex;
01213
01214 private:
01215 friend class CConnMonEventHandler;
01216 };
01217
01224 NONSHARABLE_CLASS( CConnMonEventBase ) : public CBase
01225 {
01226 public:
01227 CConnMonEventBase( const TInt aEventType, const TUint iConnectionId );
01228 ~CConnMonEventBase();
01229
01230 public:
01235 IMPORT_C TInt EventType() const;
01236
01241 IMPORT_C TUint ConnectionId() const;
01242
01243 private:
01244 TInt iEventType;
01245 TUint iConnectionId;
01246 };
01247
01254 NONSHARABLE_CLASS( CConnMonCreateConnection ) : public CConnMonEventBase
01255 {
01256 public:
01257 CConnMonCreateConnection( const TUint aConnectionId );
01258 ~CConnMonCreateConnection();
01259 };
01260
01267 NONSHARABLE_CLASS( CConnMonDeleteConnection ) : public CConnMonEventBase
01268 {
01269 public:
01270 CConnMonDeleteConnection( const TUint aConnectionId,
01271 const TUint aDownlinkData,
01272 const TUint aUplinkData,
01273 const TBool aAuthDelete );
01274 ~CConnMonDeleteConnection();
01275
01276 public:
01281 IMPORT_C TUint DownlinkData() const;
01282
01287 IMPORT_C TUint UplinkData() const;
01288
01296 IMPORT_C TBool AuthoritativeDelete() const;
01297
01298 private:
01299 TUint iDownlinkData;
01300 TUint iUplinkData;
01301 TBool iAuthDelete;
01302 };
01303
01310 NONSHARABLE_CLASS( CConnMonCreateSubConnection ) : public CConnMonEventBase
01311 {
01312 public:
01313 CConnMonCreateSubConnection( const TUint aConnectionId,
01314 const TUint aSubConnectionId );
01315 ~CConnMonCreateSubConnection();
01316
01317 public:
01322 IMPORT_C TUint SubConnectionId() const;
01323
01324 private:
01325 TUint iSubConnectionId;
01326 };
01327
01334 NONSHARABLE_CLASS( CConnMonDeleteSubConnection ) : public CConnMonEventBase
01335 {
01336 public:
01337 CConnMonDeleteSubConnection( const TUint aConnectionId,
01338 const TUint aSubConnectionId,
01339 const TUint aDownlinkData,
01340 const TUint aUplinkData,
01341 const TBool aAuthDelete );
01342 ~CConnMonDeleteSubConnection();
01343
01344 public:
01349 IMPORT_C TUint SubConnectionId() const;
01350
01355 IMPORT_C TUint DownlinkData() const;
01356
01361 IMPORT_C TUint UplinkData() const;
01362
01370 IMPORT_C TBool AuthoritativeDelete() const;
01371
01372 private:
01373 TUint iSubConnectionId;
01374 TUint iDownlinkData;
01375 TUint iUplinkData;
01376 TBool iAuthDelete;
01377 };
01378
01388 NONSHARABLE_CLASS( CConnMonDownlinkDataThreshold ) : public CConnMonEventBase
01389 {
01390 public:
01391 CConnMonDownlinkDataThreshold( const TUint aConnectionId,
01392 const TUint aSubConnectionId,
01393 const TUint aDownlinkData );
01394 ~CConnMonDownlinkDataThreshold();
01395
01396 public:
01401 IMPORT_C TUint SubConnectionId() const;
01402
01407 IMPORT_C TUint DownlinkData() const;
01408
01409 private:
01410 TUint iSubConnectionId;
01411 TUint iDownlinkData;
01412 };
01413
01423 NONSHARABLE_CLASS( CConnMonUplinkDataThreshold ) : public CConnMonEventBase
01424 {
01425 public:
01426 CConnMonUplinkDataThreshold( const TUint aConnectionId,
01427 const TUint aSubConnectionId,
01428 const TUint aUplinkData );
01429 ~CConnMonUplinkDataThreshold();
01430
01431 public:
01436 IMPORT_C TUint SubConnectionId() const;
01437
01442 IMPORT_C TUint UplinkData() const;
01443
01444 private:
01445 TUint iSubConnectionId;
01446 TUint iUplinkData;
01447 };
01448
01456 NONSHARABLE_CLASS( CConnMonNetworkStatusChange ) : public CConnMonEventBase
01457 {
01458 public:
01459 CConnMonNetworkStatusChange( const TUint aConnectionId,
01460 const TInt aNetworkStatus );
01461 ~CConnMonNetworkStatusChange();
01462
01463 public:
01468 IMPORT_C TInt NetworkStatus() const;
01469
01470 private:
01471 TInt iNetworkStatus;
01472 };
01473
01480 NONSHARABLE_CLASS( CConnMonConnectionStatusChange ) : public CConnMonEventBase
01481 {
01482 public:
01483 CConnMonConnectionStatusChange( const TUint aConnectionId,
01484 const TUint aSubConnectionId,
01485 const TInt aConnectionStatus );
01486 ~CConnMonConnectionStatusChange();
01487
01488 public:
01493 IMPORT_C TUint SubConnectionId() const;
01494
01499 IMPORT_C TInt ConnectionStatus() const;
01500
01501 private:
01502 TUint iSubConnectionId;
01503 TInt iConnectionStatus;
01504 };
01505
01515 NONSHARABLE_CLASS( CConnMonConnectionActivityChange ) : public CConnMonEventBase
01516 {
01517 public:
01518 CConnMonConnectionActivityChange( const TUint aConnectionId,
01519 const TUint aSubConnectionId,
01520 const TBool aActivity );
01521 ~CConnMonConnectionActivityChange();
01522
01523 public:
01528 IMPORT_C TUint SubConnectionId() const;
01529
01534 IMPORT_C TBool ConnectionActivity() const;
01535
01536 private:
01537 TUint iSubConnectionId;
01538 TBool iActivity;
01539 };
01540
01549 NONSHARABLE_CLASS( CConnMonNetworkRegistrationChange ) : public CConnMonEventBase
01550 {
01551 public:
01552 CConnMonNetworkRegistrationChange( const TUint aConnectionId,
01553 const TInt aRegistrationStatus );
01554 ~CConnMonNetworkRegistrationChange();
01555
01556 public:
01561 IMPORT_C TInt RegistrationStatus() const;
01562
01563 private:
01564 TInt iRegistrationStatus;
01565 };
01566
01575 NONSHARABLE_CLASS( CConnMonBearerChange ) : public CConnMonEventBase
01576 {
01577 public:
01578 CConnMonBearerChange( const TUint aConnectionId, const TInt aBearer );
01579 ~CConnMonBearerChange();
01580
01581 public:
01586 IMPORT_C TInt Bearer() const;
01587
01588 private:
01589 TInt iBearer;
01590 };
01591
01603 NONSHARABLE_CLASS( CConnMonSignalStrengthChange ) : public CConnMonEventBase
01604 {
01605 public:
01606 CConnMonSignalStrengthChange( const TUint aConnectionId, const TInt aSignalStrength );
01607 ~CConnMonSignalStrengthChange();
01608
01609 public:
01614 IMPORT_C TInt SignalStrength() const;
01615
01616 private:
01617 TInt iSignalStrength;
01618 };
01619
01630 NONSHARABLE_CLASS( CConnMonBearerAvailabilityChange ) : public CConnMonEventBase
01631 {
01632 public:
01633 CConnMonBearerAvailabilityChange( const TUint aConnectionId,
01634 const TBool aAvailability );
01635 ~CConnMonBearerAvailabilityChange();
01636
01637 public:
01642 IMPORT_C TBool Availability() const;
01643
01644 private:
01645 TBool iAvailability;
01646 };
01647
01656 NONSHARABLE_CLASS( CConnMonGenericEvent ) : public CConnMonEventBase
01657 {
01658 public:
01659 CConnMonGenericEvent( const TUint aType,
01660 const TUint aConnectionId,
01661 TAny* aData );
01662 ~CConnMonGenericEvent();
01663
01664 public:
01670 IMPORT_C TAny* Data() const;
01671
01672 private:
01673 TAny* iData;
01674 };
01675
01683 NONSHARABLE_CLASS( CConnMonIapAvailabilityChange ) : public CConnMonEventBase
01684 {
01685 public:
01686 CConnMonIapAvailabilityChange( const TUint aConnectionId,
01687 const TConnMonIapInfo* aIapInfoPtr );
01688 ~CConnMonIapAvailabilityChange();
01689
01690 public:
01695 IMPORT_C TConnMonIapInfo IapAvailability() const;
01696
01697 private:
01698 TConnMonIapInfo iIapInfo;
01699 };
01700
01708 NONSHARABLE_CLASS( CConnMonTransmitPowerChange ) : public CConnMonEventBase
01709 {
01710 public:
01711 CConnMonTransmitPowerChange( const TUint aConnectionId, const TUint aTransmitPower );
01712 ~CConnMonTransmitPowerChange();
01713
01714 public:
01719 IMPORT_C TUint TransmitPower() const;
01720
01721 private:
01722 TUint iTransmitPower;
01723 };
01724
01732 NONSHARABLE_CLASS( CConnMonSNAPsAvailabilityChange ) : public CConnMonEventBase
01733 {
01734 public:
01735 CConnMonSNAPsAvailabilityChange( const TUint aConnectionId,
01736 const TUint aSNAPsAvailable,
01737 const TConnMonSNAPInfo* aSNAPInfoPtr );
01738 ~CConnMonSNAPsAvailabilityChange();
01739
01740 public:
01745 IMPORT_C TConnMonSNAPInfo SNAPAvailability() const;
01746
01751 IMPORT_C TUint SNAPsAvailabile() const;
01752
01753 private:
01754 TConnMonSNAPInfo iSNAPInfo;
01755 TUint iSNAPsAvailable;
01756 };
01757
01766 NONSHARABLE_CLASS( CConnMonNewWLANNetworkDetected ) : public CConnMonEventBase
01767 {
01768 public:
01769 CConnMonNewWLANNetworkDetected( const TUint aConnectionId
01770 );
01771 ~CConnMonNewWLANNetworkDetected();
01772
01773 public:
01778
01779
01780
01781
01782 };
01783
01792 NONSHARABLE_CLASS( CConnMonOldWLANNetworkLost ) : public CConnMonEventBase
01793 {
01794 public:
01795 CConnMonOldWLANNetworkLost( const TUint aConnectionId
01796 );
01797 ~CConnMonOldWLANNetworkLost();
01798
01799 public:
01804
01805
01806 private:
01807
01808 };
01818 NONSHARABLE_CLASS( CConnMonPacketDataUnavailable ) :
01819 public CConnMonEventBase
01820 {
01821 public:
01827 CConnMonPacketDataUnavailable( const TUint aConnectionId );
01828
01832 virtual ~CConnMonPacketDataUnavailable();
01833 };
01834
01845 NONSHARABLE_CLASS( CConnMonPacketDataAvailable ) :
01846 public CConnMonEventBase
01847 {
01848 public:
01854 CConnMonPacketDataAvailable( const TUint aConnectionId );
01855
01859 virtual ~CConnMonPacketDataAvailable();
01860 };
01861
01869 NONSHARABLE_CLASS( CConnMonBearerInfoChange ) : public CConnMonEventBase
01870 {
01871 public:
01872 CConnMonBearerInfoChange( const TUint aConnectionId,
01873 const TInt aBearerInfo );
01874 ~CConnMonBearerInfoChange();
01875
01876 public:
01881 IMPORT_C TInt BearerInfo() const;
01882
01883 private:
01884 TInt iBearerInfo;
01885 };
01886
01893 NONSHARABLE_CLASS( CConnMonBearerGroupChange ) : public CConnMonEventBase
01894 {
01895 public:
01896 CConnMonBearerGroupChange( const TUint aConnectionId,
01897 const TUint aBearerGroups1,
01898 const TUint aBearerGroups2,
01899 const TBool aInternal );
01900 ~CConnMonBearerGroupChange();
01901
01902 public:
01907 IMPORT_C void BearerGroups( TUint& aBearerGroups1,
01908 TUint& aBearerGroups2 ) const;
01909
01916 IMPORT_C TBool Internal() const;
01917
01918 private:
01919 TBool iInternal;
01920 TUint iBearerGroups1;
01921 TUint iBearerGroups2;
01922 };
01923
01924
01925 #endif
01926