IdleFlags: add a "partition" event
This commit is contained in:
parent
1786f9b1bb
commit
3b84b99804
@ -375,6 +375,12 @@
|
|||||||
<option>crossfade</option>, replay gain
|
<option>crossfade</option>, replay gain
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
<returnvalue>partition</returnvalue>: a partition
|
||||||
|
was added, removed or changed
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
<returnvalue>sticker</returnvalue>: the sticker database
|
<returnvalue>sticker</returnvalue>: the sticker database
|
||||||
|
@ -42,6 +42,7 @@ static const char *const idle_names[] = {
|
|||||||
"message",
|
"message",
|
||||||
"neighbor",
|
"neighbor",
|
||||||
"mount",
|
"mount",
|
||||||
|
"partition",
|
||||||
nullptr
|
nullptr
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -67,6 +67,9 @@ static constexpr unsigned IDLE_NEIGHBOR = 0x800;
|
|||||||
/** the mount list has changed */
|
/** the mount list has changed */
|
||||||
static constexpr unsigned IDLE_MOUNT = 0x1000;
|
static constexpr unsigned IDLE_MOUNT = 0x1000;
|
||||||
|
|
||||||
|
/** the partition list has changed */
|
||||||
|
static constexpr unsigned IDLE_PARTITION = 0x2000;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get idle names
|
* Get idle names
|
||||||
*/
|
*/
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include "Request.hxx"
|
#include "Request.hxx"
|
||||||
#include "Instance.hxx"
|
#include "Instance.hxx"
|
||||||
#include "Partition.hxx"
|
#include "Partition.hxx"
|
||||||
|
#include "IdleFlags.hxx"
|
||||||
#include "client/Client.hxx"
|
#include "client/Client.hxx"
|
||||||
#include "client/Response.hxx"
|
#include "client/Response.hxx"
|
||||||
#include "player/Thread.hxx"
|
#include "player/Thread.hxx"
|
||||||
@ -102,5 +103,7 @@ handle_newpartition(Client &client, Request request, Response &response)
|
|||||||
StartPlayerThread(partition.pc);
|
StartPlayerThread(partition.pc);
|
||||||
partition.pc.LockUpdateAudio();
|
partition.pc.LockUpdateAudio();
|
||||||
|
|
||||||
|
instance.EmitIdle(IDLE_PARTITION);
|
||||||
|
|
||||||
return CommandResult::OK;
|
return CommandResult::OK;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user