diff --git a/include/mce_display.h b/include/mce_display.h index 4733c95..240fdf7 100644 --- a/include/mce_display.h +++ b/include/mce_display.h @@ -90,6 +90,12 @@ mce_display_remove_handler( MceDisplay* display, gulong id); +void +mce_display_remove_handlers( + MceDisplay* display, + gulong *ids, + guint count); + G_END_DECLS #endif /* MCE_DISPLAY_H */ diff --git a/src/mce_display.c b/src/mce_display.c index fc8b062..0167058 100644 --- a/src/mce_display.c +++ b/src/mce_display.c @@ -38,8 +38,10 @@ #include "mce_proxy.h" #include "mce_log_p.h" -#include "mce/dbus-names.h" -#include "mce/mode-names.h" +#include +#include + +#include /* Generated headers */ #include "com.nokia.mce.request.h" @@ -117,6 +119,12 @@ mce_display_status_query_done( mce_display_status_update(self, status); g_free(status); } else { + /* + * We could retry but it's probably not worth the trouble + * because the next time display state changes we receive + * display_status_ind signal and sync our state with mce. + * Until then, this object stays invalid. + */ GWARN("Failed to query display state %s", GERRMSG(error)); g_error_free(error); } @@ -154,7 +162,6 @@ mce_display_valid_changed( } } - static void mce_display_status_ind( @@ -236,6 +243,15 @@ mce_display_remove_handler( } } +void +mce_display_remove_handlers( + MceDisplay* self, + gulong *ids, + guint count) +{ + gutil_disconnect_handlers(self, ids, count); +} + /*==========================================================================* * Internals *==========================================================================*/