Skip to content

Commit

Permalink
Implements a SetLocaliseQueriesOption D-Bus method.
Browse files Browse the repository at this point in the history
For setting the state of the -y/--localise-queries option.
  • Loading branch information
Daniel Collins authored and simonkelley committed Jan 6, 2022
1 parent 553c4c9 commit 80a6c16
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dbus/DBus-interface
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ SetBogusPrivOption
------------------
Takes boolean, sets or resets the --bogus-priv option.

SetLocaliseQueriesOption
------------------------
Takes boolean, sets or resets the --localise-queries option.

SetServers
----------
Returns nothing. Takes a set of arguments representing the new
Expand Down
7 changes: 7 additions & 0 deletions src/dbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ const char* introspection_xml_template =
" <method name=\"SetFilterWin2KOption\">\n"
" <arg name=\"filterwin2k\" direction=\"in\" type=\"b\"/>\n"
" </method>\n"
" <method name=\"SetLocaliseQueriesOption\">\n"
" <arg name=\"localise-queries\" direction=\"in\" type=\"b\"/>\n"
" </method>\n"
" <method name=\"SetBogusPrivOption\">\n"
" <arg name=\"boguspriv\" direction=\"in\" type=\"b\"/>\n"
" </method>\n"
Expand Down Expand Up @@ -694,6 +697,10 @@ DBusHandlerResult message_handler(DBusConnection *connection,
{
reply = dbus_set_bool(message, OPT_FILTER, "filterwin2k");
}
else if (strcmp(method, "SetLocaliseQueriesOption") == 0)
{
reply = dbus_set_bool(message, OPT_LOCALISE, "localise-queries");
}
else if (strcmp(method, "SetBogusPrivOption") == 0)
{
reply = dbus_set_bool(message, OPT_BOGUSPRIV, "bogus-priv");
Expand Down

0 comments on commit 80a6c16

Please sign in to comment.