Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
b8ccb9cd
Commit
b8ccb9cd
authored
Nov 18, 2006
by
Rafaël Carré
Browse files
Add Next, Prev, and Stop methods
parent
dcd116ad
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/control/dbus.c
View file @
b8ccb9cd
...
...
@@ -109,6 +109,32 @@ DBUS_METHOD( Quit )
REPLY_SEND
;
}
DBUS_METHOD
(
Next
)
{
/* next playlist item */
REPLY_INIT
;
playlist_t
*
p_playlist
=
pl_Yield
(
((
vlc_object_t
*
)
p_this
)
);
playlist_Next
(
p_playlist
);
pl_Release
(
((
vlc_object_t
*
)
p_this
)
);
REPLY_SEND
;
}
DBUS_METHOD
(
Prev
)
{
/* previous playlist item */
REPLY_INIT
;
playlist_t
*
p_playlist
=
pl_Yield
(
((
vlc_object_t
*
)
p_this
)
);
playlist_Prev
(
p_playlist
);
pl_Release
(
((
vlc_object_t
*
)
p_this
)
);
REPLY_SEND
;
}
DBUS_METHOD
(
Stop
)
{
/* stop playing */
REPLY_INIT
;
playlist_t
*
p_playlist
=
pl_Yield
(
((
vlc_object_t
*
)
p_this
)
);
playlist_Stop
(
p_playlist
);
pl_Release
(
((
vlc_object_t
*
)
p_this
)
);
REPLY_SEND
;
}
DBUS_METHOD
(
GetPlayStatus
)
{
/* return a string */
REPLY_INIT
;
...
...
@@ -249,7 +275,10 @@ DBUS_METHOD( handle_messages )
METHOD_FUNC
(
"AddMRL"
,
AddMRL
);
METHOD_FUNC
(
"TogglePause"
,
TogglePause
);
METHOD_FUNC
(
"Nothing"
,
Nothing
);
METHOD_FUNC
(
"Prev"
,
Prev
);
METHOD_FUNC
(
"Next"
,
Next
);
METHOD_FUNC
(
"Quit"
,
Quit
);
METHOD_FUNC
(
"Stop"
,
Stop
);
return
DBUS_HANDLER_RESULT_NOT_YET_HANDLED
;
}
...
...
modules/control/dbus.h
View file @
b8ccb9cd
...
...
@@ -100,6 +100,12 @@ const char* psz_introspection_xml_data =
" </method>
\n
"
" <method name=
\"
Quit
\"
>
\n
"
" </method>
\n
"
" <method name=
\"
Prev
\"
>
\n
"
" </method>
\n
"
" <method name=
\"
Next
\"
>
\n
"
" </method>
\n
"
" <method name=
\"
Stop
\"
>
\n
"
" </method>
\n
"
" </interface>
\n
"
"</node>
\n
"
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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