Commit Graph

46 Commits

Author SHA1 Message Date
cb463336bc Rework automatic code generation 2020-05-17 23:23:45 +01:00
1e481d4c9a Wire up the additional channel interfaces a bit 2020-05-17 22:49:41 +01:00
e5e06c55f9 Reorder Channel::new args 2020-05-17 22:37:25 +01:00
576fec63cd Complete channel-closing behaviour
We now emit appropriate signals and return a non-error status code when
a channel is closed.
2020-05-17 22:23:57 +01:00
782662b82f Flesh out channels some more. They can now be closed.
As part of this, move Connection's queue to mpsc and have all channels
for a connection share that connection's main loop.
2020-05-17 22:05:24 +01:00
1eefce4f1c Create a channel on incoming messages
We don't yet emit signals, but we're getting closer.

This commit also partially implements the deprecated ListChannels
method on the Connection interface.
2020-05-17 15:20:16 +01:00
b814a9aab0 Partially on the way to receiving an incoming message
This is getting really ugly, but let's run with it for now.
2020-05-17 03:01:21 +01:00
49362a6606 Ignore lints in autogenerated code 2020-05-17 00:55:29 +01:00
7003b56ce6 A bit more progress on channels 2020-05-17 00:49:46 +01:00
09afdf51a4 Add DBUS stubs for a basic Channel type 2020-05-16 23:05:14 +01:00
a202dd84e8 Clean up dbus::arg::Variant type alias 2020-05-16 22:11:38 +01:00
0f9dcf476b Sync the .manager file 2020-05-16 21:33:58 +01:00
54a73c8219 Advertise the protocol interfaces correctly 2020-05-16 21:25:40 +01:00
011ee98340 Implement the Presence interface for the protocol 2020-05-16 21:22:49 +01:00
4a501b2e07 Backfill the Protocol interface 2020-05-16 21:05:58 +01:00
9473a13b65 Finish implementing the Contacts interface 2020-05-16 20:54:05 +01:00
9564a16aa2 Fix compilation 2020-05-16 20:44:34 +01:00
52f13a3589 Disable the ContactList interface for now 2020-05-16 20:19:04 +01:00
64bbaccc3a Move name escaping into its own module 2020-05-16 20:16:23 +01:00
53bce50978 Extract tree building from Connection#run 2020-05-16 19:42:41 +01:00
411f34e6ce Make disconnection clean up completely
Now we can disconnect and reconnect the same account multiple times.
2020-05-16 19:26:52 +01:00
169249b716 Don't build a new connection if it already exists
There was also a lot of unneeded overhead in Connection::new() to get
the path to compare against, so split that out into a settings struct
2020-05-16 18:44:02 +01:00
e08ec6b476 Replace a sleep() with an MPSC channel 2020-05-16 18:09:40 +01:00
640948241a Address a number of clippy complaints 2020-05-16 14:51:41 +01:00
33d522779a Split padfoot/connection.rs into multiple files 2020-05-16 14:23:20 +01:00
c0e62ba6de Update README.md 2020-05-15 00:54:05 +01:00
41309d9f39 Look online to Empathy
It seems Empathy requires the ContactLists and Presence interfaces if
it is to use your connection and show it as online. In addition, we
were emitting the "connected" signal from the wrong source - it needed
to have the object path of the specific connection, rather than the
general connection object path.

So now we can show as connected in Empathy, but we can't add a contact
yet - presumably that's another interface.

Sending a message to a connected deltachat account does nothing yet, as
the message from deltachat-core is unhandled.
2020-05-15 00:42:15 +01:00
5eea970cf7 Implement some contact and request interfaces
Empathy still isn't happy, but it's going to take some debugging to
work out why. I suspect it requires one of the "optional" interfaces
in practice... but which one?
2020-05-13 01:46:35 +01:00
b6fbcfeeb8 Track connection state and implement more properties
Empathy still doesn't show us as connected. I think we need to add the
Requests and Contacts interfaces (which we're advertising as a minimal
requirement, but not implementing) before it will.
2020-05-12 23:52:52 +01:00
ef43c81955 Don't start delta until the connect signal is received
We also introduce a sleep() to "fix" a race condition where empathy
tries to contact the connection bus name before the thread has gotten
around to starting it. That really needs fixing better, but for now
I'm focused on basic functionality.
2020-05-12 22:28:36 +01:00
ef1342f372 Move account name escaping code to the end 2020-05-12 22:12:08 +01:00
2a565b3ee7 Deltachat connects on connection startup 2020-05-12 01:25:48 +01:00
9151f64a6d Use AsRefClosure when generating the bindings
This simplifies things significantly \o/
2020-05-11 00:48:18 +01:00
ad0d95ab40 Add some debugging output to connection 2020-05-10 23:25:41 +01:00
baafd12354 Initial connection interface stubs, emit NewConnection signal 2020-05-10 23:09:58 +01:00
6d79491e32 Rework to get a map of connections in ConnectionManager 2020-05-10 19:04:14 +01:00
04bf72637d Enable LTO for release 2020-05-10 01:34:28 +01:00
1212ff20e4 Why why why 2020-05-10 01:03:36 +01:00
6e3ad7383f Add deltachat-core-rust to the build 2020-05-10 01:01:28 +01:00
ffb190385e Make the protocol advertise a requestable channel
Without this, telepathy-glib/empathy doesn't believe the protocol is
bonafide (i.e., implementing TP_PROTOCOL_FEATURE_CORE). Adding a dummy
gets empathy to display the protocol without needing to be patched \o/.
2020-05-10 00:33:15 +01:00
c643c42fa5 Initial protocol implementation
Empathy needs this patch before it will display the settings:
https://gitlab.gnome.org/GNOME/telepathy-account-widgets/-/merge_requests/1
2020-05-09 21:45:29 +01:00
c861f6fdd9 Displays the protocol in empathy 2020-05-09 11:48:13 +01:00
40ea57a0cc Return protocol parameters 2020-05-09 11:19:40 +01:00
5328ae9bd6 Initial checkin 2020-05-09 01:48:14 +01:00
b93ba79323 Use telepathy-spec v0.27.4 2020-05-08 19:22:47 +01:00
1187b89058 Add telepathy-spec submodule 2020-05-08 17:22:53 +01:00