Add a license header and a README.
authorRobert Sesek <rsesek@bluestatic.org>
Sun, 13 Mar 2016 23:08:47 +0000 (19:08 -0400)
committerRobert Sesek <rsesek@bluestatic.org>
Sun, 13 Mar 2016 23:08:47 +0000 (19:08 -0400)
README [new file with mode: 0644]
apple-ir-control.cc

diff --git a/README b/README
new file mode 100644 (file)
index 0000000..18b367e
--- /dev/null
+++ b/README
@@ -0,0 +1,4 @@
+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
index 91345e614b523cfeb88d0b8ade2e8ff82052c6e9..d1590049fc9cb809f2185a7a1e225da528234a1f 100644 (file)
@@ -1,3 +1,12 @@
+//
+// 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>
@@ -67,6 +76,7 @@ bool IsIRAvailable() {
     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) {