mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-18 21:27:56 +00:00
Qualifying RPC functions as const
This patch makes use of the recently added support for const RPC functions by turning 'Framebuffer::Session::mode()' and 'Input::Session::is_pending()' into const functions.
This commit is contained in:
parent
210eb98598
commit
d880386091
@ -201,7 +201,7 @@ namespace Framebuffer
|
||||
|
||||
void release() { }
|
||||
|
||||
Mode mode()
|
||||
Mode mode() const
|
||||
{
|
||||
return Mode(_window_content->fb_w(), _window_content->fb_h(),
|
||||
Mode::RGB565);
|
||||
|
@ -98,7 +98,7 @@ namespace Input {
|
||||
/**
|
||||
* Return true if input is pending
|
||||
*/
|
||||
bool input_pending() { return connected() && _client.is_pending(); }
|
||||
bool input_pending() const { return connected() && _client.is_pending(); }
|
||||
|
||||
/**
|
||||
* Return event buffer
|
||||
@ -215,7 +215,7 @@ namespace Input {
|
||||
|
||||
Genode::Dataspace_capability dataspace() { return _ev_ds.cap(); }
|
||||
|
||||
bool is_pending()
|
||||
bool is_pending() const
|
||||
{
|
||||
return _source_registry.any_source_has_pending_input();
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ namespace Framebuffer {
|
||||
|
||||
void release() { call<Rpc_release>(); }
|
||||
|
||||
Mode mode() { return call<Rpc_mode>(); }
|
||||
Mode mode() const { return call<Rpc_mode>(); }
|
||||
|
||||
void mode_sigh(Genode::Signal_context_capability sigh) {
|
||||
call<Rpc_mode_sigh>(sigh); }
|
||||
|
@ -86,7 +86,7 @@ namespace Framebuffer {
|
||||
/**
|
||||
* Request current display-mode properties
|
||||
*/
|
||||
virtual Mode mode() = 0;
|
||||
virtual Mode mode() const = 0;
|
||||
|
||||
/**
|
||||
* Register signal handler to be notified on mode changes
|
||||
|
@ -76,7 +76,7 @@ namespace Input {
|
||||
|
||||
Genode::Dataspace_capability dataspace() { return _ev_ds.cap(); }
|
||||
|
||||
bool is_pending() { return event_pending(); }
|
||||
bool is_pending() const { return event_pending(); }
|
||||
|
||||
int flush()
|
||||
{
|
||||
|
@ -27,7 +27,7 @@ namespace Input {
|
||||
Genode::Dataspace_capability dataspace() {
|
||||
return call<Rpc_dataspace>(); }
|
||||
|
||||
bool is_pending() {
|
||||
bool is_pending() const {
|
||||
return call<Rpc_is_pending>(); }
|
||||
|
||||
int flush() {
|
||||
|
@ -36,7 +36,7 @@ namespace Input {
|
||||
*
|
||||
* \return true if new events are available
|
||||
*/
|
||||
virtual bool is_pending() = 0;
|
||||
virtual bool is_pending() const = 0;
|
||||
|
||||
/**
|
||||
* Flush pending events to event buffer
|
||||
|
@ -47,7 +47,7 @@ namespace Framebuffer {
|
||||
|
||||
void release() { }
|
||||
|
||||
Mode mode()
|
||||
Mode mode() const
|
||||
{
|
||||
if (scr_mode != 16)
|
||||
return Mode(); /* invalid mode */
|
||||
|
@ -167,7 +167,7 @@ namespace Framebuffer
|
||||
|
||||
void release() { }
|
||||
|
||||
Mode mode() { return Mode(SCR_WIDTH, SCR_HEIGHT, Mode::RGB565); }
|
||||
Mode mode() const { return Mode(SCR_WIDTH, SCR_HEIGHT, Mode::RGB565); }
|
||||
|
||||
void mode_sigh(Genode::Signal_context_capability) { }
|
||||
|
||||
|
@ -63,7 +63,7 @@ namespace Framebuffer {
|
||||
|
||||
void release() { }
|
||||
|
||||
Mode mode() { return _mode; }
|
||||
Mode mode() const { return _mode; }
|
||||
|
||||
void mode_sigh(Genode::Signal_context_capability) { }
|
||||
|
||||
|
@ -152,7 +152,7 @@ namespace Framebuffer {
|
||||
|
||||
void release() { }
|
||||
|
||||
Mode mode()
|
||||
Mode mode() const
|
||||
{
|
||||
return Mode(_scr_width, _scr_height,
|
||||
_scr_mode == 16 ? Mode::RGB565 : Mode::INVALID);
|
||||
|
@ -43,7 +43,7 @@ namespace Input {
|
||||
|
||||
Dataspace_capability dataspace() { return ev_ds_cap; }
|
||||
|
||||
bool is_pending() { return 0; }
|
||||
bool is_pending() const { return 0; }
|
||||
|
||||
int flush()
|
||||
{
|
||||
|
@ -47,7 +47,7 @@ namespace Input {
|
||||
|
||||
Dataspace_capability dataspace() { return ev_ds_cap; }
|
||||
|
||||
bool is_pending() { return Input_drv::event_pending(); }
|
||||
bool is_pending() const { return Input_drv::event_pending(); }
|
||||
|
||||
int flush()
|
||||
{
|
||||
|
@ -49,7 +49,7 @@ Genode::Dataspace_capability Session_component::dataspace()
|
||||
}
|
||||
|
||||
|
||||
bool Session_component::is_pending(){ return _isc->is_pending(); }
|
||||
bool Session_component::is_pending() const { return _isc->is_pending(); }
|
||||
|
||||
|
||||
int Session_component::flush()
|
||||
|
@ -51,7 +51,7 @@ namespace Input {
|
||||
*****************************/
|
||||
|
||||
Genode::Dataspace_capability dataspace();
|
||||
bool is_pending();
|
||||
bool is_pending() const;
|
||||
int flush();
|
||||
};
|
||||
}
|
||||
|
@ -117,7 +117,7 @@ namespace Input {
|
||||
|
||||
Genode::Dataspace_capability dataspace() { return _to_input_ds; }
|
||||
|
||||
bool is_pending() { return _from_input->is_pending(); }
|
||||
bool is_pending() const { return _from_input->is_pending(); }
|
||||
|
||||
int flush()
|
||||
{
|
||||
|
@ -291,7 +291,7 @@ namespace Input {
|
||||
|
||||
Genode::Dataspace_capability dataspace() { return _ev_ram_ds.cap(); }
|
||||
|
||||
bool is_pending() { return _num_ev > 0; }
|
||||
bool is_pending() const { return _num_ev > 0; }
|
||||
|
||||
int flush()
|
||||
{
|
||||
@ -343,7 +343,7 @@ namespace Framebuffer {
|
||||
|
||||
void release() { }
|
||||
|
||||
Mode mode()
|
||||
Mode mode() const
|
||||
{
|
||||
return Mode(_buffer->size().w(), _buffer->size().h(),
|
||||
_buffer->format());
|
||||
|
Loading…
Reference in New Issue
Block a user