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:
Norman Feske 2012-01-25 23:04:50 +01:00
parent 210eb98598
commit d880386091
17 changed files with 19 additions and 19 deletions

View File

@ -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);

View File

@ -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();
}

View File

@ -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); }

View File

@ -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

View File

@ -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()
{

View File

@ -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() {

View File

@ -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

View File

@ -47,7 +47,7 @@ namespace Framebuffer {
void release() { }
Mode mode()
Mode mode() const
{
if (scr_mode != 16)
return Mode(); /* invalid mode */

View File

@ -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) { }

View File

@ -63,7 +63,7 @@ namespace Framebuffer {
void release() { }
Mode mode() { return _mode; }
Mode mode() const { return _mode; }
void mode_sigh(Genode::Signal_context_capability) { }

View File

@ -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);

View File

@ -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()
{

View File

@ -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()
{

View File

@ -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()

View File

@ -51,7 +51,7 @@ namespace Input {
*****************************/
Genode::Dataspace_capability dataspace();
bool is_pending();
bool is_pending() const;
int flush();
};
}

View File

@ -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()
{

View File

@ -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());