blob: 51b15573dc632831464cc74bce4bf795bdb9467d [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#ifndef WIFI_RTT_CONTROLLER_H_
18#define WIFI_RTT_CONTROLLER_H_
19
20#include <android-base/macros.h>
21#include <android/hardware/wifi/1.0/IWifiIface.h>
22#include <android/hardware/wifi/1.0/IWifiRttController.h>
23
24#include "wifi_legacy_hal.h"
25
26namespace android {
27namespace hardware {
28namespace wifi {
29namespace V1_0 {
30namespace implementation {
31
32/**
33 * HIDL interface object used to control all RTT operations.
34 */
35class WifiRttController : public IWifiRttController {
36 public:
37 WifiRttController(const sp<IWifiIface>& bound_iface,
38 const std::weak_ptr<WifiLegacyHal> legacy_hal);
39 // Refer to |WifiChip::invalidate()|.
40 void invalidate();
41
42 // HIDL methods exposed.
Roshan Pius734fea02016-10-11 08:30:28 -070043 Return<void> getBoundIface(getBoundIface_cb hidl_status_cb) override;
Roshan Pius59268282016-10-06 20:23:47 -070044
45 private:
46 sp<IWifiIface> bound_iface_;
47 std::weak_ptr<WifiLegacyHal> legacy_hal_;
48 bool is_valid_;
49
50 DISALLOW_COPY_AND_ASSIGN(WifiRttController);
51};
52
53} // namespace implementation
54} // namespace V1_0
55} // namespace wifi
56} // namespace hardware
57} // namespace android
58
59#endif // WIFI_RTT_CONTROLLER_H_