daemon: expose some studio internals
* studio_is_started() is now public * ladish_studio_get_cmd_queue() returns the queue
This commit is contained in:
parent
5a8019f031
commit
ac74633473
|
@ -30,7 +30,7 @@
|
|||
#include "../dbus/error.h"
|
||||
#include "control.h"
|
||||
#include "../dbus_constants.h"
|
||||
#include "studio_internal.h"
|
||||
#include "cmd.h"
|
||||
#include "room.h"
|
||||
#include "../lib/wkports.h"
|
||||
|
||||
|
@ -433,7 +433,7 @@ static void ladish_load_studio(struct dbus_method_call * call_ptr)
|
|||
|
||||
log_info("Load studio request (%s)", name);
|
||||
|
||||
if (ladish_command_load_studio(call_ptr, &g_studio.cmd_queue, name))
|
||||
if (ladish_command_load_studio(call_ptr, ladish_studio_get_cmd_queue(), name))
|
||||
{
|
||||
method_return_new_void(call_ptr);
|
||||
}
|
||||
|
@ -473,7 +473,7 @@ static void ladish_new_studio(struct dbus_method_call * call_ptr)
|
|||
|
||||
log_info("New studio request (%s)", name);
|
||||
|
||||
if (ladish_command_new_studio(call_ptr, &g_studio.cmd_queue, name))
|
||||
if (ladish_command_new_studio(call_ptr, ladish_studio_get_cmd_queue(), name))
|
||||
{
|
||||
method_return_new_void(call_ptr);
|
||||
}
|
||||
|
@ -664,7 +664,7 @@ static void ladish_exit(struct dbus_method_call * call_ptr)
|
|||
{
|
||||
log_info("Exit command received through D-Bus");
|
||||
|
||||
if (!ladish_command_exit(NULL, &g_studio.cmd_queue))
|
||||
if (!ladish_command_exit(NULL, ladish_studio_get_cmd_queue()))
|
||||
{ /* if queuing of command failed, force exit anyway,
|
||||
JACK server will be left started,
|
||||
but refusing exit command is worse */
|
||||
|
|
|
@ -634,6 +634,11 @@ bool studio_compose_filename(const char * name, char ** filename_ptr_ptr, char *
|
|||
return true;
|
||||
}
|
||||
|
||||
struct ladish_cqueue * ladish_studio_get_cmd_queue(void)
|
||||
{
|
||||
return &g_studio.cmd_queue;
|
||||
}
|
||||
|
||||
bool studios_iterate(void * call_ptr, void * context, bool (* callback)(void * call_ptr, void * context, const char * studio, uint32_t modtime))
|
||||
{
|
||||
DIR * dir;
|
||||
|
|
|
@ -34,6 +34,7 @@ bool studio_init(void);
|
|||
void studio_uninit(void);
|
||||
void studio_run(void);
|
||||
bool studio_is_loaded(void);
|
||||
bool studio_is_started(void);
|
||||
|
||||
bool studios_iterate(void * call_ptr, void * context, bool (* callback)(void * call_ptr, void * context, const char * studio, uint32_t modtime));
|
||||
bool studio_delete(void * call_ptr, const char * studio_name);
|
||||
|
@ -49,5 +50,6 @@ studio_iterate_virtual_graphs(
|
|||
ladish_app_supervisor_handle app_supervisor));
|
||||
|
||||
void studio_stop_app_supervisors(void);
|
||||
struct ladish_cqueue * ladish_studio_get_cmd_queue(void);
|
||||
|
||||
#endif /* #ifndef STUDIO_H__0BEDE85E_4FB3_4D74_BC08_C373A22409C0__INCLUDED */
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include "virtualizer.h"
|
||||
#include "app_supervisor.h"
|
||||
#include "cmd.h"
|
||||
#include "studio.h"
|
||||
|
||||
#define JACK_CONF_MAX_ADDRESS_SIZE 1024
|
||||
|
||||
|
@ -190,7 +191,6 @@ bool studio_fetch_jack_settings(void);
|
|||
bool studio_compose_filename(const char * name, char ** filename_ptr_ptr, char ** backup_filename_ptr_ptr);
|
||||
bool studio_publish(void);
|
||||
bool studio_name_generate(char ** name_ptr);
|
||||
bool studio_is_started(void);
|
||||
void emit_studio_started(void);
|
||||
void emit_studio_stopped(void);
|
||||
void emit_studio_renamed(void);
|
||||
|
|
Loading…
Reference in New Issue