Skip to content

Commit

Permalink
mpdclient, gidle: move to client/
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKellermann committed Sep 10, 2024
1 parent f14c0be commit 59dea70
Show file tree
Hide file tree
Showing 28 changed files with 54 additions and 36 deletions.
16 changes: 2 additions & 14 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,6 @@ if not mini
m_dep = cc.find_library('m', required: false)
endif

libmpdclient_dep = dependency('libmpdclient', version: '>= 2.16')

if not mini
pcre_dep = dependency('libpcre2-8', required: get_option('regex'))

Expand Down Expand Up @@ -263,15 +261,6 @@ if not mini
endif
endif

if async_connect
sources += [
'src/net/SocketError.cxx',
'src/net/AsyncResolveConnect.cxx',
'src/event/net/ConnectSocket.cxx',
'src/aconnect.cxx',
]
endif

if lirc_dep.found()
sources += [
'src/lirc.cxx',
Expand Down Expand Up @@ -380,15 +369,14 @@ subdir('src/io')
subdir('src/system')
subdir('src/net')
subdir('src/event')
subdir('src/client')
subdir('src/ui')
subdir('src/dialogs')
subdir('src/page')

ncmpc = executable('ncmpc',
'src/Main.cxx',
'src/Instance.cxx',
'src/gidle.cxx',
'src/mpdclient.cxx',
'src/callbacks.cxx',
'src/Queue.cxx',
'src/filelist.cxx',
Expand Down Expand Up @@ -438,7 +426,7 @@ ncmpc = executable('ncmpc',
m_dep,
curses_dep,
lirc_dep,
libmpdclient_dep,
client_dep,
fmt_dep,
ui_dep,
dialogs_dep,
Expand Down
2 changes: 1 addition & 1 deletion src/ChatPage.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
#include "PageMeta.hxx"
#include "screen.hxx"
#include "screen_status.hxx"
#include "mpdclient.hxx"
#include "i18n.h"
#include "charset.hxx"
#include "Command.hxx"
#include "Options.hxx"
#include "page/TextPage.hxx"
#include "dialogs/TextInputDialog.hxx"
#include "client/mpdclient.hxx"
#include "util/StringAPI.hxx"

#include <mpd/idle.h>
Expand Down
2 changes: 1 addition & 1 deletion src/DelayedSeek.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Copyright The Music Player Daemon Project

#include "DelayedSeek.hxx"
#include "mpdclient.hxx"
#include "client/mpdclient.hxx"

void
DelayedSeek::Commit() noexcept
Expand Down
4 changes: 1 addition & 3 deletions src/EditPlaylistPage.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@
#include "i18n.h"
#include "Command.hxx"
#include "Options.hxx"
#include "mpdclient.hxx"
#include "screen.hxx"
#include "lib/fmt/ToSpan.hxx"

#include <mpd/client.h>
#include "client/mpdclient.hxx"

#include <string>

Expand Down
2 changes: 1 addition & 1 deletion src/FileBrowserPage.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
#include "config.h" // IWYU pragma: keep
#include "i18n.h"
#include "charset.hxx"
#include "mpdclient.hxx"
#include "filelist.hxx"
#include "screen_client.hxx"
#include "Command.hxx"
#include "Options.hxx"
#include "dialogs/YesNoDialog.hxx"
#include "ui/Bell.hxx"
#include "lib/fmt/ToSpan.hxx"
#include "client/mpdclient.hxx"
#include "util/UriUtil.hxx"

#include <mpd/client.h>
Expand Down
2 changes: 1 addition & 1 deletion src/FileListPage.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
#include "Options.hxx"
#include "charset.hxx"
#include "strfsong.hxx"
#include "mpdclient.hxx"
#include "filelist.hxx"
#include "Styles.hxx"
#include "SongRowPaint.hxx"
#include "time_format.hxx"
#include "ui/paint.hxx"
#include "client/mpdclient.hxx"
#include "util/UriUtil.hxx"

#include <mpd/client.h>
Expand Down
2 changes: 1 addition & 1 deletion src/Instance.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
#include "config.h"
#include "AsyncUserInput.hxx"
#include "UserInputHandler.hxx"
#include "mpdclient.hxx"
#include "DelayedSeek.hxx"
#include "screen.hxx"
#include "client/mpdclient.hxx"
#include "event/Loop.hxx"
#include "event/CoarseTimerEvent.hxx"
#include "event/FineTimerEvent.hxx"
Expand Down
2 changes: 1 addition & 1 deletion src/LibraryPage.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
#include "Command.hxx"
#include "i18n.h"
#include "charset.hxx"
#include "mpdclient.hxx"
#include "filelist.hxx"
#include "Options.hxx"
#include "screen.hxx"
#include "page/ProxyPage.hxx"
#include "lib/fmt/ToSpan.hxx"
#include "client/mpdclient.hxx"

#include <list>
#include <string>
Expand Down
2 changes: 1 addition & 1 deletion src/LyricsPage.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
#include "i18n.h"
#include "Command.hxx"
#include "Options.hxx"
#include "mpdclient.hxx"
#include "screen.hxx"
#include "plugin.hxx"
#include "ncu.hxx"
#include "page/TextPage.hxx"
#include "lib/fmt/ToSpan.hxx"
#include "client/mpdclient.hxx"
#include "util/StringAPI.hxx"

#include <string>
Expand Down
1 change: 0 additions & 1 deletion src/Main.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include "config.h"
#include "Instance.hxx"
#include "ncmpc.hxx"
#include "mpdclient.hxx"
#include "callbacks.hxx"
#include "charset.hxx"
#include "Options.hxx"
Expand Down
2 changes: 1 addition & 1 deletion src/OutputsPage.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
#include "screen_status.hxx"
#include "Command.hxx"
#include "i18n.h"
#include "mpdclient.hxx"
#include "page/ListPage.hxx"
#include "dialogs/TextInputDialog.hxx"
#include "ui/ListRenderer.hxx"
#include "ui/paint.hxx"
#include "client/mpdclient.hxx"
#include "util/FNVHash.hxx"
#include "util/StringAPI.hxx"

Expand Down
2 changes: 1 addition & 1 deletion src/QueuePage.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include "charset.hxx"
#include "Command.hxx"
#include "Options.hxx"
#include "mpdclient.hxx"
#include "strfsong.hxx"
#include "Completion.hxx"
#include "Styles.hxx"
Expand All @@ -23,6 +22,7 @@
#include "dialogs/TextInputDialog.hxx"
#include "ui/ListRenderer.hxx"
#include "ui/ListText.hxx"
#include "client/mpdclient.hxx"
#include "event/CoarseTimerEvent.hxx"
#include "util/SPrintf.hxx"

Expand Down
2 changes: 1 addition & 1 deletion src/SearchPage.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
#include "Bindings.hxx"
#include "GlobalBindings.hxx"
#include "charset.hxx"
#include "mpdclient.hxx"
#include "FileListPage.hxx"
#include "filelist.hxx"
#include "dialogs/TextInputDialog.hxx"
#include "ui/TextListRenderer.hxx"
#include "lib/fmt/ToSpan.hxx"
#include "client/mpdclient.hxx"
#include "util/StringAPI.hxx"

#include <iterator>
Expand Down
2 changes: 1 addition & 1 deletion src/SongPage.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
#include "screen.hxx"
#include "charset.hxx"
#include "time_format.hxx"
#include "mpdclient.hxx"
#include "page/ListPage.hxx"
#include "ui/ListText.hxx"
#include "ui/TextListRenderer.hxx"
#include "lib/fmt/ToSpan.hxx"
#include "client/mpdclient.hxx"
#include "util/LocaleString.hxx"
#include "util/StringAPI.hxx"
#include "util/StringStrip.hxx"
Expand Down
2 changes: 1 addition & 1 deletion src/TagListPage.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#include "Command.hxx"
#include "i18n.h"
#include "charset.hxx"
#include "mpdclient.hxx"
#include "page/FindSupport.hxx"
#include "client/mpdclient.hxx"
#include "util/StringUTF8.hxx"

#include <algorithm>
Expand Down
2 changes: 1 addition & 1 deletion src/callbacks.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
#include "callbacks.hxx"
#include "screen.hxx"
#include "screen_status.hxx"
#include "mpdclient.hxx"
#include "ncmpc.hxx"
#include "ui/Bell.hxx"
#include "client/mpdclient.hxx"

#include <curses.h>

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
33 changes: 33 additions & 0 deletions src/client/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
libmpdclient_dep = dependency('libmpdclient', version: '>= 2.16')

client_sources = [
'gidle.cxx',
'mpdclient.cxx',
]

if async_connect
client_sources += [
'../net/SocketError.cxx',
'../net/AsyncResolveConnect.cxx',
'../event/net/ConnectSocket.cxx',
'aconnect.cxx',
]
endif

client = static_library(
'client',
client_sources,
include_directories: inc,
dependencies: [
libmpdclient_dep,
event_dep,
],
)

client_dep = declare_dependency(
link_with: client,
dependencies: [
libmpdclient_dep,
event_dep,
],
)
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/db_completion.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "db_completion.hxx"
#include "Completion.hxx"
#include "charset.hxx"
#include "mpdclient.hxx"
#include "client/mpdclient.hxx"
#include "util/ScopeExit.hxx"

#include <string>
Expand Down
2 changes: 1 addition & 1 deletion src/player_command.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
#include "player_command.hxx"
#include "DelayedSeek.hxx"
#include "Command.hxx"
#include "mpdclient.hxx"
#include "Options.hxx"
#include "i18n.h"
#include "screen_client.hxx"
#include "screen_status.hxx"
#include "client/mpdclient.hxx"

bool
handle_player_command(struct mpdclient &c, DelayedSeek &seek, Command cmd)
Expand Down
2 changes: 1 addition & 1 deletion src/save_playlist.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
#include "config.h" // IWYU pragma: keep
#include "i18n.h"
#include "charset.hxx"
#include "mpdclient.hxx"
#include "Completion.hxx"
#include "screen.hxx"
#include "screen_utils.hxx"
#include "dialogs/TextInputDialog.hxx"
#include "dialogs/YesNoDialog.hxx"
#include "client/mpdclient.hxx"
#include "co/InvokeTask.hxx"

#include <mpd/client.h>
Expand Down
2 changes: 1 addition & 1 deletion src/screen.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include "Command.hxx"
#include "config.h"
#include "i18n.h"
#include "mpdclient.hxx"
#include "Options.hxx"
#include "DelayedSeek.hxx"
#include "player_command.hxx"
Expand All @@ -21,6 +20,7 @@
#include "dialogs/TextInputDialog.hxx"
#include "ui/Options.hxx"
#include "co/Task.hxx"
#include "client/mpdclient.hxx"
#include "util/ScopeExit.hxx"
#include "util/StringAPI.hxx"

Expand Down
2 changes: 1 addition & 1 deletion src/screen_client.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include "screen_client.hxx"
#include "screen_status.hxx"
#include "mpdclient.hxx"
#include "client/mpdclient.hxx"
#include "i18n.h"
#include "charset.hxx"

Expand Down

0 comments on commit 59dea70

Please sign in to comment.