Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(568)

Unified Diff: src/ibusconfig.c

Issue 2860022: Add api to ibus for retreiving unused config values. (Closed) Base URL: ssh://gitrw.chromium.org/ibus.git
Patch Set: Code review changes Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ibusconfig.h ('k') | src/ibusconfigservice.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ibusconfig.c
diff --git a/src/ibusconfig.c b/src/ibusconfig.c
index 287e218ddf81e42f45bc12d23053662eb7c5dfb3..69dbbc22a6d09702d1a9b259d1bec254d5c64cbf 100644
--- a/src/ibusconfig.c
+++ b/src/ibusconfig.c
@@ -301,3 +301,48 @@ ibus_config_unset (IBusConfig *config,
g_assert (retval);
return TRUE;
}
+
+gboolean
+ibus_config_get_unused (IBusConfig *config,
+ GValue *unread,
+ GValue *unwritten)
+{
+ g_assert (IBUS_IS_CONFIG (config));
+ g_assert (unread != NULL);
+ g_assert (unwritten != NULL);
+
+ IBusMessage *reply;
+ IBusError *error;
+ gboolean retval;
+
+ reply = ibus_proxy_call_with_reply_and_block ((IBusProxy *) config,
+ "GetUnused",
+ -1,
+ &error,
+ G_TYPE_INVALID);
+ if (reply == NULL) {
+ g_warning ("%s: %s", error->name, error->message);
+ ibus_error_free (error);
+ return FALSE;
+ }
+
+ if ((error = ibus_error_new_from_message (reply)) != NULL) {
+ g_warning ("%s: %s", error->name, error->message);
+ ibus_error_free (error);
+ ibus_message_unref (reply);
+ return FALSE;
+ }
+
+ retval = ibus_message_get_args (reply,
+ &error,
+ G_TYPE_VALUE, unread,
+ G_TYPE_VALUE, unwritten,
+ G_TYPE_INVALID);
+ ibus_message_unref (reply);
+ if (!retval) {
+ g_warning ("%s: %s", error->name, error->message);
+ return FALSE;
+ }
+
+ return TRUE;
+}
« no previous file with comments | « src/ibusconfig.h ('k') | src/ibusconfigservice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698