File tree 3 files changed +34
-8
lines changed
3 files changed +34
-8
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ assert(chip_device_platform == "fake")
21
21
static_library (" fake" ) {
22
22
sources = [
23
23
" CHIPDevicePlatformEvent.h" ,
24
+ " ConfigurationManagerImpl.cpp" ,
24
25
" ConfigurationManagerImpl.h" ,
25
26
" ConnectivityManagerImpl.cpp" ,
26
27
" ConnectivityManagerImpl.h" ,
Original file line number Diff line number Diff line change
1
+ /*
2
+ *
3
+ * Copyright (c) 2021 Project CHIP Authors
4
+ * All rights reserved.
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
+ * limitations under the License.
9
+ */
10
+
11
+ #include < platform/ConfigurationManager.h>
12
+
13
+ namespace chip {
14
+ namespace DeviceLayer {
15
+
16
+ ConfigurationManagerImpl & ConfigurationManagerImpl::GetDefaultInstance ()
17
+ {
18
+ static ConfigurationManagerImpl sInstance ;
19
+ return sInstance ;
20
+ }
21
+
22
+ ConfigurationManager & ConfigurationMgr ()
23
+ {
24
+ return ConfigurationManagerImpl::GetDefaultInstance ();
25
+ }
26
+
27
+ void SetConfigurationMgr (ConfigurationManager * configurationManager) {}
28
+
29
+ } // namespace DeviceLayer
30
+ } // namespace chip
Original file line number Diff line number Diff line change @@ -29,6 +29,9 @@ class ConfigurationManagerImpl : public ConfigurationManager
29
29
{
30
30
public:
31
31
virtual ~ConfigurationManagerImpl () = default ;
32
+ // NOTE: This method is required by the tests.
33
+ // This returns an instance of this class.
34
+ static ConfigurationManagerImpl & GetDefaultInstance ();
32
35
33
36
private:
34
37
CHIP_ERROR Init () override { return CHIP_NO_ERROR; }
@@ -105,13 +108,5 @@ class ConfigurationManagerImpl : public ConfigurationManager
105
108
// NOTE: Other public interface methods are implemented by GenericConfigurationManagerImpl<>.
106
109
};
107
110
108
- ConfigurationManager & ConfigurationMgr ()
109
- {
110
- static ConfigurationManagerImpl sInstance ;
111
- return sInstance ;
112
- }
113
-
114
- void SetConfigurationMgr (ConfigurationManagerImpl * configurationManager) {}
115
-
116
111
} // namespace DeviceLayer
117
112
} // namespace chip
You can’t perform that action at this time.
0 commit comments