playlist: move enum playlist_result to playlist_error.h
Reduce header dependencies.
This commit is contained in:
		| @@ -166,6 +166,7 @@ mpd_headers = \ | |||||||
| 	src/player_thread.h \ | 	src/player_thread.h \ | ||||||
| 	src/player_control.h \ | 	src/player_control.h \ | ||||||
| 	src/playlist.h \ | 	src/playlist.h \ | ||||||
|  | 	src/playlist_error.h \ | ||||||
| 	src/playlist_internal.h \ | 	src/playlist_internal.h \ | ||||||
| 	src/playlist_print.h \ | 	src/playlist_print.h \ | ||||||
| 	src/playlist_save.h \ | 	src/playlist_save.h \ | ||||||
|   | |||||||
| @@ -21,25 +21,12 @@ | |||||||
| #define MPD_PLAYLIST_H | #define MPD_PLAYLIST_H | ||||||
|  |  | ||||||
| #include "queue.h" | #include "queue.h" | ||||||
|  | #include "playlist_error.h" | ||||||
|  |  | ||||||
| #include <stdbool.h> | #include <stdbool.h> | ||||||
|  |  | ||||||
| struct player_control; | struct player_control; | ||||||
|  |  | ||||||
| enum playlist_result { |  | ||||||
| 	PLAYLIST_RESULT_SUCCESS, |  | ||||||
| 	PLAYLIST_RESULT_ERRNO, |  | ||||||
| 	PLAYLIST_RESULT_DENIED, |  | ||||||
| 	PLAYLIST_RESULT_NO_SUCH_SONG, |  | ||||||
| 	PLAYLIST_RESULT_NO_SUCH_LIST, |  | ||||||
| 	PLAYLIST_RESULT_LIST_EXISTS, |  | ||||||
| 	PLAYLIST_RESULT_BAD_NAME, |  | ||||||
| 	PLAYLIST_RESULT_BAD_RANGE, |  | ||||||
| 	PLAYLIST_RESULT_NOT_PLAYING, |  | ||||||
| 	PLAYLIST_RESULT_TOO_LARGE, |  | ||||||
| 	PLAYLIST_RESULT_DISABLED, |  | ||||||
| }; |  | ||||||
|  |  | ||||||
| struct playlist { | struct playlist { | ||||||
| 	/** | 	/** | ||||||
| 	 * The song queue - it contains the "real" playlist. | 	 * The song queue - it contains the "real" playlist. | ||||||
|   | |||||||
							
								
								
									
										37
									
								
								src/playlist_error.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										37
									
								
								src/playlist_error.h
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,37 @@ | |||||||
|  | /* | ||||||
|  |  * Copyright (C) 2003-2011 The Music Player Daemon Project | ||||||
|  |  * http://www.musicpd.org | ||||||
|  |  * | ||||||
|  |  * This program is free software; you can redistribute it and/or modify | ||||||
|  |  * it under the terms of the GNU General Public License as published by | ||||||
|  |  * the Free Software Foundation; either version 2 of the License, or | ||||||
|  |  * (at your option) any later version. | ||||||
|  |  * | ||||||
|  |  * This program 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 General Public License along | ||||||
|  |  * with this program; if not, write to the Free Software Foundation, Inc., | ||||||
|  |  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||||||
|  |  */ | ||||||
|  |  | ||||||
|  | #ifndef MPD_PLAYLIST_ERROR_H | ||||||
|  | #define MPD_PLAYLIST_ERROR_H | ||||||
|  |  | ||||||
|  | enum playlist_result { | ||||||
|  | 	PLAYLIST_RESULT_SUCCESS, | ||||||
|  | 	PLAYLIST_RESULT_ERRNO, | ||||||
|  | 	PLAYLIST_RESULT_DENIED, | ||||||
|  | 	PLAYLIST_RESULT_NO_SUCH_SONG, | ||||||
|  | 	PLAYLIST_RESULT_NO_SUCH_LIST, | ||||||
|  | 	PLAYLIST_RESULT_LIST_EXISTS, | ||||||
|  | 	PLAYLIST_RESULT_BAD_NAME, | ||||||
|  | 	PLAYLIST_RESULT_BAD_RANGE, | ||||||
|  | 	PLAYLIST_RESULT_NOT_PLAYING, | ||||||
|  | 	PLAYLIST_RESULT_TOO_LARGE, | ||||||
|  | 	PLAYLIST_RESULT_DISABLED, | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | #endif | ||||||
| @@ -23,6 +23,7 @@ | |||||||
| #include "playlist_plugin.h" | #include "playlist_plugin.h" | ||||||
| #include "playlist_any.h" | #include "playlist_any.h" | ||||||
| #include "playlist_song.h" | #include "playlist_song.h" | ||||||
|  | #include "playlist.h" | ||||||
| #include "queue_print.h" | #include "queue_print.h" | ||||||
| #include "stored_playlist.h" | #include "stored_playlist.h" | ||||||
| #include "song_print.h" | #include "song_print.h" | ||||||
|   | |||||||
| @@ -22,6 +22,7 @@ | |||||||
| #include "playlist_plugin.h" | #include "playlist_plugin.h" | ||||||
| #include "playlist_any.h" | #include "playlist_any.h" | ||||||
| #include "playlist_song.h" | #include "playlist_song.h" | ||||||
|  | #include "playlist.h" | ||||||
| #include "song.h" | #include "song.h" | ||||||
| #include "input_stream.h" | #include "input_stream.h" | ||||||
|  |  | ||||||
|   | |||||||
| @@ -24,12 +24,13 @@ | |||||||
| #ifndef MPD_PLAYLIST_QUEUE_H | #ifndef MPD_PLAYLIST_QUEUE_H | ||||||
| #define MPD_PLAYLIST_QUEUE_H | #define MPD_PLAYLIST_QUEUE_H | ||||||
|  |  | ||||||
| #include "playlist.h" | #include "playlist_error.h" | ||||||
|  |  | ||||||
| #include <stdbool.h> | #include <stdbool.h> | ||||||
|  |  | ||||||
| struct playlist_provider; | struct playlist_provider; | ||||||
| struct playlist; | struct playlist; | ||||||
|  | struct player_control; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * Loads the contents of a playlist and append it to the specified |  * Loads the contents of a playlist and append it to the specified | ||||||
|   | |||||||
| @@ -19,7 +19,9 @@ | |||||||
|  |  | ||||||
| #include "config.h" | #include "config.h" | ||||||
| #include "playlist_save.h" | #include "playlist_save.h" | ||||||
|  | #include "playlist.h" | ||||||
| #include "stored_playlist.h" | #include "stored_playlist.h" | ||||||
|  | #include "queue.h" | ||||||
| #include "song.h" | #include "song.h" | ||||||
| #include "mapper.h" | #include "mapper.h" | ||||||
| #include "path.h" | #include "path.h" | ||||||
|   | |||||||
| @@ -20,11 +20,14 @@ | |||||||
| #ifndef MPD_PLAYLIST_SAVE_H | #ifndef MPD_PLAYLIST_SAVE_H | ||||||
| #define MPD_PLAYLIST_SAVE_H | #define MPD_PLAYLIST_SAVE_H | ||||||
|  |  | ||||||
| #include "playlist.h" | #include "playlist_error.h" | ||||||
|  |  | ||||||
| #include <stdio.h> | #include <stdio.h> | ||||||
|  |  | ||||||
| struct song; | struct song; | ||||||
|  | struct queue; | ||||||
|  | struct playlist; | ||||||
|  | struct player_control; | ||||||
|  |  | ||||||
| void | void | ||||||
| playlist_print_song(FILE *fp, const struct song *song); | playlist_print_song(FILE *fp, const struct song *song); | ||||||
|   | |||||||
| @@ -20,7 +20,7 @@ | |||||||
| #ifndef MPD_STORED_PLAYLIST_H | #ifndef MPD_STORED_PLAYLIST_H | ||||||
| #define MPD_STORED_PLAYLIST_H | #define MPD_STORED_PLAYLIST_H | ||||||
|  |  | ||||||
| #include "playlist.h" | #include "playlist_error.h" | ||||||
|  |  | ||||||
| #include <glib.h> | #include <glib.h> | ||||||
| #include <stdbool.h> | #include <stdbool.h> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Max Kellermann
					Max Kellermann