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
98dbdf72
Commit
98dbdf72
authored
Jan 02, 2013
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PlaylistVector: move struct playlist_metadata to PlaylistInfo.hxx
parent
51a2d09e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
99 additions
and
39 deletions
+99
-39
Makefile.am
Makefile.am
+3
-2
PlaylistInfo.cxx
src/PlaylistInfo.cxx
+46
-0
PlaylistInfo.hxx
src/PlaylistInfo.hxx
+48
-0
PlaylistVector.cxx
src/PlaylistVector.cxx
+1
-22
PlaylistVector.hxx
src/PlaylistVector.hxx
+1
-15
No files found.
Makefile.am
View file @
98dbdf72
...
...
@@ -302,7 +302,8 @@ src_mpd_SOURCES = \
src/PlaylistSong.cxx src/PlaylistSong.hxx
\
src/PlaylistState.cxx src/PlaylistState.hxx
\
src/PlaylistQueue.cxx src/PlaylistQueue.hxx
\
src/PlaylistVector.cxx
\
src/PlaylistVector.cxx src/PlaylistVector.hxx
\
src/PlaylistInfo.cxx src/PlaylistInfo.hxx
\
src/PlaylistDatabase.cxx
\
src/queue.c
\
src/QueuePrint.cxx src/QueuePrint.hxx
\
...
...
@@ -1071,7 +1072,7 @@ test_DumpDatabase_SOURCES = test/DumpDatabase.cxx \
src/DatabaseRegistry.cxx
\
src/DatabaseSelection.cxx
\
src/Directory.cxx src/DirectorySave.cxx
\
src/PlaylistVector.cxx src/PlaylistDatabase.cxx
\
src/PlaylistVector.cxx src/Playlist
Info.cxx src/Playlist
Database.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/PlaylistInfo.cxx
0 → 100644
View file @
98dbdf72
/*
* 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
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "config.h"
#include "PlaylistInfo.hxx"
#include <glib.h>
#include <assert.h>
struct
playlist_metadata
*
playlist_metadata_new
(
const
char
*
name
,
time_t
mtime
)
{
assert
(
name
!=
NULL
);
struct
playlist_metadata
*
pm
=
g_slice_new
(
struct
playlist_metadata
);
pm
->
name
=
g_strdup
(
name
);
pm
->
mtime
=
mtime
;
return
pm
;
}
void
playlist_metadata_free
(
struct
playlist_metadata
*
pm
)
{
assert
(
pm
!=
NULL
);
assert
(
pm
->
name
!=
NULL
);
g_free
(
pm
->
name
);
g_slice_free
(
struct
playlist_metadata
,
pm
);
}
src/PlaylistInfo.hxx
0 → 100644
View file @
98dbdf72
/*
* 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
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef MPD_PLAYLIST_INFO_HXX
#define MPD_PLAYLIST_INFO_HXX
#include "check.h"
#include "util/list.h"
#include <sys/time.h>
/**
* A directory entry pointing to a playlist file.
*/
struct
playlist_metadata
{
struct
list_head
siblings
;
/**
* The UTF-8 encoded name of the playlist file.
*/
char
*
name
;
time_t
mtime
;
};
struct
playlist_metadata
*
playlist_metadata_new
(
const
char
*
name
,
time_t
mtime
);
void
playlist_metadata_free
(
struct
playlist_metadata
*
pm
);
#endif
src/PlaylistVector.cxx
View file @
98dbdf72
/*
* Copyright (C) 2003-201
1
The Music Player Daemon Project
* Copyright (C) 2003-201
3
The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -25,27 +25,6 @@
#include <string.h>
#include <glib.h>
static
struct
playlist_metadata
*
playlist_metadata_new
(
const
char
*
name
,
time_t
mtime
)
{
assert
(
name
!=
NULL
);
struct
playlist_metadata
*
pm
=
g_slice_new
(
struct
playlist_metadata
);
pm
->
name
=
g_strdup
(
name
);
pm
->
mtime
=
mtime
;
return
pm
;
}
static
void
playlist_metadata_free
(
struct
playlist_metadata
*
pm
)
{
assert
(
pm
!=
NULL
);
assert
(
pm
->
name
!=
NULL
);
g_free
(
pm
->
name
);
g_slice_free
(
struct
playlist_metadata
,
pm
);
}
void
playlist_vector_deinit
(
struct
list_head
*
pv
)
{
...
...
src/PlaylistVector.hxx
View file @
98dbdf72
...
...
@@ -20,9 +20,9 @@
#ifndef MPD_PLAYLIST_VECTOR_HXX
#define MPD_PLAYLIST_VECTOR_HXX
#include "PlaylistInfo.hxx"
#include "util/list.h"
#include <stddef.h>
#include <sys/time.h>
#define playlist_vector_for_each(pos, head) \
...
...
@@ -31,20 +31,6 @@
#define playlist_vector_for_each_safe(pos, n, head) \
list_for_each_entry_safe(pos, n, head, siblings)
/**
* A directory entry pointing to a playlist file.
*/
struct
playlist_metadata
{
struct
list_head
siblings
;
/**
* The UTF-8 encoded name of the playlist file.
*/
char
*
name
;
time_t
mtime
;
};
void
playlist_vector_deinit
(
struct
list_head
*
pv
);
...
...
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