Commit Graph

20 Commits (c39fa6543fe1310a007962876f472fe1994c05ae)

Author SHA1 Message Date
Cédric Barreteau b6f2c43330 Rename `EventEmitter` to `EventHandler` 2021-02-13 11:01:31 +01:00
Cédric Barreteau e3e48148f0 Rename `add_event_emitter` to `set_event_emitter`
Closes #145.
2021-02-13 10:43:42 +01:00
Damir Jelić 9cd217fc5d matrix-sdk: Remove the proxy usage from the exmaples for now
While it's generally useful to watch what the sdk is sending
out during development using mitmproxy, users of the sdk might
wonder why the example doesn't connect.

Remove the proxy usage until we add a cli parser which can enable proxy
support with a command line switch.
2021-01-22 11:32:33 +01:00
Damir Jelić d07063af2b base: Add some error handling to the state store 2021-01-18 18:07:53 +01:00
Damir Jelić c6a80dc921 Merge branch 'master' into new-state-store 2021-01-04 17:34:33 +01:00
Damir Jelić 4c6c1d2107 matrix-sdk: Get rid of the common macros crate
This crate was used to support different trait bounds on WASM vs other
targets, since we only define async traits in a couple of places having
a whole crate to support this feels a bit excessive.

This patch defines a target specific super trait instead, this lowers
the compile time a couple of seconds.
2021-01-04 16:34:14 +01:00
Damir Jelić a370eb1e37 base: Re-introduce the event emitter. 2020-12-19 20:20:39 +01:00
Damir Jelić 137fa9619f matrix-sdk: Add the ability to stop the sync loop and rename the sync methods.
This renames our sync methods so it's clearer which one the main one is.
Syncing should be done with the sync method, if one wishes to sync only
once the sync_method is provided.

If one wishes to have a callback called with every sync the
sync_with_callback method exists, the callback now returns a boolean
that signals if the loop should be aborted. This does not mean that the
current sync request will abort, a cancelable future is still needed for
this.
2020-10-06 11:37:29 +02:00
Jonas Platte 5040be042f
Update ruma 2020-08-15 15:17:27 +02:00
Devin R 71f2a042c2 Rename Stub -> Sync for all ruma events 2020-07-18 08:37:43 -04:00
Devin R eb5949dbc2 Move matrix-sdk to ruma monorepo 2020-07-10 08:59:00 -04:00
Denis Kasak 1174ccfc89
Merge branch 'master' into feature/display-name 2020-06-20 12:54:46 +02:00
Marcel 8b77b4171a Do wasm sepcific changes:
- Only use send+sync when not using wasm
- Use wasm capabale async_trait wrapper macro
- Make room and room_member specific structs always clonable
2020-06-17 18:57:39 +02:00
Denis Kasak 331cb02266 Split joined/invited users and handle removing users. 2020-06-10 18:12:27 +02:00
Damir Jelić ea5f7f1d19 matrix-sdk: Don't require the the session at client creation time.
The client objects in the sdk accepted an optional session argument at
creation time. If provided this would restore the client into a logged
in state.

Since we need to restore the client state and encryption state at some
point it makes sense to do it when the client transitions into a logged
in state. At the same time we would like to avoid the client creation to
be async.

This introduces a restore_login() method which can be called instead of
the login() method to restore a session.
2020-05-22 15:23:58 +02:00
Devin R 21712d0930 state_store: load/store each room type (invite, join, left), add type for returning 3 room maps 2020-05-11 15:54:11 -04:00
Damir Jelić 9d09d19101 matrix-sdk: Rename the AsyncClient to just Client. 2020-05-08 14:02:49 +02:00
Damir Jelić 8a7aefac3b matrix-sdk: Split out the error types in our base and matrix-sdk crates. 2020-05-08 12:39:36 +02:00
Devin R 8afac39611 async_client/event_emitter: use RoomState to differentiate joined, invited and left rooms when emitting 2020-05-06 19:45:27 -04:00
Damir Jelić 5fef444d61 matrix-sdk: Split out the crypto part of the sdk into a separate crate. 2020-04-29 09:48:00 +02:00