[3348] | 1 | //ctl.h: |
---|
[0] | 2 | |
---|
[690] | 3 | /* |
---|
[4708] | 4 | * Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2008-2011 |
---|
[690] | 5 | * |
---|
| 6 | * This file is part of libroar a part of RoarAudio, |
---|
| 7 | * a cross-platform sound system for both, home and professional use. |
---|
| 8 | * See README for details. |
---|
| 9 | * |
---|
| 10 | * This file is free software; you can redistribute it and/or modify |
---|
| 11 | * it under the terms of the GNU General Public License version 3 |
---|
| 12 | * as published by the Free Software Foundation. |
---|
| 13 | * |
---|
| 14 | * libroar is distributed in the hope that it will be useful, |
---|
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 17 | * GNU General Public License for more details. |
---|
| 18 | * |
---|
| 19 | * You should have received a copy of the GNU General Public License |
---|
| 20 | * along with this software; see the file COPYING. If not, write to |
---|
[3517] | 21 | * the Free Software Foundation, 51 Franklin Street, Fifth Floor, |
---|
| 22 | * Boston, MA 02110-1301, USA. |
---|
[690] | 23 | * |
---|
| 24 | * NOTE for everyone want's to change something and send patches: |
---|
| 25 | * read README and HACKING! There a addition information on |
---|
| 26 | * the license of this document you need to read before you send |
---|
| 27 | * any patches. |
---|
| 28 | * |
---|
| 29 | * NOTE for uses of non-GPL (LGPL,...) software using libesd, libartsc |
---|
| 30 | * or libpulse*: |
---|
| 31 | * The libs libroaresd, libroararts and libroarpulse link this lib |
---|
| 32 | * and are therefore GPL. Because of this it may be illigal to use |
---|
| 33 | * them with any software that uses libesd, libartsc or libpulse*. |
---|
| 34 | */ |
---|
| 35 | |
---|
[0] | 36 | #ifndef _LIBROARCTL_H_ |
---|
| 37 | #define _LIBROARCTL_H_ |
---|
| 38 | |
---|
| 39 | #include "libroar.h" |
---|
| 40 | |
---|
[5109] | 41 | #define _LIBROAR_CTL_STDATTRS _LIBROAR_ATTR_USE_RESULT _LIBROAR_ATTR_NONNULL_ALL |
---|
[0] | 42 | |
---|
[5109] | 43 | int roar_get_clientid (struct roar_connection * con) _LIBROAR_CTL_STDATTRS; |
---|
[0] | 44 | |
---|
[5109] | 45 | int roar_get_standby (struct roar_connection * con) _LIBROAR_CTL_STDATTRS; |
---|
| 46 | int roar_set_standby (struct roar_connection * con, int state) _LIBROAR_CTL_STDATTRS; |
---|
| 47 | |
---|
| 48 | int roar_exit (struct roar_connection * con) _LIBROAR_CTL_STDATTRS _LIBROAR_ATTR_DEPRECATED; |
---|
| 49 | int roar_terminate (struct roar_connection * con, int terminate) _LIBROAR_CTL_STDATTRS; |
---|
| 50 | int roar_server_oinfo (struct roar_connection * con, struct roar_stream * s) _LIBROAR_CTL_STDATTRS _LIBROAR_ATTR_DEPRECATED; |
---|
| 51 | int roar_server_oinfo2 (struct roar_connection * con, struct roar_stream * s, int dir) _LIBROAR_CTL_STDATTRS; |
---|
[0] | 52 | |
---|
| 53 | |
---|
[5109] | 54 | int roar_list (struct roar_connection * con, int * items, int max, int cmd) _LIBROAR_CTL_STDATTRS; |
---|
| 55 | int roar_list_filtered(struct roar_connection * con, int * items, int max, int cmd, unsigned char filter, unsigned char cmp, uint32_t id) _LIBROAR_CTL_STDATTRS; |
---|
[0] | 56 | |
---|
| 57 | /* |
---|
| 58 | int roar_list_clients (struct roar_connection * con, int * clients, int max); |
---|
| 59 | int roar_list_streams (struct roar_connection * con, int * streams, int max); |
---|
| 60 | */ |
---|
| 61 | #define roar_list_clients(c,i,m) roar_list((c),(i),(m),ROAR_CMD_LIST_CLIENTS) |
---|
| 62 | #define roar_list_streams(c,i,m) roar_list((c),(i),(m),ROAR_CMD_LIST_STREAMS) |
---|
| 63 | |
---|
[5109] | 64 | int roar_get_client (struct roar_connection * con, struct roar_client * client, int id) _LIBROAR_CTL_STDATTRS; |
---|
| 65 | int roar_get_stream (struct roar_connection * con, struct roar_stream * stream, int id) _LIBROAR_CTL_STDATTRS; |
---|
[0] | 66 | |
---|
[5110] | 67 | int roar_kick (struct roar_connection * con, int type, int id) _LIBROAR_ATTR_NONNULL_ALL; |
---|
[0] | 68 | |
---|
[5109] | 69 | int roar_set_vol (struct roar_connection * con, int id, struct roar_mixer_settings * mixer, int channels) _LIBROAR_CTL_STDATTRS _LIBROAR_ATTR_DEPRECATED; |
---|
| 70 | int roar_set_vol2 (struct roar_connection * con, int id, struct roar_mixer_settings * mixer, int channels, int mode) _LIBROAR_CTL_STDATTRS; |
---|
| 71 | int roar_get_vol (struct roar_connection * con, int id, struct roar_mixer_settings * mixer, int * channels) _LIBROAR_CTL_STDATTRS; |
---|
[17] | 72 | |
---|
[0] | 73 | // filter... |
---|
| 74 | int roar_ctl_f2m (struct roar_message * m, unsigned char filter, unsigned char cmp, uint32_t id); |
---|
| 75 | int roar_ctl_m2f (struct roar_message * m, unsigned char * filter, unsigned char * cmp, uint32_t * id); |
---|
| 76 | #define roar_ctl_f2m_any(m) roar_ctl_f2m((m), ROAR_CTL_FILTER_ANY, ROAR_CTL_FILTER_ANY, ROAR_CTL_FILTER_ANY) |
---|
| 77 | |
---|
[5109] | 78 | int roar_filter_match (const unsigned cmp, const uint32_t a, const uint32_t b) _LIBROAR_ATTR_USE_RESULT _LIBROAR_ATTR_PURE; |
---|
[4332] | 79 | |
---|
[0] | 80 | // int array |
---|
| 81 | int roar_ctl_ia2m (struct roar_message * m, int * data, int len); |
---|
| 82 | int roar_ctl_m2ia (struct roar_message * m, int * data, int len); |
---|
| 83 | |
---|
| 84 | // client |
---|
| 85 | int roar_ctl_c2m (struct roar_message * m, struct roar_client * c); |
---|
| 86 | int roar_ctl_m2c (struct roar_message * m, struct roar_client * c); |
---|
| 87 | |
---|
[5112] | 88 | int roar_str2proto (const char * proto) _LIBROAR_ATTR_USE_RESULT _LIBROAR_ATTR_PURE; |
---|
| 89 | char * roar_proto2str (const int proto) _LIBROAR_ATTR_USE_RESULT _LIBROAR_ATTR_PURE; |
---|
[2548] | 90 | |
---|
[5112] | 91 | int roar_str2byteorder (const char * byteorder) _LIBROAR_ATTR_USE_RESULT _LIBROAR_ATTR_PURE; |
---|
| 92 | char * roar_byteorder2str (const int byteorder) _LIBROAR_ATTR_USE_RESULT _LIBROAR_ATTR_PURE; |
---|
[2615] | 93 | |
---|
[5109] | 94 | int roar_str2ot (const char * ot) _LIBROAR_ATTR_USE_RESULT _LIBROAR_ATTR_PURE; |
---|
| 95 | const char * roar_ot2str (const int ot) _LIBROAR_ATTR_USE_RESULT _LIBROAR_ATTR_PURE; |
---|
[4327] | 96 | |
---|
[5109] | 97 | int roar_conv_volume (struct roar_mixer_settings * dst, struct roar_mixer_settings * src, int dstchans, int srcchans) _LIBROAR_CTL_STDATTRS; |
---|
[4384] | 98 | |
---|
[0] | 99 | #endif |
---|
| 100 | |
---|
| 101 | //ll |
---|