blob: ea0ebf92ce428c4b5e8ae15b74c1b15d483f75f4 [file] [log] [blame]
#include "src/associations.hpp"
#include <iostream>
// Some debug functions for dumping out the main data structures in objmgr
void dumpAssociationOwnersType(AssociationOwnersType& assocOwners)
{
using namespace std;
cout << "##### AssociationOwnersType #####" << endl;
for (const auto& i : assocOwners)
{
cout << "------------------------------------" << endl;
cout << setw(15) << left << "OBJ PATH:" << i.first << endl;
for (const auto& j : i.second)
{
cout << setw(16) << left << "DBUS SERVICE:" << j.first << endl;
for (const auto& k : j.second)
{
cout << setw(17) << left << "ASSOC PATH:" << k.first << endl;
for (const auto& l : k.second)
{
cout << setw(18) << left << "ENDPOINT:" << l << endl;
}
}
}
cout << "------------------------------------" << endl;
}
}
void dumpAssociationInterfaces(AssociationInterfaces& assocInterfaces)
{
using namespace std;
cout << "##### AssociationInterfaces #####" << endl;
for (auto i : assocInterfaces)
{
cout << "------------------------------------" << endl;
cout << setw(15) << left << "OBJ PATH:" << i.first << endl;
auto intfEndpoints = std::get<endpointsPos>(i.second);
for (const auto& k : intfEndpoints)
{
cout << setw(16) << left << "ENDPOINTS:" << k << endl;
}
cout << "------------------------------------" << endl;
}
}
void dumpInterfaceMapType(InterfaceMapType& intfMap)
{
using namespace std;
cout << "##### interfaceMapType #####" << endl;
for (const auto& i : intfMap)
{
cout << "------------------------------------" << endl;
cout << setw(15) << left << "OBJ PATH:" << i.first << endl;
for (const auto& j : i.second)
{
cout << setw(16) << left << "DBUS SERVICE:" << j.first << endl;
for (const auto& k : j.second)
{
cout << setw(18) << left << "INTERFACE:" << k << endl;
}
}
}
cout << "------------------------------------" << endl;
}