environment.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. #pragma once
  2. #include <furi.h>
  3. #include "subghz_keystore.h"
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. typedef struct SubGhzEnvironment SubGhzEnvironment;
  8. /**
  9. * Allocate SubGhzEnvironment.
  10. * @return SubGhzEnvironment* pointer to a SubGhzEnvironment instance
  11. */
  12. SubGhzEnvironment* subghz_environment_alloc();
  13. /**
  14. * Free SubGhzEnvironment.
  15. * @param instance Pointer to a SubGhzEnvironment instance
  16. */
  17. void subghz_environment_free(SubGhzEnvironment* instance);
  18. /**
  19. * Downloading the manufacture key file.
  20. * @param instance Pointer to a SubGhzEnvironment instance
  21. * @param filename Full path to the file
  22. * @return true On success
  23. */
  24. bool subghz_environment_load_keystore(SubGhzEnvironment* instance, const char* filename);
  25. /**
  26. * Get pointer to a SubGhzKeystore* instance.
  27. * @return SubGhzEnvironment* pointer to a SubGhzEnvironment instance
  28. */
  29. SubGhzKeystore* subghz_environment_get_keystore(SubGhzEnvironment* instance);
  30. /**
  31. * Set filename to work with Came Atomo.
  32. * @param instance Pointer to a SubGhzEnvironment instance
  33. * @param filename Full path to the file
  34. */
  35. void subghz_environment_set_came_atomo_rainbow_table_file_name(
  36. SubGhzEnvironment* instance,
  37. const char* filename);
  38. /**
  39. * Get filename to work with Came Atomo.
  40. * @param instance Pointer to a SubGhzEnvironment instance
  41. * @return Full path to the file
  42. */
  43. const char* subghz_environment_get_came_atomo_rainbow_table_file_name(SubGhzEnvironment* instance);
  44. /**
  45. * Set filename to work with Alutech at-4n.
  46. * @param instance Pointer to a SubGhzEnvironment instance
  47. * @param filename Full path to the file
  48. */
  49. void subghz_environment_set_alutech_at_4n_rainbow_table_file_name(
  50. SubGhzEnvironment* instance,
  51. const char* filename);
  52. /**
  53. * Get filename to work with Alutech at-4n.
  54. * @param instance Pointer to a SubGhzEnvironment instance
  55. * @return Full path to the file
  56. */
  57. const char*
  58. subghz_environment_get_alutech_at_4n_rainbow_table_file_name(SubGhzEnvironment* instance);
  59. /**
  60. * Set filename to work with Nice Flor-S.
  61. * @param instance Pointer to a SubGhzEnvironment instance
  62. * @param filename Full path to the file
  63. */
  64. void subghz_environment_set_nice_flor_s_rainbow_table_file_name(
  65. SubGhzEnvironment* instance,
  66. const char* filename);
  67. /**
  68. * Get filename to work with Nice Flor-S.
  69. * @param instance Pointer to a SubGhzEnvironment instance
  70. * @return Full path to the file
  71. */
  72. const char*
  73. subghz_environment_get_nice_flor_s_rainbow_table_file_name(SubGhzEnvironment* instance);
  74. /**
  75. * Set list of protocols to work.
  76. * @param instance Pointer to a SubGhzEnvironment instance
  77. * @param protocol_registry_items Pointer to a SubGhzProtocolRegistry
  78. */
  79. void subghz_environment_set_protocol_registry(
  80. SubGhzEnvironment* instance,
  81. void* protocol_registry_items);
  82. /**
  83. * Get list of protocols to work.
  84. * @param instance Pointer to a SubGhzEnvironment instance
  85. * @return Pointer to a SubGhzProtocolRegistry
  86. */
  87. void* subghz_environment_get_protocol_registry(SubGhzEnvironment* instance);
  88. /**
  89. * Get list of protocols names.
  90. * @param instance Pointer to a SubGhzEnvironment instance
  91. * @param idx index protocols
  92. * @return Pointer to a SubGhzProtocolRegistry
  93. */
  94. const char* subghz_environment_get_protocol_name_registry(SubGhzEnvironment* instance, size_t idx);
  95. #ifdef __cplusplus
  96. }
  97. #endif