infrared_remote.h 1.3 KB

12345678910111213141516171819202122232425262728293031
  1. #pragma once
  2. #include <stdbool.h>
  3. #include "infrared_remote_button.h"
  4. #define IR_REMOTE_PATH EXT_PATH("infrared/remote")
  5. typedef struct InfraredRemote InfraredRemote;
  6. InfraredRemote* infrared_remote_alloc(void);
  7. void infrared_remote_free(InfraredRemote* remote);
  8. void infrared_remote_reset(InfraredRemote* remote);
  9. void infrared_remote_set_name(InfraredRemote* remote, const char* name);
  10. const char* infrared_remote_get_name(InfraredRemote* remote);
  11. void infrared_remote_set_path(InfraredRemote* remote, const char* path);
  12. const char* infrared_remote_get_path(InfraredRemote* remote);
  13. size_t infrared_remote_get_button_count(InfraredRemote* remote);
  14. InfraredRemoteButton* infrared_remote_get_button(InfraredRemote* remote, size_t index);
  15. bool infrared_remote_find_button_by_name(InfraredRemote* remote, const char* name, size_t* index);
  16. bool infrared_remote_add_button(InfraredRemote* remote, const char* name, InfraredSignal* signal);
  17. bool infrared_remote_rename_button(InfraredRemote* remote, const char* new_name, size_t index);
  18. bool infrared_remote_delete_button(InfraredRemote* remote, size_t index);
  19. bool infrared_remote_store(InfraredRemote* remote);
  20. bool infrared_remote_load(InfraredRemote* remote, FuriString* path);
  21. bool infrared_remote_remove(InfraredRemote* remote);