Home | History | Annotate | Download | only in wimax
      1 //
      2 // Copyright (C) 2012 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_WIMAX_WIMAX_NETWORK_PROXY_INTERFACE_H_
     18 #define SHILL_WIMAX_WIMAX_NETWORK_PROXY_INTERFACE_H_
     19 
     20 #include <string>
     21 
     22 #include <base/callback_forward.h>
     23 
     24 #include "shill/accessor_interface.h"
     25 
     26 namespace shill {
     27 
     28 // Generally, a string representation of a Network's Identifier. We may group
     29 // several different network identifiers into a single representative
     30 // WiMaxNetworkId, if necessary.
     31 typedef std::string WiMaxNetworkId;
     32 
     33 class Error;
     34 
     35 // These are the methods that a WiMaxManager.Network proxy must support. The
     36 // interface is provided so that it can be mocked in tests.
     37 class WiMaxNetworkProxyInterface {
     38  public:
     39   typedef base::Callback<void(int)> SignalStrengthChangedCallback;
     40 
     41   virtual ~WiMaxNetworkProxyInterface() {}
     42 
     43   virtual RpcIdentifier path() const = 0;
     44 
     45   virtual void set_signal_strength_changed_callback(
     46       const SignalStrengthChangedCallback& callback) = 0;
     47 
     48   // Properties.
     49   virtual uint32_t Identifier(Error* error) = 0;
     50   virtual std::string Name(Error* error) = 0;
     51   virtual int Type(Error* error) = 0;
     52   virtual int CINR(Error* error) = 0;
     53   virtual int RSSI(Error* error) = 0;
     54   virtual int SignalStrength(Error* error) = 0;
     55 };
     56 
     57 }  // namespace shill
     58 
     59 #endif  // SHILL_WIMAX_WIMAX_NETWORK_PROXY_INTERFACE_H_
     60