Partition: add method EmitIdle()

Prepare for moving idle events to class Partition.  Right now, it's
just a wrapper for idle_add().
This commit is contained in:
Max Kellermann
2016-03-05 19:16:39 +01:00
parent e52ac0b187
commit b24a5e0662
7 changed files with 21 additions and 13 deletions

View File

@@ -230,7 +230,7 @@ handle_mount(Client &client, Request args, Response &r)
}
composite.Mount(local_uri, storage);
idle_add(IDLE_MOUNT);
client.partition.EmitIdle(IDLE_MOUNT);
#ifdef ENABLE_DATABASE
Database *_db = client.partition.instance.database;
@@ -249,7 +249,7 @@ handle_mount(Client &client, Request args, Response &r)
// TODO: call Instance::OnDatabaseModified()?
// TODO: trigger database update?
idle_add(IDLE_DATABASE);
client.partition.EmitIdle(IDLE_DATABASE);
}
#endif
@@ -287,7 +287,7 @@ handle_unmount(Client &client, Request args, Response &r)
if (db.Unmount(local_uri))
// TODO: call Instance::OnDatabaseModified()?
idle_add(IDLE_DATABASE);
client.partition.EmitIdle(IDLE_DATABASE);
}
#endif
@@ -296,7 +296,7 @@ handle_unmount(Client &client, Request args, Response &r)
return CommandResult::ERROR;
}
idle_add(IDLE_MOUNT);
client.partition.EmitIdle(IDLE_MOUNT);
return CommandResult::OK;
}