convergedconnectionhandler/cchserver/inc/cchconnmonhandler.h
branchRCL_3
changeset 14 be41ab7b952f
parent 0 a4daefaec16c
equal deleted inserted replaced
12:876a3df1f464 14:be41ab7b952f
     1 /*
     1 /*
     2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    36 // FUNCTION PROTOTYPES
    36 // FUNCTION PROTOTYPES
    37 // None
    37 // None
    38 
    38 
    39 // FORWARD DECLARATIONS
    39 // FORWARD DECLARATIONS
    40 class CCCHServerBase;
    40 class CCCHServerBase;
       
    41 class MCCHConnMonHandlerNotifier;
    41 
    42 
    42 // CLASS DECLARATION
    43 // CLASS DECLARATION
       
    44 class TCCHConnectionInfo
       
    45     {
       
    46 public:
       
    47     TUint iIapId;
       
    48     TUint iConnId;
       
    49     };
    43 
    50 
    44 /**
    51 /**
    45  *  CCCHConnMonHandler declaration
    52  *  CCCHConnMonHandler declaration
    46  *  Handles Connection Monitor for CCH server
    53  *  Handles Connection Monitor for CCH server
    47  *  @lib cchserver.exe
    54  *  @lib cchserver.exe
    59         {
    66         {
    60           EUninitialized,   /// Uninitialized
    67           EUninitialized,   /// Uninitialized
    61           EInitialized,     /// Initalized
    68           EInitialized,     /// Initalized
    62           EGetIAPS,
    69           EGetIAPS,
    63           EGetSNAPs,
    70           EGetSNAPs,
       
    71           EGetIAP,
       
    72           EGetConnectionCount,
    64           EError            /// Error condition
    73           EError            /// Error condition
    65         };
    74         };
    66 
    75 
    67     /**
    76     /**
    68      * Two-phased constructor.
    77      * Two-phased constructor.
    81 
    90 
    82 public: // New functions
    91 public: // New functions
    83 
    92 
    84     /**
    93     /**
    85      * Scan available networks
    94      * Scan available networks
    86      * @since S60 3.2
    95      *
       
    96      * @since S60 9.2
    87      * @param aWlanScan ETrue if WLAN network scan needed
    97      * @param aWlanScan ETrue if WLAN network scan needed
    88      */
    98      * @param aObserver Completion notified by method
    89     void ScanNetworks( TBool aWlanScan = EFalse );
    99      *        NetworkScanningCompletedL() if set.
       
   100      */
       
   101     void ScanNetworks( TBool aWlanScan = EFalse,
       
   102 	    MCCHConnMonHandlerNotifier* aObserver = NULL );
    90 
   103 
    91     /**
   104     /**
    92      * Cancel network scanning
   105      * Cancel network scanning
    93      * @since S60 3.2
   106      * @since S60 3.2
    94      */
   107      */
   108      * @param aIapId
   121      * @param aIapId
   109      * @return ETrue if IAP is available
   122      * @return ETrue if IAP is available
   110      */
   123      */
   111     TBool IsIapAvailable( TUint aIapId ) const;
   124     TBool IsIapAvailable( TUint aIapId ) const;
   112 
   125 
       
   126     /**
       
   127      * Sets observer to notify if SNAPs availability is changed
       
   128      *
       
   129      * @since S60 9.2
       
   130      * @param aObserver Notifies by method
       
   131      *        SNAPsAvailabilityChanged(). NULL turns off notify.
       
   132      */
       
   133     void SetSNAPsAvailabilityChangeListener( MCCHConnMonHandlerNotifier* aObserver );
       
   134         
       
   135 	/**
       
   136      * Collects all connected IAP Ids and Connection Ids to array.
       
   137      */
       
   138     void StartMonitoringConnectionChanges();
       
   139 	
       
   140 	/**
       
   141      * Connected IAPs getter.
       
   142      * @param aIapIds
       
   143      */
       
   144     void StopMonitoringConnectionChanges( RArray<TUint>& aIapIds );
       
   145 
   113 protected: // From base classes
   146 protected: // From base classes
   114 
   147 
   115     /**
   148     /**
   116      * From CActive
   149      * From CActive
   117      * @since Series 60 3.0
   150      * @since Series 60 3.0
   180      * Stops notifications.
   213      * Stops notifications.
   181      * @since S60 3.2
   214      * @since S60 3.2
   182      */
   215      */
   183     void StopNotify();
   216     void StopNotify();
   184 
   217 
       
   218     /**
       
   219      * Call back function to the CPeriodic.
       
   220      * 
       
   221      * @since S60 9.2
       
   222      * @param aAny A pointer to this class.
       
   223      * @return Error code
       
   224      */
       
   225     static TInt PeriodicTimerCallBack(TAny* aAny);
       
   226         
       
   227 	/**
       
   228      * Connection count solver.
       
   229      */
       
   230     void GetConnectionCount();
       
   231 	
       
   232 	/**
       
   233      * IAP Id solver.
       
   234      */
       
   235     void GetIapId();
       
   236 	
       
   237 	/**
       
   238      * Remove connected IAP id from connected IAPs array.
       
   239 	 * @param aConnId disconnected connection id.
       
   240      */
       
   241     void RemoveIapId( TUint aConnId );
       
   242 
   185 private: // data
   243 private: // data
   186 
   244 
   187     /**
   245     /**
   188      * State of active object
   246      * State of active object
   189      */
   247      */
   217     /**
   275     /**
   218      * IAP Array
   276      * IAP Array
   219      */
   277      */
   220     RArray<TUint>                   iAvailableIAPs;
   278     RArray<TUint>                   iAvailableIAPs;
   221 
   279 
       
   280     /**
       
   281      * Connection change listener timer.
       
   282      * owns.
       
   283      */
       
   284     CPeriodic* iConnChangeListenerTimer;
       
   285     
       
   286     /**
       
   287      * Network scanning observer
       
   288      */
       
   289     MCCHConnMonHandlerNotifier* iNetworkScanningObserver;
       
   290 	
       
   291     /**
       
   292      * SNAPs availability change observer
       
   293      */
       
   294     MCCHConnMonHandlerNotifier* iSNAPsAvailabilityObserver;
       
   295     
       
   296 	/**
       
   297      * pending async request
       
   298      */
       
   299     RArray<TCCHConnMonHandlerState> iPendingRequests;
       
   300 	
       
   301 	/**
       
   302      * Unsolved connection ids
       
   303      */
       
   304     RArray<TUint>                   iUnsolvedConnIds;
       
   305 	
       
   306 	/**
       
   307      * Connected IAP Ids
       
   308      */
       
   309     RArray<TCCHConnectionInfo>      iConnIapIds;
       
   310 	
       
   311 	/**
       
   312      * Async helpers
       
   313      */
       
   314     TUint                           iConnIapId;
       
   315     TUint                           iConnId;
       
   316     TUint                           iConnCount;
   222     };
   317     };
   223 
   318 
   224 #endif // C_CCHCONNMONHANDLER_H
   319 #endif // C_CCHCONNMONHANDLER_H
   225 
   320 
   226 // End of file
   321 // End of file