Line data Source code
1 : /*
2 : *
3 : * Copyright (c) 2022 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 : * Provides a generic implementation of ConnectivityManager features
21 : * for use on platforms that use TCP.
22 : */
23 :
24 : #ifndef GENERIC_CONNECTIVITY_MANAGER_IMPL_TCP_CPP
25 : #define GENERIC_CONNECTIVITY_MANAGER_IMPL_TCP_CPP
26 :
27 : #include <platform/internal/CHIPDeviceLayerInternal.h>
28 :
29 : namespace chip {
30 : namespace DeviceLayer {
31 : namespace Internal {
32 :
33 : template <class ImplClass>
34 97 : chip::Inet::EndPointManager<Inet::TCPEndPoint> & GenericConnectivityManagerImpl_TCP<ImplClass>::_TCPEndPointManager()
35 : {
36 97 : static chip::Inet::TCPEndPointManagerImpl sTCPEndPointManagerImpl;
37 97 : return sTCPEndPointManagerImpl;
38 : }
39 :
40 : // Fully instantiate the generic implementation class in whatever compilation unit includes this file.
41 : // NB: This must come after all templated class members are defined.
42 : template class GenericConnectivityManagerImpl_TCP<ConnectivityManagerImpl>;
43 :
44 : } // namespace Internal
45 : } // namespace DeviceLayer
46 : } // namespace chip
47 :
48 : #endif // GENERIC_CONNECTIVITY_MANAGER_IMPL_TCP_CPP
|