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
9906daec
Commit
9906daec
authored
Feb 08, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ArchivePlugin: rename struct archive_plugin to ArchivePlugin
parent
5fb54095
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
33 additions
and
27 deletions
+33
-27
ArchiveFile.hxx
src/archive/ArchiveFile.hxx
+3
-2
ArchiveList.cxx
src/archive/ArchiveList.cxx
+4
-4
ArchiveList.hxx
src/archive/ArchiveList.hxx
+5
-5
ArchivePlugin.cxx
src/archive/ArchivePlugin.cxx
+1
-1
ArchivePlugin.hxx
src/archive/ArchivePlugin.hxx
+2
-2
Bzip2ArchivePlugin.cxx
src/archive/plugins/Bzip2ArchivePlugin.cxx
+1
-1
Bzip2ArchivePlugin.hxx
src/archive/plugins/Bzip2ArchivePlugin.hxx
+3
-1
Iso9660ArchivePlugin.cxx
src/archive/plugins/Iso9660ArchivePlugin.cxx
+1
-1
Iso9660ArchivePlugin.hxx
src/archive/plugins/Iso9660ArchivePlugin.hxx
+3
-1
ZzipArchivePlugin.cxx
src/archive/plugins/ZzipArchivePlugin.cxx
+1
-1
ZzipArchivePlugin.hxx
src/archive/plugins/ZzipArchivePlugin.hxx
+3
-1
Archive.cxx
src/db/update/Archive.cxx
+2
-3
Walk.hxx
src/db/update/Walk.hxx
+2
-2
ArchiveInputPlugin.cxx
src/input/plugins/ArchiveInputPlugin.cxx
+1
-1
visit_archive.cxx
test/visit_archive.cxx
+1
-1
No files found.
src/archive/ArchiveFile.hxx
View file @
9906daec
...
...
@@ -23,14 +23,15 @@
class
Mutex
;
class
Cond
;
class
Error
;
struct
ArchivePlugin
;
class
ArchiveVisitor
;
struct
InputStream
;
class
ArchiveFile
{
public
:
const
struct
archive_p
lugin
&
plugin
;
const
ArchiveP
lugin
&
plugin
;
ArchiveFile
(
const
struct
archive_p
lugin
&
_plugin
)
ArchiveFile
(
const
ArchiveP
lugin
&
_plugin
)
:
plugin
(
_plugin
)
{}
protected
:
...
...
src/archive/ArchiveList.cxx
View file @
9906daec
...
...
@@ -28,7 +28,7 @@
#include <string.h>
const
struct
archive_p
lugin
*
const
archive_plugins
[]
=
{
const
ArchiveP
lugin
*
const
archive_plugins
[]
=
{
#ifdef HAVE_BZ2
&
bz2_archive_plugin
,
#endif
...
...
@@ -48,7 +48,7 @@ static bool archive_plugins_enabled[ARRAY_SIZE(archive_plugins) - 1];
archive_plugins_for_each(plugin) \
if (archive_plugins_enabled[archive_plugin_iterator - archive_plugins])
const
struct
archive_p
lugin
*
const
ArchiveP
lugin
*
archive_plugin_from_suffix
(
const
char
*
suffix
)
{
if
(
suffix
==
nullptr
)
...
...
@@ -62,7 +62,7 @@ archive_plugin_from_suffix(const char *suffix)
return
nullptr
;
}
const
struct
archive_p
lugin
*
const
ArchiveP
lugin
*
archive_plugin_from_name
(
const
char
*
name
)
{
archive_plugins_for_each_enabled
(
plugin
)
...
...
@@ -75,7 +75,7 @@ archive_plugin_from_name(const char *name)
void
archive_plugin_init_all
(
void
)
{
for
(
unsigned
i
=
0
;
archive_plugins
[
i
]
!=
nullptr
;
++
i
)
{
const
struct
archive_p
lugin
*
plugin
=
archive_plugins
[
i
];
const
ArchiveP
lugin
*
plugin
=
archive_plugins
[
i
];
if
(
plugin
->
init
==
nullptr
||
archive_plugins
[
i
]
->
init
())
archive_plugins_enabled
[
i
]
=
true
;
}
...
...
src/archive/ArchiveList.hxx
View file @
9906daec
...
...
@@ -20,22 +20,22 @@
#ifndef MPD_ARCHIVE_LIST_HXX
#define MPD_ARCHIVE_LIST_HXX
struct
archive_p
lugin
;
struct
ArchiveP
lugin
;
extern
const
struct
archive_p
lugin
*
const
archive_plugins
[];
extern
const
ArchiveP
lugin
*
const
archive_plugins
[];
#define archive_plugins_for_each(plugin) \
for (const
struct archive_p
lugin *plugin, \
for (const
ArchiveP
lugin *plugin, \
*const*archive_plugin_iterator = &archive_plugins[0]; \
(plugin = *archive_plugin_iterator) != nullptr; \
++archive_plugin_iterator)
/* interface for using plugins */
const
struct
archive_p
lugin
*
const
ArchiveP
lugin
*
archive_plugin_from_suffix
(
const
char
*
suffix
);
const
struct
archive_p
lugin
*
const
ArchiveP
lugin
*
archive_plugin_from_name
(
const
char
*
name
);
/* this is where we "load" all the "plugins" ;-) */
...
...
src/archive/ArchivePlugin.cxx
View file @
9906daec
...
...
@@ -25,7 +25,7 @@
#include <assert.h>
ArchiveFile
*
archive_file_open
(
const
struct
archive_p
lugin
*
plugin
,
const
char
*
path
,
archive_file_open
(
const
ArchiveP
lugin
*
plugin
,
const
char
*
path
,
Error
&
error
)
{
assert
(
plugin
!=
nullptr
);
...
...
src/archive/ArchivePlugin.hxx
View file @
9906daec
...
...
@@ -23,7 +23,7 @@
class
ArchiveFile
;
class
Error
;
struct
archive_p
lugin
{
struct
ArchiveP
lugin
{
const
char
*
name
;
/**
...
...
@@ -54,7 +54,7 @@ struct archive_plugin {
};
ArchiveFile
*
archive_file_open
(
const
struct
archive_p
lugin
*
plugin
,
const
char
*
path
,
archive_file_open
(
const
ArchiveP
lugin
*
plugin
,
const
char
*
path
,
Error
&
error
);
#endif
src/archive/plugins/Bzip2ArchivePlugin.cxx
View file @
9906daec
...
...
@@ -282,7 +282,7 @@ const InputPlugin bz2_inputplugin = {
nullptr
,
};
const
struct
archive_p
lugin
bz2_archive_plugin
=
{
const
ArchiveP
lugin
bz2_archive_plugin
=
{
"bz2"
,
nullptr
,
nullptr
,
...
...
src/archive/plugins/Bzip2ArchivePlugin.hxx
View file @
9906daec
...
...
@@ -20,6 +20,8 @@
#ifndef MPD_ARCHIVE_BZ2_HXX
#define MPD_ARCHIVE_BZ2_HXX
extern
const
struct
archive_plugin
bz2_archive_plugin
;
struct
ArchivePlugin
;
extern
const
ArchivePlugin
bz2_archive_plugin
;
#endif
src/archive/plugins/Iso9660ArchivePlugin.cxx
View file @
9906daec
...
...
@@ -266,7 +266,7 @@ const InputPlugin iso9660_input_plugin = {
nullptr
,
};
const
struct
archive_p
lugin
iso9660_archive_plugin
=
{
const
ArchiveP
lugin
iso9660_archive_plugin
=
{
"iso"
,
nullptr
,
nullptr
,
...
...
src/archive/plugins/Iso9660ArchivePlugin.hxx
View file @
9906daec
...
...
@@ -20,6 +20,8 @@
#ifndef MPD_ARCHIVE_ISO9660_HXX
#define MPD_ARCHIVE_ISO9660_HXX
extern
const
struct
archive_plugin
iso9660_archive_plugin
;
struct
ArchivePlugin
;
extern
const
ArchivePlugin
iso9660_archive_plugin
;
#endif
src/archive/plugins/ZzipArchivePlugin.cxx
View file @
9906daec
...
...
@@ -214,7 +214,7 @@ const InputPlugin zzip_input_plugin = {
zzip_input_seek
,
};
const
struct
archive_p
lugin
zzip_archive_plugin
=
{
const
ArchiveP
lugin
zzip_archive_plugin
=
{
"zzip"
,
nullptr
,
nullptr
,
...
...
src/archive/plugins/ZzipArchivePlugin.hxx
View file @
9906daec
...
...
@@ -20,6 +20,8 @@
#ifndef MPD_ARCHIVE_ZZIP_HXX
#define MPD_ARCHIVE_ZZIP_HXX
extern
const
struct
archive_plugin
zzip_archive_plugin
;
struct
ArchivePlugin
;
extern
const
ArchivePlugin
zzip_archive_plugin
;
#endif
src/db/update/Archive.cxx
View file @
9906daec
...
...
@@ -105,7 +105,7 @@ class UpdateArchiveVisitor final : public ArchiveVisitor {
void
UpdateWalk
::
UpdateArchiveFile
(
Directory
&
parent
,
const
char
*
name
,
const
FileInfo
&
info
,
const
archive_p
lugin
&
plugin
)
const
ArchiveP
lugin
&
plugin
)
{
db_lock
();
Directory
*
directory
=
parent
.
FindChild
(
name
);
...
...
@@ -158,8 +158,7 @@ UpdateWalk::UpdateArchiveFile(Directory &directory,
const
char
*
name
,
const
char
*
suffix
,
const
FileInfo
&
info
)
{
const
struct
archive_plugin
*
plugin
=
archive_plugin_from_suffix
(
suffix
);
const
ArchivePlugin
*
plugin
=
archive_plugin_from_suffix
(
suffix
);
if
(
plugin
==
nullptr
)
return
false
;
...
...
src/db/update/Walk.hxx
View file @
9906daec
...
...
@@ -28,7 +28,7 @@
struct
stat
;
struct
FileInfo
;
struct
Directory
;
struct
archive_p
lugin
;
struct
ArchiveP
lugin
;
class
Storage
;
class
ExcludeList
;
...
...
@@ -93,7 +93,7 @@ private:
void
UpdateArchiveFile
(
Directory
&
directory
,
const
char
*
name
,
const
FileInfo
&
info
,
const
archive_p
lugin
&
plugin
);
const
ArchiveP
lugin
&
plugin
);
#else
...
...
src/input/plugins/ArchiveInputPlugin.cxx
View file @
9906daec
...
...
@@ -44,7 +44,7 @@ input_archive_open(const char *pathname,
Mutex
&
mutex
,
Cond
&
cond
,
Error
&
error
)
{
const
struct
archive_p
lugin
*
arplug
;
const
ArchiveP
lugin
*
arplug
;
InputStream
*
is
;
if
(
!
PathTraitsFS
::
IsAbsolute
(
pathname
))
...
...
test/visit_archive.cxx
View file @
9906daec
...
...
@@ -77,7 +77,7 @@ main(int argc, char **argv)
/* open the archive and dump it */
const
archive_p
lugin
*
plugin
=
archive_plugin_from_name
(
plugin_name
);
const
ArchiveP
lugin
*
plugin
=
archive_plugin_from_name
(
plugin_name
);
if
(
plugin
==
nullptr
)
{
fprintf
(
stderr
,
"No such plugin: %s
\n
"
,
plugin_name
);
return
EXIT_FAILURE
;
...
...
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