3 * Copyright (c) 2020 Project CHIP Authors
4 * Copyright (c) 2019 Nest Labs, Inc.
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
10 * http://www.apache.org/licenses/LICENSE-2.0
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.
21 * Provides an generic implementation of ConnectivityManager features
22 * for use on various platforms.
28 namespace DeviceLayer {
32 * Provides a generic implementation of ConnectivityManager features that works on multiple platforms.
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
39 template <class ImplClass>
40 class GenericConnectivityManagerImpl
43 // ===== Methods that implement the ConnectivityManager abstract interface.
45 bool _IsUserSelectedModeActive();
46 void _SetUserSelectedMode(bool val);
47 uint16_t _GetUserSelectedModeTimeout();
48 void _SetUserSelectedModeTimeout(uint16_t val);
51 ImplClass * Impl() { return static_cast<ImplClass *>(this); }
54 template <class ImplClass>
55 inline bool GenericConnectivityManagerImpl<ImplClass>::_IsUserSelectedModeActive()
60 template <class ImplClass>
61 inline void GenericConnectivityManagerImpl<ImplClass>::_SetUserSelectedMode(bool val)
64 template <class ImplClass>
65 inline uint16_t GenericConnectivityManagerImpl<ImplClass>::_GetUserSelectedModeTimeout()
70 template <class ImplClass>
71 inline void GenericConnectivityManagerImpl<ImplClass>::_SetUserSelectedModeTimeout(uint16_t val)
74 } // namespace Internal
75 } // namespace DeviceLayer