Change script for apply upstream code
[platform/upstream/connectedhomeip.git] / src / lib / protocols / CHIPProtocols.h
1 /*
2  *
3  *    Copyright (c) 2020 Project CHIP Authors
4  *    Copyright (c) 2013-2017 Nest Labs, Inc.
5  *
6  *    Licensed under the Apache License, Version 2.0 (the "License");
7  *    you may not use this file except in compliance with the License.
8  *    You may obtain a copy of the License at
9  *
10  *        http://www.apache.org/licenses/LICENSE-2.0
11  *
12  *    Unless required by applicable law or agreed to in writing, software
13  *    distributed under the License is distributed on an "AS IS" BASIS,
14  *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  *    See the License for the specific language governing permissions and
16  *    limitations under the License.
17  */
18
19 /**
20  *    @file
21  *      This file defines constant enumerations for all public (or
22  *      common) protocols.
23  *
24  */
25
26 #ifndef CHIP_PROTOCOLS_H_
27 #define CHIP_PROTOCOLS_H_
28
29 #include <core/CHIPVendorIdentifiers.hpp>
30
31 /**
32  *   @namespace chip::Protocols
33  *
34  *   @brief
35  *     This namespace includes all interfaces within CHIP for CHIP protocols.
36  */
37
38 namespace chip {
39 namespace Protocols {
40
41 //
42 // CHIP Protocol Ids (32-bits max)
43 //
44
45 enum CHIPProtocolId
46 {
47     // Common Protocols
48     //
49     // NOTE: Do not attempt to allocate these values yourself.
50
51     kChipProtocol_Common              = (kChipVendor_Common << 16) | 0x0000, // Common Protocol
52     kChipProtocol_Echo                = (kChipVendor_Common << 16) | 0x0001, // Echo Protocol
53     kChipProtocol_SecurePairing       = (kChipVendor_Common << 16) | 0x0002, // SPAKE2+ handshake Protocol
54     kChipProtocol_NetworkProvisioning = (kChipVendor_Common << 16) | 0x0003, // Network Provisioning Protocol
55     kChipProtocol_Security            = (kChipVendor_Common << 16) | 0x0004, // Network Security Protocol
56     kChipProtocol_FabricProvisioning  = (kChipVendor_Common << 16) | 0x0005, // Fabric Provisioning Protocol
57     kChipProtocol_ServiceProvisioning = (kChipVendor_Common << 16) | 0x000F, // Service Provisioning Protocol
58
59     // Protocols reserved for internal protocol use
60
61     kChipProtocol_NotSpecified = (kChipVendor_NotSpecified << 16) | 0xFFFF, // The profile ID is either not specified or a wildcard
62 };
63
64 } // namespace Protocols
65 } // namespace chip
66
67 #endif /* CHIP_PROTOCOLS_H_ */