Commit f90abe95 authored by Max Kellermann's avatar Max Kellermann

include cleanup using iwyu

parent 46bab7e4
......@@ -23,6 +23,8 @@
class Mutex;
class Cond;
class Error;
class ArchiveVisitor;
struct InputStream;
class ArchiveFile {
public:
......
......@@ -24,7 +24,6 @@
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
#include <errno.h>
gcc_pure
......
......@@ -20,9 +20,7 @@
#ifndef MPD_ARCHIVE_PLUGIN_HXX
#define MPD_ARCHIVE_PLUGIN_HXX
struct InputStream;
class ArchiveFile;
class ArchiveVisitor;
class Error;
struct archive_plugin {
......
......@@ -19,7 +19,6 @@
#include "config.h"
#include "AvahiPoll.hxx"
#include "event/Loop.hxx"
#include "event/SocketMonitor.hxx"
#include "event/TimeoutMonitor.hxx"
......
......@@ -165,7 +165,7 @@ void client_manager_init(void);
void
client_new(EventLoop &loop, Partition &partition,
int fd, const struct sockaddr *sa, size_t sa_length, int uid);
int fd, const sockaddr *sa, size_t sa_length, int uid);
/**
* Write a C string to the client.
......
......@@ -24,11 +24,8 @@
#include "fs/Path.hxx"
#include "fs/FileSystem.hxx"
#include "util/Error.hxx"
#include "util/Domain.hxx"
#include <sys/stat.h>
#include <sys/types.h>
#include <errno.h>
#include <unistd.h>
bool
......
......@@ -19,7 +19,6 @@
#include "config.h"
#include "ClientInternal.hxx"
#include "ClientList.hxx"
#include "ConfigGlobal.hxx"
#define CLIENT_TIMEOUT_DEFAULT (60)
......
......@@ -31,13 +31,11 @@
#include <glib.h>
#include <assert.h>
#include <sys/types.h>
#ifdef WIN32
#include <winsock2.h>
#else
#include <sys/socket.h>
#endif
#include <unistd.h>
#ifdef HAVE_LIBWRAP
#include <tcpd.h>
......
......@@ -23,7 +23,6 @@
#include "event/Loop.hxx"
#include "util/CharUtil.hxx"
#include <assert.h>
#include <string.h>
BufferedSocket::InputResult
......
......@@ -22,11 +22,6 @@
#include "Idle.hxx"
#include <assert.h>
#include <string.h>
bool Unsubscribe(const char *channel);
void UnsubscribeAll();
bool PushMessage(const ClientMessage &msg);
Client::SubscribeResult
Client::Subscribe(const char *channel)
......
......@@ -38,7 +38,6 @@
#include "util/Domain.hxx"
#include "util/OptionDef.hxx"
#include "util/OptionParser.hxx"
#include "system/FatalError.hxx"
#ifdef ENABLE_ENCODER
#include "EncoderList.hxx"
......
......@@ -26,7 +26,6 @@
#include "system/FatalError.hxx"
#include <assert.h>
#include <string.h>
#include <stdlib.h>
int
......
......@@ -19,7 +19,6 @@
#include "config.h"
#include "ConfigFile.hxx"
#include "ConfigError.hxx"
#include "ConfigData.hxx"
#include "ConfigTemplates.hxx"
#include "util/Tokenizer.hxx"
......@@ -32,9 +31,7 @@
#include "Log.hxx"
#include <assert.h>
#include <string.h>
#include <stdio.h>
#include <errno.h>
#define MAX_STRING_SIZE MPD_PATH_MAX+80
......
......@@ -30,8 +30,6 @@
#include "system/FatalError.hxx"
#include "Log.hxx"
#include <assert.h>
#include <string.h>
#include <stdlib.h>
static ConfigData config_data;
......
......@@ -20,8 +20,6 @@
#ifndef MPD_CONFIG_TEMPLATES_HXX
#define MPD_CONFIG_TEMPLATES_HXX
#include "ConfigOption.hxx"
struct ConfigTemplate {
const char *const name;
const bool repeatable;
......
......@@ -26,8 +26,6 @@
#include "Log.hxx"
#include <assert.h>
#include <string.h>
#include <stdlib.h>
static constexpr Domain cross_fade_domain("cross_fade");
......
......@@ -30,9 +30,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#ifndef WIN32
......
......@@ -21,7 +21,6 @@
#include "DatabaseGlue.hxx"
#include "DatabaseSimple.hxx"
#include "DatabaseRegistry.hxx"
#include "DatabaseSave.hxx"
#include "DatabaseError.hxx"
#include "Directory.hxx"
#include "util/Error.hxx"
......@@ -30,13 +29,8 @@
#include "DatabasePlugin.hxx"
#include "db/SimpleDatabasePlugin.hxx"
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <assert.h>
#include <string.h>
#include <errno.h>
static Database *db;
static bool db_is_open;
......
......@@ -22,7 +22,6 @@
#include "DatabaseVisitor.hxx"
#include "tag/TagType.h"
#include "Compiler.h"
class Error;
class Database;
......
......@@ -19,7 +19,6 @@
#include "config.h"
#include "DatabaseLock.hxx"
#include "Compiler.h"
Mutex db_mutex;
......
......@@ -21,7 +21,6 @@
#include "DatabasePrint.hxx"
#include "DatabaseSelection.hxx"
#include "SongFilter.hxx"
#include "PlaylistVector.hxx"
#include "SongPrint.hxx"
#include "TimePrint.hxx"
#include "Directory.hxx"
......
......@@ -24,7 +24,6 @@
class SongFilter;
struct DatabaseSelection;
struct db_visitor;
class Client;
class Error;
......
......@@ -19,7 +19,6 @@
#include "config.h"
#include "DatabaseQueue.hxx"
#include "DatabaseSelection.hxx"
#include "DatabaseGlue.hxx"
#include "DatabasePlugin.hxx"
#include "Partition.hxx"
......
......@@ -23,7 +23,6 @@
#include "DatabaseError.hxx"
#include "Directory.hxx"
#include "DirectorySave.hxx"
#include "Song.hxx"
#include "TextFile.hxx"
#include "tag/Tag.hxx"
#include "tag/TagSettings.h"
......@@ -33,7 +32,6 @@
#include <glib.h>
#include <assert.h>
#include <string.h>
#include <stdlib.h>
......
......@@ -34,7 +34,6 @@
#include "Log.hxx"
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
......
......@@ -27,6 +27,8 @@
#ifndef MPD_DECODER_API_HXX
#define MPD_DECODER_API_HXX
// IWYU pragma: begin_exports
#include "check.h"
#include "DecoderCommand.hxx"
#include "DecoderPlugin.hxx"
......@@ -36,6 +38,8 @@
#include "MixRampInfo.hxx"
#include "ConfigData.hxx"
// IWYU pragma: end_exports
/**
* Notify the player thread that it has finished initialization and
* that it has read the song's meta data.
......
......@@ -22,8 +22,6 @@
#include "MusicPipe.hxx"
#include "Song.hxx"
#include <glib.h>
#include <assert.h>
DecoderControl::DecoderControl(Mutex &_mutex, Cond &_client_cond)
......
......@@ -20,13 +20,11 @@
#ifndef MPD_DECODER_INTERNAL_HXX
#define MPD_DECODER_INTERNAL_HXX
#include "DecoderCommand.hxx"
#include "ReplayGainInfo.hxx"
#include "util/Error.hxx"
class PcmConvert;
struct DecoderControl;
struct InputStream;
struct Tag;
struct Decoder {
......
......@@ -24,7 +24,6 @@
struct config_param;
struct InputStream;
struct Tag;
struct tag_handler;
/**
......
......@@ -29,7 +29,6 @@
#include "fs/Traits.hxx"
#include "fs/AllocatedPath.hxx"
#include "DecoderAPI.hxx"
#include "tag/Tag.hxx"
#include "InputStream.hxx"
#include "DecoderList.hxx"
#include "util/UriUtil.hxx"
......
......@@ -30,9 +30,6 @@
#include <glib.h>
#include <assert.h>
#include <string.h>
#define DIRECTORY_DIR "directory: "
#define DIRECTORY_MTIME "mtime: "
#define DIRECTORY_BEGIN "begin: "
......
......@@ -25,9 +25,13 @@
#ifndef MPD_ENCODER_API_HXX
#define MPD_ENCODER_API_HXX
// IWYU pragma: begin_exports
#include "EncoderPlugin.hxx"
#include "AudioFormat.hxx"
#include "tag/Tag.hxx"
#include "ConfigData.hxx"
// IWYU pragma: end_exports
#endif
......@@ -21,8 +21,6 @@
#include "FilterConfig.hxx"
#include "filter/ChainFilterPlugin.hxx"
#include "FilterPlugin.hxx"
#include "FilterInternal.hxx"
#include "FilterRegistry.hxx"
#include "ConfigData.hxx"
#include "ConfigOption.hxx"
#include "ConfigGlobal.hxx"
......
......@@ -19,7 +19,6 @@
#include "config.h"
#include "FilterPlugin.hxx"
#include "FilterInternal.hxx"
#include "FilterRegistry.hxx"
#include "ConfigData.hxx"
#include "ConfigError.hxx"
......
......@@ -21,7 +21,6 @@
#include "FilterRegistry.hxx"
#include "FilterPlugin.hxx"
#include <stddef.h>
#include <string.h>
const struct filter_plugin *const filter_plugins[] = {
......
......@@ -21,7 +21,6 @@
#include "GlobalEvents.hxx"
#include "util/Manual.hxx"
#include "event/DeferredMonitor.hxx"
#include "Compiler.h"
#include <atomic>
......
......@@ -25,7 +25,6 @@
#include <glib.h>
#include <assert.h>
#include <string.h>
char*
......
......@@ -21,7 +21,6 @@
#include "InotifyQueue.hxx"
#include "InotifyDomain.hxx"
#include "UpdateGlue.hxx"
#include "event/Loop.hxx"
#include "Log.hxx"
#include <string.h>
......
......@@ -22,7 +22,6 @@
#include "event/SocketMonitor.hxx"
#include "util/FifoBuffer.hxx"
#include "Compiler.h"
class Error;
......
......@@ -19,28 +19,13 @@
#include "config.h"
#include "LogV.hxx"
#include "ConfigData.hxx"
#include "ConfigGlobal.hxx"
#include "ConfigOption.hxx"
#include "system/fd_util.h"
#include "system/FatalError.hxx"
#include "fs/Path.hxx"
#include "fs/FileSystem.hxx"
#include "util/Error.hxx"
#include "util/Domain.hxx"
#include "system/FatalError.hxx"
#include <glib.h>
#include <assert.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <string.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
#include <errno.h>
static GLogLevelFlags
......
......@@ -23,7 +23,6 @@
#include "ConfigData.hxx"
#include "ConfigGlobal.hxx"
#include "ConfigOption.hxx"
#include "system/fd_util.h"
#include "system/FatalError.hxx"
#include "fs/AllocatedPath.hxx"
#include "fs/FileSystem.hxx"
......@@ -33,16 +32,11 @@
#include "system/FatalError.hxx"
#include <assert.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <string.h>
#include <stdarg.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
#include <errno.h>
#include <glib.h>
#ifdef HAVE_SYSLOG
......
......@@ -20,7 +20,7 @@
#ifndef MPD_LOGV_HXX
#define MPD_LOGV_HXX
#include "Log.hxx"
#include "Log.hxx" // IWYU pragma: export
#include <stdarg.h>
......
......@@ -80,10 +80,7 @@
#include <glib.h>
#include <unistd.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#ifdef HAVE_LOCALE_H
#include <locale.h>
......
......@@ -36,9 +36,7 @@
#include <assert.h>
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
#include <errno.h>
#include <dirent.h>
static constexpr Domain mapper_domain("mapper");
......
......@@ -30,7 +30,6 @@
#define PLAYLIST_FILE_SUFFIX ".m3u"
class Path;
class AllocatedPath;
struct Directory;
struct Song;
......
......@@ -23,7 +23,6 @@
#include "util/Error.hxx"
#include <assert.h>
#include <stddef.h>
Mixer *
mixer_new(const struct mixer_plugin *plugin, void *ao,
......
......@@ -31,7 +31,7 @@ struct mixer_plugin;
struct config_param;
Mixer *
mixer_new(const struct mixer_plugin *plugin, void *ao,
mixer_new(const mixer_plugin *plugin, void *ao,
const config_param &param,
Error &error);
......
......@@ -20,10 +20,14 @@
#ifndef MPD_OUTPUT_API_HXX
#define MPD_OUTPUT_API_HxX
// IWYU pragma: begin_exports
#include "OutputPlugin.hxx"
#include "OutputInternal.hxx"
#include "AudioFormat.hxx"
#include "tag/Tag.hxx"
#include "ConfigData.hxx"
// IWYU pragma: end_exports
#endif
......@@ -115,7 +115,7 @@ audio_output_all_set_replay_gain_mode(ReplayGainMode mode);
* (all closed then)
*/
bool
audio_output_all_play(struct music_chunk *chunk, Error &error);
audio_output_all_play(music_chunk *chunk, Error &error);
/**
* Checks if the output devices have drained their music pipe, and
......
......@@ -28,7 +28,6 @@
#include "OutputCommand.hxx"
#include "OutputAll.hxx"
#include "OutputInternal.hxx"
#include "OutputPlugin.hxx"
#include "PlayerControl.hxx"
#include "MixerControl.hxx"
#include "Idle.hxx"
......
......@@ -24,16 +24,13 @@
#include "OutputInternal.hxx"
#include "OutputPlugin.hxx"
#include "OutputError.hxx"
#include "MixerPlugin.hxx"
#include "MixerControl.hxx"
#include "notify.hxx"
#include "filter/ReplayGainFilterPlugin.hxx"
#include "FilterPlugin.hxx"
#include "util/Error.hxx"
#include "Log.hxx"
#include <assert.h>
#include <stdlib.h>
/** after a failure, wait this number of seconds before
automatically reopening the device */
......
......@@ -30,20 +30,20 @@ struct config_param;
class MusicPipe;
void
audio_output_set_replay_gain_mode(struct audio_output *ao,
audio_output_set_replay_gain_mode(audio_output *ao,
ReplayGainMode mode);
/**
* Enables the device.
*/
void
audio_output_enable(struct audio_output *ao);
audio_output_enable(audio_output *ao);
/**
* Disables the device.
*/
void
audio_output_disable(struct audio_output *ao);
audio_output_disable(audio_output *ao);
/**
* Opens or closes the device, depending on the "enabled" flag.
......@@ -51,40 +51,44 @@ audio_output_disable(struct audio_output *ao);
* @return true if the device is open
*/
bool
audio_output_update(struct audio_output *ao,
audio_output_update(audio_output *ao,
AudioFormat audio_format,
const MusicPipe &mp);
void
audio_output_play(struct audio_output *ao);
audio_output_play(audio_output *ao);
void audio_output_pause(struct audio_output *ao);
void
audio_output_pause(audio_output *ao);
void
audio_output_drain_async(struct audio_output *ao);
audio_output_drain_async(audio_output *ao);
/**
* Clear the "allow_play" flag and send the "CANCEL" command
* asynchronously. To finish the operation, the caller has to call
* audio_output_allow_play().
*/
void audio_output_cancel(struct audio_output *ao);
void
audio_output_cancel(audio_output *ao);
/**
* Set the "allow_play" and signal the thread.
*/
void
audio_output_allow_play(struct audio_output *ao);
audio_output_allow_play(audio_output *ao);
void audio_output_close(struct audio_output *ao);
void
audio_output_close(audio_output *ao);
/**
* Closes the audio output, but if the "always_on" flag is set, put it
* into pause mode instead.
*/
void
audio_output_release(struct audio_output *ao);
audio_output_release(audio_output *ao);
void audio_output_finish(struct audio_output *ao);
void
audio_output_finish(audio_output *ao);
#endif
......@@ -19,7 +19,6 @@
#include "config.h"
#include "OutputInternal.hxx"
#include "OutputControl.hxx"
#include "OutputList.hxx"
#include "OutputError.hxx"
#include "OutputAPI.hxx"
......
......@@ -33,7 +33,6 @@
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#define AUDIO_DEVICE_STATE "audio_device_state:"
......
......@@ -22,6 +22,7 @@
struct audio_output;
void audio_output_thread_start(struct audio_output *ao);
void
audio_output_thread_start(audio_output *ao);
#endif
......@@ -27,8 +27,6 @@
#include "util/RefCount.hxx"
#include <algorithm>
#include <stddef.h>
/**
......
......@@ -21,9 +21,8 @@
#include "PlayerControl.hxx"
#include "Idle.hxx"
#include "Song.hxx"
#include "DecoderControl.hxx"
#include <cmath>
#include <algorithm>
#include <assert.h>
......
......@@ -25,7 +25,6 @@
#include "MusicBuffer.hxx"
#include "MusicChunk.hxx"
#include "Song.hxx"
#include "Main.hxx"
#include "system/FatalError.hxx"
#include "CrossFade.hxx"
#include "PlayerControl.hxx"
......
......@@ -22,7 +22,6 @@
#include "PlaylistError.hxx"
#include "PlayerControl.hxx"
#include "Song.hxx"
#include "tag/Tag.hxx"
#include "Idle.hxx"
#include "Log.hxx"
......
......@@ -21,7 +21,6 @@
#include "PlaylistAny.hxx"
#include "PlaylistMapper.hxx"
#include "PlaylistRegistry.hxx"
#include "PlaylistError.hxx"
#include "util/UriUtil.hxx"
#include "util/Error.hxx"
#include "InputStream.hxx"
......
......@@ -43,10 +43,7 @@
#include <glib.h>
#include <assert.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <dirent.h>
#include <string.h>
#include <errno.h>
......
......@@ -24,7 +24,6 @@
#include <string>
struct Song;
struct PlaylistInfo;
class PlaylistVector;
class Error;
......
......@@ -24,7 +24,6 @@
#include "config.h"
#include "PlaylistGlobal.hxx"
#include "Playlist.hxx"
#include "Main.hxx"
#include "Instance.hxx"
#include "GlobalEvents.hxx"
......
......@@ -23,8 +23,6 @@
#include "PlaylistAny.hxx"
#include "PlaylistSong.hxx"
#include "Playlist.hxx"
#include "PlaylistRegistry.hxx"
#include "PlaylistPlugin.hxx"
#include "QueuePrint.hxx"
#include "SongEnumerator.hxx"
#include "SongPrint.hxx"
......
......@@ -19,7 +19,6 @@
#include "config.h"
#include "PlaylistQueue.hxx"
#include "PlaylistPlugin.hxx"
#include "PlaylistAny.hxx"
#include "PlaylistSong.hxx"
#include "Playlist.hxx"
......
......@@ -32,12 +32,12 @@ struct PlayerControl;
class TextFile;
void
playlist_state_save(FILE *fp, const struct playlist &playlist,
playlist_state_save(FILE *fp, const playlist &playlist,
PlayerControl &pc);
bool
playlist_state_restore(const char *line, TextFile &file,
struct playlist &playlist, PlayerControl &pc);
playlist &playlist, PlayerControl &pc);
/**
* Generates a hash number for the current state of the playlist and
......@@ -46,7 +46,7 @@ playlist_state_restore(const char *line, TextFile &file,
* be saved.
*/
unsigned
playlist_state_get_hash(const struct playlist &playlist,
playlist_state_get_hash(const playlist &playlist,
PlayerControl &c);
#endif
......@@ -24,7 +24,6 @@
#include <algorithm>
#include <assert.h>
#include <string.h>
PlaylistVector::iterator
PlaylistVector::find(const char *name)
......
......@@ -21,8 +21,6 @@
#include "Queue.hxx"
#include "Song.hxx"
#include <stdlib.h>
queue::queue(unsigned _max_length)
:max_length(_max_length), length(0),
version(1),
......
......@@ -22,13 +22,8 @@
#include "Queue.hxx"
#include "SongFilter.hxx"
#include "SongPrint.hxx"
#include "Mapper.hxx"
#include "Client.hxx"
extern "C" {
#include "Song.hxx"
}
/**
* Send detailed information about a range of songs in the queue to a
* client.
......
......@@ -22,12 +22,12 @@
#include "Idle.hxx"
#include "ConfigData.hxx"
#include "ConfigGlobal.hxx"
#include "Playlist.hxx"
#include "system/FatalError.hxx"
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
ReplayGainMode replay_gain_mode = REPLAY_GAIN_OFF;
......
......@@ -26,7 +26,7 @@
#include <string>
#include <assert.h>
#include <sys/time.h>
#include <time.h>
#define SONG_FILE "file: "
#define SONG_TIME "Time: "
......
......@@ -21,7 +21,6 @@
#include "SongSave.hxx"
#include "Song.hxx"
#include "TagSave.hxx"
#include "Directory.hxx"
#include "TextFile.hxx"
#include "tag/Tag.hxx"
#include "tag/TagBuilder.hxx"
......
......@@ -20,7 +20,6 @@
#include "config.h"
#include "SongSort.hxx"
#include "Song.hxx"
#include "util/list.h"
#include "tag/Tag.hxx"
extern "C" {
......@@ -29,7 +28,6 @@ extern "C" {
#include <glib.h>
#include <assert.h>
#include <stdlib.h>
static const char *
......
......@@ -23,6 +23,6 @@
struct list_head;
void
song_list_sort(struct list_head *songs);
song_list_sort(list_head *songs);
#endif
......@@ -63,7 +63,7 @@ sticker_song_delete_value(const Song *song, const char *name);
* @param song the song object
* @return a sticker object, or NULL on error or if there is no sticker
*/
struct sticker *
sticker *
sticker_song_get(const Song *song);
/**
......
......@@ -20,14 +20,11 @@
#include "config.h" /* must be first for large file support */
#include "Song.hxx"
#include "util/UriUtil.hxx"
#include "util/Error.hxx"
#include "Directory.hxx"
#include "Mapper.hxx"
#include "fs/AllocatedPath.hxx"
#include "fs/Traits.hxx"
#include "fs/FileSystem.hxx"
#include "InputStream.hxx"
#include "DecoderPlugin.hxx"
#include "DecoderList.hxx"
#include "tag/Tag.hxx"
#include "tag/TagBuilder.hxx"
......@@ -35,13 +32,10 @@
#include "tag/TagId3.hxx"
#include "tag/ApeTag.hxx"
#include "TagFile.hxx"
#include "thread/Cond.hxx"
#include <assert.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
Song *
Song::LoadFile(const char *path_utf8, Directory *parent)
......
......@@ -24,7 +24,7 @@
#include "TextFile.hxx"
#include "Partition.hxx"
#include "Volume.hxx"
#include "event/Loop.hxx"
#include "fs/FileSystem.hxx"
#include "util/Domain.hxx"
#include "Log.hxx"
......
......@@ -106,7 +106,7 @@ sticker_delete_value(const char *type, const char *uri, const char *name);
* @param sticker the sticker object to be freed
*/
void
sticker_free(struct sticker *sticker);
sticker_free(sticker *sticker);
/**
* Determines a single value in a sticker.
......@@ -117,7 +117,7 @@ sticker_free(struct sticker *sticker);
*/
gcc_pure
const char *
sticker_get_value(const struct sticker &sticker, const char *name);
sticker_get_value(const sticker &sticker, const char *name);
/**
* Iterates over all sticker items in a sticker.
......@@ -127,7 +127,7 @@ sticker_get_value(const struct sticker &sticker, const char *name);
* @param user_data an opaque pointer for the callback function
*/
void
sticker_foreach(const struct sticker &sticker,
sticker_foreach(const sticker &sticker,
void (*func)(const char *name, const char *value,
void *user_data),
void *user_data);
......@@ -139,7 +139,7 @@ sticker_foreach(const struct sticker &sticker,
* @param uri the URI of the resource, e.g. the song path
* @return a sticker object, or nullptr on error or if there is no sticker
*/
struct sticker *
sticker *
sticker_load(const char *type, const char *uri);
/**
......
......@@ -31,6 +31,6 @@ struct tag_handler;
*/
bool
tag_file_scan(Path path,
const struct tag_handler *handler, void *handler_ctx);
const tag_handler *handler, void *handler_ctx);
#endif
......@@ -21,7 +21,6 @@
#include "TextInputStream.hxx"
#include "InputStream.hxx"
#include "util/CharUtil.hxx"
#include "util/fifo_buffer.h"
#include "util/Error.hxx"
#include "Log.hxx"
......
......@@ -25,7 +25,6 @@
#include <string>
struct InputStream;
struct fifo_buffer;
class TextInputStream {
InputStream &is;
......
......@@ -27,8 +27,6 @@
#include <limits>
#include <assert.h>
#include <limits.h>
#include <stddef.h>
Timer::Timer(const AudioFormat af)
: time(0),
......
......@@ -26,7 +26,6 @@
#include <sys/stat.h>
struct Directory;
struct archive_plugin;
#ifdef ENABLE_ARCHIVE
......
......@@ -20,7 +20,6 @@
#include "config.h" /* must be first for large file support */
#include "UpdateRemove.hxx"
#include "UpdateDomain.hxx"
#include "Playlist.hxx"
#include "GlobalEvents.hxx"
#include "thread/Mutex.hxx"
#include "thread/Cond.hxx"
......
......@@ -27,7 +27,6 @@
#include "DatabaseLock.hxx"
#include "Directory.hxx"
#include "Song.hxx"
#include "DecoderPlugin.hxx"
#include "DecoderList.hxx"
#include "Log.hxx"
......
......@@ -44,12 +44,8 @@
#include <glib.h>
#include <assert.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <dirent.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
bool walk_discard;
......
......@@ -29,14 +29,11 @@
#include <avahi-client/client.h>
#include <avahi-client/publish.h>
#include <avahi-common/watch.h>
#include <avahi-common/alternative.h>
#include <avahi-common/domain.h>
#include <avahi-common/malloc.h>
#include <avahi-common/error.h>
#include <stddef.h>
static constexpr Domain avahi_domain("avahi");
static char *avahiName;
......
......@@ -35,9 +35,7 @@
#include <bzlib.h>
#include <stdint.h>
#include <stddef.h>
#include <string.h>
#ifdef HAVE_OLDER_BZIP2
#define BZ2_bzDecompressInit bzDecompressInit
......
......@@ -32,7 +32,6 @@
#include "util/Error.hxx"
#include "util/Domain.hxx"
#include <cdio/cdio.h>
#include <cdio/iso9660.h>
#include <stdlib.h>
......
......@@ -34,8 +34,6 @@
#include <zzip/zzip.h>
#include <string.h>
class ZzipArchiveFile final : public ArchiveFile {
public:
RefCount ref;
......
......@@ -26,14 +26,10 @@
#include "CommandError.hxx"
#include "Client.hxx"
#include "tag/Tag.hxx"
#include "util/UriUtil.hxx"
#include "util/Error.hxx"
#include "SongFilter.hxx"
#include "protocol/Result.hxx"
#include <assert.h>
#include <string.h>
CommandResult
handle_lsinfo2(Client &client, int argc, char *argv[])
{
......
......@@ -24,7 +24,6 @@
#include "Instance.hxx"
#include "Main.hxx"
#include "protocol/Result.hxx"
#include "protocol/ArgParser.hxx"
#include <set>
#include <string>
......
......@@ -44,10 +44,6 @@
#include "Client.hxx"
#include "Idle.hxx"
#ifdef ENABLE_SQLITE
#include "StickerDatabase.hxx"
#endif
#include <assert.h>
#include <string.h>
......
......@@ -24,8 +24,6 @@
#include "protocol/Result.hxx"
#include "protocol/ArgParser.hxx"
#include <string.h>
CommandResult
handle_enableoutput(Client &client, gcc_unused int argc, char *argv[])
{
......
......@@ -35,9 +35,6 @@
#include "util/UriUtil.hxx"
#include "util/Error.hxx"
#include <assert.h>
#include <stdlib.h>
static void
print_spl_list(Client &client, const PlaylistVector &list)
{
......
......@@ -31,8 +31,6 @@
#include "protocol/Result.hxx"
#include "util/Error.hxx"
#include <glib.h>
#include <string.h>
struct sticker_song_find_data {
......
......@@ -22,7 +22,6 @@
#include "DatabasePlugin.hxx"
#include "DatabaseSelection.hxx"
#include "DatabaseError.hxx"
#include "PlaylistVector.hxx"
#include "Directory.hxx"
#include "Song.hxx"
#include "SongFilter.hxx"
......
......@@ -33,7 +33,6 @@
#include "util/Domain.hxx"
#include "Log.hxx"
#include <sys/types.h>
#include <errno.h>
static constexpr Domain simple_db_domain("simple_db");
......
......@@ -27,8 +27,6 @@
#include "DsdLib.hxx"
#include "DecoderAPI.hxx"
#include "InputStream.hxx"
#include "util/bit_reverse.h"
#include "tag/TagHandler.hxx"
#include "tag/TagId3.hxx"
#include "util/Error.hxx"
......
......@@ -38,9 +38,6 @@
#include "DsdLib.hxx"
#include "Log.hxx"
#include <unistd.h>
#include <stdio.h> /* for SEEK_SET, SEEK_CUR */
struct DsdiffHeader {
DsdId id;
DffDsdUint64 size;
......
......@@ -39,9 +39,6 @@
#include "tag/TagHandler.hxx"
#include "Log.hxx"
#include <unistd.h>
#include <stdio.h> /* for SEEK_SET, SEEK_CUR */
struct DsfMetaData {
unsigned sample_rate, channels;
bool bitreverse;
......
......@@ -38,7 +38,6 @@ extern "C" {
#include <libavutil/avutil.h>
#include <libavutil/log.h>
#include <libavutil/mathematics.h>
#include <libavutil/dict.h>
}
#include <assert.h>
......
......@@ -21,8 +21,6 @@
#define MPD_FFMPEG_METADATA_HXX
extern "C" {
#include <libavformat/avformat.h>
#include <libavutil/avutil.h>
#include <libavutil/dict.h>
}
......@@ -35,6 +33,6 @@ struct tag_handler;
void
ffmpeg_scan_dictionary(AVDictionary *dict,
const struct tag_handler *handler, void *handler_ctx);
const tag_handler *handler, void *handler_ctx);
#endif
......@@ -25,14 +25,10 @@
#include "FlacCommon.hxx"
#include "FlacMetadata.hxx"
#include "FlacPcm.hxx"
#include "MixRampInfo.hxx"
#include "CheckAudioFormat.hxx"
#include "util/Error.hxx"
#include "util/Domain.hxx"
#include "Log.hxx"
#include <assert.h>
flac_data::flac_data(Decoder &_decoder,
InputStream &_input_stream)
:FlacInput(_input_stream, &_decoder),
......
......@@ -29,7 +29,6 @@
#include "pcm/PcmBuffer.hxx"
#include <FLAC/stream_decoder.h>
#include <FLAC/metadata.h>
struct flac_data : public FlacInput {
PcmBuffer buffer;
......
......@@ -26,10 +26,6 @@
#include "util/Error.hxx"
#include "Log.hxx"
#include <glib.h>
#include <assert.h>
#if !defined(FLAC_API_VERSION_CURRENT) || FLAC_API_VERSION_CURRENT <= 7
#error libFLAC is too old
#endif
......
......@@ -21,7 +21,6 @@
#include "FlacMetadata.hxx"
#include "XiphTags.hxx"
#include "MixRampInfo.hxx"
#include "tag/Tag.hxx"
#include "tag/TagHandler.hxx"
#include "tag/TagTable.hxx"
#include "tag/TagBuilder.hxx"
......@@ -30,7 +29,6 @@
#include <glib.h>
#include <assert.h>
#include <string.h>
static bool
......
......@@ -27,6 +27,7 @@
#include <assert.h>
struct tag_handler;
class MixRampInfo;
class FlacMetadataChain {
......@@ -81,7 +82,7 @@ public:
return FLAC__Metadata_ChainStatusString[GetStatus()];
}
void Scan(const struct tag_handler *handler, void *handler_ctx);
void Scan(const tag_handler *handler, void *handler_ctx);
};
class FLACMetadataIterator {
......@@ -110,7 +111,6 @@ public:
}
};
struct tag_handler;
struct Tag;
struct ReplayGainInfo;
......@@ -136,6 +136,6 @@ flac_vorbis_comments_to_tag(Tag &tag,
void
flac_scan_metadata(const FLAC__StreamMetadata *block,
const struct tag_handler *handler, void *handler_ctx);
const tag_handler *handler, void *handler_ctx);
#endif
......@@ -32,7 +32,6 @@
#include "Log.hxx"
#include <assert.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
......
......@@ -25,8 +25,8 @@
#include "util/Domain.hxx"
#include "Log.hxx"
#include <glib.h>
#include <mikmod.h>
#include <assert.h>
static constexpr Domain mikmod_domain("mikmod");
......
......@@ -30,8 +30,6 @@
#include <mpc/mpcdec.h>
#include <assert.h>
#include <unistd.h>
#include <math.h>
struct mpc_decoder_data {
......
......@@ -26,9 +26,8 @@
#include "util/Domain.hxx"
#include "Log.hxx"
#include <glib.h>
#include <mpg123.h>
#include <stdio.h>
static constexpr Domain mpg123_domain("mpg123");
......
......@@ -23,6 +23,7 @@
#include "config.h"
#include "OggCodec.hxx"
#include "DecoderAPI.hxx"
#include <string.h>
......
......@@ -24,7 +24,8 @@
#ifndef MPD_OGG_CODEC_HXX
#define MPD_OGG_CODEC_HXX
#include "DecoderAPI.hxx"
struct Decoder;
struct InputStream;
enum ogg_codec {
OGG_CODEC_UNKNOWN,
......
......@@ -25,7 +25,6 @@
#include <ogg/ogg.h>
struct InputStream;
class OggSyncState;
/**
......
......@@ -22,12 +22,10 @@
#include "OpusDomain.hxx"
#include "OpusHead.hxx"
#include "OpusTags.hxx"
#include "OggUtil.hxx"
#include "OggFind.hxx"
#include "OggSyncState.hxx"
#include "DecoderAPI.hxx"
#include "OggCodec.hxx"
#include "CheckAudioFormat.hxx"
#include "tag/TagHandler.hxx"
#include "tag/TagBuilder.hxx"
#include "InputStream.hxx"
......
......@@ -21,7 +21,6 @@
#include "OpusHead.hxx"
#include <stdint.h>
#include <string.h>
struct OpusHead {
char signature[8];
......
......@@ -25,8 +25,6 @@
#include "util/ByteReverse.hxx"
#include "Log.hxx"
#include <glib.h>
#include <unistd.h>
#include <string.h>
#include <stdio.h> /* for SEEK_SET */
......
......@@ -20,7 +20,6 @@
#include "config.h"
#include "VorbisComments.hxx"
#include "XiphTags.hxx"
#include "tag/Tag.hxx"
#include "tag/TagTable.hxx"
#include "tag/TagHandler.hxx"
#include "tag/TagBuilder.hxx"
......@@ -29,7 +28,6 @@
#include <glib.h>
#include <assert.h>
#include <stddef.h>
#include <string.h>
#include <stdlib.h>
......
......@@ -31,7 +31,7 @@ vorbis_comments_to_replay_gain(ReplayGainInfo &rgi, char **comments);
void
vorbis_comments_scan(char **comments,
const struct tag_handler *handler, void *handler_ctx);
const tag_handler *handler, void *handler_ctx);
Tag *
vorbis_comments_to_tag(char **comments);
......
......@@ -25,9 +25,7 @@
#include "InputStream.hxx"
#include "OggCodec.hxx"
#include "util/Error.hxx"
#include "util/UriUtil.hxx"
#include "util/Macros.hxx"
#include "system/ByteOrder.hxx"
#include "CheckAudioFormat.hxx"
#include "tag/TagHandler.hxx"
#include "Log.hxx"
......@@ -48,7 +46,6 @@
#define ov_time_seek_page(VF, S) (ov_time_seek_page(VF, (S)*1000))
#endif /* HAVE_TREMOR */
#include <assert.h>
#include <errno.h>
struct vorbis_input_stream {
......
......@@ -22,6 +22,8 @@
#include "check.h"
extern const class Domain vorbis_domain;
class Domain;
extern const Domain vorbis_domain;
#endif
......@@ -31,7 +31,6 @@ extern "C" {
#include "util/growing_fifo.h"
}
#include <assert.h>
#include <string.h>
#include <FLAC/stream_encoder.h>
......
......@@ -33,8 +33,6 @@
#include <glib.h>
#include <assert.h>
struct vorbis_encoder {
/** the base class */
Encoder encoder;
......
......@@ -22,6 +22,9 @@
#include "system/SocketError.hxx"
#include "util/Error.hxx"
#include "util/Domain.hxx"
#include "Compiler.h"
#include <algorithm>
BufferedSocket::ssize_t
BufferedSocket::DirectRead(void *data, size_t length)
......
......@@ -23,13 +23,13 @@
#include "check.h"
#include "SocketMonitor.hxx"
#include "util/FifoBuffer.hxx"
#include "Compiler.h"
#include <assert.h>
#include <stdint.h>
struct fifo_buffer;
class Error;
class EventLoop;
/**
* A #SocketMonitor specialization that adds an input buffer.
......
......@@ -23,6 +23,7 @@
#include "util/fifo_buffer.h"
#include "util/Error.hxx"
#include "util/Domain.hxx"
#include "Compiler.h"
#include <assert.h>
#include <stdint.h>
......
......@@ -24,7 +24,6 @@
#include "BufferedSocket.hxx"
#include "IdleMonitor.hxx"
#include "util/PeakBuffer.hxx"
#include "Compiler.h"
/**
* A #BufferedSocket specialization that adds an output buffer.
......
......@@ -21,6 +21,8 @@
#include "IdleMonitor.hxx"
#include "Loop.hxx"
#include <assert.h>
void
IdleMonitor::Cancel()
{
......
......@@ -34,6 +34,7 @@
#endif
#include <forward_list>
#include <iterator>
#include <assert.h>
#include <stdint.h>
......
......@@ -38,6 +38,7 @@
#include <glib.h>
#include <string>
#include <algorithm>
#include <sys/types.h>
#include <sys/stat.h>
......
......@@ -39,6 +39,8 @@
#include <algorithm>
#include <assert.h>
class SignalMonitor final : private SocketMonitor {
#ifdef USE_SIGNALFD
SignalFD fd;
......
......@@ -28,7 +28,6 @@
#ifdef WIN32
#include <winsock2.h>
#else
#include <sys/types.h>
#include <sys/socket.h>
#endif
......
......@@ -28,7 +28,6 @@
#include "poison.h"
#include <assert.h>
#include <string.h>
class ConvertFilter final : public Filter {
/**
......
......@@ -25,7 +25,6 @@
#include "AudioFormat.hxx"
#include "AudioCompress/compress.h"
#include <assert.h>
#include <string.h>
class NormalizeFilter final : public Filter {
......
......@@ -43,7 +43,6 @@
#include "ConfigError.hxx"
#include "ConfigData.hxx"
#include "AudioFormat.hxx"
#include "CheckAudioFormat.hxx"
#include "FilterPlugin.hxx"
#include "FilterInternal.hxx"
#include "FilterRegistry.hxx"
......
......@@ -26,7 +26,6 @@
#include <glib.h>
#include <assert.h>
#include <string.h>
inline AllocatedPath::AllocatedPath(Donate, pointer _value)
......
......@@ -28,8 +28,6 @@
#include <utility>
#include <string>
#include <assert.h>
class Error;
/**
......
......@@ -22,8 +22,6 @@
#include "Domain.hxx"
#include "Limits.hxx"
#include "system/FatalError.hxx"
#include "util/Error.hxx"
#include "util/Domain.hxx"
#include "Log.hxx"
#include <glib.h>
......
......@@ -20,16 +20,10 @@
#include "config.h"
#include "Config.hxx"
#include "Charset.hxx"
#include "Domain.hxx"
#include "ConfigGlobal.hxx"
#include "Log.hxx"
#include "Compiler.h"
#include <glib.h>
#include <assert.h>
#include <string.h>
#ifdef WIN32
#include <windows.h> // for GetACP()
#include <stdio.h> // for sprintf()
......
......@@ -28,7 +28,6 @@
#include <sys/stat.h>
#include <unistd.h>
#include <assert.h>
#include <stdio.h>
class AllocatedPath;
......
......@@ -29,8 +29,6 @@
#include <assert.h>
#include <string.h>
class Error;
/**
* A path name in the native file system character set.
*
......
......@@ -31,8 +31,6 @@
#include <assert.h>
class Error;
/**
* This class describes the nature of a filesystem path.
*/
......
......@@ -25,7 +25,6 @@
#include "ArchivePlugin.hxx"
#include "ArchiveFile.hxx"
#include "InputPlugin.hxx"
#include "util/Error.hxx"
#include "fs/Traits.hxx"
#include "Log.hxx"
......
......@@ -28,7 +28,6 @@
#include "util/Domain.hxx"
extern "C" {
#include <libavutil/avutil.h>
#include <libavformat/avio.h>
#include <libavformat/avformat.h>
}
......
......@@ -30,8 +30,6 @@
#include <sys/stat.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <glib.h>
static constexpr Domain file_domain("file");
......
......@@ -27,9 +27,6 @@
#include <glib.h>
#include <libmms/mmsx.h>
#include <string.h>
#include <errno.h>
struct MmsInputStream {
InputStream base;
......
......@@ -21,7 +21,6 @@
#include "RewindInputPlugin.hxx"
#include "InputStream.hxx"
#include "InputPlugin.hxx"
#include "tag/Tag.hxx"
#include <assert.h>
#include <string.h>
......
......@@ -25,8 +25,6 @@
#include <glib.h>
#include <assert.h>
#include <string.h>
/**
* file:// is not included in remoteUrlPrefixes, the connection method
......
......@@ -19,7 +19,7 @@
#include "config.h"
#include "MixerInternal.hxx"
#include "OutputAPI.hxx"
#include "ConfigData.hxx"
#include "system/fd_util.h"
#include "util/ASCII.hxx"
#include "util/Error.hxx"
......@@ -28,10 +28,8 @@
#include <assert.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <errno.h>
#include <stdlib.h>
#include <unistd.h>
......
......@@ -26,7 +26,6 @@
#include "util/Domain.hxx"
#include "Log.hxx"
#include <pulse/thread-mainloop.h>
#include <pulse/context.h>
#include <pulse/introspect.h>
#include <pulse/stream.h>
......@@ -34,7 +33,6 @@
#include <pulse/error.h>
#include <assert.h>
#include <string.h>
struct PulseMixer final : public Mixer {
PulseOutput *output;
......
......@@ -20,20 +20,17 @@
#ifndef MPD_PULSE_MIXER_PLUGIN_HXX
#define MPD_PULSE_MIXER_PLUGIN_HXX
#include <pulse/def.h>
struct PulseMixer;
struct pa_context;
struct pa_stream;
void
pulse_mixer_on_connect(PulseMixer *pm, struct pa_context *context);
pulse_mixer_on_connect(PulseMixer *pm, pa_context *context);
void
pulse_mixer_on_disconnect(PulseMixer *pm);
void
pulse_mixer_on_change(PulseMixer *pm,
struct pa_context *context, struct pa_stream *stream);
pulse_mixer_on_change(PulseMixer *pm, pa_context *context, pa_stream *stream);
#endif
......@@ -21,8 +21,8 @@
#include "config.h"
#include "MixerInternal.hxx"
#include "OutputAPI.hxx"
#include "output/RoarOutputPlugin.hxx"
#include "Compiler.h"
struct RoarMixer final : public Mixer {
/** the base mixer class */
......
......@@ -22,7 +22,6 @@
#include "ConfigError.hxx"
#include "OutputAPI.hxx"
#include "Timer.hxx"
#include "system/fd_util.h"
#include "fs/AllocatedPath.hxx"
#include "fs/FileSystem.hxx"
#include "util/Error.hxx"
......@@ -30,10 +29,8 @@
#include "Log.hxx"
#include "open.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
#define FIFO_BUFFER_SIZE 65536 /* pipe capacity on Linux >= 2.6.11 */
......
......@@ -34,10 +34,6 @@
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <errno.h>
enum {
MAX_PORTS = 16,
......
......@@ -22,8 +22,6 @@
#include "OutputAPI.hxx"
#include "Timer.hxx"
#include <assert.h>
struct NullOutput {
struct audio_output base;
......
......@@ -41,6 +41,6 @@ pulse_output_clear_mixer(PulseOutput *po, PulseMixer *pm);
bool
pulse_output_set_volume(PulseOutput *po,
const struct pa_cvolume *volume, Error &error);
const pa_cvolume *volume, Error &error);
#endif
......@@ -19,7 +19,6 @@
#include "config.h"
#include "PcmBuffer.hxx"
#include "poison.h"
void *
PcmBuffer::Get(size_t new_size)
......
......@@ -29,6 +29,7 @@
#include <stddef.h>
class Error;
class Domain;
/**
* This object is statically allocated (within another struct), and
......@@ -100,6 +101,6 @@ private:
Error &error);
};
extern const class Domain pcm_convert_domain;
extern const Domain pcm_convert_domain;
#endif
......@@ -25,7 +25,6 @@
#include <algorithm>
#include <assert.h>
#include <string.h>
PcmDsd::PcmDsd()
{
......
......@@ -22,6 +22,8 @@
#include "PcmBuffer.hxx"
#include "AudioFormat.hxx"
#include <assert.h>
constexpr
static inline uint32_t
pcm_two_dsd_to_usb_marker1(uint8_t a, uint8_t b)
......
......@@ -23,6 +23,7 @@
#include "PcmUtils.hxx"
#include "AudioFormat.hxx"
#include <assert.h>
#include <math.h>
template<typename T, typename U, unsigned bits>
......
......@@ -31,7 +31,6 @@
#include <glib.h>
#include <assert.h>
#include <string.h>
static constexpr Domain asx_domain("asx");
......
......@@ -21,13 +21,10 @@
#include "CuePlaylistPlugin.hxx"
#include "PlaylistPlugin.hxx"
#include "SongEnumerator.hxx"
#include "tag/Tag.hxx"
#include "Song.hxx"
#include "cue/CueParser.hxx"
#include "TextInputStream.hxx"
#include <assert.h>
#include <string.h>
#include <string>
class CuePlaylist final : public SongEnumerator {
InputStream &is;
......
......@@ -27,7 +27,6 @@
#include "EmbeddedCuePlaylistPlugin.hxx"
#include "PlaylistPlugin.hxx"
#include "SongEnumerator.hxx"
#include "tag/Tag.hxx"
#include "tag/TagHandler.hxx"
#include "tag/TagId3.hxx"
#include "tag/ApeTag.hxx"
......@@ -38,7 +37,6 @@
#include "fs/AllocatedPath.hxx"
#include "util/ASCII.hxx"
#include <assert.h>
#include <string.h>
class EmbeddedCuePlaylist final : public SongEnumerator {
......
......@@ -31,7 +31,6 @@
#include <glib.h>
#include <assert.h>
#include <string.h>
static constexpr Domain rss_domain("rss");
......
......@@ -29,7 +29,6 @@
#include <glib.h>
#include <assert.h>
#include <string.h>
static constexpr Domain xspf_domain("xspf");
......
......@@ -23,6 +23,7 @@
#include <assert.h>
#include <sys/epoll.h>
#include <unistd.h>
#include <stdint.h>
#include "check.h"
......
......@@ -27,6 +27,9 @@
#ifndef WIN32
#include <sys/socket.h>
#include <netdb.h>
#ifdef HAVE_TCP
#include <netinet/in.h>
#endif
#else
#include <ws2tcpip.h>
#include <winsock.h>
......
......@@ -27,8 +27,9 @@
struct sockaddr;
struct addrinfo;
class Error;
class Domain;
extern const class Domain resolver_domain;
extern const Domain resolver_domain;
/**
* Converts the specified socket address into a string in the form
......@@ -42,7 +43,7 @@ extern const class Domain resolver_domain;
*/
gcc_malloc
char *
sockaddr_to_string(const struct sockaddr *sa, size_t length, Error &error);
sockaddr_to_string(const sockaddr *sa, size_t length, Error &error);
/**
* Resolve a specification in the form "host", "host:port",
......@@ -54,7 +55,7 @@ sockaddr_to_string(const struct sockaddr *sa, size_t length, Error &error);
* @return an #addrinfo linked list that must be freed with
* freeaddrinfo(), or NULL on error
*/
struct addrinfo *
addrinfo *
resolve_host_port(const char *host_port, unsigned default_port,
int flags, int socktype,
Error &error);
......
......@@ -20,7 +20,6 @@
#include "config.h"
#ifdef USE_SIGNALFD
#include "SignalFD.hxx"
#include "fd_util.h"
#include "FatalError.hxx"
#include <assert.h>
......
......@@ -21,7 +21,7 @@
#define MPD_SOCKET_ERROR_HXX
#include "Compiler.h"
#include "util/Error.hxx"
#include "util/Error.hxx" // IWYU pragma: export
#ifdef WIN32
#include <winsock2.h>
......@@ -31,11 +31,13 @@ typedef DWORD socket_error_t;
typedef int socket_error_t;
#endif
class Domain;
/**
* A #Domain for #Error for socket I/O errors. The code is an errno
* value (or WSAGetLastError() on Windows).
*/
extern const class Domain socket_domain;
extern const Domain socket_domain;
gcc_pure
static inline socket_error_t
......
......@@ -26,9 +26,7 @@
#include <limits>
#include <stdint.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <string.h>
static constexpr Domain aiff_domain("aiff");
......
......@@ -34,6 +34,6 @@ extern const struct tag_table ape_tags[];
*/
bool
tag_ape_scan2(Path path_fs,
const struct tag_handler *handler, void *handler_ctx);
const tag_handler *handler, void *handler_ctx);
#endif
......@@ -26,7 +26,6 @@
#include <limits>
#include <stdint.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <string.h>
......
......@@ -20,8 +20,8 @@
#ifndef MPD_TAG_HXX
#define MPD_TAG_HXX
#include "TagType.h"
#include "TagItem.hxx"
#include "TagType.h" // IWYU pragma: export
#include "TagItem.hxx" // IWYU pragma: export
#include "Compiler.h"
#include <algorithm>
......
......@@ -30,8 +30,6 @@
#include <algorithm>
#include <string.h>
void
TagLoadConfig()
{
......
......@@ -20,8 +20,6 @@
#ifndef MPD_TAG_CONFIG_HXX
#define MPD_TAG_CONFIG_HXX
#include "TagType.h"
void
TagLoadConfig();
......
......@@ -21,7 +21,6 @@
#include "TagId3.hxx"
#include "TagHandler.hxx"
#include "TagTable.hxx"
#include "Tag.hxx"
#include "TagBuilder.hxx"
#include "util/Error.hxx"
#include "util/Domain.hxx"
......
......@@ -33,10 +33,10 @@ class Error;
bool
tag_id3_scan(Path path_fs,
const struct tag_handler *handler, void *handler_ctx);
const tag_handler *handler, void *handler_ctx);
Tag *
tag_id3_import(struct id3_tag *);
tag_id3_import(id3_tag *);
/**
* Loads the ID3 tags from the file into a libid3tag object. The
......@@ -53,8 +53,8 @@ tag_id3_load(Path path_fs, Error &error);
*
*/
void
scan_id3_tag(struct id3_tag *tag,
const struct tag_handler *handler, void *handler_ctx);
scan_id3_tag(id3_tag *tag,
const tag_handler *handler, void *handler_ctx);
#else
......@@ -62,7 +62,7 @@ scan_id3_tag(struct id3_tag *tag,
static inline bool
tag_id3_scan(gcc_unused Path path_fs,
gcc_unused const struct tag_handler *handler,
gcc_unused const tag_handler *handler,
gcc_unused void *handler_ctx)
{
return false;
......
......@@ -21,10 +21,10 @@
#include "TagRva2.hxx"
#include "ReplayGainInfo.hxx"
#include <id3tag.h>
#include <stdint.h>
#include <string.h>
#include <glib.h>
#include <id3tag.h>
enum rva2_channel {
CHANNEL_OTHER = 0x00,
......
......@@ -32,6 +32,6 @@ struct ReplayGainInfo;
* @return true on success
*/
bool
tag_rva2_parse(struct id3_tag *tag, ReplayGainInfo &replay_gain_info);
tag_rva2_parse(id3_tag *tag, ReplayGainInfo &replay_gain_info);
#endif
......@@ -24,6 +24,7 @@
#include "Compiler.h"
#include <string>
#include <utility>
#include <assert.h>
......
......@@ -19,10 +19,13 @@
#include "FormatString.hxx"
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#ifdef WIN32
#include <string.h>
#endif
char *
FormatNewV(const char *fmt, va_list args)
{
......
......@@ -26,9 +26,6 @@
#include <glib.h>
#include <assert.h>
#include <string.h>
static constexpr Domain tokenizer_domain("tokenizer");
static inline bool
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment