1/*
2 * Copyright (C) 2017 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 CHRE_WIFI_OFFLOAD_SCAN_CONFIG_H_
18#define CHRE_WIFI_OFFLOAD_SCAN_CONFIG_H_
19
20#include "chre/apps/wifi_offload/wifi_offload.h"
21
22#include "chre/apps/wifi_offload/flatbuffers_types_generated.h"
23#include "chre/apps/wifi_offload/scan_filter.h"
24#include "chre/apps/wifi_offload/scan_params.h"
25
26namespace wifi_offload {
27
28class ScanConfig {
29 public:
30  /* Corresponding flatbuffers-generated data-type used to serialize and
31   * deserialize instances of this class */
32  using FbsType = fbs::ScanConfig;
33
34  ScanConfig() = default;
35  ~ScanConfig() = default;
36
37  bool operator==(const ScanConfig &other) const;
38
39  flatbuffers::Offset<ScanConfig::FbsType> Serialize(
40      flatbuffers::FlatBufferBuilder *builder) const;
41
42  bool Deserialize(const ScanConfig::FbsType &fbs_config);
43
44  void Log() const;
45
46  ScanParams scan_params_;
47  ScanFilter scan_filter_;
48};
49
50}  // namespace wifi_offload
51
52#endif  // CHRE_WIFI_OFFLOAD_SCAN_CONFIG_H_
53