2022-03-03 12:48:56 +03:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <furi.h>
|
2023-06-06 22:13:41 +03:00
|
|
|
#include "registry.h"
|
2022-03-03 12:48:56 +03:00
|
|
|
|
|
|
|
#include "subghz_keystore.h"
|
|
|
|
|
2022-09-14 19:11:38 +03:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2022-03-03 12:48:56 +03:00
|
|
|
typedef struct SubGhzEnvironment SubGhzEnvironment;
|
2023-06-06 22:13:41 +03:00
|
|
|
typedef struct SubGhzProtocolRegistry SubGhzProtocolRegistry;
|
2022-03-03 12:48:56 +03:00
|
|
|
|
2022-03-16 12:18:48 +03:00
|
|
|
/**
|
|
|
|
* Allocate SubGhzEnvironment.
|
|
|
|
* @return SubGhzEnvironment* pointer to a SubGhzEnvironment instance
|
|
|
|
*/
|
2022-03-03 12:48:56 +03:00
|
|
|
SubGhzEnvironment* subghz_environment_alloc();
|
|
|
|
|
2022-03-16 12:18:48 +03:00
|
|
|
/**
|
|
|
|
* Free SubGhzEnvironment.
|
|
|
|
* @param instance Pointer to a SubGhzEnvironment instance
|
|
|
|
*/
|
2022-03-03 12:48:56 +03:00
|
|
|
void subghz_environment_free(SubGhzEnvironment* instance);
|
|
|
|
|
2022-03-16 12:18:48 +03:00
|
|
|
/**
|
|
|
|
* Downloading the manufacture key file.
|
|
|
|
* @param instance Pointer to a SubGhzEnvironment instance
|
|
|
|
* @param filename Full path to the file
|
2023-01-06 19:06:50 +03:00
|
|
|
* @return true On success
|
2022-03-16 12:18:48 +03:00
|
|
|
*/
|
2022-03-03 12:48:56 +03:00
|
|
|
bool subghz_environment_load_keystore(SubGhzEnvironment* instance, const char* filename);
|
|
|
|
|
2022-03-16 12:18:48 +03:00
|
|
|
/**
|
|
|
|
* Get pointer to a SubGhzKeystore* instance.
|
|
|
|
* @return SubGhzEnvironment* pointer to a SubGhzEnvironment instance
|
|
|
|
*/
|
2022-03-03 12:48:56 +03:00
|
|
|
SubGhzKeystore* subghz_environment_get_keystore(SubGhzEnvironment* instance);
|
|
|
|
|
2022-03-16 12:18:48 +03:00
|
|
|
/**
|
|
|
|
* Set filename to work with Came Atomo.
|
|
|
|
* @param instance Pointer to a SubGhzEnvironment instance
|
|
|
|
* @param filename Full path to the file
|
|
|
|
*/
|
2022-03-03 12:48:56 +03:00
|
|
|
void subghz_environment_set_came_atomo_rainbow_table_file_name(
|
|
|
|
SubGhzEnvironment* instance,
|
|
|
|
const char* filename);
|
|
|
|
|
2022-03-16 12:18:48 +03:00
|
|
|
/**
|
|
|
|
* Get filename to work with Came Atomo.
|
|
|
|
* @param instance Pointer to a SubGhzEnvironment instance
|
|
|
|
* @return Full path to the file
|
|
|
|
*/
|
2022-03-03 12:48:56 +03:00
|
|
|
const char* subghz_environment_get_came_atomo_rainbow_table_file_name(SubGhzEnvironment* instance);
|
|
|
|
|
2023-02-08 19:59:49 +03:00
|
|
|
/**
|
|
|
|
* Set filename to work with Alutech at-4n.
|
|
|
|
* @param instance Pointer to a SubGhzEnvironment instance
|
|
|
|
* @param filename Full path to the file
|
|
|
|
*/
|
|
|
|
void subghz_environment_set_alutech_at_4n_rainbow_table_file_name(
|
|
|
|
SubGhzEnvironment* instance,
|
|
|
|
const char* filename);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get filename to work with Alutech at-4n.
|
|
|
|
* @param instance Pointer to a SubGhzEnvironment instance
|
|
|
|
* @return Full path to the file
|
|
|
|
*/
|
|
|
|
const char*
|
|
|
|
subghz_environment_get_alutech_at_4n_rainbow_table_file_name(SubGhzEnvironment* instance);
|
|
|
|
|
2022-03-16 12:18:48 +03:00
|
|
|
/**
|
|
|
|
* Set filename to work with Nice Flor-S.
|
|
|
|
* @param instance Pointer to a SubGhzEnvironment instance
|
|
|
|
* @param filename Full path to the file
|
|
|
|
*/
|
2022-03-03 12:48:56 +03:00
|
|
|
void subghz_environment_set_nice_flor_s_rainbow_table_file_name(
|
|
|
|
SubGhzEnvironment* instance,
|
|
|
|
const char* filename);
|
|
|
|
|
2022-03-16 12:18:48 +03:00
|
|
|
/**
|
|
|
|
* Get filename to work with Nice Flor-S.
|
|
|
|
* @param instance Pointer to a SubGhzEnvironment instance
|
|
|
|
* @return Full path to the file
|
|
|
|
*/
|
2022-03-03 12:48:56 +03:00
|
|
|
const char*
|
|
|
|
subghz_environment_get_nice_flor_s_rainbow_table_file_name(SubGhzEnvironment* instance);
|
2022-09-14 19:11:38 +03:00
|
|
|
|
2022-10-19 20:27:26 +03:00
|
|
|
/**
|
|
|
|
* Set list of protocols to work.
|
|
|
|
* @param instance Pointer to a SubGhzEnvironment instance
|
|
|
|
* @param protocol_registry_items Pointer to a SubGhzProtocolRegistry
|
|
|
|
*/
|
|
|
|
void subghz_environment_set_protocol_registry(
|
|
|
|
SubGhzEnvironment* instance,
|
2023-06-06 22:13:41 +03:00
|
|
|
const SubGhzProtocolRegistry* protocol_registry_items);
|
2022-10-19 20:27:26 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Get list of protocols to work.
|
|
|
|
* @param instance Pointer to a SubGhzEnvironment instance
|
|
|
|
* @return Pointer to a SubGhzProtocolRegistry
|
|
|
|
*/
|
2023-06-06 22:13:41 +03:00
|
|
|
const SubGhzProtocolRegistry*
|
|
|
|
subghz_environment_get_protocol_registry(SubGhzEnvironment* instance);
|
2022-10-19 20:27:26 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Get list of protocols names.
|
|
|
|
* @param instance Pointer to a SubGhzEnvironment instance
|
|
|
|
* @param idx index protocols
|
|
|
|
* @return Pointer to a SubGhzProtocolRegistry
|
|
|
|
*/
|
|
|
|
const char* subghz_environment_get_protocol_name_registry(SubGhzEnvironment* instance, size_t idx);
|
|
|
|
|
2022-09-14 19:11:38 +03:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|