1/* 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 WIFICOND_SCAN_STATS_H 18#define WIFICOND_SCAN_STATS_H 19 20#include <vector> 21 22#include <binder/Parcel.h> 23#include <binder/Parcelable.h> 24 25namespace com { 26namespace android { 27namespace server { 28namespace wifi { 29namespace wificond { 30 31class NativeScanStats : public ::android::Parcelable { 32 public: 33 NativeScanStats(); 34 NativeScanStats(uint32_t num_scans_requested_by_wifi, 35 uint32_t num_scans_serviced_by_wifi, 36 uint32_t subscription_duration_ms, uint32_t scan_duration_ms, 37 uint32_t num_channels_scanned, 38 std::vector<uint8_t> histogram_channels); 39 40 bool operator==(const NativeScanStats&) const; 41 ::android::status_t writeToParcel(::android::Parcel* parcel) const override; 42 ::android::status_t readFromParcel(const ::android::Parcel* parcel) override; 43 void DebugLog(); 44 45 uint32_t num_scans_requested_by_wifi_; 46 uint32_t num_scans_serviced_by_wifi_; 47 uint32_t subscription_duration_ms_; 48 uint32_t scan_duration_ms_; 49 uint32_t num_channels_scanned_; 50 uint32_t time_stamp_; 51 std::vector<uint8_t> histogram_channels_; 52}; 53 54} // namespace wificond 55} // namespace wifi 56} // namespace server 57} // namespace android 58} // namespace com 59#endif // WIFICOND_SCAN_STATS_H 60