Implement use of Inventory API
This commit is contained in:
@@ -113,7 +113,14 @@ int main(int argc, char** argv)
|
||||
else
|
||||
throw std::runtime_error("UniFi CookieFile directive missing in ini file.");
|
||||
|
||||
pUniFiDevice = std::make_shared<PresenceDetection::UniFi::Device>(hostname, username, password, cookiefile, target);
|
||||
std::string inventoryURL;
|
||||
boost::optional<boost::property_tree::ptree&> bluetoothInventoryURL = pt.get_child_optional("UniFi.Inventory");
|
||||
if (bluetoothInventoryURL)
|
||||
inventoryURL = pt.get<std::string>("UniFi.Inventory");
|
||||
else
|
||||
throw std::runtime_error("UniFi Inventory directive missing in ini file.");
|
||||
|
||||
pUniFiDevice = std::make_shared<PresenceDetection::UniFi::Device>(hostname, username, password, cookiefile, inventoryURL, target);
|
||||
}
|
||||
|
||||
std::shared_ptr<PresenceDetection::Bluetooth::Device> pBluetoothDevice;
|
||||
|
||||
Reference in New Issue
Block a user