Commit Graph

348 Commits

Author SHA1 Message Date
85422c76d0 multiplex socket: pass full certificate in callbacks
Change-Id: I40171f3c5872bd5bf5719fd22a6a2af20ce6263f
2021-10-28 15:19:31 -04:00
707b09532d swarm: banContact should also remove conversation's requests
Change-Id: Idbe771a647bf16b45d88755d684623895e5a8e82
2021-10-26 10:25:00 -04:00
d3cfb5bff2 agent/Makefile.am: Rename agent binary
Guile is confused by agent.scm and agent.  It will try to load the ELF file
instead of the Scheme script when `(use-modules (agent))`.

Change-Id: Ieead4c384f10df9ead351a6ae66b21f708e97424
2021-10-25 17:21:05 -04:00
ddecafc724 agent/utils: Add ensure_type() method to from_guile caster
With the help of a macro, we also get the context where the casting failed.

Change-Id: I7be3d63de9dd07994fb5c8cad39d5a93eedb7e8f
2021-10-25 17:21:05 -04:00
8806899a52 agent/bindings/signal: Add all Jami's signal bindings
Change-Id: I373ddb0efdeca41bf54e80aec4b9d1db69f77300
2021-10-25 09:59:11 -04:00
522e4c325a agent/bindings: Add LOG_BINDING() macro
Change-Id: I95edfc348e9ef431e4ad26827bdfdadbba0fc746
2021-10-25 09:48:54 -04:00
490384875e agent: Add logging to (agent) and examples
Change-Id: I39c2bca72f8b6feb1578aecf32f97738eadfd235
2021-10-25 09:48:54 -04:00
7a71ff44b2 sync: synchronize avatars from swarm members
This work follow the JamiAccount split started before. This moves
the ConnectionManager's callbacks code related to data transfer into
transfer_channel_handler and improves syncing by sending contact's
avatars (where a swarm is present) to new devices.

Note: for now, contact's avatar are managed by the client. So, this
code will only transmit avatars if the profile is found. For now,
the only path tested is the one used by jami-libclient. To be able
to fully sync all avatars, the avatar management should be moved in
the daemon with future work.

Finally, in syncHistory a test is added to validate the behavior.

Doc: https://git.jami.net/savoirfairelinux/ring-project/-/wikis/technical/3.8-Sync-profiles

GitLab: https://git.jami.net/savoirfairelinux/ring-project/-/issues/1282
Change-Id: Ic98da34aabf1be070a57dcac55bba0a00c555445
2021-10-25 09:20:12 -04:00
39626f45d9 agent/bindings/logger: Add Jami's logger foreign function bindings
Change-Id: Ib70fdc0739a0ab7216be851b35f55a1ecb72a9a2
2021-10-23 12:43:27 -04:00
e60e88f02b agent/bindings/bindings.h: Add macros for constant definitions
Change-Id: I8c18baa7f42f06a99e56acba0ce7863f1db28938
2021-10-23 12:43:04 -04:00
da270b2ac4 agent/utils: Add to_guile::operator int()
Change-Id: I12a30be4d77574f66bd6fc207cfee501bdb41bfa
2021-10-23 12:43:04 -04:00
cbcb68214e agent/agent: Fix wait for announcement problems
Change-Id: I1de543265671728148e02d5b4d7d1878e22d6e18
2021-10-23 12:43:04 -04:00
a0a0f8306e conversation_module: fix needsSyncingWith
If a conversation is not cloned, when detecting a new presence,
needsSyncingWith MUST return true if one conversation needs to be
cloned. Else, it will result in an infinite syncing.

Change-Id: I3a9bcab9f8a845161ceac7d75d8842f8b338ed57
2021-10-22 11:02:32 -04:00
d2a833db9d SIPCall - trigger a re-invite on media source change
Changing the media source of a media stream (video in particular)
must trigger a reinvite.
Since currently we do not support changing video properties (resolution
in particular) in the same media session, any changes in the video
properties must trigger a re-invite to restart the media locally and on
the remote peer.

Gitlab: #653

Change-Id: Ibd6192135d272908963cfbc585bec95c66881a28
2021-10-21 15:26:11 -04:00
932bf8182e conversationRequest: fix testRemoveConversationRemoveSyncing
acceptTrustRequest will set the conversation as ready.
removeConversation should be done after

Change-Id: I966cc2142d00bda880d63f11c52c36faceb11aa7
2021-10-21 11:09:59 -04:00
064efa9024 agent/README: Update README
Change-Id: I2bcbbf872b54262f8e4406fb01921a1ec07be3b3
2021-10-13 12:08:29 -04:00
26f04d0a5c agent: Remove junks
Change-Id: I09876059293d18e25c34e755deafba8d224dc740
2021-10-13 12:08:29 -04:00
448b4e1e2b agent/examples: Update examples with new bindings
Change-Id: Ib5194ef6ca475df5be621c923d7660266cf7256e
2021-10-12 23:35:58 -04:00
dd132c8628 agent/agent: Add agent helper
Change-Id: I0c44b1a5fdd9727a8acf3d9deb88f9c2b5f71dd8
2021-10-12 23:35:53 -04:00
877f8cd210 agent: Add Jami's signal bindings
Change-Id: I1b21d80b7ea24bfc9334f2f63f3a57f0d4a57522
2021-10-12 23:35:50 -04:00
ecc4a089fd agent: Add Jami's call bindings
Change-Id: I59d9d812b6b5a2c66e2832328fbfdf663d9019af
2021-10-12 23:35:46 -04:00
904f74de22 agent: Add Jami's account bindings
Change-Id: I42fe3a4682bb9468ecf5417d6d9823e151e10bec
2021-10-12 23:35:42 -04:00
aa3299b36b agent: Use Jami's scheme bindings
The agent will be written in Guile Scheme instead of C++ in
order to give maximum flexibility to developers of scenarios.
Thus, bindings will be added for the public Jami interface.

In other words, the agent will be a client of yet another
Jami's bindings.

Change-Id: Ic2cd333007d0b1aad56c02b116ea708b56e96cc5
2021-10-12 23:35:38 -04:00
c5d5298655 swarm: replay text messages when cloning an old conversation
After removing and re-adding a contact, the second conversation
will be deleted and the first conv will be recloned. However,
some text messages can be present. In this case, we can re-add
them.

Change-Id: I7cafcf76b5d36769ea939729a2fbf6730853cafb
2021-10-01 15:41:23 -04:00
0a3503941f data transfer: fix cancel in swarm
cancel a file from the user should removes the file from the
waiting map to avoid to relaunch the download on the next sync.

Change-Id: I0696364d0131c8dde563b97b8b965e99d1f5686a
2021-10-01 13:47:10 -04:00
6ec4c687b3 jamiaccount: cache compressed vcard given by the client in sendTrustRequest
For now, the daemon doesn't handle the profile of the account nor
the compression. However, it does handle sendTrustRequest, which uses
the DHT to transmit requests. DHT values must be small, else it will
not be sent. So, this patch cache the compressed payload generated
by the client and removes it as soon as the confirmation is received.
This allow the daemon to retry to send request with the payload sent
originally.

Change-Id: I3fac542c6a53febdb7f1d0c516ec2d9ff5b317be
2021-10-01 11:14:42 -04:00
830d48573a test: split ut_conversation
Change-Id: I14df750d459a0771f4e60923a1ecf3bfb938a78b
2021-09-30 13:23:06 -04:00
f045eb9764 swarm: link trust requests and conversation's requests
This is only to avoid to return weird states from the daemon to the
client. But if a conversation is added through addContact,
removeContact should be called to removes it. However, if
removeConversation() is called, the conversationId in contact's
details MUST be updated.
Same for acceptConversationRequest, this should removes related
trust requests

Change-Id: I4b273075862cdcdffc7f13c1b5e581a2eebc411d
2021-09-30 13:23:06 -04:00
2a6761236f ice: decouple instantiation and initialization of ICE transport
Instantiation and initialization of ICE are done in a single
stage (in the class constructor).
To initialize the ICE instance, connection information must
first be gathered asynchronously.
However, when sharing ICE media instance between subcalls,
it's better to have a valid ICE instance as soon as possible
(even if not fully initialized) to proceed with the call
initialization process, then wait for ICE initialization to start
the call.
Thus, the ICE instantiation will be performed synchronously as
soon as the parent (main) call is created, then it will be
initialized asynchronously when the connection info are ready.

Gitlab: #619

Change-Id: I9c97516238f1a690603975ec968c8c6733155d4a
2021-09-29 11:24:47 -04:00
910a5c5de3 sipcall/ice: remove obsolete temporary shared pointer
This patch removes the temporary ICE shared pointer

Gitlab: #619

Change-Id: Icacac9df1102327d4d1a0f0d67dfa457016048cd
2021-09-29 11:24:47 -04:00
5dc71b2021 logging: fix signature and name space
Also set agent logging to console by default.

Change-Id: I4993886a149eb4f60e1d61bad7ed18956350599f
2021-09-23 14:24:24 -04:00
eb158ad655 swarm: removeConversation should remove syncing conversations
Change-Id: I5a30a4f5b7c7f2b74e5457973fdf42849fbc604c
GitLab: https://git.jami.net/savoirfairelinux/ring-project/-/issues/1282
2021-09-13 10:56:06 -04:00
d2b88b1c5a swarm: retrieve old swarm for one to one when possible
With this patch, contact left is removed in one to one. So, if
a contact left, they still receive message notification and they
will generate conversation requests and retrieve the old history.
Moreover, if they remove and re-add a contact, they will receives
a confirmation for the previous conversation and retrieve the old
history.
This avoid duplicates and read-only conversation.

GitLab: https://git.jami.net/savoirfairelinux/ring-project/-/issues/1282
Change-Id: Id820482e82e23334632e76bf4920255efb45f4cb
2021-09-13 10:55:51 -04:00
d75289477f swarm: calculate linearizedParent while logging
This makes the log sending messages in the order the client will
show it and avoid to calculate linearized parent for each commit.
However, this linearized parent can change over time. In fact, if
a merge happens, the parents of the messages shown can be
modified.

Change-Id: I26372aa52de0e5f89140680a4beaf5fc7ec52163
GitLab: https://git.jami.net/savoirfairelinux/ring-project/-/issues/1282
2021-09-13 09:26:48 -04:00
6c0a0aaf6a jamiaccount: extract conversation's related code from class
This patches introduces two new concepts in order to reduce the code
of JamiAccount.

ChannelHandlers to manages protocols logic. The idea of this class
is to handle channels per protocol, accept and reject it.
AccountModule, to be able to separate logic between call managements
datatransfer, config and conversation but give an interface to
detect when some events should occurs.

Change-Id: I34ff07852c06d7266411f1ffb32b71a1834aba4f
GitLab: #603
2021-09-10 10:15:28 -04:00
a850889bbf archive_account_manager: fix revokeDevice
Change-Id: Ib4377b5a109dc9b1554a35f2341820307ec6a500
GitLab: #624
2021-09-08 09:40:59 -04:00
504e546082 video-split: speed-up test
Gitlab: #562

Change-Id: I577c86b3e6a30c171f0233c4354ccfb79e494d40
2021-09-02 16:49:57 -04:00
7357589ea9 agent: update README.md
Change-Id: I7e46255256ebce1a1e133c53d170539f6c8e1f8c
2021-08-31 15:27:41 -04:00
4ecebcaf2f swarm: also remove linked data when removing a swarm
Change-Id: Icee8afc872c9b25fce2d049e66673459de254b4d
GitLab: https://git.jami.net/savoirfairelinux/ring-project/-/issues/1282
2021-08-31 14:44:01 -04:00
083f672819 agent/Makefile.am: Switch check_PROGRAMS to noinst_PROGRAMS
Change-Id: I384bca2ca4e97588b21041ebca72083c57abb915
2021-08-27 10:02:31 -04:00
2a2edcbbd7 agent/tools: Better make-account-archive
Change-Id: I5924025c4c9e37f7ebe554151b39a8da5eb5154e
2021-08-26 09:51:20 -04:00
fddb2ef82e agent: Add wait-for-call-state
Change-Id: I692df9c8e315e703fb079e136962905b9e83dce8
2021-08-26 09:51:07 -04:00
c4da9debfb agent: Use scm_schell() for execution of the agent
Change-Id: Ief1fd8fc1058f77784260d5be7a116d13ce06480
2021-08-26 09:51:07 -04:00
8468af34e3 agent: Add get-details
Change-Id: I7de1fb513238707930d500472bb6d8b2139aba2a
2021-08-26 09:51:07 -04:00
43c4c18561 agent: Make activate work
Change-Id: I08dc1c58529872c031ce9e5c36706173857f3f83
2021-08-26 09:51:07 -04:00
66d5d95557 agent: Fix possible race conditions
Change-Id: Ie6c21d1505f218a0de3bf79aec4565fc3713a922
2021-08-26 09:51:07 -04:00
baf62dd3d5 agent/bindings: Add pack/apply generics
Change-Id: Ia16f429032fd940b52393d946400300fe269048e
2021-08-25 12:09:45 -04:00
15738fdf7b conversation: check author in countInteractionsSince
This allow us to only count interactions since last message written
for multi-device.

Change-Id: I9c46eab672719dbdc2e522bbf208f85adfb730f4
GitLab: https://git.jami.net/savoirfairelinux/ring-project/-/issues/1282
2021-08-17 13:00:40 -04:00
f7a5fe26f7 conversation: fix getConversationMembers for one to one with self
Change-Id: I77b12b6b6ee8ae06930e776ca0637d43cd9b2586
GitLab: https://git.jami.net/savoirfairelinux/ring-project/-/issues/1282
2021-08-17 13:00:30 -04:00
34d45147e6 ice: avoid duplicating srfx candidates
Avoid adding generic srflx candidates if UPNP candidates are
available. This will reduc the size of the check list and also
increase the chance for UPNP candidates to be selected.

Change-Id: Ia1504beffe7e12063ff1c1ad0f54d65bb60496d6
Gitlab: #607
2021-08-16 19:18:56 -04:00