JACK API headers
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.

135 lines
5.0KB

  1. /*
  2. Copyright (C) 2004 Jack O'Quin
  3. This program is free software; you can redistribute it and/or modify
  4. it under the terms of the GNU Lesser General Public License as published by
  5. the Free Software Foundation; either version 2.1 of the License, or
  6. (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU Lesser General Public License for more details.
  11. You should have received a copy of the GNU Lesser General Public License
  12. along with this program; if not, write to the Free Software
  13. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  14. */
  15. #ifndef JACK_INTCLIENT_H
  16. #define JACK_INTCLIENT_H
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20. #include <jack/types.h>
  21. /**
  22. * Get an internal client's name. This is useful when @ref
  23. * JackUseExactName was not specified on jack_internal_client_load()
  24. * and @ref JackNameNotUnique status was returned. In that case, the
  25. * actual name will differ from the @a client_name requested.
  26. *
  27. * @param client requesting JACK client's handle.
  28. *
  29. * @param intclient handle returned from jack_internal_client_load()
  30. * or jack_internal_client_handle().
  31. *
  32. * @return NULL if unsuccessful, otherwise pointer to the internal
  33. * client name obtained from the heap via malloc(). The caller should
  34. * free() this storage when no longer needed.
  35. */
  36. char *jack_get_internal_client_name (jack_client_t *client,
  37. jack_intclient_t intclient);
  38. /**
  39. * Find the @ref jack_intclient_t handle for an internal client
  40. * running in the JACK server.
  41. *
  42. * @param client requesting JACK client's handle.
  43. *
  44. * @param client_name for the internal client of no more than
  45. * jack_client_name_size() characters. The name scope is local to the
  46. * current server.
  47. *
  48. * @param status (if non-NULL) an address for JACK to return
  49. * information from this operation. This status word is formed by
  50. * OR-ing together the relevant @ref JackStatus bits.
  51. *
  52. * @param handle the client handle will be returned here (passed
  53. * by reference because of the type.
  54. *
  55. * @return 0 if successfullm non-zero otherwise.
  56. * If non-zero, the
  57. * internal client was not found, and @a *status includes the @ref
  58. * JackNoSuchClient and @ref JackFailure bits.
  59. */
  60. int jack_internal_client_handle (jack_client_t *client,
  61. const char *client_name,
  62. jack_status_t *status,
  63. jack_intclient_t *handle);
  64. /**
  65. * Load an internal client into the JACK server.
  66. *
  67. * Internal clients run inside the JACK server process. They can use
  68. * most of the same functions as external clients. Each internal
  69. * client is built as a shared object module, which must declare
  70. * jack_initialize() and jack_finish() entry points called at load and
  71. * unload times. See @ref inprocess.c for an example.
  72. *
  73. * @param client loading JACK client's handle.
  74. *
  75. * @param client_name of at most jack_client_name_size() characters
  76. * for the internal client to load. The name scope is local to the
  77. * current server.
  78. *
  79. * @param options formed by OR-ing together @ref JackOptions bits.
  80. * Only the @ref JackLoadOptions bits are valid.
  81. *
  82. * @param status (if non-NULL) an address for JACK to return
  83. * information from the load operation. This status word is formed by
  84. * OR-ing together the relevant @ref JackStatus bits.
  85. *
  86. * <b>Optional parameters:</b> depending on corresponding [@a options
  87. * bits] additional parameters may follow @a status (in this order).
  88. *
  89. * @arg [@ref JackLoadName] <em>(char *) load_name</em> is the shared
  90. * object file from which to load the new internal client (otherwise
  91. * use the @a client_name).
  92. *
  93. * @arg [@ref JackLoadInit] <em>(char *) load_init</em> an arbitary
  94. * string passed to the internal client's jack_initialize() routine
  95. * (otherwise NULL), of no more than @ref JACK_LOAD_INIT_LIMIT bytes.
  96. *
  97. * @return zero if successful, non-zero otherwise. If this is non-zero,
  98. * the load operation failed, the internal client was not loaded, and
  99. * @a *status includes the @ref JackFailure bit.
  100. */
  101. int jack_internal_client_load (jack_client_t *client,
  102. const char *client_name,
  103. jack_options_t options,
  104. jack_status_t *status,
  105. jack_intclient_t, ...);
  106. /**
  107. * Unload an internal client from a JACK server. This calls the
  108. * intclient's jack_finish() entry point then removes it. See @ref
  109. * inprocess.c for an example.
  110. *
  111. * @param client unloading JACK client's handle.
  112. *
  113. * @param intclient handle returned from jack_internal_client_load() or
  114. * jack_internal_client_handle().
  115. *
  116. * @return 0 if successful, otherwise @ref JackStatus bits.
  117. */
  118. jack_status_t jack_internal_client_unload (jack_client_t *client,
  119. jack_intclient_t intclient);
  120. #ifdef __cplusplus
  121. }
  122. #endif
  123. #endif /* JACK_INTCLIENT_H */