Home | History | Annotate | Download | only in cellular
      1 //
      2 // Copyright (C) 2013 The Android Open Source Project
      3 //
      4 // Licensed under the Apache License, Version 2.0 (the "License");
      5 // you may not use this file except in compliance with the License.
      6 // You may obtain a copy of the License at
      7 //
      8 //      http://www.apache.org/licenses/LICENSE-2.0
      9 //
     10 // Unless required by applicable law or agreed to in writing, software
     11 // distributed under the License is distributed on an "AS IS" BASIS,
     12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13 // See the License for the specific language governing permissions and
     14 // limitations under the License.
     15 //
     16 
     17 #ifndef SHILL_CELLULAR_NO_OUT_OF_CREDITS_DETECTOR_H_
     18 #define SHILL_CELLULAR_NO_OUT_OF_CREDITS_DETECTOR_H_
     19 
     20 #include <base/macros.h>
     21 
     22 #include "shill/cellular/out_of_credits_detector.h"
     23 
     24 namespace shill {
     25 
     26 // This object performs no out-of-credits detection.
     27 class NoOutOfCreditsDetector : public OutOfCreditsDetector {
     28  public:
     29   NoOutOfCreditsDetector(EventDispatcher* dispatcher,
     30                          Manager* manager,
     31                          Metrics* metrics,
     32                          CellularService* service)
     33       : OutOfCreditsDetector(dispatcher, manager, metrics, service) {}
     34   ~NoOutOfCreditsDetector() override {}
     35 
     36   // Resets the detector state.
     37   void ResetDetector() override {}
     38   // Returns |true| if this object is busy detecting out-of-credits.
     39   bool IsDetecting() const override { return false; }
     40   // Notifies this object of a service state change.
     41   void NotifyServiceStateChanged(
     42       Service::ConnectState old_state,
     43       Service::ConnectState new_state) override {}
     44   // Notifies this object when the subscription state has changed.
     45   void NotifySubscriptionStateChanged(uint32_t subscription_state) override {}
     46 
     47  private:
     48   DISALLOW_COPY_AND_ASSIGN(NoOutOfCreditsDetector);
     49 };
     50 
     51 }  // namespace shill
     52 
     53 #endif  // SHILL_CELLULAR_NO_OUT_OF_CREDITS_DETECTOR_H_
     54