All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
cli_registry.h
Go to the documentation of this file.
1
6#pragma once
7
8#include <furi.h>
9#include <m-array.h>
10#include <toolbox/pipe.h>
11#include "cli_command.h"
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17typedef struct CliRegistry CliRegistry;
18
23
27void cli_registry_free(CliRegistry* registry);
28
40 CliRegistry* registry,
41 const char* name,
42 CliCommandFlag flags,
44 void* context);
45
58 CliRegistry* registry,
59 const char* name,
60 CliCommandFlag flags,
62 void* context,
63 size_t stack_size);
64
71void cli_registry_delete_command(CliRegistry* registry, const char* name);
72
79
87 CliRegistry* registry,
88 const CliCommandExternalConfig* config);
89
90#ifdef __cplusplus
91}
92#endif
Command metadata and helpers.
CliCommandFlag
Definition cli_command.h:18
void(* CliCommandExecuteCallback)(PipeSide *pipe, FuriString *args, void *context)
CLI command execution callback pointer.
Definition cli_command.h:47
void cli_registry_delete_command(CliRegistry *registry, const char *name)
Deletes a cli command.
Definition cli_registry.c:70
void cli_registry_add_command(CliRegistry *registry, const char *name, CliCommandFlag flags, CliCommandExecuteCallback callback, void *context)
Registers a command with the registry.
Definition cli_registry.c:27
CliRegistry * cli_registry_alloc(void)
Allocates a CliRegistry.
Definition cli_registry.c:13
void cli_registry_reload_external_commands(CliRegistry *registry, const CliCommandExternalConfig *config)
Reloads the list of externally available commands.
Definition cli_registry.c:120
void cli_registry_add_command_ex(CliRegistry *registry, const char *name, CliCommandFlag flags, CliCommandExecuteCallback callback, void *context, size_t stack_size)
Registers a command with the registry.
Definition cli_registry.c:37
void cli_registry_free(CliRegistry *registry)
Frees a CliRegistry.
Definition cli_registry.c:20
void cli_registry_remove_external_commands(CliRegistry *registry)
Unregisters all external commands.
Definition cli_registry.c:102
Pipe convenience module.
Configuration for locating external commands.
Definition cli_command.h:59
Definition cli_registry.c:8