blob: 583c15185e0d3b48fa1ceef1137dcb9d81ea3f73 [file] [log] [blame]
Roshan Pius3c4e8a32016-10-03 14:53:58 -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_CHIP_H_
18#define WIFI_CHIP_H_
19
20#include <set>
21
22#include <android/hardware/wifi/1.0/IWifiChip.h>
23#include <android-base/macros.h>
24#include <hardware_legacy/wifi_hal.h>
25
26#include "wifi_hal_state.h"
27
28namespace android {
29namespace hardware {
30namespace wifi {
31
32class WifiChip : public V1_0::IWifiChip {
33 public:
34 WifiChip(
35 WifiHalState* hal_state, wifi_interface_handle interface_handle);
36
37 void Invalidate();
38
39 Return<void> registerEventCallback(
40 const sp<V1_0::IWifiChipEventCallback>& callback) override;
41
42 Return<void> getAvailableModes(getAvailableModes_cb cb) override;
43
44 Return<void> configureChip(uint32_t mode_id) override;
45
46 Return<uint32_t> getMode() override;
47
48 Return<void> requestChipDebugInfo() override;
49
50 Return<void> requestDriverDebugDump() override;
51
52 Return<void> requestFirmwareDebugDump() override;
53
54 private:
55 WifiHalState* hal_state_;
56 wifi_interface_handle interface_handle_;
57 std::set<sp<V1_0::IWifiChipEventCallback>> callbacks_;
58
59 DISALLOW_COPY_AND_ASSIGN(WifiChip);
60};
61
62} // namespace wifi
63} // namespace hardware
64} // namespace android
65
66#endif // WIFI_CHIP_H_