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.

66 lines
2.4KB

  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. */
  22. static inline int
  23. jack_client_is_internal (jack_client_internal_t *client)
  24. {
  25. return (client->control->type == ClientInternal) ||
  26. (client->control->type == ClientDriver);
  27. }
  28. static inline char *
  29. jack_client_state_name (jack_client_internal_t *client)
  30. {
  31. static char *client_state_names[] = {
  32. "Not triggered",
  33. "Triggered",
  34. "Running",
  35. "Finished"
  36. };
  37. return client_state_names[client->control->state];
  38. }
  39. #define JACK_ERROR_WITH_SOCKETS 10000000
  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_mark_client_socket_error (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. int jack_check_clients (jack_engine_t* engine, int with_timeout_check);
  57. void jack_remove_clients (jack_engine_t* engine, int* exit_freewheeling);
  58. void jack_client_registration_notify (jack_engine_t *engine,
  59. const char* name, int yn);
  60. void jack_remove_client (jack_engine_t *engine, jack_client_internal_t *client);