2 * Copyright (C) 2016 The Android Open Source Project
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 #include "wificond/client_interface_binder.h"
21 #include <binder/Status.h>
23 #include "wificond/client_interface_impl.h"
25 using android::binder::Status;
31 ClientInterfaceBinder::ClientInterfaceBinder(ClientInterfaceImpl* impl)
35 ClientInterfaceBinder::~ClientInterfaceBinder() {
38 Status ClientInterfaceBinder::enableSupplicant(bool* success) {
39 *success = impl_ && impl_->EnableSupplicant();
43 Status ClientInterfaceBinder::disableSupplicant(bool* success) {
44 *success = impl_ && impl_->DisableSupplicant();
48 Status ClientInterfaceBinder::getPacketCounters(
49 vector<int32_t>* out_packet_counters) {
50 if (impl_ == nullptr) {
53 impl_->GetPacketCounters(out_packet_counters);
57 Status ClientInterfaceBinder::signalPoll(
58 vector<int32_t>* out_signal_poll_results) {
59 if (impl_ == nullptr) {
62 impl_->SignalPoll(out_signal_poll_results);
66 Status ClientInterfaceBinder::getMacAddress(vector<uint8_t>* out_mac_address) {
67 if (impl_ == nullptr) {
70 *out_mac_address = impl_->GetMacAddress();
74 } // namespace wificond
75 } // namespace android