1 /*
2  * Copyright (C) 2022 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 #ifndef NFC_POLLING_PARAMS_H
16 #define NFC_POLLING_PARAMS_H
17 #include <memory>
18 
19 namespace OHOS {
20 namespace NFC {
21 class NfcPollingParams {
22 public:
23     explicit NfcPollingParams();
~NfcPollingParams()24     ~NfcPollingParams() {}
25     bool operator==(const std::shared_ptr<NfcPollingParams> params) const;
26     static std::shared_ptr<NfcPollingParams> GetNfcOffParameters();
27     std::string ToString();
28 
29 public:
30     void SetTechMask(uint16_t techMask);
31     void SetEnableReaderMode(bool isEnable);
32     uint16_t GetTechMask() const;
33     bool ShouldEnablePolling() const;
34     bool ShouldEnableLowPowerPolling() const;
35     bool ShouldEnableReaderMode() const;
36     bool ShouldEnableHostRouting() const;
37 
38     static uint16_t NFC_POLL_DEFAULT;
39 
40 private:
41     uint16_t techMask_;
42     bool enableLowPowerPolling_;
43     bool enableReaderMode_;
44     bool enableHostRouting_;
45 };
46 }  // namespace NFC
47 }  // namespace OHOS
48 #endif  // NFC_POLLING_PARAMS_H
49