aboutsummaryrefslogtreecommitdiff
path: root/src/flashlight.h
diff options
context:
space:
mode:
authorJami Kettunen <jami.kettunen@protonmail.com>2020-10-16 23:54:54 +0300
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-08-28 10:17:14 +0200
commit333a4273eb26ffc47b29f3ea8ce3213d36803894 (patch)
tree0600bf19950287ed5ce1f66978fdfcf265ceadc7 /src/flashlight.h
parent948a5107c479a72a2940316674fae6a3b55534ff (diff)
downloadayatana-indicator-power-333a4273eb26ffc47b29f3ea8ce3213d36803894.tar.gz
ayatana-indicator-power-333a4273eb26ffc47b29f3ea8ce3213d36803894.tar.bz2
ayatana-indicator-power-333a4273eb26ffc47b29f3ea8ce3213d36803894.zip
flashlight: Add support for simpler sysfs toggles (#34)
Unlike the overcomplicated Qualcomm mess, there are also simpler sysfs toggles which you can just write 1/0 to when enabling/disabling the flash. This is used by the MediaTek flashlight_core driver on the Volla Phone (Helio P23 / MT6763) for example, which this also adds support for. Pinephone also uses a simple sysfs toggle for flashlight.
Diffstat (limited to 'src/flashlight.h')
-rw-r--r--src/flashlight.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/flashlight.h b/src/flashlight.h
index 51ed5e7..19f738e 100644
--- a/src/flashlight.h
+++ b/src/flashlight.h
@@ -24,6 +24,12 @@
G_BEGIN_DECLS
+int
+toggle_flashlight_action_qcom();
+
+int
+toggle_flashlight_action_simple();
+
void
toggle_flashlight_action(GAction *action,
GVariant *parameter G_GNUC_UNUSED,
@@ -35,6 +41,9 @@ flashlight_supported();
gboolean
flashlight_activated();
+enum
+TorchType { SIMPLE = 1, QCOM };
+
G_END_DECLS
#endif /* INDICATOR_POWER_FLASHLIGHT__H */