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
ac126ede
Commit
ac126ede
authored
Jan 18, 2020
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
client/Client: emit idle flags in SetPartition()
parent
7732db0a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
5 deletions
+21
-5
Client.cxx
src/client/Client.cxx
+20
-0
Client.hxx
src/client/Client.hxx
+1
-5
No files found.
src/client/Client.cxx
View file @
ac126ede
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
#include "Partition.hxx"
#include "Partition.hxx"
#include "Instance.hxx"
#include "Instance.hxx"
#include "BackgroundCommand.hxx"
#include "BackgroundCommand.hxx"
#include "IdleFlags.hxx"
#include "config.h"
#include "config.h"
Client
::~
Client
()
noexcept
Client
::~
Client
()
noexcept
...
@@ -61,6 +62,25 @@ Client::OnBackgroundCommandFinished() noexcept
...
@@ -61,6 +62,25 @@ Client::OnBackgroundCommandFinished() noexcept
timeout_event
.
Schedule
(
client_timeout
);
timeout_event
.
Schedule
(
client_timeout
);
}
}
void
Client
::
SetPartition
(
Partition
&
new_partition
)
noexcept
{
if
(
partition
==
&
new_partition
)
return
;
partition
=
&
new_partition
;
/* set idle flags for those subsystems which are specific to
the current partition to force the client to reload its
state */
idle_flags
|=
IDLE_PLAYLIST
|
IDLE_PLAYER
|
IDLE_MIXER
|
IDLE_OUTPUT
|
IDLE_OPTIONS
;
/* note: we're not using IdleAdd() here because we don't need
to notify the client; the method is only used while this
client's "partition" command is handled, which means the
client is currently active and doesn't need to be woken
up */
}
Instance
&
Instance
&
Client
::
GetInstance
()
noexcept
Client
::
GetInstance
()
noexcept
{
{
...
...
src/client/Client.hxx
View file @
ac126ede
...
@@ -234,11 +234,7 @@ public:
...
@@ -234,11 +234,7 @@ public:
return
*
partition
;
return
*
partition
;
}
}
void
SetPartition
(
Partition
&
new_partition
)
noexcept
{
void
SetPartition
(
Partition
&
new_partition
)
noexcept
;
partition
=
&
new_partition
;
// TODO: set various idle flags?
}
gcc_pure
gcc_pure
Instance
&
GetInstance
()
noexcept
;
Instance
&
GetInstance
()
noexcept
;
...
...
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