environment.h 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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 succes
  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 Nice Flor-S.
  46. * @param instance Pointer to a SubGhzEnvironment instance
  47. * @param filename Full path to the file
  48. */
  49. void subghz_environment_set_nice_flor_s_rainbow_table_file_name(
  50. SubGhzEnvironment* instance,
  51. const char* filename);
  52. /**
  53. * Get filename to work with Nice Flor-S.
  54. * @param instance Pointer to a SubGhzEnvironment instance
  55. * @return Full path to the file
  56. */
  57. const char*
  58. subghz_environment_get_nice_flor_s_rainbow_table_file_name(SubGhzEnvironment* instance);
  59. /**
  60. * Set list of protocols to work.
  61. * @param instance Pointer to a SubGhzEnvironment instance
  62. * @param protocol_registry_items Pointer to a SubGhzProtocolRegistry
  63. */
  64. void subghz_environment_set_protocol_registry(
  65. SubGhzEnvironment* instance,
  66. void* protocol_registry_items);
  67. /**
  68. * Get list of protocols to work.
  69. * @param instance Pointer to a SubGhzEnvironment instance
  70. * @return Pointer to a SubGhzProtocolRegistry
  71. */
  72. void* subghz_environment_get_protocol_registry(SubGhzEnvironment* instance);
  73. /**
  74. * Get list of protocols names.
  75. * @param instance Pointer to a SubGhzEnvironment instance
  76. * @param idx index protocols
  77. * @return Pointer to a SubGhzProtocolRegistry
  78. */
  79. const char* subghz_environment_get_protocol_name_registry(SubGhzEnvironment* instance, size_t idx);
  80. #ifdef __cplusplus
  81. }
  82. #endif