blob: e2df1a85f7a2d48ee21c4fb700a67480db291376 [file] [log] [blame]
Roshan Pius59268282016-10-06 20:23:47 -07001/*
2 * Copyright (C) 2016 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#include "wifi_rtt_controller.h"
18
19#include <android-base/logging.h>
20
21#include "failure_reason_util.h"
22
23namespace android {
24namespace hardware {
25namespace wifi {
26namespace V1_0 {
27namespace implementation {
28
29WifiRttController::WifiRttController(
30 const sp<IWifiIface>& bound_iface,
31 const std::weak_ptr<WifiLegacyHal> legacy_hal)
32 : bound_iface_(bound_iface), legacy_hal_(legacy_hal), is_valid_(true) {}
33
34void WifiRttController::invalidate() {
35 legacy_hal_.reset();
36 is_valid_ = false;
37}
38
39Return<void> WifiRttController::getBoundIface(getBoundIface_cb cb) {
40 cb(bound_iface_);
41 return Void();
42}
43
44} // namespace implementation
45} // namespace V1_0
46} // namespace wifi
47} // namespace hardware
48} // namespace android