Thieu Le | 43ce4d4 | 2013-10-04 16:08:55 -0700 | [diff] [blame] | 1 | // Copyright (c) 2013 The Chromium OS Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef SHILL_NO_OUT_OF_CREDITS_DETECTOR_H_ |
| 6 | #define SHILL_NO_OUT_OF_CREDITS_DETECTOR_H_ |
| 7 | |
| 8 | #include <base/basictypes.h> |
| 9 | |
| 10 | #include "shill/out_of_credits_detector.h" |
| 11 | |
| 12 | namespace shill { |
| 13 | |
| 14 | // This object performs no out-of-credits detection. |
| 15 | class NoOutOfCreditsDetector : public OutOfCreditsDetector { |
| 16 | public: |
| 17 | NoOutOfCreditsDetector(EventDispatcher *dispatcher, |
| 18 | Manager *manager, |
| 19 | Metrics *metrics, |
| 20 | CellularService *service) |
| 21 | : OutOfCreditsDetector(dispatcher, manager, metrics, service) {} |
| 22 | virtual ~NoOutOfCreditsDetector() {} |
| 23 | |
| 24 | // Resets the detector state. |
| 25 | virtual void ResetDetector() override {} |
| 26 | // Returns |true| if this object is busy detecting out-of-credits. |
| 27 | virtual bool IsDetecting() const override { return false; } |
| 28 | // Notifies this object of a service state change. |
| 29 | virtual void NotifyServiceStateChanged( |
| 30 | Service::ConnectState old_state, |
| 31 | Service::ConnectState new_state) override {} |
| 32 | // Notifies this object when the subscription state has changed. |
| 33 | virtual void NotifySubscriptionStateChanged( |
| 34 | uint32 subscription_state) override {} |
| 35 | |
| 36 | private: |
| 37 | DISALLOW_COPY_AND_ASSIGN(NoOutOfCreditsDetector); |
| 38 | }; |
| 39 | |
| 40 | } // namespace shill |
| 41 | |
| 42 | #endif // SHILL_NO_OUT_OF_CREDITS_DETECTOR_H_ |