From e205b25d65ccb380fa158711e24d55b6de5d9bc1 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Thu, 16 Feb 2006 19:19:58 +0000 Subject: Reorganised the source tree. We now have src/ with a couple of subdirs: * daemon/ - Contains the files specific to the polypaudio daemon. * modules/ - All loadable modules. * polyp/ - Files that are part of the public, application interface or are only used in libpolyp. * polypcore/ - All other shared files. * tests/ - Test programs. * utils/ - Utility programs. git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@487 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/utils/pax11publish.c | 217 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 217 insertions(+) create mode 100644 src/utils/pax11publish.c (limited to 'src/utils/pax11publish.c') diff --git a/src/utils/pax11publish.c b/src/utils/pax11publish.c new file mode 100644 index 00000000..63ee4821 --- /dev/null +++ b/src/utils/pax11publish.c @@ -0,0 +1,217 @@ +/* $Id$ */ + +/*** + This file is part of polypaudio. + + polypaudio is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, + or (at your option) any later version. + + polypaudio is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with polypaudio; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + USA. +***/ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include + +int main(int argc, char *argv[]) { + const char *dname = NULL, *sink = NULL, *source = NULL, *server = NULL, *cookie_file = PA_NATIVE_COOKIE_FILE; + int c, ret = 1; + Display *d = NULL; + enum { DUMP, EXPORT, IMPORT, REMOVE } mode = DUMP; + + while ((c = getopt(argc, argv, "deiD:S:O:I:c:hr")) != -1) { + switch (c) { + case 'D' : + dname = optarg; + break; + case 'h': + printf("%s [-D display] [-S server] [-O sink] [-I source] [-c file] [-d|-e|-i|-r]\n\n" + " -d Show current Polypaudio data attached to X11 display (default)\n" + " -e Export local Polypaudio data to X11 display\n" + " -i Import Polypaudio data from X11 display to local environment variables and cookie file.\n" + " -r Remove Polypaudio data from X11 display\n", + pa_path_get_filename(argv[0])); + ret = 0; + goto finish; + case 'd': + mode = DUMP; + break; + case 'e': + mode = EXPORT; + break; + case 'i': + mode = IMPORT; + break; + case 'r': + mode = REMOVE; + break; + case 'c': + cookie_file = optarg; + break; + case 'I': + source = optarg; + break; + case 'O': + sink = optarg; + break; + case 'S': + server = optarg; + break; + default: + fprintf(stderr, "Failed to parse command line.\n"); + goto finish; + } + } + + if (!(d = XOpenDisplay(dname))) { + pa_log(__FILE__": XOpenDisplay() failed\n"); + goto finish; + } + + switch (mode) { + case DUMP: { + char t[1024]; + if (pa_x11_get_prop(d, "POLYP_SERVER", t, sizeof(t))) + printf("Server: %s\n", t); + if (pa_x11_get_prop(d, "POLYP_SOURCE", t, sizeof(t))) + printf("Source: %s\n", t); + if (pa_x11_get_prop(d, "POLYP_SINK", t, sizeof(t))) + printf("Sink: %s\n", t); + if (pa_x11_get_prop(d, "POLYP_COOKIE", t, sizeof(t))) + printf("Cookie: %s\n", t); + + break; + } + + case IMPORT: { + char t[1024]; + if (pa_x11_get_prop(d, "POLYP_SERVER", t, sizeof(t))) + printf("POLYP_SERVER='%s'\nexport POLYP_SERVER\n", t); + if (pa_x11_get_prop(d, "POLYP_SOURCE", t, sizeof(t))) + printf("POLYP_SOURCE='%s'\nexport POLYP_SOURCE\n", t); + if (pa_x11_get_prop(d, "POLYP_SINK", t, sizeof(t))) + printf("POLYP_SINK='%s'\nexport POLYP_SINK\n", t); + + if (pa_x11_get_prop(d, "POLYP_COOKIE", t, sizeof(t))) { + uint8_t cookie[PA_NATIVE_COOKIE_LENGTH]; + size_t l; + if ((l = pa_parsehex(t, cookie, sizeof(cookie))) != sizeof(cookie)) { + fprintf(stderr, "Failed to parse cookie data\n"); + goto finish; + } + + if (pa_authkey_save(cookie_file, cookie, l) < 0) { + fprintf(stderr, "Failed to save cookie data\n"); + goto finish; + } + } + + break; + } + + case EXPORT: { + pa_client_conf *conf = pa_client_conf_new(); + uint8_t cookie[PA_NATIVE_COOKIE_LENGTH]; + char hx[PA_NATIVE_COOKIE_LENGTH*2+1]; + assert(conf); + + if (pa_client_conf_load(conf, NULL) < 0) { + fprintf(stderr, "Failed to load client configuration file.\n"); + goto finish; + } + + if (pa_client_conf_env(conf) < 0) { + fprintf(stderr, "Failed to read environment configuration data.\n"); + goto finish; + } + + pa_x11_del_prop(d, "POLYP_SERVER"); + pa_x11_del_prop(d, "POLYP_SINK"); + pa_x11_del_prop(d, "POLYP_SOURCE"); + pa_x11_del_prop(d, "POLYP_ID"); + pa_x11_del_prop(d, "POLYP_COOKIE"); + + if (server) + pa_x11_set_prop(d, "POLYP_SERVER", server); + else if (conf->default_server) + pa_x11_set_prop(d, "POLYP_SERVER", conf->default_server); + else { + char hn[256]; + if (!pa_get_fqdn(hn, sizeof(hn))) { + fprintf(stderr, "Failed to get FQDN.\n"); + goto finish; + } + + pa_x11_set_prop(d, "POLYP_SERVER", hn); + } + + if (sink) + pa_x11_set_prop(d, "POLYP_SINK", sink); + else if (conf->default_sink) + pa_x11_set_prop(d, "POLYP_SINK", conf->default_sink); + + if (source) + pa_x11_set_prop(d, "POLYP_SOURCE", source); + if (conf->default_source) + pa_x11_set_prop(d, "POLYP_SOURCE", conf->default_source); + + pa_client_conf_free(conf); + + if (pa_authkey_load_auto(cookie_file, cookie, sizeof(cookie)) < 0) { + fprintf(stderr, "Failed to load cookie data\n"); + goto finish; + } + + pa_x11_set_prop(d, "POLYP_COOKIE", pa_hexstr(cookie, sizeof(cookie), hx, sizeof(hx))); + break; + } + + case REMOVE: + pa_x11_del_prop(d, "POLYP_SERVER"); + pa_x11_del_prop(d, "POLYP_SINK"); + pa_x11_del_prop(d, "POLYP_SOURCE"); + pa_x11_del_prop(d, "POLYP_ID"); + pa_x11_del_prop(d, "POLYP_COOKIE"); + break; + + default: + fprintf(stderr, "No yet implemented.\n"); + goto finish; + } + + ret = 0; + +finish: + + if (d) { + XSync(d, False); + XCloseDisplay(d); + } + + return ret; +} -- cgit From b4cb249d704cbb0458640526a07e1f541b899d3e Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 16 Feb 2006 23:12:10 +0000 Subject: shorten include list of utils a little git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@495 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/utils/pax11publish.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/utils/pax11publish.c') diff --git a/src/utils/pax11publish.c b/src/utils/pax11publish.c index 63ee4821..908a3507 100644 --- a/src/utils/pax11publish.c +++ b/src/utils/pax11publish.c @@ -35,8 +35,8 @@ #include #include #include -#include #include +#include int main(int argc, char *argv[]) { const char *dname = NULL, *sink = NULL, *source = NULL, *server = NULL, *cookie_file = PA_NATIVE_COOKIE_FILE; -- cgit From 5eda18bf608a325c136a450e58fa154eb0b270f4 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Fri, 17 Feb 2006 12:10:58 +0000 Subject: Cleaned up the includes after the restructuring. Indicate which headers are public and which are internal through <> vs "". git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@500 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/utils/pax11publish.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/utils/pax11publish.c') diff --git a/src/utils/pax11publish.c b/src/utils/pax11publish.c index 908a3507..56b62d37 100644 --- a/src/utils/pax11publish.c +++ b/src/utils/pax11publish.c @@ -36,7 +36,8 @@ #include #include #include -#include + +#include "../polyp/client-conf.h" int main(int argc, char *argv[]) { const char *dname = NULL, *sink = NULL, *source = NULL, *server = NULL, *cookie_file = PA_NATIVE_COOKIE_FILE; -- cgit From 4a64b0d1167e980d81b798d813f35209895f0674 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 23 Feb 2006 02:27:19 +0000 Subject: change pa_log() and friends to not require a trailing \n on all logged strings git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@574 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/utils/pax11publish.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/utils/pax11publish.c') diff --git a/src/utils/pax11publish.c b/src/utils/pax11publish.c index 56b62d37..e4358894 100644 --- a/src/utils/pax11publish.c +++ b/src/utils/pax11publish.c @@ -90,7 +90,7 @@ int main(int argc, char *argv[]) { } if (!(d = XOpenDisplay(dname))) { - pa_log(__FILE__": XOpenDisplay() failed\n"); + pa_log(__FILE__": XOpenDisplay() failed"); goto finish; } -- cgit From 53a285e75616281bcdd8b1dcf0e3b7ba59257516 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 17 May 2006 20:44:55 +0000 Subject: fix include line for "core-util.h" git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@923 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/utils/pax11publish.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/utils/pax11publish.c') diff --git a/src/utils/pax11publish.c b/src/utils/pax11publish.c index e4358894..ee0cb845 100644 --- a/src/utils/pax11publish.c +++ b/src/utils/pax11publish.c @@ -31,7 +31,7 @@ #include #include -#include +#include #include #include #include -- cgit From a3fe39ac4168d9521dc12c8e27eb8040ff078f5e Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Fri, 19 May 2006 11:32:32 +0000 Subject: Fix some missing headers. git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@937 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/utils/pax11publish.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/utils/pax11publish.c') diff --git a/src/utils/pax11publish.c b/src/utils/pax11publish.c index ee0cb845..668361c6 100644 --- a/src/utils/pax11publish.c +++ b/src/utils/pax11publish.c @@ -31,6 +31,8 @@ #include #include +#include + #include #include #include -- cgit From f44ba092651aa75055e109e04b4164ea92ae7fdc Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 19 Jun 2006 21:53:48 +0000 Subject: big s/polyp/pulse/g git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1033 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/utils/pax11publish.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/utils/pax11publish.c') diff --git a/src/utils/pax11publish.c b/src/utils/pax11publish.c index 668361c6..770455b9 100644 --- a/src/utils/pax11publish.c +++ b/src/utils/pax11publish.c @@ -1,20 +1,20 @@ /* $Id$ */ /*** - This file is part of polypaudio. + This file is part of PulseAudio. - polypaudio is free software; you can redistribute it and/or modify + PulseAudio is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - polypaudio is distributed in the hope that it will be useful, but + PulseAudio is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with polypaudio; if not, write to the Free Software + along with PulseAudio; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. ***/ @@ -31,15 +31,15 @@ #include #include -#include +#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include -#include "../polyp/client-conf.h" +#include "../pulse/client-conf.h" int main(int argc, char *argv[]) { const char *dname = NULL, *sink = NULL, *source = NULL, *server = NULL, *cookie_file = PA_NATIVE_COOKIE_FILE; -- cgit From 10b5e997d7a8a4e955ce49cc816fdcd36225ff6e Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 19 Jun 2006 22:11:49 +0000 Subject: replace a few remaining uppercase "Polypaudio" occurences with "PulseAudio" git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1036 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/utils/pax11publish.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/utils/pax11publish.c') diff --git a/src/utils/pax11publish.c b/src/utils/pax11publish.c index 770455b9..d2ed6c93 100644 --- a/src/utils/pax11publish.c +++ b/src/utils/pax11publish.c @@ -54,10 +54,10 @@ int main(int argc, char *argv[]) { break; case 'h': printf("%s [-D display] [-S server] [-O sink] [-I source] [-c file] [-d|-e|-i|-r]\n\n" - " -d Show current Polypaudio data attached to X11 display (default)\n" - " -e Export local Polypaudio data to X11 display\n" - " -i Import Polypaudio data from X11 display to local environment variables and cookie file.\n" - " -r Remove Polypaudio data from X11 display\n", + " -d Show current PulseAudio data attached to X11 display (default)\n" + " -e Export local PulseAudio data to X11 display\n" + " -i Import PulseAudio data from X11 display to local environment variables and cookie file.\n" + " -r Remove PulseAudio data from X11 display\n", pa_path_get_filename(argv[0])); ret = 0; goto finish; -- cgit From 230f97a4a4dc22510a19add8b2df0533a359846c Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 19 Jun 2006 23:56:54 +0000 Subject: s/POLYP/PULSE/g git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1041 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/utils/pax11publish.c | 60 ++++++++++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 30 deletions(-) (limited to 'src/utils/pax11publish.c') diff --git a/src/utils/pax11publish.c b/src/utils/pax11publish.c index d2ed6c93..2a0d21d6 100644 --- a/src/utils/pax11publish.c +++ b/src/utils/pax11publish.c @@ -99,13 +99,13 @@ int main(int argc, char *argv[]) { switch (mode) { case DUMP: { char t[1024]; - if (pa_x11_get_prop(d, "POLYP_SERVER", t, sizeof(t))) + if (pa_x11_get_prop(d, "PULSE_SERVER", t, sizeof(t))) printf("Server: %s\n", t); - if (pa_x11_get_prop(d, "POLYP_SOURCE", t, sizeof(t))) + if (pa_x11_get_prop(d, "PULSE_SOURCE", t, sizeof(t))) printf("Source: %s\n", t); - if (pa_x11_get_prop(d, "POLYP_SINK", t, sizeof(t))) + if (pa_x11_get_prop(d, "PULSE_SINK", t, sizeof(t))) printf("Sink: %s\n", t); - if (pa_x11_get_prop(d, "POLYP_COOKIE", t, sizeof(t))) + if (pa_x11_get_prop(d, "PULSE_COOKIE", t, sizeof(t))) printf("Cookie: %s\n", t); break; @@ -113,14 +113,14 @@ int main(int argc, char *argv[]) { case IMPORT: { char t[1024]; - if (pa_x11_get_prop(d, "POLYP_SERVER", t, sizeof(t))) - printf("POLYP_SERVER='%s'\nexport POLYP_SERVER\n", t); - if (pa_x11_get_prop(d, "POLYP_SOURCE", t, sizeof(t))) - printf("POLYP_SOURCE='%s'\nexport POLYP_SOURCE\n", t); - if (pa_x11_get_prop(d, "POLYP_SINK", t, sizeof(t))) - printf("POLYP_SINK='%s'\nexport POLYP_SINK\n", t); - - if (pa_x11_get_prop(d, "POLYP_COOKIE", t, sizeof(t))) { + if (pa_x11_get_prop(d, "PULSE_SERVER", t, sizeof(t))) + printf("PULSE_SERVER='%s'\nexport PULSE_SERVER\n", t); + if (pa_x11_get_prop(d, "PULSE_SOURCE", t, sizeof(t))) + printf("PULSE_SOURCE='%s'\nexport PULSE_SOURCE\n", t); + if (pa_x11_get_prop(d, "PULSE_SINK", t, sizeof(t))) + printf("PULSE_SINK='%s'\nexport PULSE_SINK\n", t); + + if (pa_x11_get_prop(d, "PULSE_COOKIE", t, sizeof(t))) { uint8_t cookie[PA_NATIVE_COOKIE_LENGTH]; size_t l; if ((l = pa_parsehex(t, cookie, sizeof(cookie))) != sizeof(cookie)) { @@ -153,16 +153,16 @@ int main(int argc, char *argv[]) { goto finish; } - pa_x11_del_prop(d, "POLYP_SERVER"); - pa_x11_del_prop(d, "POLYP_SINK"); - pa_x11_del_prop(d, "POLYP_SOURCE"); - pa_x11_del_prop(d, "POLYP_ID"); - pa_x11_del_prop(d, "POLYP_COOKIE"); + pa_x11_del_prop(d, "PULSE_SERVER"); + pa_x11_del_prop(d, "PULSE_SINK"); + pa_x11_del_prop(d, "PULSE_SOURCE"); + pa_x11_del_prop(d, "PULSE_ID"); + pa_x11_del_prop(d, "PULSE_COOKIE"); if (server) - pa_x11_set_prop(d, "POLYP_SERVER", server); + pa_x11_set_prop(d, "PULSE_SERVER", server); else if (conf->default_server) - pa_x11_set_prop(d, "POLYP_SERVER", conf->default_server); + pa_x11_set_prop(d, "PULSE_SERVER", conf->default_server); else { char hn[256]; if (!pa_get_fqdn(hn, sizeof(hn))) { @@ -170,18 +170,18 @@ int main(int argc, char *argv[]) { goto finish; } - pa_x11_set_prop(d, "POLYP_SERVER", hn); + pa_x11_set_prop(d, "PULSE_SERVER", hn); } if (sink) - pa_x11_set_prop(d, "POLYP_SINK", sink); + pa_x11_set_prop(d, "PULSE_SINK", sink); else if (conf->default_sink) - pa_x11_set_prop(d, "POLYP_SINK", conf->default_sink); + pa_x11_set_prop(d, "PULSE_SINK", conf->default_sink); if (source) - pa_x11_set_prop(d, "POLYP_SOURCE", source); + pa_x11_set_prop(d, "PULSE_SOURCE", source); if (conf->default_source) - pa_x11_set_prop(d, "POLYP_SOURCE", conf->default_source); + pa_x11_set_prop(d, "PULSE_SOURCE", conf->default_source); pa_client_conf_free(conf); @@ -190,16 +190,16 @@ int main(int argc, char *argv[]) { goto finish; } - pa_x11_set_prop(d, "POLYP_COOKIE", pa_hexstr(cookie, sizeof(cookie), hx, sizeof(hx))); + pa_x11_set_prop(d, "PULSE_COOKIE", pa_hexstr(cookie, sizeof(cookie), hx, sizeof(hx))); break; } case REMOVE: - pa_x11_del_prop(d, "POLYP_SERVER"); - pa_x11_del_prop(d, "POLYP_SINK"); - pa_x11_del_prop(d, "POLYP_SOURCE"); - pa_x11_del_prop(d, "POLYP_ID"); - pa_x11_del_prop(d, "POLYP_COOKIE"); + pa_x11_del_prop(d, "PULSE_SERVER"); + pa_x11_del_prop(d, "PULSE_SINK"); + pa_x11_del_prop(d, "PULSE_SOURCE"); + pa_x11_del_prop(d, "PULSE_ID"); + pa_x11_del_prop(d, "PULSE_COOKIE"); break; default: -- cgit From e385d93e5aad6a6fce754c00c804ff1d6a6746d4 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 18 Aug 2006 21:38:40 +0000 Subject: remove all occurences of pa_logXXX(__FILE__": and replace them by pa_logXXX(" git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1272 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/utils/pax11publish.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/utils/pax11publish.c') diff --git a/src/utils/pax11publish.c b/src/utils/pax11publish.c index 2a0d21d6..6a3c6dbc 100644 --- a/src/utils/pax11publish.c +++ b/src/utils/pax11publish.c @@ -92,7 +92,7 @@ int main(int argc, char *argv[]) { } if (!(d = XOpenDisplay(dname))) { - pa_log(__FILE__": XOpenDisplay() failed"); + pa_log("XOpenDisplay() failed"); goto finish; } -- cgit From 521daf6f0ac4fa6a2fbfb5d523c0c743342dca2b Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Thu, 4 Jan 2007 13:43:45 +0000 Subject: Huge trailing whitespace cleanup. Let's keep the tree pure from here on, mmmkay? git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1418 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/utils/pax11publish.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/utils/pax11publish.c') diff --git a/src/utils/pax11publish.c b/src/utils/pax11publish.c index 6a3c6dbc..00332f65 100644 --- a/src/utils/pax11publish.c +++ b/src/utils/pax11publish.c @@ -2,17 +2,17 @@ /*** This file is part of PulseAudio. - + PulseAudio is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + PulseAudio is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU Lesser General Public License along with PulseAudio; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 @@ -99,7 +99,7 @@ int main(int argc, char *argv[]) { switch (mode) { case DUMP: { char t[1024]; - if (pa_x11_get_prop(d, "PULSE_SERVER", t, sizeof(t))) + if (pa_x11_get_prop(d, "PULSE_SERVER", t, sizeof(t))) printf("Server: %s\n", t); if (pa_x11_get_prop(d, "PULSE_SOURCE", t, sizeof(t))) printf("Source: %s\n", t); @@ -110,10 +110,10 @@ int main(int argc, char *argv[]) { break; } - + case IMPORT: { char t[1024]; - if (pa_x11_get_prop(d, "PULSE_SERVER", t, sizeof(t))) + if (pa_x11_get_prop(d, "PULSE_SERVER", t, sizeof(t))) printf("PULSE_SERVER='%s'\nexport PULSE_SERVER\n", t); if (pa_x11_get_prop(d, "PULSE_SOURCE", t, sizeof(t))) printf("PULSE_SOURCE='%s'\nexport PULSE_SOURCE\n", t); @@ -158,7 +158,7 @@ int main(int argc, char *argv[]) { pa_x11_del_prop(d, "PULSE_SOURCE"); pa_x11_del_prop(d, "PULSE_ID"); pa_x11_del_prop(d, "PULSE_COOKIE"); - + if (server) pa_x11_set_prop(d, "PULSE_SERVER", server); else if (conf->default_server) @@ -169,7 +169,7 @@ int main(int argc, char *argv[]) { fprintf(stderr, "Failed to get FQDN.\n"); goto finish; } - + pa_x11_set_prop(d, "PULSE_SERVER", hn); } @@ -184,7 +184,7 @@ int main(int argc, char *argv[]) { pa_x11_set_prop(d, "PULSE_SOURCE", conf->default_source); pa_client_conf_free(conf); - + if (pa_authkey_load_auto(cookie_file, cookie, sizeof(cookie)) < 0) { fprintf(stderr, "Failed to load cookie data\n"); goto finish; @@ -201,20 +201,20 @@ int main(int argc, char *argv[]) { pa_x11_del_prop(d, "PULSE_ID"); pa_x11_del_prop(d, "PULSE_COOKIE"); break; - + default: fprintf(stderr, "No yet implemented.\n"); goto finish; } ret = 0; - + finish: if (d) { XSync(d, False); XCloseDisplay(d); } - + return ret; } -- cgit From 06211b7c8fd329137ae9003818543912a87d9898 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Tue, 13 Feb 2007 15:35:19 +0000 Subject: Add copyright notices to all relevant files. (based on svn log) git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1426 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/utils/pax11publish.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/utils/pax11publish.c') diff --git a/src/utils/pax11publish.c b/src/utils/pax11publish.c index 00332f65..9a50f8ef 100644 --- a/src/utils/pax11publish.c +++ b/src/utils/pax11publish.c @@ -3,6 +3,8 @@ /*** This file is part of PulseAudio. + Copyright 2004-2006 Lennart Poettering + PulseAudio is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, -- cgit