15d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// Copyright 2013 The Chromium Authors. All rights reserved. 25d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 35d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// found in the LICENSE file. 45d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 55d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#ifndef CHROMEOS_NETWORK_FAKE_NETWORK_DEVICE_HANDLER_H_ 65d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#define CHROMEOS_NETWORK_FAKE_NETWORK_DEVICE_HANDLER_H_ 75d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 85d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include "base/basictypes.h" 95d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include "base/compiler_specific.h" 105d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include "chromeos/chromeos_export.h" 115d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include "chromeos/network/network_device_handler.h" 125d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 135d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)namespace chromeos { 145d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 155d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// This is a fake implementation which does nothing. Use this as a base class 165d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// for concrete fake handlers. 175d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)class CHROMEOS_EXPORT FakeNetworkDeviceHandler : public NetworkDeviceHandler { 185d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) public: 195d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) FakeNetworkDeviceHandler(); 205d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) virtual ~FakeNetworkDeviceHandler(); 215d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 225d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // NetworkDeviceHandler overrides 235d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) virtual void GetDeviceProperties( 245d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const std::string& device_path, 255d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const network_handler::DictionaryResultCallback& callback, 265d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const network_handler::ErrorCallback& error_callback) const OVERRIDE; 275d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 285d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) virtual void SetDeviceProperty( 295d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const std::string& device_path, 305d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const std::string& property_name, 315d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const base::Value& value, 325d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const base::Closure& callback, 335d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const network_handler::ErrorCallback& error_callback) OVERRIDE; 345d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 355d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) virtual void RequestRefreshIPConfigs( 365d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const std::string& device_path, 375d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const base::Closure& callback, 385d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const network_handler::ErrorCallback& error_callback) OVERRIDE; 395d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 405d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) virtual void ProposeScan(const std::string& device_path, 415d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const base::Closure& callback, 425d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const network_handler::ErrorCallback& error_callback) 435d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) OVERRIDE; 445d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 455d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) virtual void RegisterCellularNetwork( 465d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const std::string& device_path, 475d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const std::string& network_id, 485d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const base::Closure& callback, 495d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const network_handler::ErrorCallback& error_callback) OVERRIDE; 505d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 515d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) virtual void SetCarrier(const std::string& device_path, 525d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const std::string& carrier, 535d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const base::Closure& callback, 545d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const network_handler::ErrorCallback& error_callback) 555d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) OVERRIDE; 565d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 575d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) virtual void RequirePin(const std::string& device_path, 585d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) bool require_pin, 595d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const std::string& pin, 605d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const base::Closure& callback, 615d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const network_handler::ErrorCallback& error_callback) 625d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) OVERRIDE; 635d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 645d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) virtual void EnterPin(const std::string& device_path, 655d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const std::string& pin, 665d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const base::Closure& callback, 675d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const network_handler::ErrorCallback& error_callback) 685d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) OVERRIDE; 695d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 705d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) virtual void UnblockPin(const std::string& device_path, 715d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const std::string& puk, 725d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const std::string& new_pin, 735d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const base::Closure& callback, 745d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const network_handler::ErrorCallback& error_callback) 755d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) OVERRIDE; 765d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 775d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) virtual void ChangePin(const std::string& device_path, 785d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const std::string& old_pin, 795d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const std::string& new_pin, 805d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const base::Closure& callback, 815d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const network_handler::ErrorCallback& error_callback) 825d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) OVERRIDE; 835d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 845d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) virtual void SetCellularAllowRoaming(bool allow_roaming) OVERRIDE; 855d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 865d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) virtual void SetWifiTDLSEnabled( 875d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const std::string& ip_or_mac_address, 885d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) bool enabled, 895d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const network_handler::StringResultCallback& callback, 905d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const network_handler::ErrorCallback& error_callback) OVERRIDE; 915d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 925d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) virtual void GetWifiTDLSStatus( 935d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const std::string& ip_or_mac_address, 945d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const network_handler::StringResultCallback& callback, 955d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const network_handler::ErrorCallback& error_callback) OVERRIDE; 965d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 975d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) private: 985d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) DISALLOW_COPY_AND_ASSIGN(FakeNetworkDeviceHandler); 995d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}; 1005d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 1015d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} // namespace chromeos 1025d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 1035d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#endif // CHROMEOS_NETWORK_FAKE_NETWORK_DEVICE_HANDLER_H_ 104