Permalink
Browse files

command: moved mpd_send_setvol() to mixer.c

  • Loading branch information...
1 parent b4d0fa7 commit ff86ae67c9ace3129c5264bc8e5a105fd819af96 @MaxKellermann MaxKellermann committed Sep 18, 2009
Showing with 86 additions and 29 deletions.
  1. +2 −0 Makefile.am
  2. +0 −9 include/mpd/command.h
  3. +47 −0 include/mpd/mixer.h
  4. +0 −20 src/command.c
  5. +37 −0 src/mixer.c
View
2 Makefile.am
@@ -15,6 +15,7 @@ mpdinclude_HEADERS = \
include/mpd/error.h \
include/mpd/idle.h \
include/mpd/list.h \
+ include/mpd/mixer.h \
include/mpd/parser.h \
include/mpd/password.h \
include/mpd/player.h \
@@ -56,6 +57,7 @@ src_libmpdclient_la_SOURCES = \
src/iso8601.h \
src/iso8601.c \
src/list.c \
+ src/mixer.c \
src/parser.c \
src/password.c \
src/player.c \
View
9 include/mpd/command.h
@@ -38,15 +38,6 @@ extern "C" {
#endif
/*
- * Mixer commands
- *
- */
-
-bool
-mpd_send_setvol(struct mpd_connection *connection, int change);
-
-
-/*
* Connection commands
*
*/
View
47 include/mpd/mixer.h
@@ -0,0 +1,47 @@
+/* libmpdclient
+ (c) 2003-2009 The Music Player Daemon Project
+ This project's homepage is: http://www.musicpd.org
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef MPD_MIXER_H
+#define MPD_MIXER_H
+
+#include <stdbool.h>
+
+struct mpd_connection;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+bool
+mpd_send_setvol(struct mpd_connection *connection, int change);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
View
20 src/command.c
@@ -28,23 +28,10 @@
#include <mpd/command.h>
#include <mpd/send.h>
-#include "isend.h"
#include <stddef.h>
/*
- * Mixer commands
- *
- */
-
-bool
-mpd_send_setvol(struct mpd_connection *connection, int change)
-{
- return mpd_send_int_command(connection, "setvol", change);
-}
-
-
-/*
* Connection commands
*
*/
@@ -72,10 +59,3 @@ mpd_send_tagtypes(struct mpd_connection *connection)
{
return mpd_send_command(connection, "tagtypes", NULL);
}
-
-
-/*
- * Output commands
- *
- */
-
View
37 src/mixer.c
@@ -0,0 +1,37 @@
+/* libmpdclient
+ (c) 2003-2009 The Music Player Daemon Project
+ This project's homepage is: http://www.musicpd.org
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include <mpd/mixer.h>
+#include <mpd/send.h>
+#include "isend.h"
+
+bool
+mpd_send_setvol(struct mpd_connection *connection, int change)
+{
+ return mpd_send_int_command(connection, "setvol", change);
+}

0 comments on commit ff86ae6

Please sign in to comment.