Commit Graph

19 Commits

Author SHA1 Message Date
5018565239 misc: update copyright date to 2022
Change-Id: I795e3f2f69c07349bf84c87dbcafb502dc8490f8
2022-01-05 16:21:58 -05: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
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
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
f39acc22b0 tests: use correct actors
This avoid to let a lot of accounts to unregister and block the test

Change-Id: I0094a9536d974f95b21286697ebcc8144b903f4a
2021-08-10 10:26:24 -04:00
e62830b3c6 conference: clean participant mute state after removing
Change-Id: I9af1b95b07217c8abe4887586000fae9990963ca
GitLab: #604
2021-08-04 23:36:15 -03:00
ba3a411ca3 daemon: Rename dring occurrences in code and file names to jamid.
Automated using the following commands:

  $ mv src/{dring,jami}
  $ git grep -l src/dring | xargs sed -i 's,src/dring,src/jami,g'
  $ git grep -l '#include "dring/' | \
    xargs sed -i 's,#include "dring/,#include "jami/,g'
  $ git grep -l 'dring.h' | xargs sed -i 's,dring.h,jami.h,g'

And finally,

  $ git grep -l 'dring' | xargs sed -i 's,dring,jami,g'

  $ files=$(find -name '*dring*' | sort)
  $ for f in $files; do mkdir -p "$(dirname "$f")"; \
      mv "$f" "$(echo $f | sed 's/dring/jami/g')"; done

To resolve a bad renaming favorably:

  $ git grep -l -i AlsaCarjami | \
    xargs sed -i -E 's/([Aa])lsaCarjami/\1lsaCardRingtone/g'

The above renaming command is not perfect, so some hand-tuning was
required to complete it.

* src/manager.cpp (Manager::ManagerPimpl::retrieveConfigPath):
Preserve the dring.yml configuration file name, until we add something
to migrate (rename) it to jami.yml.
* man/dring.pod: Delete.
* bin/dbus/jamid.pod: Move to ...
* man/jamid.pod: here.
* bin/dbus/meson.build (jamid_targets): Normalize man section to the
pre-existing 1 and adjust accordingly.
* src/jami/def.h (dring_EXPORTS): Rename to ...
(jami_EXPORTS): ... this.

change-Id: I9828be6da9c711ab2f22c4d1b9539fea89d7b6fb
2021-07-15 10:57:26 -04:00
8044cab4f7 unitTest: fix fileTransfer, syncHistory
Change-Id: I087ee6e3e0e8f1530272a28f6f940571d542ebc4
2021-06-14 15:45:41 -04:00
14f286bab8 datatransfer: implement downloadFile logic
Add mechanism to re-ask for transfers and sendProfile
with new logic

GitLab: #524
Change-Id: I9f10328ff0e2bd9128e2d7d1afd7fa272dd14cdf
2021-06-11 15:26:00 -04:00
612f7f6b41 data-transfer: re-ask for transfer
add API to ask for a failed transfer. This can be used when the
client detects a transfer they doesn't have yet. It will ask all
members of the conversation to send the transfer back.

GitLab: #136
Change-Id: I1484298c4fa0eabb614132e22d8032612e14b949
2021-06-11 15:26:00 -04:00
030983a5f5 swarm: relink filetransfer
Change-Id: Ia80930bdec6b5e125fd559fcd6b125a45b4eba0c
2021-06-11 15:26:00 -04:00
8a8abc1951 unitTest: Add wait_for_removal_of functions
Change-Id: Icf4453467c246ac29b3d178e73380fbeb174d3cd
2021-06-02 12:01:06 -04:00
cabbc523a8 unitTest: Add load_actors function
Load actors from YAML description for unit tests.

Change-Id: Id1840e2bd7244abf902c9be95589b82503c72840
2021-06-02 12:01:06 -04:00
fbb4c95312 unitTest: Add wait_for_announcement_of function
Change-Id: I200b7fa80f8d0bf769bfb84a2915c220880a1146
2021-05-31 11:20:04 -04:00
dc25cb3ea4 unitTest/fileTransfer: Fix buffer overflows
Wrong constructor was used, resulting in buffer overflows.  Although it's benign
because of read only of a data section, ASAN doesn't like it at all.

Also added missing newline at end of file.

Signed-off-by: Olivier Dion <olivier.dion@savoirfairelinux.com>
Change-Id: I15553855ea368ec00456db80abb065599adc0d49
2021-05-13 17:30:46 -04:00
6100a792f6 swarmchat: initialize empty git repository with initial commit
This patch offers an API to create conversation. A conversation
is represented by a git repository.

The repository will contains the account certificate in /admins,
its CRLs in /CRLs and the device key in /devices. Moreover,
the first signed commit's hash will be the conversation's id

Change-Id: Iac7ff7f6002185a5bb0f51d4c10df1afe9e059b4
2021-03-30 13:49:07 -04:00
31fa5f12c3 misc: update copyright date
Change-Id: Ib53fa87efdbbbc6b7561e3b37f27d7a8d51af163
2021-01-25 12:14:41 -05:00
144defdb03 tests: fix fileTransfer test
Change-Id: Ibb1afba82e884913d1e8268fdd584dedef8ae496
2020-09-25 16:56:10 -04:00
8473608f1a file transfer: add some tests
Change-Id: I64783d990cf463a5a873314c978e42a7b19bb55b
Gitlab: #228
2020-06-28 20:29:24 -04:00