Line data Source code
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 platforms that support BLE.
23 : */
24 :
25 : #ifndef GENERIC_CONNECTIVITY_MANAGER_IMPL_BLE_CPP
26 : #define GENERIC_CONNECTIVITY_MANAGER_IMPL_BLE_CPP
27 :
28 : #include <platform/internal/GenericConnectivityManagerImpl_BLE.h>
29 :
30 : namespace chip {
31 : namespace DeviceLayer {
32 : namespace Internal {
33 :
34 : template <class ImplClass>
35 0 : const char * GenericConnectivityManagerImpl_BLE<ImplClass>::_CHIPoBLEServiceModeToStr(ConnectivityManager::CHIPoBLEServiceMode mode)
36 : {
37 0 : switch (mode)
38 : {
39 0 : case ConnectivityManager::kCHIPoBLEServiceMode_NotSupported:
40 0 : return "NotSupported";
41 0 : case ConnectivityManager::kCHIPoBLEServiceMode_Enabled:
42 0 : return "Disabled";
43 0 : case ConnectivityManager::kCHIPoBLEServiceMode_Disabled:
44 0 : return "Enabled";
45 0 : default:
46 0 : return "(unknown)";
47 : }
48 : }
49 :
50 : // Fully instantiate the template class in whatever compilation unit includes this file.
51 : // NB: This must come after all templated class members are defined.
52 : template class GenericConnectivityManagerImpl_BLE<ConnectivityManagerImpl>;
53 :
54 : } // namespace Internal
55 : } // namespace DeviceLayer
56 : } // namespace chip
57 :
58 : #endif // GENERIC_CONNECTIVITY_MANAGER_IMPL_BLE_CPP
|