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 ANDROID_LOWPAN_CHANNEL_INFO_H
18 #define ANDROID_LOWPAN_CHANNEL_INFO_H
19 
20 #include <binder/Parcelable.h>
21 #include <utils/String16.h>
22 #include <utils/StrongPointer.h>
23 #include <string>
24 
25 namespace android {
26 
27 namespace net {
28 
29 namespace lowpan {
30 
31 /*
32  * C++ implementation of the Java class android.net.lowpan.LowpanChannelInfo
33  */
34 class LowpanChannelInfo : public Parcelable {
35 public:
36     LowpanChannelInfo() = default;
37     virtual ~LowpanChannelInfo() = default;
38     LowpanChannelInfo(const LowpanChannelInfo& x) = default;
39 
40     bool operator==(const LowpanChannelInfo& rhs);
41     bool operator!=(const LowpanChannelInfo& rhs) { return !(*this == rhs); }
42 
43 public:
44     // Overrides
45     status_t writeToParcel(Parcel* parcel) const override;
46     status_t readFromParcel(const Parcel* parcel) override;
47 
48 private:
49     // Data
50     int32_t mIndex;
51     std::string mName;
52     float mSpectrumCenterFrequency;
53     float mSpectrumBandwidth;
54     int32_t mMaxTxPower;
55     bool mIsMaskedByRegulatoryDomain;
56 };
57 
58 }  // namespace lowpan
59 
60 }  // namespace net
61 
62 }  // namespace android
63 
64 #endif  // ANDROID_LOWPAN_CHANNEL_INFO_H
65