--- /dev/null
+apple-ir-control is a command line utility to get and set the enabled/disabled
+state of the IR remote control on Macs.
+
+This is equivalent of System Preferences > Security > Advanced > Disable remote
+//
+// apple-ir-control
+// Copyright (c) 2016, Robert Sesek <https://www.bluestatic.org>
+//
+// This program is free software: you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free Software
+// Foundation, either version 3 of the License, or any later version.
+//
+
#include <CoreFoundation/CoreFoundation.h>
#include <IOKit/hid/IOHIDLib.h>
#include <IOKit/IOKitLib.h>
ERROR("Failed to IOHIDManagerCopyDevices");
return false;
}
+
std::vector<void*> devices_array(CFSetGetCount(devices.get()), nullptr);
CFSetGetValues(devices.get(), const_cast<const void**>(devices_array.data()));
for (const auto& device : devices_array) {