Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
a654f146
Commit
a654f146
authored
Jan 02, 2013
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: convert to C++
parent
67b46a15
Show whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
152 additions
and
130 deletions
+152
-130
Makefile.am
Makefile.am
+17
-21
InotifyQueue.cxx
src/InotifyQueue.cxx
+5
-5
InotifyQueue.hxx
src/InotifyQueue.hxx
+3
-3
InotifySource.cxx
src/InotifySource.cxx
+10
-5
InotifySource.hxx
src/InotifySource.hxx
+3
-3
InotifyUpdate.cxx
src/InotifyUpdate.cxx
+11
-7
InotifyUpdate.hxx
src/InotifyUpdate.hxx
+3
-3
Main.cxx
src/Main.cxx
+5
-5
OtherCommands.cxx
src/OtherCommands.cxx
+1
-1
PlayerCommands.cxx
src/PlayerCommands.cxx
+1
-1
UpdateArchive.cxx
src/UpdateArchive.cxx
+6
-3
UpdateArchive.hxx
src/UpdateArchive.hxx
+3
-3
UpdateContainer.cxx
src/UpdateContainer.cxx
+8
-5
UpdateContainer.hxx
src/UpdateContainer.hxx
+3
-4
UpdateDatabase.cxx
src/UpdateDatabase.cxx
+6
-3
UpdateDatabase.hxx
src/UpdateDatabase.hxx
+3
-5
UpdateGlue.cxx
src/UpdateGlue.cxx
+9
-7
UpdateGlue.hxx
src/UpdateGlue.hxx
+3
-5
UpdateIO.cxx
src/UpdateIO.cxx
+5
-2
UpdateIO.hxx
src/UpdateIO.hxx
+3
-4
UpdateInternal.hxx
src/UpdateInternal.hxx
+0
-0
UpdateQueue.cxx
src/UpdateQueue.cxx
+2
-2
UpdateQueue.hxx
src/UpdateQueue.hxx
+3
-5
UpdateRemove.cxx
src/UpdateRemove.cxx
+8
-2
UpdateRemove.hxx
src/UpdateRemove.hxx
+3
-3
UpdateSong.cxx
src/UpdateSong.cxx
+10
-7
UpdateSong.hxx
src/UpdateSong.hxx
+3
-4
UpdateWalk.cxx
src/UpdateWalk.cxx
+11
-8
UpdateWalk.hxx
src/UpdateWalk.hxx
+3
-3
RunInotify.cxx
test/RunInotify.cxx
+1
-1
No files found.
Makefile.am
View file @
a654f146
...
@@ -91,10 +91,6 @@ mpd_headers = \
...
@@ -91,10 +91,6 @@ mpd_headers = \
src/fd_util.h
\
src/fd_util.h
\
src/gerror.h
\
src/gerror.h
\
src/glib_compat.h
\
src/glib_compat.h
\
src/update.h
\
src/inotify_source.h
\
src/inotify_queue.h
\
src/inotify_update.h
\
src/gcc.h
\
src/gcc.h
\
src/decoder_list.h
\
src/decoder_list.h
\
src/decoder_print.h
\
src/decoder_print.h
\
...
@@ -263,15 +259,15 @@ src_mpd_SOURCES = \
...
@@ -263,15 +259,15 @@ src_mpd_SOURCES = \
src/filter_config.c
\
src/filter_config.c
\
src/filter_plugin.c
\
src/filter_plugin.c
\
src/filter_registry.c
\
src/filter_registry.c
\
src/
update.c
\
src/
UpdateGlue.cxx src/UpdateGlue.hxx
\
src/
update_queue.c src/update_queue.h
\
src/
UpdateQueue.cxx src/UpdateQueue.hxx
\
src/
update_io.c src/update_io.h
\
src/
UpdateIO.cxx src/UpdateIO.hxx
\
src/
update_db.c src/update_db.h
\
src/
UpdateDatabase.cxx src/UpdateDatabase.hxx
\
src/
update_walk.c src/update_walk.h
\
src/
UpdateWalk.cxx src/UpdateWalk.hxx
\
src/
update_song.c src/update_song.h
\
src/
UpdateSong.cxx src/UpdateSong.hxx
\
src/
update_container.c src/update_container.h
\
src/
UpdateContainer.cxx src/UpdateContainer.hxx
\
src/
update_internal.h
\
src/
UpdateInternal.hxx
\
src/
update_remove.c src/update_remove.h
\
src/
UpdateRemove.cxx src/UpdateRemove.hxx
\
src/client.c
\
src/client.c
\
src/client_event.c
\
src/client_event.c
\
src/client_expire.c
\
src/client_expire.c
\
...
@@ -374,9 +370,9 @@ endif
...
@@ -374,9 +370,9 @@ endif
if
ENABLE_INOTIFY
if
ENABLE_INOTIFY
src_mpd_SOURCES
+=
\
src_mpd_SOURCES
+=
\
src/
inotify_source.c
\
src/
InotifySource.cxx src/InotifySource.hxx
\
src/
inotify_queue.c
\
src/
InotifyQueue.cxx src/InotifyQueue.hxx
\
src/
inotify_update.c
src/
InotifyUpdate.cxx src/InotifyUpdate.hxx
endif
endif
if
ENABLE_SQLITE
if
ENABLE_SQLITE
...
@@ -449,7 +445,7 @@ if ENABLE_ARCHIVE
...
@@ -449,7 +445,7 @@ if ENABLE_ARCHIVE
noinst_LIBRARIES
+=
libarchive.a
noinst_LIBRARIES
+=
libarchive.a
src_mpd_SOURCES
+=
\
src_mpd_SOURCES
+=
\
src/
update_archive.c src/update_archive.h
src/
UpdateArchive.cxx src/UpdateArchive.hxx
libarchive_a_SOURCES
=
\
libarchive_a_SOURCES
=
\
src/archive_api.c
\
src/archive_api.c
\
...
@@ -1351,12 +1347,12 @@ TESTS += test/test_archive_iso9660.sh
...
@@ -1351,12 +1347,12 @@ TESTS += test/test_archive_iso9660.sh
endif
endif
if
ENABLE_INOTIFY
if
ENABLE_INOTIFY
noinst_PROGRAMS
+=
test
/
run_i
notify
noinst_PROGRAMS
+=
test
/
RunI
notify
test_
run_inotify_SOURCES
=
test
/run_i
notify.c
\
test_
RunInotify_SOURCES
=
test
/RunI
notify.c
\
src/fd_util.c
\
src/fd_util.c
\
src/fifo_buffer.c
\
src/fifo_buffer.c
\
src/
inotify_source.c
src/
InotifySource.cxx
test_
run_i
notify_LDADD
=
$(GLIB_LIBS)
test_
RunI
notify_LDADD
=
$(GLIB_LIBS)
endif
endif
test_test_byte_reverse_SOURCES
=
\
test_test_byte_reverse_SOURCES
=
\
...
...
src/
inotify_queue.c
→
src/
InotifyQueue.cxx
View file @
a654f146
/*
/*
* Copyright (C) 2003-201
1
The Music Player Daemon Project
* Copyright (C) 2003-201
3
The Music Player Daemon Project
* http://www.musicpd.org
* http://www.musicpd.org
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
...
@@ -18,8 +18,8 @@
...
@@ -18,8 +18,8 @@
*/
*/
#include "config.h"
#include "config.h"
#include "
inotify_queue.h
"
#include "
InotifyQueue.hxx
"
#include "
update.h
"
#include "
UpdateGlue.hxx
"
#include <glib.h>
#include <glib.h>
...
@@ -67,7 +67,7 @@ mpd_inotify_run_update(G_GNUC_UNUSED gpointer data)
...
@@ -67,7 +67,7 @@ mpd_inotify_run_update(G_GNUC_UNUSED gpointer data)
unsigned
id
;
unsigned
id
;
while
(
inotify_queue
!=
NULL
)
{
while
(
inotify_queue
!=
NULL
)
{
char
*
uri_utf8
=
inotify_queue
->
data
;
char
*
uri_utf8
=
(
char
*
)
inotify_queue
->
data
;
id
=
update_enqueue
(
uri_utf8
,
false
);
id
=
update_enqueue
(
uri_utf8
,
false
);
if
(
id
==
0
)
if
(
id
==
0
)
...
@@ -108,7 +108,7 @@ mpd_inotify_enqueue(char *uri_utf8)
...
@@ -108,7 +108,7 @@ mpd_inotify_enqueue(char *uri_utf8)
inotify_queue
=
NULL
;
inotify_queue
=
NULL
;
while
(
old_queue
!=
NULL
)
{
while
(
old_queue
!=
NULL
)
{
char
*
current_uri
=
old_queue
->
data
;
char
*
current_uri
=
(
char
*
)
old_queue
->
data
;
if
(
path_in
(
uri_utf8
,
current_uri
))
{
if
(
path_in
(
uri_utf8
,
current_uri
))
{
/* already enqueued */
/* already enqueued */
...
...
src/
inotify_queue.h
→
src/
InotifyQueue.hxx
View file @
a654f146
/*
/*
* Copyright (C) 2003-201
1
The Music Player Daemon Project
* Copyright (C) 2003-201
3
The Music Player Daemon Project
* http://www.musicpd.org
* http://www.musicpd.org
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
...
@@ -17,8 +17,8 @@
...
@@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
*/
#ifndef MPD_INOTIFY_QUEUE_H
#ifndef MPD_INOTIFY_QUEUE_H
XX
#define MPD_INOTIFY_QUEUE_H
#define MPD_INOTIFY_QUEUE_H
XX
void
void
mpd_inotify_queue_init
(
void
);
mpd_inotify_queue_init
(
void
);
...
...
src/
inotify_source.c
→
src/
InotifySource.cxx
View file @
a654f146
/*
/*
* Copyright (C) 2003-201
1
The Music Player Daemon Project
* Copyright (C) 2003-201
3
The Music Player Daemon Project
* http://www.musicpd.org
* http://www.musicpd.org
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
...
@@ -18,8 +18,12 @@
...
@@ -18,8 +18,12 @@
*/
*/
#include "config.h"
#include "config.h"
#include "inotify_source.h"
#include "InotifySource.hxx"
extern
"C"
{
#include "fifo_buffer.h"
#include "fifo_buffer.h"
}
#include "fd_util.h"
#include "fd_util.h"
#include "mpd_error.h"
#include "mpd_error.h"
...
@@ -63,11 +67,10 @@ mpd_inotify_in_event(G_GNUC_UNUSED GIOChannel *_source,
...
@@ -63,11 +67,10 @@ mpd_inotify_in_event(G_GNUC_UNUSED GIOChannel *_source,
G_GNUC_UNUSED
GIOCondition
condition
,
G_GNUC_UNUSED
GIOCondition
condition
,
gpointer
data
)
gpointer
data
)
{
{
struct
mpd_inotify_source
*
source
=
data
;
struct
mpd_inotify_source
*
source
=
(
struct
mpd_inotify_source
*
)
data
;
void
*
dest
;
void
*
dest
;
size_t
length
;
size_t
length
;
ssize_t
nbytes
;
ssize_t
nbytes
;
const
struct
inotify_event
*
event
;
dest
=
fifo_buffer_write
(
source
->
buffer
,
&
length
);
dest
=
fifo_buffer_write
(
source
->
buffer
,
&
length
);
if
(
dest
==
NULL
)
if
(
dest
==
NULL
)
...
@@ -85,7 +88,9 @@ mpd_inotify_in_event(G_GNUC_UNUSED GIOChannel *_source,
...
@@ -85,7 +88,9 @@ mpd_inotify_in_event(G_GNUC_UNUSED GIOChannel *_source,
while
(
true
)
{
while
(
true
)
{
const
char
*
name
;
const
char
*
name
;
event
=
fifo_buffer_read
(
source
->
buffer
,
&
length
);
const
struct
inotify_event
*
event
=
(
const
struct
inotify_event
*
)
fifo_buffer_read
(
source
->
buffer
,
&
length
);
if
(
event
==
NULL
||
length
<
sizeof
(
*
event
)
||
if
(
event
==
NULL
||
length
<
sizeof
(
*
event
)
||
length
<
sizeof
(
*
event
)
+
event
->
len
)
length
<
sizeof
(
*
event
)
+
event
->
len
)
break
;
break
;
...
...
src/
inotify_source.h
→
src/
InotifySource.hxx
View file @
a654f146
/*
/*
* Copyright (C) 2003-201
1
The Music Player Daemon Project
* Copyright (C) 2003-201
3
The Music Player Daemon Project
* http://www.musicpd.org
* http://www.musicpd.org
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
...
@@ -17,8 +17,8 @@
...
@@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
*/
#ifndef MPD_INOTIFY_SOURCE_H
#ifndef MPD_INOTIFY_SOURCE_H
XX
#define MPD_INOTIFY_SOURCE_H
#define MPD_INOTIFY_SOURCE_H
XX
#include "gerror.h"
#include "gerror.h"
...
...
src/
inotify_update.c
→
src/
InotifyUpdate.cxx
View file @
a654f146
/*
/*
* Copyright (C) 2003-201
1
The Music Player Daemon Project
* Copyright (C) 2003-201
3
The Music Player Daemon Project
* http://www.musicpd.org
* http://www.musicpd.org
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
...
@@ -18,12 +18,15 @@
...
@@ -18,12 +18,15 @@
*/
*/
#include "config.h"
/* must be first for large file support */
#include "config.h"
/* must be first for large file support */
#include "
inotify_update.h
"
#include "
InotifyUpdate.hxx
"
#include "
inotify_source.h
"
#include "
InotifySource.hxx
"
#include "
inotify_queue.h
"
#include "
InotifyQueue.hxx
"
#include "database.h"
#include "database.h"
extern
"C"
{
#include "mapper.h"
#include "mapper.h"
#include "path.h"
#include "path.h"
}
#include <assert.h>
#include <assert.h>
#include <sys/inotify.h>
#include <sys/inotify.h>
...
@@ -90,7 +93,8 @@ tree_remove_watch_directory(struct watch_directory *directory)
...
@@ -90,7 +93,8 @@ tree_remove_watch_directory(struct watch_directory *directory)
static
struct
watch_directory
*
static
struct
watch_directory
*
tree_find_watch_directory
(
int
wd
)
tree_find_watch_directory
(
int
wd
)
{
{
return
g_tree_lookup
(
inotify_directories
,
GINT_TO_POINTER
(
wd
));
return
(
struct
watch_directory
*
)
g_tree_lookup
(
inotify_directories
,
GINT_TO_POINTER
(
wd
));
}
}
static
void
static
void
...
@@ -109,7 +113,7 @@ remove_watch_directory(struct watch_directory *directory)
...
@@ -109,7 +113,7 @@ remove_watch_directory(struct watch_directory *directory)
tree_remove_watch_directory
(
directory
);
tree_remove_watch_directory
(
directory
);
while
(
directory
->
children
!=
NULL
)
while
(
directory
->
children
!=
NULL
)
remove_watch_directory
(
directory
->
children
->
data
);
remove_watch_directory
(
(
struct
watch_directory
*
)
directory
->
children
->
data
);
directory
->
parent
->
children
=
directory
->
parent
->
children
=
g_list_remove
(
directory
->
parent
->
children
,
directory
);
g_list_remove
(
directory
->
parent
->
children
,
directory
);
...
@@ -349,7 +353,7 @@ static gboolean
...
@@ -349,7 +353,7 @@ static gboolean
free_watch_directory
(
G_GNUC_UNUSED
gpointer
key
,
gpointer
value
,
free_watch_directory
(
G_GNUC_UNUSED
gpointer
key
,
gpointer
value
,
G_GNUC_UNUSED
gpointer
data
)
G_GNUC_UNUSED
gpointer
data
)
{
{
struct
watch_directory
*
directory
=
value
;
struct
watch_directory
*
directory
=
(
struct
watch_directory
*
)
value
;
g_free
(
directory
->
name
);
g_free
(
directory
->
name
);
g_list_free
(
directory
->
children
);
g_list_free
(
directory
->
children
);
...
...
src/
inotify_update.h
→
src/
InotifyUpdate.hxx
View file @
a654f146
/*
/*
* Copyright (C) 2003-201
1
The Music Player Daemon Project
* Copyright (C) 2003-201
3
The Music Player Daemon Project
* http://www.musicpd.org
* http://www.musicpd.org
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
...
@@ -17,8 +17,8 @@
...
@@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
*/
#ifndef MPD_INOTIFY_UPDATE_H
#ifndef MPD_INOTIFY_UPDATE_H
XX
#define MPD_INOTIFY_UPDATE_H
#define MPD_INOTIFY_UPDATE_H
XX
#include "check.h"
#include "check.h"
...
...
src/Main.cxx
View file @
a654f146
/*
/*
* Copyright (C) 2003-201
2
The Music Player Daemon Project
* Copyright (C) 2003-201
3
The Music Player Daemon Project
* http://www.musicpd.org
* http://www.musicpd.org
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
#include "config.h"
#include "config.h"
#include "Main.hxx"
#include "Main.hxx"
#include "PlaylistFile.hxx"
#include "PlaylistFile.hxx"
#include "UpdateGlue.hxx"
#include "chunk.h"
#include "chunk.h"
extern
"C"
{
extern
"C"
{
...
@@ -31,7 +32,6 @@ extern "C" {
...
@@ -31,7 +32,6 @@ extern "C" {
#include "AllCommands.h"
#include "AllCommands.h"
#include "playlist.h"
#include "playlist.h"
#include "database.h"
#include "database.h"
#include "update.h"
#include "player_thread.h"
#include "player_thread.h"
#include "listen.h"
#include "listen.h"
#include "cmdline.h"
#include "cmdline.h"
...
@@ -59,12 +59,12 @@ extern "C" {
...
@@ -59,12 +59,12 @@ extern "C" {
#include "mpd_error.h"
#include "mpd_error.h"
extern
"C"
{
#ifdef ENABLE_INOTIFY
#ifdef ENABLE_INOTIFY
#include "
inotify_update.h
"
#include "
InotifyUpdate.hxx
"
#endif
#endif
extern
"C"
{
#ifdef ENABLE_SQLITE
#ifdef ENABLE_SQLITE
#include "sticker.h"
#include "sticker.h"
#endif
#endif
...
...
src/OtherCommands.cxx
View file @
a654f146
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
#include "OtherCommands.hxx"
#include "OtherCommands.hxx"
#include "DatabaseCommands.hxx"
#include "DatabaseCommands.hxx"
#include "CommandError.hxx"
#include "CommandError.hxx"
#include "UpdateGlue.hxx"
#include "directory.h"
#include "directory.h"
#include "song.h"
#include "song.h"
...
@@ -31,7 +32,6 @@ extern "C" {
...
@@ -31,7 +32,6 @@ extern "C" {
#include "ls.h"
#include "ls.h"
#include "uri.h"
#include "uri.h"
#include "decoder_print.h"
#include "decoder_print.h"
#include "update.h"
#include "volume.h"
#include "volume.h"
#include "stats.h"
#include "stats.h"
#include "permission.h"
#include "permission.h"
...
...
src/PlayerCommands.cxx
View file @
a654f146
...
@@ -21,13 +21,13 @@
...
@@ -21,13 +21,13 @@
#include "PlayerCommands.hxx"
#include "PlayerCommands.hxx"
#include "CommandError.hxx"
#include "CommandError.hxx"
#include "PlaylistPrint.hxx"
#include "PlaylistPrint.hxx"
#include "UpdateGlue.hxx"
extern
"C"
{
extern
"C"
{
#include "protocol/argparser.h"
#include "protocol/argparser.h"
#include "protocol/result.h"
#include "protocol/result.h"
#include "player_control.h"
#include "player_control.h"
#include "playlist.h"
#include "playlist.h"
#include "update.h"
#include "volume.h"
#include "volume.h"
#include "client.h"
#include "client.h"
#include "client_internal.h"
#include "client_internal.h"
...
...
src/
update_archive.c
→
src/
UpdateArchive.cxx
View file @
a654f146
/*
/*
* Copyright (C) 2003-201
2
The Music Player Daemon Project
* Copyright (C) 2003-201
3
The Music Player Daemon Project
* http://www.musicpd.org
* http://www.musicpd.org
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
...
@@ -18,14 +18,17 @@
...
@@ -18,14 +18,17 @@
*/
*/
#include "config.h"
/* must be first for large file support */
#include "config.h"
/* must be first for large file support */
#include "
update_archive.h
"
#include "
UpdateArchive.hxx
"
#include "
update_internal.h
"
#include "
UpdateInternal.hxx
"
#include "db_lock.h"
#include "db_lock.h"
#include "directory.h"
#include "directory.h"
#include "song.h"
#include "song.h"
extern
"C"
{
#include "mapper.h"
#include "mapper.h"
#include "archive_list.h"
#include "archive_list.h"
#include "archive_plugin.h"
#include "archive_plugin.h"
}
#include <glib.h>
#include <glib.h>
...
...
src/
update_archive.h
→
src/
UpdateArchive.hxx
View file @
a654f146
/*
/*
* Copyright (C) 2003-201
2
The Music Player Daemon Project
* Copyright (C) 2003-201
3
The Music Player Daemon Project
* http://www.musicpd.org
* http://www.musicpd.org
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
...
@@ -17,8 +17,8 @@
...
@@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
*/
#ifndef MPD_UPDATE_ARCHIVE_H
#ifndef MPD_UPDATE_ARCHIVE_H
XX
#define MPD_UPDATE_ARCHIVE_H
#define MPD_UPDATE_ARCHIVE_H
XX
#include "check.h"
#include "check.h"
#include "gcc.h"
#include "gcc.h"
...
...
src/
update_container.c
→
src/
UpdateContainer.cxx
View file @
a654f146
/*
/*
* Copyright (C) 2003-201
2
The Music Player Daemon Project
* Copyright (C) 2003-201
3
The Music Player Daemon Project
* http://www.musicpd.org
* http://www.musicpd.org
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
...
@@ -18,16 +18,19 @@
...
@@ -18,16 +18,19 @@
*/
*/
#include "config.h"
/* must be first for large file support */
#include "config.h"
/* must be first for large file support */
#include "
update_container.h
"
#include "
UpdateContainer.hxx
"
#include "
update_internal.h
"
#include "
UpdateInternal.hxx
"
#include "
update_db.h
"
#include "
UpdateDatabase.hxx
"
#include "db_lock.h"
#include "db_lock.h"
#include "directory.h"
#include "directory.h"
#include "song.h"
#include "song.h"
#include "mapper.h"
#include "decoder_plugin.h"
#include "decoder_plugin.h"
extern
"C"
{
#include "mapper.h"
#include "tag.h"
#include "tag.h"
#include "tag_handler.h"
#include "tag_handler.h"
}
#include <glib.h>
#include <glib.h>
...
...
src/
update_container.h
→
src/
UpdateContainer.hxx
View file @
a654f146
/*
/*
* Copyright (C) 2003-201
2
The Music Player Daemon Project
* Copyright (C) 2003-201
3
The Music Player Daemon Project
* http://www.musicpd.org
* http://www.musicpd.org
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
...
@@ -17,12 +17,11 @@
...
@@ -17,12 +17,11 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
*/
#ifndef MPD_UPDATE_CONTAINER_H
#ifndef MPD_UPDATE_CONTAINER_H
XX
#define MPD_UPDATE_CONTAINER_H
#define MPD_UPDATE_CONTAINER_H
XX
#include "check.h"
#include "check.h"
#include <stdbool.h>
#include <sys/stat.h>
#include <sys/stat.h>
struct
directory
;
struct
directory
;
...
...
src/
update_db.c
→
src/
UpdateDatabase.cxx
View file @
a654f146
...
@@ -18,13 +18,16 @@
...
@@ -18,13 +18,16 @@
*/
*/
#include "config.h"
/* must be first for large file support */
#include "config.h"
/* must be first for large file support */
#include "
update_db.h
"
#include "
UpdateDatabase.hxx
"
#include "
update_remove.h
"
#include "
UpdateRemove.hxx
"
#include "directory.h"
#include "directory.h"
#include "song.h"
#include "song.h"
#include "playlist_vector.h"
#include "db_lock.h"
#include "db_lock.h"
extern
"C"
{
#include "playlist_vector.h"
}
#include <glib.h>
#include <glib.h>
#include <assert.h>
#include <assert.h>
...
...
src/
update_db.h
→
src/
UpdateDatabase.hxx
View file @
a654f146
/*
/*
* Copyright (C) 2003-201
2
The Music Player Daemon Project
* Copyright (C) 2003-201
3
The Music Player Daemon Project
* http://www.musicpd.org
* http://www.musicpd.org
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
...
@@ -17,13 +17,11 @@
...
@@ -17,13 +17,11 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
*/
#ifndef MPD_UPDATE_D
B_H
#ifndef MPD_UPDATE_D
ATABASE_HXX
#define MPD_UPDATE_D
B_H
#define MPD_UPDATE_D
ATABASE_HXX
#include "check.h"
#include "check.h"
#include <stdbool.h>
struct
directory
;
struct
directory
;
struct
song
;
struct
song
;
...
...
src/
update.c
→
src/
UpdateGlue.cxx
View file @
a654f146
...
@@ -18,18 +18,20 @@
...
@@ -18,18 +18,20 @@
*/
*/
#include "config.h"
#include "config.h"
#include "update.h"
#include "UpdateGlue.hxx"
#include "update_queue.h"
#include "UpdateQueue.hxx"
#include "update_walk.h"
#include "UpdateWalk.hxx"
#include "update_remove.h"
#include "UpdateRemove.hxx"
#include "update.h"
extern
"C"
{
#include "database.h"
#include "database.h"
#include "mapper.h"
#include "mapper.h"
#include "playlist.h"
#include "playlist.h"
#include "event_pipe.h"
#include "event_pipe.h"
#include "update.h"
#include "idle.h"
#include "idle.h"
#include "stats.h"
#include "stats.h"
}
#include "Main.hxx"
#include "Main.hxx"
#include "mpd_error.h"
#include "mpd_error.h"
...
@@ -65,7 +67,7 @@ isUpdatingDB(void)
...
@@ -65,7 +67,7 @@ isUpdatingDB(void)
static
void
*
update_task
(
void
*
_path
)
static
void
*
update_task
(
void
*
_path
)
{
{
const
char
*
path
=
_path
;
const
char
*
path
=
(
const
char
*
)
_path
;
if
(
path
!=
NULL
&&
*
path
!=
0
)
if
(
path
!=
NULL
&&
*
path
!=
0
)
g_debug
(
"starting: %s"
,
path
);
g_debug
(
"starting: %s"
,
path
);
...
...
src/
update.h
→
src/
UpdateGlue.hxx
View file @
a654f146
/*
/*
* Copyright (C) 2003-201
1
The Music Player Daemon Project
* Copyright (C) 2003-201
3
The Music Player Daemon Project
* http://www.musicpd.org
* http://www.musicpd.org
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
...
@@ -17,10 +17,8 @@
...
@@ -17,10 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
*/
#ifndef MPD_UPDATE_H
#ifndef MPD_UPDATE_GLUE_HXX
#define MPD_UPDATE_H
#define MPD_UPDATE_GLUE_HXX
#include <stdbool.h>
void
update_global_init
(
void
);
void
update_global_init
(
void
);
...
...
src/
update_io.c
→
src/
UpdateIO.cxx
View file @
a654f146
...
@@ -18,11 +18,14 @@
...
@@ -18,11 +18,14 @@
*/
*/
#include "config.h"
/* must be first for large file support */
#include "config.h"
/* must be first for large file support */
#include "update_io.h"
#include "UpdateIO.hxx"
#include "mapper.h"
#include "directory.h"
#include "directory.h"
#include "glib_compat.h"
#include "glib_compat.h"
extern
"C"
{
#include "mapper.h"
}
#include <glib.h>
#include <glib.h>
#include <errno.h>
#include <errno.h>
...
...
src/
update_io.h
→
src/
UpdateIO.hxx
View file @
a654f146
/*
/*
* Copyright (C) 2003-201
2
The Music Player Daemon Project
* Copyright (C) 2003-201
3
The Music Player Daemon Project
* http://www.musicpd.org
* http://www.musicpd.org
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
...
@@ -17,12 +17,11 @@
...
@@ -17,12 +17,11 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
*/
#ifndef MPD_UPDATE_IO_H
#ifndef MPD_UPDATE_IO_H
XX
#define MPD_UPDATE_IO_H
#define MPD_UPDATE_IO_H
XX
#include "check.h"
#include "check.h"
#include <stdbool.h>
#include <sys/stat.h>
#include <sys/stat.h>
struct
directory
;
struct
directory
;
...
...
src/
update_internal.h
→
src/
UpdateInternal.hxx
View file @
a654f146
File moved
src/
update_queue.c
→
src/
UpdateQueue.cxx
View file @
a654f146
/*
/*
* Copyright (C) 2003-201
1
The Music Player Daemon Project
* Copyright (C) 2003-201
3
The Music Player Daemon Project
* http://www.musicpd.org
* http://www.musicpd.org
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
*/
*/
#include "config.h"
#include "config.h"
#include "
update_queue.h
"
#include "
UpdateQueue.hxx
"
#include <glib.h>
#include <glib.h>
...
...
src/
update_queue.h
→
src/
UpdateQueue.hxx
View file @
a654f146
/*
/*
* Copyright (C) 2003-201
2
The Music Player Daemon Project
* Copyright (C) 2003-201
3
The Music Player Daemon Project
* http://www.musicpd.org
* http://www.musicpd.org
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
...
@@ -17,13 +17,11 @@
...
@@ -17,13 +17,11 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
*/
#ifndef MPD_UPDATE_QUEUE_H
#ifndef MPD_UPDATE_QUEUE_H
XX
#define MPD_UPDATE_QUEUE_H
#define MPD_UPDATE_QUEUE_H
XX
#include "check.h"
#include "check.h"
#include <stdbool.h>
unsigned
unsigned
update_queue_push
(
const
char
*
path
,
bool
discard
,
unsigned
base
);
update_queue_push
(
const
char
*
path
,
bool
discard
,
unsigned
base
);
...
...
src/
update_remove.c
→
src/
UpdateRemove.cxx
View file @
a654f146
...
@@ -18,15 +18,21 @@
...
@@ -18,15 +18,21 @@
*/
*/
#include "config.h"
/* must be first for large file support */
#include "config.h"
/* must be first for large file support */
#include "update_remove.h"
#include "UpdateRemove.hxx"
extern
"C"
{
#include "event_pipe.h"
#include "event_pipe.h"
#include "song.h"
#include "playlist.h"
#include "playlist.h"
}
#include "song.h"
#include "Main.hxx"
#include "Main.hxx"
#ifdef ENABLE_SQLITE
#ifdef ENABLE_SQLITE
extern
"C"
{
#include "sticker.h"
#include "sticker.h"
#include "song_sticker.h"
#include "song_sticker.h"
}
#endif
#endif
#include <glib.h>
#include <glib.h>
...
...
src/
update_remove.h
→
src/
UpdateRemove.hxx
View file @
a654f146
/*
/*
* Copyright (C) 2003-201
2
The Music Player Daemon Project
* Copyright (C) 2003-201
3
The Music Player Daemon Project
* http://www.musicpd.org
* http://www.musicpd.org
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
...
@@ -17,8 +17,8 @@
...
@@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
*/
#ifndef MPD_UPDATE_REMOVE_H
#ifndef MPD_UPDATE_REMOVE_H
XX
#define MPD_UPDATE_REMOVE_H
#define MPD_UPDATE_REMOVE_H
XX
#include "check.h"
#include "check.h"
...
...
src/
update_song.c
→
src/
UpdateSong.cxx
View file @
a654f146
...
@@ -18,17 +18,20 @@
...
@@ -18,17 +18,20 @@
*/
*/
#include "config.h"
/* must be first for large file support */
#include "config.h"
/* must be first for large file support */
#include "
update_song.h
"
#include "
UpdateSong.hxx
"
#include "
update_internal.h
"
#include "
UpdateInternal.hxx
"
#include "
update_io.h
"
#include "
UpdateIO.hxx
"
#include "
update_db.h
"
#include "
UpdateDatabase.hxx
"
#include "
update_container.h
"
#include "
UpdateContainer.hxx
"
#include "db_lock.h"
#include "db_lock.h"
#include "directory.h"
#include "directory.h"
#include "song.h"
#include "song.h"
#include "decoder_list.h"
#include "decoder_plugin.h"
#include "decoder_plugin.h"
extern
"C"
{
#include "decoder_list.h"
}
#include <glib.h>
#include <glib.h>
#include <unistd.h>
#include <unistd.h>
...
@@ -104,7 +107,7 @@ update_song_file(struct directory *directory,
...
@@ -104,7 +107,7 @@ update_song_file(struct directory *directory,
const
struct
stat
*
st
)
const
struct
stat
*
st
)
{
{
const
struct
decoder_plugin
*
plugin
=
const
struct
decoder_plugin
*
plugin
=
decoder_plugin_from_suffix
(
suffix
,
false
);
decoder_plugin_from_suffix
(
suffix
,
nullptr
);
if
(
plugin
==
NULL
)
if
(
plugin
==
NULL
)
return
false
;
return
false
;
...
...
src/
update_song.h
→
src/
UpdateSong.hxx
View file @
a654f146
/*
/*
* Copyright (C) 2003-201
2
The Music Player Daemon Project
* Copyright (C) 2003-201
3
The Music Player Daemon Project
* http://www.musicpd.org
* http://www.musicpd.org
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
...
@@ -17,12 +17,11 @@
...
@@ -17,12 +17,11 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
*/
#ifndef MPD_UPDATE_SONG_H
#ifndef MPD_UPDATE_SONG_H
XX
#define MPD_UPDATE_SONG_H
#define MPD_UPDATE_SONG_H
XX
#include "check.h"
#include "check.h"
#include <stdbool.h>
#include <sys/stat.h>
#include <sys/stat.h>
struct
directory
;
struct
directory
;
...
...
src/
update_walk.c
→
src/
UpdateWalk.cxx
View file @
a654f146
/*
/*
* Copyright (C) 2003-201
2
The Music Player Daemon Project
* Copyright (C) 2003-201
3
The Music Player Daemon Project
* http://www.musicpd.org
* http://www.musicpd.org
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
...
@@ -18,22 +18,25 @@
...
@@ -18,22 +18,25 @@
*/
*/
#include "config.h"
/* must be first for large file support */
#include "config.h"
/* must be first for large file support */
#include "update_walk.h"
#include "UpdateWalk.hxx"
#include "update_io.h"
#include "UpdateIO.hxx"
#include "update_db.h"
#include "UpdateDatabase.hxx"
#include "update_song.h"
#include "UpdateSong.hxx"
#include "update_archive.h"
#include "UpdateArchive.hxx"
#include "database.h"
#include "db_lock.h"
#include "db_lock.h"
#include "exclude.h"
#include "directory.h"
#include "directory.h"
#include "song.h"
#include "song.h"
extern
"C"
{
#include "exclude.h"
#include "database.h"
#include "playlist_vector.h"
#include "playlist_vector.h"
#include "uri.h"
#include "uri.h"
#include "mapper.h"
#include "mapper.h"
#include "path.h"
#include "path.h"
#include "playlist_list.h"
#include "playlist_list.h"
#include "conf.h"
#include "conf.h"
}
#include <glib.h>
#include <glib.h>
...
...
src/
update_walk.h
→
src/
UpdateWalk.hxx
View file @
a654f146
/*
/*
* Copyright (C) 2003-201
2
The Music Player Daemon Project
* Copyright (C) 2003-201
3
The Music Player Daemon Project
* http://www.musicpd.org
* http://www.musicpd.org
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
...
@@ -17,8 +17,8 @@
...
@@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
*/
#ifndef MPD_UPDATE_WALK_H
#ifndef MPD_UPDATE_WALK_H
XX
#define MPD_UPDATE_WALK_H
#define MPD_UPDATE_WALK_H
XX
#include "check.h"
#include "check.h"
...
...
test/
run_inotify.c
→
test/
RunInotify.cxx
View file @
a654f146
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
*/
*/
#include "config.h"
#include "config.h"
#include "
inotify_source.h
"
#include "
InotifySource.hxx
"
#include <glib.h>
#include <glib.h>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment