1 /* 2 * LASH 3 * 4 * Copyright (C) 2002 Robert Ham <rah@bash.sh> 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or 9 * (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 19 */ 20 21 #ifndef __LASHD_JACK_PATCH_H__ 22 #define __LASHD_JACK_PATCH_H__ 23 24 #include <uuid/uuid.h> 25 #include <libxml/tree.h> 26 27 #include "project.h" 28 29 typedef struct _jack_patch jack_patch_t; 30 31 struct _jack_patch 32 { 33 char * src_client; 34 char * src_port; 35 char * dest_client; 36 char * dest_port; 37 uuid_t src_client_id; 38 uuid_t dest_client_id; 39 }; 40 41 jack_patch_t * jack_patch_new (); 42 jack_patch_t * jack_patch_dup (const jack_patch_t * patch); 43 void jack_patch_destroy (jack_patch_t * patch); 44 45 void jack_patch_set_src_client (jack_patch_t * patch, const char * src_client); 46 void jack_patch_set_src_port (jack_patch_t * patch, const char * src_port); 47 void jack_patch_set_dest_client (jack_patch_t * patch, const char * dest_client); 48 void jack_patch_set_dest_port (jack_patch_t * patch, const char * dest_port); 49 50 /* get/set both the client and port in/from a jack port name */ 51 const char * jack_patch_get_src (jack_patch_t * patch); 52 const char * jack_patch_get_dest (jack_patch_t * patch); 53 void jack_patch_set_src (jack_patch_t * patch, const char * src); 54 void jack_patch_set_dest (jack_patch_t * patch, const char * dest); 55 56 const char * jack_patch_get_desc (jack_patch_t * patch); 57 58 /* set/unset the lash IDs */ 59 void jack_patch_set (jack_patch_t * patch, lash_list_t * jack_mgr_clients); 60 int jack_patch_unset (jack_patch_t * patch, lash_list_t * jack_mgr_clients); 61 62 void jack_patch_create_xml (jack_patch_t * patch, xmlNodePtr parent); 63 void jack_patch_parse_xml (jack_patch_t * patch, xmlNodePtr parent); 64 65 void jack_patch_switch_clients (jack_patch_t * patch); 66 67 #endif /* __LASHD_JACK_PATCH_H__ */ 68