daemon: remove useless client properties

This commit is contained in:
Nedko Arnaudov 2010-03-24 02:02:45 +02:00
parent 13bc814f0b
commit e22b7a2d69
5 changed files with 13 additions and 25 deletions

View File

@ -35,10 +35,7 @@ struct ladish_client
uuid_t uuid; /* The UUID of the client */
uint64_t jack_id; /* JACK client ID */
char * jack_name; /* JACK name, not valid for virtual clients */
bool virtual:1; /* Whether client is virtual */
bool link:1; /* Whether client is a studio-room link */
bool system:1; /* Whether client is system (server in-process) */
pid_t pid; /* process id. Not valid for system and virtual clients */
pid_t pid; /* process id. */
struct room * room_ptr; /* Room this client belongs to. If NULL, client belongs only to studio guts. */
ladish_dict_handle dict;
};
@ -46,9 +43,6 @@ struct ladish_client
bool
ladish_client_create(
const uuid_t uuid_ptr,
bool virtual,
bool link,
bool system,
ladish_client_handle * client_handle_ptr)
{
struct ladish_client * client_ptr;
@ -81,9 +75,6 @@ ladish_client_create(
INIT_LIST_HEAD(&client_ptr->ports);
client_ptr->jack_id = 0;
client_ptr->jack_name = NULL;
client_ptr->virtual = virtual;
client_ptr->link = link;
client_ptr->system = system;
client_ptr->pid = 0;
client_ptr->room_ptr = NULL;
@ -107,7 +98,7 @@ ladish_client_create_copy(
ladish_client_handle client_handle,
ladish_client_handle * client_handle_ptr)
{
return ladish_client_create(client_ptr->uuid, client_ptr->virtual, client_ptr->link, client_ptr->system, client_handle_ptr);
return ladish_client_create(client_ptr->uuid, client_handle_ptr);
}
void

View File

@ -34,9 +34,6 @@ typedef struct ladish_client_tag { int unused; } * ladish_client_handle;
bool
ladish_client_create(
const uuid_t uuid_ptr,
bool virtual,
bool link,
bool system,
ladish_client_handle * client_handle_ptr);
bool

View File

@ -2,7 +2,7 @@
/*
* LADI Session Handler (ladish)
*
* Copyright (C) 2009 Nedko Arnaudov <nedko@arnaudov.name>
* Copyright (C) 2009, 2010 Nedko Arnaudov <nedko@arnaudov.name>
*
**************************************************************************
* This file contains implementation of the "load studio" command
@ -209,7 +209,7 @@ static void callback_elstart(void * data, const char * el, const char ** attr)
log_info("jack client \"%s\" with uuid %s", attr[1], attr[3]);
if (!ladish_client_create(uuid, false, false, false, &context_ptr->client))
if (!ladish_client_create(uuid, &context_ptr->client))
{
log_error("ladish_client_create() failed.");
context_ptr->error = XML_TRUE;
@ -252,7 +252,7 @@ static void callback_elstart(void * data, const char * el, const char ** attr)
log_info("studio client \"%s\" with uuid %s", attr[1], attr[3]);
if (!ladish_client_create(uuid, true, false, false, &context_ptr->client))
if (!ladish_client_create(uuid, &context_ptr->client))
{
log_error("ladish_client_create() failed.");
context_ptr->error = XML_TRUE;

View File

@ -84,7 +84,7 @@ create_room_template(
graph = ladish_room_get_graph(room);
if (!ladish_client_create(ladish_wkclient_capture, true, true, false, &capture))
if (!ladish_client_create(ladish_wkclient_capture, &capture))
{
log_error("ladish_client_create() failed to create capture client to room template \"%s\".", name);
goto fail_destroy;
@ -96,7 +96,7 @@ create_room_template(
goto fail_destroy;
}
if (!ladish_client_create(ladish_wkclient_playback, true, true, false, &playback))
if (!ladish_client_create(ladish_wkclient_playback, &playback))
{
log_error("ladish_client_create() failed to create playback client to room template \"%s\".", name);
goto fail_destroy;

View File

@ -2,7 +2,7 @@
/*
* LADI Session Handler (ladish)
*
* Copyright (C) 2009 Nedko Arnaudov <nedko@arnaudov.name>
* Copyright (C) 2009, 2010 Nedko Arnaudov <nedko@arnaudov.name>
*
**************************************************************************
* This file contains implementation of the graph virtualizer object
@ -144,7 +144,7 @@ static void client_appeared(void * context, uint64_t id, const char * jack_name)
goto done;
}
if (!ladish_client_create(is_a2j ? g_a2j_uuid : NULL, true, false, false, &client))
if (!ladish_client_create(is_a2j ? g_a2j_uuid : NULL, &client))
{
log_error("ladish_client_create() failed. Ignoring client %"PRIu64" (%s)", id, jack_name);
goto free_app_name;
@ -352,7 +352,7 @@ port_appeared(
studio_client = ladish_graph_find_client_by_name(virtualizer_ptr->studio_graph, alsa_client_name);
if (studio_client == NULL)
{
if (!ladish_client_create(NULL, true, false, true, &studio_client))
if (!ladish_client_create(NULL, &studio_client))
{
log_error("ladish_client_create() failed.");
goto free_alsa_names;
@ -377,7 +377,7 @@ port_appeared(
studio_client = ladish_graph_find_client_by_uuid(virtualizer_ptr->studio_graph, g_system_capture_uuid);
if (studio_client == NULL)
{
if (!ladish_client_create(g_system_capture_uuid, true, false, true, &studio_client))
if (!ladish_client_create(g_system_capture_uuid, &studio_client))
{
log_error("ladish_client_create() failed.");
goto free_alsa_names;
@ -396,7 +396,7 @@ port_appeared(
studio_client = ladish_graph_find_client_by_uuid(virtualizer_ptr->studio_graph, g_system_playback_uuid);
if (studio_client == NULL)
{
if (!ladish_client_create(g_system_playback_uuid, true, false, true, &studio_client))
if (!ladish_client_create(g_system_playback_uuid, &studio_client))
{
log_error("ladish_client_create() failed.");
goto free_alsa_names;
@ -417,7 +417,7 @@ port_appeared(
studio_client = ladish_graph_find_client_by_jack_id(virtualizer_ptr->studio_graph, client_id);
if (studio_client == NULL)
{
if (!ladish_client_create(NULL, false, false, false, &studio_client))
if (!ladish_client_create(NULL, &studio_client))
{
log_error("ladish_client_create() failed.");
goto free_alsa_names;