jack1 codebase
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
2.1KB

  1. /*
  2. * Client creation and destruction interfaces for JACK engine.
  3. *
  4. * Copyright (C) 2001-2003 Paul Davis
  5. * Copyright (C) 2004 Jack O'Quin
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License as
  9. * published by the Free Software Foundation; either version 2 of the
  10. * License, or (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20. *
  21. * $Id$
  22. */
  23. static inline int
  24. jack_client_is_internal (jack_client_internal_t *client)
  25. {
  26. return (client->control->type == ClientInternal) ||
  27. (client->control->type == ClientDriver);
  28. }
  29. static inline char *
  30. jack_client_state_name (jack_client_internal_t *client)
  31. {
  32. static char *client_state_names[] = {
  33. "Not triggered",
  34. "Triggered",
  35. "Running",
  36. "Finished"
  37. };
  38. return client_state_names[client->control->state];
  39. }
  40. int jack_client_activate (jack_engine_t *engine, jack_client_id_t id);
  41. int jack_client_deactivate (jack_engine_t *engine, jack_client_id_t id);
  42. int jack_client_create (jack_engine_t *engine, int client_fd);
  43. void jack_client_delete (jack_engine_t *engine,
  44. jack_client_internal_t *client);
  45. int jack_client_disconnect (jack_engine_t *engine, int fd);
  46. jack_client_internal_t *
  47. jack_create_driver_client (jack_engine_t *engine, char *name);
  48. void jack_intclient_handle_request (jack_engine_t *engine,
  49. jack_request_t *req);
  50. void jack_intclient_load_request (jack_engine_t *engine,
  51. jack_request_t *req);
  52. void jack_intclient_name_request (jack_engine_t *engine,
  53. jack_request_t *req);
  54. void jack_intclient_unload_request (jack_engine_t *engine,
  55. jack_request_t *req);
  56. void jack_remove_clients (jack_engine_t* engine);