Fix for x86_64 build fail
[platform/upstream/connectedhomeip.git] / src / include / platform / internal / GenericConnectivityManagerImpl.h
1 /*
2  *
3  *    Copyright (c) 2020 Project CHIP Authors
4  *    Copyright (c) 2019 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  *          Provides an generic implementation of ConnectivityManager features
22  *          for use on various platforms.
23  */
24
25 #pragma once
26
27 namespace chip {
28 namespace DeviceLayer {
29 namespace Internal {
30
31 /**
32  * Provides a generic implementation of ConnectivityManager features that works on multiple platforms.
33  *
34  * This template contains implementations of select features from the ConnectivityManager abstract
35  * interface that are suitable for use on all platforms.  It is intended to be inherited (directly
36  * or indirectly) by the ConfigurationManagerImpl class, which also appears as the template's ImplClass
37  * parameter.
38  */
39 template <class ImplClass>
40 class GenericConnectivityManagerImpl
41 {
42 public:
43     // ===== Methods that implement the ConnectivityManager abstract interface.
44
45     bool _IsUserSelectedModeActive();
46     void _SetUserSelectedMode(bool val);
47     uint16_t _GetUserSelectedModeTimeout();
48     void _SetUserSelectedModeTimeout(uint16_t val);
49
50 private:
51     ImplClass * Impl() { return static_cast<ImplClass *>(this); }
52 };
53
54 template <class ImplClass>
55 inline bool GenericConnectivityManagerImpl<ImplClass>::_IsUserSelectedModeActive()
56 {
57     return false;
58 }
59
60 template <class ImplClass>
61 inline void GenericConnectivityManagerImpl<ImplClass>::_SetUserSelectedMode(bool val)
62 {}
63
64 template <class ImplClass>
65 inline uint16_t GenericConnectivityManagerImpl<ImplClass>::_GetUserSelectedModeTimeout()
66 {
67     return 0;
68 }
69
70 template <class ImplClass>
71 inline void GenericConnectivityManagerImpl<ImplClass>::_SetUserSelectedModeTimeout(uint16_t val)
72 {}
73
74 } // namespace Internal
75 } // namespace DeviceLayer
76 } // namespace chip