blob: 453ef6dfff1da408197270731a0d3e99e50b1650 [file] [log] [blame]
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/callback_forward.h"
#include "base/macros.h"
#include "chromeos/network/network_connection_handler.h"
namespace chromeos {
namespace tether {
// Connects to a tether network. When the user initiates a connection via the
// UI, TetherConnector receives a callback from NetworkConnectionHandler and
// initiates a connection by starting a ConnectTetheringOperation. When a
// response has been received from the tether host, TetherConnector connects to
// the associated Wi-Fi network.
class TetherConnector {
TetherConnector() {}
virtual ~TetherConnector() {}
virtual void ConnectToNetwork(
const std::string& tether_network_guid,
const base::Closure& success_callback,
const network_handler::StringResultCallback& error_callback) = 0;
// Returns whether the connection attempt was successfully canceled.
virtual bool CancelConnectionAttempt(
const std::string& tether_network_guid) = 0;
} // namespace tether
} // namespace chromeos