Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow clients and servers to operate without names #363

Closed
wants to merge 4 commits into from

Conversation

robert-ancell
Copy link
Contributor

Allow clients and servers to operate without names, for example if using D-Bus

for a simple client-server relationship and not in the more common client-client.

This only supports method calls from the client to the server at present.

…ing D-Bus

for a simple client-server relationship and not in the more common
client-client.

This only supports method calls from the client to the server at present.
Copy link

@sergio-costas sergio-costas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I'll try to test this with my code.

Copy link

@sergio-costas sergio-costas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It begins to work, but still triggers a new exception:

flutter: ERROR ubuntu_init: Unhandled exception
	DBusUnknownMethodException: org.freedesktop.DBus.Error.UnknownMethod: No such method “GetNameOwner”
#0      DBusClient._callMethod (package:dbus/src/dbus_client.dart:1121)
<asynchronous suspension>
#1      DBusClient.callMethod (package:dbus/src/dbus_client.dart:617)
<asynchronous suspension>
#2      DBusClient.getNameOwner (package:dbus/src/dbus_client.dart:457)
<asynchronous suspension>
#3      DBusClient._findUniqueName (package:dbus/src/dbus_client.dart:633)

@sergio-costas
Copy link

The problem seems to be when creating a DBusRemoteObjectSignal object, to receive signals.

@robert-ancell
Copy link
Contributor Author

I think this branch should be able to receive signals now, though I haven't tested it. I'm landing some structural changes on main then I'll being these over after.

@robert-ancell
Copy link
Contributor Author

In fact, I think this should now work from main, I haven't got a test for the method calls there because I'm not sure the best way to expose them server side, but the code should support both methods and signals.

@CarlosNihelton
Copy link

It would be good to have a test case matching what @sergio-costas is doing.

@sergio-costas
Copy link

@robert-ancell I'll test this right now. Thanks!

@sergio-costas
Copy link

sergio-costas commented Sep 22, 2023

This code works great, it talks flawlessly with GDM, and opens the new session perfectly. Thanks!!!!

Copy link

@sergio-costas sergio-costas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

@CarlosNihelton CarlosNihelton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍🏽

@robert-ancell
Copy link
Contributor Author

Is everything you need working on main? This PR is too difficult to merge back, I'll look at adding any missing features in a separate PR.

@sergio-costas
Copy link

@robert-ancell Yes, everything works like a charm.

@sergio-costas
Copy link

@robert-ancell Agh, sorry! I didn't read the "in main" part, and I presumed that you was asking if this patch had everything that I needed.. I'll check if it does work.

@sergio-costas
Copy link

Ok, I tested it with the code from the main branch of https://github.com/canonical/dbus.dart.git, and it works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants