Compare commits

..

23 commits
master ... v0.4

Author SHA1 Message Date
Marvin W df0013e3f4
Fix potential crash in video calls 2023-07-09 18:24:34 +02:00
Marvin W 0521f50146
Fix certificate start time
I doubt anyone ever looked at it, but it shouldn't be 1 day in the future ;)
2023-07-09 18:24:34 +02:00
Marvin W 92b7d97339
Do not send DTLS datagrams to RTP even after handshake
Also post debug message in case we drop datagrams
2023-07-09 18:24:34 +02:00
Stephen Paul Weber 7c048ecaef
Ignore non-DTLS data before handshake is complete
https://datatracker.ietf.org/doc/html/rfc9147#name-demul
https://datatracker.ietf.org/doc/html/rfc5764#section-5.1.2

If data is received before handshake is complete, discard it rather than
forwarding it blindly to GnuTLS which can get confused.
2023-07-09 18:24:34 +02:00
Robert Mader da383a2fe9
data: Set X-Purism-FormFactor in .desktop file
So the app is detected as mobile-friendly on Phosh.
2023-07-09 18:24:15 +02:00
Marvin W 3a925c4c00
Fix reactions being made to the wrong message
fixes #1426
2023-07-09 18:23:43 +02:00
fiaxh 0ed0495e0a Fix chat input for IME
fixes #1419

Co-authored-by: Marvin W <git@larma.de>
2023-05-14 14:39:20 +02:00
fiaxh 569d4141cf Fix chat input status having a fixed width requirement
fixes #1439
2023-05-14 14:39:20 +02:00
fiaxh f44ded88c8 Fix character counting for fallbacks
fixes #1420
2023-05-14 14:39:20 +02:00
Karim Malhas a74b894147 Focus ChatInput textbox after selecting emoji
After selecting an emoji, the emoji is inserted
into the textbox, but focus remains on the emoji_button.

This causes the EmojiChooser to be opened again if a user
hits the Enter key directly, but text is inserted into the textbox
if they continue to type.

This commit just explicitely focuses on the textbox after
an emoji has been selected.
2023-05-14 14:39:20 +02:00
fiaxh f011adac37 Fix crash on NS_URI call when own server has no MAM; drop broken mam:1 "support"
fixes #1405
2023-05-14 14:39:20 +02:00
Marvin W 58379acc9f Fix empty alias being handled different than none 2023-05-14 14:39:20 +02:00
fiaxh 2fb8d29b34 Fix call window styling 2023-05-14 14:39:20 +02:00
fiaxh 7a27634732 Fix call window controlls hiding 2023-05-14 14:39:20 +02:00
Marvin W d155ec15d2 Fix video for cameras with rotated image 2023-05-14 14:39:20 +02:00
Marvin W baf96d9d9f
Check sender of bookmark:1 updates 2023-03-23 12:06:36 -06:00
Marvin W 179c766d19
Bind soup session lifetime to File provider/sender lifetime
Required since libsoup 3.4. Fixes #1395
2023-03-22 13:22:23 -06:00
Bohdan Horbeshko 004824040d
Fix a crash if a message subnode is not found in a carbon
Fixes #1392
2023-03-22 09:59:55 -06:00
Michael Vetter b6f9b54d76
Remove gspell
7e7dcedaf ported from GTK3 to GTK4.
It also removed gspell from main/CMakeLists.txt.

I assume that gspell is not needed anymore and we can thus remove the
requirement from the CI and the cmake file as well.
2023-03-22 09:59:55 -06:00
Sebastian Krzyszkowiak 1738bf8dc8
data: Set StartupNotify to true in .desktop file
GTK handles startup notifications, so advertise it in desktop
file. This allows splash screens and other startup indications
in DEs to work.
2023-03-22 09:59:54 -06:00
Marvin W 481a68fd89
Improve database performance while reconnecting and syncing
Also move some tasks to low priority idle queue so they won't block UI updates
2023-03-22 09:59:54 -06:00
Marvin W 89b9110fcb
Improve history sync
- Ensure we fully fetch desired history if possible (previously, duplicates
  from offline message queue could hinder MAM sync)
- Early drop illegal MAM messages so they don't pile up in the pending queue
  waiting for their query to end (which it never will if they were not
  requested in first place).

Fixes #1386
2023-03-22 09:59:54 -06:00
Marvin W acf9c69470
Fix C binding for gst_video_frame_get_data
Fixes #1267
2023-03-22 09:59:54 -06:00
357 changed files with 3245 additions and 12991 deletions

View file

@ -1,42 +0,0 @@
name: Build for Windows
on: [pull_request, push]
jobs:
build:
runs-on: windows-latest
steps:
- uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: git
- run: git config --global core.autocrlf input
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install build-dependencies
run: |
msys2 -c './build-win64.sh --prepare'
- name: Build Dino+ (Meson, without saving)
run: |
msys2 -c './build-win64.sh -s meson -c -b -t -w'
- name: Build Dino+ (CMake)
run: |
msys2 -c './build-win64.sh -s cmake -c -b -t -i'
- name: Build Dino+ installer
run: |
msys2 -c './build-win64.sh --build-installer'
- name: Upload Dino+ installer
uses: actions/upload-artifact@v4
with:
name: dino-plus-installer
path: windows-installer/dino-installer.exe
- name: Release Dino+ installer
if: ${{ github.ref_type == 'tag' }}
uses: svenstaro/upload-release-action@2.9.0
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: windows-installer/dino-installer.exe
asset_name: dino-plus-installer.exe
tag: ${{ github.ref }}
release_name: Dino+ ${{ github.ref_name }}

View file

@ -5,66 +5,10 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- run: sudo rm /etc/apt/sources.list.d/microsoft-prod.list
- run: sudo apt-get update
- run: sudo apt-get remove libunwind-14-dev
- run: sudo apt-get install -y build-essential gettext cmake valac libgee-0.8-dev libsqlite3-dev libgtk-4-dev libnotify-dev libgpgme-dev libsoup2.4-dev libgcrypt20-dev libqrencode-dev libnice-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libsrtp2-dev libadwaita-1-dev libsignal-protocol-c-dev libcanberra-dev
- run: ./configure --release --no-debug --with-tests --enable-plugin=notification-sound --prefix=/usr --without-webrtc
- run: cmake --build build
- run: cmake --build build --target=test
- name: Build DEB-package
run: cd build && cpack -G DEB
- name: Upload Dino+ DEB-package
uses: actions/upload-artifact@v4
with:
name: dino-plus-deb
path: _packages/dino-plus.deb
- name: Release Dino+ DEB-package
if: ${{ github.ref_type == 'tag' }}
uses: svenstaro/upload-release-action@2.9.0
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: _packages/dino-plus.deb
asset_name: dino-plus.deb
tag: ${{ github.ref }}
release_name: Dino+ ${{ github.ref_name }}
build-meson:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- run: sudo rm /etc/apt/sources.list.d/microsoft-prod.list
- run: sudo apt-get update
- run: sudo apt-get remove libunwind-14-dev
- run: sudo apt-get install -y build-essential gettext libadwaita-1-dev libcanberra-dev libgcrypt20-dev libgee-0.8-dev libgpgme-dev libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev libgtk-4-dev libnice-dev libnotify-dev libqrencode-dev libsignal-protocol-c-dev libsoup2.4-dev libsqlite3-dev libsrtp2-dev meson valac
- run: meson setup build -Duse-soup2=true -Dplugin-rtp-webrtc-audio-processing=disabled
- run: meson compile -C build
- run: meson test -C build
build-flatpak:
runs-on: ubuntu-22.04
container:
image: bilelmoussaoui/flatpak-github-actions:gnome-44
options: --privileged
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- run: flatpak repair --user
- uses: flatpak/flatpak-github-actions/flatpak-builder@v6.1
with:
manifest-path: im.dino.Dino.json
build-bundle: true
- name: Release Dino+ flatpak
if: ${{ github.ref_type == 'tag' }}
uses: svenstaro/upload-release-action@2.9.0
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: app.flatpak
asset_name: app.flatpak
tag: ${{ github.ref }}
release_name: Dino+ ${{ github.ref_name }}
- run: sudo apt-get install -y build-essential gettext cmake valac libgee-0.8-dev libsqlite3-dev libgtk-4-dev libnotify-dev libgpgme-dev libsoup2.4-dev libgcrypt20-dev libqrencode-dev libnice-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libsrtp2-dev libwebrtc-audio-processing-dev libadwaita-1-dev
- run: ./configure --with-tests --with-libsignal-in-tree
- run: make
- run: build/xmpp-vala-test
- run: build/signal-protocol-vala-test

7
.gitignore vendored
View file

@ -6,10 +6,3 @@ Makefile
.idea
.sqlite3
gschemas.compiled
windows-installer/win64-*/
*.exe
*.dll
*.flatpak
flatpak-dist
.flatpak-builder
*.zst

7
.gitmodules vendored
View file

@ -1,3 +1,4 @@
[submodule "shared-modules"]
path = shared-modules
url = https://github.com/flathub/shared-modules.git
[submodule "libsignal-protocol-c"]
path = plugins/signal-protocol/libsignal-protocol-c
url = https://github.com/WhisperSystems/libsignal-protocol-c.git
branch = v2.3.3

View file

@ -1,54 +0,0 @@
Here are the instructions to anyone whom wants to try the build themselves.
It is assumed that you have `brew` installed, know your way around terminal, and generally understand what you're doing.
## Build
1. Start with an already existing build instructions of the original project:
`https://github.com/dino/dino/wiki/macOS`
2. On step 4, replace the path to the upstream repo with this one:
```
git clone https://github.com/mxlgv/dino
cd dino
```
3. On step 5 run `./configure --with-libsoup3`.
4. Continue the build according to the original instructions.
## Install with Brew
To build Dino using this formula, follow these instructions:
```
brew tap mxlgv/homebrew-dino
brew install mxlgv/homebrew-dino/dino
```
You can start the Dino client installed via homebrew with the following command:
```
./opt/homebrew/Cellar/dino/3/bin/dino
```
You can create a shortcut with a symbolic link pointing to this file, so that you can open it in a more convenient way.
If you encounter an error related to rpath, you need to add `DYLD_LIBRARY_PATH` to the environment variable:
```
export DYLD_LIBRARY_PATH=/opt/homebrew/Cellar/dino/3/lib
```
## Notifications
There is a draft PR which can be used to enable notifications: https://github.com/mxlgv/dino/pull/45
## Start Dino
In order to run Dino, just run in the build folder:
```
./dino
```

View file

@ -10,24 +10,8 @@ else ()
set(PROJECT_VERSION ${VERSION_FULL})
endif ()
include(CTest)
option(PLUGIN_RTP_WEBRTC_AUDIO_PROCESSING "Use WebRTC audio processing" ON)
option(WITH_WASAPI "Use wasapi instead of directsound on windows" ON)
# https://gitlab.kitware.com/cmake/cmake/-/issues/19804
if (WIN32)
list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES .dll)
endif()
# Prepare Plugins
set(DEFAULT_PLUGINS omemo;openpgp;http-files;ice;rtp)
if (WIN32)
list(APPEND DEFAULT_PLUGINS win32-fonts windows-notification)
else()
list(APPEND DEFAULT_PLUGINS phone-ringer)
endif()
foreach (plugin ${DEFAULT_PLUGINS})
if ("$CACHE{DINO_PLUGIN_ENABLED_${plugin}}" STREQUAL "")
if (NOT DEFINED DINO_PLUGIN_ENABLED_${plugin}})
@ -81,8 +65,6 @@ macro(set_path what val desc)
endif()
endmacro(set_path)
set(LOCALEDIR_NAME "share/locale")
string(REGEX REPLACE "^liblib" "lib" LIBDIR_NAME "lib${LIB_SUFFIX}")
set_path(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" "Installation directory for architecture-independent files")
set_path(EXEC_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" "Installation directory for architecture-dependent files")
@ -96,7 +78,7 @@ set_path(SERVICE_FILE_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/dbus-1/services" "Ins
set_path(ICON_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/icons" "Installation directory for icons")
set_path(INCLUDE_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/include" "Installation directory for C header files")
set_path(LIB_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/${LIBDIR_NAME}" "Installation directory for object code libraries")
set_path(LOCALE_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/${LOCALEDIR_NAME}" "Installation directory for locale files")
set_path(LOCALE_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/locale" "Installation directory for locale files")
set_path(PLUGIN_INSTALL_DIR "${LIB_INSTALL_DIR}/dino/plugins" "Installation directory for dino plugin object code files")
set_path(VAPI_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/vala/vapi" "Installation directory for Vala API files")
@ -194,11 +176,6 @@ if (NOT NO_DEBUG)
set(CMAKE_VALA_FLAGS "${CMAKE_VALA_FLAGS} -g")
endif (NOT NO_DEBUG)
if (WIN32)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_POSIX_C_SOURCE=1")
set(CMAKE_VALA_FLAGS "${CMAKE_VALA_FLAGS} --define=_WIN32")
endif(WIN32)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
@ -233,9 +210,6 @@ add_subdirectory(main)
add_subdirectory(crypto-vala)
add_subdirectory(plugins)
# To generate a DEB package
include(Packing)
# uninstall target
configure_file("${CMAKE_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in" "${CMAKE_BINARY_DIR}/cmake_uninstall.cmake" IMMEDIATE @ONLY)
add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -P ${CMAKE_BINARY_DIR}/cmake_uninstall.cmake COMMENT "Uninstall the project...")

View file

@ -1,16 +0,0 @@
Dino+, a modern XMPP/Jabber client software based on Dino
Copyright (C) 2016-2023 Dino contributors
Copyright (C) 2024 Dino+ contributors
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

150
README.md
View file

@ -1,163 +1,37 @@
This is Dino+<br />
A modern XMPP/Jabber client software, based on [Dino](https://github.com/dino/dino/)
![Dino](https://dino.im/img/readme_header.svg)
=======
![screenshots](dino_plus.png)
![screenshots](https://dino.im/img/screenshot-main.png)
Project description
Installation
------------
Dino+ is a fork of [Dino](https://github.com/dino/dino), a modern XMPP/Jabber client written in Vala using GTK+, which includes a few relatively minor but important quality-of-life features.
Have a look at the [prebuilt packages](https://github.com/dino/dino/wiki/Distribution-Packages).
It was created due to upstream project's maintainers being seemingly unwilling to accept PRs from the community. As of March 2024, there are over 50 PRs pending, most of which are silently ignored.
Some of the features that Dino+ implements:
* Windows support
* Proper sync for chats history, including "scroll-to-load"
* Forced MAM sync for chats
* Password change via GUI
* Optional support for Meson build system
* Some additional QoL-features
What's currently in the works:
* Multiple UI fixes
* Fixes for sound notifications
* MacOS support for Mac silicon
* and more
Dino+ is currently to be considered an alpha-quality product. Please open an issue or send a PR if you spot or fix any bugs.
OS support
------------
* Linux (flatpaks are targeted for Ubuntu 22.04+)
* Windows 10\11
* MacOS via [brew](https://brew.sh/) (very experimental, see below)
Officially, we support only x86_64 architecture. Whilst you may be able to compile this code for ARM-based platforms (like Pinephone or MacOS), there's zero guarantees that it'll compile or function properly, as we don't have the hardware and the time to test it out.
Installation (prebuilt packages & AUR)
------------
Have a look at our [releases](https://github.com/mxlgv/dino/releases).
Windows installer is self-explanatory, and will place a shortcut on your desktop. Ignore the possible warning from Windows Defender: it's caused by the fact that installer does not have a digital signature.
Deb package is built and tested only for Ubuntu 22.04, but it may work on its derivatives as well, such as Pop!_OS or Linux Mint.
Flatpak is not present in Flathub yet, but you can install it manually. The commands below assume that you have "flatpak" package of your distro installed in your system. If it is not, please refer to https://flatpak.org/setup/
1) Download the .flatpak file from [releases](https://github.com/mxlgv/dino/releases)
2) Add default Flatpak repo:
```
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
```
3) Change the directory to the one you've downloaded the .flatpak to and run (you may have to change the file name in this command):
```
flatpak install ./im.dino.Dino.flatpak
```
4) To launch the program, run either
```
/usr/bin/dino
```
or
```
flatpak run im.dino.Dino
```
Flatpak distribution is confirmed to be working on Arch Testing, Manjaro Stable, Void Linux and Linux Mint.
Arch Linux & Manjaro users may install `dino-plus-git` package from [AUR](https://aur.archlinux.org/packages/dino-plus-git) via any helper of their choice.
Build on Linux
Build
-----
Make sure to install all [dependencies](https://github.com/dino/dino/wiki/Build#dependencies).
./configure --release --no-debug --with-tests --enable-plugin=notification-sound --prefix=/usr
./configure
make
build/dino
Additionally, you might need to install `gst-plugins-bad` and `webrtc-audio-processing` packages (or however they might be called in your distro), if you want to have noise cancelling and gain control. If you don't want that or your distro don't have that package, add "--without-webrtc" (without quotes) to the first command.
If you want to use `meson` build system, follow the next instructions:
meson setup build
meson configure --prefix $PWD/build/install --libdir lib build
meson compile -C build
meson install -C build
LD_LIBRARY_PATH+=:$PWD/build/install/lib build/install/bin/dino
If your `nice` library depends on `libsoup-2.4` (consider `ldd` output for the `libnice.so`), you should additionally specify `-Duse-soup2=true` option.
`LD_LIBRARY_PATH` should point to the directory containing the `libdino.so` library.
Skip `meson configure` step, if you want to install the program globally.
You can specify any convenient directory in the option `--prefix` where the program will be installed.
If there is no `webrtcdsp` plugin in your system (check this by calling `gst-inspect-1.0 webrtcdsp`) you should pass extra argument:
* `--without-webrtcdsp` for `./configure`;
* `-Dplugin-rtp-webrtc-audio-processing=disabled` for `meson`;
* `-DPLUGIN_RTP_WEBRTC_AUDIO_PROCESSING=OFF` for `cmake`.
Build on Windows (x86_64)
------------
- Install and configure the [MSYS2](https://www.msys2.org/) package;
- Go to `MINGW64` environment;
- Clone project:
```sh
git clone https://github.com/mxlgv/dino && cd dino
```
- Run the script to install dependencies:
```sh
./build-win64.sh --prepare
```
- Start the build (the builded distribution is available in the `windows-installer/dist-win64` folder):
```sh
./build-win64.sh
```
If you want to use meson build system, please use `-s meson` key as the first argument, i.e.
```sh
bash build-win64.sh -s meson -c -b
```
will do the same as commands above, but using meson.
Note: the build script has some other options, their description can be found using the `--help`.
Build Windows Installer (NSIS)
------------
Before this, you must build the project according to the instructions above. It's worth making sure that `windows-installer/dist-win64` is not empty.
Now you should run:
```sh
./build-win64.sh --build-installer
```
Build on MacOS
------------
Builds for Mac are currently available only as a [brew](https://brew.sh/) formulae. Please follow [these instructions](https://github.com/mxlgv/dino/blob/master/BUILD_MACOS.md) to produce a build.
Please note that Mac support is very experimental, and currently missing support for event notifications, among other things. You have been warned.
Resources
---------
- Original project's [website](https://dino.im).
- Dino's chat room `chat@dino.im` (please don't post there any issues related to this fork!)
- The upstream project's [wiki](https://github.com/dino/dino/wiki) provides additional information.
- Check out the [Dino website](https://dino.im).
- Join our XMPP channel at `chat@dino.im`.
- The [wiki](https://github.com/dino/dino/wiki) provides additional information.
Contribute
----------
- Pull requests are welcome!
- Pull requests are welcome. [These](https://github.com/dino/dino/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) might be good first issues. Please discuss bigger changes in our channel first.
- Look at [how to debug](https://github.com/dino/dino/wiki/Debugging) Dino before you report a bug.
- Help [translating](https://github.com/dino/dino/wiki/Translations) Dino into your language.
Special thanks
----------
We'd like to thank all of the contributors whom provided the PRs used in this project.
We also recognise the previous efforts of [LAGonauta](https://github.com/LAGonauta) without whom Windows build wouldn't be available.
- Make a [donation](https://dino.im/#donate).
License
-------
Dino+, a modern XMPP/Jabber client software based on Dino
Dino - Modern Jabber/XMPP Client using GTK+/Vala
Copyright (C) 2016-2023 Dino contributors
Copyright (C) 2024 Dino+ contributors
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View file

@ -1,90 +0,0 @@
#!/bin/bash
set -e
APP_NAME="im.dino.Dino"
DIST_NAME=${DIST_NAME:-"${APP_NAME}.flatpak"}
DIST_DIR="$PWD/flatpak-dist"
BUILD_TEMP_DIR="$DIST_DIR/buildtemp"
BUILD_EXPORT_DIR="$DIST_DIR/export"
msg()
{
echo -e "\e[32m$1\e[0m"
}
fatal()
{
echo -e "\e[31m$1\e[0m"
exit 1
}
get_flatpak_dependencies()
{
msg "Installing Flatpak dependencies..."
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
flatpak install flathub org.gnome.Sdk//44
flatpak install flathub org.gnome.Platform//44
msg "Flatpak dependencies installed"
}
pull_shared_modules()
{
msg "Pulling shared modules..."
git submodule init
git submodule update
msg "Shared modules successfully pulled"
}
prepare()
{
get_flatpak_dependencies
pull_shared_modules
}
build()
{
msg "Build commencing!"
rm -rf $BUILD_TEMP_DIR
flatpak-builder --install-deps-from=flathub $BUILD_TEMP_DIR "${APP_NAME}.json"
flatpak build-export $BUILD_EXPORT_DIR $BUILD_TEMP_DIR
flatpak build-bundle $BUILD_EXPORT_DIR $DIST_NAME $APP_NAME
msg "Flatpack bundle ready and saved to ${DIST_NAME}"
}
clean()
{
msg "Wiping intermediate files..."
rm -rf $BUILD_TEMP_DIR $BUILD_EXPORT_DIR
msg "Cleanup complete!"
}
help()
{
cat << EOF
usage: $0 [OPTION]
--prepare install build dependencies
--build build the project
--clean remove build artifacts
--help show this help
Bundle is saved to ${APP_NAME}.flatpak by default.
Set DIST_NAME variable to customize output file name:
'DIST_NAME=customname.flatpak $0'
Running without parameters is equivalent to running:
'--prepare', '--build' and '--clean'
EOF
}
case $1 in
"--prepare" ) prepare ;;
"--build" ) build ;;
"--help" ) help ;;
"--clean" ) clean;;
"" )
prepare
build
clean
;;
*) fatal "Unknown argument!"
esac

View file

@ -1,333 +0,0 @@
#!/bin/bash
set -eu
PROJ_DIR=$PWD
DIST_DIR=${PROJ_DIR}/windows-installer/win64-dist
BUILD_DIR=$PROJ_DIR/build
JOBS=$NUMBER_OF_PROCESSORS
build_sys='cmake'
msg()
{
echo -e "\e[32m$1\e[0m"
}
fatal()
{
echo -e "\e[31m$1\e[0m"
exit 1
}
download_yolort()
{
file_name=yolort.zip
yolort_dir="$PROJ_DIR/plugins/windows-notification/yolort"
rm -rf "$yolort_dir"
mkdir "$yolort_dir"
curl -L -o "$file_name" "https://github.com/mxlgv/YoloRT/releases/download/dev1/$file_name"
echo "c2727e390da7e842f66e0a4cf0a9f5d9dfb665115bb554152d98f108d322bbc1 $file_name" | sha256sum --check --status
unzip -o "$file_name" -d "$yolort_dir"
rm -f "$file_name"
}
download_gtk4_git()
{
# FIXME: The bug fix https://gitlab.gnome.org/GNOME/gtk/-/issues/3749 is currently only available in the main branch,
# so GTK4 was builded from it. Needs to be replaced with a package from the MSYS2 repository when the changes get there.
url="https://github.com/mxlgv/mingw-w64-gtk4-git/releases/download/rel1"
gtk_pkg="mingw-w64-x86_64-gtk4-git-4.14.1.r62.gb1eed1c153-1-any.pkg.tar.zst"
gtk_gstreamer_pkg="mingw-w64-x86_64-gtk4-media-gstreamer-git-4.14.1.r62.gb1eed1c153-1-any.pkg.tar.zst"
curl -L -o "$gtk_pkg" "$url/$gtk_pkg"
curl -L -o "$gtk_gstreamer_pkg" "$url/$gtk_gstreamer_pkg"
pacman -U --needed --noconfirm "$gtk_pkg" "$gtk_gstreamer_pkg"
}
prepare()
{
msg "Installing MINGW64 build dependencies"
pacman -S --needed --noconfirm \
mingw64/mingw-w64-x86_64-gcc \
mingw64/mingw-w64-x86_64-cmake \
mingw64/mingw-w64-x86_64-ninja \
mingw64/mingw-w64-x86_64-libadwaita \
mingw64/mingw-w64-x86_64-sqlite3 \
mingw64/mingw-w64-x86_64-openssl \
mingw64/mingw-w64-x86_64-libgcrypt \
mingw64/mingw-w64-x86_64-libgee \
mingw64/mingw-w64-x86_64-vala \
mingw64/mingw-w64-x86_64-gsettings-desktop-schemas \
mingw64/mingw-w64-x86_64-qrencode \
mingw64/mingw-w64-x86_64-ntldd-git \
mingw64/mingw-w64-x86_64-gpgme \
mingw64/mingw-w64-x86_64-fontconfig \
mingw64/mingw-w64-x86_64-iso-codes \
mingw64/mingw-w64-x86_64-gstreamer \
mingw64/mingw-w64-x86_64-gst-plugins-bad \
mingw64/mingw-w64-x86_64-gst-plugins-good \
mingw64/mingw-w64-x86_64-gst-plugins-base \
mingw64/mingw-w64-x86_64-gst-plugins-ugly \
mingw64/mingw-w64-x86_64-nsis \
mingw64/mingw-w64-x86_64-libsignal-protocol-c \
mingw64/mingw-w64-x86_64-icu \
mingw64/mingw-w64-x86_64-meson \
git \
make \
unzip \
curl
msg "Downloading and install git versions of gtk4 and gtk4-media-gstreamer packages"
download_gtk4_git
msg "Successfully installed!"
msg "Download YoloRT headers"
download_yolort
msg "Successfully downloaded!"
}
configure_cmake()
{
msg "Running configuration for Windows"
./configure --program-prefix="$DIST_DIR" --no-debug --release --disable-fast-vapi --with-libsoup3 --with-tests
msg "Configured!"
}
build_cmake()
{
msg "Started building on $JOBS threads"
make -j"$JOBS"
msg "Successfully builded!"
msg "Installing Dino .."
make install
}
test_cmake()
{
msg "Run tests"
make test
}
configure_meson()
{
arg=${1:-"none"}
encr=${2:-"auto"}
local cmd=""
if [ x"${arg}" == x"reconfig" ]; then
cmd=--reconfigure
fi
mkdir -p $BUILD_DIR
meson setup ${cmd} --prefix "$DIST_DIR" \
-D crypto-backend=${encr} \
-D plugin-ice=enabled \
$PROJ_DIR $BUILD_DIR
}
build_meson()
{
meson compile -C $BUILD_DIR
meson install -C $BUILD_DIR
}
test_meson()
{
msg "Run tests"
meson test -C $BUILD_DIR
}
dist_install()
{
_dist_arg=${1:-$DIST_DIR}
msg "Generate dino-with-console.exe"
cp -f "$_dist_arg/bin/dino.exe" "$_dist_arg/bin/dino-with-console.exe"
# IMAGE_SUBSYSTEM_WINDOWS_CUI = 0x0003
# SUBSYSTEM_OFFSET = 0xDC (220)
printf '\x03\x00' | dd of="$_dist_arg/bin/dino-with-console.exe" bs=1 seek=220 count=2 conv=notrunc
msg "Copying MINGW64 dependencies"
cp /mingw64/bin/gdbus.exe "$_dist_arg/bin"
cp /mingw64/bin/gspawn-win64-helper.exe "$_dist_arg/bin"
cp /mingw64/bin/libcrypto-*-x64.dll "$_dist_arg/bin/"
cp -r /mingw64/lib/gstreamer-1.0 "$_dist_arg/lib"
mkdir -p "$_dist_arg/lib/gdk-pixbuf-2.0/" && cp -r /mingw64/lib/gdk-pixbuf-2.0 "$_dist_arg/lib/"
mkdir -p "$_dist_arg/lib/gio/" && cp -r /mingw64/lib/gio "$_dist_arg/lib/"
list=`find "$_dist_arg" -type f \( -name "*.exe" -o -name "*.dll" \) -exec \
ntldd -R {} + | \
grep "mingw64" | \
cut -f1 -d "=" | sort | uniq`
for a in $list; do
cp -fv "/mingw64/bin/$a" "$_dist_arg/bin/"
done
msg "Removing debug information from all EXE and DLL files"
find "$_dist_arg" -iname "*.exe" -exec strip -s {} +
find "$_dist_arg" -iname "*.dll" -exec strip -s {} +
find "$_dist_arg" -iname "*.a" -exec rm {} +
msg "Removing redudant header files"
rm -rf "$_dist_arg/include"
msg "Copy LICENSE"
cp -f "$PWD/LICENSE" "$_dist_arg/LICENSE"
msg "Copy icons, themes, locales and fonts"
cp -f "$PWD/main/dino.ico" "$_dist_arg/dino.ico"
cp -rf "/mingw64/share/xml" "$_dist_arg/share"
mkdir -p "$_dist_arg/etc/fonts" && cp -r /mingw64/etc/fonts "$_dist_arg/etc/"
mkdir -p "$_dist_arg/share/icons" && cp -r /mingw64/share/icons "$_dist_arg/share/"
mkdir -p "$_dist_arg/share/glib-2.0/schemas" && cp -rf /mingw64/share/glib-2.0/schemas "$_dist_arg/share/glib-2.0/"
msg "Successfully installed!"
}
build_installer()
{
msg "Building an installer for Windows using NSIS"
cd windows-installer
makensis dino.nsi
msg "Installer successfully builded!"
cd ..
}
clean()
{
rm -rf $BUILD_DIR $DIST_DIR
msg "Build artifacts removed successfull!"
}
help()
{
cat << EOF
Script to build Dino for windows using cmake or meson build-system.
By default it will be build using build directory
$BUILD_DIR
and installed to
$DIST_DIR
Usage: $0 [option]
Note: you may set the multiple options, but be sure that they will be
processed sequentially (one-by-one), e.g. command
$0 -s meson -c -b
will run buld config and _after_ that run build using meson, while
$0 -c -b -s meson
will run cmake-based configure & build commands and the -s option
wont have any effect. And the one
$0 -b -s meson -c
is incorrect, as it willtry to run build(for cmake), then configure
with for meson build.
--help, -h
print this help message.
--set-buildsys, -s
set (specify) build system name to be used
possible options are: cmake or meson
--prepare, -p
install build dependencies. may be done once.
--configure, -c
configure build using selected build-system.
--build, -b
invoke build.
--test, -t
run tests.
--reconfig, -r
reconfigure project, if minor changes were
done to build config files but build has been
configured already (only for meson!).
--whipe, -w
remove build artifacts from $BUILD_DIR
--verbose, -v
verbose output enable.
--dist-install, -i
install the builded project along with its'
dependencies.
--build-installer
build installer (using NSIS)
Running without parameters will run configure, build & install
using cmake-based build-system as default one.
EOF
}
if [[ "$(uname)" != "MINGW64_NT"* ]]; then
fatal "This is not a MINGW64 environment!"
fi
# no options provided,simply build with defaults
if [[ $# == 0 ]]; then
prepare
configure_${build_sys}
build_${build_sys}
dist_install
exit 0
fi
while [[ $# > 0 ]];
do
case $1 in
--prepare|-p)
prepare
;;
--configure|-c)
configure_${build_sys}
;;
--build|-b)
build_${build_sys}
;;
--test|-t)
test_${build_sys}
;;
--reconfig|-r)
configure_${build_sys} reconfig
;;
--whipe|-w)
clean
;;
--dist-install|-i)
dist_install
;;
--verbose|-v)
set -xv
;;
--help|-h)
help
exit 0;
;;
--build-installer)
build_installer
;;
--set-buildsys|-s)
if [ x"$2" != x"cmake" -a x"$2" != x"meson" ]; then
fatal "Improper build system selected: ${2}!"
exit 1;
fi
build_sys=$2
shift
;;
-*)
echo "Unknown option $1"
exit 1
;;
esac
shift
done

View file

@ -47,7 +47,7 @@ function(_compute_version_from_git)
return()
endif (NOT git_result EQUAL 0)
if (git_tag MATCHES "^v?([0-9]+[.]?[0-9]*[.]?[0-9]*[.]?[0-9]*)(-[.0-9A-Za-z-]+)?([+][.0-9A-Za-z-]+)?$")
if (git_tag MATCHES "^v?([0-9]+[.]?[0-9]*[.]?[0-9]*)(-[.0-9A-Za-z-]+)?([+][.0-9A-Za-z-]+)?$")
set(VERSION_LAST_RELEASE "${CMAKE_MATCH_1}")
else ()
return()

View file

@ -1,11 +0,0 @@
find_library(GstWebrtcDsp_LIBRARY gstwebrtcdsp PATH_SUFFIXES gstreamer-1.0)
if(GstWebrtcDsp_LIBRARY_FOUND)
find_package(Gst)
set(GstWebrtcDsp_VERSION ${Gst_VERSION})
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GstWebrtcDsp
REQUIRED_VARS GstWebrtcDsp_LIBRARY
VERSION_VAR GstWebrtcDsp_VERSION)

View file

@ -0,0 +1,12 @@
include(PkgConfigWithFallback)
find_pkg_config_with_fallback(WebRTCAudioProcessing
PKG_CONFIG_NAME webrtc-audio-processing
LIB_NAMES webrtc_audio_processing
INCLUDE_NAMES webrtc/modules/audio_processing/include/audio_processing.h
INCLUDE_DIR_SUFFIXES webrtc-audio-processing webrtc_audio_processing
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(WebRTCAudioProcessing
REQUIRED_VARS WebRTCAudioProcessing_LIBRARY
VERSION_VAR WebRTCAudioProcessing_VERSION)

View file

@ -1,34 +0,0 @@
# This is a package creation module using CPack.
# Currently only DEB package generation is supported.
set(CPACK_PACKAGE_NAME dino-plus)
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY
"modern XMPP/Jabber client software, based on Dino.
Dino+ is a fork of Dino, a modern XMPP/Jabber client
written in Vala using GTK+, which includes a few
relatively minor but important quality-of-life features.")
set(CPACK_VERBATIM_VARIABLES YES)
set(CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME})
set(CPACK_PACKAGE_INSTALL_DIRECTORY ${CPACK_PACKAGE_NAME})
set(CPACK_OUTPUT_FILE_PREFIX "${CMAKE_SOURCE_DIR}/_packages")
set(CPACK_PACKAGE_VERSION ${VERSION_FULL})
set(CPACK_PACKAGE_HOMEPAGE_URL "https://github.com/mxlgv/dino")
set(CPACK_PACKAGE_CONTACT "maxlogaev@proton.me")
set(CPACK_COMPONENTS_GROUPING ALL_COMPONENTS_IN_ONE)
set(CPACK_STRIP_FILES TRUE)
# For DEB only
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Maxim Logaev <${CPACK_PACKAGE_CONTACT}>")
set(CPACK_DEB_COMPONENT_INSTALL YES)
set(CPACK_DEBIAN_PACKAGE_SECTION "net")
set(CPACK_DEBIAN_PACKAGE_CONFLICTS "dino-im, dino-im-common")
set(CPACK_DEBIAN_PACKAGE_RECOMMENDS "ca-certificates, dbus, fonts-noto-color-emoji, network-manager")
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS ON)
set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY ">=")
install(FILES ${CMAKE_SOURCE_DIR}/LICENSE_SHORT DESTINATION ${SHARE_INSTALL_PREFIX}/doc/${CPACK_PACKAGE_NAME} RENAME copyright)
install(FILES ${CMAKE_SOURCE_DIR}/README.md DESTINATION ${SHARE_INSTALL_PREFIX}/doc/${CPACK_PACKAGE_NAME})
include(CPack)

View file

@ -13,16 +13,11 @@ function(find_pkg_config_with_fallback name)
# Found via pkg-config, using its result values
set(${name}_FOUND ${${name}_PKG_CONFIG_FOUND})
if(MINGW)
set(MINGWLIBPATH ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES})
endif(MINGW)
# Try to find real file name of libraries
foreach(lib ${${name}_PKG_CONFIG_LIBRARIES})
find_library(${name}_${lib}_LIBRARY ${lib} HINTS ${${name}_PKG_CONFIG_LIBRARY_DIRS} ${MINGWLIBPATH})
find_library(${name}_${lib}_LIBRARY ${lib} HINTS ${${name}_PKG_CONFIG_LIBRARY_DIRS})
mark_as_advanced(${name}_${lib}_LIBRARY)
if(NOT ${name}_${lib}_LIBRARY)
message(${name} ": " ${lib} " library not found")
unset(${name}_FOUND)
endif(NOT ${name}_${lib}_LIBRARY)
endforeach(lib)

View file

@ -13,16 +13,11 @@ function(find_pkg_config_with_fallback_on_config_script name)
# Found via pkg-config, using it's result values
set(${name}_FOUND ${${name}_PKG_CONFIG_FOUND})
if(MINGW)
set(MINGWLIBPATH ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES})
endif(MINGW)
# Try to find real file name of libraries
foreach(lib ${${name}_PKG_CONFIG_LIBRARIES})
find_library(${name}_${lib}_LIBRARY ${lib} HINTS ${${name}_PKG_CONFIG_LIBRARY_DIRS} ${MINGWLIBPATH})
find_library(${name}_${lib}_LIBRARY ${lib} HINTS ${${name}_PKG_CONFIG_LIBRARY_DIRS})
mark_as_advanced(${name}_${lib}_LIBRARY)
if(NOT ${name}_${lib}_LIBRARY)
message(${name} ": " ${lib} " library not found")
unset(${name}_FOUND)
endif(NOT ${name}_${lib}_LIBRARY)
endforeach(lib)

65
configure vendored
View file

@ -1,7 +1,7 @@
#!/bin/sh
OPTS=`getopt -o "h" --long \
help,fetch-only,no-debug,disable-fast-vapi,with-tests,release,with-libsoup3,without-webrtcdsp,\
help,fetch-only,no-debug,disable-fast-vapi,with-tests,release,with-libsignal-in-tree,with-libsoup3,\
enable-plugin:,disable-plugin:,\
prefix:,program-prefix:,exec-prefix:,lib-suffix:,\
bindir:,libdir:,includedir:,datadir:,\
@ -15,13 +15,14 @@ eval set -- "$OPTS"
PREFIX=${PREFIX:-/usr/local}
ENABLED_PLUGINS=
DISABLED_PLUGINS=
BUILD_TESTS=no
BUILD_LIBSIGNAL_IN_TREE=
BUILD_TESTS=
BUILD_TYPE=Debug
DISABLE_FAST_VAPI=
LIB_SUFFIX=
NO_DEBUG=
FETCH_ONLY=
USE_SOUP3=
PLUGIN_RTP_WEBRTC_AUDIO_PROCESSING=yes
EXEC_PREFIX=
BINDIR=
@ -54,8 +55,9 @@ Configuration:
without network access later and exit.
--no-debug Build without debug symbols
--release Configure to build an optimized release version
--with-libsignal-in-tree Build libsignal-protocol-c in tree and link it
statically.
--with-libsoup3 Build with libsoup-3.0
--without-webrtcdsp Build without WebRTC audio processing
--with-tests Also build tests.
Plugin configuration:
@ -108,12 +110,13 @@ while true; do
--enable-plugin ) if [ -z "$ENABLED_PLUGINS" ]; then ENABLED_PLUGINS="$2"; else ENABLED_PLUGINS="$ENABLED_PLUGINS;$2"; fi; shift; shift ;;
--disable-plugin ) if [ -z "$DISABLED_PLUGINS" ]; then DISABLED_PLUGINS="$2"; else DISABLED_PLUGINS="$DISABLED_PLUGINS;$2"; fi; shift; shift ;;
--valac ) VALA_EXECUTABLE="$2"; shift; shift ;;
--valac-flags ) VALACFLAGS="$2"; shift; shift ;;
--valac-flags ) VALAC_FLAGS="$2"; shift; shift ;;
--lib-suffix ) LIB_SUFFIX="$2"; shift; shift ;;
--with-libsignal-in-tree ) BUILD_LIBSIGNAL_IN_TREE=yes; shift ;;
--with-libsoup3 ) USE_SOUP3=yes; shift ;;
--without-webrtcdsp ) PLUGIN_RTP_WEBRTC_AUDIO_PROCESSING=no; shift ;;
--disable-fast-vapi ) DISABLE_FAST_VAPI=yes; shift ;;
--no-debug ) NO_DEBUG=yes; shift ;;
--fetch-only ) FETCH_ONLY=yes; shift ;;
--release ) BUILD_TYPE=RelWithDebInfo; shift ;;
--with-tests ) BUILD_TESTS=yes; shift ;;
# Autotools paths
@ -138,6 +141,50 @@ while true; do
esac
done
if [ "$BUILD_LIBSIGNAL_IN_TREE" = "yes" ] || [ "$FETCH_ONLY" = "yes" ]; then
if [ -d ".git" ]; then
git submodule update --init 2>/dev/null
else
tmp=0
for i in $(cat .gitmodules | grep -n submodule | awk -F ':' '{print $1}') $(wc -l .gitmodules | awk '{print $1}'); do
if ! [ $tmp -eq 0 ]; then
name=$(cat .gitmodules | head -n $tmp | tail -n 1 | awk -F '"' '{print $2}')
def=$(cat .gitmodules | head -n $i | tail -n $(expr "$i" - "$tmp") | awk -F ' ' '{print $1 $2 $3}')
path=$(echo "$def" | grep '^path=' | awk -F '=' '{print $2}')
url=$(echo "$def" | grep '^url=' | awk -F '=' '{print $2}')
branch=$(echo "$def" | grep '^branch=' | awk -F '=' '{print $2}')
if ! ls "$path"/* >/dev/null 2>/dev/null; then
git=$(which git)
if ! [ $? -eq 0 ] || ! [ -x $git ]; then
echo "Failed retrieving missing files"
exit 5
fi
res=$(git clone "$url" "$path" 2>&1)
if ! [ $? -eq 0 ] || ! [ -d $path ]; then
echo "Failed retrieving missing files: $res"
exit 5
fi
if [ -n "$branch" ]; then
olddir="$(pwd)"
cd "$path"
res=$(git checkout "$branch" 2>&1)
if ! [ $? -eq 0 ]; then
echo "Failed retrieving missing files: $res"
exit 5
fi
cd "$olddir"
fi
echo "Submodule path '$path': checked out '$branch' (via git clone)"
fi
fi
tmp=$i
done
fi
fi
if [ "$FETCH_ONLY" = "yes" ]; then exit 0; fi
if [ ! -x "$(which cmake 2>/dev/null)" ]
then
echo "-!- CMake required."
@ -210,7 +257,8 @@ cmake -G "$cmake_type" \
-DCMAKE_BUILD_TYPE="$BUILD_TYPE" \
-DENABLED_PLUGINS="$ENABLED_PLUGINS" \
-DDISABLED_PLUGINS="$DISABLED_PLUGINS" \
-DBUILD_TESTING="$BUILD_TESTS" \
-DBUILD_TESTS="$BUILD_TESTS" \
-DBUILD_LIBSIGNAL_IN_TREE="$BUILD_LIBSIGNAL_IN_TREE" \
-DUSE_SOUP3="$USE_SOUP3" \
-DVALA_EXECUTABLE="$VALAC" \
-DCMAKE_VALA_FLAGS="$VALACFLAGS" \
@ -222,7 +270,6 @@ cmake -G "$cmake_type" \
-DBIN_INSTALL_DIR="$BINDIR" \
-DINCLUDE_INSTALL_DIR="$INCLUDEDIR" \
-DLIB_INSTALL_DIR="$LIBDIR" \
-DPLUGIN_RTP_WEBRTC_AUDIO_PROCESSING="$PLUGIN_RTP_WEBRTC_AUDIO_PROCESSING" \
-Wno-dev \
.. || exit 9
@ -242,6 +289,8 @@ default:
@sh -c "cd build; $exec_command"
distclean: clean uninstall
test: default
echo "make test not yet supported"
%:
@sh -c "cd build; $exec_command \"\$@\""
EOF

View file

@ -14,7 +14,7 @@ SOURCES
"src/random.vala"
"src/srtp.vala"
CUSTOM_VAPIS
"${CMAKE_CURRENT_SOURCE_DIR}/vapi/libgcrypt.vapi"
"${CMAKE_CURRENT_SOURCE_DIR}/vapi/gcrypt.vapi"
"${CMAKE_CURRENT_SOURCE_DIR}/vapi/libsrtp2.vapi"
PACKAGES
${CRYPTO_VALA_PACKAGES}
@ -22,8 +22,6 @@ GENERATE_VAPI
crypto-vala
GENERATE_HEADER
crypto-vala
DEFINITIONS
GCRYPT
)
add_custom_target(crypto-vala-vapi

View file

@ -1,2 +0,0 @@
gio-2.0
glib-2.0

View file

@ -1,28 +0,0 @@
dependencies = [
dep_gio,
dep_glib,
dep_libgcrypt_or_openssl,
dep_libsrtp2,
]
sources = files(
'src/cipher.vala',
'src/cipher_converter.vala',
'src/error.vala',
'src/random.vala',
'src/srtp.vala',
)
c_args = [
'-DG_LOG_DOMAIN="crypto-vala"',
]
vala_args = [
'--vapidir', meson.current_source_dir() / 'vapi',
]
if crypto_backend == 'openssl'
vala_args += ['--pkg', 'openssl'] # Work around https://github.com/mesonbuild/meson/issues/2103.
elif crypto_backend == 'gnutls'
vala_args += ['-D', 'GCRYPT']
endif
lib_crypto_vala = library('crypto-vala', sources, c_args: c_args, vala_args: vala_args, dependencies: dependencies, version: '0.0', install: true, install_dir: [true, true, true])
dep_crypto_vala = declare_dependency(link_with: lib_crypto_vala, include_directories: include_directories('.'))
install_data('crypto-vala.deps', install_dir: get_option('datadir') / 'vala/vapi') # TODO: workaround for https://github.com/mesonbuild/meson/issues/9756

View file

@ -1,24 +1,14 @@
namespace Crypto {
public class SymmetricCipher {
#if GCRYPT
private GCrypt.Cipher.Cipher cipher;
#else
bool is_encryption;
private OpenSSL.EVP.CipherContext? cipher;
#endif
public static bool supports(string algo_name) {
#if GCRYPT
GCrypt.Cipher.Algorithm algo;
GCrypt.Cipher.Mode mode;
GCrypt.Cipher.Flag flags;
return parse(algo_name, out algo, out mode, out flags);
#else
return algo_name == "AES-GCM";
#endif
}
#if GCRYPT
private static unowned string mode_to_string(GCrypt.Cipher.Mode mode) {
switch (mode) {
case GCrypt.Cipher.Mode.ECB: return "ECB";
@ -105,18 +95,8 @@ public class SymmetricCipher {
return algo.to_string();
}
}
#endif
public SymmetricCipher.encryption(string algo_name) throws Error {
this.initialize(algo_name, true);
}
public SymmetricCipher.decryption(string algo_name) throws Error {
this.initialize(algo_name, false);
}
private SymmetricCipher.initialize(string algo_name, bool is_encryption) throws Error {
#if GCRYPT
public SymmetricCipher(string algo_name) throws Error {
GCrypt.Cipher.Algorithm algo;
GCrypt.Cipher.Mode mode;
GCrypt.Cipher.Flag flags;
@ -125,157 +105,48 @@ public class SymmetricCipher {
} else {
throw new Error.ILLEGAL_ARGUMENTS(@"The algorithm $algo_name is not supported");
}
#else
if (algo_name == "AES-GCM") {
this.openssl(is_encryption);
} else {
throw new Error.ILLEGAL_ARGUMENTS(@"The algorithm $algo_name is not supported");
}
#endif
}
#if GCRYPT
private SymmetricCipher.gcrypt(GCrypt.Cipher.Algorithm algo, GCrypt.Cipher.Mode mode, GCrypt.Cipher.Flag flags) throws Error {
may_throw_gcrypt_error(GCrypt.Cipher.Cipher.open(out this.cipher, algo, mode, flags));
}
#else
private SymmetricCipher.openssl(bool is_encryption) throws Error {
this.is_encryption = is_encryption;
cipher = new OpenSSL.EVP.CipherContext();
if (is_encryption) {
if (cipher.encrypt_init(OpenSSL.EVP.aes_128_gcm(), null, null, null) != 1) {
openssl_error();
}
} else {
if (cipher.decrypt_init(OpenSSL.EVP.aes_128_gcm(), null, null, null) != 1) {
openssl_error();
}
}
}
#endif
public void set_key(uint8[] key) throws Error {
#if GCRYPT
may_throw_gcrypt_error(cipher.set_key(key));
#else
if (key.length != 16) {
throw new Crypto.Error.ILLEGAL_ARGUMENTS("key length must be 16 for AES-GCM");
}
if (is_encryption) {
if (cipher.encrypt_init(null, null, key, null) != 1) {
openssl_error();
}
} else {
if (cipher.decrypt_init(null, null, key, null) != 1) {
openssl_error();
}
}
#endif
}
public void set_iv(uint8[] iv) throws Error {
#if GCRYPT
may_throw_gcrypt_error(cipher.set_iv(iv));
#else
if (iv.length != 12) {
throw new Crypto.Error.ILLEGAL_ARGUMENTS("intialization vector must be of length 16 for AES-GCM");
}
if (is_encryption) {
if (cipher.encrypt_init(null, null, null, iv) != 1) {
openssl_error();
}
} else {
if (cipher.decrypt_init(null, null, null, iv) != 1) {
openssl_error();
}
}
#endif
}
public void set_counter_vector(uint8[] ctr) throws Error {
may_throw_gcrypt_error(cipher.set_counter_vector(ctr));
}
public void reset() throws Error {
#if GCRYPT
may_throw_gcrypt_error(cipher.reset());
#else
throw new Crypto.Error.ILLEGAL_ARGUMENTS("can't reset OpenSSL cipher context");
#endif
}
public uint8[] get_tag(size_t taglen) throws Error {
uint8[] tag = new uint8[taglen];
#if GCRYPT
may_throw_gcrypt_error(cipher.get_tag(tag));
#else
if (!is_encryption) {
throw new Crypto.Error.ILLEGAL_ARGUMENTS("can't call get_tag on decryption context");
}
uint8[] empty = new uint8[0];
int empty_len = 0;
if (cipher.encrypt_final(empty, out empty_len) != 1) {
openssl_error();
}
if (empty_len != 0) {
throw new Crypto.Error.ILLEGAL_ARGUMENTS("get_tag called on a stream with remaining data");
}
if (cipher.ctrl(OpenSSL.EVP.CTRL_GCM_GET_TAG, (int)taglen, tag) != 1) {
openssl_error();
}
#endif
return tag;
}
public void check_tag(uint8[] tag) throws Error {
#if GCRYPT
may_throw_gcrypt_error(cipher.check_tag(tag));
#else
if (is_encryption) {
throw new Crypto.Error.ILLEGAL_ARGUMENTS("can't call check_tag on encryption context");
}
if (cipher.ctrl(OpenSSL.EVP.CTRL_GCM_SET_TAG, tag.length, tag) != 1) {
openssl_error();
}
uint8[] empty = new uint8[0];
int empty_len = 0;
if (cipher.decrypt_final(empty, out empty_len) != 1) {
openssl_error();
}
if (empty_len != 0) {
throw new Crypto.Error.ILLEGAL_ARGUMENTS("check_tag called on a stream with remaining data");
}
#endif
}
public void encrypt(uint8[] output, uint8[] input) throws Error {
#if GCRYPT
may_throw_gcrypt_error(cipher.encrypt(output, input));
#else
if (!is_encryption) {
throw new Crypto.Error.ILLEGAL_ARGUMENTS("can't call encrypt on decryption context");
}
int output_length = output.length;
if (cipher.encrypt_update(output, out output_length, input) != 1) {
openssl_error();
}
if (output_length != output.length) {
throw new Crypto.Error.ILLEGAL_ARGUMENTS("invalid output array length");
}
#endif
}
public void decrypt(uint8[] output, uint8[] input) throws Error {
#if GCRYPT
may_throw_gcrypt_error(cipher.decrypt(output, input));
#else
if (is_encryption) {
throw new Crypto.Error.ILLEGAL_ARGUMENTS("can't call decrypt on encryption context");
}
int output_length = output.length;
if (cipher.decrypt_update(output, out output_length, input) != 1) {
openssl_error();
}
if (output_length != output.length) {
throw new Crypto.Error.ILLEGAL_ARGUMENTS("invalid output array length");
}
#endif
}
public void sync() throws Error {
may_throw_gcrypt_error(cipher.sync());
}
}
}

View file

@ -3,20 +3,13 @@ namespace Crypto {
public errordomain Error {
ILLEGAL_ARGUMENTS,
GCRYPT,
OPENSSL,
AUTHENTICATION_FAILED,
UNKNOWN
}
#if GCRYPT
internal void may_throw_gcrypt_error(GCrypt.Error e) throws Error {
if (((int)e) != 0) {
throw new Crypto.Error.GCRYPT(e.to_string());
}
}
#else
internal void openssl_error() throws Error {
throw new Crypto.Error.OPENSSL(OpenSSL.ERR.reason_error_string(OpenSSL.ERR.get_error()));
}
#endif
}
}

View file

@ -1,9 +1,5 @@
namespace Crypto {
public static void randomize(uint8[] buffer) {
#if GCRYPT
GCrypt.Random.randomize(buffer);
#else
OpenSSL.RAND.bytes(buffer);
#endif
}
}
}

View file

@ -1,822 +0,0 @@
/* OpenSSL Vala Bindings
* Copyright 2020 Zuhong Tao <taozuhong@gmail>
* Copyright 2016 Guillaume Poirier-Morency <guillaumepoiriermorency@gmail>
* Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/
[CCode (cprefix = "")]
namespace OpenSSL
{
[CCode (cprefix = "AES_", lower_case_cprefix = "AES_", cheader_filename = "openssl/aes.h")]
namespace AES
{
public const int BLOCK_SIZE;
}
[Compact]
[CCode (cname = "ENGINE", lower_case_cprefix = "ENGINE_", cprefix = "ENGINE_", cheader_filename = "openssl/engine.h", free_function = "ENGINE_free")]
public class Engine {
[CCode (cname = "ENGINE_new")]
public Engine ();
[CCode (cname = "ENGINE_by_id")]
public Engine.by_id (string id);
[CCode (cname = "ENGINE_get_default_RSA")]
public Engine.get_default_RSA ();
[CCode (cname = "ENGINE_get_default_DSA")]
public Engine.get_default_DSA ();
[CCode (cname = "ENGINE_get_default_DH")]
public Engine.get_default_DH ();
[CCode (cname = "ENGINE_get_default_RAND")]
public Engine.get_default_RAND ();
[CCode (cname = "ENGINE_get_cipher_engine")]
public Engine.get_cipher_engine (int nid);
[CCode (cname = "ENGINE_get_digest_engine")]
public Engine.get_digest_engine (int nid);
public int init ();
public int finish ();
public int set_default (uint flags);
public int set_default_RSA ();
public int set_default_DSA ();
public int set_default_DH ();
public int set_default_RAND ();
public int set_default_ciphers ();
public int set_default_digests ();
public int set_default_string (string list);
}
[CCode (cprefix = "NID_", cheader_filename = "openssl/objects.h")]
public enum NID
{
sha256
}
[Compact]
[CCode (cname = "BIO_METHOD", cheader_filename = "openssl/bio.h", free_function = "BIO_meth_free")]
public class BIOMethod
{
public const int BIO_TYPE_DESCRIPTOR;
public const int BIO_TYPE_FILTER;
public const int BIO_TYPE_SOURCE_SINK;
public const int BIO_TYPE_NONE;
public const int BIO_TYPE_MEM;
public const int BIO_TYPE_FILE;
public const int BIO_TYPE_FD;
public const int BIO_TYPE_SOCKET;
public const int BIO_TYPE_NULL;
public const int BIO_TYPE_SSL;
public const int BIO_TYPE_MD;
public const int BIO_TYPE_BUFFER;
public const int BIO_TYPE_CIPHER;
public const int BIO_TYPE_BASE64;
public const int BIO_TYPE_CONNECT;
public const int BIO_TYPE_ACCEPT;
public const int BIO_TYPE_NBIO_TEST;
public const int BIO_TYPE_NULL_FILTER;
public const int BIO_TYPE_BIO;
public const int BIO_TYPE_LINEBUFFER;
public const int BIO_TYPE_DGRAM;
public const int BIO_TYPE_ASN1;
public const int BIO_TYPE_COMP;
public const int BIO_TYPE_DGRAM_SCTP;
[CCode (cname = "BIO_meth_new")]
public BIOMethod (int type, string name);
[CCode (cname = "BIO_get_new_index")]
public int get_new_index ();
}
[Compact]
[CCode (lower_case_cprefix = "BUF_MEM_", cheader_filename = "openssl/buffer.h", free_function = "BUF_MEM_free")]
public class Buffer {
[CCode (cname = "BUF_MEM_new")]
public Buffer ();
[CCode (cname = "BUF_MEM_new_ex")]
public Buffer.with_flags ();
public int grow (int len);
public size_t grow_clean (size_t len);
}
[Compact]
[CCode (lower_case_cprefix = "BIO_", cheader_filename = "openssl/bio.h", free_function = "BIO_free")]
public class BIO
{
public const int NOCLOSE;
public static unowned BIOMethod s_mem ();
public static unowned BIOMethod s_secmem ();
public BIO (BIOMethod type);
[CCode (cname = "BIO_new_file")]
public BIO.with_file (string filename, string mode);
[CCode (cname = "BIO_new_fp")]
public BIO.with_stream (GLib.FileStream stream, int flags);
[CCode (cname = "BIO_new_mem_buf")]
public BIO.with_buffer (uint8[] buf);
public int read_filename (string name);
public int write_filename (string name);
public int append_filename (string name);
public int rw_filename (string name);
public int set_mem_eof_return (int v);
public long get_mem_data ([CCode (array_length = false)] out uint8[] pp);
public int set_mem_buf (Buffer bm, int c);
public int get_mem_ptr (out Buffer pp);
public int set (BIOMethod type);
public int read (uint8[] data);
public int write (uint8[] data);
[PrintfFormat]
public int printf (string format, ...);
[PrintfFormat]
public int vprintf (string format, va_list args);
[PrintfFormat]
public static int snprintf (uint8[] buf, string format, ...);
[PrintfFormat]
public static int vsnprintf (uint8[] buf, string format, va_list args);
public int reset ();
public int seek (int ofs);
public int pending ();
public int wpending ();
public int flush ();
public int eof ();
public int tell ();
public int set_close (long flag);
public int get_close ();
public long ctrl (int cmd, long larg, [CCode (array_length = false)] uint8[] parg);
public int read_ex (uint8[] data, out size_t readbytes);
public int write_ex (uint8[] data, out size_t written);
}
[CCode (lower_case_cprefix = "CRYPTO_", cheader_filename = "openssl/crypto.h")]
namespace Crypto
{
public int memcmp (void* v1, void* v2, size_t n);
}
[Compact]
[CCode (cname = "ASN1_PCTX", lower_case_cprefix = "ASN1_PCTX_", free_function = "ASN1_PCTX_free")]
public class ASN1_PCTX {
public ASN1_PCTX ();
public ulong get_flags ();
public void set_flags (ulong flags);
public ulong get_nm_flags ();
public void set_nm_flags (ulong flags);
public ulong get_cert_flags ();
public void set_cert_flags (ulong flags);
public ulong get_oid_flags ();
public void set_oid_flags (ulong flags);
public ulong get_str_flags ();
public void set_str_flags (ulong flags);
}
[Compact]
[CCode (cname = "ASN1_SCTX", lower_case_cprefix = "ASN1_SCTX_", free_function = "ASN1_SCTX_free")]
public class ASN1_SCTX {
public ASN1_SCTX ();
public ulong get_flags ();
}
[CCode (cprefix = "EVP_", lower_case_cprefix = "EVP_", cheader_filename = "openssl/evp.h")]
namespace EVP
{
public const int CIPH_STREAM_CIPHER;
public const int CIPH_ECB_MODE;
public const int CIPH_CBC_MODE;
public const int CIPH_CFB_MODE;
public const int CIPH_OFB_MODE;
public const int CIPH_CTR_MODE;
public const int CIPH_GCM_MODE;
public const int CIPH_CCM_MODE;
public const int CIPH_XTS_MODE;
public const int CIPH_WRAP_MODE;
public const int CIPH_OCB_MODE;
public const int CIPH_MODE;
public const int CIPH_VARIABLE_LENGTH;
public const int CIPH_CUSTOM_IV;
public const int CIPH_ALWAYS_CALL_INIT;
public const int CIPH_CTRL_INIT;
public const int CIPH_CUSTOM_KEY_LENGTH;
public const int CIPH_NO_PADDING;
public const int CIPH_RAND_KEY;
public const int CIPH_CUSTOM_COPY;
public const int CIPH_CUSTOM_IV_LENGTH;
public const int CIPH_FLAG_DEFAULT_ASN1;
public const int CIPH_FLAG_LENGTH_BITS;
public const int CIPH_FLAG_FIPS;
public const int CIPH_FLAG_NON_FIPS_ALLOW;
public const int CIPH_FLAG_CUSTOM_CIPHER;
public const int CIPH_FLAG_AEAD_CIPHER;
public const int CIPH_FLAG_TLS1_1_MULTIBLOCK;
public const int CIPH_FLAG_PIPELINE;
public const int CTRL_INIT;
public const int CTRL_SET_KEY_LENGTH;
public const int CTRL_GET_RC2_KEY_BITS;
public const int CTRL_SET_RC2_KEY_BITS;
public const int CTRL_GET_RC5_ROUNDS;
public const int CTRL_SET_RC5_ROUNDS;
public const int CTRL_RAND_KEY;
public const int CTRL_PBE_PRF_NID;
public const int CTRL_COPY;
public const int CTRL_AEAD_SET_IVLEN;
public const int CTRL_AEAD_GET_TAG;
public const int CTRL_AEAD_SET_TAG;
public const int CTRL_AEAD_SET_IV_FIXED;
public const int CTRL_GCM_SET_IVLEN;
public const int CTRL_GCM_GET_TAG;
public const int CTRL_GCM_SET_TAG;
public const int CTRL_GCM_SET_IV_FIXED;
public const int CTRL_GCM_IV_GEN;
public const int CTRL_CCM_SET_IVLEN;
public const int CTRL_CCM_GET_TAG;
public const int CTRL_CCM_SET_TAG;
public const int CTRL_CCM_SET_IV_FIXED;
public const int CTRL_CCM_SET_L;
public const int CTRL_CCM_SET_MSGLEN;
public const int CTRL_AEAD_TLS1_AAD;
public const int CTRL_AEAD_SET_MAC_KEY;
public const int CTRL_GCM_SET_IV_INV;
public const int CTRL_TLS1_1_MULTIBLOCK_AAD;
public const int CTRL_TLS1_1_MULTIBLOCK_ENCRYPT;
public const int CTRL_TLS1_1_MULTIBLOCK_DECRYPT;
public const int CTRL_TLS1_1_MULTIBLOCK_MAX_BUFSIZE;
public const int CTRL_SSL3_MASTER_SECRET;
public const int CTRL_SET_SBOX;
public const int CTRL_SBOX_USED;
public const int CTRL_KEY_MESH;
public const int CTRL_BLOCK_PADDING_MODE;
public const int CTRL_SET_PIPELINE_OUTPUT_BUFS;
public const int CTRL_SET_PIPELINE_INPUT_BUFS;
public const int CTRL_SET_PIPELINE_INPUT_LENS;
public const int CTRL_GET_IVLEN;
[CCode (cprefix = "EVP_PADDING_")]
public enum Padding {
PKCS7,
ISO7816_4,
ANSI923,
ISO10126,
ZERO,
}
[CCode (cprefix = "EVP_PKEY_OP_")]
public enum PublicKeyOperation {
UNDEFINED,
PARAMGEN,
KEYGEN,
SIGN,
VERIFY,
VERIFYRECOVER,
SIGNCTX,
VERIFYCTX,
ENCRYPT,
DECRYPT,
DERIVE,
}
public const int PKEY_OP_TYPE_SIG;
public const int PKEY_OP_TYPE_CRYPT;
public const int PKEY_OP_TYPE_NOGEN;
public const int PKEY_OP_TYPE_GEN;
[CCode (cprefix = "EVP_PKEY_CTRL_")]
public enum PublicKeyControl {
MD,
PEER_KEY,
PKCS7_ENCRYPT,
PKCS7_DECRYPT,
PKCS7_SIGN,
SET_MAC_KEY,
DIGESTINIT,
SET_IV,
CMS_ENCRYPT,
CMS_DECRYPT,
CMS_SIGN,
CIPHER,
GET_MD,
SET_DIGEST_SIZE,
}
[CCode (cprefix = "EVP_PKEY_CTRL_", cheader_filename = "openssl/rsa.h")]
public enum PublicKeyRsaControl {
RSA_PADDING,
RSA_PSS_SALTLEN,
RSA_KEYGEN_BITS,
RSA_KEYGEN_PUBEXP,
RSA_MGF1_MD,
GET_RSA_PADDING,
GET_RSA_PSS_SALTLEN,
GET_RSA_MGF1_MD,
RSA_OAEP_MD,
RSA_OAEP_LABEL,
GET_RSA_OAEP_MD,
GET_RSA_OAEP_LABEL,
RSA_KEYGEN_PRIMES,
}
[Compact]
[CCode (cname = "EVP_PKEY", lower_case_cprefix = "EVP_PKEY_", cprefix = "EVP_PKEY_", free_function = "EVP_PKEY_free")]
public class PublicKey {
public const int NONE;
public const int RSA;
public const int RSA2;
public const int RSA_PSS;
public const int DSA;
public const int DSA1;
public const int DSA2;
public const int DSA3;
public const int DSA4;
public const int DH;
public const int DHX;
public const int EC;
public const int SM2;
public const int HMAC;
public const int CMAC;
public const int SCRYPT;
public const int TLS1_PRF;
public const int HKDF;
public const int POLY1305;
public const int SIPHASH;
public const int X25519;
public const int ED25519;
public const int X448;
public const int ED448;
public PublicKey ();
[CCode (cname = "EVP_PKEY_new_raw_private_key")]
public PublicKey.raw_private_key (int type, Engine? e, uint8[] key);
[CCode (cname = "EVP_PKEY_new_raw_public_key")]
public PublicKey.raw_public_key (int type, Engine? e, uint8[] key);
[CCode (cname = "EVP_PKEY_new_CMAC_key")]
public PublicKey.CMAC_key (Engine? e, uint8[] priv, Cipher? cipher);
[CCode (cname = "EVP_PKEY_new_mac_key")]
public PublicKey.mac_key (int type, Engine? e, uint8[] key);
public int id ();
public int size ();
public int base_id ();
public static int type (int type);
public int set_alias_type (int type);
public int up_ref ();
public RSA? get1_RSA ();
public RSA? get0_RSA ();
public int set1_RSA (RSA? key);
public int assign_RSA (RSA? key);
public int security_bits ();
[CCode (instance_pos = 1.1)]
public int print_public (BIO out, int indent, ASN1_PCTX? pctx);
[CCode (instance_pos = 1.1)]
public int print_private (BIO out, int indent, ASN1_PCTX? pctx);
public Engine? get0_engine ();
public int set1_engine (Engine? engine);
public int get_raw_private_key ([CCode (array_length = false)] uint8[] priv, out size_t len);
public int get_raw_public_key ([CCode (array_length = false)] uint8[] pub, out size_t len);
}
[Compact]
[CCode (cname = "EVP_PKEY_CTX", lower_case_cprefix = "EVP_PKEY_CTX_", cprefix = "EVP_PKEY_CTX_", free_function = "EVP_PKEY_CTX_free")]
public class PublicKeyContext {
public PublicKeyContext (PublicKey pkey, Engine? e);
public PublicKeyContext.id (int id, Engine? e);
public PublicKeyContext dup ();
public int ctrl_str (string type, string value);
public int ctrl_uint64(int keytype, int optype, int cmd, uint64 value);
public int ctrl (int keytype, int optype, int cmd, int p1, [CCode (array_length = false)] uint8[] p2);
[CCode (cname = "EVP_PKEY_CTX_set_rsa_padding", cheader_filename = "openssl/rsa.h")]
public int set_rsa_padding (int pad);
[CCode (cname = "EVP_PKEY_CTX_get_rsa_padding", cheader_filename = "openssl/rsa.h")]
public int get_rsa_padding (out int pad);
[CCode (cname = "EVP_PKEY_CTX_set_rsa_pss_saltlen", cheader_filename = "openssl/rsa.h")]
public int set_rsa_pss_saltlen (int len);
[CCode (cname = "EVP_PKEY_CTX_get_rsa_pss_saltlen", cheader_filename = "openssl/rsa.h")]
public int get_rsa_pss_saltlen (out int len);
[CCode (cname = "EVP_PKEY_CTX_set_rsa_keygen_bits", cheader_filename = "openssl/rsa.h")]
public int set_rsa_keygen_bits (int mbits);
[CCode (cname = "EVP_PKEY_CTX_set_rsa_keygen_pubexp", cheader_filename = "openssl/rsa.h")]
public int set_rsa_keygen_pubexp (BIGNUM pubexp);
[CCode (cname = "EVP_PKEY_CTX_set_rsa_keygen_primes", cheader_filename = "openssl/rsa.h")]
public int set_rsa_keygen_primes (int primes);
public int md (int optype, int cmd, string md);
public int set_signature_md (MessageDigest md);
public int get_signature_md (out MessageDigest pmd);
public int set_mac_key (uint8[] key);
[CCode (cname = "EVP_PKEY_keygen_init")]
public int keygen_init ();
[CCode (cname = "EVP_PKEY_keygen")]
public int keygen (out PublicKey ppkey);
[CCode (cname = "EVP_PKEY_paramgen_init")]
public int paramgen_init ();
[CCode (cname = "EVP_PKEY_paramgen")]
public int paramgen (out PublicKey ppkey);
[CCode (cname = "EVP_PKEY_encrypt_init")]
public int encrypt_init ();
[CCode (cname = "EVP_PKEY_encrypt")]
public int encrypt ([CCode (array_length = false)] uint8[] out, out size_t outlen, uint8[] in);
[CCode (cname = "EVP_PKEY_decrypt_init")]
public int decrypt_init ();
[CCode (cname = "EVP_PKEY_decrypt")]
public int decrypt ([CCode (array_length = false)] uint8[] out, out size_t outlen, uint8[] in);
[CCode (cname = "EVP_PKEY_derive_init")]
public int derive_init ();
[CCode (cname = "EVP_PKEY_derive_set_peer")]
public int derive_set_peer (PublicKey peer);
[CCode (cname = "EVP_PKEY_derive")]
public int derive ([CCode (array_length = false)] uint8[] key, out size_t keylen);
[CCode (cname = "EVP_PKEY_sign_init")]
public int sign_init ();
[CCode (cname = "EVP_PKEY_sign")]
public int sign ([CCode (array_length = false)] uint8[] sig, out size_t siglen, uint8[] tbs);
[CCode (cname = "EVP_PKEY_verify_init")]
public int verify_init ();
[CCode (cname = "EVP_PKEY_verify")]
public int verify (uint8[] sig, uint8[] tbs);
[CCode (cname = "EVP_PKEY_verify_recover_init")]
public int verify_recover_init ();
[CCode (cname = "EVP_PKEY_verify_recover")]
public int verify_recover ([CCode (array_length = false)] uint8[] rout, out size_t routlen, uint8[] sig);
}
[Compact]
[CCode (cname = "EVP_MD")]
public class MessageDigest
{
}
public unowned MessageDigest? md_null ();
public unowned MessageDigest? md2 ();
public unowned MessageDigest? md4 ();
public unowned MessageDigest? md5 ();
public unowned MessageDigest? md5_sha1 ();
public unowned MessageDigest? blake2b512 ();
public unowned MessageDigest? blake2s256 ();
public unowned MessageDigest? sha1 ();
public unowned MessageDigest? sha224 ();
public unowned MessageDigest? sha256 ();
public unowned MessageDigest? sha384 ();
public unowned MessageDigest? sha512 ();
public unowned MessageDigest? mdc2 ();
public unowned MessageDigest? ripmed160 ();
public unowned MessageDigest? whirlpool ();
[CCode (cname = "get_digestbyname")]
public unowned MessageDigest? get_digest_by_name (string name);
[Compact]
[CCode (cname = "EVP_MD_CTX", lower_case_cprefix = "EVP_MD_CTX_")]
public class MessageDigestContext
{
public MessageDigestContext ();
[CCode (cname = "EVP_DigestInit_ex")]
public int init (MessageDigest type, Engine? engine);
[CCode (cname = "EVP_DigestUpdate")]
public int update (uint8[] d);
[CCode (cname = "EVP_DigestFinal_ex")]
public int final ([CCode (array_length = false)] uchar[] md, out int s);
}
[Compact]
[CCode (cname = "EVP_CIPHER", lower_case_cprefix = "EVP_CIPHER_")]
public class Cipher
{
[CCode (cname = "EVP_CIPHER_meth_new")]
public Cipher (int cipher_type, int block_size, int key_len);
public int key_length ();
public int iv_length ();
}
public unowned Cipher? enc_null ();
public unowned Cipher? des_ecb ();
public unowned Cipher? des_ede ();
public unowned Cipher? des_ede3 ();
public unowned Cipher? des_ede_ecb ();
public unowned Cipher? des_ede3_ecb ();
public unowned Cipher? des_cfb64 ();
public unowned Cipher? des_cfb1 ();
public unowned Cipher? des_cfb8 ();
public unowned Cipher? des_ede_cfb64 ();
public unowned Cipher? des_ede3_cfb64 ();
public unowned Cipher? des_ede3_cfb1 ();
public unowned Cipher? des_ede3_cfb8 ();
public unowned Cipher? des_ofb ();
public unowned Cipher? des_ede_ofb ();
public unowned Cipher? des_ede3_ofb ();
public unowned Cipher? des_cbc ();
public unowned Cipher? des_ede_cbc ();
public unowned Cipher? des_ede3_cbc ();
public unowned Cipher? desx_cbc ();
public unowned Cipher? des_ede3_wrap ();
public unowned Cipher? rc4 ();
public unowned Cipher? rc4_40 ();
public unowned Cipher? rc4_hmac_md5 ();
public unowned Cipher? idea_ecb ();
public unowned Cipher? idea_cfb64 ();
public unowned Cipher? idea_ofb ();
public unowned Cipher? idea_cbc ();
public unowned Cipher? rc2_ecb ();
public unowned Cipher? rc2_cbc ();
public unowned Cipher? rc2_40_cbc ();
public unowned Cipher? rc2_64_cbc ();
public unowned Cipher? rc2_cfb64 ();
public unowned Cipher? rc2_ofb ();
public unowned Cipher? bf_ecb ();
public unowned Cipher? bf_cbc ();
public unowned Cipher? bf_cfb64 ();
public unowned Cipher? bf_ofb ();
public unowned Cipher? cast5_ecb ();
public unowned Cipher? cast5_cbc ();
public unowned Cipher? cast5_cfb64 ();
public unowned Cipher? cast5_ofb ();
public unowned Cipher? rc5_32_12_16_cbc ();
public unowned Cipher? rc5_32_12_16_ecb ();
public unowned Cipher? rc5_32_12_16_cfb64 ();
public unowned Cipher? rc5_32_12_16_ofb ();
public unowned Cipher? aes_128_ecb ();
public unowned Cipher? aes_128_cbc ();
public unowned Cipher? aes_128_cfb1 ();
public unowned Cipher? aes_128_cfb8 ();
public unowned Cipher? aes_128_cfb128 ();
public unowned Cipher? aes_128_ofb ();
public unowned Cipher? aes_128_ctr ();
public unowned Cipher? aes_128_ccm ();
public unowned Cipher? aes_128_gcm ();
public unowned Cipher? aes_128_xts ();
public unowned Cipher? aes_128_wrap ();
public unowned Cipher? aes_128_wrap_pad ();
public unowned Cipher? aes_128_ocb ();
public unowned Cipher? aes_192_ecb ();
public unowned Cipher? aes_192_cbc ();
public unowned Cipher? aes_192_cfb1 ();
public unowned Cipher? aes_192_cfb8 ();
public unowned Cipher? aes_192_cfb128 ();
public unowned Cipher? aes_192_ofb ();
public unowned Cipher? aes_192_ctr ();
public unowned Cipher? aes_192_ccm ();
public unowned Cipher? aes_192_gcm ();
public unowned Cipher? aes_192_wrap ();
public unowned Cipher? aes_192_wrap_pad ();
public unowned Cipher? aes_192_ocb ();
public unowned Cipher? aes_256_ecb ();
public unowned Cipher? aes_256_cbc ();
public unowned Cipher? aes_256_cfb1 ();
public unowned Cipher? aes_256_cfb8 ();
public unowned Cipher? aes_256_cfb128 ();
public unowned Cipher? aes_256_ofb ();
public unowned Cipher? aes_256_ctr ();
public unowned Cipher? aes_256_ccm ();
public unowned Cipher? aes_256_gcm ();
public unowned Cipher? aes_256_xts ();
public unowned Cipher? aes_256_wrap ();
public unowned Cipher? aes_256_wrap_pad ();
public unowned Cipher? aes_256_ocb ();
public unowned Cipher? aes_128_cbc_hmac_sha1 ();
public unowned Cipher? aes_256_cbc_hmac_sha1 ();
public unowned Cipher? aes_128_cbc_hmac_sha256 ();
public unowned Cipher? aes_256_cbc_hmac_sha256 ();
public unowned Cipher? camellia_128_ecb ();
public unowned Cipher? camellia_128_cbc ();
public unowned Cipher? camellia_128_cfb1 ();
public unowned Cipher? camellia_128_cfb8 ();
public unowned Cipher? camellia_128_cfb128 ();
public unowned Cipher? camellia_128_ofb ();
public unowned Cipher? camellia_128_ctr ();
public unowned Cipher? camellia_192_ecb ();
public unowned Cipher? camellia_192_cbc ();
public unowned Cipher? camellia_192_cfb1 ();
public unowned Cipher? camellia_192_cfb8 ();
public unowned Cipher? camellia_192_cfb128 ();
public unowned Cipher? camellia_192_ofb ();
public unowned Cipher? camellia_192_ctr ();
public unowned Cipher? camellia_256_ecb ();
public unowned Cipher? camellia_256_cbc ();
public unowned Cipher? camellia_256_cfb1 ();
public unowned Cipher? camellia_256_cfb8 ();
public unowned Cipher? camellia_256_cfb128 ();
public unowned Cipher? camellia_256_ofb ();
public unowned Cipher? camellia_256_ctr ();
public unowned Cipher? chacha20 ();
public unowned Cipher? chacha20_poly1305 ();
public unowned Cipher? seed_ecb ();
public unowned Cipher? seed_cbc ();
public unowned Cipher? seed_cfb128 ();
public unowned Cipher? seed_ofb ();
[CCode (cname = "EVP_get_cipherbyname")]
public unowned Cipher? get_cipher_by_name (string name);
[CCode (cname = "EVP_BytesToKey")]
public int bytes_to_key (Cipher cipher, MessageDigest md, [CCode (array_length = false)] uchar[] salt, uchar[] key_data, int nrounds, [CCode (array_length = false)] uchar[] key, [CCode (array_length = false)] uchar[] iv);
[Compact]
[CCode (cname = "EVP_CIPHER_CTX", cprefix = "EVP_CIPHER_CTX_", lower_case_cprefix = "EVP_CIPHER_CTX_")]
public class CipherContext
{
public CipherContext ();
public int reset ();
public int set_key_length (int keylen);
public int set_padding (int pad);
[CCode (cname = "EVP_EncryptInit_ex")]
public int encrypt_init (Cipher? cipher, Engine? engine, [CCode (array_length = false)] uchar[]? key, [CCode (array_length = false)] uchar[]? iv);
[CCode (cname = "EVP_EncryptUpdate")]
public int encrypt_update ([CCode (array_length = false)] uchar[] ciphertext, out int ciphertext_len, uchar[] plaintext);
[CCode (cname = "EVP_EncryptFinal_ex")]
public int encrypt_final ([CCode (array_length = false)] uchar[] ciphertext, out int ciphertext_len);
[CCode (cname = "EVP_DecryptInit_ex")]
public int decrypt_init (Cipher? cipher, Engine? engine, [CCode (array_length = false)] uchar[]? key, [CCode (array_length = false)] uchar[]? iv);
[CCode (cname = "EVP_DecryptUpdate")]
public int decrypt_update ([CCode (array_length = false)] uchar[] plaintext, out int plaintext_len, uchar[] ciphertext);
[CCode (cname = "EVP_DecryptFinal_ex")]
public int decrypt_final ([CCode (array_length = false)] uchar[] plaintext, out int plaintext_len);
[CCode (simple_generics = true)]
public int ctrl<T>(int type, int arg, T? ptr);
}
}
[Compact]
[CCode (cname = "BIGNUM", cheader_filename = "openssl/rsa.h", free_function = "BN_free")]
public class BIGNUM {
[CCode (cname = "BN_new", cheader_filename = "openssl/bn.h")]
public BIGNUM ();
[CCode (cname = "BN_secure_new", cheader_filename = "openssl/bn.h")]
public BIGNUM.secure ();
[CCode (cname = "BN_clear", cheader_filename = "openssl/bn.h")]
public void clear ();
[CCode (cname = "BN_set_word", cheader_filename = "openssl/bn.h")]
public int set_word (ulong w);
}
[Compact]
[CCode (cname = "BN_GENCB", cheader_filename = "openssl/rsa.h", free_function = "BN_GENCB_free")]
public class BN_GENCB {
public delegate int BigNumGenCallback (int a, int b, BN_GENCB gcb);
[CCode (cname = "BN_GENCB_new")]
public BN_GENCB ();
[CCode (cname = "BN_GENCB_set")]
public void set (BigNumGenCallback cb, [CCode (array_length = false)] uint8[] cb_arg);
[CCode (cname = "BN_GENCB_call")]
public int call (int a, int b);
}
[Compact]
[CCode (lower_case_cprefix = "RSA_", cprefix = "RSA_", cheader_filename = "openssl/rsa.h", free_function = "RSA_free")]
public class RSA
{
public const int PKCS1_PADDING;
public const int SSLV23_PADDING;
public const int NO_PADDING;
public const int PKCS1_OAEP_PADDING;
public const int X931_PADDING;
public const int PKCS1_PSS_PADDING;
public const int F4;
[CCode (cname = "RSA_3")]
public const int RSA_3;
public RSA ();
public int size ();
public int set0_key (BIGNUM n, BIGNUM e, BIGNUM d);
public void get0_key (out BIGNUM n, out BIGNUM e, out BIGNUM d);
public void clear_flags (int flags);
public int test_flags (int flags);
public void set_flags (int flags);
public Engine get0_engine ();
[CCode (instance_pos = 1.1)]
public int print_fp (GLib.FileStream fp, int offset);
[CCode (instance_pos = 1.1)]
public int print (BIO bp, int offset);
public int generate_key_ex (int bits, BIGNUM e, BN_GENCB? cb = null);
[CCode (instance_pos = 4)]
public bool sign (int type, uint8[] m, [CCode (array_length = false)] uint8[] sigret, out int siglen);
[CCode (instance_pos = 3)]
public int verify (int type, uint8[] m, uint8[] sigbuf);
[CCode (instance_pos = 2.1)]
public int public_encrypt ([CCode (array_length_pos = 0)] uint8[] from, [CCode (array_length = false)] uint8[] to, int padding);
[CCode (instance_pos = 2.1)]
public int private_encrypt ([CCode (array_length_pos = 0)] uint8[] from, [CCode (array_length = false)] uint8[] to, int padding);
[CCode (instance_pos = 2.1)]
public int public_decrypt ([CCode (array_length_pos = 0)] uint8[] from, [CCode (array_length = false)] uint8[] to,int padding);
[CCode (instance_pos = 2.1)]
public int private_decrypt ([CCode (array_length_pos = 0)] uint8[] from, [CCode (array_length = false)] uint8[] to, int padding);
}
[CCode (lower_case_cprefix = "PEM_", cheader_filename = "openssl/pem.h")]
namespace PEM
{
[CCode (cname = "pem_password_cb")]
public delegate int PasswordCallback (uint8[] buf, int flag);
public void read_RSAPrivateKey (GLib.FileStream f, out RSA x, PasswordCallback? cb = null);
public void read_RSAPublicKey (GLib.FileStream f, out RSA x, PasswordCallback? cb = null);
public int write_RSAPrivateKey (GLib.FileStream f, RSA x, EVP.Cipher? enc, uint8[] kstr, PasswordCallback? cb = null);
public int write_RSAPublicKey (GLib.FileStream f, RSA x);
public void read_bio_RSAPublicKey (BIO bp, out RSA x, PasswordCallback? cb = null);
public void read_bio_RSAPrivateKey (BIO bp, out RSA x, PasswordCallback? cb = null);
public bool write_bio_RSAPublicKey (BIO bp, RSA x);
public bool write_bio_RSAPrivateKey (BIO bp, RSA x, EVP.Cipher? enc, uint8[] kstr, PasswordCallback? cb = null);
public void read_bio_PUBKEY (BIO bp, out EVP.PublicKey x, PasswordCallback? cb = null);
public int write_bio_PUBKEY (BIO bp, EVP.PublicKey x);
public void read_PUBKEY (GLib.FileStream fp, out EVP.PublicKey x, PasswordCallback? cb = null);
public int write_PUBKEY (GLib.FileStream fp, EVP.PublicKey x);
public void read_bio_PrivateKey (BIO bp, out EVP.PublicKey x, PasswordCallback? cb = null);
public void read_PrivateKey (GLib.FileStream fp, out EVP.PublicKey x, PasswordCallback? cb = null);
public int write_bio_PrivateKey (BIO bp, EVP.PublicKey x, EVP.Cipher? enc, uint8[] kstr, PasswordCallback? cb = null);
public int write_bio_PrivateKey_traditional (BIO bp, EVP.PublicKey x, EVP.Cipher? enc, uint8[] kstr, PasswordCallback? cb = null);
public int write_PrivateKey (GLib.FileStream fp, EVP.PublicKey x, EVP.Cipher? enc, uint8[] kstr, PasswordCallback? cb = null);
public int write_bio_PKCS8PrivateKey (BIO bp, EVP.PublicKey x, EVP.Cipher? enc, uint8[] kstr, PasswordCallback? cb = null);
public int write_bio_PKCS8PrivateKey_nid (BIO bp, EVP.PublicKey x, int nid, uint8[] kstr, PasswordCallback? cb = null);
public int write_PKCS8PrivateKey (GLib.FileStream fp, EVP.PublicKey x, EVP.Cipher? enc, uint8[] kstr, PasswordCallback? cb = null);
public int write_PKCS8PrivateKey_nid (GLib.FileStream fp, EVP.PublicKey x, int nid, uint8[] kstr, PasswordCallback? cb = null);
}
public RSA? d2i_RSA_PUBKEY (out RSA a, uint8[] ppin);
public RSA? d2i_RSA_PUBKEY_bio (BIO bp, out RSA a);
public RSA? d2i_RSA_PUBKEY_fp (GLib.FileStream fp, out RSA a);
public int i2d_RSA_PUBKEY (RSA rsa, [CCode (array_length = false)] out uint8[] ppout);
public int i2d_RSA_PUBKEY_fp (GLib.FileStream fp, RSA a);
public int i2d_RSA_PUBKEY_bio (BIO bp, RSA a);
[CCode (cprefix = "ERR_", lower_case_cprefix = "ERR_", cheader_filename = "openssl/err.h")]
namespace ERR
{
public ulong get_error();
public unowned string? reason_error_string(ulong e);
}
[CCode (cprefix = "RAND_", lower_case_cprefix = "RAND_", cheader_filename = "openssl/rand.h")]
namespace RAND
{
public int bytes(uint8[] buf);
}
}

108
dino.doap
View file

@ -227,28 +227,24 @@
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0004.html"/>
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0027.html"/>
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0030.html"/>
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0045.html"/>
<xmpp:status>partial</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
@ -256,7 +252,6 @@
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0047.html"/>
<xmpp:status>complete</xmpp:status>
<xmpp:note>For use with XEP-0261</xmpp:note>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
@ -264,14 +259,12 @@
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0048.html"/>
<xmpp:status>deprecated</xmpp:status>
<xmpp:note>Migrating to XEP-0402 if supported by server</xmpp:note>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0049.html"/>
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
@ -279,7 +272,6 @@
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0054.html"/>
<xmpp:status>partial</xmpp:status>
<xmpp:note>Only for viewing avatars</xmpp:note>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
@ -287,14 +279,12 @@
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0059.html"/>
<xmpp:status>partial</xmpp:status>
<xmpp:note>For use with XEP-0313</xmpp:note>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0060.html"/>
<xmpp:status>partial</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
@ -302,7 +292,6 @@
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0065.html"/>
<xmpp:status>partial</xmpp:status>
<xmpp:note>For use with XEP-0260</xmpp:note>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
@ -310,49 +299,42 @@
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0066.html"/>
<xmpp:status>complete</xmpp:status>
<xmpp:note>For file transfers using XEP-0363</xmpp:note>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0077.html"/>
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0082.html"/>
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0084.html"/>
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0085.html"/>
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0115.html"/>
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0153.html"/>
<xmpp:status>deprecated</xmpp:status>
<xmpp:since>0.1</xmpp:since>
<xmpp:note>Only to fetch Avatars from other users</xmpp:note>
</xmpp:SupportedXep>
</implements>
@ -360,98 +342,78 @@
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0163.html"/>
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0166.html"/>
<xmpp:status>partial</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0167.html"/>
<xmpp:status>partial</xmpp:status>
<xmpp:since>0.3</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0176.html"/>
<xmpp:status>partial</xmpp:status>
<xmpp:since>0.3</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0177.html"/>
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.3</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0184.html"/>
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0191.html"/>
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0198.html"/>
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0199.html"/>
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0203.html"/>
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0215.html"/>
<xmpp:status>partial</xmpp:status>
<xmpp:since>0.3</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0222.html"/>
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0223.html"/>
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0234.html"/>
<xmpp:status>partial</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
@ -459,7 +421,6 @@
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0245.html"/>
<xmpp:version>1.0</xmpp:version>
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
@ -467,49 +428,36 @@
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0249.html"/>
<xmpp:status>partial</xmpp:status>
<xmpp:note>No support for sending</xmpp:note>
<xmpp:since>0.3</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0260.html"/>
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0261.html"/>
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0272.html"/>
<xmpp:status>partial</xmpp:status>
<xmpp:since>0.3</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0280.html"/>
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0293.html"/>
<xmpp:status>partial</xmpp:status>
<xmpp:since>0.3</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0294.html"/>
<xmpp:status>partial</xmpp:status>
<xmpp:since>0.3</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
@ -517,14 +465,6 @@
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0297.html"/>
<xmpp:status>complete</xmpp:status>
<xmpp:note>For use with XEP-0280</xmpp:note>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0298.html"/>
<xmpp:status>partial</xmpp:status>
<xmpp:since>0.3</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
@ -539,7 +479,7 @@
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0313.html"/>
<xmpp:status>partial</xmpp:status>
<xmpp:since>0.1</xmpp:since>
<xmpp:note>Not for MUCs</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
@ -547,21 +487,18 @@
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0320.html"/>
<xmpp:status>complete</xmpp:status>
<xmpp:version>1.0.0</xmpp:version>
<xmpp:since>0.3</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0333.html"/>
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0334.html"/>
<xmpp:status>partial</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
@ -569,28 +506,24 @@
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0353.html"/>
<xmpp:status>complete</xmpp:status>
<xmpp:version>0.3.1</xmpp:version>
<xmpp:since>0.3</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0359.html"/>
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0363.html"/>
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0368.html"/>
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
@ -598,7 +531,6 @@
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0380.html"/>
<xmpp:status>partial</xmpp:status>
<xmpp:note>Only for outgoing messages</xmpp:note>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
@ -606,71 +538,42 @@
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0384.html"/>
<xmpp:status>complete</xmpp:status>
<xmpp:version>0.3.0</xmpp:version>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0391.html"/>
<xmpp:status>partial</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0392.html"/>
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.5</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0393.html"/>
<xmpp:status>partial</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0396.html"/>
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0398.html"/>
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0402.html"/>
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0410.html"/>
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.2</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0421.html"/>
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.4</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0444.html"/>
<xmpp:status>complete</xmpp:status>
<xmpp:version>0.1.1</xmpp:version>
<xmpp:since>0.4</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
@ -678,15 +581,6 @@
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0454.html"/>
<xmpp:status>partial</xmpp:status>
<xmpp:note>No support for embedded thumbnails</xmpp:note>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0461.html"/>
<xmpp:status>complete</xmpp:status>
<xmpp:version>0.2.0</xmpp:version>
<xmpp:since>0.4</xmpp:since>
</xmpp:SupportedXep>
</implements>
</Project>

View file

@ -47,28 +47,24 @@
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0004.html" />
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0027.html" />
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0030.html" />
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0045.html" />
<xmpp:status>partial</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
@ -76,7 +72,6 @@
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0047.html" />
<xmpp:status>complete</xmpp:status>
<xmpp:note>For use with XEP-0261</xmpp:note>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
@ -84,14 +79,12 @@
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0048.html" />
<xmpp:status>deprecated</xmpp:status>
<xmpp:note>Migrating to XEP-0402 if supported by server</xmpp:note>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0049.html" />
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
@ -99,7 +92,6 @@
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0054.html" />
<xmpp:status>partial</xmpp:status>
<xmpp:note>Only for viewing avatars</xmpp:note>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
@ -107,14 +99,12 @@
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0059.html" />
<xmpp:status>partial</xmpp:status>
<xmpp:note>For use with XEP-0313</xmpp:note>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0060.html" />
<xmpp:status>partial</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
@ -122,7 +112,6 @@
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0065.html" />
<xmpp:status>partial</xmpp:status>
<xmpp:note>For use with XEP-0260</xmpp:note>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
@ -130,49 +119,42 @@
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0066.html" />
<xmpp:status>complete</xmpp:status>
<xmpp:note>For file transfers using XEP-0363</xmpp:note>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0077.html" />
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0082.html" />
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0084.html" />
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0085.html" />
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0115.html" />
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0153.html" />
<xmpp:status>deprecated</xmpp:status>
<xmpp:since>0.1</xmpp:since>
<xmpp:note>Only to fetch Avatars from other users</xmpp:note>
</xmpp:SupportedXep>
</implements>
@ -180,98 +162,78 @@
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0163.html" />
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0166.html" />
<xmpp:status>partial</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0167.html" />
<xmpp:status>partial</xmpp:status>
<xmpp:since>0.3</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0176.html" />
<xmpp:status>partial</xmpp:status>
<xmpp:since>0.3</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0177.html" />
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.3</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0184.html" />
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0191.html" />
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0198.html" />
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0199.html" />
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0203.html" />
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0215.html" />
<xmpp:status>partial</xmpp:status>
<xmpp:since>0.3</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0222.html" />
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0223.html" />
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0234.html" />
<xmpp:status>partial</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
@ -279,7 +241,6 @@
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0245.html" />
<xmpp:version>1.0</xmpp:version>
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
@ -287,49 +248,36 @@
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0249.html" />
<xmpp:status>partial</xmpp:status>
<xmpp:note>No support for sending</xmpp:note>
<xmpp:since>0.3</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0260.html" />
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0261.html" />
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0272.html" />
<xmpp:status>partial</xmpp:status>
<xmpp:since>0.3</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0280.html" />
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0293.html" />
<xmpp:status>partial</xmpp:status>
<xmpp:since>0.3</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0294.html" />
<xmpp:status>partial</xmpp:status>
<xmpp:since>0.3</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
@ -337,14 +285,6 @@
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0297.html" />
<xmpp:status>complete</xmpp:status>
<xmpp:note>For use with XEP-0280</xmpp:note>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0298.html" />
<xmpp:status>partial</xmpp:status>
<xmpp:since>0.3</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
@ -359,7 +299,7 @@
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0313.html" />
<xmpp:status>partial</xmpp:status>
<xmpp:since>0.1</xmpp:since>
<xmpp:note>Not for MUCs</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
@ -367,21 +307,18 @@
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0320.html" />
<xmpp:status>complete</xmpp:status>
<xmpp:version>1.0.0</xmpp:version>
<xmpp:since>0.3</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0333.html" />
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0334.html" />
<xmpp:status>partial</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
@ -389,28 +326,24 @@
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0353.html" />
<xmpp:status>complete</xmpp:status>
<xmpp:version>0.3.1</xmpp:version>
<xmpp:since>0.3</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0359.html" />
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0363.html" />
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0368.html" />
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
@ -418,7 +351,6 @@
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0380.html" />
<xmpp:status>partial</xmpp:status>
<xmpp:note>Only for outgoing messages</xmpp:note>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
@ -426,71 +358,42 @@
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0384.html" />
<xmpp:status>complete</xmpp:status>
<xmpp:version>0.3.0</xmpp:version>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0391.html" />
<xmpp:status>partial</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0392.html" />
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.5</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0393.html" />
<xmpp:status>partial</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0396.html" />
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0398.html" />
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0402.html" />
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0410.html" />
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.2</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0421.html" />
<xmpp:status>complete</xmpp:status>
<xmpp:since>0.4</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0444.html" />
<xmpp:status>complete</xmpp:status>
<xmpp:version>0.1.1</xmpp:version>
<xmpp:since>0.4</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
@ -498,15 +401,6 @@
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0454.html" />
<xmpp:status>partial</xmpp:status>
<xmpp:note>No support for embedded thumbnails</xmpp:note>
<xmpp:since>0.1</xmpp:since>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0461.html" />
<xmpp:status>complete</xmpp:status>
<xmpp:version>0.2.0</xmpp:version>
<xmpp:since>0.4</xmpp:since>
</xmpp:SupportedXep>
</implements>
</Project>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 213 KiB

View file

@ -1,81 +0,0 @@
{
"id": "im.dino.Dino",
"runtime": "org.gnome.Platform",
"runtime-version": "46",
"sdk": "org.gnome.Sdk",
"command": "dino",
"finish-args": [
"--share=ipc",
"--socket=fallback-x11",
"--socket=wayland",
"--socket=pulseaudio",
"--socket=gpg-agent",
"--filesystem=xdg-run/pipewire-0",
"--share=network",
"--device=dri",
"--talk-name=org.freedesktop.Notifications"
],
"modules": [
"shared-modules/libcanberra/libcanberra.json",
{
"name": "libsignal-protocol-c",
"buildsystem": "cmake-ninja",
"config-opts": [
"-DCMAKE_C_FLAGS=-fPIC"
],
"cleanup": [
"/include",
"/lib"
],
"sources": [
{
"type": "git",
"url": "https://github.com/mar-v-in/libsignal-protocol-c.git",
"tag": "v2.3.3.1"
}
]
},
{
"name": "qrencode",
"buildsystem": "cmake-ninja",
"cleanup": [
"/bin",
"/include",
"/lib",
"/share/man"
],
"config-opts": [
"-DCMAKE_C_FLAGS=-fPIC"
],
"sources": [
{
"type": "archive",
"url": "https://fukuchi.org/works/qrencode/qrencode-4.1.1.tar.gz",
"sha512": "209bb656ae3f391b03c7b3ceb03e34f7320b0105babf48b619e7a299528b8828449e0e7696f0b5db0d99170a81709d0518e34835229a748701e7df784e58a9ce"
}
]
},
{
"name": "dino",
"buildsystem": "cmake-ninja",
"builddir": true,
"config-opts": [
"-DSOUP_VERSION=3",
"-DNO_DEBUG=yes",
"-DCMAKE_BUILD_TYPE=Release",
"-DENABLED_PLUGINS=notification-sound",
"-DPLUGIN_RTP_WEBRTC_AUDIO_PROCESSING=OFF"
],
"cleanup": [
"/include",
"/share/vala"
],
"sources": [
{
"type": "dir",
"path": "."
}
]
}
]
}

View file

@ -6,15 +6,9 @@ find_packages(LIBDINO_PACKAGES REQUIRED
GObject
)
set(LIBDINO_DEFINITIONS)
if(LIBDINO_VERSION VERSION_EQUAL "0.56.11")
set(LIBDINO_DEFINITIONS ${LIBDINO_DEFINITIONS} VALA_0_56_11)
endif()
vala_precompile(LIBDINO_VALA_C
SOURCES
src/application.vala
src/version.vala
src/dbus/login1.vala
src/dbus/notifications.vala
@ -40,7 +34,6 @@ SOURCES
src/service/calls.vala
src/service/chat_interaction.vala
src/service/connection_manager.vala
src/service/contact_model.vala
src/service/content_item_store.vala
src/service/conversation_manager.vala
src/service/counterpart_interaction_manager.vala
@ -82,8 +75,6 @@ GENERATE_VAPI
dino
GENERATE_HEADER
dino
DEFINITIONS
${LIBDINO_DEFINITIONS}
)
add_custom_command(OUTPUT "${CMAKE_BINARY_DIR}/exports/dino_i18n.h"
@ -102,8 +93,7 @@ DEPENDS
${CMAKE_BINARY_DIR}/exports/dino_i18n.h
)
add_definitions(${VALA_CFLAGS} -DDINO_SYSTEM_PLUGIN_DIR="${PLUGIN_INSTALL_DIR}" -DDINO_SYSTEM_LIBDIR_NAME="${LIBDIR_NAME}" -DG_LOG_DOMAIN="libdino"
-DDINO_VERSION=\"${PROJECT_VERSION}\" -DDINO_SYSTEM_LOCALEDIR_NAME="${LOCALEDIR_NAME}")
add_definitions(${VALA_CFLAGS} -DDINO_SYSTEM_PLUGIN_DIR="${PLUGIN_INSTALL_DIR}" -DDINO_SYSTEM_LIBDIR_NAME="${LIBDIR_NAME}" -DG_LOG_DOMAIN="libdino" -DDINO_VERSION=\"${PROJECT_VERSION}\")
add_library(libdino SHARED ${LIBDINO_VALA_C} ${CMAKE_BINARY_DIR}/exports/dino_i18n.h)
add_dependencies(libdino dino-vapi)
target_link_libraries(libdino xmpp-vala qlite ${LIBDINO_PACKAGES} m)
@ -113,13 +103,12 @@ install(TARGETS libdino ${TARGET_INSTALL})
install(FILES ${CMAKE_BINARY_DIR}/exports/dino.vapi ${CMAKE_BINARY_DIR}/exports/dino.deps DESTINATION ${VAPI_INSTALL_DIR})
install(FILES ${CMAKE_BINARY_DIR}/exports/dino.h ${CMAKE_BINARY_DIR}/exports/dino_i18n.h DESTINATION ${INCLUDE_INSTALL_DIR})
if(BUILD_TESTING)
if(BUILD_TESTS)
vala_precompile(LIBDINO_TEST_VALA_C
SOURCES
"tests/weak_map.vala"
"tests/testcase.vala"
"tests/common.vala"
"tests/jid.vala"
CUSTOM_VAPIS
${CMAKE_BINARY_DIR}/exports/dino_internal.vapi
${CMAKE_BINARY_DIR}/exports/xmpp-vala.vapi
@ -133,5 +122,4 @@ if(BUILD_TESTING)
add_definitions(${VALA_CFLAGS})
add_executable(libdino-test ${LIBDINO_TEST_VALA_C})
target_link_libraries(libdino-test libdino)
add_test(NAME libdino COMMAND libdino-test)
endif(BUILD_TESTING)
endif(BUILD_TESTS)

View file

@ -1,6 +0,0 @@
gdk-pixbuf-2.0
gee-0.8
glib-2.0
gmodule-2.0
qlite
xmpp-vala

View file

@ -1,100 +0,0 @@
# version_vala
dot_git = meson.current_source_dir() / '../.git'
version_file = meson.current_source_dir() / '../VERSION'
command = [prog_python, files('version.py'), version_file, '@OUTPUT@', '--git-repo', meson.current_source_dir()]
if prog_git.found()
command += ['--git', prog_git]
endif
depend_files = []
if fs.exists(dot_git)
depend_files += [dot_git]
endif
if fs.exists(version_file)
depend_files += [version_file]
endif
version_vala = custom_target('libdino_version_vala', command: command, output: 'version.vala', depend_files: depend_files)
# libdino
dependencies = [
dep_gdk_pixbuf,
dep_gee,
dep_gio,
dep_glib,
dep_gmodule,
dep_qlite,
dep_xmpp_vala
]
sources = files(
'src/application.vala',
'src/dbus/login1.vala',
'src/dbus/notifications.vala',
'src/dbus/upower.vala',
'src/entity/account.vala',
'src/entity/call.vala',
'src/entity/conversation.vala',
'src/entity/encryption.vala',
'src/entity/file_transfer.vala',
'src/entity/message.vala',
'src/entity/settings.vala',
'src/plugin/interfaces.vala',
'src/plugin/loader.vala',
'src/plugin/registry.vala',
'src/service/avatar_manager.vala',
'src/service/blocking_manager.vala',
'src/service/call_store.vala',
'src/service/call_state.vala',
'src/service/call_peer_state.vala',
'src/service/calls.vala',
'src/service/chat_interaction.vala',
'src/service/connection_manager.vala',
'src/service/contact_model.vala',
'src/service/content_item_store.vala',
'src/service/conversation_manager.vala',
'src/service/counterpart_interaction_manager.vala',
'src/service/database.vala',
'src/service/entity_capabilities_storage.vala',
'src/service/entity_info.vala',
'src/service/fallback_body.vala',
'src/service/file_manager.vala',
'src/service/file_transfer_storage.vala',
'src/service/history_sync.vala',
'src/service/jingle_file_transfers.vala',
'src/service/message_correction.vala',
'src/service/message_processor.vala',
'src/service/message_storage.vala',
'src/service/module_manager.vala',
'src/service/muc_manager.vala',
'src/service/notification_events.vala',
'src/service/presence_manager.vala',
'src/service/replies.vala',
'src/service/reactions.vala',
'src/service/registration.vala',
'src/service/roster_manager.vala',
'src/service/search_processor.vala',
'src/service/stream_interactor.vala',
'src/service/util.vala',
'src/util/display_name.vala',
'src/util/util.vala',
'src/util/weak_map.vala',
)
sources += [version_vala]
c_args = [
'-DDINO_SYSTEM_LIBDIR_NAME="@0@"'.format(get_option('libdir')),
'-DDINO_SYSTEM_LOCALEDIR_NAME="@0@"'.format(get_option('localedir')),
'-DDINO_SYSTEM_PLUGIN_DIR="@0@"'.format(get_option('prefix') / get_option('libdir') / get_option('plugindir')),
'-DG_LOG_DOMAIN="libdino"',
]
lib_dino = library('dino', sources, c_args: c_args, include_directories: include_directories('src'), dependencies: dependencies, version: '0.0', install: true, install_dir: [true, true, true])
dep_dino = declare_dependency(link_with: lib_dino, include_directories: include_directories('.', 'src'))
install_data('dino.deps', install_dir: get_option('datadir') / 'vala/vapi') # TODO: workaround for https://github.com/mesonbuild/meson/issues/9756
install_headers('src/dino_i18n.h')
sources = files(
'tests/weak_map.vala',
'tests/testcase.vala',
'tests/common.vala',
'tests/jid.vala',
)
test_libdino = executable('test_libdino', sources, dependencies: dependencies + [dep_dino])
test('libdino', test_libdino)

View file

@ -2,6 +2,7 @@ using Dino.Entities;
namespace Dino {
extern const string VERSION;
public string get_version() { return VERSION; }
public string get_short_version() {
if (!VERSION.contains("~")) return VERSION;
@ -25,13 +26,13 @@ public interface Application : GLib.Application {
public abstract void handle_uri(string jid, string query, Gee.Map<string, string> options);
public void init(bool default_dark_theme) throws Error {
public void init() throws Error {
if (DirUtils.create_with_parents(get_storage_dir(), 0700) == -1) {
throw new Error(-1, 0, "Could not create storage dir \"%s\": %s", get_storage_dir(), FileUtils.error_from_errno(errno).to_string());
}
this.db = new Database(Path.build_filename(get_storage_dir(), "dino.db"));
this.settings = new Dino.Entities.Settings.from_db(db, default_dark_theme);
this.settings = new Dino.Entities.Settings.from_db(db);
this.stream_interactor = new StreamInteractor(db);
MessageProcessor.start(stream_interactor, db);
@ -39,12 +40,12 @@ public interface Application : GLib.Application {
PresenceManager.start(stream_interactor);
CounterpartInteractionManager.start(stream_interactor);
BlockingManager.start(stream_interactor);
Calls.start(stream_interactor, db);
ConversationManager.start(stream_interactor, db);
MucManager.start(stream_interactor);
AvatarManager.start(stream_interactor, db);
RosterManager.start(stream_interactor, db);
FileManager.start(stream_interactor, db);
Calls.start(stream_interactor, db);
CallStore.start(stream_interactor, db);
ContentItemStore.start(stream_interactor, db);
ChatInteraction.start(stream_interactor);
@ -57,7 +58,6 @@ public interface Application : GLib.Application {
Reactions.start(stream_interactor, db);
Replies.start(stream_interactor, db);
FallbackBody.start(stream_interactor, db);
ContactModels.start(stream_interactor);
create_actions();

View file

@ -18,6 +18,7 @@ public class Account : Object {
public string? alias { get; set; }
public bool enabled { get; set; default = false; }
public string? roster_version { get; set; }
public DateTime mam_earliest_synced { get; set; default=new DateTime.from_unix_utc(0); }
private Database? db;
@ -49,6 +50,7 @@ public class Account : Object {
alias = row[db.account.alias];
enabled = row[db.account.enabled];
roster_version = row[db.account.roster_version];
mam_earliest_synced = new DateTime.from_unix_utc(row[db.account.mam_earliest_synced]);
notify.connect(on_update);
}
@ -64,6 +66,7 @@ public class Account : Object {
.value(db.account.alias, alias)
.value(db.account.enabled, enabled)
.value(db.account.roster_version, roster_version)
.value(db.account.mam_earliest_synced, (long)mam_earliest_synced.to_unix())
.perform();
notify.connect(on_update);
@ -103,6 +106,8 @@ public class Account : Object {
update.set(db.account.enabled, enabled); break;
case "roster-version":
update.set(db.account.roster_version, roster_version); break;
case "mam-earliest-synced":
update.set(db.account.mam_earliest_synced, (long)mam_earliest_synced.to_unix()); break;
}
update.perform();
}

View file

@ -2,8 +2,6 @@ using Xmpp;
namespace Dino.Entities {
const int HISTORY_SYNC_MAM_MESSAGES = 20;
public class Conversation : Object {
public signal void object_updated(Conversation conversation);
@ -35,7 +33,7 @@ public class Conversation : Object {
}
}
}
public Encryption encryption { get; set; default = Encryption.UNKNOWN; }
public Encryption encryption { get; set; default = Encryption.NONE; }
public Message? read_up_to { get; set; }
public int read_up_to_item { get; set; default=-1; }

View file

@ -11,27 +11,6 @@ namespace Dino.Entities {
public bool is_some() {
return this != NONE;
}
public static Encryption parse(string str) {
switch (str) {
case "DINO_ENTITIES_ENCRYPTION_NONE":
return NONE;
case "DINO_ENTITIES_ENCRYPTION_PGP":
return PGP;
case "DINO_ENTITIES_ENCRYPTION_OMEMO":
return OMEMO;
case "DINO_ENTITIES_ENCRYPTION_DTLS_SRTP":
return DTLS_SRTP;
case "DINO_ENTITIES_ENCRYPTION_SRTP":
return SRTP;
case "DINO_ENTITIES_ENCRYPTION_UNKNOWN":
// Fall through.
default:
break;
}
return UNKNOWN;
}
}
}

View file

@ -71,7 +71,6 @@ public class FileTransfer : Object {
public int provider { get; set; }
public string info { get; set; }
public Cancellable cancellable { get; default=new Cancellable(); }
public uint64 transferred_bytes { get; set; }
private Database? db;
private string storage_dir;

View file

@ -4,7 +4,7 @@ public class Settings : Object {
private Database db;
public Settings.from_db(Database db, bool default_dark_theme) {
public Settings.from_db(Database db) {
this.db = db;
send_typing_ = col_to_bool_or_default("send_typing", true);
@ -12,10 +12,6 @@ public class Settings : Object {
notifications_ = col_to_bool_or_default("notifications", true);
convert_utf8_smileys_ = col_to_bool_or_default("convert_utf8_smileys", true);
check_spelling = col_to_bool_or_default("check_spelling", true);
default_encryption = col_to_encryption_or_default("default_encryption", Encryption.UNKNOWN);
send_button = col_to_bool_or_default("send_button", false);
enter_newline = col_to_bool_or_default("enter_newline", false);
dark_theme = col_to_bool_or_default("dark_theme", default_dark_theme);
}
private bool col_to_bool_or_default(string key, bool def) {
@ -23,12 +19,6 @@ public class Settings : Object {
return val != null ? bool.parse(val) : def;
}
private Encryption col_to_encryption_or_default(string key, Encryption def) {
var sval = db.settings.value;
string? val = db.settings.select({sval}).with(db.settings.key, "=", key)[sval];
return val != null ? Encryption.parse(val) : def;
}
private bool send_typing_;
public bool send_typing {
get { return send_typing_; }
@ -89,60 +79,6 @@ public class Settings : Object {
check_spelling_ = value;
}
}
private Encryption default_encryption_;
public Encryption default_encryption {
get { return default_encryption_; }
set {
string valstr = value.to_string();
db.settings.upsert()
.value(db.settings.key, "default_encryption", true)
.value(db.settings.value, valstr)
.perform();
default_encryption_ = value;
}
}
public signal void send_button_update(bool visible);
private bool send_button_;
public bool send_button {
get { return send_button_; }
set {
db.settings.upsert()
.value(db.settings.key, "send_button", true)
.value(db.settings.value, value.to_string())
.perform();
send_button_ = value;
send_button_update(value);
}
}
private bool enter_newline_;
public bool enter_newline {
get { return enter_newline_; }
set {
db.settings.upsert()
.value(db.settings.key, "enter_newline", true)
.value(db.settings.value, value.to_string())
.perform();
enter_newline_ = value;
}
}
public signal void dark_theme_update(bool is_dark);
private bool dark_theme_;
public bool dark_theme {
get { return dark_theme_; }
set {
db.settings.upsert()
.value(db.settings.key, "dark_theme", true)
.value(db.settings.value, value.to_string())
.perform();
dark_theme_ = value;
dark_theme_update(value);
}
}
}
}

View file

@ -3,14 +3,14 @@ using Gee;
namespace Dino.Plugins {
public class Registry {
public HashMap<Entities.Encryption, EncryptionListEntry> encryption_list_entries = new HashMap<Entities.Encryption, EncryptionListEntry>();
public HashMap<string, CallEncryptionEntry> call_encryption_entries = new HashMap<string, CallEncryptionEntry>();
public ArrayList<AccountSettingsEntry> account_settings_entries = new ArrayList<AccountSettingsEntry>();
public ArrayList<ContactDetailsProvider> contact_details_entries = new ArrayList<ContactDetailsProvider>();
public Map<string, TextCommand> text_commands = new HashMap<string, TextCommand>();
public Gee.List<ConversationAdditionPopulator> conversation_addition_populators = new ArrayList<ConversationAdditionPopulator>();
public Gee.List<NotificationPopulator> notification_populators = new ArrayList<NotificationPopulator>();
public Gee.Collection<ConversationTitlebarEntry> conversation_titlebar_entries = new Gee.TreeSet<ConversationTitlebarEntry>((a, b) => {
internal HashMap<Entities.Encryption, EncryptionListEntry> encryption_list_entries = new HashMap<Entities.Encryption, EncryptionListEntry>();
internal HashMap<string, CallEncryptionEntry> call_encryption_entries = new HashMap<string, CallEncryptionEntry>();
internal ArrayList<AccountSettingsEntry> account_settings_entries = new ArrayList<AccountSettingsEntry>();
internal ArrayList<ContactDetailsProvider> contact_details_entries = new ArrayList<ContactDetailsProvider>();
internal Map<string, TextCommand> text_commands = new HashMap<string, TextCommand>();
internal Gee.List<ConversationAdditionPopulator> conversation_addition_populators = new ArrayList<ConversationAdditionPopulator>();
internal Gee.List<NotificationPopulator> notification_populators = new ArrayList<NotificationPopulator>();
internal Gee.Collection<ConversationTitlebarEntry> conversation_titlebar_entries = new Gee.TreeSet<ConversationTitlebarEntry>((a, b) => {
return (int)(a.order - b.order);
});
public VideoCallPlugin? video_call_plugin;

View file

@ -12,7 +12,6 @@ public class AvatarManager : StreamInteractionModule, Object {
public string id { get { return IDENTITY.id; } }
public signal void received_avatar(Jid jid, Account account);
public signal void fetched_avatar(Jid jid, Account account);
private enum Source {
USER_AVATARS,
@ -26,7 +25,6 @@ public class AvatarManager : StreamInteractionModule, Object {
private HashMap<Jid, string> vcard_avatars = new HashMap<Jid, string>(Jid.hash_func, Jid.equals_func);
private HashMap<string, Pixbuf> cached_pixbuf = new HashMap<string, Pixbuf>();
private HashMap<string, Gee.List<SourceFuncWrapper>> pending_pixbuf = new HashMap<string, Gee.List<SourceFuncWrapper>>();
private HashSet<string> pending_fetch = new HashSet<string>();
private const int MAX_PIXEL = 192;
public static void start(StreamInteractor stream_interactor, Database db) {
@ -47,18 +45,6 @@ public class AvatarManager : StreamInteractionModule, Object {
});
}
public File? get_avatar_file(Account account, Jid jid_) {
string? hash = get_avatar_hash(account, jid_);
if (hash == null) return null;
File file = File.new_for_path(Path.build_filename(folder, hash));
if (!file.query_exists()) {
fetch_and_store_for_jid.begin(account, jid_);
return null;
} else {
return file;
}
}
private string? get_avatar_hash(Account account, Jid jid_) {
Jid jid = jid_;
if (!stream_interactor.get_module(MucManager.IDENTITY).is_groupchat_occupant(jid_, account)) {
@ -73,7 +59,6 @@ public class AvatarManager : StreamInteractionModule, Object {
}
}
[Version (deprecated = true)]
public bool has_avatar_cached(Account account, Jid jid) {
string? hash = get_avatar_hash(account, jid);
return hash != null && cached_pixbuf.has_key(hash);
@ -83,7 +68,6 @@ public class AvatarManager : StreamInteractionModule, Object {
return get_avatar_hash(account, jid) != null;
}
[Version (deprecated = true)]
public Pixbuf? get_cached_avatar(Account account, Jid jid_) {
string? hash = get_avatar_hash(account, jid_);
if (hash == null) return null;
@ -91,7 +75,6 @@ public class AvatarManager : StreamInteractionModule, Object {
return null;
}
[Version (deprecated = true)]
public async Pixbuf? get_avatar(Account account, Jid jid_) {
Jid jid = jid_;
if (!stream_interactor.get_module(MucManager.IDENTITY).is_groupchat_occupant(jid_, account)) {
@ -128,7 +111,17 @@ public class AvatarManager : StreamInteractionModule, Object {
if (image != null) {
cached_pixbuf[hash] = image;
} else {
if (yield fetch_and_store(stream, account, jid, source, hash)) {
Bytes? bytes = null;
if (source == 1) {
bytes = yield Xmpp.Xep.UserAvatars.fetch_image(stream, jid, hash);
} else if (source == 2) {
bytes = yield Xmpp.Xep.VCard.fetch_image(stream, jid, hash);
if (bytes == null && jid.is_bare()) {
db.avatar.delete().with(db.avatar.jid_id, "=", db.get_jid_id(jid)).perform();
}
}
if (bytes != null) {
store_image(hash, bytes);
image = yield get_image(hash);
}
cached_pixbuf[hash] = image;
@ -169,7 +162,7 @@ public class AvatarManager : StreamInteractionModule, Object {
);
foreach (var entry in get_avatar_hashes(account, Source.USER_AVATARS).entries) {
on_user_avatar_received.begin(account, entry.key, entry.value);
user_avatars[entry.key] = entry.value;
}
foreach (var entry in get_avatar_hashes(account, Source.VCARD).entries) {
@ -179,7 +172,7 @@ public class AvatarManager : StreamInteractionModule, Object {
continue;
}
on_vcard_avatar_received.begin(account, entry.key, entry.value);
vcard_avatars[entry.key] = entry.value;
}
}
@ -225,53 +218,12 @@ public class AvatarManager : StreamInteractionModule, Object {
return ret;
}
public async bool fetch_and_store_for_jid(Account account, Jid jid) {
int source = -1;
string? hash = null;
if (user_avatars.has_key(jid)) {
hash = user_avatars[jid];
source = 1;
} else if (vcard_avatars.has_key(jid)) {
hash = vcard_avatars[jid];
source = 2;
} else {
return false;
}
XmppStream? stream = stream_interactor.get_stream(account);
if (stream == null || !stream.negotiation_complete) return false;
return yield fetch_and_store(stream, account, jid, source, hash);
}
private async bool fetch_and_store(XmppStream stream, Account account, Jid jid, int source, string? hash) {
if (hash == null || pending_fetch.contains(hash)) return false;
pending_fetch.add(hash);
Bytes? bytes = null;
if (source == 1) {
bytes = yield Xmpp.Xep.UserAvatars.fetch_image(stream, jid, hash);
} else if (source == 2) {
bytes = yield Xmpp.Xep.VCard.fetch_image(stream, jid, hash);
if (bytes == null && jid.is_bare()) {
db.avatar.delete().with(db.avatar.jid_id, "=", db.get_jid_id(jid)).perform();
}
}
if (bytes != null) {
yield store_image(hash, bytes);
fetched_avatar(jid, account);
}
pending_fetch.remove(hash);
return bytes != null;
}
private async void store_image(string id, Bytes data) {
public void store_image(string id, Bytes data) {
File file = File.new_for_path(Path.build_filename(folder, id));
try {
if (file.query_exists()) file.delete(); //TODO y?
DataOutputStream fos = new DataOutputStream(file.create(FileCreateFlags.REPLACE_DESTINATION));
yield fos.write_bytes_async(data);
fos.write_bytes_async.begin(data);
} catch (Error e) {
// Ignore: we failed in storing, so we refuse to display later...
}
@ -304,24 +256,6 @@ public class AvatarManager : StreamInteractionModule, Object {
return null;
}
}
public string? get_avatar_filepath(Account account, Jid jid_) {
Jid jid = jid_;
if (!stream_interactor.get_module(MucManager.IDENTITY).is_groupchat_occupant(jid_, account)) {
jid = jid_.bare_jid;
}
string? hash = null;
if (user_avatars.has_key(jid)) {
hash = user_avatars[jid];
} else if (vcard_avatars.has_key(jid)) {
hash = vcard_avatars[jid];
}
if (hash == null) return null;
return Path.build_filename(folder, hash);
}
}
}

View file

@ -60,7 +60,7 @@ public class Dino.CallState : Object {
XmppStream stream = stream_interactor.get_stream(call.account);
if (stream == null) return;
Gee.List<Jid> occupants = stream_interactor.get_module(MucManager.IDENTITY).get_other_members(muc, call.account);
Gee.List<Jid> occupants = stream_interactor.get_module(MucManager.IDENTITY).get_other_occupants(muc, call.account);
foreach (Jid occupant in occupants) {
Jid? real_jid = stream_interactor.get_module(MucManager.IDENTITY).get_real_jid(occupant, call.account);
if (real_jid == null) continue;

View file

@ -61,6 +61,8 @@ namespace Dino {
call_state.initiate_groupchat_call.begin(conversation.counterpart);
}
conversation.last_active = call.time;
call_outgoing(call, call_state, conversation);
return call_state;
@ -219,6 +221,7 @@ namespace Dino {
Conversation conversation = stream_interactor.get_module(ConversationManager.IDENTITY).create_conversation(call.counterpart.bare_jid, account, Conversation.Type.CHAT);
stream_interactor.get_module(CallStore.IDENTITY).add_call(call, conversation);
conversation.last_active = call.time;
var call_state = new CallState(call, stream_interactor);
connect_call_state_signals(call_state);
@ -291,6 +294,7 @@ namespace Dino {
Conversation? conversation = stream_interactor.get_module(ConversationManager.IDENTITY).get_conversation(inviter_jid.bare_jid, account);
if (conversation == null) return null;
stream_interactor.get_module(CallStore.IDENTITY).add_call(call, conversation);
conversation.last_active = call.time;
CallState call_state = new CallState(call, stream_interactor);
connect_call_state_signals(call_state);
@ -461,6 +465,7 @@ namespace Dino {
Conversation? conversation = stream_interactor.get_module(ConversationManager.IDENTITY).approx_conversation_for_stanza(from_jid, to_jid, account, message_stanza.type_);
if (conversation == null) return;
conversation.last_active = call_state.call.time;
if (call_state.call.direction == Call.DIRECTION_INCOMING) {
call_incoming(call_state.call, call_state, conversation, video_requested, multiparty);

View file

@ -1,58 +0,0 @@
using Xmpp;
using Gee;
using Qlite;
using Dino.Entities;
public class Dino.Model.ConversationDisplayName : Object {
public string display_name { get; set; }
}
namespace Dino {
public class ContactModels : StreamInteractionModule, Object {
public static ModuleIdentity<ContactModels> IDENTITY = new ModuleIdentity<ContactModels>("contact_models");
public string id { get { return IDENTITY.id; } }
private StreamInteractor stream_interactor;
private HashMap<Conversation, Model.ConversationDisplayName> conversation_models = new HashMap<Conversation, Model.ConversationDisplayName>(Conversation.hash_func, Conversation.equals_func);
public static void start(StreamInteractor stream_interactor) {
ContactModels m = new ContactModels(stream_interactor);
stream_interactor.add_module(m);
}
private ContactModels(StreamInteractor stream_interactor) {
this.stream_interactor = stream_interactor;
stream_interactor.get_module(MucManager.IDENTITY).room_info_updated.connect((account, jid) => {
check_update_models(account, jid, Conversation.Type.GROUPCHAT);
});
stream_interactor.get_module(MucManager.IDENTITY).private_room_occupant_updated.connect((account, room, occupant) => {
check_update_models(account, room, Conversation.Type.GROUPCHAT);
});
stream_interactor.get_module(MucManager.IDENTITY).subject_set.connect((account, jid, subject) => {
check_update_models(account, jid, Conversation.Type.GROUPCHAT);
});
stream_interactor.get_module(RosterManager.IDENTITY).updated_roster_item.connect((account, jid, roster_item) => {
check_update_models(account, jid, Conversation.Type.CHAT);
});
}
private void check_update_models(Account account, Jid jid, Conversation.Type conversation_ty) {
var conversation = stream_interactor.get_module(ConversationManager.IDENTITY).get_conversation(jid, account, conversation_ty);
if (conversation == null) return;
var display_name_model = conversation_models[conversation];
if (display_name_model == null) return;
display_name_model.display_name = Dino.get_conversation_display_name(stream_interactor, conversation, "%s (%s)");
}
public Model.ConversationDisplayName get_display_name_model(Conversation conversation) {
if (conversation_models.has_key(conversation)) return conversation_models[conversation];
var model = new Model.ConversationDisplayName();
model.display_name = Dino.get_conversation_display_name(stream_interactor, conversation, "%s (%s)");
conversation_models[conversation] = model;
return model;
}
}
}

View file

@ -11,7 +11,6 @@ public class ContentItemStore : StreamInteractionModule, Object {
public string id { get { return IDENTITY.id; } }
public signal void new_item(ContentItem item, Conversation conversation);
public signal void history_loaded(Conversation conversation, ContentItem item, int count);
private StreamInteractor stream_interactor;
private Database db;
@ -242,10 +241,8 @@ public class ContentItemStore : StreamInteractionModule, Object {
// return ret;
// }
public Gee.List<ContentItem> get_before(Conversation conversation, ContentItem item, int count, bool request_from_server = true) {
debug("Fetching earlier messages from the db");
public Gee.List<ContentItem> get_before(Conversation conversation, ContentItem item, int count) {
long time = (long) item.time.to_unix();
QueryBuilder select = db.content_item.select()
.where(@"time < ? OR (time = ? AND id < ?)", { time.to_string(), time.to_string(), item.id.to_string() })
.with(db.content_item.conversation_id, "=", conversation.id)
@ -254,18 +251,7 @@ public class ContentItemStore : StreamInteractionModule, Object {
.order_by(db.content_item.id, "DESC")
.limit(count);
var items = get_items_from_query(select, conversation);
if (items.size == 0 && request_from_server) {
// Async request to get earlier messages from the server
var history_sync = stream_interactor.get_module(MessageProcessor.IDENTITY).history_sync;
history_sync.fetch_conversation_data.begin(conversation, item.time, (_, res) => {
history_sync.fetch_conversation_data.end(res);
debug("History loaded");
history_loaded(conversation, item, count);
});
}
return items;
return get_items_from_query(select, conversation);
}
public Gee.List<ContentItem> get_after(Conversation conversation, ContentItem item, int count) {

View file

@ -29,8 +29,6 @@ public class ConversationManager : StreamInteractionModule, Object {
stream_interactor.account_removed.connect(on_account_removed);
stream_interactor.get_module(MessageProcessor.IDENTITY).received_pipeline.connect(new MessageListener(stream_interactor));
stream_interactor.get_module(MessageProcessor.IDENTITY).message_sent.connect(handle_sent_message);
stream_interactor.get_module(Calls.IDENTITY).call_incoming.connect(handle_new_call);
stream_interactor.get_module(Calls.IDENTITY).call_outgoing.connect(handle_new_call);
}
public Conversation create_conversation(Jid jid, Account account, Conversation.Type? type = null) {
@ -196,11 +194,6 @@ public class ConversationManager : StreamInteractionModule, Object {
}
}
private void handle_new_call(Call call, CallState state, Conversation conversation) {
conversation.last_active = call.time;
start_conversation(conversation);
}
private void add_conversation(Conversation conversation) {
if (!conversations[conversation.account].has_key(conversation.counterpart)) {
conversations[conversation.account][conversation.counterpart] = new ArrayList<Conversation>(Conversation.equals_func);

View file

@ -17,7 +17,6 @@ public class Database : Qlite.Database {
public Column<string> alias = new Column.Text("alias");
public Column<bool> enabled = new Column.BoolInt("enabled");
public Column<string> roster_version = new Column.Text("roster_version") { min_version=2 };
// no longer used. all usages already removed. remove db column at some point.
public Column<long> mam_earliest_synced = new Column.Long("mam_earliest_synced") { min_version=4 };
internal AccountTable(Database db) {

View file

@ -46,15 +46,6 @@ public class FileManager : StreamInteractionModule, Object {
return ret;
}
private string sanitize_filename(string filename) {
#if _WIN32
GLib.Regex regex = new GLib.Regex("[<>:\"/\\|?*]");
#else
GLib.Regex regex = new GLib.Regex("[/]");
#endif
return regex.replace(filename, -1, 0, "_");
}
public async void send_file(File file, Conversation conversation) {
FileTransfer file_transfer = new FileTransfer();
file_transfer.account = conversation.account;
@ -72,7 +63,7 @@ public class FileManager : StreamInteractionModule, Object {
try {
FileInfo file_info = file.query_info("*", FileQueryInfoFlags.NONE);
file_transfer.file_name = file_info.get_display_name();
file_transfer.mime_type = Util.get_content_type(file_info);
file_transfer.mime_type = file_info.get_content_type();
file_transfer.size = (int)file_info.get_size();
file_transfer.input_stream = yield file.read_async();
@ -129,7 +120,6 @@ public class FileManager : StreamInteractionModule, Object {
}
yield file_sender.send_file(conversation, file_transfer, file_send_data, file_meta);
file_transfer.state = FileTransfer.State.COMPLETE;
} catch (Error e) {
warning("Send file error: %s", e.message);
@ -252,7 +242,7 @@ public class FileManager : StreamInteractionModule, Object {
}
// Save file
string filename = Random.next_int().to_string("%x") + "_" + sanitize_filename(file_transfer.file_name);
string filename = Random.next_int().to_string("%x") + "_" + file_transfer.file_name;
File file = File.new_for_path(Path.build_filename(get_storage_dir(), filename));
OutputStream os = file.create(FileCreateFlags.REPLACE_DESTINATION);
@ -260,7 +250,6 @@ public class FileManager : StreamInteractionModule, Object {
ssize_t read;
while ((read = yield input_stream.read_async(buffer, Priority.LOW, file_transfer.cancellable)) > 0) {
buffer.length = (int) read;
file_transfer.transferred_bytes += (uint64)read;
yield os.write_async(buffer, Priority.LOW, file_transfer.cancellable);
buffer.length = 1024;
}
@ -270,16 +259,9 @@ public class FileManager : StreamInteractionModule, Object {
file_transfer.input_stream = yield file.read_async();
FileInfo file_info = file_transfer.get_file().query_info("*", FileQueryInfoFlags.NONE);
file_transfer.mime_type = Util.get_content_type(file_info);
file_transfer.mime_type = file_info.get_content_type();
file_transfer.state = FileTransfer.State.COMPLETE;
#if _WIN32 // Add Zone.Identifier so Windows knows this file was downloaded from the internet
var file_alternate_stream = File.new_for_path(Path.build_filename(get_storage_dir(), filename + ":Zone.Identifier"));
var os_alternate_stream = file_alternate_stream.create(FileCreateFlags.REPLACE_DESTINATION);
os_alternate_stream.write("[ZoneTransfer]\r\nZoneId=3".data);
#endif
} catch (Error e) {
warning("Error downloading file: %s", e.message);
file_transfer.state = FileTransfer.State.FAILED;
@ -294,13 +276,8 @@ public class FileManager : StreamInteractionModule, Object {
file_transfer.ourpart = stream_interactor.get_module(MucManager.IDENTITY).get_own_jid(conversation.counterpart, conversation.account) ?? conversation.account.bare_jid;
file_transfer.direction = from.equals(file_transfer.ourpart) ? FileTransfer.DIRECTION_SENT : FileTransfer.DIRECTION_RECEIVED;
} else {
if (from.equals_bare(conversation.account.bare_jid)) {
file_transfer.ourpart = from;
file_transfer.direction = FileTransfer.DIRECTION_SENT;
} else {
file_transfer.ourpart = conversation.account.full_jid;
file_transfer.direction = FileTransfer.DIRECTION_RECEIVED;
}
file_transfer.ourpart = conversation.account.full_jid;
file_transfer.direction = from.equals_bare(file_transfer.ourpart) ? FileTransfer.DIRECTION_SENT : FileTransfer.DIRECTION_RECEIVED;
}
file_transfer.time = time;
file_transfer.local_time = local_time;
@ -308,7 +285,6 @@ public class FileManager : StreamInteractionModule, Object {
file_transfer.file_name = file_meta.file_name;
file_transfer.size = (int)file_meta.size;
file_transfer.info = info;
file_transfer.transferred_bytes = 0;
var encryption = file_provider.get_encryption(file_transfer, receive_data, file_meta);
if (encryption != Encryption.NONE) file_transfer.encryption = encryption;
@ -341,11 +317,11 @@ public class FileManager : StreamInteractionModule, Object {
private async void save_file(FileTransfer file_transfer) throws FileSendError {
try {
string filename = Random.next_int().to_string("%x") + "_" + sanitize_filename(file_transfer.file_name);
string filename = Random.next_int().to_string("%x") + "_" + file_transfer.file_name;
File file = File.new_for_path(Path.build_filename(get_storage_dir(), filename));
OutputStream os = file.create(FileCreateFlags.REPLACE_DESTINATION);
yield os.splice_async(file_transfer.input_stream, OutputStreamSpliceFlags.CLOSE_SOURCE|OutputStreamSpliceFlags.CLOSE_TARGET);
file_transfer.state = FileTransfer.State.IN_PROGRESS;
file_transfer.state = FileTransfer.State.COMPLETE;
file_transfer.path = filename;
file_transfer.input_stream = yield file.read_async();
} catch (Error e) {

View file

@ -22,7 +22,6 @@ public class Dino.HistorySync {
public HashMap<Account, DateTime> catchup_until_time = new HashMap<Account, DateTime>(Account.hash_func, Account.equals_func);
private HashMap<string, Gee.List<Xmpp.MessageStanza>> stanzas = new HashMap<string, Gee.List<Xmpp.MessageStanza>>();
private HashMap<string, int> messages_processed = new HashMap<string, int>();
public class HistorySync(Database db, StreamInteractor stream_interactor) {
this.stream_interactor = stream_interactor;
@ -121,94 +120,6 @@ public class Dino.HistorySync {
}
}
private async PageRequestResult fetch_messages(Account account, Xmpp.MessageArchiveManagement.V2.MamQueryParams query_params) {
debug("[%s | %s] Fetch query %s - %s", account.bare_jid.to_string(), query_params.mam_server.to_string(), query_params.start != null ? query_params.start.to_string() : "", query_params.end != null ? query_params.end.to_string() : "");
PageRequestResult? page_result = null;
int processed_pages = 0;
do {
page_result = yield get_mam_page(account, query_params, page_result, null);
processed_pages++;
debug("%d messages left to process, current page is %d", messages_processed[query_params.query_id], processed_pages);
if (messages_processed[query_params.query_id] <= 1) {
debug("Done processing new messages");
break;
}
debug("[%s | %s] Page result %s (got stanzas: %s)", account.bare_jid.to_string(), query_params.mam_server.to_string(), page_result.page_result.to_string(), (page_result.stanzas != null).to_string());
if (page_result.page_result == PageResult.Error || page_result.page_result == PageResult.Cancelled || page_result.query_result.first == null) {
return page_result;
}
} while (page_result.page_result == PageResult.MorePagesAvailable);
return page_result;
}
public async void fetch_data(Account account, Jid target, DateTime latest) {
debug("Fetch history for %s", target.to_string());
var query_params = new Xmpp.MessageArchiveManagement.V2.MamQueryParams.query_before(target, latest, null);
string query_id = query_params.query_id;
messages_processed[query_id] = HISTORY_SYNC_MAM_MESSAGES;
yield fetch_messages(account, query_params);
}
public async void fetch_conversation_data(Conversation? conversation, DateTime latest) {
if (conversation == null) {
warning("Failed to fetch history, conversation is null");
return;
}
var target = conversation.counterpart.bare_jid;
var account = conversation.account;
debug("Fetch history for %s", target.to_string());
var query_params = new Xmpp.MessageArchiveManagement.V2.MamQueryParams.query_before(target, latest, null);
if (conversation.type_ == Conversation.Type.CHAT) {
query_params.mam_server = account.bare_jid;
query_params.with = target;
}
string query_id = query_params.query_id;
messages_processed[query_id] = HISTORY_SYNC_MAM_MESSAGES;
yield fetch_messages(account, query_params);
}
public async void fetch_history(Account account, Jid target, Cancellable? cancellable = null) {
debug("Fetch history for %s", target.to_string());
RowOption latest_row_opt = db.mam_catchup.select()
.with(db.mam_catchup.account_id, "=", account.id)
.with(db.mam_catchup.server_jid, "=", target.to_string())
.with(db.mam_catchup.to_time, ">=", (long) new DateTime.from_unix_utc(0).to_unix())
.order_by(db.mam_catchup.to_time, "DESC")
.single().row();
Row? latest_row = latest_row_opt.is_present() ? latest_row_opt.inner : null;
int? db_id = null;
string? latest_id = null;
if (latest_row != null) {
// Local mam catchup data exists so we can filter messages based on the latest id
db_id = latest_row[db.mam_catchup.id];
latest_id = latest_row[db.mam_catchup.from_id];
}
DateTime latest_time = new DateTime.now();
Xmpp.MessageArchiveManagement.V2.MamQueryParams query_params;
query_params = new Xmpp.MessageArchiveManagement.V2.MamQueryParams.query_before(target, latest_time, latest_id);
if (db_id == null) {
query_params.mam_server = account.bare_jid;
query_params.with = target;
}
yield fetch_query(account, query_params, db_id, cancellable);
}
public async void fetch_everything(Account account, Jid mam_server, Cancellable? cancellable = null, DateTime until_earliest_time = new DateTime.from_unix_utc(0)) {
debug("Fetch everything for %s %s", mam_server.to_string(), until_earliest_time != null ? @"(until $until_earliest_time)" : "");
RowOption latest_row_opt = db.mam_catchup.select()
@ -410,7 +321,7 @@ public class Dino.HistorySync {
* Iteratively fetches all pages returned for a query (until a PageResult other than MorePagesAvailable is returned)
* @return The last PageRequestResult result
**/
private async PageRequestResult fetch_query(Account account, Xmpp.MessageArchiveManagement.V2.MamQueryParams query_params, int? db_id, Cancellable? cancellable = null) {
private async PageRequestResult fetch_query(Account account, Xmpp.MessageArchiveManagement.V2.MamQueryParams query_params, int db_id, Cancellable? cancellable = null) {
debug("[%s | %s] Fetch query %s - %s", account.bare_jid.to_string(), query_params.mam_server.to_string(), query_params.start != null ? query_params.start.to_string() : "", query_params.end != null ? query_params.end.to_string() : "");
PageRequestResult? page_result = null;
do {
@ -422,21 +333,17 @@ public class Dino.HistorySync {
string earliest_mam_id = page_result.query_result.first;
long earliest_mam_time = (long)mam_times[account][earliest_mam_id].to_unix();
if (db_id != null) {
// Update local mam catchup data if it exists
debug("Updating %s to %s, %s", query_params.mam_server.to_string(), earliest_mam_time.to_string(), earliest_mam_id);
var query = db.mam_catchup.update()
.with(db.mam_catchup.id, "=", db_id)
.set(db.mam_catchup.from_time, earliest_mam_time)
.set(db.mam_catchup.from_id, earliest_mam_id);
debug("Updating %s to %s, %s", query_params.mam_server.to_string(), earliest_mam_time.to_string(), earliest_mam_id);
var query = db.mam_catchup.update()
.with(db.mam_catchup.id, "=", db_id)
.set(db.mam_catchup.from_time, earliest_mam_time)
.set(db.mam_catchup.from_id, earliest_mam_id);
if (page_result.page_result == PageResult.NoMoreMessages) {
// If the server doesn't have more messages, store that this range is at its end.
query.set(db.mam_catchup.from_end, true);
}
query.perform();
if (page_result.page_result == PageResult.NoMoreMessages) {
// If the server doesn't have more messages, store that this range is at its end.
query.set(db.mam_catchup.from_end, true);
}
query.perform();
} while (page_result.page_result == PageResult.MorePagesAvailable);
return page_result;
@ -481,6 +388,9 @@ public class Dino.HistorySync {
page_result = PageResult.NoMoreMessages;
}
string selection = null;
string[] selection_args = {};
string query_id = query_params.query_id;
string? after_id = query_params.start_id;
@ -506,7 +416,6 @@ public class Dino.HistorySync {
}
}
}
if (hitted_range.has_key(query_id) && hitted_range[query_id] == -2) {
// Message got filtered out by xmpp-vala, but succesful range fetch nevertheless
yield send_messages_back_into_pipeline(account, query_id);
@ -521,24 +430,15 @@ public class Dino.HistorySync {
if (cancellable != null && cancellable.is_cancelled()) {
page_result = PageResult.Cancelled;
}
return new PageRequestResult(page_result, query_result, stanzas_for_query);
}
private async void send_messages_back_into_pipeline(Account account, string query_id, Cancellable? cancellable = null) {
if (!stanzas.has_key(query_id)) {
return;
}
if (!stanzas.has_key(query_id)) return;
foreach (Xmpp.MessageStanza message in stanzas[query_id]) {
if (cancellable != null && cancellable.is_cancelled()) break;
bool result = yield stream_interactor.get_module(MessageProcessor.IDENTITY).run_pipeline_announce(account, message);
if (result && messages_processed.has_key(query_id)) {
int count = messages_processed[query_id];
count = count - 1;
messages_processed[query_id] = count;
}
yield stream_interactor.get_module(MessageProcessor.IDENTITY).run_pipeline_announce(account, message);
}
stanzas.unset(query_id);
}

View file

@ -220,19 +220,7 @@ public class JingleFileSender : FileSender, Object {
}
}
try {
var? module = stream.get_module(Xep.JingleFileTransfer.Module.IDENTITY);
if (module == null)
throw new FileSendError.UPLOAD_FAILED("unexpected null module");
module.transferred_bytes.connect((bytes) => {
file_transfer.transferred_bytes += bytes;
});
yield module.offer_file_stream(stream, full_jid,
file_transfer.cancellable, file_transfer.input_stream,
file_transfer.server_file_name, file_meta.size,
precondition_name, precondition_options);
yield stream.get_module(Xep.JingleFileTransfer.Module.IDENTITY).offer_file_stream(stream, full_jid, file_transfer.input_stream, file_transfer.server_file_name, file_meta.size, precondition_name, precondition_options);
} catch (Error e) {
throw new FileSendError.UPLOAD_FAILED(@"offer_file_stream failed: $(e.message)");
}

View file

@ -38,6 +38,7 @@ public class MessageProcessor : StreamInteractionModule, Object {
received_pipeline.connect(new FilterMessageListener());
received_pipeline.connect(new StoreMessageListener(this, stream_interactor));
received_pipeline.connect(new StoreContentItemListener(stream_interactor));
received_pipeline.connect(new MamMessageListener(stream_interactor));
stream_interactor.account_added.connect(on_account_added);
@ -130,18 +131,14 @@ public class MessageProcessor : StreamInteractionModule, Object {
run_pipeline_announce.begin(account, message_stanza);
}
public async bool run_pipeline_announce(Account account, Xmpp.MessageStanza message_stanza) {
public async void run_pipeline_announce(Account account, Xmpp.MessageStanza message_stanza) {
Entities.Message message = yield parse_message_stanza(account, message_stanza);
Conversation? conversation = stream_interactor.get_module(ConversationManager.IDENTITY).get_conversation_for_message(message);
if (conversation == null) {
return false;
}
if (conversation == null) return;
bool abort = yield received_pipeline.run(message, message_stanza, conversation);
if (abort) {
return false;
}
if (abort) return;
if (message.direction == Entities.Message.DIRECTION_RECEIVED) {
message_received(message, conversation);
@ -150,7 +147,6 @@ public class MessageProcessor : StreamInteractionModule, Object {
}
message_sent_or_received(message, conversation);
return true;
}
public async Entities.Message parse_message_stanza(Account account, Xmpp.MessageStanza message) {
@ -172,6 +168,7 @@ public class MessageProcessor : StreamInteractionModule, Object {
new_message.counterpart = counterpart_override ?? (new_message.direction == Entities.Message.DIRECTION_SENT ? message.to : message.from);
new_message.ourpart = new_message.direction == Entities.Message.DIRECTION_SENT ? message.from : message.to;
XmppStream? stream = stream_interactor.get_stream(account);
Xmpp.MessageArchiveManagement.MessageFlag? mam_message_flag = Xmpp.MessageArchiveManagement.MessageFlag.get_flag(message);
EntityInfo entity_info = stream_interactor.get_module(EntityInfo.IDENTITY);
if (mam_message_flag != null && mam_message_flag.mam_id != null) {
@ -250,7 +247,6 @@ public class MessageProcessor : StreamInteractionModule, Object {
// If the message is a duplicate
if (builder.count() > 0) {
warning("deduplicate by server id");
history_sync.on_server_id_duplicate(account, stanza, message);
return true;
}
@ -277,11 +273,6 @@ public class MessageProcessor : StreamInteractionModule, Object {
}
}
bool duplicate = builder.single().row().is_present();
if (duplicate) {
warning("deduplicate by uuid");
}
return duplicate;
}
@ -302,13 +293,7 @@ public class MessageProcessor : StreamInteractionModule, Object {
} else {
builder.with_null(db.message.counterpart_resource);
}
bool duplicate = builder.count() > 0;
if (duplicate) {
warning("deduplicate by content and metadata");
}
return duplicate;
return builder.count() > 0;
}
private class DeduplicateMessageListener : MessageListener {
@ -374,15 +359,35 @@ public class MessageProcessor : StreamInteractionModule, Object {
}
public override async bool run(Entities.Message message, Xmpp.MessageStanza stanza, Conversation conversation) {
if (message.body == null) {
return true;
}
if (message.body == null) return true;
stream_interactor.get_module(ContentItemStore.IDENTITY).insert_message(message, conversation);
return false;
}
}
private class MamMessageListener : MessageListener {
public string[] after_actions_const = new string[]{ "DEDUPLICATE" };
public override string action_group { get { return "MAM_NODE"; } }
public override string[] after_actions { get { return after_actions_const; } }
private StreamInteractor stream_interactor;
public MamMessageListener(StreamInteractor stream_interactor) {
this.stream_interactor = stream_interactor;
}
public override async bool run(Entities.Message message, Xmpp.MessageStanza stanza, Conversation conversation) {
bool is_mam_message = Xmpp.MessageArchiveManagement.MessageFlag.get_flag(stanza) != null;
XmppStream? stream = stream_interactor.get_stream(conversation.account);
Xmpp.MessageArchiveManagement.Flag mam_flag = Xmpp.MessageArchiveManagement.Flag.get_flag(stream);
if (is_mam_message || (mam_flag != null && mam_flag.cought_up == true)) {
conversation.account.mam_earliest_synced = message.local_time;
}
return false;
}
}
public Entities.Message create_out_message(string text, Conversation conversation) {
Entities.Message message = new Entities.Message(text);
message.type_ = Util.get_message_type_for_conversation(conversation);

View file

@ -54,7 +54,6 @@ public class MucManager : StreamInteractionModule, Object {
}
return true;
});
stream_interactor.get_module(MessageProcessor.IDENTITY).build_message_stanza.connect(on_build_message_stanza);
}
// already_autojoin: Without this flag we'd be retrieving bookmarks (to check for autojoin) from the sender on every join
@ -106,8 +105,8 @@ public class MucManager : StreamInteractionModule, Object {
if (can_do_mam) {
var history_sync = stream_interactor.get_module(MessageProcessor.IDENTITY).history_sync;
if (conversation == null) {
// We never joined the conversation before, fetch latest MAM pages
yield history_sync.fetch_data(account, jid.bare_jid, new DateTime.now());
// We never joined the conversation before, just fetch the latest MAM page
yield history_sync.fetch_latest_page(account, jid.bare_jid, null, new DateTime.from_unix_utc(0), cancellable);
} else {
// Fetch everything up to the last time the user actively joined
if (!mucs_sync_cancellables.has_key(account)) {
@ -259,23 +258,7 @@ public class MucManager : StreamInteractionModule, Object {
return is_groupchat(jid, account) && !is_private_room(account, jid);
}
public Gee.List<Jid>? get_all_members(Jid jid, Account account) {
if (is_groupchat(jid, account)) {
Gee.List<Jid> ret = new ArrayList<Jid>(Jid.equals_func);
// This should return all members of the chat
Gee.List<Jid>? members = get_offline_members(jid, account);
if (members != null) {
ret.add_all(members);
}
return ret;
}
return null;
}
public Gee.List<Jid>? get_members(Jid jid, Account account) {
public Gee.List<Jid>? get_occupants(Jid jid, Account account) {
if (is_groupchat(jid, account)) {
Gee.List<Jid> ret = new ArrayList<Jid>(Jid.equals_func);
Gee.List<Jid>? full_jids = stream_interactor.get_module(PresenceManager.IDENTITY).get_full_jids(jid, account);
@ -284,21 +267,18 @@ public class MucManager : StreamInteractionModule, Object {
// Remove eventual presence from bare jid
ret.remove(jid);
}
return ret;
}
return null;
}
public Gee.List<Jid>? get_other_members(Jid jid, Account account) {
Gee.List<Jid>? members = get_members(jid, account);
public Gee.List<Jid>? get_other_occupants(Jid jid, Account account) {
Gee.List<Jid>? occupants = get_occupants(jid, account);
Jid? own_jid = get_own_jid(jid, account);
if (members != null && own_jid != null) {
members.remove(own_jid);
if (occupants != null && own_jid != null) {
occupants.remove(own_jid);
}
return members;
return occupants;
}
public bool is_groupchat(Jid jid, Account account) {
@ -554,25 +534,12 @@ public class MucManager : StreamInteractionModule, Object {
}
private void on_invite_received(Account account, Jid room_jid, Jid from_jid, string? password, string? reason) {
info("Invite received for room %s", room_jid.bare_jid.to_string());
Gee.List<Conversation> conversations = stream_interactor.get_module(ConversationManager.IDENTITY).get_active_conversations(account);
foreach (Conversation conversation in conversations) {
if (conversation.counterpart.bare_jid.to_string() == room_jid.bare_jid.to_string()) {
// HACK: try to skip duplicate invites for active conversations
warning("Skipping duplicate invite for conversation %s", room_jid.bare_jid.to_string());
return;
}
}
if (!invites.has_key(account)) {
invites[account] = new LinkedList<Jid>(Jid.equals_func);
}
if (invites[account].contains(room_jid)) {
return;
}
if (invites[account].contains(room_jid)) return;
invites[account].add(room_jid);
invite_received(account, room_jid, from_jid, password, reason);
Timeout.add_seconds(5, () => {
@ -628,19 +595,17 @@ public class MucManager : StreamInteractionModule, Object {
private void set_autojoin(Account account, XmppStream stream, Jid jid, string? nick, string? password) {
bookmarks_provider[account].get_conferences.begin(stream, (_, res) => {
Set<Conference>? conferences = bookmarks_provider[account].get_conferences.end(res);
if (conferences == null) return;
if (conferences != null) {
foreach (Conference conference in conferences) {
if (conference.jid.equals(jid)) {
if (!conference.autojoin) {
Conference new_conference = new Conference() { jid=jid, nick=nick ?? conference.nick, name=conference.name, password=password ?? conference.password, autojoin=true };
bookmarks_provider[account].replace_conference.begin(stream, jid, new_conference);
}
return;
foreach (Conference conference in conferences) {
if (conference.jid.equals(jid)) {
if (!conference.autojoin) {
Conference new_conference = new Conference() { jid=jid, nick=nick ?? conference.nick, name=conference.name, password=password ?? conference.password, autojoin=true };
bookmarks_provider[account].replace_conference.begin(stream, jid, new_conference);
}
return;
}
}
Conference changed = new Xep.Bookmarks.Bookmarks1Conference(jid) { nick=nick, password=password, autojoin=true };
bookmarks_provider[account].add_conference.begin(stream, changed);
});
@ -686,12 +651,6 @@ public class MucManager : StreamInteractionModule, Object {
conference_removed(account, jid);
}
private void on_build_message_stanza(Entities.Message message, Xmpp.MessageStanza message_stanza, Conversation conversation) {
if (conversation.type_ == Conversation.Type.GROUPCHAT_PM) {
Xmpp.Xep.Muc.add_muc_pm_message_stanza_x_node(message_stanza);
}
}
private void self_ping(Account account) {
XmppStream? stream = stream_interactor.get_stream(account);
if (stream == null) return;

View file

@ -12,7 +12,9 @@ public class NotificationEvents : StreamInteractionModule, Object {
public signal void notify_content_item(ContentItem content_item, Conversation conversation);
private StreamInteractor stream_interactor;
private Gee.List<Promise<NotificationProvider>> promises = new ArrayList<Promise<NotificationProvider>>();
private Future<NotificationProvider> notifier;
private Promise<NotificationProvider> notifier_promise;
private bool notifier_outstanding = true;
public static void start(StreamInteractor stream_interactor) {
NotificationEvents m = new NotificationEvents(stream_interactor);
@ -29,16 +31,18 @@ public class NotificationEvents : StreamInteractionModule, Object {
stream_interactor.get_module(MucManager.IDENTITY).voice_request_received.connect((account, room_jid, from_jid, nick) => on_voice_request_received.begin(account, room_jid, from_jid, nick));
stream_interactor.get_module(Calls.IDENTITY).call_incoming.connect((call, state, conversation, video, multiparty) => on_call_incoming.begin(call, state, conversation, video, multiparty));
stream_interactor.get_module(Calls.IDENTITY).call_outgoing.connect((call, state, conversation) => on_call_outgoing.begin(call));
stream_interactor.connection_manager.connection_error.connect((account, error) => on_connection_error.begin(account, error));
stream_interactor.get_module(ChatInteraction.IDENTITY).focused_in.connect((conversation) => on_focused_in.begin(conversation));
notifier_promise = new Promise<NotificationProvider>();
notifier = notifier_promise.future;
}
public async void register_notification_provider(NotificationProvider notification_provider) {
var promise = new Promise<NotificationProvider>();
promise.set_value(notification_provider);
promises.add(promise);
if (notifier_outstanding || (yield notifier.wait_async()).get_priority() < notification_provider.get_priority()) {
notifier_outstanding = false;
notifier_promise.set_value(notification_provider);
}
}
private async void on_content_item_received(ContentItem item, Conversation conversation) {
@ -73,10 +77,8 @@ public class NotificationEvents : StreamInteractionModule, Object {
notify_content_item(item, conversation);
if (notify != Conversation.NotifySetting.OFF) {
foreach(var promise in promises) {
NotificationProvider notifier = yield promise.future.wait_async();
yield notifier.notify_message(message, conversation, conversation_display_name, participant_display_name);
}
NotificationProvider notifier = yield notifier.wait_async();
yield notifier.notify_message(message, conversation, conversation_display_name, participant_display_name);
}
break;
case FileItem.TYPE:
@ -89,10 +91,8 @@ public class NotificationEvents : StreamInteractionModule, Object {
notify_content_item(item, conversation);
if (notify != Conversation.NotifySetting.OFF) {
foreach(var promise in promises) {
NotificationProvider notifier = yield promise.future.wait_async();
yield notifier.notify_file(file_transfer, conversation, is_image, conversation_display_name, participant_display_name);
}
NotificationProvider notifier = yield notifier.wait_async();
yield notifier.notify_file(file_transfer, conversation, is_image, conversation_display_name, participant_display_name);
}
break;
case CallItem.TYPE:
@ -105,47 +105,29 @@ public class NotificationEvents : StreamInteractionModule, Object {
Conversation? conversation = stream_interactor.get_module(ConversationManager.IDENTITY).get_conversation(room_jid, account, Conversation.Type.GROUPCHAT);
if (conversation == null) return;
foreach(var promise in promises) {
NotificationProvider notifier = yield promise.future.wait_async();
yield notifier.notify_voice_request(conversation, from_jid);
}
NotificationProvider notifier = yield notifier.wait_async();
yield notifier.notify_voice_request(conversation, from_jid);
}
private async void on_received_subscription_request(Jid jid, Account account) {
Conversation conversation = stream_interactor.get_module(ConversationManager.IDENTITY).create_conversation(jid, account, Conversation.Type.CHAT);
if (stream_interactor.get_module(ChatInteraction.IDENTITY).is_active_focus(conversation)) return;
foreach(var promise in promises) {
NotificationProvider notifier = yield promise.future.wait_async();
yield notifier.notify_subscription_request(conversation);
}
NotificationProvider notifier = yield notifier.wait_async();
yield notifier.notify_subscription_request(conversation);
}
private async void on_call_incoming(Call call, CallState call_state, Conversation conversation, bool video, bool multiparty) {
if (!stream_interactor.get_module(Calls.IDENTITY).can_we_do_calls(call.account)) return;
string conversation_display_name = get_conversation_display_name(stream_interactor, conversation, null);
foreach(var promise in promises) {
NotificationProvider notifier = yield promise.future.wait_async();
yield notifier.notify_call(call, conversation, video, multiparty, conversation_display_name);
call.notify["state"].connect(() => {
if (call.state != Call.State.RINGING) {
notifier.retract_call_notification.begin(call, conversation);
}
});
}
}
private async void on_call_outgoing(Call call) {
foreach(var promise in promises) {
NotificationProvider notifier = yield promise.future.wait_async();
yield notifier.notify_dialing();
call.notify["state"].connect(() => {
if (call.state != Call.State.ESTABLISHING) {
notifier.retract_dialing.begin();
}
});
}
NotificationProvider notifier = yield notifier.wait_async();
yield notifier.notify_call(call, conversation, video, multiparty, conversation_display_name);
call.notify["state"].connect(() => {
if (call.state != Call.State.RINGING) {
notifier.retract_call_notification.begin(call, conversation);
}
});
}
private async void on_invite_received(Account account, Jid room_jid, Jid from_jid, string? password, string? reason) {
@ -157,26 +139,19 @@ public class NotificationEvents : StreamInteractionModule, Object {
Conversation direct_conversation = new Conversation(from_jid, account, Conversation.Type.CHAT);
inviter_display_name = get_participant_display_name(stream_interactor, direct_conversation, from_jid);
}
foreach(var promise in promises) {
NotificationProvider notifier = yield promise.future.wait_async();
yield notifier.notify_muc_invite(account, room_jid, from_jid, inviter_display_name);
}
NotificationProvider notifier = yield notifier.wait_async();
yield notifier.notify_muc_invite(account, room_jid, from_jid, inviter_display_name);
}
private async void on_connection_error(Account account, ConnectionManager.ConnectionError error) {
foreach(var promise in promises) {
NotificationProvider notifier = yield promise.future.wait_async();
yield notifier.notify_connection_error(account, error);
}
NotificationProvider notifier = yield notifier.wait_async();
yield notifier.notify_connection_error(account, error);
}
private async void on_focused_in(Conversation conversation) {
foreach(var promise in promises) {
NotificationProvider notifier = yield promise.future.wait_async();
yield notifier.retract_content_item_notifications();
yield notifier.retract_conversation_notifications(conversation);
}
NotificationProvider notifier = yield notifier.wait_async();
yield notifier.retract_content_item_notifications();
yield notifier.retract_conversation_notifications(conversation);
}
}
@ -187,8 +162,6 @@ public interface NotificationProvider : Object {
public abstract async void notify_file(FileTransfer file_transfer, Conversation conversation, bool is_image, string conversation_display_name, string? participant_display_name);
public abstract async void notify_call(Call call, Conversation conversation, bool video, bool multiparty, string conversation_display_name);
public abstract async void retract_call_notification(Call call, Conversation conversation);
public abstract async void notify_dialing();
public abstract async void retract_dialing();
public abstract async void notify_subscription_request(Conversation conversation);
public abstract async void notify_connection_error(Account account, ConnectionManager.ConnectionError error);
public abstract async void notify_muc_invite(Account account, Jid room_jid, Jid from_jid, string inviter_display_name);

View file

@ -71,12 +71,6 @@ public class Register : StreamInteractionModule, Object{
return ret;
}
public async string? change_password(Account account, string new_pw){
XmppStream stream = stream_interactor.get_stream(account);
if (stream == null) return "Connection unavailable";
return yield stream.get_module(Xep.InBandRegistration.Module.IDENTITY).change_password(stream, account.full_jid, new_pw);
}
public class ServerAvailabilityReturn {
public bool available { get; set; }
public TlsCertificateFlags? error_flags { get; set; }
@ -235,4 +229,3 @@ public class Register : StreamInteractionModule, Object{
}
}

View file

@ -89,12 +89,7 @@ public class ModuleIdentity<T> : Object {
}
public T? cast(StreamInteractionModule module) {
#if VALA_0_56_11
// We can't typecheck due to compiler bug
return (T) module;
#else
return module.get_type().is_a(typeof(T)) ? (T?) module : null;
#endif
}
public bool matches(StreamInteractionModule module) {

View file

@ -4,25 +4,6 @@ using Qlite;
namespace Dino {
public class Util {
#if _WIN32
[CCode (cname = "ShellExecuteA", cheader_filename = "windows.h")]
private static extern int* ShellExecuteA(int* hwnd, string operation, string file, string parameters, string directory, int showCmd);
[CCode (cname = "CoInitialize", cheader_filename = "windows.h")]
private static extern int CoInitialize(void* reserved);
[CCode (cname = "CoUninitialize", cheader_filename = "windows.h")]
private static extern void CoUninitialize();
private static int* ShellExecute(string operation, string file) {
CoInitialize(null);
var result = ShellExecuteA(null, operation, file, null, null, 1);
CoUninitialize();
return result;
}
#endif
public static Message.Type get_message_type_for_conversation(Conversation conversation) {
switch (conversation.type_) {
case Conversation.Type.CHAT:
@ -48,33 +29,6 @@ public class Util {
assert_not_reached();
}
}
}
public static void launch_default_for_uri(string file_uri)
{
#if _WIN32
ShellExecute("open", file_uri);
#else
AppInfo.launch_default_for_uri(file_uri, null);
#endif
}
public static string get_content_type(FileInfo fileInfo)
{
#if _WIN32
string fileName = fileInfo.get_name();
int fileNameLength = fileName.length;
int extIndex = fileName.last_index_of(".");
if (extIndex < fileNameLength)
{
string extension = fileName.substring(extIndex, fileNameLength - extIndex);
string mime_type = ContentType.get_mime_type(extension);
if (mime_type != null && mime_type.length != 0)
{
return mime_type;
}
}
#endif
return fileInfo.get_content_type();
}
}
}

View file

@ -2,7 +2,6 @@ namespace Dino {
private extern const string SYSTEM_LIBDIR_NAME;
private extern const string SYSTEM_PLUGIN_DIR;
private extern const string SYSTEM_LOCALEDIR_NAME;
public class SearchPathGenerator {
@ -13,21 +12,14 @@ public class SearchPathGenerator {
}
public string get_locale_path(string gettext_package, string locale_install_dir) {
if (exec_path != null) {
var exec_dir = Path.get_dirname(exec_path);
string[] search_paths = new string[] {
Path.build_filename(exec_dir, "locale"),
Path.build_filename(Path.get_dirname(exec_dir), SYSTEM_LOCALEDIR_NAME)
};
foreach (var path in search_paths) {
if (FileUtils.test(Path.build_filename(path, "en", "LC_MESSAGES", gettext_package + ".mo"), FileTest.IS_REGULAR)) {
debug(@"Found locale $(gettext_package).mo in $(path)");
return path;
}
string? locale_dir = null;
if (Path.get_dirname(exec_path).contains("dino") || Path.get_dirname(exec_path) == "." || Path.get_dirname(exec_path).contains("build")) {
string exec_locale = Path.build_filename(Path.get_dirname(exec_path), "locale");
if (FileUtils.test(Path.build_filename(exec_locale, "en", "LC_MESSAGES", gettext_package + ".mo"), FileTest.IS_REGULAR)) {
locale_dir = exec_locale;
}
}
return locale_install_dir;
return locale_dir ?? locale_install_dir;
}
public string[] get_plugin_paths() {

View file

@ -1,6 +0,0 @@
// Not used in Meson.
namespace Dino {
extern const string VERSION;
}

View file

@ -4,7 +4,6 @@ int main(string[] args) {
GLib.Test.init(ref args);
GLib.Test.set_nonfatal_assertions();
TestSuite.get_root().add_suite(new WeakMapTest().get_suite());
TestSuite.get_root().add_suite(new JidTest().get_suite());
return GLib.Test.run();
}

View file

@ -1,5 +1,4 @@
using Dino.Entities;
using Xmpp;
namespace Dino.Test {
@ -13,39 +12,27 @@ class JidTest : Gee.TestCase {
}
private void test_parse() {
try {
Jid jid = new Jid("user@example.com/res");
fail_if(jid.localpart != "user");
fail_if(jid.domainpart != "example.com");
fail_if(jid.resourcepart != "res");
fail_if(jid.to_string() != "user@example.com/res");
} catch (Error e) {
fail_if_reached(@"Throws $(e.message)");
}
Jid jid = new Jid("user@example.com/res");
fail_if(jid.localpart != "user");
fail_if(jid.domainpart != "example.com");
fail_if(jid.resourcepart != "res");
fail_if(jid.to_string() != "user@example.com/res");
}
private void test_components() {
try {
Jid jid = new Jid.components("user", "example.com", "res");
fail_if(jid.localpart != "user");
fail_if(jid.domainpart != "example.com");
fail_if(jid.resourcepart != "res");
fail_if(jid.to_string() != "user@example.com/res");
} catch (Error e) {
fail_if_reached(@"Throws $(e.message)");
}
Jid jid = new Jid.components("user", "example.com", "res");
fail_if(jid.localpart != "user");
fail_if(jid.domainpart != "example.com");
fail_if(jid.resourcepart != "res");
fail_if(jid.to_string() != "user@example.com/res");
}
private void test_with_res() {
try {
Jid jid = new Jid("user@example.com").with_resource("res");
fail_if(jid.localpart != "user");
fail_if(jid.domainpart != "example.com");
fail_if(jid.resourcepart != "res");
fail_if(jid.to_string() != "user@example.com/res");
} catch (Error e) {
fail_if_reached(@"Throws $(e.message)");
}
Jid jid = new Jid.with_resource("user@example.com", "res");
fail_if(jid.localpart != "user");
fail_if(jid.domainpart != "example.com");
fail_if(jid.resourcepart != "res");
fail_if(jid.to_string() != "user@example.com/res");
}
}

View file

@ -1,36 +0,0 @@
import argparse
import subprocess
VERSION_VALA = """\
namespace Dino {{
public const string VERSION = "{}";
}}
"""
def compute_version(file, git_repo, git):
try:
with open(file) as f:
return f.read().strip()
except FileNotFoundError:
pass
return subprocess.check_output([git, "describe", "--tags"], cwd=git_repo, text=True).strip()
def generate_version_vala(version):
if "\\" in version or "\"" in version:
raise ValueError(f"invalid version {version!r}")
return VERSION_VALA.format(version)
def main():
p = argparse.ArgumentParser(description="Compute the Dino version")
p.add_argument("--git-repo", help="Path to checked out git repository")
p.add_argument("--git", help="Path to git executable", default="git")
p.add_argument("version_file", metavar="VERSION_FILE", help="Use this file's contents as version if the file exists")
p.add_argument("output", metavar="OUTPUT", help="Vala file to output to")
args = p.parse_args()
out = generate_version_vala(compute_version(args.version_file, args.git_repo, args.git))
with open(args.output, "w") as f:
f.write(out)
if __name__ == "__main__":
main()

View file

@ -17,7 +17,9 @@ find_packages(MAIN_PACKAGES REQUIRED
set(RESOURCE_LIST
dino-conversation-list-placeholder-arrow.svg
icons/scalable/actions/dino-account-plus-symbolic.svg
icons/scalable/actions/dino-emoticon-add-symbolic.svg
icons/scalable/actions/dino-emoticon-symbolic.svg
icons/scalable/actions/dino-qr-code-symbolic.svg
icons/scalable/apps/im.dino.Dino.svg
@ -39,18 +41,15 @@ set(RESOURCE_LIST
icons/scalable/mimetypes/dino-file-table-symbolic.svg
icons/scalable/mimetypes/dino-file-video-symbolic.svg
icons/scalable/status/dino-bell-large-none-symbolic.svg
icons/scalable/status/dino-bell-large-symbolic.svg
icons/scalable/status/dino-block-symbolic.svg
icons/scalable/status/dino-double-tick-symbolic.svg
icons/scalable/status/dino-microphone-off-symbolic.svg
icons/scalable/status/dino-microphone-symbolic.svg
icons/scalable/status/dino-party-popper-symbolic.svg
icons/scalable/status/dino-security-high-symbolic.svg
icons/scalable/status/dino-status-away.svg
icons/scalable/status/dino-status-chat.svg
icons/scalable/status/dino-status-dnd.svg
icons/scalable/status/dino-status-online.svg
icons/scalable/status/dino-status-online-bright.svg
icons/scalable/status/dino-status-offline.svg
icons/scalable/status/dino-tick-symbolic.svg
icons/scalable/status/dino-video-off-symbolic.svg
icons/scalable/status/dino-video-symbolic.svg
@ -63,25 +62,19 @@ set(RESOURCE_LIST
call_widget.ui
chat_input.ui
conversation_details.ui
contact_details_dialog.ui
conversation_item_widget.ui
conversation_list_titlebar.ui
conversation_list_titlebar_csd.ui
conversation_row.ui
conversation_view.ui
default_encryption_dialog.ui
file_default_widget.ui
file_send_overlay.ui
global_search.ui
gtk/help-overlay.ui
join_room_dialog.ui
join_room_dialog1.ui
join_room_dialog2.ui
conversation_content_view/item_metadata_header.ui
conversation_content_view/view.ui
manage_accounts/account_row.ui
manage_accounts/add_account_dialog.ui
manage_accounts/change_password_dialog.ui
manage_accounts/dialog.ui
menu_add.ui
menu_app.ui
@ -93,10 +86,10 @@ set(RESOURCE_LIST
quote.ui
search_autocomplete.ui
settings_dialog.ui
shortcuts.ui
unified_main_content.ui
unified_window_placeholder.ui
conversation_details.css
style.css
style-dark.css
)
@ -122,36 +115,17 @@ endif()
if(GTK4_VERSION VERSION_GREATER_EQUAL "4.8")
set(MAIN_DEFINITIONS ${MAIN_DEFINITIONS} GTK_4_8)
endif()
if(GTK4_VERSION VERSION_GREATER_EQUAL "4.12")
set(MAIN_DEFINITIONS ${MAIN_DEFINITIONS} GTK_4_12)
endif()
if(Adwaita_VERSION VERSION_GREATER_EQUAL "1.2")
set(MAIN_DEFINITIONS ${MAIN_DEFINITIONS} Adw_1_2)
endif()
if(Adwaita_VERSION VERSION_GREATER_EQUAL "1.3")
set(MAIN_DEFINITIONS ${MAIN_DEFINITIONS} Adw_1_3)
endif()
if(Adwaita_VERSION VERSION_GREATER_EQUAL "1.4")
set(MAIN_DEFINITIONS ${MAIN_DEFINITIONS} Adw_1_4)
endif()
if(VALA_VERSION VERSION_GREATER_EQUAL "0.56.5" AND VALA_VERSION VERSION_LESS "0.58")
set(MAIN_DEFINITIONS ${MAIN_DEFINITIONS} VALA_0_56_GREATER_5)
endif()
if(VALA_VERSION VERSION_GREATER_EQUAL "0.56.11" AND VALA_VERSION VERSION_LESS "0.58")
set(MAIN_DEFINITIONS ${MAIN_DEFINITIONS} VALA_0_56_GREATER_11)
endif()
if(VALA_VERSION VERSION_EQUAL "0.56.11")
set(MAIN_DEFINITIONS ${MAIN_DEFINITIONS} VALA_0_56_11)
endif()
if(VALA_VERSION VERSION_EQUAL "0.56.12")
set(MAIN_DEFINITIONS ${MAIN_DEFINITIONS} VALA_0_56_12)
endif()
vala_precompile(MAIN_VALA_C
SOURCES
src/main.vala
src/ui/application.vala
src/ui/avatar_drawer.vala
src/ui/avatar_image.vala
src/ui/conversation_list_titlebar.vala
src/ui/conversation_view.vala
src/ui/conversation_view_controller.vala
@ -196,7 +170,6 @@ SOURCES
src/ui/conversation_content_view/quote_widget.vala
src/ui/conversation_content_view/reactions_widget.vala
src/ui/conversation_content_view/subscription_notification.vala
src/ui/conversation_content_view/unread_indicator_populator.vala
src/ui/chat_input/chat_input_controller.vala
src/ui/chat_input/chat_text_view.vala
@ -205,11 +178,11 @@ SOURCES
src/ui/chat_input/smiley_converter.vala
src/ui/chat_input/view.vala
src/ui/contact_details/blocking_provider.vala
src/ui/contact_details/settings_provider.vala
src/ui/contact_details/permissions_provider.vala
src/ui/contact_details/history_provider.vala
src/ui/conversation_details.vala
src/ui/contact_details/dialog.vala
src/ui/contact_details/muc_config_form_provider.vala
src/ui/conversation_selector/conversation_selector.vala
src/ui/conversation_selector/conversation_selector_row.vala
@ -222,7 +195,6 @@ SOURCES
src/ui/manage_accounts/account_row.vala
src/ui/manage_accounts/add_account_dialog.vala
src/ui/manage_accounts/change_password_dialog.vala
src/ui/manage_accounts/dialog.vala
src/ui/occupant_menu/list.vala
@ -237,15 +209,9 @@ SOURCES
src/ui/util/sizing_bin.vala
src/ui/util/size_request_box.vala
src/ui/widgets/avatar_picture.vala
src/ui/widgets/date_separator.vala
src/ui/widgets/fixed_ratio_picture.vala
src/ui/widgets/natural_size_increase.vala
src/view_model/conversation_details.vala
src/view_model/preferences_row.vala
src/windows/conversation_details.vala
CUSTOM_VAPIS
${CMAKE_BINARY_DIR}/exports/xmpp-vala.vapi
${CMAKE_BINARY_DIR}/exports/qlite.vapi
@ -262,17 +228,10 @@ OPTIONS
)
add_definitions(${VALA_CFLAGS} -DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\" -DLOCALE_INSTALL_DIR=\"${LOCALE_INSTALL_DIR}\" -DG_LOG_DOMAIN="dino")
if(WIN32)
add_link_options("-Wl,--export-all-symbols")
set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> --use-temp-file -O coff <DEFINES> -i <SOURCE> -o <OBJECT>")
add_executable(dino ${MAIN_VALA_C} ${MAIN_GRESOURCES_TARGET} dino-info.rc)
else(WIN32)
add_executable(dino ${MAIN_VALA_C} ${MAIN_GRESOURCES_TARGET})
endif(WIN32)
add_executable(dino ${MAIN_VALA_C} ${MAIN_GRESOURCES_TARGET})
add_dependencies(dino ${GETTEXT_PACKAGE}-translations)
target_include_directories(dino PRIVATE src)
target_link_libraries(dino libdino ${MAIN_PACKAGES})
set_target_properties(dino PROPERTIES ENABLE_EXPORTS TRUE)
if(WIN32)
target_link_libraries(dino -mwindows)

View file

@ -8,9 +8,10 @@
<property name="margin-bottom">3</property>
<property name="column-spacing">10</property>
<child>
<object class="DinoUiAvatarPicture" id="picture">
<property name="height-request">30</property>
<property name="width-request">30</property>
<object class="DinoUiAvatarImage" id="image">
<property name="allow_gray">False</property>
<property name="height">30</property>
<property name="width">30</property>
<property name="valign">center</property>
</object>
</child>

View file

@ -2,72 +2,68 @@
<interface>
<requires lib="gtk" version="4.0"/>
<template class="DinoUiSelectJidFragment">
<property name="height_request">500</property>
<property name="width_request">460</property>
<child>
<object class="AdwClamp">
<property name="maximum-size">350</property>
<property name="tightening-threshold">300</property>
<object class="GtkGrid">
<property name="hexpand">1</property>
<property name="margin-top">20</property>
<property name="margin-end">80</property>
<property name="margin-bottom">20</property>
<property name="margin-start">80</property>
<property name="orientation">vertical</property>
<property name="row-spacing">10</property>
<child>
<object class="GtkEntry" id="entry">
<property name="activates_default">1</property>
<property name="hexpand">1</property>
</object>
</child>
<child>
<object class="GtkBox">
<property name="hexpand">1</property>
<property name="margin-start">12</property>
<property name="margin-end">12</property>
<property name="margin-top">20</property>
<property name="margin-bottom">20</property>
<property name="vexpand">1</property>
<property name="orientation">vertical</property>
<property name="spacing">10</property>
<child>
<object class="GtkEntry" id="entry">
<property name="activates-default">1</property>
<property name="hexpand">1</property>
<object class="GtkFrame">
<property name="child">
<object class="GtkScrolledWindow" id="scrolled_window">
<property name="hscrollbar_policy">never</property>
<property name="hexpand">1</property>
<property name="vexpand">1</property>
<property name="child">
<object class="GtkBox" id="box">
<property name="orientation">vertical</property>
</object>
</property>
</object>
</property>
</object>
</child>
<child>
<object class="GtkBox">
<property name="hexpand">1</property>
<property name="vexpand">1</property>
<property name="orientation">vertical</property>
<property name="css-classes">toolbar</property>
<style>
<class name="toolbar"/>
<class name="inline-toolbar"/>
</style>
<child>
<object class="GtkFrame">
<property name="child">
<object class="GtkScrolledWindow" id="scrolled_window">
<property name="hscrollbar-policy">never</property>
<property name="hexpand">1</property>
<property name="vexpand">1</property>
<property name="child">
<object class="GtkBox" id="box">
<property name="orientation">vertical</property>
</object>
</property>
<object class="GtkButton" id="add_button">
<child>
<object class="GtkImage">
<property name="icon-name">list-add-symbolic</property>
<property name="icon-size">normal</property>
</object>
</property>
</child>
</object>
</child>
<child>
<object class="GtkBox">
<property name="css-classes">toolbar</property>
<style>
<class name="toolbar"/>
<class name="inline-toolbar"/>
</style>
<object class="GtkButton" id="remove_button">
<property name="sensitive">0</property>
<child>
<object class="GtkButton" id="add_button">
<child>
<object class="GtkImage">
<property name="icon-name">list-add-symbolic</property>
<property name="icon-size">normal</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkButton" id="remove_button">
<property name="sensitive">0</property>
<child>
<object class="GtkImage">
<property name="icon-name">list-remove-symbolic</property>
<property name="icon-size">normal</property>
</object>
</child>
<object class="GtkImage">
<property name="icon-name">list-remove-symbolic</property>
<property name="icon-size">normal</property>
</object>
</child>
</object>

View file

@ -17,7 +17,7 @@
<object class="GtkButton" id="file_button">
<property name="icon-name">mail-attachment-symbolic</property>
<property name="margin-top">2</property>
<property name="valign">center</property>
<property name="valign">start</property>
<style>
<class name="flat"/>
<class name="dino-chatinput-button"/>
@ -51,10 +51,10 @@
</child>
<child>
<object class="GtkMenuButton" id="emoji_button">
<property name="icon-name">emoji-people-symbolic</property>
<property name="icon-name">dino-emoticon-symbolic</property>
<property name="has-frame">False</property>
<property name="margin-top">2</property>
<property name="valign">center</property>
<property name="valign">start</property>
<style>
<class name="flat"/>
<class name="dino-chatinput-button"/>
@ -67,21 +67,7 @@
<property name="icon-name">changes-allow-symbolic</property>
<property name="has-frame">False</property>
<property name="margin-top">2</property>
<property name="valign">center</property>
<style>
<class name="flat"/>
<class name="dino-chatinput-button"/>
<class name="image-button"/>
</style>
</object>
</child>
<child>
<object class="GtkButton" id="send_button">
<property name="icon-name">mail-send-symbolic</property>
<property name="has-frame">False</property>
<property name="margin-top">2</property>
<property name="valign">center</property>
<property name="sensitive">false</property>
<property name="valign">start</property>
<style>
<class name="flat"/>
<class name="dino-chatinput-button"/>

View file

@ -0,0 +1,110 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
<template class="DinoUiContactDetailsDialog">
<property name="title">Conversation Details</property>
<property name="modal">True</property>
<child type="titlebar">
<object class="GtkHeaderBar">
</object>
</child>
<child internal-child="content_area">
<object class="GtkBox">
<property name="hexpand">1</property>
<property name="vexpand">1</property>
<child>
<object class="GtkScrolledWindow">
<property name="propagate_natural_height">1</property>
<property name="max_content_height">500</property>
<property name="hscrollbar_policy">never</property>
<property name="hexpand">1</property>
<property name="vexpand">1</property>
<property name="child">
<object class="GtkBox">
<property name="orientation">vertical</property>
<child>
<object class="GtkGrid">
<property name="margin-top">20</property>
<property name="margin-bottom">12</property>
<property name="margin-end">100</property>
<property name="margin-start">100</property>
<property name="column-spacing">10</property>
<child>
<object class="DinoUiAvatarImage" id="avatar">
<property name="height">50</property>
<property name="width">50</property>
<property name="allow_gray">False</property>
<layout>
<property name="column">0</property>
<property name="row">0</property>
<property name="row-span">2</property>
</layout>
</object>
</child>
<child>
<object class="DinoUiUtilEntryLabelHybrid" id="name_hybrid">
<property name="xalign">0</property>
<property name="hexpand">True</property>
<layout>
<property name="column">1</property>
<property name="row">0</property>
</layout>
</object>
</child>
<child>
<object class="GtkLabel" id="name_label">
<property name="xalign">0</property>
<property name="hexpand">1</property>
<attributes>
<attribute name="weight" value="PANGO_WEIGHT_BOLD"></attribute>
</attributes>
<layout>
<property name="column">1</property>
<property name="row">0</property>
</layout>
</object>
</child>
<child>
<object class="GtkLabel" id="jid_label">
<property name="xalign">0</property>
<property name="yalign">0</property>
<property name="selectable">1</property>
<property name="hexpand">1</property>
<layout>
<property name="column">1</property>
<property name="row">1</property>
</layout>
</object>
</child>
<child>
<object class="GtkLabel" id="account_label">
<property name="xalign">1</property>
<property name="yalign">1</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<property name="margin-top">5</property>
<property name="margin-bottom">5</property>
<property name="hexpand">1</property>
<layout>
<property name="column">2</property>
<property name="row">1</property>
</layout>
</object>
</child>
</object>
</child>
<child>
<object class="GtkBox" id="main_box">
<property name="orientation">vertical</property>
<property name="margin-end">100</property>
<property name="margin-start">100</property>
</object>
</child>
</object>
</property>
</object>
</child>
</object>
</child>
</template>
</interface>

View file

@ -1,7 +0,0 @@
.extended-headerbar {
background-color: @headerbar_bg_color;
}
.extended-headerbar-end {
padding-bottom: 24px;
border-bottom: 1px solid @borders;
}

View file

@ -1,206 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
<object class="DinoUiViewModelConversationDetails" id="model"/>
<template class="DinoUiConversationDetailsDialog">
<property name="default-width">600</property>
<!-- <property name="default-height">400</property>-->
<property name="modal">True</property>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<child>
<object class="AdwHeaderBar">
<style>
<class name="flat"/>
<class name="extended-headerbar"/>
</style>
<property name="title_widget">
<object class="GtkBox"/>
</property>
</object>
</child>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<child>
<object class="AdwClamp">
<style>
<class name="extended-headerbar"/>
<class name="extended-headerbar-end"/>
</style>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="spacing">18</property>
<child>
<object class="GtkBox">
<property name="orientation">horizontal</property>
<property name="spacing">18</property>
<property name="margin-start">12</property>
<property name="margin-end">12</property>
<child>
<object class="DinoUiAvatarPicture" id="picture">
<property name="height-request">72</property>
<property name="width-request">72</property>
<property name="halign">center</property>
<property name="model" bind-source="model" bind-property="avatar"/>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="label" bind-source="model" bind-property="name"/>
<property name="ellipsize">end</property>
<property name="hexpand">True</property>
<property name="valign">center</property>
<property name="xalign">0</property>
<attributes>
<attribute name="scale" value="1.4"/>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
</child>
<child>
<object class="GtkBox">
<property name="orientation">horizontal</property>
<property name="spacing">12</property>
<property name="margin-start">12</property>
<property name="margin-end">12</property>
<child>
<object class="GtkButton" id="pin_button">
<child>
<object class="AdwButtonContent" id="pin_button_content">
<property name="icon-name">view-pin-symbolic</property>
<property name="label">Pin</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkButton" id="notification_button_toggle">
<child>
<object class="AdwButtonContent" id="notification_button_toggle_content">
<property name="icon-name">notification-symbolic</property>
<property name="label">Mute</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkMenuButton" id="notification_button_menu">
<property name="menu_model">notification_menu_button_menu_model</property>
<child>
<object class="GtkBox">
<property name="spacing">6</property>
<property name="orientation">horizontal</property>
<child>
<object class="AdwButtonContent" id="notification_button_menu_content">
<property name="icon-name">notification-symbolic</property>
<property name="label">Mute</property>
</object>
</child>
<child>
<object class="GtkImage">
<property name="icon-name">pan-down-symbolic</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="AdwSplitButton" id="notification_button_split">
<property name="menu_model">notification_split_button_menu_model</property>
<child>
<object class="AdwButtonContent" id="notification_button_split_content">
<property name="icon-name">notification-symbolic</property>
<property name="label">Mute</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkButton" id="block_button">
<property name="visible" bind-source="model" bind-property="show-blocked" bind-flags="sync-create"/>
<child>
<object class="AdwButtonContent" id="block_button_content">
<property name="icon-name">action-unavailable-symbolic</property>
<property name="label">Block</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="propagate-natural-height">True</property>
<child>
<object class="AdwClamp">
<child>
<object class="GtkBox" id="about_box">
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<property name="margin-end">12</property>
<property name="margin-start">12</property>
<property name="margin-top">12</property>
<property name="margin-bottom">40</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</template>
<menu id="notification_split_button_menu_model">
<section>
<item>
<attribute name="label">Enable notifications</attribute>
<attribute name="action">notification.on</attribute>
</item>
<item>
<attribute name="label">Disable notifications</attribute>
<attribute name="action">notification.off</attribute>
</item>
</section>
<section>
<item>
<attribute name="label">Reset to default</attribute>
<attribute name="action">notification.default</attribute>
</item>
</section>
</menu>
<menu id="notification_menu_button_menu_model">
<section>
<item>
<attribute name="label">Notify for all messages</attribute>
<attribute name="action">notification.on</attribute>
</item>
<item>
<attribute name="label">Notify only for mentions</attribute>
<attribute name="action">notification.highlight</attribute>
</item>
<item>
<attribute name="label">Disable notifications</attribute>
<attribute name="action">notification.off</attribute>
</item>
</section>
<section>
<item>
<attribute name="label">Reset to default</attribute>
<attribute name="action">notification.default</attribute>
</item>
</section>
</menu>
</interface>

View file

@ -5,9 +5,9 @@
<property name="column-spacing">7</property>
<property name="row-spacing">2</property>
<child>
<object class="DinoUiAvatarPicture" id="avatar_picture">
<property name="height-request">35</property>
<property name="width-request">35</property>
<object class="DinoUiAvatarImage" id="avatar_image">
<property name="height">35</property>
<property name="width">35</property>
<property name="valign">start</property>
<property name="margin-top">2</property>
<layout>

View file

@ -14,9 +14,9 @@
<property name="margin-start">7</property>
<property name="margin-end">14</property>
<child>
<object class="DinoUiAvatarPicture" id="picture">
<property name="height-request">35</property>
<property name="width-request">35</property>
<object class="DinoUiAvatarImage" id="image">
<property name="height">35</property>
<property name="width">35</property>
<property name="valign">center</property>
</object>
</child>
@ -38,12 +38,19 @@
</object>
</child>
<child>
<object class="GtkLabel" id="time_label">
<property name="hexpand">False</property>
<property name="xalign">1</property>
<attributes>
<attribute name="scale" value="0.7"/>
</attributes>
<object class="GtkRevealer" id="time_revealer">
<property name="transition-type">slide-right</property>
<property name="transition-duration">50</property>
<property name="reveal-child">True</property>
<child>
<object class="GtkLabel" id="time_label">
<property name="hexpand">False</property>
<property name="xalign">1</property>
<attributes>
<attribute name="scale" value="0.7"/>
</attributes>
</object>
</child>
</object>
</child>
</object>
@ -81,26 +88,33 @@
</object>
</child>
<child>
<object class="GtkBox">
<property name="orientation">horizontal</property>
<object class="GtkRevealer" id="top_row_revealer">
<property name="transition-type">slide-right</property>
<property name="transition-duration">50</property>
<property name="reveal-child">True</property>
<property name="margin-start">15</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="unread_count_label">
<property name="vexpand">False</property>
<property name="visible">False</property>
<property name="xalign">0.5</property>
<attributes>
<attribute name="scale" value="0.6"/>
<attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
</attributes>
</object>
</child>
<child>
<object class="GtkImage" id="pinned_image">
<property name="icon-name">view-pin-symbolic</property>
<property name="pixel-size">12</property>
<property name="visible">False</property>
<object class="GtkBox">
<property name="orientation">horizontal</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="unread_count_label">
<property name="vexpand">False</property>
<property name="visible">False</property>
<property name="xalign">0.5</property>
<attributes>
<attribute name="scale" value="0.6"/>
<attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
</attributes>
</object>
</child>
<child>
<object class="GtkImage" id="pinned_image">
<property name="icon-name">view-pin-symbolic</property>
<property name="pixel-size">12</property>
<property name="visible">False</property>
</object>
</child>
</object>
</child>
</object>
@ -109,6 +123,47 @@
</child>
</object>
</child>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<child>
<object class="GtkBox">
<property name="vexpand">True</property>
</object>
</child>
<child>
<object class="GtkRevealer" id="xbutton_revealer">
<property name="transition-type">slide-left</property>
<property name="transition-duration">100</property>
<property name="reveal-child">False</property>
<child>
<object class="GtkButton" id="x_button">
<property name="width-request">27</property>
<property name="height-request">27</property>
<property name="vexpand">False</property>
<property name="margin-start">5</property>
<style>
<class name="conversation_list_row_xbutton"/>
<class name="circular"/>
<class name="flat"/>
</style>
<child>
<object class="GtkImage">
<property name="icon-name">window-close-symbolic</property>
<property name="icon-size">1</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkBox">
<property name="vexpand">True</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>

View file

@ -1,83 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
<object class="GtkDialog" id="dialog">
<property name="can_focus">True</property>
<property name="modal">True</property>
<property name="default_width">320</property>
<property name="default_height">260</property>
<property name="resizable">False</property>
<child>
<object class="GtkBox">
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="margin-start">20</property>
<property name="margin-end">20</property>
<property name="margin-top">20</property>
<property name="margin-bottom">20</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="default_encryption_warning_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">You are opening a new conversation without having set end-to-end encryption by default.
It is strongly recommended to enable it to prevent your messages from being read by third parties.
Please select an option to start this conversation with. Choosing one of the encryption methods will also set it as default in the global settings.
</property>
<property name="wrap">True</property>
</object>
</child>
<child>
<object class="GtkCheckButton" id="omemo">
<property name="label" translatable="yes">OMEMO (automatic setup)</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="active">False</property>
</object>
</child>
<child>
<object class="GtkCheckButton" id="openpgp">
<property name="label" translatable="yes">OpenPGP (external setup required)</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="active">False</property>
<property name="group">omemo</property>
</object>
</child>
<child>
<object class="GtkCheckButton" id="none">
<property name="label" translatable="yes">Unencrypted</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="active">False</property>
<property name="group">omemo</property>
</object>
</child>
<child>
<object class="GtkButton" id="accept_button">
<property name="label" translatable="yes">Apply</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="margin-top">20</property>
<style>
<class name="text-button"/>
<class name="suggested-action"/>
</style>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>

View file

@ -80,7 +80,7 @@
</child>
<child>
<object class="GtkMenuButton" id="file_menu">
<property name="icon-name">view-more-symbolic</property>
<property name="icon-name">open-menu-symbolic</property>
<property name="opacity">0</property>
<property name="has_frame">False</property>
</object>
@ -90,4 +90,4 @@
</object>
</child>
</template>
</interface>
</interface>

View file

@ -1,81 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/im/dino/Dino">
<file>add_conversation/add_contact_dialog.ui</file>
<file>add_conversation/add_groupchat_dialog.ui</file>
<file>add_conversation/conference_details_fragment.ui</file>
<file>add_conversation/list_row.ui</file>
<file>add_conversation/select_jid_fragment.ui</file>
<file>call_widget.ui</file>
<file>chat_input.ui</file>
<file>conversation_content_view/item_metadata_header.ui</file>
<file>conversation_content_view/view.ui</file>
<file>conversation_details.ui</file>
<file>conversation_details.css</file>
<file>conversation_item_widget.ui</file>
<file>conversation_list_titlebar.ui</file>
<file>conversation_list_titlebar_csd.ui</file>
<file>conversation_row.ui</file>
<file>conversation_view.ui</file>
<file>default_encryption_dialog.ui</file>
<file>dino-conversation-list-placeholder-arrow.svg</file>
<file>file_default_widget.ui</file>
<file>file_send_overlay.ui</file>
<file>global_search.ui</file>
<file>gtk/help-overlay.ui</file>
<file>icons/scalable/actions/dino-emoticon-add-symbolic.svg</file>
<file>icons/scalable/actions/dino-qr-code-symbolic.svg</file>
<file>icons/scalable/apps/im.dino.Dino-symbolic.svg</file>
<file>icons/scalable/apps/im.dino.Dino.svg</file>
<file>icons/scalable/devices/dino-device-desktop-symbolic.svg</file>
<file>icons/scalable/devices/dino-device-phone-symbolic.svg</file>
<file>icons/scalable/devices/dino-phone-hangup-symbolic.svg</file>
<file>icons/scalable/devices/dino-phone-in-talk-symbolic.svg</file>
<file>icons/scalable/devices/dino-phone-missed-symbolic.svg</file>
<file>icons/scalable/devices/dino-phone-ring-symbolic.svg</file>
<file>icons/scalable/devices/dino-phone-symbolic.svg</file>
<file>icons/scalable/mimetypes/dino-file-document-symbolic.svg</file>
<file>icons/scalable/mimetypes/dino-file-download-symbolic.svg</file>
<file>icons/scalable/mimetypes/dino-file-image-symbolic.svg</file>
<file>icons/scalable/mimetypes/dino-file-music-symbolic.svg</file>
<file>icons/scalable/mimetypes/dino-file-symbolic.svg</file>
<file>icons/scalable/mimetypes/dino-file-table-symbolic.svg</file>
<file>icons/scalable/mimetypes/dino-file-video-symbolic.svg</file>
<file>icons/scalable/status/dino-double-tick-symbolic.svg</file>
<file>icons/scalable/status/dino-bell-large-none-symbolic.svg</file>
<file>icons/scalable/status/dino-bell-large-symbolic.svg</file>
<file>icons/scalable/status/dino-block-symbolic.svg</file>
<file>icons/scalable/status/dino-party-popper-symbolic.svg</file>
<file>icons/scalable/status/dino-security-high-symbolic.svg</file>
<file>icons/scalable/status/dino-status-away.svg</file>
<file>icons/scalable/status/dino-status-chat.svg</file>
<file>icons/scalable/status/dino-status-dnd.svg</file>
<file>icons/scalable/status/dino-status-online.svg</file>
<file>icons/scalable/status/dino-status-online-bright.svg</file>
<file>icons/scalable/status/dino-status-offline.svg</file>
<file>icons/scalable/status/dino-tick-symbolic.svg</file>
<file>icons/scalable/status/dino-video-off-symbolic.svg</file>
<file>icons/scalable/status/dino-video-symbolic.svg</file>
<file>join_room_dialog.ui</file>
<file>join_room_dialog1.ui</file>
<file>join_room_dialog2.ui</file>
<file>manage_accounts/account_row.ui</file>
<file>manage_accounts/add_account_dialog.ui</file>
<file>manage_accounts/dialog.ui</file>
<file>manage_accounts/change_password_dialog.ui</file>
<file>menu_add.ui</file>
<file>menu_app.ui</file>
<file>menu_conversation.ui</file>
<file>menu_encryption.ui</file>
<file>message_item_widget_edit_mode.ui</file>
<file>occupant_list.ui</file>
<file>occupant_list_item.ui</file>
<file>quote.ui</file>
<file>search_autocomplete.ui</file>
<file>settings_dialog.ui</file>
<file>style-dark.css</file>
<file>style.css</file>
<file>unified_main_content.ui</file>
<file>unified_window_placeholder.ui</file>
</gresource>
</gresources>

View file

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M15,14C12.33,14 7,15.33 7,18V20H23V18C23,15.33 17.67,14 15,14M6,10V7H4V10H1V12H4V15H6V12H9V10M15,12A4,4 0 0,0 19,8A4,4 0 0,0 15,4A4,4 0 0,0 11,8A4,4 0 0,0 15,12Z" /></svg>

After

Width:  |  Height:  |  Size: 456 B

View file

@ -1,8 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
<path d="m 7 2 c -3.855469 0 -7 3.144531 -7 7 s 3.144531 7 7 7 s 7 -3.144531 7 -7 h -2 c 0 2.773438 -2.226562 5 -5 5 s -5 -2.226562 -5 -5 s 2.226562 -5 5 -5 z m 0 0"/>
<path d="m 11 0 v 3 h -3 v 2 h 3 v 3 h 2 v -3 h 3 v -2 h -3 v -3 z m 0 0"/>
<path d="m 6 7 c 0 0.550781 -0.449219 1 -1 1 s -1 -0.449219 -1 -1 s 0.449219 -1 1 -1 s 1 0.449219 1 1 z m 0 0"/>
<path d="m 10 7 c 0 0.550781 -0.449219 1 -1 1 s -1 -0.449219 -1 -1 s 0.449219 -1 1 -1 s 1 0.449219 1 1 z m 0 0"/>
<path d="m 4.171875 9.414062 c -0.390625 0.390626 -0.390625 1.023438 0 1.414063 c 0.75 0.75 1.765625 1.171875 2.828125 1.171875 c 1.058594 0 2.078125 -0.421875 2.828125 -1.171875 c 0.390625 -0.390625 0.390625 -1.023437 0 -1.414063 c -0.390625 -0.390624 -1.023437 -0.390624 -1.414063 0 c -0.375 0.375 -0.882812 0.585938 -1.414062 0.585938 s -1.039062 -0.210938 -1.414062 -0.585938 c -0.390626 -0.390624 -1.023438 -0.390624 -1.414063 0 z m 0 0"/>
<svg version="1.1" viewBox="0 0 23.568 23.711" xmlns="http://www.w3.org/2000/svg">
<path d="m10 19.211c2.33 0 4.3-1.46 5.11-3.5h-10.22c0.8 2.04 2.78 3.5 5.11 3.5m-3.5-6.5c0.82843 0 1.5-0.67157 1.5-1.5s-0.67157-1.5-1.5-1.5-1.5 0.67157-1.5 1.5 0.67157 1.5 1.5 1.5m7 0c0.82843 0 1.5-0.67157 1.5-1.5s-0.67157-1.5-1.5-1.5-1.5 0.67157-1.5 1.5 0.67157 1.5 1.5 1.5m-3.5 9c-4.4183 0-8-3.5817-8-8s3.5817-8 8-8c1.4367-0.016553 1.4581-1.9613 0-2-5.53 0-10 4.5-10 10 0 5.5228 4.4772 10 10 10s10-4.4772 10-10c0-1.0544-2-1.0324-2 0 0 4.4183-3.5817 8-8 8"/>
<path d="m18.908 0c-0.33046 0-0.61972 0.12233-0.80078 0.36133-0.18106 0.239-0.25586 0.56747-0.25586 0.97266v2.6523h-2.2715c-0.38896 0-0.70598 0.064394-0.94727 0.21875-0.26371 0.15646-0.38672 0.4669-0.38672 0.83789 0 0.36179 0.12302 0.66715 0.38086 0.83398l0.001953 0.0019531h0.001953c0.24918 0.15228 0.56865 0.21875 0.94922 0.21875h2.2715v2.6543c0 0.40519 0.074767 0.73218 0.25586 0.9707 0.18109 0.23852 0.46892 0.35944 0.79883 0.36133 0.32038 0.001837 0.60667-0.12152 0.78906-0.35937 0.18239-0.23785 0.26374-0.56552 0.26758-0.9707v-0.0019531-2.6543h2.2559c0.41061 0 0.74047-0.073348 0.98242-0.25391s0.36719-0.46969 0.36719-0.80078c0-0.33109-0.12524-0.62218-0.36719-0.80273s-0.57181-0.25391-0.98242-0.25391h-2.2559v-2.6523c0-0.38896-0.064393-0.70598-0.21875-0.94727-0.15646-0.26371-0.46495-0.38672-0.83594-0.38672z"/>
</svg>

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg version="1.1" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">
<path d="m7 0c-3.866 0-7 3.134-7 7 0 3.866 3.134 7 7 7 3.866 0 7-3.0493 7-6.9153s-3.134-7.0847-7-7.0847zm-2 4c0.558 0 1.031 0.473 1.031 1.031v0.61307c0 0.558-0.473 1-1.031 1s-1-0.442-1-1v-0.61307c0-0.558 0.442-1.031 1-1.031zm4 0c0.558 0 1 0.473 1 1.031v0.63002c0 0.558-0.442 1-1 1s-1-0.442-1-1v-0.63002c0-0.558 0.442-1.031 1-1.031zm-6.5 4.1157c2 1.304 6.956 1.304 9 0-0.70196 2.8903-2.5245 3.853-4.499 3.8533-1.975 2.17e-4 -3.7981-1.1706-4.501-3.8533z" fill="#474747"/>
</svg>

After

Width:  |  Height:  |  Size: 593 B

View file

@ -1,38 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
height="16px"
viewBox="0 0 16 16"
width="16px"
version="1.1"
id="svg73815"
sodipodi:docname="dino-phone-hangup-symbolic.svg"
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs73819" />
<sodipodi:namedview
id="namedview73817"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
showgrid="true"
inkscape:zoom="18.223966"
inkscape:cx="0.52129158"
inkscape:cy="8.944266"
inkscape:current-layer="svg73815">
<inkscape:grid
type="xygrid"
id="grid73938" />
</sodipodi:namedview>
<path
d="m 8,3.992188 c -2.511719,0 -5.027344,0.957031 -6.9375,2.863281 L 0.71875,7.203125 c -0.957031,0.957031 -0.957031,2.511719 0,3.46875 l 1.039062,1.039063 c 0.382813,0.382812 1.003907,0.382812 1.386719,0 L 4.1875,10.671875 5.226562,9.632812 c 0.382813,-0.386718 0.382813,-1.003906 0,-1.390624 L 4.730469,7.75 c 2.035156,-1.105469 4.503906,-1.105469 6.539062,0 l -0.496093,0.492188 c -0.382813,0.386718 -0.382813,1.003906 0,1.390624 l 1.039062,1.039063 1.042969,1.039063 c 0.382812,0.382812 1.003906,0.382812 1.386719,0 l 1.039062,-1.039063 c 0.957031,-0.957031 0.957031,-2.511719 0,-3.46875 L 14.9375,6.855469 C 13.027344,4.949219 10.511719,3.992188 8,3.992188 Z"
id="path73813"
sodipodi:nodetypes="sccssccccccccccssccs" />
</svg>
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M12,9C10.4,9 8.85,9.25 7.4,9.72V12.82C7.4,13.22 7.17,13.56 6.84,13.72C5.86,14.21 4.97,14.84 4.17,15.57C4,15.75 3.75,15.86 3.5,15.86C3.2,15.86 2.95,15.74 2.77,15.56L0.29,13.08C0.11,12.9 0,12.65 0,12.38C0,12.1 0.11,11.85 0.29,11.67C3.34,8.77 7.46,7 12,7C16.54,7 20.66,8.77 23.71,11.67C23.89,11.85 24,12.1 24,12.38C24,12.65 23.89,12.9 23.71,13.08L21.23,15.56C21.05,15.74 20.8,15.86 20.5,15.86C20.25,15.86 20,15.75 19.82,15.57C19.03,14.84 18.14,14.21 17.16,13.72C16.83,13.56 16.6,13.22 16.6,12.82V9.72C15.15,9.25 13.6,9 12,9Z" /></svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 816 B

View file

@ -1,6 +1 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
<path d="m 5.003906 2 c 0.554688 0 1 0.445312 1 1 v 3 c 0 0.554688 -0.445312 1 -1 1 h -0.710937 c 0.671875 2.265625 2.445312 4.042969 4.710937 4.710938 v -0.710938 c 0 -0.554688 0.449219 -1 1 -1 h 3 c 0.554688 0 1 0.445312 1 1 v 1.5 c 0 1.378906 -1.117187 2.5 -2.5 2.5 h -0.5 c -5.503906 0 -10 -4.496094 -10 -10 v -0.5 c 0 -1.378906 1.121094 -2.5 2.5 -2.5 z m 0 0"/>
<path d="m 8 4 v 2 c 1.117188 0 2 0.882812 2 2 h 2 c 0 -2.199219 -1.800781 -4 -4 -4 z m 0 0"/>
<path d="m 8 1 v 2 c 2.773438 0 5 2.226562 5 5 h 2 c 0 -3.855469 -3.144531 -7 -7 -7 z m 0 0"/>
</svg>
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M15,12H17A5,5 0 0,0 12,7V9A3,3 0 0,1 15,12M19,12H21C21,7 16.97,3 12,3V5C15.86,5 19,8.13 19,12M20,15.5C18.75,15.5 17.55,15.3 16.43,14.93C16.08,14.82 15.69,14.9 15.41,15.18L13.21,17.38C10.38,15.94 8.06,13.62 6.62,10.79L8.82,8.59C9.1,8.31 9.18,7.92 9.07,7.57C8.7,6.45 8.5,5.25 8.5,4A1,1 0 0,0 7.5,3H4A1,1 0 0,0 3,4A17,17 0 0,0 20,21A1,1 0 0,0 21,20V16.5A1,1 0 0,0 20,15.5Z" /></svg>

Before

Width:  |  Height:  |  Size: 703 B

After

Width:  |  Height:  |  Size: 664 B

View file

@ -1,5 +1 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
<path d="m 12.980469 -0.0117188 c -0.039063 0 -0.074219 0.0039063 -0.113281 0.00781255 h -4.867188 v 0.83203125 c -0.050781 0.292969 0.03125 0.59375 0.226562 0.820313 c 0.191407 0.226562 0.476563 0.351562 0.773438 0.347656 h 1.585938 l -2.585938 2.585937 l -2.292969 -2.292969 c -0.25 -0.261718 -0.625 -0.367187 -0.972656 -0.273437 c -0.351563 0.089844 -0.625 0.363281 -0.714844 0.714844 c -0.09375 0.351562 0.011719 0.722656 0.273438 0.972656 l 3 3 c 0.390625 0.390625 1.023437 0.390625 1.414062 0 l 3.292969 -3.292969 v 1.585938 c -0.003906 0.296875 0.125 0.578125 0.347656 0.769531 c 0.222656 0.195313 0.519532 0.277344 0.808594 0.230469 h 0.84375 v -4.871094 c 0.011719 -0.09375 0.011719 -0.183594 0 -0.277344 v -0.85156225 h -0.855469 c -0.054687 -0.00781255 -0.109375 -0.01171875 -0.164062 -0.00781255 z m 0 0"/>
<path class="error" d="m 14.242188 15.710938 c -0.386719 0.386718 -1.003907 0.386718 -1.386719 0 l -1.042969 -1.039063 l -1.039062 -1.039063 c -0.382813 -0.386718 -0.382813 -1.003906 0 -1.386718 l 0.492187 -0.496094 c -2.035156 -1.105469 -4.496094 -1.105469 -6.53125 0 l 0.492187 0.496094 c 0.382813 0.382812 0.382813 1 0 1.386718 l -1.039062 1.039063 l -1.042969 1.039063 c -0.382812 0.386718 -1 0.386718 -1.386719 0 l -1.039062 -1.039063 c -0.957031 -0.957031 -0.957031 -2.511719 0 -3.46875 l 0.347656 -0.347656 c 3.816406 -3.816407 10.050782 -3.816407 13.867188 0 l 0.347656 0.347656 c 0.957031 0.957031 0.957031 2.511719 0 3.46875 z m 0 0"/>
</svg>
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M23.71,16.67C20.66,13.77 16.54,12 12,12C7.46,12 3.34,13.77 0.29,16.67C0.11,16.85 0,17.1 0,17.38C0,17.65 0.11,17.9 0.29,18.08L2.77,20.56C2.95,20.74 3.2,20.86 3.5,20.86C3.75,20.86 4,20.75 4.18,20.57C4.97,19.83 5.86,19.21 6.84,18.72C7.17,18.56 7.4,18.22 7.4,17.82V14.72C8.85,14.25 10.39,14 12,14C13.6,14 15.15,14.25 16.6,14.72V17.82C16.6,18.22 16.83,18.56 17.16,18.72C18.14,19.21 19.03,19.83 19.82,20.57C20,20.75 20.25,20.86 20.5,20.86C20.8,20.86 21.05,20.74 21.23,20.56L23.71,18.08C23.89,17.9 24,17.65 24,17.38C24,17.1 23.89,16.85 23.71,16.67M6.5,5.5L12,11L19,4L18,3L12,9L7.5,4.5H11V3H5V9H6.5V5.5Z" /></svg>

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 890 B

View file

@ -1,4 +1 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
<path class="error" d="m 8 1 c -0.550781 0 -1 0.449219 -1 1 v 3 c 0 0.550781 0.449219 1 1 1 s 1 -0.449219 1 -1 v -3 c 0 -0.550781 -0.449219 -1 -1 -1 z m -7 2 c -0.265625 0 -0.519531 0.105469 -0.707031 0.292969 c -0.3906252 0.390625 -0.3906252 1.023437 0 1.414062 l 2 2 c 0.390625 0.390625 1.023437 0.390625 1.414062 0 s 0.390625 -1.023437 0 -1.414062 l -2 -2 c -0.1875 -0.1875 -0.441406 -0.292969 -0.707031 -0.292969 z m 14 0 c -0.265625 0 -0.519531 0.105469 -0.707031 0.292969 l -2 2 c -0.390625 0.390625 -0.390625 1.023437 0 1.414062 s 1.023437 0.390625 1.414062 0 l 2 -2 c 0.390625 -0.390625 0.390625 -1.023437 0 -1.414062 c -0.1875 -0.1875 -0.441406 -0.292969 -0.707031 -0.292969 z m -7 4.992188 c -2.511719 0 -5.027344 0.957031 -6.9375 2.863281 l -0.34375 0.347656 c -0.957031 0.957031 -0.957031 2.511719 0 3.46875 l 1.039062 1.039063 c 0.382813 0.382812 1.003907 0.382812 1.386719 0 l 1.042969 -1.039063 l 1.039062 -1.039063 c 0.382813 -0.386718 0.382813 -1.003906 0 -1.390624 l -0.496093 -0.492188 c 2.035156 -1.105469 4.503906 -1.105469 6.539062 0 l -0.496093 0.492188 c -0.382813 0.386718 -0.382813 1.003906 0 1.390624 l 1.039062 1.039063 l 1.042969 1.039063 c 0.382812 0.382812 1.003906 0.382812 1.386719 0 l 1.039062 -1.039063 c 0.957031 -0.957031 0.957031 -2.511719 0 -3.46875 l -0.34375 -0.347656 c -1.910156 -1.90625 -4.425781 -2.863281 -6.9375 -2.863281 z m 0 0"/>
</svg>
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M23.71 16.67C20.66 13.78 16.54 12 12 12S3.34 13.78.29 16.67c-.18.18-.29.43-.29.71 0 .28.11.53.29.71l2.48 2.48c.18.18.43.29.71.29.27 0 .52-.11.7-.28.79-.74 1.69-1.36 2.66-1.85.33-.16.56-.5.56-.9v-3.1c1.45-.48 3-.73 4.6-.73s3.15.25 4.6.72v3.1c0 .39.23.74.56.9.98.49 1.87 1.12 2.66 1.85.18.18.43.28.7.28.28 0 .53-.11.71-.29l2.48-2.48c.18-.18.29-.43.29-.71a.99.99 0 0 0-.29-.7zM21.16 6.26l-1.41-1.41-3.56 3.55 1.41 1.41s3.45-3.52 3.56-3.55zM13 2h-2v5h2V2zM6.4 9.81L7.81 8.4 4.26 4.84 2.84 6.26c.11.03 3.56 3.55 3.56 3.55z" /></svg>

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 812 B

View file

@ -1,8 +1 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
<path d="m 11 16.003906 c 0.828125 0 1.5 -0.671875 1.5 -1.5 s -0.671875 -1.5 -1.5 -1.5 c -4.433594 0 -8 -3.566406 -8 -8 c 0 -0.828125 -0.671875 -1.5 -1.5 -1.5 s -1.5 0.671875 -1.5 1.5 c 0 6.054688 4.945312 11 11 11 z m 0 0"/>
<path d="m 4 0 v 6 h -1.710938 l -2.289062 -1 v -2.5 c 0 -1.378906 1.121094 -2.5 2.5 -2.5 z m 0 0"/>
<path d="m 6 4.503906 v -3 c 0 -0.828125 -0.671875 -1.49999975 -1.5 -1.49999975 h -1 c -0.828125 0 -1.5 0.67187475 -1.5 1.49999975 v 3 c 0 0.832032 0.671875 1.5 1.5 1.5 h 1 c 0.828125 0 1.5 -0.667968 1.5 -1.5 z m 0 0"/>
<path d="m 16.003906 12.003906 h -6 v 1.710938 l 1 2.289062 h 2.5 c 1.382813 0 2.5 -1.121094 2.5 -2.5 z m 0 0"/>
<path d="m 11.5 10.003906 h 3 c 0.828125 0 1.5 0.671875 1.5 1.5 v 1 c 0 0.828125 -0.671875 1.5 -1.5 1.5 h -3 c -0.828125 0 -1.5 -0.671875 -1.5 -1.5 v -1 c 0 -0.828125 0.671875 -1.5 1.5 -1.5 z m 0 0"/>
</svg>
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M6.62,10.79C8.06,13.62 10.38,15.94 13.21,17.38L15.41,15.18C15.69,14.9 16.08,14.82 16.43,14.93C17.55,15.3 18.75,15.5 20,15.5A1,1 0 0,1 21,16.5V20A1,1 0 0,1 20,21A17,17 0 0,1 3,4A1,1 0 0,1 4,3H7.5A1,1 0 0,1 8.5,4C8.5,5.25 8.7,6.45 9.07,7.57C9.18,7.92 9.1,8.31 8.82,8.59L6.62,10.79Z" /></svg>

Before

Width:  |  Height:  |  Size: 1,015 B

After

Width:  |  Height:  |  Size: 574 B

View file

@ -1,2 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" height="16px" viewBox="0 0 16 16" width="16px"><path d="m 8 0 c -0.828125 0 -1.5 0.671875 -1.5 1.5 c 0 0.078125 0.007812 0.15625 0.019531 0.234375 c -0.871093 0.269531 -1.652343 0.773437 -2.257812 1.453125 l -2.730469 -2.730469 l -1.0625 1.0625 l 2.957031 2.957031 l 8.527344 8.523438 l 2.515625 2.519531 l 1.0625 -1.0625 l -1.570312 -1.570312 c 0.320312 -0.167969 0.539062 -0.5 0.539062 -0.886719 c 0 -0.554688 -0.445312 -1 -1 -1 h -0.5 v -4.5 c 0 -2.191406 -1.425781 -4.125 -3.519531 -4.773438 c 0.011719 -0.074218 0.019531 -0.152343 0.019531 -0.226562 c 0 -0.828125 -0.671875 -1.5 -1.5 -1.5 z m -4.988281 6.183594 c -0.007813 0.105468 -0.011719 0.210937 -0.011719 0.316406 v 4.5 h -0.5 c -0.554688 0 -1 0.445312 -1 1 s 0.445312 1 1 1 h 7.328125 z m 2.988281 7.816406 c 0 0.714844 0.382812 1.375 1 1.730469 c 0.617188 0.359375 1.382812 0.359375 2 0 c 0.617188 -0.355469 1 -1.015625 1 -1.730469 z m 0 0" fill="#222222"/></svg>

Before

Width:  |  Height:  |  Size: 1,007 B

View file

@ -1,2 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" height="16px" viewBox="0 0 16 16" width="16px"><path d="m 8 0 c -0.828125 0 -1.5 0.671875 -1.5 1.5 c 0 0.078125 0.007812 0.152344 0.019531 0.230469 c -2.089843 0.648437 -3.515625 2.582031 -3.519531 4.769531 v 4.5 h -0.5 c -0.554688 0 -1 0.445312 -1 1 s 0.445312 1 1 1 h 11 c 0.554688 0 1 -0.445312 1 -1 s -0.445312 -1 -1 -1 h -0.5 v -4.5 c 0 -2.191406 -1.425781 -4.125 -3.519531 -4.773438 c 0.011719 -0.078124 0.019531 -0.152343 0.019531 -0.226562 c 0 -0.828125 -0.671875 -1.5 -1.5 -1.5 z m -2 14 c 0 0.714844 0.382812 1.375 1 1.734375 c 0.617188 0.355469 1.382812 0.355469 2 0 c 0.617188 -0.359375 1 -1.019531 1 -1.734375 z m 0 0" fill="#222222"/></svg>

Before

Width:  |  Height:  |  Size: 734 B

View file

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
<g fill="#222">
<path d="m8 1c-3.8555 0-7 3.1445-7 7s3.1445 7 7 7 7-3.1445 7-7-3.1445-7-7-7zm0 2c2.7539 0 5 2.2461 5 5s-2.2461 5-5 5-5-2.2461-5-5 2.2461-5 5-5z"/>
<path d="m13.616 11.83-1.4375 1.4375-9.1054-9.0769 1.543-1.3323z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 369 B

View file

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M19,11C19,12.19 18.66,13.3 18.1,14.28L16.87,13.05C17.14,12.43 17.3,11.74 17.3,11H19M15,11.16L9,5.18V5A3,3 0 0,1 12,2A3,3 0 0,1 15,5V11L15,11.16M4.27,3L21,19.73L19.73,21L15.54,16.81C14.77,17.27 13.91,17.58 13,17.72V21H11V17.72C7.72,17.23 5,14.41 5,11H6.7C6.7,14 9.24,16.1 12,16.1C12.81,16.1 13.6,15.91 14.31,15.58L12.65,13.92L12,14A3,3 0 0,1 9,11V10.28L3,4.27L4.27,3Z" /></svg>

After

Width:  |  Height:  |  Size: 661 B

View file

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M12,2A3,3 0 0,1 15,5V11A3,3 0 0,1 12,14A3,3 0 0,1 9,11V5A3,3 0 0,1 12,2M19,11C19,14.53 16.39,17.44 13,17.93V21H11V17.93C7.61,17.44 5,14.53 5,11H7A5,5 0 0,0 12,16A5,5 0 0,0 17,11H19Z" /></svg>

After

Width:  |  Height:  |  Size: 476 B

View file

@ -1,11 +0,0 @@
<?xml version="1.0"?>
<svg width="99.999997" height="99.999997" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" version="1.1">
<g class="layer">
<title>Layer 1</title>
<g id="svg_1">
<circle cx="50" cy="51" fill="#ff0000" fill-rule="evenodd" id="svg_2" r="50" stroke="#ff0000"/>
<path d="m20,51l60,0" fill="#ff0000" id="svg_3" stroke="#ff0000" stroke-linecap="round" stroke-width="15"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 444 B

View file

@ -1,10 +0,0 @@
<?xml version="1.0"?>
<svg width="99.999997" height="99.999997" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" version="1.1">
<g class="layer">
<title>Layer 1</title>
<g id="svg_1">
<circle cx="50" cy="50" fill="#00ff00" fill-rule="evenodd" id="svg_2" r="50"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 316 B

View file

@ -1,10 +1,6 @@
<?xml version="1.0"?>
<svg width="99.999997" height="99.999997" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" version="1.1">
<g class="layer">
<title>Layer 1</title>
<g id="svg_1">
<circle cx="50" cy="50" fill="#00ff00" fill-rule="evenodd" id="svg_2" r="50"/>
</g>
<?xml version="1.0" encoding="UTF-8"?>
<svg width="28.222mm" height="28.222mm" version="1.1" viewBox="0 0 99.999997 99.999997" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(-62.857 -678.08)">
<circle cx="112.86" cy="728.08" r="50" style="fill-rule:evenodd;fill:#81c784"/>
</g>
</svg>
</svg>

Before

Width:  |  Height:  |  Size: 316 B

After

Width:  |  Height:  |  Size: 302 B

View file

@ -1,5 +1 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
<path d="m 7 3.007812 c -1.367188 0 -2.53125 0.933594 -2.886719 2.195313 l 1.886719 1.886719 v -1.082032 c 0 -0.574218 0.429688 -1 1 -1 h 6 c 0.570312 0 1 0.425782 1 1 v 5 c 0 0.570313 -0.429688 1 -1 1 h -2.082031 l 2 2 h 0.082031 c 1.644531 0 3 -1.355468 3 -3 v -5 c 0 -1.648437 -1.355469 -3 -3 -3 z m -7 0.992188 v 9 h 0.644531 l 3.355469 -3.492188 v 1.5 c 0 1.644532 1.355469 3 3 3 h 3.792969 l -2 -2 h -1.792969 c -0.570312 0 -1 -0.429687 -1 -1 v -1.792968 l -5.210938 -5.214844 z m 0 0"/>
<path d="m 1.5 0.46875 l -1.0625 1.0625 l 14 14 l 1.0625 -1.0625 z m 0 0"/>
</svg>
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M3.27,2L2,3.27L4.73,6H4A1,1 0 0,0 3,7V17A1,1 0 0,0 4,18H16C16.2,18 16.39,17.92 16.54,17.82L19.73,21L21,19.73M21,6.5L17,10.5V7A1,1 0 0,0 16,6H9.82L21,17.18V6.5Z" /></svg>

Before

Width:  |  Height:  |  Size: 712 B

After

Width:  |  Height:  |  Size: 454 B

View file

@ -1,5 +1 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
<path d="m 0.683594 4 h -0.683594 v 9 h 0.644531 l 4.355469 -4.535156 z m 0 0"/>
<path d="m 7 3.003906 c -1.644531 0 -3 1.355469 -3 3 v 5 c 0 1.644532 1.355469 3 3 3 h 6 c 1.644531 0 3 -1.355468 3 -3 v -5 c 0 -1.644531 -1.355469 -3 -3 -3 z m 0 2 h 6 c 0.570312 0 1 0.429688 1 1 v 5 c 0 0.574219 -0.429688 1 -1 1 h -6 c -0.570312 0 -1 -0.425781 -1 -1 v -5 c 0 -0.570312 0.429688 -1 1 -1 z m 0 0"/>
</svg>
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M17,10.5V7A1,1 0 0,0 16,6H4A1,1 0 0,0 3,7V17A1,1 0 0,0 4,18H16A1,1 0 0,0 17,17V13.5L21,17.5V6.5L17,10.5Z" /></svg>

Before

Width:  |  Height:  |  Size: 539 B

After

Width:  |  Height:  |  Size: 399 B

View file

@ -4,7 +4,7 @@
<launchable type="desktop-id">im.dino.Dino.desktop</launchable>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0+</project_license>
<name>Dino+</name>
<name>Dino</name>
<summary>Modern XMPP Chat Client</summary>
<summary xml:lang="zh_TW">現代化的 XMPP 用戶端聊天軟件</summary>
<summary xml:lang="zh_CN">现代 XMPP 聊天客户端</summary>

View file

@ -4,7 +4,7 @@
<launchable type="desktop-id">im.dino.Dino.desktop</launchable>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0+</project_license>
<name>Dino+</name>
<name>Dino</name>
<summary>Modern XMPP Chat Client</summary>
<description>
<p>Dino is a modern open-source chat client for the desktop. It focuses on providing a clean and reliable Jabber/XMPP experience while having your privacy in mind.</p>

View file

@ -1,44 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
<object class="DinoUiViewModelJoinChannelDialog" id="model" />
<object class="AdwWindow" id="dialog">
<property name="default-width">500</property>
<property name="default-height">600</property>
<property name="modal">True</property>
<child>
<object class="GtkStack" id="left_stack">
<property name="visible-child-name" bind-source="model" bind-property="stack_page" />
<property name="hexpand">False</property>
<child>
<object class="GtkStackPage">
<property name="name">channel_selection</property>
<property name="child">
<object class="DinoUiJoinChannelChannelSelectionPage" id="channel_selection">
<binding name="model">
<lookup name="channel_selection">
model
</lookup>
</binding>
</object>
</property>
</object>
</child>
<child>
<object class="GtkStackPage">
<property name="name">confirmation</property>
<property name="child">
<object class="DinoUiJoinChannelConfirmationPage" id="confirmation">
<binding name="model">
<lookup name="confirmation">
model
</lookup>
</binding>
</object>
</property>
</object>
</child>
</object>
</child>
</object>
</interface>

View file

@ -1,160 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
<template class="DinoUiJoinChannelChannelSelectionPage">
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<child>
<object class="AdwHeaderBar" id="header_bar">
<style>
<class name="flat"/>
</style>
</object>
</child>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="spacing">8</property>
<child>
<object class="GtkSearchEntry" id="search_entry">
<property name="placeholder-text" translatable="true">Search for channels or enter an XMPP address</property>
<property name="margin-start">16</property>
<property name="margin-end">16</property>
<!-- <signal name="search-changed" object="list" handler="dino_ui_join_room_dialog_view_model_on_search_changed" />-->
</object>
</child>
<child>
<object class="GtkStack">
<binding name="visible-child-name">
<lookup name="stack_page">
<lookup name="model">DinoUiJoinChannelChannelSelectionPage</lookup>
</lookup>
</binding>
<child>
<object class="GtkStackPage">
<property name="name">channels</property>
<property name="child">
<object class="GtkScrolledWindow">
<property name="vexpand">True</property>
<style>
<class name="undershoot-top"/>
</style>
<child>
<!-- We put a box around this such that the card isn't rounded at the bottom but continues, because of interactions between ScrolledWindow and ListView-->
<!-- <object class="GtkBox">-->
<!-- <property name="orientation">vertical</property>-->
<!-- <child>-->
<object class="GtkListView" id="bookmarks_list">
<property name="margin-start">16</property>
<property name="margin-end">16</property>
<property name="margin-top">8</property>
<property name="margin-bottom">16</property>
<binding name="model">
<lookup name="bookmarks">
<lookup name="model">DinoUiJoinChannelChannelSelectionPage</lookup>
</lookup>
</binding>
<property name="single-click-activate">True</property>
<property name="show-separators">True</property>
<property name="valign">start</property>
<style>
<class name="card"/>
</style>
<property name="factory">
<object class="GtkBuilderListItemFactory">
<property name="resource">/im/dino/Dino/room_list_row.ui</property>
</object>
</property>
</object>
<!-- </child>-->
<!-- </object>-->
</child>
</object>
</property>
</object>
</child>
<child>
<object class="GtkStackPage">
<property name="name">direct-match</property>
<property name="child">
<object class="GtkListView" id="direct_match_list">
<binding name="model">
<lookup name="direct-match">
<lookup name="model">DinoUiJoinChannelChannelSelectionPage</lookup>
</lookup>
</binding>
<property name="single-click-activate">True</property>
<property name="show-separators">True</property>
<property name="valign">start</property>
<property name="margin-start">16</property>
<property name="margin-end">16</property>
<property name="margin-top">8</property>
<property name="margin-bottom">16</property>
<style>
<class name="card"/>
</style>
<property name="factory">
<object class="GtkBuilderListItemFactory">
<property name="resource">/im/dino/Dino/room_list_row.ui</property>
</object>
</property>
</object>
</property>
</object>
</child>
<child>
<object class="GtkStackPage">
<property name="name">loading</property>
<property name="child">
<object class="GtkSpinner">
<property name="spinning">True</property>
<property name="valign">center</property>
<property name="halign">center</property>
</object>
</property>
</object>
</child>
<child>
<object class="GtkStackPage">
<property name="name">no-results</property>
<property name="child">
<object class="AdwStatusPage">
<property name="icon-name">face-uncertain-symbolic</property>
<property name="title" translatable="yes">No channels found</property>
<property name="description" translatable="yes">None of your bookmarks matches your search and the XMPP address could not be resolved.</property>
</object>
</property>
</object>
</child>
<child>
<object class="GtkStackPage">
<property name="name">no-channels</property>
<property name="child">
<object class="AdwStatusPage">
<property name="icon-name">im.dino.Dino-symbolic</property>
<property name="title" translatable="yes">No known channels</property>
<property name="description" translatable="yes">Discover new channels or enter an XMPP address!</property>
</object>
</property>
</object>
</child>
<child>
<object class="GtkStackPage">
<property name="name">offline</property>
<property name="child">
<object class="AdwStatusPage">
<property name="icon-name">im.dino.Dino-symbolic</property>
<property name="title" translatable="yes">You are offline</property>
</object>
</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</template>
</interface>

View file

@ -1,232 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
<template class="DinoUiJoinChannelConfirmationPage">
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<child>
<object class="AdwHeaderBar" id="header_bar">
<child>
<object class="GtkButton" id="back_button">
<property name="icon-name">go-previous-symbolic</property>
</object>
</child>
<style>
<class name="flat"/>
</style>
</object>
</child>
<child>
<object class="AdwToastOverlay" id="toast_overlay">
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="valign">center</property>
<property name="vexpand">True</property>
<property name="spacing">6</property>
<property name="margin-top">20</property>
<property name="margin-start">20</property>
<property name="margin-end">20</property>
<property name="margin-bottom">20</property>
<child>
<object class="DinoUiAvatarPicture" id="picture">
<property name="height-request">100</property>
<property name="width-request">100</property>
<property name="margin-bottom">20</property>
<property name="halign">center</property>
<binding name="model">
<lookup name="avatar">
<lookup name="model">DinoUiJoinChannelConfirmationPage</lookup>
</lookup>
</binding>
</object>
</child>
<child>
<object class="GtkLabel">
<binding name="label">
<lookup name="name">
<lookup name="model">DinoUiJoinChannelConfirmationPage</lookup>
</lookup>
</binding>
<attributes>
<attribute name="scale" value="1.4"/>
</attributes>
<property name="ellipsize">end</property>
<property name="hexpand">True</property>
<property name="halign">center</property>
<binding name="visible">
<closure type="gboolean" function="dino_ui_view_model_join_channel_is_not_null">
<lookup name="name">
<lookup name="model">DinoUiJoinChannelConfirmationPage</lookup>
</lookup>
</closure>
</binding>
</object>
</child>
<child>
<object class="GtkLabel">
<binding name="label">
<lookup name="jid">
<lookup name="model">DinoUiJoinChannelConfirmationPage</lookup>
</lookup>
</binding>
<style>
<class name="dim-label"/>
</style>
<property name="ellipsize">end</property>
<property name="hexpand">True</property>
<property name="halign">center</property>
</object>
</child>
<child>
<object class="GtkLabel">
<binding name="label">
<lookup name="description">
<lookup name="model">DinoUiJoinChannelConfirmationPage</lookup>
</lookup>
</binding>
<property name="wrap">True</property>
<property name="halign">center</property>
<binding name="visible">
<closure type="gboolean" function="dino_ui_view_model_join_channel_is_not_null">
<lookup name="description">
<lookup name="model">DinoUiJoinChannelConfirmationPage</lookup>
</lookup>
</closure>
</binding>
</object>
</child>
<child>
<object class="GtkBox">
<property name="spacing">6</property>
<property name="halign">center</property>
<property name="orientation">horizontal</property>
<binding name="visible">
<closure type="gboolean" function="dino_ui_view_model_join_channel_is_not_null">
<lookup name="members">
<lookup name="model">DinoUiJoinChannelConfirmationPage</lookup>
</lookup>
</closure>
</binding>
<child>
<object class="GtkImage">
<property name="icon-name">system-users-symbolic</property>
<property name="pixel-size">10</property>
</object>
</child>
<child>
<object class="GtkLabel">
<binding name="label">
<lookup name="members">
<lookup name="model">DinoUiJoinChannelConfirmationPage</lookup>
</lookup>
</binding>
<property name="ellipsize">end</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkBox">
<property name="spacing">2</property>
<property name="margin-top">20</property>
<property name="halign">center</property>
<property name="orientation">horizontal</property>
<child>
<object class="GtkLabel">
<property name="label">Joining as</property>
<property name="ellipsize">end</property>
</object>
</child>
<child>
<object class="GtkButton">
<style>
<class name="flat"/>
<class name="dino-joining-as"/>
</style>
<child>
<object class="GtkBox">
<property name="spacing">4</property>
<child>
<object class="GtkLabel">
<binding name="label">
<lookup name="nick">
<lookup name="model">DinoUiJoinChannelConfirmationPage</lookup>
</lookup>
</binding>
</object>
</child>
<child>
<object class="GtkImage">
<property name="icon-name">document-edit-symbolic</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkButton">
<property name="action-name">win.join</property>
<!-- <binding name="sensitive">-->
<!-- <lookup name="spinner-active">-->
<!-- <lookup name="model">DinoUiJoinChannelConfirmationPage</lookup>-->
<!-- </lookup>-->
<!-- </binding>-->
<property name="margin-top">20</property>
<property name="margin-bottom">26</property>
<property name="halign">center</property>
<style>
<class name="pill"/>
<class name="suggested-action"/>
</style>
<child>
<object class="GtkBox">
<child>
<object class="GtkLabel">
<property name="label" translatable="1">Join</property>
</object>
</child>
<child>
<object class="GtkRevealer">
<property name="transition-type">slide-left</property>
<property name="transition-duration">200</property>
<binding name="reveal-child">
<lookup name="spinner-active">
<lookup name="model">DinoUiJoinChannelConfirmationPage</lookup>
</lookup>
</binding>
<child>
<object class="GtkSpinner">
<binding name="visible">
<lookup name="spinner-active">
<lookup name="model">DinoUiJoinChannelConfirmationPage</lookup>
</lookup>
</binding>
<binding name="spinning">
<lookup name="spinner-active">
<lookup name="model">DinoUiJoinChannelConfirmationPage</lookup>
</lookup>
</binding>
<property name="margin-start">10</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
</child>
</object>
</child>
</template>
</interface>

View file

@ -10,9 +10,9 @@
<property name="margin-bottom">6</property>
<property name="column-spacing">6</property>
<child>
<object class="DinoUiAvatarPicture" id="picture">
<property name="height-request">40</property>
<property name="width-request">40</property>
<object class="DinoUiAvatarImage" id="image">
<property name="height">40</property>
<property name="width">40</property>
</object>
</child>
<child>

View file

@ -1,158 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
<template class="DinoUiChangePasswordDialog">
<property name="title" translatable="1">Change password</property>
<property name="valign">center</property>
<property name="modal">True</property>
<child internal-child="content_area">
<object class="GtkBox">
<child>
<object class="GtkGrid" id="info_grid">
<property name="orientation">vertical</property>
<property name="margin-start">20</property>
<property name="margin-end">20</property>
<property name="margin-top">20</property>
<property name="margin-bottom">20</property>
<property name="row-spacing">7</property>
<property name="column-spacing">10</property>
<child>
<object class="GtkLabel">
<property name="label" translatable="1">Current password</property>
<property name="xalign">1</property>
<layout>
<property name="column">0</property>
<property name="row">0</property>
</layout>
</object>
</child>
<child>
<object class="GtkEntry" id="current_passwd_entry">
<property name="activates_default">1</property>
<property name="hexpand">1</property>
<property name="width_request">200</property>
<property name="visibility">False</property>
<layout>
<property name="column">1</property>
<property name="row">0</property>
</layout>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="label" translatable="1">New password</property>
<property name="xalign">1</property>
<layout>
<property name="column">0</property>
<property name="row">1</property>
</layout>
</object>
</child>
<child>
<object class="GtkEntry" id="new_passwd_entry">
<property name="activates_default">1</property>
<property name="hexpand">1</property>
<property name="width_request">200</property>
<property name="visibility">False</property>
<layout>
<property name="column">1</property>
<property name="row">1</property>
</layout>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="label" translatable="1">Confirm new password</property>
<property name="xalign">1</property>
<layout>
<property name="column">0</property>
<property name="row">2</property>
</layout>
</object>
</child>
<child>
<object class="GtkEntry" id="confirm_new_passwd_entry">
<property name="activates_default">1</property>
<property name="hexpand">1</property>
<property name="width_request">200</property>
<property name="visibility">False</property>
<layout>
<property name="column">1</property>
<property name="row">2</property>
</layout>
</object>
</child>
<child>
<object class="GtkLabel" id="change_password_error_label">
<!-- property name="xalign">0</property -->
<property name="halign">center</property>
<property name="hexpand">True</property>
<property name="margin-top">7</property>
<attributes>
<attribute name="scale" value="0.9"></attribute>
</attributes>
<layout>
<property name="column">0</property>
<property name="row">3</property>
<property name="column-span">2</property>
</layout>
</object>
</child>
<child>
<object class="GtkButton" id="cancel_button">
<property name="label" translatable="1">Cancel</property>
<layout>
<property name="column">0</property>
<property name="row">4</property>
</layout>
</object>
</child>
<child>
<object class="GtkButton" id="change_password_button">
<property name="halign">end</property>
<property name="hexpand">True</property>
<property name="sensitive">0</property>
<layout>
<property name="column">1</property>
<property name="row">4</property>
</layout>
<style>
<class name="text-button"/>
<class name="suggested-action"/>
</style>
<child>
<object class="GtkStack" id="change_password_stack">
<child>
<object class="GtkStackPage">
<property name="name">label</property>
<property name="child">
<object class="GtkLabel" >
<property name="label" translatable="1">Change password</property>
</object>
</property>
</object>
</child>
<child>
<object class="GtkStackPage">
<property name="name">spinner</property>
<property name="child">
<object class="GtkSpinner">
<property name="spinning">True</property>
</object>
</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
<action-widgets>
<action-widget response="cancel">cancel_button</action-widget>
<action-widget response="ok" default="true">change_password_button</action-widget>
</action-widgets>
</template>
</interface>

View file

@ -93,9 +93,11 @@
<class name="image-button"/>
</style>
<child>
<object class="DinoUiAvatarPicture" id="picture">
<property name="height-request">50</property>
<property name="width-request">50</property>
<object class="DinoUiAvatarImage" id="image">
<property name="height">50</property>
<property name="width">50</property>
<!-- <property name="xalign">1</property>-->
<property name="allow_gray">False</property>
</object>
</child>
</object>
@ -165,17 +167,7 @@
<layout>
<property name="column">1</property>
<property name="row">2</property>
<property name="column-span">1</property>
</layout>
</object>
</child>
<child>
<object class="GtkButton" id="password_change_btn">
<property name="label">⚙️</property>
<layout>
<property name="column">2</property>
<property name="row">2</property>
<property name="column-span">1</property>
<property name="column-span">2</property>
</layout>
</object>
</child>

View file

@ -13,7 +13,7 @@
<attribute name="label" translatable="yes">Preferences</attribute>
</item>
<item>
<attribute name="action">win.show-help-overlay</attribute>
<attribute name="action">app.open_shortcuts</attribute>
<attribute name="label" translatable="yes">Keyboard Shortcuts</attribute>
</item>
<item>

View file

@ -27,7 +27,7 @@
</style>
<child>
<object class="GtkImage">
<property name="icon-name">emoji-people-symbolic</property>
<property name="icon-name">dino-emoticon-symbolic</property>
<property name="icon-size">1</property>
</object>
</child>

Some files were not shown because too many files have changed in this diff Show more