infrared_remote.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. This file was taken from the project:
  3. https://github.com/DarkFlippers/unleashed-firmware
  4. The original project is licensed under the GNU GPLv3
  5. Modifications made:
  6. - Added function infrared_remote_get_button_by_name()
  7. - Added function infrared_remote_delete_button_by_name()
  8. - Added function infrared_remote_push_button()
  9. */
  10. #pragma once
  11. #include <stdbool.h>
  12. #include "infrared_remote_button.h"
  13. typedef struct InfraredRemote InfraredRemote;
  14. InfraredRemote* infrared_remote_alloc();
  15. void infrared_remote_free(InfraredRemote* remote);
  16. void infrared_remote_reset(InfraredRemote* remote);
  17. void infrared_remote_set_name(InfraredRemote* remote, const char* name);
  18. const char* infrared_remote_get_name(InfraredRemote* remote);
  19. void infrared_remote_set_path(InfraredRemote* remote, const char* path);
  20. const char* infrared_remote_get_path(InfraredRemote* remote);
  21. size_t infrared_remote_get_button_count(InfraredRemote* remote);
  22. InfraredRemoteButton* infrared_remote_get_button(InfraredRemote* remote, size_t index);
  23. bool infrared_remote_find_button_by_name(InfraredRemote* remote, const char* name, size_t* index);
  24. InfraredRemoteButton* infrared_remote_get_button_by_name(InfraredRemote* remote, const char* name);
  25. bool infrared_remote_add_button(InfraredRemote* remote, const char* name, InfraredSignal* signal);
  26. void infrared_remote_push_button(InfraredRemote* remote, const char* name, InfraredSignal* signal);
  27. bool infrared_remote_rename_button(InfraredRemote* remote, const char* new_name, size_t index);
  28. bool infrared_remote_delete_button(InfraredRemote* remote, size_t index);
  29. bool infrared_remote_delete_button_by_name(InfraredRemote* remote, const char* name);
  30. void infrared_remote_move_button(InfraredRemote* remote, size_t index_orig, size_t index_dest);
  31. bool infrared_remote_store(InfraredRemote* remote);
  32. bool infrared_remote_load(InfraredRemote* remote, FuriString* path);
  33. bool infrared_remote_remove(InfraredRemote* remote);