aboutsummaryrefslogtreecommitdiff
path: root/src/deviceinfo-flashlight.c
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2023-06-08 23:48:00 +0200
committerRobert Tari <robert@tari.in>2023-06-08 23:48:00 +0200
commit238d705cb7b04c53d7a510ba901682549b8a08c9 (patch)
tree1db2553ff556ce72097c1746c8eb25d09af534ab /src/deviceinfo-flashlight.c
parentc20a21fa5806efb82bdd83d2024b7658a35f2efa (diff)
parent0ed3e1762249d7c1ab954e7fa16543bb16d58f60 (diff)
downloadayatana-indicator-power-238d705cb7b04c53d7a510ba901682549b8a08c9.tar.gz
ayatana-indicator-power-238d705cb7b04c53d7a510ba901682549b8a08c9.tar.bz2
ayatana-indicator-power-238d705cb7b04c53d7a510ba901682549b8a08c9.zip
Merge branch 'muhammad23012009-main'
Attributes GH PR #78: https://github.com/AyatanaIndicators/ayatana-indicator-power/pull/78
Diffstat (limited to 'src/deviceinfo-flashlight.c')
-rw-r--r--src/deviceinfo-flashlight.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/deviceinfo-flashlight.c b/src/deviceinfo-flashlight.c
new file mode 100644
index 0000000..e31c1ff
--- /dev/null
+++ b/src/deviceinfo-flashlight.c
@@ -0,0 +1,13 @@
+#include <deviceinfo_c_api.h>
+
+char* flashlight_path()
+{
+ struct DeviceInfo* di = deviceinfo_new();
+ return deviceinfo_get(di, "FlashlightSysfsPath", "");
+}
+
+char* flashlight_switch_path()
+{
+ struct DeviceInfo* di = deviceinfo_new();
+ return deviceinfo_get(di, "FlashlightSwitchPath", "");
+}