• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
18 #include <memory>
19 
20 namespace OHOS {
21 namespace NFC {
22 class NfcPollingParams {
23 public:
24     explicit NfcPollingParams();
~NfcPollingParams()25     ~NfcPollingParams() {}
26     bool operator==(const std::shared_ptr<NfcPollingParams> params) const;
27     static std::shared_ptr<NfcPollingParams> GetNfcOffParameters();
28     std::string ToString();
29 
30 public:
31     void SetTechMask(uint16_t techMask);
32     void SetEnableReaderMode(bool isEnable);
33     uint16_t GetTechMask() const;
34     bool ShouldEnablePolling() const;
35     bool ShouldEnableLowPowerPolling() const;
36     bool ShouldEnableReaderMode() const;
37     bool ShouldEnableHostRouting() const;
38 
39     static uint16_t NFC_POLL_DEFAULT;
40 
41 private:
42     uint16_t techMask_;
43     bool enableLowPowerPolling_;
44     bool enableReaderMode_;
45     bool enableHostRouting_;
46 };
47 }  // namespace NFC
48 }  // namespace OHOS
49 #endif  // NFC_POLLING_PARAMS_H
50