connectionmonitoring/connmon/connectionmonitor/inc/ConnMonNoti.h
changeset 0 5a93021fdf25
child 23 fc7b30ed2058
equal deleted inserted replaced
-1:000000000000 0:5a93021fdf25
       
     1 /*
       
     2 * Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Event notifiers (active objects).
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __CONNMONNOTI_H
       
    19 #define __CONNMONNOTI_H
       
    20 
       
    21 #include <es_sock.h>
       
    22 #include <in_sock.h>
       
    23 #include <es_enum.h>
       
    24 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
       
    25 #include <es_enum_internal.h>
       
    26 #endif
       
    27 
       
    28 class CConnMonIAP;
       
    29 class CConnMonServer;
       
    30 
       
    31 const TInt KNoFiltering = -1;
       
    32 const TInt KActivityTimeout = 1800000; // 1,8 sec
       
    33 // Update ConnMon documentation (attribute KConnectionActive) if changing this
       
    34 // value (KOneTimeQueryThreshold = 1)
       
    35 const TUint KOneTimeQueryThreshold = 1;
       
    36 const TUint KInvalidIapCount = 99999;
       
    37 
       
    38 // Stop requesting new notifications after this many consecutive errors (CBearerNotifier)
       
    39 const TInt KConnMonEventErrorThreshold = 20;
       
    40 
       
    41 /**
       
    42 *  CConnUpDownNotifier
       
    43 *  @lib CONNMON.LIB
       
    44 *  @since
       
    45 */
       
    46 NONSHARABLE_CLASS( CConnUpDownNotifier ) : public CActive
       
    47     {
       
    48     public: // Constructors and destructor
       
    49         CConnUpDownNotifier( CConnMonServer* aServer );
       
    50         void Construct();
       
    51         virtual ~CConnUpDownNotifier();
       
    52 
       
    53     public:  // New methods
       
    54         /**
       
    55         * Requests a new event (connection up/down) from RConnection.
       
    56         * @since
       
    57         * @return void
       
    58         */
       
    59         void Receive();
       
    60 
       
    61     private: // Methods from base classes
       
    62          /**
       
    63         * From CActive Cancels the asyncronous request
       
    64         * @since
       
    65         * @return void
       
    66         */
       
    67         void DoCancel();
       
    68 
       
    69          /**
       
    70         * From CActive Handles the the event that has arrived from RConnection.
       
    71         * @since
       
    72         * @return void
       
    73         */
       
    74         void RunL();
       
    75 
       
    76     private: // Data
       
    77         CConnMonServer*           iServer;
       
    78         TEventInfo                iEventInfo;
       
    79         TInterfaceNotificationBuf iInfoBuf;
       
    80         TInt                      iErrorCounter;
       
    81     };
       
    82 
       
    83 /**
       
    84 *  CDataNotifier
       
    85 *  @lib CONNMON.LIB
       
    86 *  @since
       
    87 */
       
    88 NONSHARABLE_CLASS( CDataNotifier ) : public CActive
       
    89     {
       
    90     public: // Constructors and destructor
       
    91         enum TDataDirection
       
    92              {
       
    93              EDownlink = 0,
       
    94              EUplink
       
    95              };
       
    96 
       
    97         CDataNotifier(
       
    98                 CConnMonServer* aServer,
       
    99                 RConnection* aConnection,
       
   100                 const TUint& aConnectionId,
       
   101                 const TUint& aSubConnectionId,
       
   102                 const TInt& aDirection );
       
   103         void Construct();
       
   104         virtual ~CDataNotifier();
       
   105 
       
   106 
       
   107     public: // New methods
       
   108         /**
       
   109         * Requests a new event (data transferred) from RConnection.
       
   110         * @since
       
   111         * @return void
       
   112         */
       
   113         void Receive();
       
   114 
       
   115     private: // Methods from base classes
       
   116          /**
       
   117         * From CActive Cancels the asyncronous request
       
   118         * @since
       
   119         * @return void
       
   120         */
       
   121         void DoCancel();
       
   122 
       
   123         /**
       
   124         * From CActive Handles the the event that has arrived from RConnection.
       
   125         * @since
       
   126         * @return void
       
   127         */
       
   128         void RunL();
       
   129 
       
   130     private: // Data
       
   131         CConnMonServer* iServer;
       
   132         RConnection*    iConnection;
       
   133         const TUint     iConnectionId;
       
   134         const TUint     iSubConnectionId;
       
   135         const TInt      iDirection;
       
   136         TUint           iVolume;
       
   137         TPckg<TUint>    iPckgVolume;
       
   138         TUint           iThreshold;
       
   139         TEventInfo      iEventInfo;
       
   140         TInt            iErrorCounter;
       
   141     };
       
   142 
       
   143 /**
       
   144 *  CProgressNotifier
       
   145 *  @lib CONNMON.LIB
       
   146 *  @since
       
   147 */
       
   148 NONSHARABLE_CLASS( CProgressNotifier ) : public CActive
       
   149     {
       
   150     public: // Constructors and destructor
       
   151         CProgressNotifier(
       
   152                 CConnMonServer* aServer,
       
   153                 RConnection* aConnection,
       
   154                 const TUint& aConnectionId,
       
   155                 const TUint& aSubConnectionId );
       
   156         void Construct();
       
   157         virtual ~CProgressNotifier();
       
   158 
       
   159     public: // New methods
       
   160         /**
       
   161         * Requests a new event (connection status has changed) from RConnection.
       
   162         * @since
       
   163         * @return void
       
   164         */
       
   165         void Receive();
       
   166 
       
   167         /**
       
   168         * Requests a new event (connection status has changed) from RConnection.
       
   169         * @since
       
   170         * @param aFilter Notifications will be dropped until status reaches aFilter.
       
   171         * @return void
       
   172         */
       
   173         void Receive( const TInt aFilter );
       
   174 
       
   175         /**
       
   176         * Return ETrue if the progress value returned from RConnection indicates that
       
   177         * the user has deactivated the connection by using Connection Monitor or
       
   178         * some application has issued RConnection::Stop( RConnection::EStopAuthoritative ).
       
   179         * @since
       
   180         * @return ETrue if connection has been deactivated in an
       
   181         *         authoritative way, otherwise returns EFalse.
       
   182         */
       
   183         TBool IsAuthDelete();
       
   184 
       
   185         /**
       
   186         * Return ETrue if the connection might reconnect (e.g. CSD after network is down for a while)
       
   187         * @since
       
   188         * @return ETrue if the connection might reconnect, otherwise returns EFalse.
       
   189         */
       
   190         TBool CanReconnect() const;
       
   191 
       
   192         /**
       
   193         * Send KLinkLayerClosed event to clients
       
   194         * @since
       
   195         */
       
   196         void SendClosedEvent();
       
   197 
       
   198     private: // Methods from base classes
       
   199          /**
       
   200         * From CActive Cancels the asyncronous request
       
   201         * @since
       
   202         * @return void
       
   203         */
       
   204         void DoCancel();
       
   205 
       
   206         /**
       
   207         * From CActive Handles the the event that has arrived from RConnection.
       
   208         * @since
       
   209         * @return void
       
   210         */
       
   211         void RunL();
       
   212 
       
   213     private: // Data
       
   214         CConnMonServer* iServer;
       
   215         RConnection*    iConnection;
       
   216         const TUint     iConnectionId;
       
   217         const TUint     iSubConnectionId;
       
   218         TEventInfo      iEventInfo;
       
   219         TNifProgressBuf iInfoBuf;
       
   220         TInt            iFilter;
       
   221     };
       
   222 
       
   223 /**
       
   224 *  CNetwStatusNotifier
       
   225 *  @lib CONNMON.LIB
       
   226 *  @since
       
   227 */
       
   228 NONSHARABLE_CLASS( CNetwStatusNotifier ) : public CActive
       
   229     {
       
   230     public: // Constructor and destructor
       
   231         static CNetwStatusNotifier* NewL( CConnMonServer* aServer );
       
   232         virtual ~CNetwStatusNotifier();
       
   233 
       
   234     public: // New methods
       
   235         /**
       
   236         * Requests a new event (network status changed) from ETel.
       
   237         * @since
       
   238         * @return void
       
   239         */
       
   240         void Receive();
       
   241 
       
   242     private: // Methods from base classes
       
   243          /**
       
   244         * From CActive Cancels the asyncronous request
       
   245         * @since
       
   246         * @return void
       
   247         */
       
   248         void DoCancel();
       
   249 
       
   250         /**
       
   251         * From CActive Handles the the event that has arrived from ETel.
       
   252         * @since
       
   253         * @return void
       
   254         */
       
   255         void RunL();
       
   256 
       
   257     private: // Private constructors
       
   258         CNetwStatusNotifier( CConnMonServer* aServer );
       
   259         void Construct();
       
   260 
       
   261     private: // Data
       
   262         CConnMonServer*         iServer;
       
   263         RPacketService::TStatus iPacketStatus;
       
   264         TEventInfo              iEventInfo;
       
   265     };
       
   266 
       
   267 /**
       
   268 *  CNetwRegistrationNotifier
       
   269 *  @lib CONNMON.LIB
       
   270 *  @since
       
   271 */
       
   272 NONSHARABLE_CLASS( CNetwRegistrationNotifier ) : public CActive
       
   273     {
       
   274     public: // Constructor and destructor
       
   275         static CNetwRegistrationNotifier* NewL(
       
   276                 CConnMonServer* aServer,
       
   277                 RMobilePhone& aMobilePhone );
       
   278         virtual ~CNetwRegistrationNotifier();
       
   279 
       
   280     public: // New methods
       
   281         /**
       
   282         * Requests a new event (network registration changed) from ETel.
       
   283         * @since
       
   284         * @return void
       
   285         */
       
   286         void Receive();
       
   287 
       
   288     private: // Methods from base classes
       
   289          /**
       
   290         * From CActive Cancels the asyncronous request
       
   291         * @since
       
   292         * @return void
       
   293         */
       
   294         void DoCancel();
       
   295 
       
   296         /**
       
   297         * From CActive Handles the the event that has arrived from ETel.
       
   298         * @since
       
   299         * @return void
       
   300         */
       
   301         void RunL();
       
   302 
       
   303     private: // Private constructors
       
   304         CNetwRegistrationNotifier(
       
   305                 CConnMonServer* aServer,
       
   306                 RMobilePhone& aMobilePhone );
       
   307         void Construct();
       
   308 
       
   309 
       
   310     private: // Data
       
   311         CConnMonServer*                              iServer;
       
   312         RMobilePhone&                                iMobilePhone;
       
   313         RMobilePhone::TMobilePhoneRegistrationStatus iRegistration;
       
   314         TBool                                        iCSDSupported;
       
   315         TBool                                        iPhoneSupportsCSD;
       
   316         TEventInfo                                   iEventInfo;
       
   317     };
       
   318 
       
   319 /**
       
   320 * CBearerNotifier
       
   321 * @lib CONNMON.LIB
       
   322 */
       
   323 NONSHARABLE_CLASS( CBearerNotifier ) : public CActive
       
   324     {
       
   325     public: // Constructors and destructor
       
   326         CBearerNotifier(
       
   327                 CConnMonServer* aServer,
       
   328                 RMobilePhone& aMobilePhone );
       
   329         void ConstructL();
       
   330 
       
   331         static CBearerNotifier* NewL(
       
   332                 CConnMonServer* aServer,
       
   333                 RMobilePhone& aMobilePhone );
       
   334         virtual ~CBearerNotifier();
       
   335 
       
   336     public: // New methods
       
   337         /**
       
   338         * Requests a new event (bearer changed) from ETel Custom API.
       
   339         * @return void
       
   340         */
       
   341         void Receive();
       
   342 
       
   343     private: // Methods from base classes
       
   344         /**
       
   345         * From CActive, cancels the asyncronous request.
       
   346         * @return void
       
   347         */
       
   348         void DoCancel();
       
   349 
       
   350         /**
       
   351         * From CActive Handles the the event that has arrived from ETel Custom API.
       
   352         * @return void
       
   353         */
       
   354         void RunL();
       
   355 
       
   356     private: // Data
       
   357         CConnMonServer* iServer;
       
   358         RMobilePhone& iMobilePhone;
       
   359         RMmCustomAPI::TGprsInformation iGprsInfo;
       
   360         RMmCustomAPI::TGprsInformationPckg iGprsInfoPckg;
       
   361         RMmCustomAPI iCustomApi;
       
   362         TEventInfo iEventInfo;
       
   363         TInt iErrorCounter;
       
   364     };
       
   365 
       
   366 /**
       
   367 *  CWcdmaBearerNotifier
       
   368 *  @lib CONNMON.LIB
       
   369 *  @since
       
   370 */
       
   371 NONSHARABLE_CLASS( CWcdmaBearerNotifier ) : public CActive
       
   372     {
       
   373     public: // Constructors and destructor
       
   374         CWcdmaBearerNotifier(
       
   375                 CConnMonServer* aServer,
       
   376                 RTelServer& aTelServer );
       
   377         void ConstructL();
       
   378 
       
   379         static CWcdmaBearerNotifier* NewL(
       
   380                 CConnMonServer* aServer,
       
   381                 RTelServer& aTelServer );
       
   382         virtual ~CWcdmaBearerNotifier();
       
   383 
       
   384     public: // New methods
       
   385         /**
       
   386         * Requests a new event (bearer changed) from ETel Custom API.
       
   387         * @since
       
   388         * @return void
       
   389         */
       
   390         void Receive();
       
   391 
       
   392     private: // Methods from base classes
       
   393         /**
       
   394         * From CActive Cancels the asyncronous request
       
   395         * @since
       
   396         * @return void
       
   397         */
       
   398         void DoCancel();
       
   399 
       
   400         /**
       
   401         * From CActive Handles the the event that has arrived from ETel Custom API.
       
   402         * @since
       
   403         * @return void
       
   404         */
       
   405         void RunL();
       
   406 
       
   407     private: // Data
       
   408         CConnMonServer*                             iServer;
       
   409         RTelServer&                                 iTelServer;
       
   410         RMobilePhone                                iMobilePhone;
       
   411         RMobilePhone::TMobilePhoneNetworkInfoV5     iNetInfo;
       
   412         RMobilePhone::TMobilePhoneNetworkInfoV5Pckg iNetInfoPckg;
       
   413         TConnMonBearerInfo                          iPreviousBearerInfo;
       
   414         TEventInfo                                  iEventInfo;
       
   415     };
       
   416 
       
   417 
       
   418 /**
       
   419 *  CModeNotifier
       
   420 *  @lib CONNMON.LIB
       
   421 *  @since
       
   422 */
       
   423 NONSHARABLE_CLASS( CModeNotifier ) : public CActive
       
   424     {
       
   425     public: // Constructor and destructor
       
   426         static CModeNotifier* NewL(
       
   427                 CConnMonServer* aServer,
       
   428                 RMobilePhone& aMobilePhone );
       
   429         virtual ~CModeNotifier();
       
   430 
       
   431     public: // New methods
       
   432         /**
       
   433         * Requests a new event (mode changed) from ETel.
       
   434         * @since
       
   435         * @return void
       
   436         */
       
   437         void Receive();
       
   438 
       
   439     private: // Methods from base classes
       
   440          /**
       
   441         * From CActive Cancels the asyncronous request
       
   442         * @since
       
   443         * @return void
       
   444         */
       
   445         void DoCancel();
       
   446 
       
   447         /**
       
   448         * From CActive Handles the the event that has arrived from ETel.
       
   449         * @since
       
   450         * @return void
       
   451         */
       
   452         void RunL();
       
   453 
       
   454     private: // Private constructors
       
   455         CModeNotifier(
       
   456                 CConnMonServer* aServer,
       
   457                 RMobilePhone& aMobilePhone );
       
   458         void Construct();
       
   459 
       
   460     private: // Data
       
   461         CConnMonServer*                       iServer;
       
   462         RMobilePhone&                         iMobilePhone;
       
   463         RMobilePhone::TMobilePhoneNetworkMode iMode;
       
   464         TEventInfo                            iEventInfo;
       
   465     };
       
   466 
       
   467 /**
       
   468 *  CBearerAvailabilityNotifier
       
   469 *  @lib CONNMON.LIB
       
   470 *  @since
       
   471 */
       
   472 NONSHARABLE_CLASS( CBearerAvailabilityNotifier ) : public CActive
       
   473     {
       
   474     public: // Constructors and destructor
       
   475         static CBearerAvailabilityNotifier* NewL( CConnMonServer* aServer );
       
   476         virtual ~CBearerAvailabilityNotifier();
       
   477 
       
   478     public: // New methods
       
   479         /**
       
   480         * Requests a new event (bearer (PSD) availability changed) from ETel.
       
   481         * @since
       
   482         * @param aKickOff If aKickOff is ETrue initial bearer status will be obtained from ETel.
       
   483         * @return void
       
   484         */
       
   485         void Receive( TBool aKickOff=ETrue );
       
   486 
       
   487     private: // Methods from base classes
       
   488          /**
       
   489         * From CActive Cancels the asyncronous request
       
   490         * @since
       
   491         * @return void
       
   492         */
       
   493         void DoCancel();
       
   494 
       
   495         /**
       
   496         * From CActive Handles the the event that has arrived from ETel.
       
   497         * @since
       
   498         * @return void
       
   499         */
       
   500         void RunL();
       
   501 
       
   502     private: // Private constructors
       
   503         CBearerAvailabilityNotifier( CConnMonServer* aServer );
       
   504         void Construct();
       
   505 
       
   506 
       
   507     private: // Data
       
   508         CConnMonServer*                     iServer;
       
   509         TBool                               iPSD;
       
   510         TBool                               iGPRSSupportedByPhone;
       
   511         TBool                               iWCDMASupportedByPhone;
       
   512         RPacketService::TRegistrationStatus iRegStatus;
       
   513         TEventInfo                          iEventInfo;
       
   514     };
       
   515 
       
   516 /**
       
   517 *  CGsmSignalNotifier
       
   518 *  @lib CONNMON.LIB
       
   519 *  @since
       
   520 */
       
   521 NONSHARABLE_CLASS( CGsmSignalNotifier ) : public CActive
       
   522     {
       
   523     public: // Constructor and destructor
       
   524         static CGsmSignalNotifier* NewL(
       
   525                 CConnMonServer* aServer,
       
   526                 RMobilePhone& aMobilePhone );
       
   527         virtual ~CGsmSignalNotifier();
       
   528 
       
   529     public: // New methods
       
   530         /**
       
   531         * Requests a new event (GSM signal strength changed) from ETel.
       
   532         * @since
       
   533         * @return void
       
   534         */
       
   535         void Receive();
       
   536 
       
   537     private: // Methods from base classes
       
   538          /**
       
   539         * From CActive Cancels the asyncronous request
       
   540         * @since
       
   541         * @return void
       
   542         */
       
   543         void DoCancel();
       
   544 
       
   545         /**
       
   546         * From CActive Handles the the event that has arrived from ETel.
       
   547         * @since
       
   548         * @return void
       
   549         */
       
   550         void RunL();
       
   551 
       
   552     private: // Private constructors
       
   553         CGsmSignalNotifier(
       
   554                 CConnMonServer* aServer,
       
   555                 RMobilePhone& aMobilePhone );
       
   556         void Construct();
       
   557 
       
   558     private: // Data
       
   559         CConnMonServer* iServer;
       
   560         RMobilePhone&   iMobilePhone;
       
   561         TInt32          iSignalStrength;
       
   562         TInt8           iBar;
       
   563         TEventInfo      iEventInfo;
       
   564     };
       
   565 
       
   566 /**
       
   567 *  CActivityNotifier
       
   568 *  @lib CONNMON.LIB
       
   569 *  @since
       
   570 */
       
   571 NONSHARABLE_CLASS( CActivityNotifier ) : public CActive
       
   572     {
       
   573     public: // Constructors and destructor
       
   574         CActivityNotifier(
       
   575                 CConnMonServer* aServer,
       
   576                 RConnection* aConnection,
       
   577                 const TUint& aConnectionId,
       
   578                 const TUint& aSubConnectionId );
       
   579         void Construct();
       
   580         virtual ~CActivityNotifier();
       
   581 
       
   582 
       
   583     public: // New methods
       
   584         /**
       
   585         * Requests a new event (activity change) from RConnection.
       
   586         * Will use the smallest threshold set by the clients as the
       
   587         * threshold.
       
   588         * @since
       
   589         * @param aActivity The current assumption of activity.
       
   590         * @return void
       
   591         */
       
   592         void Receive( TBool aActivity );
       
   593 
       
   594         /**
       
   595         * Requests a new event (activity change) from RConnection.
       
   596         * Threshold is one second.
       
   597         * @since
       
   598         * @param aActivity The current assumption of activity.
       
   599         * @return void
       
   600         */
       
   601         void ReceiveOne( TBool aActivity );
       
   602 
       
   603         inline TUint Threshold() const { return iThreshold; }
       
   604 
       
   605     private: // Methods from base classes
       
   606          /**
       
   607         * From CActive Cancels the asyncronous request
       
   608         * @since
       
   609         * @return void
       
   610         */
       
   611         void DoCancel();
       
   612 
       
   613         /**
       
   614         * From CActive Handles the the event that has arrived from RConnection.
       
   615         * @since
       
   616         * @return void
       
   617         */
       
   618         void RunL();
       
   619 
       
   620     private: // Data
       
   621         CConnMonServer* iServer;
       
   622         RConnection*    iConnection;
       
   623         const TUint     iConnectionId;
       
   624         const TUint     iSubConnectionId;
       
   625         TBool           iActivity;
       
   626         TPckg<TBool>    iPckgActivity;
       
   627         TUint           iThreshold;
       
   628         TEventInfo      iEventInfo;
       
   629     };
       
   630 
       
   631 /**
       
   632 *  CSubConnUpDownNotifier
       
   633 *  @lib CONNMON.LIB
       
   634 *  @since
       
   635 */
       
   636 NONSHARABLE_CLASS( CSubConnUpDownNotifier ) : public CActive
       
   637     {
       
   638     public: // Constructors and destructor
       
   639         CSubConnUpDownNotifier(
       
   640                 CConnMonServer* aServer,
       
   641                 RConnection* aConnection,
       
   642                 const TUint& aConnectionId,
       
   643                 const TUint& aSubConnectionId );
       
   644         void Construct();
       
   645         virtual ~CSubConnUpDownNotifier();
       
   646 
       
   647     public: // New methods
       
   648         /**
       
   649         * Requests a new event (connection status has changed) from RConnection.
       
   650         * @since
       
   651         * @return void
       
   652         */
       
   653         void Receive();
       
   654 
       
   655         /**
       
   656         * Sends connection deleted event to clients and removes the connection
       
   657         * from internal tables.
       
   658         * @since
       
   659         * @return void
       
   660         */
       
   661         void SendDeletedEvent();
       
   662 
       
   663         /**
       
   664         * Tells whether the deleted event has been sent.
       
   665         * @since
       
   666         * @return ETrue if delete has been sent, EFalse otherwise.
       
   667         */
       
   668         TBool DeleteSent() const;
       
   669 
       
   670         /**
       
   671         * Sets interface status to closed.
       
   672         * @since
       
   673         * @return void.
       
   674         */
       
   675         void SetInterfaceClosed();
       
   676 
       
   677     private: // Methods from base classes
       
   678          /**
       
   679         * From CActive Cancels the asyncronous request
       
   680         * @since
       
   681         * @return void
       
   682         */
       
   683         void DoCancel();
       
   684 
       
   685         /**
       
   686         * From CActive Handles the the event that has arrived from RConnection.
       
   687         * @since
       
   688         * @return void
       
   689         */
       
   690         void RunL();
       
   691 
       
   692     private: // Data
       
   693         CConnMonServer*               iServer;
       
   694         RConnection*                  iConnection;
       
   695         const TUint                   iConnectionId;
       
   696         const TUint                   iSubConnectionId;
       
   697         TEventInfo                    iEventInfo;
       
   698         TSubConnectionNotificationBuf iSubConnEventBuf;
       
   699         TUint                         iTotalDownlinkDataVolume;
       
   700         TUint                         iTotalUplinkDataVolume;
       
   701         TBool                         iDeleteSent;
       
   702         TBool                         iInterfaceClosed;
       
   703     };
       
   704 
       
   705 /**
       
   706 *  CTimerAO
       
   707 *  Timer that cancel activity notifier after one second.
       
   708 *  @lib CONNMON.LIB
       
   709 *  @since
       
   710 */
       
   711 NONSHARABLE_CLASS( CTimerAO ) : public CActive
       
   712     {
       
   713     public: // Constructors and destructor
       
   714         CTimerAO(
       
   715                 CConnMonServer* aServer,
       
   716                 const TUint& aConnectionId,
       
   717                 const TUint8& aActivity );
       
   718         void ConstructL();
       
   719         virtual ~CTimerAO();
       
   720 
       
   721     public: // New methods
       
   722         /**
       
   723         * Starts canceller timer.
       
   724         * @since
       
   725         * @return KErrNone if OK, otherwise a system wide error code.
       
   726         */
       
   727         void Start();
       
   728 
       
   729     private: // Methods from base classes
       
   730         /**
       
   731         * From CActive Cancels the timer.
       
   732         * @since
       
   733         * @return void
       
   734         */
       
   735         void DoCancel();
       
   736 
       
   737         /**
       
   738         * From CActive Cancels the activity notifier and destroys itself.
       
   739         * @since
       
   740         * @return void
       
   741         */
       
   742         void RunL();
       
   743 
       
   744     private: // Data
       
   745         RTimer          iTimer;
       
   746         CConnMonServer* iServer;
       
   747         const TUint     iConnectionId;
       
   748         TUint8          iActivity;
       
   749     };
       
   750 
       
   751 #endif // __CONNMONNOTI_H
       
   752 
       
   753 // End-of-file