action.c 874 B

123456789101112131415161718192021222324
  1. #include "quac.h"
  2. #include "item.h"
  3. #include "action_i.h"
  4. void action_tx(void* context, Item* item, FuriString* error) {
  5. // FURI_LOG_I(TAG, "action_run: %s : %s", furi_string_get_cstr(item->name), item->ext);
  6. if(!strcmp(item->ext, ".sub")) {
  7. action_subghz_tx(context, item->path, error);
  8. } else if(!strcmp(item->ext, ".ir")) {
  9. action_ir_tx(context, item->path, error);
  10. } else if(!strcmp(item->ext, ".rfid")) {
  11. action_rfid_tx(context, item->path, error);
  12. } else if(!strcmp(item->ext, ".nfc")) {
  13. action_nfc_tx(context, item->path, error);
  14. } else if(!strcmp(item->ext, ".ibtn")) {
  15. action_ibutton_tx(context, item->path, error);
  16. } else if(!strcmp(item->ext, ".qpl")) {
  17. action_qpl_tx(context, item->path, error);
  18. } else {
  19. FURI_LOG_E(TAG, "Unknown item file type! %s", item->ext);
  20. }
  21. }