equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2002-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". |
132 class TEvent; |
132 class TEvent; |
133 class TConnMonIapInfo; |
133 class TConnMonIapInfo; |
134 class TConnMonSNAPInfo; |
134 class TConnMonSNAPInfo; |
135 class TConnMonId; |
135 class TConnMonId; |
136 class CCellularDataUsageKeyUpdater; |
136 class CCellularDataUsageKeyUpdater; |
|
137 class CConnMonDialUpOverrideNotifier; |
|
138 class CConnMonDialUpOverrideTimer; |
137 |
139 |
138 /** |
140 /** |
139 * CConnMonServer |
141 * CConnMonServer |
140 */ |
142 */ |
141 NONSHARABLE_CLASS( CConnMonServer ) : public CPolicyServer |
143 NONSHARABLE_CLASS( CConnMonServer ) : public CPolicyServer |
333 * @return A pointer to the iap module. |
335 * @return A pointer to the iap module. |
334 */ |
336 */ |
335 inline CCellularDataUsageKeyUpdater* CellularDataUsageKeyUpdater() |
337 inline CCellularDataUsageKeyUpdater* CellularDataUsageKeyUpdater() |
336 { return iCellularDataUsageKeyUpdater; } |
338 { return iCellularDataUsageKeyUpdater; } |
337 |
339 |
|
340 /** |
|
341 * Return the current dial-up PDP context override status. |
|
342 */ |
|
343 inline TInt GetDialUpOverrideStatus() { return iDialUpOverrideStatus; } |
|
344 |
|
345 /** |
|
346 * Set the dial-up PDP context override feature status. Either activates or |
|
347 * deactivates it. Does nothing if the feature itself has not been enabled. |
|
348 */ |
|
349 void SetDialUpOverrideStatus( TInt aStatus ); |
|
350 |
|
351 /** |
|
352 * Signals that all internal PDP connections have closed through the |
|
353 * KDialUpConnection P&S-property. |
|
354 */ |
|
355 void ConnectionsClosedForDialUpOverride(); |
|
356 |
338 public: |
357 public: |
339 /** |
358 /** |
340 * From CServer Creates a new session for a client. |
359 * From CServer Creates a new session for a client. |
341 * @param aVersion Version information. |
360 * @param aVersion Version information. |
342 * @return A pointer to the new session. |
361 * @return A pointer to the new session. |
375 CConnMonCommsDatNotifier* iSnapTableNotifier; |
394 CConnMonCommsDatNotifier* iSnapTableNotifier; |
376 CConnMonCommsDatNotifier* iVirtualTableNotifier; |
395 CConnMonCommsDatNotifier* iVirtualTableNotifier; |
377 |
396 |
378 CConnMonBearerGroupManager* iBearerGroupManager; |
397 CConnMonBearerGroupManager* iBearerGroupManager; |
379 CCellularDataUsageKeyUpdater* iCellularDataUsageKeyUpdater; |
398 CCellularDataUsageKeyUpdater* iCellularDataUsageKeyUpdater; |
|
399 |
|
400 // Notifier to listen for changes in the the KDialUpConnection P&S-property. |
|
401 CConnMonDialUpOverrideNotifier* iDialUpOverrideNotifier; |
|
402 |
|
403 // Timeout timer for the dial-up PDP context override feature. |
|
404 CConnMonDialUpOverrideTimer* iDialUpOverrideTimer; |
|
405 |
|
406 // Current status of the dial-up PDP context override feature. |
|
407 TInt iDialUpOverrideStatus; |
380 }; |
408 }; |
381 |
409 |
382 /** |
410 /** |
383 * CConnMonScheduler |
411 * CConnMonScheduler |
384 * Active scheduler for the server thread. |
412 * Active scheduler for the server thread. |
460 private: // Data |
488 private: // Data |
461 RTimer iTimer; |
489 RTimer iTimer; |
462 CConnMonServer* iServer; |
490 CConnMonServer* iServer; |
463 }; |
491 }; |
464 |
492 |
|
493 /** |
|
494 * CConnMonDialUpOverrideTimer |
|
495 * A simple timer to ensure dial-up PDP context override feature can not stay |
|
496 * active longer than the specied timeout value. |
|
497 */ |
|
498 NONSHARABLE_CLASS( CConnMonDialUpOverrideTimer ) : public CActive |
|
499 { |
|
500 public: |
|
501 static CConnMonDialUpOverrideTimer* NewL( CConnMonServer* aServer ); |
|
502 static CConnMonDialUpOverrideTimer* NewLC( CConnMonServer* aServer ); |
|
503 virtual ~CConnMonDialUpOverrideTimer(); |
|
504 |
|
505 private: |
|
506 CConnMonDialUpOverrideTimer( CConnMonServer* aServer ); |
|
507 void ConstructL(); |
|
508 |
|
509 public: |
|
510 void Start(); |
|
511 |
|
512 private: |
|
513 void DoCancel(); |
|
514 void RunL(); |
|
515 |
|
516 private: // Data |
|
517 RTimer iTimer; |
|
518 CConnMonServer* iServer; |
|
519 }; |
|
520 |
465 // INLINES |
521 // INLINES |
466 inline CConnMonScheduler::TSignal::TSignal() |
522 inline CConnMonScheduler::TSignal::TSignal() |
467 : |
523 : |
468 iStatus( KErrNone ), |
524 iStatus( KErrNone ), |
469 iId() |
525 iId() |