summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-01-02 20:56:21 +0100
committerMax Kellermann <max@duempel.org>2013-01-02 20:56:21 +0100
commit51a2d09eb7fd8bc22a25e151878e6809b58bc21f (patch)
tree64f87cab1f5d55a219fc3c9d3d2dac5d65e0aba5
parent22f0ef6d6b2d2c66def0e0e93442b01089e388e9 (diff)
db_lock: convert to C++
-rw-r--r--Makefile.am4
-rw-r--r--src/DatabaseLock.cxx (renamed from src/db_lock.c)4
-rw-r--r--src/DatabaseLock.hxx (renamed from src/db_lock.h)7
-rw-r--r--src/DatabaseSave.cxx2
-rw-r--r--src/Directory.cxx2
-rw-r--r--src/PlaylistVector.cxx2
-rw-r--r--src/StickerCommands.cxx2
-rw-r--r--src/UpdateArchive.cxx2
-rw-r--r--src/UpdateContainer.cxx2
-rw-r--r--src/UpdateDatabase.cxx2
-rw-r--r--src/UpdateSong.cxx2
-rw-r--r--src/UpdateWalk.cxx2
-rw-r--r--src/db/SimpleDatabasePlugin.cxx4
13 files changed, 18 insertions, 19 deletions
diff --git a/Makefile.am b/Makefile.am
index 5811dac95..5cbc44da2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -234,7 +234,7 @@ src_mpd_SOURCES = \
src/DatabaseQueue.cxx src/DatabaseQueue.hxx \
src/DatabasePlaylist.cxx src/DatabasePlaylist.hxx \
src/db_error.h \
- src/db_lock.c src/db_lock.h \
+ src/DatabaseLock.cxx src/DatabaseLock.hxx \
src/DatabaseSave.cxx src/DatabaseSave.hxx \
src/DatabasePlugin.hxx \
src/DatabaseVisitor.hxx \
@@ -1072,7 +1072,7 @@ test_DumpDatabase_SOURCES = test/DumpDatabase.cxx \
src/DatabaseSelection.cxx \
src/Directory.cxx src/DirectorySave.cxx \
src/PlaylistVector.cxx src/PlaylistDatabase.cxx \
- src/db_lock.c src/DatabaseSave.cxx \
+ src/DatabaseLock.cxx src/DatabaseSave.cxx \
src/Song.cxx src/song_sort.c src/SongSave.cxx \
src/tag.c src/tag_pool.c src/TagSave.cxx \
src/path.c \
diff --git a/src/db_lock.c b/src/DatabaseLock.cxx
index 53759673d..872b9bfd3 100644
--- a/src/db_lock.c
+++ b/src/DatabaseLock.cxx
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2011 The Music Player Daemon Project
+ * Copyright (C) 2003-2013 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -18,7 +18,7 @@
*/
#include "config.h"
-#include "db_lock.h"
+#include "DatabaseLock.hxx"
#include "gcc.h"
#if GCC_CHECK_VERSION(4, 2)
diff --git a/src/db_lock.h b/src/DatabaseLock.hxx
index eed71eec0..6646fb43d 100644
--- a/src/db_lock.h
+++ b/src/DatabaseLock.hxx
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2011 The Music Player Daemon Project
+ * Copyright (C) 2003-2013 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -23,14 +23,13 @@
* multi-threading.
*/
-#ifndef MPD_DB_LOCK_H
-#define MPD_DB_LOCK_H
+#ifndef MPD_DB_LOCK_HXX
+#define MPD_DB_LOCK_HXX
#include "check.h"
#include <glib.h>
#include <assert.h>
-#include <stdbool.h>
extern GStaticMutex db_mutex;
diff --git a/src/DatabaseSave.cxx b/src/DatabaseSave.cxx
index 711d5b2f3..771699848 100644
--- a/src/DatabaseSave.cxx
+++ b/src/DatabaseSave.cxx
@@ -19,7 +19,7 @@
#include "config.h"
#include "DatabaseSave.hxx"
-#include "db_lock.h"
+#include "DatabaseLock.hxx"
#include "directory.h"
#include "DirectorySave.hxx"
#include "song.h"
diff --git a/src/Directory.cxx b/src/Directory.cxx
index a371dc41a..59859a0fd 100644
--- a/src/Directory.cxx
+++ b/src/Directory.cxx
@@ -21,13 +21,13 @@
#include "directory.h"
#include "SongFilter.hxx"
#include "PlaylistVector.hxx"
+#include "DatabaseLock.hxx"
extern "C" {
#include "song.h"
#include "song_sort.h"
#include "path.h"
#include "util/list_sort.h"
-#include "db_lock.h"
}
#include <glib.h>
diff --git a/src/PlaylistVector.cxx b/src/PlaylistVector.cxx
index ea3172d0d..b9f671929 100644
--- a/src/PlaylistVector.cxx
+++ b/src/PlaylistVector.cxx
@@ -19,7 +19,7 @@
#include "config.h"
#include "PlaylistVector.hxx"
-#include "db_lock.h"
+#include "DatabaseLock.hxx"
#include <assert.h>
#include <string.h>
diff --git a/src/StickerCommands.cxx b/src/StickerCommands.cxx
index 7d23354fc..ad09f9b46 100644
--- a/src/StickerCommands.cxx
+++ b/src/StickerCommands.cxx
@@ -20,6 +20,7 @@
#include "config.h"
#include "StickerCommands.hxx"
#include "SongPrint.hxx"
+#include "DatabaseLock.hxx"
extern "C" {
#include "protocol/result.h"
@@ -27,7 +28,6 @@ extern "C" {
#include "sticker_print.h"
#include "song_sticker.h"
#include "database.h"
-#include "db_lock.h"
}
#include <string.h>
diff --git a/src/UpdateArchive.cxx b/src/UpdateArchive.cxx
index c57534ea4..441cf71c2 100644
--- a/src/UpdateArchive.cxx
+++ b/src/UpdateArchive.cxx
@@ -20,7 +20,7 @@
#include "config.h" /* must be first for large file support */
#include "UpdateArchive.hxx"
#include "UpdateInternal.hxx"
-#include "db_lock.h"
+#include "DatabaseLock.hxx"
#include "directory.h"
#include "song.h"
diff --git a/src/UpdateContainer.cxx b/src/UpdateContainer.cxx
index 68f8c3b98..7a904a1e6 100644
--- a/src/UpdateContainer.cxx
+++ b/src/UpdateContainer.cxx
@@ -21,7 +21,7 @@
#include "UpdateContainer.hxx"
#include "UpdateInternal.hxx"
#include "UpdateDatabase.hxx"
-#include "db_lock.h"
+#include "DatabaseLock.hxx"
#include "directory.h"
#include "song.h"
#include "decoder_plugin.h"
diff --git a/src/UpdateDatabase.cxx b/src/UpdateDatabase.cxx
index e959a4ecc..6ef6e3429 100644
--- a/src/UpdateDatabase.cxx
+++ b/src/UpdateDatabase.cxx
@@ -23,7 +23,7 @@
#include "PlaylistVector.hxx"
#include "directory.h"
#include "song.h"
-#include "db_lock.h"
+#include "DatabaseLock.hxx"
#include <glib.h>
#include <assert.h>
diff --git a/src/UpdateSong.cxx b/src/UpdateSong.cxx
index 8241d46f2..48357b9cd 100644
--- a/src/UpdateSong.cxx
+++ b/src/UpdateSong.cxx
@@ -23,7 +23,7 @@
#include "UpdateIO.hxx"
#include "UpdateDatabase.hxx"
#include "UpdateContainer.hxx"
-#include "db_lock.h"
+#include "DatabaseLock.hxx"
#include "directory.h"
#include "song.h"
#include "decoder_plugin.h"
diff --git a/src/UpdateWalk.cxx b/src/UpdateWalk.cxx
index 33220ba76..860342001 100644
--- a/src/UpdateWalk.cxx
+++ b/src/UpdateWalk.cxx
@@ -23,7 +23,7 @@
#include "UpdateDatabase.hxx"
#include "UpdateSong.hxx"
#include "UpdateArchive.hxx"
-#include "db_lock.h"
+#include "DatabaseLock.hxx"
#include "directory.h"
#include "song.h"
#include "PlaylistVector.hxx"
diff --git a/src/db/SimpleDatabasePlugin.cxx b/src/db/SimpleDatabasePlugin.cxx
index 4b92da6cf..85d707f52 100644
--- a/src/db/SimpleDatabasePlugin.cxx
+++ b/src/db/SimpleDatabasePlugin.cxx
@@ -23,10 +23,10 @@
#include "DatabaseHelpers.hxx"
#include "SongFilter.hxx"
#include "DatabaseSave.hxx"
+#include "DatabaseLock.hxx"
+#include "db_error.h"
extern "C" {
-#include "db_error.h"
-#include "db_lock.h"
#include "conf.h"
}