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
a9714e73
Commit
a9714e73
authored
Nov 10, 2020
by
Max Kellermann
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'bind' of
git://github.com/neheb/MPD
into master
parents
a99bc91e
071d3c71
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
20 deletions
+17
-20
UDisks2.cxx
src/lib/dbus/UDisks2.cxx
+9
-8
UdisksNeighborPlugin.cxx
src/neighbor/plugins/UdisksNeighborPlugin.cxx
+5
-6
UdisksStorage.cxx
src/storage/plugins/UdisksStorage.cxx
+3
-6
No files found.
src/lib/dbus/UDisks2.cxx
View file @
a9714e73
...
...
@@ -120,19 +120,20 @@ static void
ParseInterface
(
Object
&
o
,
const
char
*
interface
,
ODBus
::
ReadMessageIter
&&
i
)
noexcept
{
using
namespace
std
::
placeholders
;
if
(
StringIsEqual
(
interface
,
"org.freedesktop.UDisks2.Drive"
))
{
i
.
ForEachProperty
(
std
::
bind
(
ParseDriveDictEntry
,
std
::
ref
(
o
),
_1
,
_2
));
i
.
ForEachProperty
([
&
](
auto
n
,
auto
v
)
{
return
ParseDriveDictEntry
(
o
,
n
,
std
::
move
(
v
));
});
}
else
if
(
StringIsEqual
(
interface
,
"org.freedesktop.UDisks2.Block"
))
{
i
.
ForEachProperty
(
std
::
bind
(
ParseBlockDictEntry
,
std
::
ref
(
o
),
_1
,
_2
));
i
.
ForEachProperty
([
&
](
auto
n
,
auto
v
)
{
return
ParseBlockDictEntry
(
o
,
n
,
std
::
move
(
v
));
});
}
else
if
(
StringIsEqual
(
interface
,
"org.freedesktop.UDisks2.Filesystem"
))
{
o
.
is_filesystem
=
true
;
i
.
ForEachProperty
(
std
::
bind
(
ParseFileesystemDictEntry
,
std
::
ref
(
o
),
_1
,
_2
));
i
.
ForEachProperty
(
[
&
](
auto
n
,
auto
v
)
{
return
ParseFileesystemDictEntry
(
o
,
n
,
std
::
move
(
v
));
});
}
}
...
...
src/neighbor/plugins/UdisksNeighborPlugin.cxx
View file @
a9714e73
...
...
@@ -128,9 +128,9 @@ UdisksNeighborExplorer::DoOpen()
UDISKS2_PATH
,
DBUS_OM_INTERFACE
,
"GetManagedObjects"
);
list_request
.
Send
(
connection
,
*
msg
.
Get
(),
std
::
bind
(
&
UdisksNeighborExplorer
::
OnListNotify
,
this
,
std
::
placeholders
::
_1
)
);
list_request
.
Send
(
connection
,
*
msg
.
Get
(),
[
this
](
auto
o
)
{
return
OnListNotify
(
std
::
move
(
o
));
}
);
}
catch
(...)
{
dbus_connection_remove_filter
(
connection
,
HandleMessage
,
...
...
@@ -229,9 +229,8 @@ inline void
UdisksNeighborExplorer
::
OnListNotify
(
ODBus
::
Message
reply
)
noexcept
{
try
{
ParseObjects
(
reply
,
std
::
bind
(
&
UdisksNeighborExplorer
::
Insert
,
this
,
std
::
placeholders
::
_1
));
UDisks2
::
ParseObjects
(
reply
,
[
this
](
auto
p
)
{
return
Insert
(
std
::
move
(
p
));
});
}
catch
(...)
{
LogError
(
std
::
current_exception
(),
"Failed to parse GetManagedObjects reply"
);
...
...
src/storage/plugins/UdisksStorage.cxx
View file @
a9714e73
...
...
@@ -227,8 +227,7 @@ try {
DBUS_OM_INTERFACE
,
"GetManagedObjects"
);
list_request
.
Send
(
connection
,
*
msg
.
Get
(),
std
::
bind
(
&
UdisksStorage
::
OnListReply
,
this
,
std
::
placeholders
::
_1
));
[
this
](
auto
o
)
{
return
OnListReply
(
std
::
move
(
o
));
});
return
;
}
...
...
@@ -239,8 +238,7 @@ try {
AppendMessageIter
(
*
msg
.
Get
()).
AppendEmptyArray
<
DictEntryTypeTraits
<
StringTypeTraits
,
VariantTypeTraits
>>
();
mount_request
.
Send
(
connection
,
*
msg
.
Get
(),
std
::
bind
(
&
UdisksStorage
::
OnMountNotify
,
this
,
std
::
placeholders
::
_1
));
[
this
](
auto
o
)
{
return
OnMountNotify
(
std
::
move
(
o
));
});
}
catch
(...)
{
const
std
::
lock_guard
<
Mutex
>
lock
(
mutex
);
mount_error
=
std
::
current_exception
();
...
...
@@ -297,8 +295,7 @@ try {
AppendMessageIter
(
*
msg
.
Get
()).
AppendEmptyArray
<
DictEntryTypeTraits
<
StringTypeTraits
,
VariantTypeTraits
>>
();
mount_request
.
Send
(
connection
,
*
msg
.
Get
(),
std
::
bind
(
&
UdisksStorage
::
OnUnmountNotify
,
this
,
std
::
placeholders
::
_1
));
[
this
](
auto
u
)
{
return
OnUnmountNotify
(
std
::
move
(
u
));
});
}
catch
(...)
{
const
std
::
lock_guard
<
Mutex
>
lock
(
mutex
);
mount_error
=
std
::
current_exception
();
...
...
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