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
6f3c65dc
Commit
6f3c65dc
authored
Aug 02, 2012
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DatabaseGlue: remove db_walk(), db_visit()
Unused.
parent
0a3ada4f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
61 deletions
+0
-61
DatabaseGlue.cxx
src/DatabaseGlue.cxx
+0
-49
database.h
src/database.h
+0
-12
No files found.
src/DatabaseGlue.cxx
View file @
6f3c65dc
...
@@ -125,55 +125,6 @@ db_get_song(const char *file)
...
@@ -125,55 +125,6 @@ db_get_song(const char *file)
}
}
bool
bool
db_visit
(
const
struct
db_selection
*
selection
,
const
struct
db_visitor
*
visitor
,
void
*
ctx
,
GError
**
error_r
)
{
if
(
db
==
NULL
)
{
g_set_error_literal
(
error_r
,
db_quark
(),
DB_DISABLED
,
"No database"
);
return
false
;
}
VisitDirectory
visit_directory
;
if
(
visitor
->
directory
!=
NULL
)
visit_directory
=
[
&
](
const
struct
directory
*
directory
,
GError
**
error_r2
)
{
return
visitor
->
directory
(
directory
,
ctx
,
error_r2
);
};
VisitSong
visit_song
;
if
(
visitor
->
song
!=
NULL
)
visit_song
=
[
&
](
struct
song
*
song
,
GError
**
error_r2
)
{
return
visitor
->
song
(
song
,
ctx
,
error_r2
);
};
VisitPlaylist
visit_playlist
;
if
(
visitor
->
playlist
!=
NULL
)
visit_playlist
=
[
&
](
const
struct
playlist_metadata
*
playlist
,
const
struct
directory
*
directory
,
GError
**
error_r2
)
{
return
visitor
->
playlist
(
playlist
,
directory
,
ctx
,
error_r2
);
};
return
db
->
Visit
(
selection
,
visit_directory
,
visit_song
,
visit_playlist
,
error_r
);
}
bool
db_walk
(
const
char
*
uri
,
const
struct
db_visitor
*
visitor
,
void
*
ctx
,
GError
**
error_r
)
{
struct
db_selection
selection
;
db_selection_init
(
&
selection
,
uri
,
true
);
return
db_visit
(
&
selection
,
visitor
,
ctx
,
error_r
);
}
bool
db_save
(
GError
**
error_r
)
db_save
(
GError
**
error_r
)
{
{
assert
(
db
!=
NULL
);
assert
(
db
!=
NULL
);
...
...
src/database.h
View file @
6f3c65dc
...
@@ -64,18 +64,6 @@ gcc_pure
...
@@ -64,18 +64,6 @@ gcc_pure
struct
song
*
struct
song
*
db_get_song
(
const
char
*
file
);
db_get_song
(
const
char
*
file
);
gcc_nonnull
(
1
,
2
)
bool
db_visit
(
const
struct
db_selection
*
selection
,
const
struct
db_visitor
*
visitor
,
void
*
ctx
,
GError
**
error_r
);
gcc_nonnull
(
1
,
2
)
bool
db_walk
(
const
char
*
uri
,
const
struct
db_visitor
*
visitor
,
void
*
ctx
,
GError
**
error_r
);
bool
bool
db_save
(
GError
**
error_r
);
db_save
(
GError
**
error_r
);
...
...
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