Fix for x86_64 build fail
[platform/upstream/connectedhomeip.git] / src / setup_payload / AdditionalDataPayload.h
1 /*
2  *
3  *    Copyright (c) 2020 Project CHIP Authors
4  *
5  *    Licensed under the Apache License, Version 2.0 (the "License");
6  *    you may not use this file except in compliance with the License.
7  *    You may obtain a copy of the License at
8  *
9  *        http://www.apache.org/licenses/LICENSE-2.0
10  *
11  *    Unless required by applicable law or agreed to in writing, software
12  *    distributed under the License is distributed on an "AS IS" BASIS,
13  *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  *    See the License for the specific language governing permissions and
15  *    limitations under the License.
16  */
17
18 /**
19  *    @file
20  *      This file describes a Additional Data Payload class to hold
21  *      data enumerated from a byte stream.
22  *      Additional data may be conveyed during the provisioning phase via multiple
23  *      protocols (BLE, DNS-SD and SoftAP). It contains Rotating Device Id which
24  *      is an optional feature for a Node to implement and an optional feature for
25  *      a Commissioner to utilize.
26  *      The Rotating Device Identifier provides a per-device unique non-trackable
27  *      identifier that could be used in one or more of the following ways:
28  *      1) Provided to the vendor’s customer support for help in pairing or
29  *      establishing Node provenance
30  *      2) Used programmatically to obtain a Node’s Setup PIN or other information
31  *      in order to provide a simplified setup flow. Note that the mechanism(s) by
32  *      which the PIN may be obtained is outside of this specification.
33  */
34
35 #pragma once
36
37 #include <string>
38
39 namespace chip {
40 namespace SetupPayloadData {
41
42 constexpr uint8_t kRotatingDeviceIdLength = 18;
43 constexpr uint8_t kRotatingDeviceIdTag    = 0x00;
44
45 struct AdditionalDataPayload
46 {
47 public:
48     std::string rotatingDeviceId;
49 };
50
51 } // namespace SetupPayloadData
52 } // namespace chip