blob: 460f01f4e61ce8c1ac3c29192dd7bb4a78e515f0 [file] [log] [blame]
Andrew Geissler7264d902019-02-27 09:46:40 -06001#include "src/associations.hpp"
2
3#include <iostream>
4
5// Some debug functions for dumping out the main data structures in objmgr
6
7void dump_AssociationOwnersType(AssociationOwnersType& assocOwners)
8{
9 using namespace std;
10 cout << "##### AssociationOwnersType #####" << endl;
11 for (auto i : assocOwners)
12 {
13 cout << "------------------------------------" << endl;
14 cout << setw(15) << left << "OBJ PATH:" << i.first << endl;
15
16 for (auto j : i.second)
17 {
18 cout << setw(16) << left << "DBUS SERVICE:" << j.first << endl;
19
20 for (auto k : j.second)
21 {
22 cout << setw(17) << left << "ASSOC PATH:" << k.first << endl;
23
24 for (auto l : k.second)
25 {
26 cout << setw(18) << left << "ENDPOINT:" << l << endl;
27 }
28 }
29 }
30 cout << "------------------------------------" << endl;
31 }
32}
33
34void dump_AssociationInterfaces(AssociationInterfaces& assocInterfaces)
35{
36 using namespace std;
37 cout << "##### AssociationInterfaces #####" << endl;
38 for (auto i : assocInterfaces)
39 {
40 cout << "------------------------------------" << endl;
41 cout << setw(15) << left << "OBJ PATH:" << i.first << endl;
42 auto intfEndpoints = std::get<endpointsPos>(i.second);
43
44 for (auto k : intfEndpoints)
45 {
46 cout << setw(16) << left << "ENDPOINTS:" << k << endl;
47 }
48 cout << "------------------------------------" << endl;
49 }
50}
51
52void dump_InterfaceMapType(interface_map_type& intfMap)
53{
54 using namespace std;
55 cout << "##### interface_map_type #####" << endl;
56 for (auto i : intfMap)
57 {
58 cout << "------------------------------------" << endl;
59 cout << setw(15) << left << "OBJ PATH:" << i.first << endl;
60
61 for (auto j : i.second)
62 {
63 cout << setw(16) << left << "DBUS SERVICE:" << j.first << endl;
64
65 for (auto k : j.second)
66 {
67 cout << setw(18) << left << "INTERFACE:" << k << endl;
68 }
69 }
70 }
71 cout << "------------------------------------" << endl;
72}