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
9033f077
Commit
9033f077
authored
Aug 18, 2017
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test/{DumpDatabase,run_neighbor_explorer}: add class GlobalInit
parent
b7d0890b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
7 deletions
+28
-7
DumpDatabase.cxx
test/DumpDatabase.cxx
+12
-2
run_neighbor_explorer.cxx
test/run_neighbor_explorer.cxx
+16
-5
No files found.
test/DumpDatabase.cxx
View file @
9033f077
...
...
@@ -43,6 +43,17 @@ using std::endl;
#include <stdlib.h>
class
GlobalInit
{
public
:
GlobalInit
()
{
config_global_init
();
}
~
GlobalInit
()
{
config_global_finish
();
}
};
#ifdef ENABLE_UPNP
#include "input/InputStream.hxx"
size_t
...
...
@@ -104,8 +115,7 @@ try {
/* initialize MPD */
config_global_init
();
AtScopeExit
()
{
config_global_finish
();
};
GlobalInit
init
;
ReadConfigFile
(
config_path
);
...
...
test/run_neighbor_explorer.cxx
View file @
9033f077
...
...
@@ -29,6 +29,17 @@
#include <stdio.h>
#include <stdlib.h>
class
GlobalInit
{
public
:
GlobalInit
()
{
config_global_init
();
}
~
GlobalInit
()
{
config_global_finish
();
}
};
class
MyNeighborListener
final
:
public
NeighborListener
{
public
:
/* virtual methods from class NeighborListener */
...
...
@@ -53,15 +64,15 @@ try {
const
Path
config_path
=
Path
::
FromFS
(
argv
[
1
]);
/* read configuration file (mpd.conf) */
config_global_init
();
ReadConfigFile
(
config_path
);
/* initialize the core */
GlobalInit
init
;
EventLoop
loop
;
/* read configuration file (mpd.conf) */
ReadConfigFile
(
config_path
);
/* initialize neighbor plugins */
MyNeighborListener
listener
;
...
...
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