1
0
mirror of https://github.com/KDE/krfb synced 2026-07-01 15:51:18 -07:00

Compare commits

...

798 Commits

Author SHA1 Message Date
Heiko Becker
169c09461a GIT_SILENT Update Appstream for new release 2024-04-08 17:34:54 +02:00
Heiko Becker
086c5edeb2 GIT_SILENT Upgrade release service version to 24.02.2. 2024-04-08 17:00:11 +02:00
l10n daemon script
5c0695ff15 GIT_SILENT Sync po/docbooks with svn 2024-03-31 03:22:34 +00:00
Heiko Becker
3e058985e1 GIT_SILENT Update Appstream for new release 2024-03-15 21:54:55 +01:00
Heiko Becker
fb0ff21e52 GIT_SILENT Upgrade release service version to 24.02.1. 2024-03-15 21:07:49 +01:00
Jordan Pryde
966ad6a163 DMA-BUF size may not match size from handleRemoteDesktopStarted()
QScreen::size() marshalled from xdg-desktop-portal-kde uses logical
scaled size but the DMA-BUF from pipewire is the physical pixel count.
We now check the DMA-BUF size each frame and resize the QImage buffer when
needed.

BUG: 482929
BUG: 478057
BUG: 464547
2024-03-12 09:11:07 -07:00
l10n daemon script
800f749a64 GIT_SILENT Sync po/docbooks with svn 2024-02-25 03:06:52 +00:00
l10n daemon script
fdaca95d89 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-02-25 03:04:00 +00:00
Heiko Becker
2dddee0476 GIT_SILENT Update Appstream for new release 2024-02-16 00:32:32 +01:00
Heiko Becker
ca96717dee GIT_SILENT Upgrade release service version to 24.02.0. 2024-02-15 23:49:53 +01:00
Heiko Becker
a828235ea8 GIT_SILENT Update Appstream for new release
(cherry picked from commit 76ab445045)
2024-02-14 14:33:58 +01:00
l10n daemon script
395d35185d GIT_SILENT Sync po/docbooks with svn 2024-02-14 03:00:15 +00:00
l10n daemon script
cddf882d0c SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-02-09 03:02:21 +00:00
Antonio Rojas
a34a277d26 Don't search for non-existant Qt6XkbCommonSupport 2024-02-06 20:38:30 +00:00
Antonio Rojas
c2382c8dae Drop unused kcrash dependency
(cherry picked from commit f4e97af144)
2024-02-06 17:11:29 +00:00
l10n daemon script
7d02c4f148 GIT_SILENT Sync po/docbooks with svn 2024-02-05 03:32:19 +00:00
l10n daemon script
718c76db59 GIT_SILENT Sync po/docbooks with svn 2024-02-03 03:00:49 +00:00
Aleix Pol
45f2b7444e pw: Keep alternative for KPipeWire 6.0 and 6.1 2024-01-31 23:36:11 +00:00
l10n daemon script
d8f0173a0c GIT_SILENT made messages (after extraction) 2024-01-24 02:23:54 +00:00
l10n daemon script
5c5db149fb GIT_SILENT Sync po/docbooks with svn 2024-01-23 03:02:29 +00:00
l10n daemon script
23727ef7b8 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-01-23 02:57:58 +00:00
Aleix Pol
19bbbcc547 Revert "wayland: Adapt to change in kpipewire"
This reverts commit 59446f5058.

The change in KPipeWire was reverted
2024-01-21 01:53:51 +01:00
Aleix Pol
59446f5058 wayland: Adapt to change in kpipewire 2024-01-19 01:49:48 +01:00
l10n daemon script
26eadc37ca GIT_SILENT Sync po/docbooks with svn 2024-01-13 03:14:36 +00:00
Albert Astals Cid
d09455684a GIT_SILENT Upgrade release service version to 24.01.95. 2024-01-11 20:45:05 +01:00
l10n daemon script
74f92d69c6 GIT_SILENT Sync po/docbooks with svn 2024-01-11 01:17:23 +00:00
l10n daemon script
9d0b4072ad GIT_SILENT Sync po/docbooks with svn 2024-01-10 02:13:51 +00:00
l10n daemon script
1160a4ae0b SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-01-10 02:08:11 +00:00
Laurent Montel
b08d0387e0 Check is not necessary now 2024-01-09 08:02:52 +01:00
Laurent Montel
4d08b1429d Fix minimum versionx 2024-01-09 08:02:18 +01:00
l10n daemon script
ce0625c265 GIT_SILENT Sync po/docbooks with svn 2024-01-09 02:10:48 +00:00
Albert Astals Cid
4bec964bfa GIT_SILENT Upgrade release service version to 24.01.90. 2024-01-09 00:38:13 +01:00
Nicolas Fella
39c83720bf Remove module from KPipeWire includes
This doesn't work in KF6
2024-01-08 01:02:22 +01:00
Nicolas Fella
08dbfaced4 Adapt to KConfigGroup API change 2024-01-08 00:55:08 +01:00
Nicolas Fella
549affa4c3 Switch CI to Qt6 2024-01-08 00:55:08 +01:00
Nicolas Fella
422ce406c9 Port ServerManager away from QDesktopWidget
Use QNativeInterface on X11

On Wayland we get 0 in all cases anyway
2024-01-08 00:55:08 +01:00
Nicolas Fella
73504294c1 Port X11EventHandler away from QDesktopWidget
screenNumber() without arguments returns the primary screen, which is 0
2024-01-08 00:55:08 +01:00
Nicolas Fella
b8e011dd1c Fix nativeEventFilter signature for Qt6 2024-01-08 00:55:08 +01:00
Nicolas Fella
a8b840daac Fix includes for QX11Info when using Qt6 2024-01-08 00:55:08 +01:00
Nicolas Fella
990d5c341a Adapt build system for building against Qt6 2024-01-08 00:55:06 +01:00
Nicolas Fella
4753904c13 Remove unused include 2024-01-08 00:54:55 +01:00
Nicolas Fella
ba75f0d7ed Port framebuffers away from deprecated QDesktopWidget
Use QPlatformNativeInterface to get the WId instead
2024-01-08 00:54:53 +01:00
Nicolas Fella
b7a2db5c71 Drop qt framebuffer
It works by grabbing the QDesktopWidget, which doesn't work in Qt6 since there is no QDesktopWidget.

In practice it only really works on xcb anyway, for which we have a dedicated plugin
2024-01-08 00:53:15 +01:00
l10n daemon script
caab08ba15 GIT_SILENT Sync po/docbooks with svn 2024-01-07 01:34:08 +00:00
l10n daemon script
a1760c13d3 GIT_SILENT Sync po/docbooks with svn 2023-12-31 01:34:06 +00:00
l10n daemon script
9f01d44a13 GIT_SILENT Sync po/docbooks with svn 2023-12-24 01:37:02 +00:00
l10n daemon script
2b53b784c8 GIT_SILENT Sync po/docbooks with svn 2023-12-23 01:29:43 +00:00
l10n daemon script
f3b8c85ad6 GIT_SILENT Sync po/docbooks with svn 2023-12-21 01:38:26 +00:00
Albert Astals Cid
45f0e75dd4 GIT_SILENT Upgrade release service version to 24.01.85. 2023-12-18 23:10:48 +01:00
l10n daemon script
772e720b3b GIT_SILENT Sync po/docbooks with svn 2023-12-18 01:37:44 +00:00
l10n daemon script
f24120faec GIT_SILENT Sync po/docbooks with svn 2023-12-10 01:37:12 +00:00
Heiko Becker
328c708a8b GIT_SILENT Update Appstream for new release
(cherry picked from commit 1e114d60c0)
2023-11-30 18:21:19 +01:00
l10n daemon script
5b375106dd GIT_SILENT Sync po/docbooks with svn 2023-11-26 01:38:31 +00:00
Albert Astals Cid
0c9f71eabe GIT_SILENT Upgrade release service version to 24.01.80. 2023-11-25 00:42:41 +01:00
Laurent Montel
1a6a0cd89d GIT_SILENT: Port to new CI template 2023-11-22 08:51:10 +01:00
l10n daemon script
9da46e0b08 GIT_SILENT Sync po/docbooks with svn 2023-11-20 01:38:03 +00:00
l10n daemon script
18d7e766e1 GIT_SILENT Sync po/docbooks with svn 2023-11-19 01:34:16 +00:00
l10n daemon script
65157c1c22 GIT_SILENT Sync po/docbooks with svn 2023-11-16 01:29:52 +00:00
l10n daemon script
a3654c058e GIT_SILENT Sync po/docbooks with svn 2023-11-13 01:26:04 +00:00
l10n daemon script
38e9d57591 GIT_SILENT Sync po/docbooks with svn 2023-11-10 01:31:28 +00:00
Nicolas Fella
132b895b03 Adjust to KWayland moving to Plasma 2023-11-08 08:48:41 +00:00
Albert Astals Cid
dffc379f03 GIT_SILENT Upgrade release service version to 24.01.75. 2023-11-07 21:01:46 +01:00
l10n daemon script
6fada45b5a SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2023-11-07 02:13:05 +00:00
l10n daemon script
02c6cccf43 GIT_SILENT made messages (after extraction) 2023-11-07 01:19:01 +00:00
l10n daemon script
b29b374f08 GIT_SILENT Sync po/docbooks with svn 2023-11-05 13:44:02 +00:00
l10n daemon script
bb028c0c3b GIT_SILENT made messages (after extraction) 2023-11-05 12:32:58 +00:00
l10n daemon script
3996ffd60b SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2023-11-04 11:53:27 +00:00
Heiko Becker
34870b5c78 GIT_SILENT Update Appstream for new release
(cherry picked from commit f55bb0e684)
2023-11-04 12:19:32 +01:00
l10n daemon script
d542437e2a GIT_SILENT Sync po/docbooks with svn 2023-10-22 01:43:15 +00:00
l10n daemon script
33b7fe0a28 GIT_SILENT Sync po/docbooks with svn 2023-10-11 01:44:25 +00:00
Heiko Becker
f7154d0e2b GIT_SILENT Update Appstream for new release
(cherry picked from commit 12563405fb)
2023-10-07 17:45:37 +02:00
l10n daemon script
ed89040197 GIT_SILENT Sync po/docbooks with svn 2023-10-01 01:36:45 +00:00
l10n daemon script
d7cdb7f981 GIT_SILENT Sync po/docbooks with svn 2023-09-17 02:01:24 +00:00
Heiko Becker
6bfdd98da6 GIT_SILENT Update Appstream for new release
(cherry picked from commit f1c9f365be)
2023-09-09 10:52:57 +02:00
l10n daemon script
bbd948f2bc GIT_SILENT Sync po/docbooks with svn 2023-09-03 02:07:10 +00:00
l10n daemon script
23038987cf GIT_SILENT Sync po/docbooks with svn 2023-08-28 02:07:55 +00:00
Heiko Becker
6f999ac27c GIT_SILENT Update Appstream for new release
(cherry picked from commit 6dfe46c84d)
2023-08-16 23:16:48 +02:00
David Edmundson
699995116f Remove unused parts of pipewire backend
Direct wayland paths to start streams for windows and outputs became
deprecated when xdg-portal support was added and this code is therefore
unused.

Creating virtual monitors via the direct approach remains in use.
2023-08-03 13:03:08 +00:00
l10n daemon script
3086522a0a GIT_SILENT Sync po/docbooks with svn 2023-08-03 02:08:25 +00:00
l10n daemon script
5ef85f4ea1 GIT_SILENT Sync po/docbooks with svn 2023-08-01 01:57:55 +00:00
l10n daemon script
84886d4f86 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2023-08-01 01:40:07 +00:00
l10n daemon script
636c2bbc1e GIT_SILENT Sync po/docbooks with svn 2023-07-31 02:09:16 +00:00
l10n daemon script
993232d73b GIT_SILENT Sync po/docbooks with svn 2023-07-24 09:03:51 +00:00
l10n daemon script
02d2d2e971 GIT_SILENT made messages (after extraction) 2023-07-24 07:33:49 +00:00
l10n daemon script
df30f91225 GIT_SILENT Sync po/docbooks with svn 2023-07-19 02:38:33 +00:00
Albert Astals Cid
ce562e82bb GIT_SILENT Upgrade release service version to 23.11.70. 2023-07-17 12:26:41 +02:00
l10n daemon script
a06121e653 GIT_SILENT Sync po/docbooks with svn 2023-07-05 02:27:55 +00:00
l10n daemon script
fa8dec332a GIT_SILENT Sync po/docbooks with svn 2023-07-04 02:33:38 +00:00
Heiko Becker
de373dd0bc GIT_SILENT Update Appstream for new release
(cherry picked from commit bd90236e94)
2023-06-30 00:53:51 +02:00
l10n daemon script
54f0f51b9d GIT_SILENT made messages (after extraction) 2023-06-27 00:47:52 +00:00
l10n daemon script
6efc1194aa GIT_SILENT Sync po/docbooks with svn 2023-06-20 02:27:04 +00:00
l10n daemon script
827877e4bb GIT_SILENT Sync po/docbooks with svn 2023-06-18 02:42:08 +00:00
l10n daemon script
5c0c53717c GIT_SILENT made messages (after extraction) 2023-06-18 00:53:48 +00:00
Heiko Becker
f2fc9cacbb GIT_SILENT Update Appstream for new release
(cherry picked from commit 474644d6cb)
2023-06-02 21:29:05 +02:00
l10n daemon script
57ab28f641 GIT_SILENT Sync po/docbooks with svn 2023-05-31 02:26:40 +00:00
l10n daemon script
e56e070a52 GIT_SILENT Sync po/docbooks with svn 2023-05-30 02:11:24 +00:00
l10n daemon script
5b350140d7 GIT_SILENT Sync po/docbooks with svn 2023-05-24 01:53:34 +00:00
l10n daemon script
828f0837b2 GIT_SILENT Sync po/docbooks with svn 2023-05-23 02:28:51 +00:00
Heiko Becker
e6d86a9f56 GIT_SILENT Update Appstream for new release
(cherry picked from commit 8b16492e33)
2023-05-06 10:53:36 +02:00
l10n daemon script
afc2e1fef8 GIT_SILENT Sync po/docbooks with svn 2023-05-01 02:14:06 +00:00
l10n daemon script
641e24e8ae SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2023-05-01 01:52:50 +00:00
l10n daemon script
6221508a96 GIT_SILENT made messages (after extraction) 2023-05-01 00:51:56 +00:00
l10n daemon script
d937a95d57 GIT_SILENT Sync po/docbooks with svn 2023-04-30 02:46:00 +00:00
Aleix Pol
9c7f354f72 pipewire: Drop dependencies that remained after the port to KPipeWire 2023-04-23 19:15:51 +02:00
l10n daemon script
4b1d314d6c GIT_SILENT Sync po/docbooks with svn 2023-04-23 02:39:17 +00:00
Aleix Pol Gonzalez
fe7bc043ad README: Remove mentions to files that do not exist anymore 2023-04-20 14:02:13 +00:00
l10n daemon script
6d2221afd4 GIT_SILENT Sync po/docbooks with svn 2023-04-17 02:38:55 +00:00
Heiko Becker
0477d02b43 GIT_SILENT Update Appstream for new release
(cherry picked from commit 41b502ac64)
2023-04-12 18:47:32 +02:00
l10n daemon script
d8ec878951 GIT_SILENT Sync po/docbooks with svn 2023-04-11 02:19:16 +00:00
Friedrich W. H. Kossebau
d658607908 Remove module prefix from KF include
GIT_SILENT
2023-03-28 23:40:09 +00:00
l10n daemon script
ec720c034d GIT_SILENT Sync po/docbooks with svn 2023-03-28 02:19:38 +00:00
l10n daemon script
8782122406 GIT_SILENT Sync po/docbooks with svn 2023-03-27 02:42:52 +00:00
l10n daemon script
7bd3ddd4a2 GIT_SILENT Sync po/docbooks with svn 2023-03-26 01:58:11 +00:00
l10n daemon script
5fbfcbd494 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2023-03-26 01:44:15 +00:00
l10n daemon script
c8cf2386ab GIT_SILENT Sync po/docbooks with svn 2023-03-12 03:15:56 +00:00
Albert Astals Cid
3259321a7a GIT_SILENT Upgrade release service version to 23.07.70. 2023-03-10 21:45:04 +01:00
l10n daemon script
c92c4108b0 GIT_SILENT Sync po/docbooks with svn 2023-03-05 02:35:04 +00:00
l10n daemon script
854bc782a0 GIT_SILENT Sync po/docbooks with svn 2023-02-25 03:04:09 +00:00
Heiko Becker
20c787931c GIT_SILENT Update Appstream for new release
(cherry picked from commit 5a6381537c)
2023-02-24 21:44:10 +01:00
l10n daemon script
b740b6518e GIT_SILENT Sync po/docbooks with svn 2023-02-16 03:06:54 +00:00
l10n daemon script
acc304fb94 GIT_SILENT Sync po/docbooks with svn 2023-02-13 02:13:33 +00:00
David Redondo
01c775f2e8 Hook up keyevents on Wayland 2023-02-09 13:50:35 +00:00
David Redondo
953cc4218b Encode supported platforms in the plugin metdata
This way we don't load pipewire on X, or xcb on Wayland regardless
if they are configured as preferred or not.
2023-02-09 07:54:39 +00:00
David Redondo
e865b187a2 Fallback to another plugin if preferred one doesn't work
I assume this is what the code wants to do instead of looping
through all the plugins just to find a specific one and just
giving up it it fails.
2023-02-09 07:54:39 +00:00
l10n daemon script
86fe436fd0 GIT_SILENT Sync po/docbooks with svn 2023-02-08 03:04:49 +00:00
Heiko Becker
21b2361c9f GIT_SILENT Update Appstream for new release
(cherry picked from commit f21499f023)
2023-01-30 00:26:22 +01:00
l10n daemon script
09e6984b58 GIT_SILENT Sync po/docbooks with svn 2023-01-22 02:19:18 +00:00
l10n daemon script
df52969067 GIT_SILENT Sync po/docbooks with svn 2023-01-19 02:25:46 +00:00
l10n daemon script
e0ec84ef65 GIT_SILENT Sync po/docbooks with svn 2023-01-13 02:54:17 +00:00
l10n daemon script
336af069cf SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2023-01-13 02:01:54 +00:00
l10n daemon script
83654bd33d GIT_SILENT made messages (after extraction) 2023-01-13 00:56:14 +00:00
Aleix Pol i Gonzalez
4db9c65083 pipewire: Port to use KPipeWire
Rather than using pipewire directly, we can use this framework which
allows us to share a bunch of code with Plasma.
2023-01-12 13:48:46 +00:00
l10n daemon script
4f924c2306 GIT_SILENT Sync po/docbooks with svn 2023-01-12 02:15:49 +00:00
l10n daemon script
d7cafa3dfc GIT_SILENT Sync po/docbooks with svn 2023-01-07 02:50:15 +00:00
l10n daemon script
2e06f4f370 GIT_SILENT Sync po/docbooks with svn 2023-01-06 02:39:19 +00:00
l10n daemon script
0ec2f9f01b GIT_SILENT Sync po/docbooks with svn 2023-01-04 02:45:35 +00:00
l10n daemon script
43b91cc93a GIT_SILENT Sync po/docbooks with svn 2023-01-03 02:59:42 +00:00
Albert Astals Cid
e805ce0e55 GIT_SILENT Update Appstream for new release
(cherry picked from commit ebbd8b982c)
2023-01-03 00:55:19 +01:00
l10n daemon script
462c7295d2 GIT_SILENT Sync po/docbooks with svn 2022-12-25 02:44:30 +00:00
l10n daemon script
f97f9a79fd GIT_SILENT Sync po/docbooks with svn 2022-12-14 02:43:13 +00:00
l10n daemon script
ab13b9a16f GIT_SILENT Sync po/docbooks with svn 2022-12-02 02:54:13 +00:00
Heiko Becker
fba34da8da GIT_SILENT Update Appstream for new release
(cherry picked from commit 97ba8f617e)
2022-11-30 01:35:56 +01:00
l10n daemon script
21763fe544 GIT_SILENT Sync po/docbooks with svn 2022-11-20 02:33:54 +00:00
l10n daemon script
9699e7ad2a GIT_SILENT Sync po/docbooks with svn 2022-11-07 02:34:26 +00:00
Albert Astals Cid
62da564888 GIT_SILENT Upgrade release service version to 23.03.70. 2022-11-05 21:47:53 +01:00
l10n daemon script
adecd9b0a4 GIT_SILENT Sync po/docbooks with svn 2022-10-31 02:41:52 +00:00
Heiko Becker
74bb886ac2 GIT_SILENT Update Appstream for new release
(cherry picked from commit fa2d8275c7)
2022-10-30 22:24:37 +01:00
l10n daemon script
c131eb9813 GIT_SILENT Sync po/docbooks with svn 2022-10-25 02:04:24 +00:00
l10n daemon script
5c7a4f5e29 GIT_SILENT Sync po/docbooks with svn 2022-10-22 11:24:45 +00:00
l10n daemon script
f1014c54f1 GIT_SILENT Sync po/docbooks with svn 2022-10-20 02:58:09 +00:00
Heiko Becker
c614ca10cc GIT_SILENT Update Appstream for new release
(cherry picked from commit 0e8fc32ff8)
2022-10-10 22:24:10 +02:00
l10n daemon script
085d30862e GIT_SILENT Sync po/docbooks with svn 2022-10-03 02:42:46 +00:00
l10n daemon script
1a2def038b GIT_SILENT Sync po/docbooks with svn 2022-10-02 02:51:41 +00:00
l10n daemon script
d160324b1b SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-09-30 01:48:14 +00:00
l10n daemon script
549b09eff4 GIT_SILENT made messages (after extraction) 2022-09-30 00:44:32 +00:00
Heiko Becker
c59abf032e GIT_SILENT Update Appstream for new release
(cherry picked from commit de4dcbbcc6)
2022-09-03 00:35:50 +02:00
Albert Astals Cid
4606fcaeba GIT_SILENT Update Appstream for new release
(cherry picked from commit 7f26fdecab)
2022-08-11 00:14:04 +02:00
l10n daemon script
a8ccd7ca5a SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-08-05 01:43:11 +00:00
Nicolas Fella
04494dfeb0 Fix broken WId refactoring
Actually remove the WId member from the abtract framebuffer class and use the member in xcbframebuffer

qtframebuffer also uses the WId so add a member there
2022-08-04 11:57:55 +02:00
Nicolas Fella
4169a9f50a Don't pass unused window ids around
The wid is only relevant for the xcb framebuffer

We can just query it there, no need to pass it around everywhere
2022-08-03 22:00:16 +02:00
Friedrich W. H. Kossebau
5173e7ff29 Port away from deprecated KMessageBox::about()
GIT_SILENT
2022-07-16 01:03:44 +02:00
Friedrich W. H. Kossebau
745a5d53f2 Use ECMDeprecationSettings
GIT_SILENT
2022-07-16 01:01:12 +02:00
Friedrich W. H. Kossebau
ce0d6fe648 Adapt min Qt version to one implied by current min KF version
GIT_SILENT
2022-07-16 00:59:26 +02:00
Friedrich W. H. Kossebau
42ed3c5707 Remove definitions duplicated from KDE_COMPILERSETTINGS_LEVEL 5.91
GIT_SILENT
2022-07-16 00:58:55 +02:00
Albert Astals Cid
2cd15b6313 GIT_SILENT Upgrade release service version to 22.11.70. 2022-07-13 00:04:53 +02:00
l10n daemon script
d1d085008a SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-07-06 01:45:10 +00:00
l10n daemon script
00725ca11b GIT_SILENT made messages (after extraction) 2022-07-06 00:45:53 +00:00
Heiko Becker
e3e1571cea GIT_SILENT Update Appstream for new release
(cherry picked from commit cc61c6a8b3)
2022-07-01 21:16:16 +02:00
l10n daemon script
b9dd0ac0d6 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-06-30 01:44:45 +00:00
l10n daemon script
9dfca797dd GIT_SILENT made messages (after extraction) 2022-06-30 00:45:07 +00:00
Laurent Montel
720478a317 Add missing override 2022-06-28 22:30:15 +02:00
l10n daemon script
60161dacf8 GIT_SILENT made messages (after extraction) 2022-06-25 00:48:43 +00:00
Laurent Montel
18591e967c Remove extra ';' 2022-06-23 06:48:58 +02:00
l10n daemon script
4d65b52b47 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-06-22 01:43:36 +00:00
l10n daemon script
44336093da SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-06-13 02:27:19 +00:00
l10n daemon script
df10a81baa GIT_SILENT made messages (after extraction) 2022-06-13 01:02:08 +00:00
l10n daemon script
172229294c SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-06-07 02:13:20 +00:00
l10n daemon script
3d614c2bd6 GIT_SILENT made messages (after extraction) 2022-06-07 00:53:24 +00:00
Heiko Becker
58d47d3947 GIT_SILENT Update Appstream for new release
(cherry picked from commit ff6b291d50)
2022-06-04 10:53:24 +02:00
l10n daemon script
a03b8db322 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-05-28 02:14:23 +00:00
Albert Astals Cid
ea5d2f40bc Add ki18n_install and kdoctools_install 2022-05-22 00:58:20 +02:00
Nicolas Fella
22420a22af Raise window when activating running instance 2022-05-15 19:26:42 +02:00
Heiko Becker
6f1d60b3ba GIT_SILENT Update Appstream for new release
(cherry picked from commit d4d400624c)
2022-05-07 12:02:15 +02:00
Laurent Montel
8365e97f9a Remove duplicate header between header cpp file 2022-05-05 07:04:45 +02:00
Antonio Rojas
f1da76277e Remove %i parameter from Exec line
It breaks launching the application on Wayland
2022-05-02 18:11:02 +02:00
l10n daemon script
ba4329d9b7 GIT_SILENT made messages (after extraction) 2022-05-01 00:49:09 +00:00
l10n daemon script
17d3f53561 GIT_SILENT made messages (after extraction) 2022-04-25 00:45:49 +00:00
Alexander Lohnau
fbf4fcbce0 Derive plugin id from filename, clean up json files
We ignore the name/description and only display the id in the ui.
To make sure the is are the same, the OUTPUT_NAME cmake target property is set.
Otherwise, we would need a json file with the KPlugin object and then the id in it, which is
unnecessary work for sth. that can be done in a single line.

Having the file base name and id differ is also discouraged, see https://phabricator.kde.org/T14499
2022-04-23 19:18:18 +00:00
Alexander Lohnau
5158d14147 Simplify iterator usage and make it with rest of KDE code consistent 2022-04-23 19:18:18 +00:00
Alexander Lohnau
c7ee6f1e0e Drop empty deconstructors of plugins
We have one defined in the base class, consequently we do not violate the rule of life when removing the empty ones
2022-04-23 19:18:18 +00:00
Alexander Lohnau
0d8cc44ec2 Simplify plugin declaration using K_PLUGIN_CLASS_WITH_JSON
This way we do not need to take care of setting the factory name and typing out the registration manually
2022-04-23 19:18:18 +00:00
Alexander Lohnau
d7c559b017 Clean up plugin loading code
- We do not need to manually check for duplicates
- Improve the error message while at it
- Remove the internal utility-method since the code is super small now
2022-04-23 19:18:18 +00:00
l10n daemon script
fcebbfb2d4 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-04-20 01:41:07 +00:00
l10n daemon script
d45679bdbd SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-04-19 01:44:50 +00:00
Alexander Lohnau
a58c787986 Clean up unneeded json/desktop files
Converting a servicetype to json does not make sense and we do not use the file anywhere.
With us also not using KServiceTypeTrader for the plugin loading, we can get rid of the servicetype desktop files.
2022-04-18 09:28:16 +02:00
Heiko Becker
96f164c67d GIT_SILENT Update Appstream for new release
(cherry picked from commit b2e736c21a)
2022-04-12 23:57:07 +02:00
l10n daemon script
9b634ae795 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-04-01 01:58:36 +00:00
l10n daemon script
a80f5f140d GIT_SILENT made messages (after extraction) 2022-04-01 00:51:17 +00:00
Andreas Sturmlechner
4a6970d684 Make KF5Wayland optional behind existing DISABLE_PIPEWIRE
We have an option so let's be consistent.

Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
2022-03-24 20:41:36 +03:00
Albert Astals Cid
e2f3910f7a GIT_SILENT Upgrade release service version to 22.07.70. 2022-03-12 13:18:43 +01:00
Aleix Pol
c14d37e56f virtualmonitor: Return 1 if it failed to start 2022-03-08 02:24:19 +00:00
l10n daemon script
2d391672e5 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-03-05 01:43:41 +00:00
Heiko Becker
64252e52f6 GIT_SILENT Update Appstream for new release
(cherry picked from commit ef32c9266a)
2022-02-27 19:36:20 +01:00
l10n daemon script
a4fed2f0d5 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-02-27 01:52:27 +00:00
l10n daemon script
70488a7b59 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-02-17 01:51:20 +00:00
Laurent Montel
78205f9116 Make it compile without deprecated methods 2022-02-12 10:52:31 +01:00
l10n daemon script
59db6f6b7b GIT_SILENT made messages (after extraction) 2022-02-06 00:47:00 +00:00
Heiko Becker
18e76cfc0c GIT_SILENT Update Appstream for new release
(cherry picked from commit fa7bbbc872)
2022-01-29 00:24:20 +01:00
Luke Dashjr
1222c2067c Add CMake option DISABLE_PIPEWIRE to skip dependency check 2022-01-24 01:35:21 +00:00
Alexey Minnekhanov
25f5492f33 Port away from deprecated methods
Fixes thigs like:
warning: ‘static QVector<KPluginMetaData> KPluginLoader::findPlugins(
  const QString&, std::function<bool(const KPluginMetaData&)>)’
  is deprecated: Since 5.86.
  Use KPluginMetaData::findPlugins instead [-Wdeprecated-declarations]
2022-01-11 22:43:59 +00:00
Jan Grulich
96eb21da35 PipeWire fb: process cursor metadata even for empty buffer
It is possible to have zero data in the buffer, but have the
buffer to carry metadata about the mouse cursor. In that case
we should try to process the cursor metadata before we discard
the buffer for not having any data.
2022-01-05 11:39:29 +01:00
Heiko Becker
cf5f045cab GIT_SILENT Update Appstream for new release
(cherry picked from commit 1d5bf08467)
2022-01-03 22:55:25 +01:00
l10n daemon script
dce8e6dc85 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-01-02 01:56:58 +00:00
l10n daemon script
1e5ff7f93a SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2021-12-31 01:40:11 +00:00
Nicolas Fella
6bec921ec0 Remove dead CMake code 2021-12-29 01:44:42 +01:00
Alexey Minnekhanov
b13a8e9613 fix build warning in VirtualMonitorRfbServer
mark VirtualMonitorRfbServer:newClient() as oveeride

fixes warning:
krfb/main-virtualmonitor.cpp:67:23: warning:
 ‘virtual PendingRfbClient* VirtualMonitorRfbServer::newClient(rfbClientPtr)’
 can be marked override [-Wsuggest-override]
   67 |     PendingRfbClient *newClient(rfbClientPtr client) {
      |                       ^~~~~~~~~
2021-12-24 02:00:50 +03:00
Albert Astals Cid
8a1261191f GIT_SILENT Update Appstream for new release
(cherry picked from commit 39b068b143)
2021-12-09 17:31:10 +01:00
l10n daemon script
dddb12708d SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2021-11-26 01:25:48 +00:00
l10n daemon script
384cfdcbed SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2021-11-25 01:30:05 +00:00
l10n daemon script
9b26c11c2f GIT_SILENT made messages (after extraction) 2021-11-21 00:27:53 +00:00
Heiko Becker
2c6cb1e6f5 Merge remote-tracking branch 'origin/release/21.12' 2021-11-17 09:19:01 +01:00
Heiko Becker
6794b9d9fb Fix clean parallel build
The newly introduced krfb-virtualmonitor also needs
ui_connectionwidget.h (via rfbclient -> connectiondialog) and fails
with "krfb/connectiondialog.h:25:10: fatal error: ui_connectionwidget.h:
No such file or directory #include "ui_connectionwidget.h" when doing
a clean build with a high enough number of jobs.
Fix it by introducing a krfb_UI_SRCS variable, which is used by both
executable targets.
2021-11-16 22:25:56 +01:00
l10n daemon script
cf2d198c1f SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2021-11-14 02:27:52 +00:00
l10n daemon script
a0fd0c3a31 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2021-11-14 01:28:24 +00:00
l10n daemon script
6a01a98c9f SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2021-11-13 01:25:23 +00:00
l10n daemon script
7285574c74 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2021-11-12 02:30:26 +00:00
l10n daemon script
899bc892c3 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2021-11-10 02:23:29 +00:00
l10n daemon script
30455f6308 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2021-11-09 01:21:09 +00:00
Heiko Becker
cbafc2fdad GIT_SILENT Upgrade release service version to 22.03.70. 2021-11-08 20:54:20 +01:00
Heiko Becker
4815017e04 GIT_SILENT Upgrade release service version to 21.11.80. 2021-11-08 20:22:43 +01:00
l10n daemon script
ba8a97b7c8 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2021-11-07 01:13:33 +00:00
l10n daemon script
f7b690ea7d SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2021-11-04 01:17:08 +00:00
Aleix Pol
1d23966d79 pipewire: Support SPA_META_VideoDamage
Inform about the regions that changed so everything doesn't need to be
sent on every frame.
2021-11-03 14:28:54 +00:00
Aleix Pol
61d464676c pipewire: Support cursors 2021-11-03 14:28:54 +00:00
Aleix Pol
775d3c7a97 Let the framebuffer provide the cursor position
In the piperwire case, we get it through pipewire, not QCursor. Still
default to QCursor for xcb and qt backends.
2021-11-03 14:28:54 +00:00
l10n daemon script
18f98326d4 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2021-11-02 01:13:56 +00:00
l10n daemon script
0b65306f15 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2021-11-01 01:17:59 +00:00
Heiko Becker
4a2c13135d GIT_SILENT Update Appstream for new release
(cherry picked from commit 874c804ab8)
2021-10-31 11:32:38 +01:00
l10n daemon script
5860226875 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2021-10-31 01:13:15 +00:00
Yuri Chornoivan
f30d0b65e3 Fix minor typo 2021-10-30 19:16:40 +03:00
Aleix Pol
4707bde236 Introduce krfb-virtualmonitor
It implements a KWin protocol that is oriented towards serving a virtual
display specifically.
It requests KWin a stream that will act as a monitor that we can feed
into remote clients.
2021-10-29 14:05:34 +00:00
Aleix Pol
608762c7ac Allow passing plugin backends some arguments
WId is irrelevant on Wayland and it doesn't fully describe everything we
might be doing, we can pass a variant map to make sure all necessary
information is provided.
2021-10-29 14:05:34 +00:00
Laurent Montel
be01a1e42b GIT_SILENT: add missing override 2021-10-27 06:46:58 +02:00
Aleix Pol
00c3d1c2ed Add missing includes 2021-10-14 15:46:24 +02:00
Aleix Pol
a90970900a Fix API deprecation warning 2021-10-14 13:41:16 +00:00
Aleix Pol
d1e7614716 Also set the IPv6 port when setting the port
Otherwise we only use the requested port for IPv4 and IPv6 remains the
default.
2021-10-14 13:41:16 +00:00
Aleix Pol
2127fc927d Enable rfb logging together with the debug category of the app
So that if a user enables debug (it needs to be done explicitly as we
default to Info), they also get the underlying logs.
2021-10-14 13:41:16 +00:00
Aleix Pol
9d5d45c7af PendingRfbClient: Include its own QSocketNotifier
Instead of keeping it in its only subclass PendingInvitationsRfbClient.
The notifier is necessary for pending clients overall and entirely
unrelated to the task of PendingInvitationsRfbClient.
2021-10-14 13:41:16 +00:00
Aleix Pol
b4eccc2134 pipewire: Use C99
Reduces the amount of warnings we get
2021-10-14 13:41:16 +00:00
l10n daemon script
97cbf48059 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2021-10-12 01:17:15 +00:00
l10n daemon script
c8207581f4 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2021-10-11 01:18:41 +00:00
Nicolas Fella
4727061d74 Add Linux and FreeBSD CI 2021-10-07 13:22:55 +02:00
Heiko Becker
3bf587a097 GIT_SILENT Update Appstream for new release
(cherry picked from commit 13316b761d)
2021-10-05 00:29:55 +02:00
Laurent Montel
26c468009f GIT_SILENT: remove .arcconfig 2021-10-02 09:51:38 +02:00
Laurent Montel
fb909eadf4 Add .kde-ci.yml 2021-09-30 13:31:20 +02:00
l10n daemon script
f72674db18 GIT_SILENT made messages (after extraction) 2021-09-10 00:17:48 +00:00
Laurent Montel
df9e6d62d2 use nullptr 2021-08-31 08:46:39 +02:00
Laurent Montel
b55de9645e Use std::chrono_literals 2021-08-31 08:46:39 +02:00
Laurent Montel
a9241dfe88 We can use std::as_const 2021-08-31 08:46:39 +02:00
Laurent Montel
23c0218f3d GIT_SILENT: time to increase version 2021-08-31 08:46:39 +02:00
Heiko Becker
4a524c6f0a GIT_SILENT Update Appstream for new release
(cherry picked from commit 99ef2060a8)
2021-08-27 23:13:18 +02:00
Heiko Becker
cb86f9c018 GIT_SILENT Update Appstream for new release
(cherry picked from commit 08bac276d3)
2021-08-05 00:06:47 +02:00
l10n daemon script
0eaf1bc550 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2021-07-19 01:15:25 +00:00
l10n daemon script
cb7164d755 GIT_SILENT made messages (after extraction) 2021-07-19 00:17:20 +00:00
Albert Astals Cid
75bff9d5f9 GIT_SILENT Upgrade release service version to 21.11.70. 2021-07-10 20:21:28 +02:00
Laurent Montel
c729e9e048 Modernize code 2021-07-09 08:53:14 +02:00
Laurent Montel
45548e020a Add missing override + add nullptr 2021-07-09 08:53:14 +02:00
Laurent Montel
dc64af6f5e Remove code for old qt version 2021-07-09 08:53:14 +02:00
Laurent Montel
2af26baf56 GIT_SILENT: time to increase version 2021-07-09 08:53:14 +02:00
Laurent Montel
e07f2c1f11 GIT_SILENT: ignore file 2021-07-09 08:53:14 +02:00
Laurent Montel
e5e2b293e8 GIT_SILENT: add support for cmake preset support 2021-07-09 08:53:14 +02:00
Heiko Becker
6cb2b22bf6 GIT_SILENT Update Appstream for new release
(cherry picked from commit 464d1a60a1)
2021-07-05 21:21:15 +02:00
Friedrich W. H. Kossebau
0316c376f2 Port away from deprecated KDNSSD CamelCase include prefixes
GIT_SILENT
2021-06-21 15:37:01 +02:00
Aleix Pol
b8f972d59e Fix crash when the destination stride != source stride
When we allocate the locally mapped texture size, use the announced
stride (aka bytes per line) instead of the texture width. Otherwise we
might overflow and crash eventually.

BUG: 438815
2021-06-17 21:03:56 +02:00
l10n daemon script
073cec3dc3 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2021-06-16 01:23:07 +00:00
l10n daemon script
58088b6ca0 GIT_SILENT made messages (after extraction) 2021-06-16 00:18:37 +00:00
Heiko Becker
a4cc0e8e7b GIT_SILENT Update Appstream for new release
(cherry picked from commit d04a36023a)
2021-06-05 23:20:56 +02:00
Ömer Fadıl Usta
3a1a5ad7a2 Add missing check for HAVE_DMA_BUF 2021-06-03 09:15:48 +00:00
Ömer Fadıl Usta
8e667abe69 Fix typo on epoxy variablename revert ifdef back to if 2021-06-03 09:05:48 +00:00
Ömer Fadıl Usta
2e82546012 Fix cmakedefine parts and increase cmake version 2021-06-03 07:30:29 +00:00
Ömer Fadıl Usta
6f342f45ae fix HAVE_DMA_BUF definition 2021-06-03 00:45:07 +00:00
Jan Grulich
acc70e4cee PipeWire support improvements 2021-06-02 12:25:00 +00:00
Alexander Lohnau
4d84d14070 Clean up ServiceType property usage for JSON based plugins
Task: https://phabricator.kde.org/T14483
2021-05-22 14:17:40 +00:00
Alexander Lohnau
adc8b8069c Remove obsolete desktop file
These files already have a JSON equivalent in the source dir.
2021-05-22 14:17:40 +00:00
Alexander Lohnau
218f0e20f6 Use separate install dir for different plugins
The service types are deprecated and not needed anymore when using the
JSON metadata. Instead install the different plugin types into dedicated
dirs, this way there is not additional filtering needed.
2021-05-22 14:17:40 +00:00
Jan Grulich
4f2861415a Revert "Improve PipeWire code"
This reverts commit eb1dc503bd.

Revert "Add dma-buf defines to build dma-buf support everywhere"

This reverts commit 8f0de62401.

Revert "Drop support for PipeWire 0.2"

This reverts commit 028ac099ea.

These were accidentally pushed without review. They were meant
to be pushed to my fork instead.
2021-05-21 14:12:23 +02:00
Jan Grulich
eb1dc503bd Improve PipeWire code
- add support for VideoCrop metadata
- add support for memptr buffer type
2021-05-21 14:09:10 +02:00
Jan Grulich
8f0de62401 Add dma-buf defines to build dma-buf support everywhere 2021-05-21 09:31:51 +02:00
Jan Grulich
028ac099ea Drop support for PipeWire 0.2 2021-05-21 09:22:45 +02:00
l10n daemon script
5e18689b8e GIT_SILENT made messages (after extraction) 2021-05-10 00:20:04 +00:00
Heiko Becker
68866dc4fa GIT_SILENT Update Appstream for new release
(cherry picked from commit 4a36c727c2)
2021-05-07 20:36:21 +02:00
l10n daemon script
15f5654e5b SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2021-04-25 01:20:50 +00:00
l10n daemon script
76e36c0761 GIT_SILENT made messages (after extraction) 2021-04-25 00:18:35 +00:00
Heiko Becker
0afcfc82b9 GIT_SILENT Update Appstream for new release
(cherry picked from commit 5959b4690d)
2021-04-14 17:25:03 +02:00
Albert Astals Cid
730e4d74a8 GIT_SILENT Upgrade release service version to 21.07.70. 2021-03-13 22:21:04 +01:00
l10n daemon script
d533b76f9b SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2021-03-13 06:42:19 +01:00
l10n daemon script
34a0e0c361 GIT_SILENT made messages (after extraction) 2021-03-13 02:36:42 +01:00
Albert Astals Cid
e1fdba3014 Merge remote-tracking branch 'origin/release/20.12' 2021-03-13 00:56:36 +01:00
Heiko Becker
73500f837e GIT_SILENT Update Appstream for new release
(cherry picked from commit f9a062ffa9)
2021-02-25 00:41:46 +01:00
Heiko Becker
f9a062ffa9 GIT_SILENT Update Appstream for new release 2021-02-25 00:29:46 +01:00
Heiko Becker
a4177eac39 GIT_SILENT Upgrade release service version to 20.12.3. 2021-02-25 00:05:58 +01:00
Laurent Montel
15068b250c We depend against kf5.68 => depend against qt 5.12 2021-02-08 07:06:20 +01:00
Laurent Montel
326d58a439 GIT_SILENT: don't use deprecated cmake variable 2021-02-08 07:05:59 +01:00
Heiko Becker
1a7f3a8517 GIT_SILENT Update Appstream for new release 2021-01-29 21:24:50 +01:00
Heiko Becker
3625b0cee3 GIT_SILENT Update Appstream for new release
(cherry picked from commit 1a7f3a8517)
2021-01-29 21:24:50 +01:00
Heiko Becker
7ef0dce382 GIT_SILENT Upgrade release service version to 20.12.2. 2021-01-29 20:48:53 +01:00
l10n daemon script
72270006ca SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2021-01-24 11:14:42 +01:00
l10n daemon script
938f98cef5 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2021-01-24 06:57:01 +01:00
Aleix Pol
93eb2d78d4 Merge branch 'release/20.12' 2021-01-22 02:00:03 +01:00
Aleix Pol
f041cdf095 pipewire: Support BGRA
It's not supported by QImage, so we need to do it ourselves by swapping
the B and the R.
2021-01-22 00:58:34 +00:00
l10n daemon script
e1e359fa7b SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2021-01-18 11:54:54 +01:00
l10n daemon script
50b72f26a8 GIT_SILENT made messages (after extraction) 2021-01-18 09:20:26 +01:00
l10n daemon script
2c184a22bf SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2021-01-18 07:08:20 +01:00
l10n daemon script
bb35068a1d GIT_SILENT made messages (after extraction) 2021-01-18 02:43:31 +01:00
Christoph Feck
706d4853b2 GIT_SILENT Update Appstream for new release 2021-01-02 15:22:45 +01:00
Christoph Feck
f03b829814 GIT_SILENT Update Appstream for new release
(cherry picked from commit 706d4853b2)
2021-01-02 15:22:45 +01:00
Christoph Feck
4335f83dab GIT_SILENT Upgrade release service version to 20.12.1. 2021-01-02 14:23:25 +01:00
l10n daemon script
08d967af66 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-12-18 10:01:32 +01:00
l10n daemon script
f0c1bc787e GIT_SILENT made messages (after extraction) 2020-12-18 08:30:35 +01:00
l10n daemon script
230040c5a9 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-12-07 09:53:53 +01:00
l10n daemon script
dad7f0184b GIT_SILENT made messages (after extraction) 2020-12-07 08:20:11 +01:00
l10n daemon script
74070d3baa SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-12-07 06:12:37 +01:00
l10n daemon script
cceab8c12a GIT_SILENT made messages (after extraction) 2020-12-07 02:28:32 +01:00
Christoph Feck
b5a328b905 GIT_SILENT Update Appstream for new release 2020-12-02 23:35:55 +01:00
Christoph Feck
513b717fac GIT_SILENT Update Appstream for new release
(cherry picked from commit b5a328b905)
2020-12-02 23:35:55 +01:00
Christoph Feck
a5f3009530 GIT_SILENT Upgrade release service version to 20.12.0. 2020-12-02 22:53:12 +01:00
Christoph Feck
2b1f48b92a GIT_SILENT Upgrade release service version to 20.11.90. 2020-11-25 02:29:59 +01:00
l10n daemon script
617f237d4e SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-11-18 10:23:39 +01:00
l10n daemon script
dcc1bb2de5 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-11-18 06:35:41 +01:00
l10n daemon script
14aa98ccca SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-11-12 06:23:56 +01:00
l10n daemon script
717607b1c6 GIT_SILENT made messages (after extraction) 2020-11-12 02:27:33 +01:00
l10n daemon script
4e0aa9c78b SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-11-11 10:36:42 +01:00
Albert Astals Cid
e34043d514 GIT_SILENT Upgrade release service version to 21.03.70. 2020-11-08 18:56:33 +01:00
Albert Astals Cid
8010c34bf1 GIT_SILENT Upgrade release service version to 20.11.80. 2020-11-08 18:09:43 +01:00
l10n daemon script
5610c0a292 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-11-01 06:35:22 +01:00
l10n daemon script
280c852a4e GIT_SILENT made messages (after extraction) 2020-11-01 02:26:28 +01:00
Christoph Feck
6518c17362 GIT_SILENT Update Appstream for new release
(cherry picked from commit 4b3caa10f2)
2020-10-31 18:29:34 +01:00
l10n daemon script
fcad3620db GIT_SILENT made messages (after extraction) 2020-10-31 02:21:18 +01:00
Tobias Junghans
de7050d8b7 pipewire: fix version check 2020-10-23 14:59:08 +02:00
Tobias Junghans
60c5d93f20 Zero-initialize sockaddr structure 2020-10-23 11:02:20 +02:00
Tobias Junghans
3a83ce6279 Use C++11 loops 2020-10-23 10:55:37 +02:00
Tobias Junghans
a109e3d6c9 Use auto keyword where possible 2020-10-23 10:54:59 +02:00
Tobias Junghans
4993e65d59 Include C headers in C++ style 2020-10-23 10:52:23 +02:00
Tobias Junghans
d91bbdcb05 Use QStringLiteral to avoid runtime allocations 2020-10-23 10:51:02 +02:00
Tobias Junghans
1d429a9bc6 Add missing member variable initializations 2020-10-23 10:49:57 +02:00
Tobias Junghans
2b9cb5c58c pipewire: remove QX11Info include
The plugin neither uses QX11Info nor links against Qt5::X11Extras.
2020-10-22 08:48:17 +00:00
l10n daemon script
6d9226c8d9 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-10-09 06:34:49 +02:00
l10n daemon script
f67f629899 GIT_SILENT made messages (after extraction) 2020-10-09 02:23:09 +02:00
Alexey Min
0e3733c327 Merge branch 'release/20.08' 2020-10-05 08:28:17 +03:00
Alexey Min
fd362fd642 Make sure to save security settings each time they are modified
Settings that are modified using normal settings window, which is
invoked using menu "Configure Desktop Sharing..." are always saved
correctly.

However some settings that are present on Krfb main window
(normal password, unattended password, checkbox "enable unattended
access") are not handled by KConfigDialog and there is a chance that
settings might not be saved correctly (for example if application
was suddenly terminated).

This hopefully fixes some bugs which are present since year 2011-2014
and have 110 votes, like https://bugs.kde.org/show_bug.cgi?id=340411,
maybe something else.

BUG: 340411
FIXED-IN: 20.08.2
CHANGELOG: Make sure to save passwords each time they are modified
2020-10-05 08:07:12 +03:00
l10n daemon script
b14b7cc3a8 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-10-05 06:11:39 +02:00
l10n daemon script
b71652061a GIT_SILENT made messages (after extraction) 2020-10-05 02:22:34 +02:00
Christoph Feck
9d02f073bd GIT_SILENT Update Appstream for new release 2020-10-03 14:42:55 +02:00
Christoph Feck
05f36df893 GIT_SILENT Update Appstream for new release
(cherry picked from commit 9d02f073bd)
2020-10-03 14:42:55 +02:00
Christoph Feck
251d8f2e0e GIT_SILENT Upgrade release service version to 20.08.2. 2020-10-03 12:55:34 +02:00
l10n daemon script
5aa1acd96b GIT_SILENT made messages (after extraction) 2020-10-01 02:21:47 +02:00
l10n daemon script
da2f51de6a SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-09-21 06:01:29 +02:00
l10n daemon script
47fbb3f316 GIT_SILENT made messages (after extraction) 2020-09-21 02:27:23 +02:00
Ömer Fadıl Usta
7ba81f52df Remove doubled parts and fix compile for systems without pipewire
SPA_DATA_DmaBuf checking was written twice which needs on pipewire
2020-09-19 11:02:41 +03:00
Aleix Pol
b9efda5956 Merge branch 'release/20.08' into master 2020-09-19 00:31:35 +02:00
Aleix Pol
f83d5102b6 Merge branch 'release/20.08' into master 2020-09-18 22:03:29 +02:00
Aleix Pol
8afd5c8df2 pipewire: Only aspire to use dmabuf if linux/dma-buf.h is present 2020-09-18 18:16:42 +02:00
Ömer Fadıl Usta
ef6b3a6093 Fixes for builds without pipewire3
Because of some parts still available without PW_CHECK_VERSION check
the systems without pipewire3 couldnt able to compile code.
2020-09-18 16:58:08 +02:00
l10n daemon script
9e1680d122 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-09-18 06:17:06 +02:00
l10n daemon script
f3587b224f GIT_SILENT made messages (after extraction) 2020-09-18 02:23:05 +02:00
l10n daemon script
d4175c0f22 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-09-17 06:16:06 +02:00
l10n daemon script
481972a129 GIT_SILENT made messages (after extraction) 2020-09-17 02:23:18 +02:00
l10n daemon script
e432a4ee7c SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-09-16 06:33:12 +02:00
l10n daemon script
f5768411e6 GIT_SILENT made messages (after extraction) 2020-09-16 02:28:03 +02:00
Aleix Pol
c5d6abab58 Port pipewire to use QLoggingCategory 2020-09-16 00:38:03 +02:00
Aleix Pol
c5e157fa82 Support DMABuf streams 2020-09-15 16:15:41 +02:00
Aleix Pol
3e00ff22f9 Support DMABuf streams 2020-09-15 16:14:06 +02:00
l10n daemon script
068ce93465 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-09-15 06:07:29 +02:00
l10n daemon script
9bb6fd224b GIT_SILENT made messages (after extraction) 2020-09-15 02:21:31 +02:00
Stefan Brüns
024ce87b3a Compensate for global scale factor when using xcb fb plugin
The screen geometry is reported in device independent pixels, so it has
to be multiplied by the devicePixelRatio to get the size of the underlying
framebuffer. Otherwise, only the top left of the screen will be captured.

This matches the behavior of QScreen::grabWindow(...), which also
returns a QPixmap of the given size scaled by devicePixelRatio.

BUG: 419814
2020-09-15 03:03:47 +03:00
Thiago Sueto
97951fc296 Improve GenericName and Appstream Summary
Change GenericName in the .desktop file and Summary in the
.xml file to be more descriptive and to be parallel with
KRDC's description, so both are shown to provide a complete
solution for VPN.

Reviewed-on: https://invent.kde.org/network/krfb/-/merge_requests/1
2020-09-14 19:47:45 +03:00
Christoph Feck
52fded8831 GIT_SILENT Update Appstream for new release
(cherry picked from commit 740f5c1449)
2020-08-31 21:23:24 +02:00
Christoph Feck
740f5c1449 GIT_SILENT Update Appstream for new release 2020-08-31 21:23:23 +02:00
Christoph Feck
1e9a91e83e GIT_SILENT Upgrade release service version to 20.08.1. 2020-08-31 20:41:17 +02:00
Stefan Brüns
933169b4c0 Compensate for global scale factor when using xcb fb plugin
The screen geometry is reported in device independent pixels, so it has
to be multiplied by the devicePixelRatio to get the size of the underlying
framebuffer. Otherwise, only the top left of the screen will be captured.

This matches the behavior of QScreen::grabWindow(...), which also
returns a QPixmap of the given size scaled by devicePixelRatio.

BUG: 419814
2020-08-28 04:08:15 +02:00
Pino Toscano
6f58476dbe Merge remote-tracking branch 'origin/release/20.08' into master 2020-08-25 07:52:11 +02:00
Pino Toscano
f839da9ba2 typo fix in debug message
GIT_SILENT
2020-08-25 07:51:01 +02:00
Stefan Brüns
76c2f08c9e Declare and use logging categories
Adds the following logging categories:
- krfb.krfb (KRFB application)
- krfb.framebuffer.qt (Qt Framebuffer plugin)
- krfb.framebuffer.xcb (XCB Framebuffer plugin)
2020-08-13 20:17:39 +02:00
Stefan Brüns
b135370c5c Replace KLineEdit with QLineEdit
The password field uses none of the KLineEdit features like completion,
so QLineEdit suffices.
2020-08-13 10:32:20 +00:00
Stefan Brüns
b5adcd23c6 Remove last remnant of telepathy support
Telepathy was removed in commit 6d5e2bc356
(¨Remove telepathy tubes and contact list support.¨)
2020-08-12 17:55:01 +02:00
Christoph Feck
13f5de2518 GIT_SILENT Update Appstream for new release 2020-08-05 10:17:31 +02:00
Christoph Feck
cb83a9d539 GIT_SILENT Update Appstream for new release
(cherry picked from commit 13f5de2518)
2020-08-05 10:17:31 +02:00
Christoph Feck
c4f012a919 GIT_SILENT Upgrade release service version to 20.08.0. 2020-08-05 09:25:49 +02:00
Christoph Feck
04c3f3e01e GIT_SILENT Upgrade release service version to 20.07.90. 2020-07-31 23:29:32 +02:00
l10n daemon script
0cdc848844 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-07-26 09:02:55 +02:00
l10n daemon script
e2daae290b GIT_SILENT made messages (after extraction) 2020-07-26 07:51:11 +02:00
l10n daemon script
c73c58b55d SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-07-26 05:44:08 +02:00
l10n daemon script
d983ed6869 GIT_SILENT made messages (after extraction) 2020-07-26 02:14:31 +02:00
l10n daemon script
b948d90c84 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-07-25 08:50:58 +02:00
l10n daemon script
287919dbe2 GIT_SILENT made messages (after extraction) 2020-07-25 07:38:44 +02:00
l10n daemon script
b561ec1415 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-07-25 05:31:46 +02:00
l10n daemon script
04d050a685 GIT_SILENT made messages (after extraction) 2020-07-25 02:15:15 +02:00
l10n daemon script
4f3e2f8bd9 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-07-24 09:37:32 +02:00
l10n daemon script
f284736978 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-07-24 05:49:48 +02:00
Albert Astals Cid
bdb4e9efbf GIT_SILENT Upgrade release service version to 20.11.70. 2020-07-11 12:40:23 +02:00
Albert Astals Cid
425783b825 GIT_SILENT Upgrade release service version to 20.07.80. 2020-07-11 12:08:07 +02:00
Albert Astals Cid
3cc2af7e18 KRandom -> QRandomGenerator
KRandom is now deprecated
2020-07-04 12:19:27 +02:00
Christoph Feck
49add727b0 GIT_SILENT Update Appstream for new release
(cherry picked from commit feafe98e1f)
2020-07-03 23:24:03 +02:00
l10n daemon script
10923d2e01 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-06-18 05:39:49 +02:00
l10n daemon script
ebbedab547 GIT_SILENT made messages (after extraction) 2020-06-18 02:19:22 +02:00
l10n daemon script
e824ea5534 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-06-17 14:07:28 +02:00
l10n daemon script
3462004357 GIT_SILENT made messages (after extraction) 2020-06-17 11:32:44 +02:00
l10n daemon script
d57a7e5aef SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-06-13 05:30:03 +02:00
Christoph Feck
60f8a418cd GIT_SILENT Update Appstream for new release
(cherry picked from commit b65b7ff2fd)
2020-06-08 20:05:22 +02:00
Yuri Chornoivan
ed56b1b8f7 GIT_SILENT: add KRFB icon as repository logo 2020-05-21 16:20:29 +03:00
Christoph Feck
3f0f6e9efb GIT_SILENT Update Appstream for new release
(cherry picked from commit fc7c86a74b)
2020-05-11 23:30:00 +02:00
Christoph Feck
3e2a8b0ce2 GIT_SILENT Update Appstream for new release
(cherry picked from commit 8ed10f0d2a)
2020-04-15 11:22:14 +02:00
l10n daemon script
f178121c54 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-03-27 06:34:06 +01:00
l10n daemon script
3f5dabf76b GIT_SILENT made messages (after extraction) 2020-03-27 03:37:10 +01:00
Albert Astals Cid
bb403a310f GIT_SILENT Upgrade release service version to 20.07.70. 2020-03-15 19:45:54 +01:00
l10n daemon script
f32dde2af7 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-03-02 05:47:18 +01:00
Pino Toscano
4e6062e9af Merge remote-tracking branch 'origin/release/19.12' 2020-03-01 13:52:38 +01:00
Pino Toscano
8ea2ca9afb appdata: remove duplicate <releases>
fix my merge from release/19.12
2020-03-01 13:52:30 +01:00
Christoph Feck
081d1222b6 GIT_SILENT Update Appstream for new release 2020-03-01 10:49:41 +01:00
Pino Toscano
55d749ce9a Merge remote-tracking branch 'origin/release/19.12' 2020-03-01 09:55:22 +01:00
Pino Toscano
07b48fe44f unbreak appdata
fixes commit 024f02a70f
2020-03-01 09:54:18 +01:00
Christoph Feck
1da8e3c84a GIT_SILENT Upgrade KDE Applications version to 19.12.3. 2020-02-29 23:30:44 +01:00
Jan Grulich
92c9905f36 PW framebuffer: support upcoming PipeWire 0.3
Summary: Adds support for slightly different PipeWire API.

Test Plan: Tested with xdg-desktop-portal-kde and new pipewire.

Reviewers: Kanedias

Reviewed By: Kanedias

Differential Revision: https://phabricator.kde.org/D27287
2020-02-26 14:22:27 +01:00
Jan Grulich
a62ef07e9d PW framebuffer: send correct type over DBus 2020-02-10 14:23:29 +01:00
l10n daemon script
a20cc6963a GIT_SILENT made messages (after extraction) 2020-02-05 03:20:28 +01:00
Jonathan Riddell
024f02a70f GIT_SILENT manually merge release versions from release/19.12 branch, in future this will be cherry picked along with the branch commit 2020-02-04 18:15:49 +00:00
Christoph Feck
f473c88aff GIT_SILENT Update Appstream for new release 2020-02-04 00:29:19 +01:00
Christoph Feck
4acb23aa5e GIT_SILENT Upgrade KDE Applications version to 19.12.2. 2020-02-02 15:06:53 +01:00
l10n daemon script
f162574aba SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-01-19 09:14:45 +01:00
Christoph Feck
5f53df2e76 Update Appstream for new release 2020-01-06 15:07:36 +01:00
l10n daemon script
ba87204070 GIT_SILENT made messages (after extraction) 2020-01-06 08:37:19 +01:00
l10n daemon script
8df008137a GIT_SILENT made messages (after extraction) 2020-01-06 03:27:18 +01:00
Albert Astals Cid
9b422f1338 Fix uninitialized memory read when calling rfbEncryptBytes
rfbEncryptBytes calls strlen on passwd so we need to make sure there's
an empty null character at the end if the password is of MAXPWLEN size
2020-01-05 20:09:17 +01:00
Albert Astals Cid
92b6f2fe68 Merge remote-tracking branch 'origin/release/19.12' 2020-01-05 19:15:19 +01:00
Albert Astals Cid
bb59ce2776 Correctly populate max color values in server screen format
Summary:
Compute max color values from color masks, instead of relying on unreliable `bits_per_rgb_value` provided by `xcb_visualtype_t`.

In some cases (e.g. nvidia?) `bits_per_rgb_value` contains wrong value. This results in wrong max color values, and causes weird color translation inside libvncserver. Clients will see a screen which is sorta recognizable but in a complete off-color, making krfb unusable.

This is probably a bug in drivers, but x11vnc does not use this value[1], so I guess it's fair to ignore it in krfb too.

[1]: https://github.com/LibVNC/x11vnc/blob/master/src/screen.c#L3442

Reviewers: alexeymin, aacid, #kde_applications

Differential Revision: https://phabricator.kde.org/D25876
2020-01-05 19:14:24 +01:00
Christoph Feck
6c78a2f98d GIT_SILENT Upgrade KDE Applications version to 19.12.1. 2020-01-05 05:40:44 +01:00
Jonathan Riddell
8a7965fa6f Change KDE_APPLICATIONS_VERSION to RELEASE_SERVICE_VERSION https://phabricator.kde.org/T11933
GIT_SILENT
2019-12-10 16:39:41 +00:00
Christoph Feck
c136ef0681 Update Appstream for new release 2019-12-05 22:17:30 +01:00
Christoph Feck
afc1fb6b88 GIT_SILENT Upgrade KDE Applications version to 19.12.0. 2019-12-05 20:50:38 +01:00
Albert Astals Cid
e4362a655e GIT_SILENT Upgrade KDE Applications version to 19.11.90. 2019-11-26 23:34:51 +01:00
Yuri Chornoivan
e2ebae3b19 Use URLs with transport encryption 2019-11-18 20:50:04 +02:00
l10n daemon script
f3648d11a3 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-11-11 09:48:29 +01:00
l10n daemon script
e897ce9b49 GIT_SILENT made messages (after extraction) 2019-11-11 08:20:49 +01:00
Albert Astals Cid
8ff1f8fb21 GIT_SILENT Upgrade KDE Applications version to 19.11.80. 2019-11-10 12:01:22 +01:00
l10n daemon script
f139985c99 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-11-10 05:27:11 +01:00
l10n daemon script
45d4a9cad7 GIT_SILENT made messages (after extraction) 2019-11-10 03:11:48 +01:00
Albert Astals Cid
dd7f1af0bc GIT_SILENT Upgrade KDE Applications version to 20.03.70. 2019-11-10 01:22:53 +01:00
Jan Grulich
b8861cd229 Merge branch 'Applications/19.08' 2019-11-06 14:52:13 +01:00
Jan Grulich
80db244c7d Un-break portal support
Summary: We need to mention what wayland interfaces will be used, otherwise KWin will not let us to use them.

Reviewers: apol

Reviewed By: apol

Differential Revision: https://phabricator.kde.org/D25167
2019-11-06 14:51:19 +01:00
Christoph Feck
439bacb527 GIT_SILENT Upgrade KDE Applications version to 19.08.3. 2019-11-01 22:57:16 +01:00
Christoph Feck
28f2cca952 GIT_SILENT Upgrade KDE Applications version to 19.08.2. 2019-10-06 05:13:10 +02:00
l10n daemon script
f2b1e60106 GIT_SILENT made messages (after extraction) 2019-09-30 07:34:44 +02:00
l10n daemon script
08c8bd84b1 GIT_SILENT made messages (after extraction) 2019-09-30 02:59:39 +02:00
l10n daemon script
7a42bd3b65 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-09-05 09:09:34 +02:00
l10n daemon script
7190908aa3 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-09-05 05:19:48 +02:00
Christoph Feck
28fbf6c89c GIT_SILENT Upgrade KDE Applications version to 19.08.1. 2019-09-01 05:35:18 +02:00
l10n daemon script
853eeaa050 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-08-28 05:14:00 +02:00
l10n daemon script
8848a11ba4 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-08-27 08:48:52 +02:00
l10n daemon script
0234025013 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-08-24 05:08:24 +02:00
l10n daemon script
5498ce6390 GIT_SILENT made messages (after extraction) 2019-08-24 03:00:32 +02:00
l10n daemon script
46560f2f6a SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-08-20 08:26:33 +02:00
l10n daemon script
1c8afa165b SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-08-20 05:01:38 +02:00
l10n daemon script
4ffe2ce140 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-08-13 08:57:25 +02:00
l10n daemon script
e472644e10 GIT_SILENT made messages (after extraction) 2019-08-13 07:46:08 +02:00
l10n daemon script
1a23694b32 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-08-13 05:25:56 +02:00
l10n daemon script
210b1cfac9 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-08-12 08:33:44 +02:00
l10n daemon script
49c9dc2311 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-08-12 05:11:18 +02:00
Andreas Sturmlechner
1b5daefe54 Merge branch 'Applications/19.08' 2019-08-10 11:07:14 +02:00
Andreas Sturmlechner
62be4e43fd Add missing QHash
Summary:
Fixes build with future Frameworks.

In master, this should make 69c492a54b obsolete.

Reviewers: alexeymin, #kde_applications, lbeltrame

Reviewed By: alexeymin, #kde_applications, lbeltrame

Differential Revision: https://phabricator.kde.org/D23059
2019-08-10 11:05:10 +02:00
Luca Beltrame
1190610710 Merge branch 'Applications/19.08' 2019-08-09 15:58:57 +02:00
Luca Beltrame
69c492a54b Attempt to fix build
At least with Qt 5.13, it looks like the QHash include isn't being
included transitively.
2019-08-09 15:56:44 +02:00
Christoph Feck
06d711dd79 GIT_SILENT Upgrade KDE Applications version to 19.08.0. 2019-08-09 02:08:09 +02:00
l10n daemon script
f417d230d7 GIT_SILENT made messages (after extraction) 2019-08-08 02:57:01 +02:00
l10n daemon script
6b7a17a327 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-08-07 08:40:26 +02:00
l10n daemon script
13f6082465 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-08-07 05:06:46 +02:00
l10n daemon script
0c1aaa62c1 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-08-06 08:30:32 +02:00
l10n daemon script
826904c4ca SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-08-03 08:34:22 +02:00
l10n daemon script
eb1b74d90b SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-08-03 05:05:05 +02:00
l10n daemon script
fad81c061a SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-07-31 09:02:57 +02:00
l10n daemon script
a360e5c8ae SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-07-31 05:17:18 +02:00
Christoph Feck
9e9acb4833 GIT_SILENT Upgrade KDE Applications version to 19.07.90. 2019-07-29 15:53:33 +02:00
l10n daemon script
d22dca0833 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-07-27 08:45:59 +02:00
l10n daemon script
b0712e1874 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-07-27 05:15:30 +02:00
l10n daemon script
142a652b25 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-07-22 08:37:21 +02:00
l10n daemon script
87ad1774a2 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-07-22 05:10:18 +02:00
l10n daemon script
388aa12a96 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-07-21 08:49:31 +02:00
l10n daemon script
ed9fe37985 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-07-21 05:20:01 +02:00
l10n daemon script
bd9e576684 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-07-19 09:05:33 +02:00
l10n daemon script
bfeba242ea SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-07-19 05:37:59 +02:00
l10n daemon script
be4ec5fe7a SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-07-18 08:44:59 +02:00
l10n daemon script
8e51ddfb45 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-07-18 05:22:56 +02:00
l10n daemon script
445cb49e16 GIT_SILENT made messages (after extraction) 2019-07-16 07:43:35 +02:00
l10n daemon script
a4c4dd29a5 GIT_SILENT made messages (after extraction) 2019-07-16 02:53:03 +02:00
Albert Astals Cid
078a05e368 GIT_SILENT Upgrade KDE Applications version to 19.11.70. 2019-07-15 21:49:47 +02:00
Albert Astals Cid
f1ec721e47 GIT_SILENT Upgrade KDE Applications version to 19.07.80. 2019-07-15 21:27:52 +02:00
l10n daemon script
f8e02290a3 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-07-14 05:16:48 +02:00
l10n daemon script
0e5ac2d9aa SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-07-12 05:17:58 +02:00
Alexey Min
9828143609 New dep: KWindowSystem and support running in Wayland
This commit adds a new dependency - KWindowSystem, to help
with window system detection. If wayland is detected, then
preferred framebuffer plugin is switched to "pw" (pipewire).
2019-07-07 14:28:10 +03:00
Alexey Min
0cc47b9a06 Remove unneeded moc include 2019-07-07 14:10:52 +03:00
Alexey Min
656c90916c Fix unused variable warning 2019-07-07 14:06:46 +03:00
l10n daemon script
296f5db567 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-06-26 05:19:24 +02:00
Alexey Min
e15c5d634d Fix clazy: unused non-trivial variable
unused QByteArray [-Wclazy-unused-non-trivial-variable]

That variable was totally unused!
2019-06-20 23:21:40 +03:00
Alexey Min
22b017e0b0 Fix clazy: calling QByteArray::data() on temporary
Don't call QByteArray::data() on temporary [-Wclazy-detaching-temporary]

data() is not const and will detach, call constData() instead
2019-06-20 23:18:56 +03:00
Alexey Min
05b96c0bd0 clazy: Don't call QList::first() on temporary
Don't call QList::first() on temporary [-Wclazy-detaching-temporary]

There is a constFirst() for that, to prevent detaching
2019-06-20 23:06:57 +03:00
Alexey Min
fa7c32fbb9 Fix clazy warning about lambda context object
Pass a context object as 3rd connect parameter [-Wclazy-connect-3arg-lambda]
2019-06-20 23:00:34 +03:00
Alexey Min
acf4f7393e bzero() function is obsoleted by memset()
Another clang-tidy warning.
The bzero() function is deprecated (marked as
LEGACY in POSIX.1-2001); use memset(3) in new
programs. POSIX.1-2008 removes the specification
of bzero().
2019-06-20 00:58:29 +03:00
Alexey Min
43aeee4c3e Fix clang-tidy warn: call to virtual function during destruction 2019-06-20 00:42:00 +03:00
Alexey Min
aab2869883 Fix potential use of pointer after checking for nullptr
Code below continues to use the pointer after a check for
nullptr like nothing happened. Probably continue is missing
in a loop.

clang-tidy: Called C++ object pointer is null
  at eventsmanager.cpp:87
  at framebuffermanager.cpp:86
2019-06-20 00:23:37 +03:00
Alexey Min
306a094540 Fix unused parameter warning 2019-06-20 00:05:34 +03:00
Alexey Min
a774e678bb Remove unneeded .moc includes
[5/8] Automatic MOC for target krfb_events_x11
AutoMoc warning
---------------
  "~/dev/kde/krfb/events/x11/x11events.cpp"
The file includes the moc file "x11events.moc",
but does not contain a Q_OBJECT, Q_GADGET,
Q_NAMESPACE, K_PLUGIN_FACTORY,
K_PLUGIN_FACTORY_WITH_JSON or
K_PLUGIN_CLASS_WITH_JSON macro.

AutoMoc: ~/dev/kde/krfb/events/x11/x11events.cpp:0:
 Note: No relevant classes found. No output generated.
2019-06-19 23:50:45 +03:00
Alexey Min
718b0ac000 Show hostname in krfb connection info
Summary:
Using krfb as desktop support tool for ~250 desktops on LAN - 95% of the users aren't equipped to deal with reciting IP addresses accurately, so I wanted to add the hostname into the connection details as well, since it's easier for non-tech people to read that back.

Attached patch does this, and works internally for us - thoughts on doing it better:
* hostnames as reported by the host are not necessarily accurate for network access, so
* consider actually doing a nameserver lookup to verify
* only show the hostname if you can verify

Reviewers: ngraham, #kde_applications, aacid

Reviewed By: #kde_applications, aacid

Subscribers: akulichalexandr, aacid, pino, alexeymin

Tags: #kde_applications

Differential Revision: https://phabricator.kde.org/D14527
2019-06-19 23:09:26 +03:00
l10n daemon script
4230b2234b SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-06-12 05:33:49 +02:00
l10n daemon script
f5467f826c SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-06-03 05:29:38 +02:00
Jonathan Riddell
0a0a7f096a stick to one category 2019-05-31 20:16:44 +01:00
l10n daemon script
94ea33aaa4 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-05-31 05:09:53 +02:00
l10n daemon script
3f471e6fd1 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-05-28 05:19:21 +02:00
l10n daemon script
e018e1a7c5 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-05-27 05:13:28 +02:00
l10n daemon script
576cef1a12 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-05-26 05:18:37 +02:00
l10n daemon script
77f5ae8230 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-05-25 05:26:01 +02:00
Jan Grulich
c05707884c Implement Wayland support using PipeWire and xdg-desktop-portal
Summary:
Adds a new framebuffer implementation, which uses xdg-desktop-portal to support remote
desktop on Wayland and uses PipeWire to deliver the screen content. So far only mouse
support is implemented, because keyboard support is missing on KWin side.

Reviewers: Kanedias, romangg

Reviewed By: Kanedias

Subscribers: asturmlechner, pino, ngraham, romangg

Differential Revision: https://phabricator.kde.org/D20402
2019-05-24 13:51:43 +02:00
Alexey Min
7624aee8e2 Do not crash on wayland, gracefully exit with error instead
Summary:
Sadly, XTestQueryExtension just segfaults under wayland.
Avoid it by detecting QPA used.

BUG: 406599

Test Plan:
Nice error message when running in Wayland session.
{F6833467}

Still works in X11
{F6833069}

Reviewers: aacid, kossebau, jgrulich, #kde_applications, pino, ngraham

Reviewed By: pino

Subscribers: pino, ngraham

Tags: #kde_applications

Differential Revision: https://phabricator.kde.org/D21267
2019-05-18 18:07:52 +03:00
Alexey Min
6ecb4248b8 Fix warning when compiling with Qt >= 5.10 2019-05-18 02:05:16 +03:00
l10n daemon script
61cedda6b3 GIT_SILENT made messages (after extraction) 2019-04-22 03:24:42 +02:00
Albert Astals Cid
895ec578c6 GIT_SILENT Upgrade KDE Applications version to 19.07.70. 2019-03-16 22:21:36 +01:00
l10n daemon script
aa189daffd GIT_SILENT made messages (after extraction) 2019-03-05 03:26:27 +01:00
Friedrich W. H. Kossebau
9797ff196e Port away from foreach 2019-03-01 07:04:49 +01:00
Friedrich W. H. Kossebau
7519e7918c Add a dummy krfbui.rc to please kxmlgui 2019-03-01 06:54:30 +01:00
Friedrich W. H. Kossebau
6ef393ba1c Network config page: align to top 2019-03-01 06:42:49 +01:00
Friedrich W. H. Kossebau
c47ee269f0 Use QT_USE_QSTRINGBUILDER 2019-03-01 06:26:07 +01:00
Friedrich W. H. Kossebau
a0992f7fea Build with QT_NO_CAST_FROM_ASCII 2019-03-01 06:15:53 +01:00
Friedrich W. H. Kossebau
ef6491a5c9 Build with QT_NO_CAST_FROM_BYTEARRAY & QT_NO_CAST_TO_ASCII 2019-03-01 05:50:10 +01:00
Friedrich W. H. Kossebau
63d6314b1b Ensure more modern Qt code 2019-03-01 05:47:41 +01:00
Friedrich W. H. Kossebau
78ed74ec1e Move ecm_setup_version after all find_package calls 2019-03-01 05:35:23 +01:00
Friedrich W. H. Kossebau
1cf5785007 find_package(Qt5) only after find_package(ECM) 2019-03-01 05:34:51 +01:00
Friedrich W. H. Kossebau
0f506011d0 Use KF5_MIN_VERSION also for find_package(KF5) 2019-03-01 05:33:38 +01:00
Friedrich W. H. Kossebau
d5aff98912 Properly add "nodialog" option before running QCommandLineParser::process() 2019-03-01 05:31:12 +01:00
Friedrich W. H. Kossebau
d77506c4c2 Do not repeat work of KAboutData::setupCommandLine() 2019-03-01 05:24:43 +01:00
l10n daemon script
c3d0313280 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-02-15 05:38:37 +01:00
l10n daemon script
1fc7238699 GIT_SILENT made messages (after extraction) 2019-01-26 03:10:58 +01:00
l10n daemon script
e4a82e3a52 GIT_SILENT made messages (after extraction) 2019-01-20 03:05:27 +01:00
Friedrich W. H. Kossebau
c57e9bc5f4 Use more https in links 2019-01-19 15:58:29 +01:00
Friedrich W. H. Kossebau
2916395ea9 Remove Qt4 vars QT_DEFINITIONS & QT_QTDBUS_DEFINITIONS 2019-01-19 15:56:17 +01:00
Friedrich W. H. Kossebau
3c63cf9563 Remove unneeded explicit use of ECM_KDE_MODULE_DIR, part of ECM_MODULE_PATH 2019-01-19 15:55:57 +01:00
Alexey Min
554f2994cc Reverse the condition to display warning
Actually the condition should be the opposite, because the option says "Do NOT store..."
Display warning when it is checked.
2019-01-16 11:02:12 +03:00
Alexey Min
313b4bbc67 Expose option to disable KWallet passwords storage
Summary:
Option "noWallet" was already supported in the code,
but was not visible in the configuration UI. This
option is useful on headless servers where you don't
really have a way to enter password to unlock the wallet.

CHANGELOG: Add an option to store passwords without using KDE Wallet
BUG: 397271
FIXED-IN: 19.04.0

Test Plan: Enable option, restart krfb, ensure that passwords are now in ~/.config/krfbrc. Disable option, restart krfb, see that passwords are no longer in krfbrc.

Reviewers: #kde_applications, aacid

Differential Revision: https://phabricator.kde.org/D18075
2019-01-16 00:15:38 +03:00
l10n daemon script
ff5ae6a885 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-01-06 05:37:01 +01:00
l10n daemon script
f8dfbee9ed GIT_SILENT made messages (after extraction) 2019-01-05 03:19:36 +01:00
l10n daemon script
d6bc236426 GIT_SILENT made messages (after extraction) 2018-12-26 03:14:47 +01:00
l10n daemon script
015518cb9f GIT_SILENT made messages (after extraction) 2018-12-21 03:18:13 +01:00
l10n daemon script
b2fcfeb7f5 GIT_SILENT made messages (after extraction) 2018-12-17 03:10:07 +01:00
l10n daemon script
77c6c35d3e GIT_SILENT made messages (after extraction) 2018-12-03 03:22:52 +01:00
l10n daemon script
d7380a93a3 GIT_SILENT made messages (after extraction) 2018-11-29 03:17:15 +01:00
l10n daemon script
8df92c41c4 GIT_SILENT made messages (after extraction) 2018-11-21 03:19:29 +01:00
l10n daemon script
546a588c18 GIT_SILENT made messages (after extraction) 2018-11-18 03:56:59 +01:00
l10n daemon script
e4fed2991a GIT_SILENT made messages (after extraction) 2018-11-16 03:51:49 +01:00
l10n daemon script
349b99ab47 GIT_SILENT made messages (after extraction) 2018-11-14 03:59:56 +01:00
l10n daemon script
927016cd85 GIT_SILENT made messages (after extraction) 2018-11-13 04:04:03 +01:00
l10n daemon script
abd7bf04ae GIT_SILENT made messages (after extraction) 2018-11-12 03:57:49 +01:00
Albert Astals Cid
8d19229593 GIT_SILENT Upgrade KDE Applications version to 19.03.70. 2018-11-10 08:46:09 +01:00
Albert Astals Cid
c8e4869c8a GIT_SILENT Upgrade KDE Applications version to 18.03.70. 2018-11-09 23:44:14 +01:00
l10n daemon script
91c62af9bd GIT_SILENT made messages (after extraction) 2018-11-09 03:59:25 +01:00
Yuri Chornoivan
bb9bf0bfc7 Improve AppData file a bit 2018-11-07 22:22:02 +02:00
l10n daemon script
258e8bd22b SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-10-24 06:00:33 +02:00
Yuri Chornoivan
c5fc5fc68e Fix minor EBN issues and typos 2018-10-14 20:54:39 +03:00
l10n daemon script
54fd606e82 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-10-10 06:40:00 +02:00
l10n daemon script
9d44beac84 GIT_SILENT made messages (after extraction) 2018-10-10 04:10:36 +02:00
l10n daemon script
438bddcb27 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-10-05 05:55:56 +02:00
l10n daemon script
68dafe3f24 GIT_SILENT made messages (after extraction) 2018-07-29 03:36:33 +02:00
Friedrich W. H. Kossebau
d1273a8f56 Remove unused plugin metadata desktop files
Plugins had been converted to direct JSON metadata in
10176b9e01
2018-07-17 16:52:20 +02:00
Friedrich W. H. Kossebau
6373c44b8d Remove unneeded "Encoding" entry from plugin metadata 2018-07-17 16:49:37 +02:00
Friedrich W. H. Kossebau
6368bdf25b Remove module prefixes from Qt includes 2018-07-17 14:48:28 +02:00
Friedrich W. H. Kossebau
b72e478df0 Use more explicit 2018-07-17 14:45:09 +02:00
Friedrich W. H. Kossebau
b1df09d2bf Consistently use override 2018-07-17 14:40:23 +02:00
Friedrich W. H. Kossebau
da36f0a7fb Consistently use nullptr 2018-07-17 14:38:06 +02:00
Friedrich W. H. Kossebau
be70800a74 Actually use the set QT_MIN_VERSION 2018-07-17 14:30:06 +02:00
Friedrich W. H. Kossebau
798fc5c2e6 Remove unneeded moc includes 2018-07-17 14:27:20 +02:00
Friedrich W. H. Kossebau
26a70c411a Remove usage of dead QT_USE_FAST_CONCATENATION
Dropped pre-Qt5
2018-07-17 14:21:22 +02:00
Albert Astals Cid
0945680770 GIT_SILENT Upgrade KDE Applications version to 18.11.70. 2018-07-16 20:07:13 +02:00
l10n daemon script
39a99107ce SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-06-03 05:24:30 +02:00
Oleg Chernovskiy
fc3e3951a4 Fix IPv6 connectivity
Summary:
IPv6 is supported by LibVNCServer but for compatibility reasons its
socket is backed by another file descriptor.

This commit adds tracking IPv6 listen socket in the same way we now
track IPv4 one.

Test Plan: Tested by connecting through ::1 and fe80:: addresses

Reviewers: #plasma, #kde_applications, alexeymin

Reviewed By: alexeymin

Subscribers: ltoscano, alexeymin, apol, aacid

Differential Revision: https://phabricator.kde.org/D13209
2018-05-30 20:59:21 +03:00
l10n daemon script
6fc934b0ef SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-04-29 05:24:29 +02:00
l10n daemon script
788d64927d GIT_SILENT made messages (after extraction) 2018-04-19 03:34:43 +02:00
Albert Astals Cid
d0b0740066 GIT_SILENT Upgrade KDE Applications version to 18.07.70. 2018-03-19 23:57:11 +01:00
l10n daemon script
438fc15a64 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-03-11 05:23:56 +01:00
l10n daemon script
8167a114da SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-03-03 05:29:30 +01:00
l10n daemon script
736c598c43 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-01-29 05:04:43 +01:00
Laurent Montel
822b8c41b9 Remove obsolete reviewboardrc file 2018-01-05 13:55:37 +01:00
l10n daemon script
2fee3471f5 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-12-20 07:05:07 +01:00
l10n daemon script
4ff990b6ea GIT_SILENT made messages (after extraction) 2017-12-20 05:22:26 +01:00
l10n daemon script
9c65f423b5 GIT_SILENT made messages (after extraction) 2017-12-13 05:12:50 +01:00
l10n daemon script
bd26204f96 GIT_SILENT made messages (after extraction) 2017-12-09 03:01:49 +01:00
l10n daemon script
0b9f16cfc7 GIT_SILENT made messages (after extraction) 2017-11-23 02:59:37 +01:00
l10n daemon script
8397b41027 GIT_SILENT made messages (after extraction) 2017-11-20 03:02:38 +01:00
Albert Astals Cid
709c207af8 GIT_SILENT Upgrade KDE Applications version to 18.03.70. 2017-11-13 09:11:59 +01:00
Aleix Pol
2f34058010 Include a png of the icon for compatibility 2017-11-03 00:49:35 +01:00
Aleix Pol
9b2cbaec6f Include the icon in krfb together with the application 2017-11-03 00:39:40 +01:00
l10n daemon script
25a0e089ef GIT_SILENT made messages (after extraction) 2017-10-27 03:11:47 +02:00
l10n daemon script
004c84a849 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-10-12 04:56:47 +02:00
l10n daemon script
4473e12434 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-10-11 08:47:07 +02:00
Alexey Min
bcec53db13 Merge branch 'arcpatch-D7658' 2017-09-10 13:55:31 +05:00
Alexey Min
dab8b421eb Change version to match KDE Applications (17.11.70)
Summary:
Previously krfb had version set to 5.0. This is misleading.
Now, do the same as other standard KDE apps, like ark or dolphin: use
KDE_APPLICATIONS_VERSION_MAJOR, KDE_APPLICATIONS_VERSION_MINOR, etc.
This page: https://www.kde.org/applications/system/krfb has a link to report a bug: https://bugs.kde.org/enter_bug.cgi?format=guided&product=krfb
Versions in bugzilla have 17.xx.xx, so "About..." window should match.

cmake: Set version in project(); use ecm_setup_version() call

Inspired by commit in Ark: cffecfbfffd22bc0bbe451ed8d74f3b6da113c6f

Test Plan: Compile, run. Make sure that Help -> About Desktop Sharing displays the correct version.

Reviewers: aacid, ltoscano

Tags: #kde_applications

Differential Revision: https://phabricator.kde.org/D7658
2017-09-10 13:51:39 +05:00
l10n daemon script
69d278caa8 GIT_SILENT made messages (after extraction) 2017-09-05 03:04:44 +02:00
l10n daemon script
0ac20f797c SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-09-04 04:42:31 +02:00
l10n daemon script
a66fc2d2b8 GIT_SILENT made messages (after extraction) 2017-09-04 03:05:52 +02:00
l10n daemon script
011ac5633f SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-08-14 04:58:49 +02:00
l10n daemon script
90c332ddcf GIT_SILENT made messages (after extraction) 2017-08-10 03:28:32 +02:00
Alexey Min
52fb6655a1 Merge branch 'Applications/17.08' 2017-08-08 06:50:48 +05:00
Alexey Min
44ae70244d Add .arcconfig 2017-08-08 06:49:42 +05:00
Alexey Min
69aa649d9c Add settings page allowing user to change framebuffer plugin
Added a new page to config dialog: "Screen capture", allowing to choose a framebuffer plugin.
Added a brief description about xcb and qt plugins.
Changed an icon for first tab "Network" to more appropriate one.
Code is prepared to expect "x11" as preferredFramebufferPlugin and automatically change this setting to "xcb".
Do not hardcode possible list of framebuffer plugins in combobox, but instead find actual available plugins at runtime.
If preferred plugin has changed in settings, inform user that krfb needs to be restarted to apply changes.

Differential Revision: https://phabricator.kde.org/D6319
2017-08-08 05:34:56 +05:00
Luigi Toscano
1fb61059a7 Merge remote-tracking branch 'origin/Applications/17.04' 2017-07-15 15:28:38 +02:00
l10n daemon script
0689b72f38 GIT_SILENT made messages (after extraction) 2017-07-04 05:16:00 +02:00
l10n daemon script
4564c91b64 GIT_SILENT made messages (after extraction) 2017-07-04 03:06:55 +02:00
l10n daemon script
01ec550abf GIT_SILENT made messages (after extraction) 2017-07-01 03:13:36 +02:00
l10n daemon script
47c40225fd SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-06-20 05:48:45 +02:00
Albert Astals Cid
f131f7ddba Remove old X11 plugin
It wasn't being compiled anyway
2017-06-15 23:24:45 +02:00
Alexey Min
b2cb3e8204 Implement XCB framebuffer plugin (port from x11)
Previously used x11 plugin does not compile with Qt5, because Qt5 does
not use Xlib, it uses xcb. Rewrite screen capture plugin from Xlib to
xcb.

I made xcb libs compile required dependency, but availability of X
shared memory extension is checked at runtime. It is used to effectively
get image pixels data, instead of transfering 8Mb over the wire. Xdamage
is used to limit image getting operations only within actually changed
rectangles of screen.

BUG: 377998

Tested on single-monitor system and dual-monitor, where primary monitor
does not start at (0,0) coordinate. Image transfer works fine.
Dual-monitor only has problems with receiving mouse cursor position and
clicks, but this should be fixed outside of framebuffer plugin.

Differential Revision: https://phabricator.kde.org/D5211
2017-06-15 23:21:58 +02:00
l10n daemon script
c92ef2f230 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-06-11 04:37:36 +02:00
l10n daemon script
b2fe612ec4 GIT_SILENT made messages (after extraction) 2017-06-11 03:09:33 +02:00
Christoph Feck
831ec6c9be Fix SPDX license ID 2017-06-09 03:57:04 +02:00
l10n daemon script
4b01a1cac7 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-04-23 04:05:02 +02:00
l10n daemon script
09b643f5cb GIT_SILENT made messages (after extraction) 2017-04-23 02:49:04 +02:00
l10n daemon script
77ef270323 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-04-14 03:58:43 +02:00
l10n daemon script
e487c45f34 GIT_SILENT made messages (after extraction) 2017-04-12 02:47:34 +02:00
l10n daemon script
2a60739a16 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-04-09 05:12:08 +02:00
l10n daemon script
8eecd9097e SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-04-09 04:03:05 +02:00
l10n daemon script
e3b9a0b30a GIT_SILENT made messages (after extraction) 2017-04-03 04:24:46 +02:00
Albert Astals Cid
6561a9db15 Merge remote-tracking branch 'origin/Applications/17.04' 2017-03-24 00:21:50 +01:00
Albert Astals Cid
c0ceb8a83d Set default framebuffer plugin to "qt" instead of "x11"
Make default "qt" framebuffer plugin instead of "x11". Workaround for bug https://bugs.kde.org/show_bug.cgi?id=356782
Not a proper fix, ideally "x11" plugin needs to be fixed.

REVIEW: 129721
BUGS: 356782
2017-03-24 00:20:12 +01:00
Albert Astals Cid
f107a73d28 Merge remote-tracking branch 'origin/Applications/17.04' 2017-03-24 00:12:20 +01:00
Alexey Min
4974154cc3 Qt framebuffer plugin: Do not use deprecated QPixmap::grabWindow(), use QScreen::grabWindow() instead
REVIEW: 129722
2017-03-24 00:11:49 +01:00
l10n daemon script
05dc124c8b GIT_SILENT made messages (after extraction) 2017-03-23 04:53:39 +01:00
l10n daemon script
b960bb4ba4 GIT_SILENT made messages (after extraction) 2017-03-20 02:42:32 +01:00
Adriaan de Groot
f702422c9d Drop duplicate linking to libvncserver.
Summary:
The duplicate link may also be missing necessary -L flags,
so it causes linker errors when libvncserver is installed
in unusual places (while ${LIBVNCSERVER_LIBRARIES} DTRT).

Reviewers: sitter, apol, ltoscano, heikobecker

Reviewed By: sitter

Differential Revision: https://phabricator.kde.org/D5018
2017-03-12 22:31:30 +01:00
l10n daemon script
27e48f1114 GIT_SILENT made messages (after extraction) 2017-02-26 04:01:20 +01:00
l10n daemon script
9e77d1f5ac SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-02-23 06:16:56 +01:00
l10n daemon script
c12697e23f GIT_SILENT made messages (after extraction) 2017-02-23 04:14:39 +01:00
l10n daemon script
3ce5047a6f GIT_SILENT made messages (after extraction) 2017-02-19 03:57:26 +01:00
l10n daemon script
60b6f7b86b GIT_SILENT made messages (after extraction) 2017-02-14 09:13:43 +01:00
l10n daemon script
b1f1a2f8d6 GIT_SILENT made messages (after extraction) 2017-02-12 03:54:12 +01:00
l10n daemon script
ee863548d9 GIT_SILENT made messages (after extraction) 2017-02-09 03:58:33 +01:00
l10n daemon script
ccc9ed069f GIT_SILENT made messages (after extraction) 2017-02-07 08:59:20 +01:00
l10n daemon script
8c7138b592 GIT_SILENT made messages (after extraction) 2017-02-05 04:04:34 +01:00
Luigi Toscano
364cee9ba2 It is not just for a specific type of desktop 2017-02-04 16:33:57 +01:00
l10n daemon script
215d20c004 GIT_SILENT made messages (after extraction) 2017-02-04 04:00:01 +01:00
l10n daemon script
315b401227 GIT_SILENT made messages (after extraction) 2017-02-03 04:13:35 +01:00
l10n daemon script
9289a22d8a SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-02-02 05:57:39 +01:00
Harald Sitter
d529e22430 add appdata 2017-02-01 19:32:55 +01:00
Harald Sitter
b6fbb67af1 Merge branch 'Applications/16.12' 2017-02-01 19:13:02 +01:00
Harald Sitter
da4de72d55 set a comment
appstream uses Comment for a summary when no appdata is present. without
a comment/summary no appdata will be available at all rendering the app
unavailable in software stores

recycle genericname to avoid excess l10n work
2017-02-01 19:12:59 +01:00
l10n daemon script
b3e1624469 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-01-28 08:14:37 +01:00
l10n daemon script
aa80d3915d SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-01-28 06:35:16 +01:00
Heiko Becker
0b210563cb Merge remote-tracking branch 'origin/Applications/16.12' 2017-01-11 20:21:12 +01:00
Heiko Becker
b4713d4755 Silence CMake policy CMP0063 warning
...by adding the NO_POLICY_SCOPE flag as recommended by ECM's
documentation.
2017-01-11 20:18:38 +01:00
l10n daemon script
34d9387aa0 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-01-05 05:56:47 +01:00
l10n daemon script
eb7caf8594 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-01-04 06:14:48 +01:00
l10n daemon script
e761ee832e SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-01-03 12:34:42 +01:00
l10n daemon script
699d7f9a27 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-12-20 13:09:16 +01:00
l10n daemon script
43083c52dc SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-12-17 05:50:49 +01:00
l10n daemon script
903692c299 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-12-02 05:49:11 +01:00
l10n daemon script
2885bf2c5a SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-12-02 04:33:40 +01:00
l10n daemon script
6544fd56e9 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-11-30 04:27:39 +01:00
l10n daemon script
3fc2398707 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-11-25 05:01:57 +01:00
l10n daemon script
c1efd7158f SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-11-23 04:21:36 +01:00
l10n daemon script
cbc43a390f SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-11-22 06:10:53 +01:00
l10n daemon script
631d3c85ac SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-11-15 10:19:57 +00:00
l10n daemon script
ae15751847 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-10-24 09:34:05 +00:00
Tomaz Canabrava
f1a3e2b31c Needed to simplify the creation of reviews via the rbt tool.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2016-10-10 16:25:17 +02:00
l10n daemon script
b95a5b285d SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-09-14 09:19:50 +00:00
l10n daemon script
0ee5738bf5 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-09-09 09:26:52 +00:00
Tomaz Canabrava
5195783757 Fix build by undefining the max macro
The max macro was being defined in the c++ namespace,
conflicting with the max C++ function call, breaking the
build.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
2016-08-19 12:43:24 -03:00
Yuri Chornoivan
1b6702167d Fix minor glitches 2016-07-29 19:45:30 +03:00
Burkhard Lück
8b7fcb023d Update KRFB docbook to 16.08
Update to reflect changes in
https://git.reviewboard.kde.org/r/115499
Krfb modified to move away from invite-model, and modeled as a service that can be started/stopped.

remove unused entities, pngs + appendix
new screenshots
remove krfb/ui/invitewidget.ui - unused
REVIEW:128528
2016-07-29 06:59:12 +02:00
l10n daemon script
65595722bd SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-01-23 10:35:57 +00:00
l10n daemon script
916ffb525a SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-01-07 10:10:04 +00:00
Albert Astals Cid
ee5cb9eaf5 Merge remote-tracking branch 'origin/Applications/15.12' 2016-01-07 00:33:40 +01:00
Albert Astals Cid
ecb9fb8ee0 Make translations work
Call KLocalizedString::setApplicationDomain
2016-01-07 00:31:40 +01:00
Albert Astals Cid
2c317584b9 Remove useless I18N_NOOP 2016-01-07 00:30:12 +01:00
l10n daemon script
c98d1d7676 SVN_SILENT made messages (.desktop file) 2015-12-30 12:15:07 +00:00
l10n daemon script
def5195e63 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2015-12-30 09:33:48 +00:00
l10n daemon script
510e5f8d52 SVN_SILENT made messages (.desktop file) 2015-12-29 13:51:44 +00:00
l10n daemon script
964386e2a6 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2015-12-29 11:26:11 +00:00
l10n daemon script
0d500c00ba SVN_SILENT made messages (.desktop file) 2015-12-17 12:27:46 +00:00
l10n daemon script
07439f6408 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2015-12-17 09:32:43 +00:00
l10n daemon script
aa0e358136 SVN_SILENT made messages (.desktop file) 2015-12-13 11:50:46 +00:00
l10n daemon script
7c175bbc6e SVN_SILENT made messages (.desktop file) 2015-12-09 12:00:52 +00:00
l10n daemon script
405bec30f6 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2015-12-09 09:08:00 +00:00
l10n daemon script
464cbd8573 SVN_SILENT made messages (.desktop file) 2015-11-26 18:11:03 +00:00
l10n daemon script
c1904c41c7 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2015-11-26 15:56:42 +00:00
Jeremy Whiting
17752eba7c Merge branch 'Applications/15.12' 2015-11-23 12:22:39 -07:00
Jeremy Whiting
f4b4fe0f34 Fix launching the application from KDE menu and krunner
Patch from Antonio Rojas <arojas@archlinux.org>
REVIEW:126142
BUG:355776
2015-11-23 12:20:59 -07:00
l10n daemon script
ac6f4ca3ed SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2015-11-17 13:00:54 +00:00
l10n daemon script
d2d49abf23 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2015-11-11 10:33:20 +00:00
l10n daemon script
396e277113 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2015-11-07 21:16:29 +00:00
l10n daemon script
ab7ed1c006 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2015-11-04 17:14:10 +00:00
l10n daemon script
1c9db8798e SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2015-11-03 15:56:52 +00:00
l10n daemon script
a2b1c5e0b5 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2015-11-02 11:08:45 +00:00
l10n daemon script
f95fafe5a7 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2015-11-01 10:43:24 +00:00
l10n daemon script
3a9f58f12e SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2015-10-25 10:39:56 +00:00
l10n daemon script
74b4d19a35 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2015-10-18 11:02:35 +00:00
l10n daemon script
c0f1b1ebb4 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2015-10-17 12:43:21 +00:00
l10n daemon script
d306c6c73d SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2015-10-16 10:30:41 +00:00
Rohan Garg
8d1abb3a8f Fix build 2015-10-15 15:51:31 +02:00
Rohan Garg
f15490d58a Merge branch 'master' into frameworks 2015-10-15 15:38:37 +02:00
Rohan Garg
c83182f8d3 Allow krfb to store the fact that it was enabled the last time it was started 2015-10-15 15:36:38 +02:00
Rohan Garg
e0dc5b3a51 Allow krfb to start minimized, this is useful when autostarting krfb. 2015-10-15 15:36:19 +02:00
Rohan Garg
5948ee69c2 Allow for krfb to be started without a wallet.
krfb will store obscured passwords in a regular text
files in this mode.
2015-10-15 15:35:21 +02:00
Albert Astals Cid
e443b13227 virtual -> override
And a class that is really a struct
2015-10-10 13:27:49 +02:00
Albert Astals Cid
ff2d0d999d stop calls are always with true, remove param 2015-10-10 13:16:13 +02:00
Albert Astals Cid
0b9ed26137 Use new connect syntax
And a few warning fixes
2015-10-10 13:12:07 +02:00
Jeremy Whiting
05b6105be8 Fix connections to QDialog subclass signals. 2015-10-10 05:07:43 -06:00
Jeremy Whiting
6d5e2bc356 Remove telepathy tubes and contact list support. 2015-09-17 17:44:07 -06:00
Jeremy Whiting
10176b9e01 Port from KServiceTypeTrader, etc. to new json style plugins.
Finish porting away from KDELibs4Support.
Changed preferred framebuffer config to use plugin ids defaulting to x11.
2015-09-16 20:55:30 -06:00
Jeremy Whiting
9bb8e28eeb Remove unneccesarry TODO comment and commented out code. 2015-09-11 13:51:52 -06:00
Jeremy Whiting
56e1804b23 Port from K4AboutData to KAboutData, KCmdLineArgs to QCmdLineArgs and add about dialog 2015-09-11 13:47:10 -06:00
Jeremy Whiting
82707732d3 Port from KDialog to QDialog and KPushButton to QPushButton. 2015-09-11 13:13:13 -06:00
Jeremy Whiting
e63fb3f0b1 Port away from KLocale and kdemacros 2015-09-11 13:01:02 -06:00
Jeremy Whiting
a45aa4a16b Port from KIcon to QIcon. 2015-09-11 12:32:54 -06:00
Jeremy Whiting
535e474cbd Reenable finding telepathyqt and ktp and remove our local FindKTp.cmake. 2015-09-10 14:27:07 -06:00
Jeremy Whiting
2448d9e944 Update docbook to 4.5 dtd. 2015-09-09 17:52:54 -06:00
Jeremy Whiting
74683e0a02 Rename .desktop to org.kde.krfb.desktop. 2015-09-09 17:50:57 -06:00
Jeremy Whiting
87f2742fcc Add feature_summary 2015-09-09 17:44:49 -06:00
Jeremy Whiting
6306bf85cf Initial port to Qt5/KF5.
Fixed FindLibVNCServer to use CheckStructHasMember.
Ported from kDebug to qDebug
Runs and seems to work, but probably missed some things.
2015-09-06 15:31:29 -06:00
David Faure
cb43be430c set cmake_min_req to match kdelibs policy and enable newer cmake policies 2015-07-29 08:34:24 +02:00
l10n daemon script
97beca4d9c SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2015-05-25 04:27:43 +00:00
l10n daemon script
ad800f12fc SVN_SILENT made messages (.desktop file) 2015-02-21 04:45:26 +00:00
Albert Astals Cid
9db3ae6629 Merge remote-tracking branch 'origin/KDE/4.14'
Conflicts:
	libvncserver/lzoconf.h
	libvncserver/lzodefs.h
	libvncserver/minilzo.c
	libvncserver/minilzo.h
2014-09-11 00:49:42 +02:00
Jonathan Liu
b6b20c84e8 Fix crash on quit if KDE wallet subsystem is disabled
REVIEW: 120097
2014-09-11 00:47:46 +02:00
Martin T. H. Sandsmark
0bff5df104 Update LZO to version 2.07 in libvncserver.
Temporary fix for CVE-2014-4607 for 4.14. For next release we rely on
the external libvncserver.
2014-07-31 20:20:32 +02:00
Johannes Huber
1c85dc7d85 CVE-2014-4607: Unbundle libvncserver
http://seclists.org/oss-sec/2014/q2/676

REVIEW: 119548
2014-07-31 18:15:25 +02:00
l10n daemon script
83767fea93 SVN_SILENT made messages (.desktop file) 2014-07-25 05:40:37 +00:00
l10n daemon script
8597d3c4a7 SVN_SILENT made messages (.desktop file) 2014-07-24 04:53:26 +00:00
Pino Toscano
fd9f566d0b fixuifiles 2014-04-15 23:12:33 +02:00
Amandeep Singh
2eb0a2a9d2 Making main-widget flexible in size 2014-04-06 10:24:40 +05:30
Amandeep Singh
85e13b7908 Publish service on local network depending on config 2014-04-06 10:24:35 +05:30
Amandeep Singh
ad79d51e8b Fix: KRFB crashes when closed during pending connection 2014-04-06 10:24:29 +05:30
Amandeep Singh
a1de26dde7 Fixed dialog parents and Stopping server on delete 2014-04-06 10:24:25 +05:30
Amandeep Singh
f074491e60 Show KDE Telepathy contacts if available
Optional dependency on KTP. If available contacts with rfb capability
shown in list view.
2014-04-06 10:24:21 +05:30
Amandeep Singh
2e35cd2e08 Adding message dialogs to UI 2014-04-06 10:24:18 +05:30
Amandeep Singh
6eefee2677 Remove unused files 2014-04-06 10:23:52 +05:30
Amandeep Singh
e452d68f05 Add bidirectional text-clipboard support 2014-04-06 10:23:47 +05:30
Amandeep Singh
c558eaf9b6 Save password in KWallet & settings to config file
Fall back to config file if KWallet not available
2014-04-06 10:23:41 +05:30
Amandeep Singh
db5c2528cd Fix crash in krfb
Krfb crashes on quit, if any client is connected
due to a rfbClientConnectionGone call missing
2014-04-06 10:23:38 +05:30
Amandeep Singh
c87064a797 Prompt User only when client is authenticated
FIXED: Krfb prompts user about incoming connection before authentication
ADDED: Krfb prompts user depending upon password used by client
2014-04-06 10:23:34 +05:30
Amandeep Singh
c5c415c042 Unattended Access mode added
Remote user can connect without confirmation on
providing correct unattended mode password.
2014-04-06 10:23:30 +05:30
Amandeep Singh
f64abc21ce krfb moved away from invitation based model
-Allow user to start/stop the service as needeed
-Allow user to change & view password in main UI
-Legitimate incoming requests accepted
2014-04-06 10:23:26 +05:30
Amandeep Singh
f0714d9b30 rfbInitSockets returns only if socket is READY
TODO: Server not started, All Incoming requests will fail
2014-04-06 10:23:18 +05:30
Amandeep Singh
45edf9d0ed Removing Invitations related files
TODO: Server not started, All Incoming requests will fail
2014-04-06 10:23:15 +05:30
Amandeep Singh
7714a2a7f6 Adding new front end user interface
TODO: Server not started, All Incoming requests will fail
2014-04-06 10:23:11 +05:30
Amandeep Singh
debffc2e10 Krfb now runs as KUniqueApplication 2014-04-06 10:22:44 +05:30
l10n daemon script
13e2c2ace3 SVN_SILENT made messages (.desktop file) 2014-01-07 03:51:44 +00:00
l10n daemon script
07b70bb411 SVN_SILENT made messages (.desktop file) 2013-08-02 04:21:04 +00:00
l10n daemon script
0739a89908 SVN_SILENT made messages (.desktop file) 2013-07-26 04:00:31 +00:00
l10n daemon script
2531061f3d SVN_SILENT made messages (.desktop file) 2013-07-23 04:03:24 +00:00
Philip Muškovac
22536aff9a Add copies of the GPLv2, LGPLv2.1 and GFDLv1.2
as required by the licenses for proper licensing and the debian/ubuntu world
2013-07-11 14:19:00 +02:00
l10n daemon script
0635d70b17 SVN_SILENT made messages (.desktop file) 2013-07-01 03:54:01 +00:00
Burkhard Lück
e5256cbf77 proofread + bump version 2013-06-19 21:36:14 +02:00
l10n daemon script
81fcc1e561 SVN_SILENT made messages (.desktop file) 2013-06-08 03:46:19 +00:00
l10n daemon script
6c8e0f57fc SVN_SILENT made messages (.desktop file) 2013-06-07 03:39:18 +00:00
David Faure
53e4912a65 Remove erroneous double-quotes around %c in Exec line
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1352264
2013-05-03 11:18:13 +00:00
Script Kiddy
e016859ea8 SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1347282
2013-03-31 07:57:51 +00:00
Burkhard Lück
05febb3fe8 change wrong display number to port number
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1346928
2013-03-29 20:29:14 +00:00
Burkhard Lück
806ddcc48f remove dead code unused since 6 years
BUG:317534

svn path=/trunk/KDE/kdenetwork/krfb/; revision=1346927
2013-03-29 20:27:30 +00:00
Script Kiddy
dcf2be6919 SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1346380
2013-03-27 07:32:25 +00:00
Urs Wolfer
3abd0b6e63 fix doc install dir (addition to r1340343)
Thanks to Michael Palimaka for reporting this issue.

svn path=/trunk/KDE/kdenetwork/krfb/; revision=1341472
2013-02-25 17:55:54 +00:00
Urs Wolfer
89679f63c7 move docs into application folders
- required for upcoming Git migration with repository per app / lib
- if nobody complains, I will backport it in a few days to the 4.10 branch also
- I will update trunk/l10n-kde4/scripts/documentation_paths in my next commit

svn path=/trunk/KDE/kdenetwork/krfb/; revision=1340343
2013-02-16 12:20:59 +00:00
Urs Wolfer
b61182da16 allow standalone building of every kdenetwork app / lib
- full module build is still possible
- required for upcoming Git migration with repository per app / lib
- if nobody complains, I will backport it in a few days to the 4.10 branch also

svn path=/trunk/KDE/kdenetwork/krfb/; revision=1340341
2013-02-16 11:56:38 +00:00
Script Kiddy
a8f42c73ec SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1337932
2013-02-06 07:15:58 +00:00
Script Kiddy
a11a86cdb9 SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1337104
2013-02-03 07:53:52 +00:00
Script Kiddy
aed9b9a236 SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1336557
2013-01-31 10:58:28 +00:00
Script Kiddy
41c9ecfc6a SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1331249
2013-01-08 16:19:39 +00:00
Script Kiddy
10cb2e2489 SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1326113
2012-11-26 06:06:56 +00:00
Pino Toscano
f417d6efce docs: add id attribute to <book> elements
svn path=/trunk/KDE/kdenetwork/doc/krfb/; revision=1320307
2012-10-13 12:53:04 +00:00
Raphael Kubo da Costa
5a3fdd3774 Merge r1315649 by rkcosta.
Set _XOPEN_SOURCE for random(3) and srandom(3).

These two functions are not defined when building with -ansi (which is set
in FindKDE4Internal.cmake). For glibc-based systems, defining _BSD_SOURCE
adds those functions back, but this macro is not portable.

Fix that by defining _XOPEN_SOURCE as well, since this one is recognized
across other systems. We could set it to 500, but 600 has been chosen to
keep it in sync with the rest of the patches I have sent upstream [1].

[1] http://sourceforge.net/mailarchive/message.php?msg_id=29786756

svn path=/trunk/KDE/kdenetwork/krfb/; revision=1315651
2012-09-09 19:17:43 +00:00
Script Kiddy
dd2ced46ec SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1314893
2012-09-04 23:52:40 +00:00
Script Kiddy
96ee366c73 SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1309656
2012-08-07 16:32:30 +00:00
Rohan Garg
aa5701f354 Fix header includes
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1309545
2012-08-06 14:47:00 +00:00
Script Kiddy
32b69cb2f3 SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1294136
2012-05-11 07:42:38 +00:00
Script Kiddy
5cd069d45e SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1293287
2012-05-07 08:00:47 +00:00
Script Kiddy
da6f1d35a0 SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1290153
2012-04-18 07:35:59 +00:00
George Kiagiadakis
a5e58a8a83 Remove the BUILD_WITH_EXPERIMENTAL_TUBES option and update the top-level build system files to look for tp-qt 0.9
Telepathy support is no longer considered experimental.


svn path=/trunk/KDE/kdenetwork/krfb/; revision=1283940
2012-03-06 21:27:31 +00:00
George Kiagiadakis
3428e62959 Port to telepathy-qt 0.9
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1283925
2012-03-06 17:10:13 +00:00
George Kiagiadakis
2d778f6b18 Port tubes support to the new ultra high level stream tubes api.
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1283924
2012-03-06 17:10:09 +00:00
Script Kiddy
66b4e8520a SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1283163
2012-03-02 09:42:50 +00:00
Script Kiddy
e237d18812 SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1282718
2012-02-28 15:03:20 +00:00
Script Kiddy
530098eba3 SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1278177
2012-02-05 08:42:29 +00:00
Script Kiddy
39bca53c76 SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1276450
2012-01-29 10:39:50 +00:00
Matthias Fuchs
c476ef5e3e Reverting faulty commits.
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1270722
2011-12-28 11:09:28 +00:00
Matthias Fuchs
142935f3dc Revert "Optimizes the visual input handling:"
This reverts commit b133ba39eb34a7ec31206b1f68d058576ae7e179.

svn path=/trunk/KDE/kdenetwork/krfb/; revision=1270718
2011-12-28 10:20:04 +00:00
Script Kiddy
4bd481ad54 SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1269556
2011-12-20 15:27:06 +00:00
Script Kiddy
e72807e225 SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1269365
2011-12-19 14:37:25 +00:00
Script Kiddy
51c54d7dd8 SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1269089
2011-12-18 08:53:31 +00:00
Script Kiddy
e270fb9186 SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1268924
2011-12-17 08:47:34 +00:00
Script Kiddy
f13c451752 SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1268358
2011-12-12 07:37:04 +00:00
Script Kiddy
e00ee00314 SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1268260
2011-12-11 07:38:59 +00:00
Script Kiddy
e45bad0e33 SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1267705
2011-12-08 08:04:59 +00:00
Script Kiddy
bdb22dca4d SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1267618
2011-12-07 08:23:58 +00:00
Script Kiddy
bfa0444be7 SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1267365
2011-12-06 16:02:51 +00:00
Script Kiddy
8a82a27da8 SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1266435
2011-11-29 15:49:52 +00:00
308 changed files with 83068 additions and 35977 deletions

26
.gitignore vendored Normal file
View File

@@ -0,0 +1,26 @@
# Ignore the following files
*~
*.[oa]
*.diff
*.kate-swp
*.kdev4
.kdev_include_paths
*.kdevelop.pcs
*.moc
*.moc.cpp
*.orig
*.user
.*.swp
.swp.*
Doxyfile
Makefile
/build*/
.cmake/
CMakeLists.txt.user*
*.unc-backup*
.clang-format
/compile_commands.json
.clangd
.cache
.idea
/cmake-build*

8
.gitlab-ci.yml Normal file
View File

@@ -0,0 +1,8 @@
# SPDX-FileCopyrightText: None
# SPDX-License-Identifier: CC0-1.0
include:
- project: sysadmin/ci-utilities
file:
- /gitlab-templates/linux-qt6.yml
- /gitlab-templates/freebsd-qt6.yml

22
.kde-ci.yml Normal file
View File

@@ -0,0 +1,22 @@
# SPDX-FileCopyrightText: None
# SPDX-License-Identifier: CC0-1.0
Dependencies:
- 'on': ['@all']
'require':
'frameworks/extra-cmake-modules': '@latest-kf6'
'frameworks/ki18n': '@latest-kf6'
'frameworks/kconfig': '@latest-kf6'
'frameworks/kcoreaddons': '@latest-kf6'
'frameworks/kdbusaddons': '@latest-kf6'
'frameworks/kdnssd': '@latest-kf6'
'frameworks/kdoctools': '@latest-kf6'
'frameworks/knotifications': '@latest-kf6'
'frameworks/kwallet': '@latest-kf6'
'frameworks/kwidgetsaddons': '@latest-kf6'
'frameworks/kwindowsystem': '@latest-kf6'
'frameworks/kxmlgui': '@latest-kf6'
'frameworks/kstatusnotifieritem': '@latest-kf6'
'libraries/plasma-wayland-protocols': '@latest-kf6'
'plasma/kwayland': '@latest-kf6'
'plasma/kpipewire': '@latest-kf6'

View File

@@ -1,50 +1,112 @@
project(krfb)
cmake_minimum_required(VERSION 3.16)
if(NOT INSIDE_KDENETWORK)
message("Not building inside KDENetwork, loading KDE CMake Macros.")
# KDE Application Version, managed by release script
set (RELEASE_SERVICE_VERSION_MAJOR "24")
set (RELEASE_SERVICE_VERSION_MINOR "02")
set (RELEASE_SERVICE_VERSION_MICRO "2")
set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH})
project(krfb VERSION ${RELEASE_SERVICE_VERSION})
find_package(KDE4 REQUIRED)
set(QT_MIN_VERSION 6.5.0)
set(KF6_MIN_VERSION 5.247.0)
include(KDE4Defaults)
include(MacroLibrary)
find_package(ECM ${KF6_MIN_VERSION} NO_MODULE REQUIRED)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules" ${ECM_MODULE_PATH})
include(CheckSymbolExists)
if (BUILD_EXPERIMENTAL_TUBES_SUPPORT)
message(WARNING "You enabled experimental Tubes support. Expect breakage!!")
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(ECMInstallIcons)
include(ECMAddAppIcon)
include(ECMSetupVersion)
include(ECMQtDeclareLoggingCategory)
include(ECMDeprecationSettings)
include(FeatureSummary)
include(CheckIncludeFile)
macro_optional_find_package(TelepathyQt4)
macro_log_feature(TELEPATHY_QT4_FOUND "telepathy-qt4" "Telepathy Qt Bindings" "http://telepathy.freedesktop.org" FALSE "0.18" "Needed to build Telepathy Tubes support.")
endif (BUILD_EXPERIMENTAL_TUBES_SUPPORT)
check_include_file("linux/input.h" HAVE_LINUX_INPUT_H)
set(CMAKE_REQUIRED_DEFINITIONS ${_KDE_PLATFORM_DEFINITIONS})
find_package(Qt6 ${QT_MIN_VERSION} REQUIRED COMPONENTS Core DBus Widgets)
add_definitions(${QT_DEFINITIONS} ${QT_DBUS_DEFINITIONS} ${KDE4_DEFINITIONS})
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES})
endif(NOT INSIDE_KDENETWORK)
find_package(KF6 ${KF6_MIN_VERSION} REQUIRED COMPONENTS
I18n
Config
CoreAddons
DBusAddons
DNSSD
DocTools
Notifications
Wallet
WidgetsAddons
WindowSystem
XmlGui
StatusNotifierItem
)
macro_bool_to_01(X11_Xdamage_FOUND HAVE_XDAMAGE)
macro_bool_to_01(X11_XShm_FOUND HAVE_XSHM)
find_package(X11 REQUIRED)
find_package(XCB REQUIRED COMPONENTS
XCB
RENDER
SHAPE
XFIXES
DAMAGE
SHM
IMAGE
)
if(WIN32)
set(CMAKE_REQUIRED_LIBRARIES ${KDEWIN32_LIBRARIES})
set(CMAKE_REQUIRED_INCLUDES ${KDEWIN32_INCLUDES})
endif(WIN32)
ecm_set_disabled_deprecation_versions(
QT 5.15.2
KF 5.91
)
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} )
find_package(LibVNCServer REQUIRED)
option(DISABLE_PIPEWIRE "Disable PipeWire support." OFF)
if(NOT DISABLE_PIPEWIRE)
find_package(KPipeWire REQUIRED)
endif()
add_feature_info(PipeWire KPipeWire_FOUND "Required for pipewire screencast plugin")
find_package(PlasmaWaylandProtocols 1.5.0)
if(KPipeWire_FOUND AND PlasmaWaylandProtocols_FOUND)
find_package(KWayland REQUIRED)
find_package(QtWaylandScanner REQUIRED)
find_package(Qt6WaylandClient)
find_package(Wayland REQUIRED COMPONENTS Client)
endif()
ecm_setup_version(PROJECT
VARIABLE_PREFIX KRFB
VERSION_HEADER "krfb_version.h")
include_directories ("${CMAKE_CURRENT_BINARY_DIR}/krfb"
"${CMAKE_CURRENT_SOURCE_DIR}/krfb"
"${CMAKE_CURRENT_SOURCE_DIR}/krfb/ui"
"${CMAKE_CURRENT_SOURCE_DIR}/libvncserver/"
"${CMAKE_CURRENT_BINARY_DIR}/libvncserver/"
)
if(Q_WS_X11)
if(NOT X11_XTest_FOUND)
message(FATAL_ERROR "krfb requires the libXtst (http://xorg.freedesktop.org) to be built")
endif(NOT X11_XTest_FOUND)
endif(Q_WS_X11)
add_subdirectory(libvncserver)
add_subdirectory(events)
add_subdirectory(krfb)
add_subdirectory (framebuffers)
add_subdirectory(framebuffers)
add_subdirectory(doc)
add_subdirectory(icons)
if (NOT INSIDE_KDENETWORK)
macro_display_feature_log()
endif ()
ki18n_install(po)
kdoctools_install(po)
ecm_qt_install_logging_categories(
EXPORT KRFB
FILE krfb.categories
DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR}
)
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)

128
CMakePresets.json Normal file
View File

@@ -0,0 +1,128 @@
{
"version": 2,
"configurePresets": [
{
"name": "dev",
"displayName": "Build as debug",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
}
},
{
"name": "asan",
"displayName": "Build with Asan support.",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build-asan",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"ECM_ENABLE_SANITIZERS" : "'address;undefined'",
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
}
},
{
"name": "dev-clang",
"displayName": "dev-clang",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build-clang",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
},
"environment": {
"CXX": "clang++",
"CCACHE_DISABLE": "ON"
}
},
{
"name": "unity",
"displayName": "Build with CMake unity support.",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build-unity",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_UNITY_BUILD": "ON",
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
}
},
{
"name": "release",
"displayName": "Build as release mode.",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build-release",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
}
},
{
"name": "profile",
"displayName": "profile",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build-profile",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
}
},
{
"name": "clazy",
"displayName": "clazy",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build-clazy",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
},
"environment": {
"CXX": "clazy",
"CCACHE_DISABLE": "ON"
}
}
],
"buildPresets": [
{
"name": "dev",
"configurePreset": "dev"
},
{
"name": "release",
"configurePreset": "release"
},
{
"name": "dev-clang",
"configurePreset": "dev-clang"
},
{
"name": "asan",
"configurePreset": "asan"
},
{
"name": "unity",
"configurePreset": "unity"
},
{
"name": "clazy",
"configurePreset": "clazy",
"environment": {
"CLAZY_CHECKS" : "level0,level1,detaching-member,ifndef-define-typo,isempty-vs-count,qrequiredresult-candidates,reserve-candidates,signal-with-return-value,unneeded-cast,function-args-by-ref,function-args-by-value,returning-void-expression,no-ctor-missing-parent-argument,isempty-vs-count,qhash-with-char-pointer-key,raw-environment-function,qproperty-type-mismatch,old-style-connect,qstring-allocations,container-inside-loop,heap-allocated-small-trivial-type,inefficient-qlist,qstring-varargs,level2,detaching-member,heap-allocated-small-trivial-type,isempty-vs-count,qstring-varargs,qvariant-template-instantiation,raw-environment-function,reserve-candidates,signal-with-return-value,thread-with-slots,no-ctor-missing-parent-argument,no-missing-typeinfo",
"CCACHE_DISABLE" : "ON"
}
}
],
"testPresets": [
{
"name": "dev",
"configurePreset": "dev",
"output": {"outputOnFailure": true},
"execution": {"noTestsAction": "error", "stopOnFailure": false}
},
{
"name": "asan",
"configurePreset": "asan",
"output": {"outputOnFailure": true},
"execution": {"noTestsAction": "error", "stopOnFailure": true}
}
]
}

View File

@@ -0,0 +1,2 @@
# SPDX-FileCopyrightText: 2021 Laurent Montel <montel@kde.org>
# SPDX-License-Identifier: BSD-3-Clause

347
COPYING Normal file
View File

@@ -0,0 +1,347 @@
NOTE! The GPL below is copyrighted by the Free Software Foundation, but
the instance of code that it refers to (the kde programs) are copyrighted
by the authors who actually wrote it.
---------------------------------------------------------------------------
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
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 2 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, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

397
COPYING.DOC Normal file
View File

@@ -0,0 +1,397 @@
GNU Free Documentation License
Version 1.2, November 2002
Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
0. PREAMBLE
The purpose of this License is to make a manual, textbook, or other
functional and useful document "free" in the sense of freedom: to
assure everyone the effective freedom to copy and redistribute it,
with or without modifying it, either commercially or noncommercially.
Secondarily, this License preserves for the author and publisher a way
to get credit for their work, while not being considered responsible
for modifications made by others.
This License is a kind of "copyleft", which means that derivative
works of the document must themselves be free in the same sense. It
complements the GNU General Public License, which is a copyleft
license designed for free software.
We have designed this License in order to use it for manuals for free
software, because free software needs free documentation: a free
program should come with manuals providing the same freedoms that the
software does. But this License is not limited to software manuals;
it can be used for any textual work, regardless of subject matter or
whether it is published as a printed book. We recommend this License
principally for works whose purpose is instruction or reference.
1. APPLICABILITY AND DEFINITIONS
This License applies to any manual or other work, in any medium, that
contains a notice placed by the copyright holder saying it can be
distributed under the terms of this License. Such a notice grants a
world-wide, royalty-free license, unlimited in duration, to use that
work under the conditions stated herein. The "Document", below,
refers to any such manual or work. Any member of the public is a
licensee, and is addressed as "you". You accept the license if you
copy, modify or distribute the work in a way requiring permission
under copyright law.
A "Modified Version" of the Document means any work containing the
Document or a portion of it, either copied verbatim, or with
modifications and/or translated into another language.
A "Secondary Section" is a named appendix or a front-matter section of
the Document that deals exclusively with the relationship of the
publishers or authors of the Document to the Document's overall subject
(or to related matters) and contains nothing that could fall directly
within that overall subject. (Thus, if the Document is in part a
textbook of mathematics, a Secondary Section may not explain any
mathematics.) The relationship could be a matter of historical
connection with the subject or with related matters, or of legal,
commercial, philosophical, ethical or political position regarding
them.
The "Invariant Sections" are certain Secondary Sections whose titles
are designated, as being those of Invariant Sections, in the notice
that says that the Document is released under this License. If a
section does not fit the above definition of Secondary then it is not
allowed to be designated as Invariant. The Document may contain zero
Invariant Sections. If the Document does not identify any Invariant
Sections then there are none.
The "Cover Texts" are certain short passages of text that are listed,
as Front-Cover Texts or Back-Cover Texts, in the notice that says that
the Document is released under this License. A Front-Cover Text may
be at most 5 words, and a Back-Cover Text may be at most 25 words.
A "Transparent" copy of the Document means a machine-readable copy,
represented in a format whose specification is available to the
general public, that is suitable for revising the document
straightforwardly with generic text editors or (for images composed of
pixels) generic paint programs or (for drawings) some widely available
drawing editor, and that is suitable for input to text formatters or
for automatic translation to a variety of formats suitable for input
to text formatters. A copy made in an otherwise Transparent file
format whose markup, or absence of markup, has been arranged to thwart
or discourage subsequent modification by readers is not Transparent.
An image format is not Transparent if used for any substantial amount
of text. A copy that is not "Transparent" is called "Opaque".
Examples of suitable formats for Transparent copies include plain
ASCII without markup, Texinfo input format, LaTeX input format, SGML
or XML using a publicly available DTD, and standard-conforming simple
HTML, PostScript or PDF designed for human modification. Examples of
transparent image formats include PNG, XCF and JPG. Opaque formats
include proprietary formats that can be read and edited only by
proprietary word processors, SGML or XML for which the DTD and/or
processing tools are not generally available, and the
machine-generated HTML, PostScript or PDF produced by some word
processors for output purposes only.
The "Title Page" means, for a printed book, the title page itself,
plus such following pages as are needed to hold, legibly, the material
this License requires to appear in the title page. For works in
formats which do not have any title page as such, "Title Page" means
the text near the most prominent appearance of the work's title,
preceding the beginning of the body of the text.
A section "Entitled XYZ" means a named subunit of the Document whose
title either is precisely XYZ or contains XYZ in parentheses following
text that translates XYZ in another language. (Here XYZ stands for a
specific section name mentioned below, such as "Acknowledgements",
"Dedications", "Endorsements", or "History".) To "Preserve the Title"
of such a section when you modify the Document means that it remains a
section "Entitled XYZ" according to this definition.
The Document may include Warranty Disclaimers next to the notice which
states that this License applies to the Document. These Warranty
Disclaimers are considered to be included by reference in this
License, but only as regards disclaiming warranties: any other
implication that these Warranty Disclaimers may have is void and has
no effect on the meaning of this License.
2. VERBATIM COPYING
You may copy and distribute the Document in any medium, either
commercially or noncommercially, provided that this License, the
copyright notices, and the license notice saying this License applies
to the Document are reproduced in all copies, and that you add no other
conditions whatsoever to those of this License. You may not use
technical measures to obstruct or control the reading or further
copying of the copies you make or distribute. However, you may accept
compensation in exchange for copies. If you distribute a large enough
number of copies you must also follow the conditions in section 3.
You may also lend copies, under the same conditions stated above, and
you may publicly display copies.
3. COPYING IN QUANTITY
If you publish printed copies (or copies in media that commonly have
printed covers) of the Document, numbering more than 100, and the
Document's license notice requires Cover Texts, you must enclose the
copies in covers that carry, clearly and legibly, all these Cover
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
the back cover. Both covers must also clearly and legibly identify
you as the publisher of these copies. The front cover must present
the full title with all words of the title equally prominent and
visible. You may add other material on the covers in addition.
Copying with changes limited to the covers, as long as they preserve
the title of the Document and satisfy these conditions, can be treated
as verbatim copying in other respects.
If the required texts for either cover are too voluminous to fit
legibly, you should put the first ones listed (as many as fit
reasonably) on the actual cover, and continue the rest onto adjacent
pages.
If you publish or distribute Opaque copies of the Document numbering
more than 100, you must either include a machine-readable Transparent
copy along with each Opaque copy, or state in or with each Opaque copy
a computer-network location from which the general network-using
public has access to download using public-standard network protocols
a complete Transparent copy of the Document, free of added material.
If you use the latter option, you must take reasonably prudent steps,
when you begin distribution of Opaque copies in quantity, to ensure
that this Transparent copy will remain thus accessible at the stated
location until at least one year after the last time you distribute an
Opaque copy (directly or through your agents or retailers) of that
edition to the public.
It is requested, but not required, that you contact the authors of the
Document well before redistributing any large number of copies, to give
them a chance to provide you with an updated version of the Document.
4. MODIFICATIONS
You may copy and distribute a Modified Version of the Document under
the conditions of sections 2 and 3 above, provided that you release
the Modified Version under precisely this License, with the Modified
Version filling the role of the Document, thus licensing distribution
and modification of the Modified Version to whoever possesses a copy
of it. In addition, you must do these things in the Modified Version:
A. Use in the Title Page (and on the covers, if any) a title distinct
from that of the Document, and from those of previous versions
(which should, if there were any, be listed in the History section
of the Document). You may use the same title as a previous version
if the original publisher of that version gives permission.
B. List on the Title Page, as authors, one or more persons or entities
responsible for authorship of the modifications in the Modified
Version, together with at least five of the principal authors of the
Document (all of its principal authors, if it has fewer than five),
unless they release you from this requirement.
C. State on the Title page the name of the publisher of the
Modified Version, as the publisher.
D. Preserve all the copyright notices of the Document.
E. Add an appropriate copyright notice for your modifications
adjacent to the other copyright notices.
F. Include, immediately after the copyright notices, a license notice
giving the public permission to use the Modified Version under the
terms of this License, in the form shown in the Addendum below.
G. Preserve in that license notice the full lists of Invariant Sections
and required Cover Texts given in the Document's license notice.
H. Include an unaltered copy of this License.
I. Preserve the section Entitled "History", Preserve its Title, and add
to it an item stating at least the title, year, new authors, and
publisher of the Modified Version as given on the Title Page. If
there is no section Entitled "History" in the Document, create one
stating the title, year, authors, and publisher of the Document as
given on its Title Page, then add an item describing the Modified
Version as stated in the previous sentence.
J. Preserve the network location, if any, given in the Document for
public access to a Transparent copy of the Document, and likewise
the network locations given in the Document for previous versions
it was based on. These may be placed in the "History" section.
You may omit a network location for a work that was published at
least four years before the Document itself, or if the original
publisher of the version it refers to gives permission.
K. For any section Entitled "Acknowledgements" or "Dedications",
Preserve the Title of the section, and preserve in the section all
the substance and tone of each of the contributor acknowledgements
and/or dedications given therein.
L. Preserve all the Invariant Sections of the Document,
unaltered in their text and in their titles. Section numbers
or the equivalent are not considered part of the section titles.
M. Delete any section Entitled "Endorsements". Such a section
may not be included in the Modified Version.
N. Do not retitle any existing section to be Entitled "Endorsements"
or to conflict in title with any Invariant Section.
O. Preserve any Warranty Disclaimers.
If the Modified Version includes new front-matter sections or
appendices that qualify as Secondary Sections and contain no material
copied from the Document, you may at your option designate some or all
of these sections as invariant. To do this, add their titles to the
list of Invariant Sections in the Modified Version's license notice.
These titles must be distinct from any other section titles.
You may add a section Entitled "Endorsements", provided it contains
nothing but endorsements of your Modified Version by various
parties--for example, statements of peer review or that the text has
been approved by an organization as the authoritative definition of a
standard.
You may add a passage of up to five words as a Front-Cover Text, and a
passage of up to 25 words as a Back-Cover Text, to the end of the list
of Cover Texts in the Modified Version. Only one passage of
Front-Cover Text and one of Back-Cover Text may be added by (or
through arrangements made by) any one entity. If the Document already
includes a cover text for the same cover, previously added by you or
by arrangement made by the same entity you are acting on behalf of,
you may not add another; but you may replace the old one, on explicit
permission from the previous publisher that added the old one.
The author(s) and publisher(s) of the Document do not by this License
give permission to use their names for publicity for or to assert or
imply endorsement of any Modified Version.
5. COMBINING DOCUMENTS
You may combine the Document with other documents released under this
License, under the terms defined in section 4 above for modified
versions, provided that you include in the combination all of the
Invariant Sections of all of the original documents, unmodified, and
list them all as Invariant Sections of your combined work in its
license notice, and that you preserve all their Warranty Disclaimers.
The combined work need only contain one copy of this License, and
multiple identical Invariant Sections may be replaced with a single
copy. If there are multiple Invariant Sections with the same name but
different contents, make the title of each such section unique by
adding at the end of it, in parentheses, the name of the original
author or publisher of that section if known, or else a unique number.
Make the same adjustment to the section titles in the list of
Invariant Sections in the license notice of the combined work.
In the combination, you must combine any sections Entitled "History"
in the various original documents, forming one section Entitled
"History"; likewise combine any sections Entitled "Acknowledgements",
and any sections Entitled "Dedications". You must delete all sections
Entitled "Endorsements".
6. COLLECTIONS OF DOCUMENTS
You may make a collection consisting of the Document and other documents
released under this License, and replace the individual copies of this
License in the various documents with a single copy that is included in
the collection, provided that you follow the rules of this License for
verbatim copying of each of the documents in all other respects.
You may extract a single document from such a collection, and distribute
it individually under this License, provided you insert a copy of this
License into the extracted document, and follow this License in all
other respects regarding verbatim copying of that document.
7. AGGREGATION WITH INDEPENDENT WORKS
A compilation of the Document or its derivatives with other separate
and independent documents or works, in or on a volume of a storage or
distribution medium, is called an "aggregate" if the copyright
resulting from the compilation is not used to limit the legal rights
of the compilation's users beyond what the individual works permit.
When the Document is included in an aggregate, this License does not
apply to the other works in the aggregate which are not themselves
derivative works of the Document.
If the Cover Text requirement of section 3 is applicable to these
copies of the Document, then if the Document is less than one half of
the entire aggregate, the Document's Cover Texts may be placed on
covers that bracket the Document within the aggregate, or the
electronic equivalent of covers if the Document is in electronic form.
Otherwise they must appear on printed covers that bracket the whole
aggregate.
8. TRANSLATION
Translation is considered a kind of modification, so you may
distribute translations of the Document under the terms of section 4.
Replacing Invariant Sections with translations requires special
permission from their copyright holders, but you may include
translations of some or all Invariant Sections in addition to the
original versions of these Invariant Sections. You may include a
translation of this License, and all the license notices in the
Document, and any Warranty Disclaimers, provided that you also include
the original English version of this License and the original versions
of those notices and disclaimers. In case of a disagreement between
the translation and the original version of this License or a notice
or disclaimer, the original version will prevail.
If a section in the Document is Entitled "Acknowledgements",
"Dedications", or "History", the requirement (section 4) to Preserve
its Title (section 1) will typically require changing the actual
title.
9. TERMINATION
You may not copy, modify, sublicense, or distribute the Document except
as expressly provided for under this License. Any other attempt to
copy, modify, sublicense or distribute the Document is void, and will
automatically terminate your rights under this License. However,
parties who have received copies, or rights, from you under this
License will not have their licenses terminated so long as such
parties remain in full compliance.
10. FUTURE REVISIONS OF THIS LICENSE
The Free Software Foundation may publish new, revised versions
of the GNU Free Documentation License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns. See
http://www.gnu.org/copyleft/.
Each version of the License is given a distinguishing version number.
If the Document specifies that a particular numbered version of this
License "or any later version" applies to it, you have the option of
following the terms and conditions either of that specified version or
of any later version that has been published (not as a draft) by the
Free Software Foundation. If the Document does not specify a version
number of this License, you may choose any version ever published (not
as a draft) by the Free Software Foundation.
ADDENDUM: How to use this License for your documents
To use this License in a document you have written, include a copy of
the License in the document and put the following copyright and
license notices just after the title page:
Copyright (c) YEAR YOUR NAME.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license is included in the section entitled "GNU
Free Documentation License".
If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
replace the "with...Texts." line with this:
with the Invariant Sections being LIST THEIR TITLES, with the
Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
If you have Invariant Sections without Cover Texts, or some other
combination of the three, merge those two alternatives to suit the
situation.
If your document contains nontrivial examples of program code, we
recommend releasing these examples in parallel under your choice of
free software license, such as the GNU General Public License,
to permit their use in free software.

510
COPYING.LIB Normal file
View File

@@ -0,0 +1,510 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations
below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it
becomes a de-facto standard. To achieve this, non-free programs must
be allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control
compilation and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at least
three years, to give the same user the materials specified in
Subsection 6a, above, for a charge no more than the cost of
performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply, and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License
may add an explicit geographical distribution limitation excluding those
countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms
of the ordinary General Public License).
To apply these terms, attach the following notices to the library.
It is safest to attach them to the start of each source file to most
effectively convey the exclusion of warranty; and each file should
have at least the "copyright" line and a pointer to where the full
notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or
your school, if any, to sign a "copyright disclaimer" for the library,
if necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James
Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!

4
README
View File

@@ -12,8 +12,4 @@ x0rfbserver left. Since version 0.6 it uses libvncserver
Guide to documentation:
TODO - things to be done
INSTALL - Very short installation instructions
NOTES - reasons for various decisions
DCOP-INTERFACE - short documentation of the DCOP interface

View File

@@ -0,0 +1,41 @@
# cmake macro to test LIBVNCSERVER LIB
# Copyright (c) 2006, Alessandro Praduroux <pradu@pradu.it>
# Copyright (c) 2007, Urs Wolfer <uwolfer @ kde.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
INCLUDE(CheckStructHasMember)
IF (LIBVNCSERVER_INCLUDE_DIR AND LIBVNCSERVER_LIBRARIES)
# Already in cache, be silent
SET(LIBVNCSERVER_FIND_QUIETLY TRUE)
ENDIF (LIBVNCSERVER_INCLUDE_DIR AND LIBVNCSERVER_LIBRARIES)
FIND_PATH(LIBVNCSERVER_INCLUDE_DIR rfb/rfb.h)
FIND_LIBRARY(LIBVNCSERVER_LIBRARIES NAMES vncserver libvncserver)
# libvncserver and libvncclient are in the same package, so it does
# not make sense to add a new cmake script for finding libvncclient.
# instead just find the libvncclient also in this file.
FIND_PATH(LIBVNCCLIENT_INCLUDE_DIR rfb/rfbclient.h)
FIND_LIBRARY(LIBVNCCLIENT_LIBRARIES NAMES vncclient libvncclient)
IF (LIBVNCSERVER_INCLUDE_DIR AND LIBVNCSERVER_LIBRARIES)
SET(CMAKE_REQUIRED_INCLUDES "${LIBVNCSERVER_INCLUDE_DIR}" "${CMAKE_REQUIRED_INCLUDES}")
CHECK_STRUCT_HAS_MEMBER("struct _rfbClient" GotXCutText rfb/rfbclient.h LIBVNCSERVER_FOUND)
ENDIF (LIBVNCSERVER_INCLUDE_DIR AND LIBVNCSERVER_LIBRARIES)
IF (LIBVNCSERVER_FOUND)
IF (NOT LIBVNCSERVER_FIND_QUIETLY)
MESSAGE(STATUS "Found LibVNCServer: ${LIBVNCSERVER_LIBRARIES}")
ENDIF (NOT LIBVNCSERVER_FIND_QUIETLY)
ELSE (LIBVNCSERVER_FOUND)
IF (LIBVNCSERVER_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could NOT find acceptable version of LibVNCServer (version 0.9 or later required).")
ENDIF (LIBVNCSERVER_FIND_REQUIRED)
ENDIF (LIBVNCSERVER_FOUND)
MARK_AS_ADVANCED(LIBVNCSERVER_INCLUDE_DIR LIBVNCSERVER_LIBRARIES)

View File

@@ -1,39 +0,0 @@
# Try to find the Qt4 binding of the Telepathy library
# TELEPATHY_QT4_FOUND - system has TelepathyQt4
# TELEPATHY_QT4_INCLUDE_DIR - the TelepathyQt4 include directory
# TELEPATHY_QT4_LIBRARIES - Link these to use TelepathyQt4
# Copyright (c) 2008, Allen Winter <winter@kde.org>
# Copyright (c) 2009, Andre Moreira Magalhaes <andrunko@gmail.com>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
set(TELEPATHY_QT4_FIND_REQUIRED ${TelepathyQt4_FIND_REQUIRED})
if(TELEPATHY_QT4_INCLUDE_DIR AND TELEPATHY_QT4_LIBRARIES)
# Already in cache, be silent
set(TELEPATHY_QT4_FIND_QUIETLY TRUE)
endif(TELEPATHY_QT4_INCLUDE_DIR AND TELEPATHY_QT4_LIBRARIES)
find_package(PkgConfig)
if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_TELEPATHY_QT4 QUIET TelepathyQt4>=0.1.8)
endif(PKG_CONFIG_FOUND)
find_path(TELEPATHY_QT4_INCLUDE_DIR
NAMES TelepathyQt4/Types
HINTS
${PC_TELEPATHY_QT4_INCLUDEDIR}
${PC_TELEPATHY_QT4_INCLUDE_DIRS}
)
find_library(TELEPATHY_QT4_LIBRARIES
NAMES telepathy-qt4
HINTS
${PC_TELEPATHY_QT4_LIBDIR}
${PC_TELEPATHY_QT4_LIBRARY_DIRS}
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(TELEPATHY_QT4 DEFAULT_MSG
TELEPATHY_QT4_LIBRARIES TELEPATHY_QT4_INCLUDE_DIR)

104
cmake/modules/Findgbm.cmake Normal file
View File

@@ -0,0 +1,104 @@
#.rst:
# Findgbm
# -------
#
# Try to find gbm on a Unix system.
#
# This will define the following variables:
#
# ``gbm_FOUND``
# True if (the requested version of) gbm is available
# ``gbm_VERSION``
# The version of gbm
# ``gbm_LIBRARIES``
# This can be passed to target_link_libraries() instead of the ``gbm::gbm``
# target
# ``gbm_INCLUDE_DIRS``
# This should be passed to target_include_directories() if the target is not
# used for linking
# ``gbm_DEFINITIONS``
# This should be passed to target_compile_options() if the target is not
# used for linking
#
# If ``gbm_FOUND`` is TRUE, it will also define the following imported target:
#
# ``gbm::gbm``
# The gbm library
#
# In general we recommend using the imported target, as it is easier to use.
# Bear in mind, however, that if the target is in the link interface of an
# exported library, it must be made available by the package config file.
#=============================================================================
# SPDX-FileCopyrightText: 2014 Alex Merry <alex.merry@kde.org>
# SPDX-FileCopyrightText: 2014 Martin Gräßlin <mgraesslin@kde.org>
#
# SPDX-License-Identifier: BSD-3-Clause
#=============================================================================
if(CMAKE_VERSION VERSION_LESS 2.8.12)
message(FATAL_ERROR "CMake 2.8.12 is required by Findgbm.cmake")
endif()
if(CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 2.8.12)
message(AUTHOR_WARNING "Your project should require at least CMake 2.8.12 to use Findgbm.cmake")
endif()
if(NOT WIN32)
# Use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
find_package(PkgConfig)
pkg_check_modules(PKG_gbm QUIET gbm)
set(gbm_DEFINITIONS ${PKG_gbm_CFLAGS_OTHER})
set(gbm_VERSION ${PKG_gbm_VERSION})
find_path(gbm_INCLUDE_DIR
NAMES
gbm.h
HINTS
${PKG_gbm_INCLUDE_DIRS}
)
find_library(gbm_LIBRARY
NAMES
gbm
HINTS
${PKG_gbm_LIBRARY_DIRS}
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(gbm
FOUND_VAR
gbm_FOUND
REQUIRED_VARS
gbm_LIBRARY
gbm_INCLUDE_DIR
VERSION_VAR
gbm_VERSION
)
if(gbm_FOUND AND NOT TARGET gbm::gbm)
add_library(gbm::gbm UNKNOWN IMPORTED)
set_target_properties(gbm::gbm PROPERTIES
IMPORTED_LOCATION "${gbm_LIBRARY}"
INTERFACE_COMPILE_OPTIONS "${gbm_DEFINITIONS}"
INTERFACE_INCLUDE_DIRECTORIES "${gbm_INCLUDE_DIR}"
)
endif()
mark_as_advanced(gbm_LIBRARY gbm_INCLUDE_DIR)
# compatibility variables
set(gbm_LIBRARIES ${gbm_LIBRARY})
set(gbm_INCLUDE_DIRS ${gbm_INCLUDE_DIR})
set(gbm_VERSION_STRING ${gbm_VERSION})
else()
message(STATUS "Findgbm.cmake cannot find gbm on Windows systems.")
set(gbm_FOUND FALSE)
endif()
include(FeatureSummary)
set_package_properties(gbm PROPERTIES
URL "https://www.mesa3d.org"
DESCRIPTION "Mesa gbm library."
)

View File

@@ -0,0 +1,374 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2017-2018 Red Hat, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.portal.RemoteDesktop:
@short_description: Remote desktop portal
The Remote desktop portal allows to create remote desktop sessions.
This documentation describes version 1 of this interface.
-->
<interface name="org.freedesktop.portal.RemoteDesktop">
<!--
CreateSession:
@options: Vardict with optional further information
@handle: Object path for the #org.freedesktop.portal.Request object representing this call
Create a remote desktop session.
A remote desktop session is used to allow remote controlling a desktop
session. It can also be used together with a screen cast session (see
org.freedesktop.portal.ScreenCast), but may only be started and stopped
with this interface.
To also get a screen content, call the
#org.freedesktop.ScreenCast.SelectSources with the
#org.freedesktop.Session object created with this method.
Supported keys in the @options vardict include:
<variablelist>
<varlistentry>
<term>handle_token s</term>
<listitem><para>
A string that will be used as the last element of the @handle. Must be a valid
object path element. See the #org.freedesktop.portal.Request documentation for
more information about the @handle.
</para></listitem>
</varlistentry>
<varlistentry>
<term>session_handle_token s</term>
<listitem><para>
A string that will be used as the last element of the session handle. Must be a valid
object path element. See the #org.freedesktop.portal.Session documentation for
more information about the session handle.
</para></listitem>
</varlistentry>
</variablelist>
The following results get returned via the #org.freedesktop.portal.Request::Response signal:
<variablelist>
<varlistentry>
<term>session_handle o</term>
<listitem><para>
The session handle. An object path for the
#org.freedesktop.portal.Session object representing the created
session.
</para></listitem>
</varlistentry>
</variablelist>
-->
<method name="CreateSession">
<arg type="a{sv}" name="options" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantMap"/>
<arg type="o" name="handle" direction="out"/>
</method>
<!--
SelectDevices:
@session_handle: Object path for the #org.freedesktop.portal.Session object
@options: Vardict with optional further information
@handle: Object path for the #org.freedesktop.portal.Request object representing this call
Select input devices to remote control.
Supported keys in the @options vardict include:
<variablelist>
<varlistentry>
<term>handle_token s</term>
<listitem><para>
A string that will be used as the last element of the @handle. Must be a valid
object path element. See the #org.freedesktop.portal.Request documentation for
more information about the @handle.
</para></listitem>
</varlistentry>
<varlistentry>
<term>type u</term>
<listitem><para>
Bitmask of what device types to request remote controlling of.
Default is all.
</para></listitem>
</varlistentry>
</variablelist>
For available source types, see the AvailableDeviceTypes property.
-->
<method name="SelectDevices">
<arg type="o" name="session_handle" direction="in"/>
<arg type="a{sv}" name="options" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="o" name="handle" direction="out"/>
</method>
<!--
Start:
@session_handle: Object path for the #org.freedesktop.portal.Session object
@parent_window: Identifier for the application window, see <link linkend="parent_window">Common Conventions</link>
@options: Vardict with optional further information
@handle: Object path for the #org.freedesktop.portal.Request object representing this call
Start the remote desktop session. This will typically result in the portal
presenting a dialog letting the user select what to share, including
devices and optionally screen content if screen cast sources was
selected.
Supported keys in the @options vardict include:
<variablelist>
<varlistentry>
<term>handle_token s</term>
<listitem><para>
A string that will be used as the last element of the @handle. Must be a valid
object path element. See the #org.freedesktop.portal.Request documentation for
more information about the @handle.
</para></listitem>
</varlistentry>
</variablelist>
The following results get returned via the
#org.freedesktop.portal.Request::Response signal:
<variablelist>
<varlistentry>
<term>devices u</term>
<listitem><para>
A bitmask of the devices selected by the user.
</para></listitem>
</varlistentry>
</variablelist>
If a screen cast source was selected, the results of the
#org.freedesktop.portal.ScreenCast.Start response signal may be
included.
-->
<method name="Start">
<arg type="o" name="session_handle" direction="in"/>
<arg type="s" name="parent_window" direction="in"/>
<arg type="a{sv}" name="options" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="QVariantMap"/>
<arg type="o" name="handle" direction="out"/>
</method>
<!--
NotifyPointerMotion:
@session_handle: Object path for the #org.freedesktop.portal.Session object
@options: Vardict with optional further information
@dx: Relative movement on the x axis
@dy: Relative movement on the y axis
Notify about a new relative pointer motion event. The (dx, dy) vector
represents the new pointer position in the streams logical coordinate
space.
-->
<method name="NotifyPointerMotion">
<arg type="o" name="session_handle" direction="in"/>
<arg type="a{sv}" name="options" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="d" name="dx" direction="in"/>
<arg type="d" name="dy" direction="in"/>
</method>
<!--
NotifyPointerMotionAbsolute:
@session_handle: Object path for the #org.freedesktop.portal.Session object
@options: Vardict with optional further information
@stream: The PipeWire stream node the coordinate is relative to
@x: Pointer motion x coordinate
@y: Pointer motion y coordinate
Notify about a new absolute pointer motion event. The (x, y) position
represents the new pointer position in the streams logical coordinate
space (see the logical_size stream property in
#org.freedesktop.portal.ScreenCast).
-->
<method name="NotifyPointerMotionAbsolute">
<arg type="o" name="session_handle" direction="in"/>
<arg type="a{sv}" name="options" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="u" name="stream" direction="in"/>
<arg type="d" name="x" direction="in"/>
<arg type="d" name="y" direction="in"/>
</method>
<!--
NotifyPointerButton:
@session_handle: Object path for the #org.freedesktop.portal.Session object
@options: Vardict with optional further information
@button: The pointer button was pressed or released
@state: The new state of the button
The pointer button is encoded according to Linux Evdev button codes.
May only be called if POINTER access was provided after starting the
session.
Available button states:
<simplelist>
<member>0: Released</member>
<member>1: Pressed</member>
</simplelist>
-->
<method name="NotifyPointerButton">
<arg type="o" name="session_handle" direction="in"/>
<arg type="a{sv}" name="options" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="i" name="button" direction="in"/>
<arg type="u" name="state" direction="in"/>
</method>
<!--
NotifyPointerAxis:
@session_handle: Object path for the #org.freedesktop.portal.Session object
@options: Vardict with optional further information
@dx: Relative axis movement on the x axis
@dy: Relative axis movement on the y axis
The axis movement from a 'smooth scroll' device, such as a touchpad.
When applicable, the size of the motion delta should be equivalent to
the motion vector of a pointer motion done using the same advice.
May only be called if POINTER access was provided after starting the
session.
Supported keys in the @options vardict include:
<variablelist>
<varlistentry>
<term>finish b</term>
<listitem><para>
If set to true, this is the last axis event in a series, for
example as a result of the fingers being lifted from a touchpad
after a two-finger scroll. Default is false.
</para></listitem>
</varlistentry>
</variablelist>
-->
<method name="NotifyPointerAxis">
<arg type="o" name="session_handle" direction="in"/>
<arg type="a{sv}" name="options" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="d" name="dx" direction="in"/>
<arg type="d" name="dy" direction="in"/>
</method>
<!--
NotifyPointerAxisDiscrete:
@session_handle: Object path for the #org.freedesktop.portal.Session object
@options: Vardict with optional further information
@axis: The axis that was scrolled
@steps: The number of steps scrolled
May only be called if POINTER access was provided after starting the
session.
Available axes:
<simplelist>
<member>0: Vertical scroll</member>
<member>1: Horizontal scroll</member>
</simplelist>
-->
<method name="NotifyPointerAxisDiscrete">
<arg type="o" name="session_handle" direction="in"/>
<arg type="a{sv}" name="options" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="u" name="axis" direction="in"/>
<arg type="i" name="steps" direction="in"/>
</method>
<!--
NotifyKeyboardKeycode:
@session_handle: Object path for the #org.freedesktop.portal.Session object
@options: Vardict with optional further information
@keycode: Keyboard code that was pressed or released
@state: New state of keyboard keysym
May only be called if KEYBOARD access was provided after starting the
session.
Available keyboard keysym states:
<simplelist>
<member>0: Released</member>
<member>1: Pressed</member>
</simplelist>
-->
<method name="NotifyKeyboardKeycode">
<arg type="o" name="session_handle" direction="in"/>
<arg type="a{sv}" name="options" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="i" name="keycode" direction="in"/>
<arg type="u" name="state" direction="in"/>
</method>
<!--
NotifyKeyboardKeysym:
@session_handle: Object path for the #org.freedesktop.portal.Session object
@options: Vardict with optional further information
@keysym: Keyboard symbol that was pressed or released
@state: New state of keyboard keysym
May only be called if KEYBOARD access was provided after starting the
session.
Available keyboard keysym states:
<simplelist>
<member>0: Released</member>
<member>1: Pressed</member>
</simplelist>
-->
<method name="NotifyKeyboardKeysym">
<arg type="o" name="session_handle" direction="in"/>
<arg type="a{sv}" name="options" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="i" name="keysym" direction="in"/>
<arg type="u" name="state" direction="in"/>
</method>
<!--
NotifyTouchDown:
@session_handle: Object path for the #org.freedesktop.portal.Session object
@options: Vardict with optional further information
@stream: The PipeWire stream node the coordinate is relative to
@slot: Touch slot where touch point appeared
@x: Touch down x coordinate
@y: Touch down y coordinate
May only be called if TOUCHSCREEN access was provided after starting the
session.
Notify about a new touch down event. The (x, y) position
represents the new touch point position in the streams logical
coordinate space (see the logical_size stream property in
#org.freedesktop.portal.ScreenCast).
-->
<method name="NotifyTouchDown">
<arg type="o" name="session_handle" direction="in"/>
<arg type="a{sv}" name="options" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="u" name="stream" direction="in"/>
<arg type="u" name="slot" direction="in"/>
<arg type="d" name="x" direction="in"/>
<arg type="d" name="y" direction="in"/>
</method>
<!--
NotifyTouchMotion:
@session_handle: Object path for the #org.freedesktop.portal.Session object
@options: Vardict with optional further information
@stream: The PipeWire stream node the coordinate is relative to
@slot: Touch slot where touch point appeared
@x: Touch motion x coordinate
@y: Touch motion y coordinate
May only be called if TOUCHSCREEN access was provided after starting the
session.
Notify about a new touch motion event. The (x, y) position
represents where the touch point position in the streams logical
coordinate space moved (see the logical_size stream property in
#org.freedesktop.portal.ScreenCast).
-->
<method name="NotifyTouchMotion">
<arg type="o" name="session_handle" direction="in"/>
<arg type="a{sv}" name="options" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="u" name="stream" direction="in"/>
<arg type="u" name="slot" direction="in"/>
<arg type="d" name="x" direction="in"/>
<arg type="d" name="y" direction="in"/>
</method>
<!--
NotifyTouchUp:
@session_handle: Object path for the #org.freedesktop.portal.Session object
@options: Vardict with optional further information
@slot: Touch slot where touch point appeared
May only be called if TOUCHSCREEN access was provided after starting the
session.
Notify about a new touch up event.
-->
<method name="NotifyTouchUp">
<arg type="o" name="session_handle" direction="in"/>
<arg type="a{sv}" name="options" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="u" name="slot" direction="in"/>
</method>
<!--
AvailableDeviceTypes:
A bitmask of available source types. Currently defined types are:
<simplelist>
<member>1: KEYBOARD</member>
<member>2: POINTER</member>
<member>4: TOUCHSCREEN</member>
</simplelist>
-->
<property name="AvailableDeviceTypes" type="u" access="read"/>
<property name="version" type="u" access="read"/>
</interface>
</node>

View File

@@ -0,0 +1,186 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2017-2018 Red Hat, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.portal.ScreenCast:
@short_description: Screen cast portal
-->
<interface name="org.freedesktop.portal.ScreenCast">
<!--
CreateSession:
@options: Vardict with optional further information
@handle: Object path for the #org.freedesktop.portal.Request object representing this call
Create a screen cast session. A successfully created session can at
any time be closed using org.freedesktop.portal.Session::Close, or may
at any time be closed by the portal implementation, which will be
signalled via org.freedesktop.portal.Session::Closed.
The following results get returned via the #org.freedesktop.portal.Request::Response signal:
<variablelist>
<varlistentry>
<term>session_handle o</term>
<listitem><para>
The session handle. An object path for the
#org.freedesktop.portal.Session object representing the created
session.
</para></listitem>
</varlistentry>
</variablelist>
-->
<method name="CreateSession">
<arg type="a{sv}" name="options" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantMap"/>
<arg type="o" name="handle" direction="out"/>
</method>
<!--
SelectSources:
@session_handle: Object path for the #org.freedesktop.portal.Session object
@options: Vardict with optional further information
@handle: Object path for the #org.freedesktop.portal.Request object representing this call
Configure what the screen cast session should record. This method must
be called before starting the session.
Passing invalid input to this method will cause the session to be
closed. An application may only attempt to select sources once per
session.
Supported keys in the @options vardict include:
<variablelist>
<varlistentry>
<term>types u</term>
<listitem><para>
Bitmask of what types of content to record. Default is MONITOR.
</para></listitem>
</varlistentry>
<varlistentry>
<term>multiple b</term>
<listitem><para>
Whether to allow selecting multiple sources. Default is no.
</para></listitem>
</varlistentry>
</variablelist>
For available source types, see the AvailableSourceTypes property.
-->
<method name="SelectSources">
<arg type="o" name="session_handle" direction="in"/>
<arg type="a{sv}" name="options" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="o" name="handle" direction="out"/>
</method>
<!--
Start:
@session_handle: Object path for the #org.freedesktop.portal.Session object
@parent_window: Identifier for the application window
@options: Vardict with optional further information
@handle: Object path for the #org.freedesktop.portal.Request object representing this call
Start the screen cast session. This will typically result the portal
presenting a dialog letting the user do the selection set up by
SelectSources. An application can only attempt start a session once.
A screen cast session may only be started after having selected sources
using org.freedesktop.portal.ScreenCast::SelectSources.
The @parent_window identifier must be of the form "x11:$XID" for an X11
window. Support for other window systems may be added in the future.
The following results get returned via the
#org.freedesktop.portal.Request::Response signal:
<variablelist>
<varlistentry>
<term>streams a(ua{sv})</term>
<listitem><para>
An array of PipeWire streams. Each stream consists of a PipeWire
node ID (the first element in the tuple, and a Vardict of
properties.
The array will contain a single stream if 'multiple' (see
SelectSources) was set to 'false', or at least one stream if
'multiple' was set to 'true' as part of the SelectSources method.
</para></listitem>
</varlistentry>
</variablelist>
Stream properties include:
<variablelist>
<varlistentry>
<term>position (ii)</term>
<listitem><para>
A tuple consisting of the position (x, y) in the compositor
coordinate space. Note that the position may not be equivalent to a
position in a pixel coordinate space. Only available for monitor
streams.
</para></listitem>
</varlistentry>
<varlistentry>
<term>size (ii)</term>
<listitem><para>
A tuple consisting of (width, height). The size represents the size
of the stream as it is displayed in the compositor coordinate
space. Note that this size may not be equivalent to a size in a
pixel coordinate space. The size may differ from the size of the
stream.
</para></listitem>
</varlistentry>
</variablelist>
-->
<method name="Start">
<arg type="o" name="session_handle" direction="in"/>
<arg type="s" name="parent_window" direction="in"/>
<arg type="a{sv}" name="options" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="QVariantMap"/>
<arg type="o" name="handle" direction="out"/>
</method>
<!--
OpenPipeWireRemote:
@session_handle: Object path for the #org.freedesktop.portal.Session object
@options: Vardict with optional further information
@fd: File descriptor of an open PipeWire remote.
Open a file descriptor to the PipeWire remote where the screen cast
streams are available. The file descriptor should be used to create a
<classname>pw_remote</classname> object, by using
<function>pw_remote_connect_fd</function>. Only the screen cast stream
nodes will be available from this PipeWire node.
-->
<method name="OpenPipeWireRemote">
<annotation name="org.gtk.GDBus.C.Name" value="open_pipewire_remote"/>
<annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
<arg type="o" name="session_handle" direction="in"/>
<arg type="a{sv}" name="options" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="h" name="fd" direction="out"/>
</method>
<!--
AvailableSourceTypes:
A bitmask of available source types. Currently defined types are:
<simplelist>
<member>1: MONITOR</member>
<member>2: WINDOW</member>
</simplelist>
-->
<property name="AvailableSourceTypes" type="u" access="read"/>
<property name="version" type="u" access="read"/>
</interface>
</node>

View File

@@ -1,2 +1,2 @@
########### install files ###############
kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en)
kdoctools_create_handbook(index.docbook INSTALL_DESTINATION ${KDE_INSTALL_DOCBUNDLEDIR}/en SUBDIR krfb)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

View File

@@ -1,21 +1,10 @@
<?xml version="1.0" ?>
<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
<!ENTITY kappname "&krfb;">
<!ENTITY package "kdenetwork">
<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.5-Based Variant V1.1//EN" "dtd/kdedbx45.dtd" [
<!ENTITY % addindex "IGNORE">
<!ENTITY % English "INCLUDE"> <!-- ONLY If you are writing non-English
original documentation, change
the language here -->
<!-- Do not define any other entities; instead, use the entities
from entities/general.entities and $LANG/user.entities. -->
<!ENTITY % English "INCLUDE">
]>
<!-- Based on kdoctemplate v0.9 January 10 2003 -->
<book lang="&language;">
<!-- This header contains all of the meta-information for the document such
as Authors, publish date, the abstract, and Keywords -->
<book id="krfb" lang="&language;">
<bookinfo>
<title>The &krfb; Handbook</title>
@@ -32,21 +21,11 @@ as Authors, publish date, the abstract, and Keywords -->
<year>2003</year>
<holder>&Brad.Hards;</holder>
</copyright>
<!-- Translators: put here the copyright notice of the translation -->
<legalnotice>&FDLNotice;</legalnotice>
<!-- Date and version information of the documentation
Don't forget to include this last date and this last revision number, we
need them for translation coordination !
Please respect the format of the date (YYYY-MM-DD) and of the version
(V.MM.LL), it could be used by automation scripts.
Do NOT change these in the translation. -->
<date>2010-02-09</date>
<releaseinfo>&kde; 4.4</releaseinfo>
<!-- Abstract about this handbook -->
<date>2016-07-25</date>
<releaseinfo>5.0 (Applications 16.08)</releaseinfo>
<abstract>
<para>
@@ -56,10 +35,6 @@ view or even control the desktop.
</para>
</abstract>
<!-- This is a set of Keywords for indexing by search engines.
Please at least include KDE, the KDE package it is in, the name
of your application, and a few relevant keywords. -->
<keywordset>
<keyword>KDE</keyword>
<keyword>kdenetwork</keyword>
@@ -75,23 +50,9 @@ Please at least include KDE, the KDE package it is in, the name
</bookinfo>
<!-- The contents of the documentation begin here. Label
each chapter so with the id attribute. This is necessary for two reasons: it
allows you to easily reference the chapter from other chapters of your
document, and if there is no ID, the name of the generated HTML files will vary
from time to time making it hard to manage for maintainers and for the CVS
system. Any chapter labelled (OPTIONAL) may be left out at the author's
discretion. Other chapters should not be left out in order to maintain a
consistent documentation style across all KDE apps. -->
<chapter id="introduction">
<title>Introduction</title>
<!-- The introduction chapter contains a brief introduction for the
application that explains what it does and where to report
problems. Basically a long version of the abstract. Don't include a
revision history. (see installation appendix comment) -->
<para>
&krfb; is a server application that allows you to share your current
session with a user on another machine, who can use a <acronym>VNC</acronym> client to
@@ -112,7 +73,7 @@ to help you perform a task.
<para>
Please report any problems or feature requests to the &kde; mailing
lists or file a bug at <ulink
url="http://bugs.kde.org">http://bugs.kde.org</ulink>.
url="https://bugs.kde.org">https://bugs.kde.org</ulink>.
</para>
</chapter>
@@ -165,10 +126,8 @@ use &krfb; over other links, but performance is unlikely to be as good.
<chapter id="using-krfb">
<title>Using &krfb;</title>
<!-- This chapter should tell the user how to use your app. You should use as
many sections (Chapter, Sect1, Sect3, etc...) as is necessary to fully document
your application. -->
<sect1 id="main-windw">
<title>&krfb; Main Window</title>
<para>
It is very easy to use &krfb; - it has a simple interface, as shown in
the screenshot below.
@@ -189,64 +148,69 @@ the screenshot below.
</para>
<para>
When you want to allow someone to access your desktop, you can create
an personal invitation using the <guibutton>New Personal
Invitation...</guibutton> button, which will bring up a window
containing the information needed to access your desktop. An example
is shown below.
When you want to allow someone to access your desktop, you have to
enable the checkbox <guilabel>Enable Desktop Sharing</guilabel>,
which will start the server.
</para>
<sect2 id="connection-details">
<title>Connection Details</title>
<para>
The <guilabel>Address</guilabel> contains the address of your
computer and the port number, separated by a colon.
The address is just a hint - you can use any address that can
reach your computer. &krfb; tries to guess your address from your
network configuration, but does not always succeed in doing so.
If your computer is behind a firewall it may have a different
address or be unreachable for other computers.
</para>
<para>
You can change the port on the <guilabel>Network</guilabel>
page in the configuration dialog.
</para>
<para>
The next field is prefilled with an automatically generated password.
Click in the icon at the right of the field to change the password.
</para>
</sect2>
<sect2 id="unattended-access">
<title>Unattended Access</title>
<para>
Any remote user with the desktop sharing password will have to be authenticated.
If unattended access is activated, and the remote user provides the password
for unattended mode, desktop sharing access will be granted without explicit
confirmation.
</para>
<para>
By default the password for this mode is empty, to change that click on
the button and enter a password.
</para>
<para>
If unattended access is allowed, then you should probably specify a
password.
</para>
<para>
<screenshot>
<screeninfo>Example &krfb; personal invitation</screeninfo>
<mediaobject>
<imageobject>
<imagedata fileref="personal_invitation.png" format="PNG"/>
</imageobject>
<textobject>
<phrase>Example &krfb; personal invitation</phrase>
</textobject>
</mediaobject>
</screenshot>
If the machine is a server and you are using &krfb; for remote
administration, you probably want to use unattended access.
</para>
<para>
To increase security, the invitation is only valid for an
hour after it is created, and of course the person connecting has to
have the correct password.
</para>
</sect2>
<sect2 id="transfer-login-information">
<title>Transfer Login Information</title>
<para>
Since you may want to invite someone to access your desktop by email,
&krfb; can create invitations as email messages. You can create such
an invitation using the <guibutton>New Email Invitation...</guibutton>
button on the &krfb; main window. This will usually bring up an email
message that looks like the following, ready for you to type in the
email address of the person you are sending the invitation to.
</para>
<para>
<screenshot>
<screeninfo>Example &krfb; email invitation</screeninfo>
<mediaobject>
<imageobject>
<imagedata fileref="email_invitation.png" format="PNG"/>
</imageobject>
<textobject>
<phrase>Example &krfb; email invitation</phrase>
</textobject>
</mediaobject>
</screenshot>
</para>
<warning>
<para>
&krfb; will warn you about the security implications of sending this
information across an insecure link. You must heed those warnings.
&krfb; has no invitation feature any more as in previous versions.
So you have to transfer the login information yourself using email
or a personal invitation.
</para>
<para>
If you cannot encrypt the email (or otherwise secure the link),
sending invitations by email is a very serious security risk, since
sending a password by email is a very serious security risk, since
anyone can read the password and address from the email as it passes
over the network. This means that they can potentially take control of
your machine.
@@ -255,33 +219,32 @@ your machine.
If you cannot encrypt the email message, it may be better to use a
personal invitation, telephone the person you are giving access to,
verify the identity of that person, and provide the required
invitation information that way.
information that way.
</para>
</warning>
<sect1 id="krfb-managing-invitations">
<title>Managing &krfb; invitations</title>
<note>
<para>
Having created an invitation (either a personal invitation or one that
was sent by email), &krfb; main window allows you to delete existing
invitations. To just delete one of the invitations, select it with the
mouse (it should become highlighted), and then select
the <guibutton>Delete</guibutton>. To delete all invitations, just
select the <guibutton>Delete All</guibutton> button.
&krfb; uses the normal <acronym>RFB</acronym> password system, which does not transfer
your password in the clear across the network. Instead, it uses a
challenge-response system. This is reasonably secure, as long as the
password is securely guarded.
</para>
</note>
</sect1>
</sect2>
<sect1 id="krfb-qit">
<sect2 id="krfb-qqit">
<title>Quit &krfb;</title>
<para>
If you close the &krfb; main window the server keeps running, which is
indicated by an icon in the system tray.
To stop &krfb; right click on the icon in the systems tray and select
If you close the &krfb; main window by clicking on the window close icon or using the
shortcut <keycombo action="simul">&Alt;<keycap>F4</keycap></keycombo> the server
keeps running, which is indicated by an icon in the system tray.
To stop &krfb; either use <menuchoice><guimenu>File</guimenu><guimenuitem>Quit</guimenuitem></menuchoice>
in the main window or right click on the icon in the system tray and select
<guimenuitem>Quit</guimenuitem>.
</para>
</sect2>
</sect1>
@@ -290,7 +253,7 @@ To stop &krfb; right click on the icon in the systems tray and select
<para>
In addition to the main &krfb; interface shown and described above,
you can also control &krfb; using the
<guibutton>Configure...</guibutton> on the &krfb; main window. The &krfb;
<guimenuitem>Configure...</guimenuitem> on the &krfb; main window. The &krfb;
configuration has two pages, as shown in the screenshot below:
</para>
@@ -314,8 +277,8 @@ The <guilabel>Network</guilabel> page allows control over the port that
</para>
<para>
The <guilabel>Announce service on the network</guilabel> checkbox
controls whether &krfb; announces invitations over the network using
The <guilabel>Announce service on the local network</guilabel> checkbox
controls whether &krfb; announces the service over the local network using
Service Location Protocol. This is normally a good idea, but only
works really well with a Service Location Protocol aware client, such
as &krdc;.
@@ -323,8 +286,8 @@ as &krdc;.
<para>
If you select the <guilabel>Use default port</guilabel> checkbox,
then &krfb; will locate a suitable port, and invitations will match
this port. If you deselect this checkbox, you can specify a particular
then &krfb; will locate a suitable port.
If you deselect this checkbox, you can specify a particular
port. Specifying a particular port may be useful if you are using
port-forwarding on the firewall. Note that if Service Location
Protocol is turned on, this will automatically deal with identifying
@@ -332,8 +295,8 @@ the correct port.
</para>
<para>
The <guilabel>Security</guilabel> page allows you configure settings
related to access to the &krfb; server.
The <guilabel>Security</guilabel> page allows you to configure whether the
person connecting to the &krfb; server can control the desktop, or only view.
</para>
<para>
@@ -350,41 +313,15 @@ related to access to the &krfb; server.
</screenshot>
</para>
<para>
The <guilabel>Allow uninvited connections</guilabel> check box controls
whether &krfb; allows connection without an invitation. If uninvited
connections are allowed, then you should probably specify a
password. You can also use the check boxes here to choose whether you
have to confirm the connection before it proceeds, and whether the
person connecting can control the desktop, or only view.
</para>
<para>
If the machine is a workstation, and you choose to allow uninvited
connections, you probably want to select the <guilabel>Ask
before accepting connections </guilabel>. Conversely, if the
machine is a server and you are using &krfb; for remote
administration, you probably want to deselect this option.
</para>
<note>
<para>
&krfb; uses the normal <acronym>RFB</acronym> password system, which does not transfer
your password in the clear across the network. Instead, it uses a
challenge-response system. This is reasonably secure, as long as the
password is securely guarded.
</para>
</note>
</sect1>
<sect1 id="krfb-connection">
<title>What happens when someone connects to &krfb;</title>
<title>Connecting to &krfb;</title>
<para>
When someone connects to &krfb; on your machine, you will get a pop-up
notification that looks like the following screenshot, unless you are
accepting uninvited connections without warning.
accepting unattended access without confirmation.
</para>
<para>
<screenshot>
@@ -402,8 +339,8 @@ accepting uninvited connections without warning.
<para>
If you <guibutton>Accept Connection</guibutton>, the client can
proceed to authenticate (which requires the correct password for a
personal invitation or email invitation). If you <guibutton>Refuse
proceed to authenticate, which requires the correct password for a
login. If you <guibutton>Refuse
Connection</guibutton>, then the attempt to connect will be terminated.
</para>
@@ -413,23 +350,11 @@ mouse</guilabel> check box determines whether this client can only
observe, or can take control of your machine.
</para>
<para>
If the client connection is successful, and used the password from a
personal invitation or email invitation, then that invitation is
deleted and cannot be used again. You will also get a small pop-up
window in the dock, that shows that the connection has been made.
</para>
</sect1>
</chapter>
<chapter id="credits">
<!-- Include credits for the programmers, documentation writers, and
contributors here. The license for your software should then be included below
the credits with a reference to the appropriate license file included in the KDE
distribution. -->
<title>Credits and License</title>
<para>
@@ -458,33 +383,6 @@ Documentation Copyright &copy; 2003 &Brad.Hards; &Brad.Hards.mail;
</chapter>
<appendix id="installation">
<title>Installation</title>
<sect1 id="getting-krfb">
<title>How to obtain &krfb;</title>
<!-- This first entity contains boiler plate for applications that are
part of KDE CVS. You should remove it if you are releasing your
application -->
&install.intro.documentation;
</sect1>
<sect1 id="compilation">
<title>Compilation and Installation</title>
<!-- This entity contains the boilerplate text for standard -->
<!-- compilation instructions. If your application requires any -->
<!-- special handling, remove it, and replace with your own text. -->
&install.compile.documentation;
</sect1>
</appendix>
&documentation.index;
</book>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 33 KiB

6
events/CMakeLists.txt Normal file
View File

@@ -0,0 +1,6 @@
add_subdirectory(x11)
# Makes sense to use only when PW framebuffer is used
if (TARGET K::KPipeWire)
add_subdirectory(xdp)
endif()

19
events/x11/CMakeLists.txt Normal file
View File

@@ -0,0 +1,19 @@
include_directories (${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
)
set (krfb_events_x11_SRCS
x11events.cpp
x11eventsplugin.cpp
)
add_library (krfb_events_x11 MODULE ${krfb_events_x11_SRCS})
target_link_libraries (krfb_events_x11
${X11_XTest_LIB}
KF6::CoreAddons
krfbprivate
)
set_target_properties(krfb_events_x11 PROPERTIES OUTPUT_NAME x11)
install (TARGETS krfb_events_x11 DESTINATION ${KDE_INSTALL_PLUGINDIR}/krfb/events)

199
events/x11/x11events.cpp Normal file
View File

@@ -0,0 +1,199 @@
/*
This file is part of the KDE project
Copyright (C) 2016 by Oleg Chernovskiy <kanedias@xaker.ru>
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 2 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; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "x11events.h"
#include <QApplication>
#include <QGlobalStatic>
#include <QtGui/private/qtx11extras_p.h>
#include <X11/Xutil.h>
#include <X11/keysym.h>
#include <X11/extensions/XTest.h>
enum {
LEFTSHIFT = 1,
RIGHTSHIFT = 2,
ALTGR = 4
};
class EventData
{
public:
EventData();
//keyboard
Display *dpy = nullptr;
signed char modifiers[0x100] = {};
KeyCode keycodes[0x100] = {};
KeyCode leftShiftCode = 0;
KeyCode rightShiftCode = 0;
KeyCode altGrCode = 0;
char modifierState = 0;
//mouse
int buttonMask = 0;
int x = 0;
int y = 0;
private:
void init();
};
Q_GLOBAL_STATIC(EventData, data)
EventData::EventData()
{
init();
}
void EventData::init()
{
buttonMask = 0;
dpy = QX11Info::display();
//initialize keycodes
KeySym key, *keymap;
int i, j, minkey, maxkey, syms_per_keycode;
memset(modifiers, -1, sizeof(modifiers));
XDisplayKeycodes(dpy, &minkey, &maxkey);
Q_ASSERT(minkey >= 8);
Q_ASSERT(maxkey < 256);
keymap = (KeySym *) XGetKeyboardMapping(dpy, minkey,
(maxkey - minkey + 1),
&syms_per_keycode);
Q_ASSERT(keymap);
for (i = minkey; i <= maxkey; i++) {
for (j = 0; j < syms_per_keycode; j++) {
key = keymap[(i-minkey)*syms_per_keycode+j];
if (key >= ' ' && key < 0x100 && i == XKeysymToKeycode(dpy, key)) {
keycodes[key] = i;
modifiers[key] = j;
}
}
}
leftShiftCode = XKeysymToKeycode(dpy, XK_Shift_L);
rightShiftCode = XKeysymToKeycode(dpy, XK_Shift_R);
altGrCode = XKeysymToKeycode(dpy, XK_Mode_switch);
XFree((char *)keymap);
}
/* this function adjusts the modifiers according to mod (as from modifiers) and data->modifierState */
static void tweakModifiers(signed char mod, bool down)
{
bool isShift = data->modifierState & (LEFTSHIFT | RIGHTSHIFT);
if (mod < 0) {
return;
}
if (isShift && mod != 1) {
if (data->modifierState & LEFTSHIFT) {
XTestFakeKeyEvent(data->dpy, data->leftShiftCode,
down, CurrentTime);
}
if (data->modifierState & RIGHTSHIFT) {
XTestFakeKeyEvent(data->dpy, data->rightShiftCode,
down, CurrentTime);
}
}
if (!isShift && mod == 1) {
XTestFakeKeyEvent(data->dpy, data->leftShiftCode,
down, CurrentTime);
}
if ((data->modifierState & ALTGR) && mod != 2) {
XTestFakeKeyEvent(data->dpy, data->altGrCode,
!down, CurrentTime);
}
if (!(data->modifierState & ALTGR) && mod == 2) {
XTestFakeKeyEvent(data->dpy, data->altGrCode,
down, CurrentTime);
}
}
void X11EventHandler::handleKeyboard(bool down, rfbKeySym keySym)
{
#define ADJUSTMOD(sym,state) \
if(keySym==sym) { if(down) data->modifierState|=state; else data->modifierState&=~state; }
if (QX11Info::isPlatformX11()) {
ADJUSTMOD(XK_Shift_L, LEFTSHIFT);
ADJUSTMOD(XK_Shift_R, RIGHTSHIFT);
ADJUSTMOD(XK_Mode_switch, ALTGR);
if (keySym >= ' ' && keySym < 0x100) {
KeyCode k;
if (down) {
tweakModifiers(data->modifiers[keySym], True);
}
k = data->keycodes[keySym];
if (k != NoSymbol) {
XTestFakeKeyEvent(data->dpy, k, down, CurrentTime);
}
if (down) {
tweakModifiers(data->modifiers[keySym], False);
}
} else {
KeyCode k = XKeysymToKeycode(data->dpy, keySym);
if (k != NoSymbol) {
XTestFakeKeyEvent(data->dpy, k, down, CurrentTime);
}
}
}
/*
// Wayland platform and pipweire plugin in use
if (KrfbConfig::preferredFrameBufferPlugin() == QStringLiteral("pw")) {
}*/
}
void X11EventHandler::handlePointer(int buttonMask, int x, int y)
{
if (QX11Info::isPlatformX11()) {
XTestFakeMotionEvent(data->dpy, 0, x, y, CurrentTime);
for (int i = 0; i < 5; i++) {
if ((data->buttonMask&(1 << i)) != (buttonMask&(1 << i))) {
XTestFakeButtonEvent(data->dpy,
i + 1,
(buttonMask&(1 << i)) ? True : False,
CurrentTime);
}
}
data->buttonMask = buttonMask;
}
}

41
events/x11/x11events.h Normal file
View File

@@ -0,0 +1,41 @@
/*
This file is part of the KDE project
Copyright (C) 2016 by Oleg Chernovskiy <kanedias@xaker.ru>
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 2 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; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef EVENTS_X11EVENTS_H
#define EVENTS_X11EVENTS_H
#include "../../krfb/events.h"
class X11EventHandler : public EventHandler
{
Q_OBJECT
public:
explicit X11EventHandler(QObject *parent = nullptr)
: EventHandler(parent)
{
};
void handleKeyboard(bool down, rfbKeySym key) override;
void handlePointer(int buttonMask, int x, int y) override;
};
#endif

View File

@@ -1,6 +1,5 @@
/* This file is part of the KDE project
Copyright (C) 2009 Collabora Ltd <info@collabora.co.uk>
@author George Goldberg <george.goldberg@collabora.co.uk>
Copyright (C) 2016 Oleg Chernovskiy <kanedias@xaker.ru>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
@@ -18,30 +17,29 @@
Boston, MA 02110-1301, USA.
*/
#include "qtframebufferplugin.h"
#include "x11eventsplugin.h"
#include "qtframebuffer.h"
#include "x11events.h"
#include <KGenericFactory>
#include <KPluginFactory>
#include <QtGui/private/qtx11extras_p.h>
QtFrameBufferPlugin::QtFrameBufferPlugin(QObject *parent, const QVariantList &args)
: FrameBufferPlugin(parent, args)
K_PLUGIN_CLASS(X11EventsPlugin)
X11EventsPlugin::X11EventsPlugin(QObject *parent, const QVariantList &args)
: EventsPlugin(parent, args)
{
}
QtFrameBufferPlugin::~QtFrameBufferPlugin()
EventHandler *X11EventsPlugin::eventHandler()
{
// works only under X11
if(!QX11Info::isPlatformX11())
return nullptr;
return new X11EventHandler();
}
FrameBuffer *QtFrameBufferPlugin::frameBuffer(WId id)
{
return new QtFrameBuffer(id);
}
K_PLUGIN_FACTORY(factory, registerPlugin<QtFrameBufferPlugin>();) \
K_EXPORT_PLUGIN(factory("krfb_framebuffer_qt"))
#include "qtframebufferplugin.moc"
#include "x11eventsplugin.moc"

View File

@@ -1,5 +1,5 @@
/* This file is part of the KDE project
Copyright (C) 2004 Nadeem Hasan <nhasan@kde.org>
Copyright (C) 2016 Oleg Chernovskiy <kanedias@xaker.ru>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
@@ -17,41 +17,26 @@
Boston, MA 02110-1301, USA.
*/
#ifndef INVITEDIALOG_H
#define INVITEDIALOG_H
#ifndef KRFB_EVENTS_X11_X11EVENTSPLUGIN_H
#define KRFB_EVENTS_X11_X11EVENTSPLUGIN_H
#include "ui_invitewidget.h"
#include "eventsplugin.h"
#include <KDialog>
#include <QWidget>
class QWidget;
class EventHandler;
class InviteDialog : public KDialog, public Ui::InviteWidget
class X11EventsPlugin : public EventsPlugin
{
Q_OBJECT
public:
InviteDialog(QWidget *parent);
~InviteDialog() {}
X11EventsPlugin(QObject *parent, const QVariantList &args);
void enableInviteButton(bool enable);
EventHandler *eventHandler() override;
public Q_SLOTS:
void setInviteCount(int count);
void showWhatsthis();
signals:
void createInviteClicked();
void emailInviteClicked();
void manageInviteClicked();
void configureClicked();
protected Q_SLOTS:
void slotUser1();
protected:
QWidget *m_inviteWidget;
private:
Q_DISABLE_COPY(X11EventsPlugin)
};
#endif // INVITEDIALOG_H
#endif // Header guard

28
events/xdp/CMakeLists.txt Normal file
View File

@@ -0,0 +1,28 @@
include_directories (${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
)
set (krfb_events_xdp_SRCS
xdpevents.cpp
xdpeventsplugin.cpp
)
qt_add_dbus_interface(
krfb_events_xdp_SRCS
${CMAKE_SOURCE_DIR}/dbus/xdp_dbus_remotedesktop_interface.xml
xdp_dbus_remotedesktop_interface
)
add_library (krfb_events_xdp MODULE ${krfb_events_xdp_SRCS})
target_link_libraries (krfb_events_xdp
KF6::CoreAddons
KF6::I18n
Qt::DBus
krfbprivate
)
set_target_properties(krfb_events_xdp PROPERTIES OUTPUT_NAME xdp)
install (TARGETS krfb_events_xdp
DESTINATION ${KDE_INSTALL_PLUGINDIR}/krfb/events
)

121
events/xdp/xdpevents.cpp Normal file
View File

@@ -0,0 +1,121 @@
/*
This file is part of the KDE project
Copyright (C) 2018-2019 Jan Grulich <jgrulich@redhat.com>
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 2 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; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "xdpevents.h"
#include "rfbservermanager.h"
#include "xdp_dbus_remotedesktop_interface.h"
#include <linux/input.h>
#include <QApplication>
#include <QGlobalStatic>
class EventData
{
public:
EventData();
//mouse
int buttonMask = 0;
int x = 0;
int y = 0;
QScopedPointer<OrgFreedesktopPortalRemoteDesktopInterface> dbusXdpRemoteDesktopService;
private:
void init();
};
Q_GLOBAL_STATIC(EventData, data)
EventData::EventData()
{
init();
}
void EventData::init()
{
dbusXdpRemoteDesktopService.reset(new OrgFreedesktopPortalRemoteDesktopInterface(QStringLiteral("org.freedesktop.portal.Desktop"),
QStringLiteral("/org/freedesktop/portal/desktop"), QDBusConnection::sessionBus()));
}
void XdpEventHandler::handleKeyboard(bool down, rfbKeySym keySym)
{
const QDBusObjectPath sessionHandle = frameBuffer()->customProperty(QStringLiteral("session_handle")).value<QDBusObjectPath>();
data->dbusXdpRemoteDesktopService->NotifyKeyboardKeysym(sessionHandle, {}, keySym, down);
}
void XdpEventHandler::handlePointer(int buttonMask, int x, int y)
{
const uint streamNodeId = frameBuffer()->customProperty(QStringLiteral("stream_node_id")).toUInt();
const QDBusObjectPath sessionHandle = frameBuffer()->customProperty(QStringLiteral("session_handle")).value<QDBusObjectPath>();
if (streamNodeId == 0 || sessionHandle.path().isEmpty()) {
return;
}
if (x != data->x || y != data->y) {
data->dbusXdpRemoteDesktopService->NotifyPointerMotionAbsolute(sessionHandle, QVariantMap(), streamNodeId, x, y);
data->x = x;
data->y = y;
}
if (buttonMask != data->buttonMask) {
int i = 0;
QVector<int> buttons = { BTN_LEFT, BTN_MIDDLE, BTN_RIGHT, 0, 0, 0, 0, BTN_SIDE, BTN_EXTRA };
for (auto it = buttons.constBegin(); it != buttons.constEnd(); ++it) {
int prevButtonState = (data->buttonMask >> i) & 0x01;
int currentButtonState = (buttonMask >> i) & 0x01;
if (prevButtonState != currentButtonState) {
if (*it) {
data->dbusXdpRemoteDesktopService->NotifyPointerButton(sessionHandle, QVariantMap(), *it, buttonMask);
} else {
int axis = 0;
int steps = 0;
switch (i) {
case 3:
axis = 0; // Vertical
steps = -1;
break;
case 4:
axis = 0; // Vertical
steps = 1;
break;
case 5:
axis = 1; // Horizontal
steps = -1;
break;
case 6:
axis = 1; // Horizontal
steps = 1;
break;
}
data->dbusXdpRemoteDesktopService->NotifyPointerAxisDiscrete(sessionHandle, QVariantMap(), axis, steps);
}
}
++i;
}
data->buttonMask = buttonMask;
}
}

37
events/xdp/xdpevents.h Normal file
View File

@@ -0,0 +1,37 @@
/*
This file is part of the KDE project
Copyright (C) 2018-2019 Jan Grulich <jgrulich@redhat.com>
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 2 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; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef EVENTS_XDPEVENTS_H
#define EVENTS_XDPEVENTS_H
#include "../../krfb/events.h"
class XdpEventHandler : public EventHandler
{
Q_OBJECT
public:
void handleKeyboard(bool down, rfbKeySym key) override;
void handlePointer(int buttonMask, int x, int y) override;
};
#endif

View File

@@ -0,0 +1,42 @@
/*
This file is part of the KDE project
Copyright (C) 2018-2019 Jan Grulich <jgrulich@redhat.com>
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 2 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; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "xdpeventsplugin.h"
#include "xdpevents.h"
#include <KPluginFactory>
K_PLUGIN_CLASS(XdpEventsPlugin)
XdpEventsPlugin::XdpEventsPlugin(QObject *parent, const QVariantList &args)
: EventsPlugin(parent, args)
{
}
EventHandler *XdpEventsPlugin::eventHandler()
{
// works only under Wayland
return new XdpEventHandler();
}
#include "xdpeventsplugin.moc"

View File

@@ -0,0 +1,45 @@
/*
This file is part of the KDE project
Copyright (C) 2018-2019 Jan Grulich <jgrulich@redhat.com>
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 2 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; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef KRFB_EVENTS_XDP_XDPEVENTSPLUGIN_H
#define KRFB_EVENTS_XDP_XDPEVENTSPLUGIN_H
#include "eventsplugin.h"
#include <QWidget>
class EventHandler;
class XdpEventsPlugin : public EventsPlugin
{
Q_OBJECT
public:
XdpEventsPlugin(QObject *parent, const QVariantList &args);
EventHandler *eventHandler() override;
private:
Q_DISABLE_COPY(XdpEventsPlugin)
};
#endif // Header guard

View File

@@ -1,3 +1,7 @@
add_subdirectory (qt)
add_subdirectory (x11)
if (${XCB_DAMAGE_FOUND} AND ${XCB_SHM_FOUND} AND ${XCB_IMAGE_FOUND})
add_subdirectory (xcb)
endif()
if (TARGET K::KPipeWire)
add_subdirectory(pipewire)
endif()

View File

@@ -0,0 +1,58 @@
include_directories (${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
)
set (krfb_framebuffer_pw_SRCS
pw_framebuffer.cpp
pw_framebufferplugin.cpp
screencasting.cpp
)
ecm_add_qtwayland_client_protocol(krfb_framebuffer_pw_SRCS
PROTOCOL ${PLASMA_WAYLAND_PROTOCOLS_DIR}/screencast.xml
BASENAME zkde-screencast-unstable-v1
)
ecm_qt_declare_logging_category(krfb_framebuffer_pw_SRCS
HEADER krfb_fb_pipewire_debug.h
IDENTIFIER KRFB_FB_PIPEWIRE
CATEGORY_NAME krfb.framebuffer.pipewire
DESCRIPTION "KRFB PipeWire framebuffer plugin"
EXPORT KRFB
)
qt_add_dbus_interface(
krfb_framebuffer_pw_SRCS
${CMAKE_SOURCE_DIR}/dbus/xdp_dbus_screencast_interface.xml
xdp_dbus_screencast_interface
)
qt_add_dbus_interface(
krfb_framebuffer_pw_SRCS
${CMAKE_SOURCE_DIR}/dbus/xdp_dbus_remotedesktop_interface.xml
xdp_dbus_remotedesktop_interface
)
add_library(krfb_framebuffer_pw
MODULE
${krfb_framebuffer_pw_SRCS}
)
set_property(TARGET krfb_framebuffer_pw PROPERTY C_STANDARD 99)
target_link_libraries(krfb_framebuffer_pw
Qt::Core
Qt::Gui
Qt::DBus
KF6::CoreAddons
Plasma::KWaylandClient
Wayland::Client
krfbprivate
K::KPipeWire
K::KPipeWireDmaBuf
)
set_target_properties(krfb_framebuffer_pw PROPERTIES OUTPUT_NAME pw)
install (TARGETS krfb_framebuffer_pw
DESTINATION ${KDE_INSTALL_PLUGINDIR}/krfb/framebuffer
)

View File

@@ -0,0 +1,5 @@
{
"X-KDE-OnlyShowOnQtPlatforms": [
"wayland"
]
}

View File

@@ -0,0 +1,516 @@
/* This file is part of the KDE project
Copyright (C) 2018-2021 Jan Grulich <jgrulich@redhat.com>
Copyright (C) 2018 Oleg Chernovskiy <kanedias@xaker.ru>
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.
*/
#include "config-krfb.h"
// system
#include <sys/mman.h>
#include <cstring>
// Qt
#include <QCoreApplication>
#include <QGuiApplication>
#include <QScreen>
#include <QSocketNotifier>
#include <QDebug>
#include <QRandomGenerator>
#include <KWayland/Client/connection_thread.h>
#include <KWayland/Client/registry.h>
// pipewire
#include <climits>
#include "pw_framebuffer.h"
#include "xdp_dbus_screencast_interface.h"
#include "xdp_dbus_remotedesktop_interface.h"
#include "krfb_fb_pipewire_debug.h"
#include "screencasting.h"
#include <PipeWireSourceStream>
#include <kpipewire_version.h>
#include <DmaBufHandler>
static const int BYTES_PER_PIXEL = 4;
static const uint MIN_SUPPORTED_XDP_KDE_SC_VERSION = 1;
Q_DECLARE_METATYPE(PWFrameBuffer::Stream);
Q_DECLARE_METATYPE(PWFrameBuffer::Streams);
const QDBusArgument &operator >> (const QDBusArgument &arg, PWFrameBuffer::Stream &stream)
{
arg.beginStructure();
arg >> stream.nodeId;
arg.beginMap();
while (!arg.atEnd()) {
QString key;
QVariant map;
arg.beginMapEntry();
arg >> key >> map;
arg.endMapEntry();
stream.map.insert(key, map);
}
arg.endMap();
arg.endStructure();
return arg;
}
/**
* @brief The PWFrameBuffer::Private class - private counterpart of PWFramebuffer class. This is the entity where
* whole logic resides, for more info search for "d-pointer pattern" information.
*/
class PWFrameBuffer::Private {
public:
Private(PWFrameBuffer *q);
~Private();
private:
friend class PWFrameBuffer;
void initDbus();
// dbus handling
void handleSessionCreated(quint32 code, const QVariantMap &results);
void handleDevicesSelected(quint32 code, const QVariantMap &results);
void handleSourcesSelected(quint32 code, const QVariantMap &results);
void handleRemoteDesktopStarted(quint32 code, const QVariantMap &results);
void setVideoSize(const QSize &size);
// pw handling
void handleFrame(const PipeWireFrame &frame);
// link to public interface
PWFrameBuffer *q;
// requests a session from XDG Desktop Portal
// auto-generated and compiled from xdp_dbus_interface.xml file
QScopedPointer<OrgFreedesktopPortalScreenCastInterface> dbusXdpScreenCastService;
QScopedPointer<OrgFreedesktopPortalRemoteDesktopInterface> dbusXdpRemoteDesktopService;
// XDP screencast session handle
QDBusObjectPath sessionPath;
// screen geometry holder
QSize videoSize;
// sanity indicator
bool isValid = true;
std::unique_ptr<PipeWireSourceStream> stream;
std::optional<PipeWireCursor> cursor;
DmaBufHandler m_dmabufHandler;
};
PWFrameBuffer::Private::Private(PWFrameBuffer *q)
: q(q)
, stream(new PipeWireSourceStream(q))
{
QObject::connect(stream.get(), &PipeWireSourceStream::frameReceived, q, [this] (const PipeWireFrame &frame) {
handleFrame(frame);
});
}
/**
* @brief PWFrameBuffer::Private::initDbus - initialize D-Bus connectivity with XDG Desktop Portal.
* Based on XDG_CURRENT_DESKTOP environment variable it will give us implementation that we need,
* in case of KDE it is xdg-desktop-portal-kde binary.
*/
void PWFrameBuffer::Private::initDbus()
{
qInfo() << "Initializing D-Bus connectivity with XDG Desktop Portal";
dbusXdpScreenCastService.reset(new OrgFreedesktopPortalScreenCastInterface(QStringLiteral("org.freedesktop.portal.Desktop"),
QStringLiteral("/org/freedesktop/portal/desktop"),
QDBusConnection::sessionBus()));
dbusXdpRemoteDesktopService.reset(new OrgFreedesktopPortalRemoteDesktopInterface(QStringLiteral("org.freedesktop.portal.Desktop"),
QStringLiteral("/org/freedesktop/portal/desktop"),
QDBusConnection::sessionBus()));
auto version = dbusXdpScreenCastService->version();
if (version < MIN_SUPPORTED_XDP_KDE_SC_VERSION) {
qCWarning(KRFB_FB_PIPEWIRE) << "Unsupported XDG Portal screencast interface version:" << version;
isValid = false;
return;
}
// create session
auto sessionParameters = QVariantMap {
{ QStringLiteral("session_handle_token"), QStringLiteral("krfb%1").arg(QRandomGenerator::global()->generate()) },
{ QStringLiteral("handle_token"), QStringLiteral("krfb%1").arg(QRandomGenerator::global()->generate()) }
};
auto sessionReply = dbusXdpRemoteDesktopService->CreateSession(sessionParameters);
sessionReply.waitForFinished();
if (!sessionReply.isValid()) {
qWarning("Couldn't initialize XDP-KDE screencast session");
isValid = false;
return;
}
qInfo() << "DBus session created: " << sessionReply.value().path();
QDBusConnection::sessionBus().connect(QString(),
sessionReply.value().path(),
QStringLiteral("org.freedesktop.portal.Request"),
QStringLiteral("Response"),
this->q,
SLOT(handleXdpSessionCreated(uint, QVariantMap)));
}
void PWFrameBuffer::handleXdpSessionCreated(quint32 code, const QVariantMap &results)
{
d->handleSessionCreated(code, results);
}
/**
* @brief PWFrameBuffer::Private::handleSessionCreated - handle creation of ScreenCast session.
* XDG Portal answers with session path if it was able to successfully create the screencast.
*
* @param code return code for dbus call. Zero is success, non-zero means error
* @param results map with results of call.
*/
void PWFrameBuffer::Private::handleSessionCreated(quint32 code, const QVariantMap &results)
{
if (code != 0) {
qCWarning(KRFB_FB_PIPEWIRE) << "Failed to create session: " << code;
isValid = false;
return;
}
sessionPath = QDBusObjectPath(results.value(QStringLiteral("session_handle")).toString());
// select sources for the session
auto selectionOptions = QVariantMap {
// We have to specify it's an uint, otherwise xdg-desktop-portal will not forward it to backend implementation
{ QStringLiteral("types"), QVariant::fromValue<uint>(7) }, // request all (KeyBoard, Pointer, TouchScreen)
{ QStringLiteral("handle_token"), QStringLiteral("krfb%1").arg(QRandomGenerator::global()->generate()) }
};
auto selectorReply = dbusXdpRemoteDesktopService->SelectDevices(sessionPath, selectionOptions);
selectorReply.waitForFinished();
if (!selectorReply.isValid()) {
qCWarning(KRFB_FB_PIPEWIRE) << "Couldn't select devices for the remote-desktop session";
isValid = false;
return;
}
QDBusConnection::sessionBus().connect(QString(),
selectorReply.value().path(),
QStringLiteral("org.freedesktop.portal.Request"),
QStringLiteral("Response"),
this->q,
SLOT(handleXdpDevicesSelected(uint, QVariantMap)));
}
void PWFrameBuffer::handleXdpDevicesSelected(quint32 code, const QVariantMap &results)
{
d->handleDevicesSelected(code, results);
}
/**
* @brief PWFrameBuffer::Private::handleDevicesCreated - handle selection of devices we want to use for remote desktop
*
* @param code return code for dbus call. Zero is success, non-zero means error
* @param results map with results of call.
*/
void PWFrameBuffer::Private::handleDevicesSelected(quint32 code, const QVariantMap &results)
{
Q_UNUSED(results)
if (code != 0) {
qCWarning(KRFB_FB_PIPEWIRE) << "Failed to select devices: " << code;
isValid = false;
return;
}
// select sources for the session
auto selectionOptions = QVariantMap {
{ QStringLiteral("types"), QVariant::fromValue<uint>(1) }, // only MONITOR is supported
{ QStringLiteral("multiple"), false },
{ QStringLiteral("handle_token"), QStringLiteral("krfb%1").arg(QRandomGenerator::global()->generate()) }
};
auto selectorReply = dbusXdpScreenCastService->SelectSources(sessionPath, selectionOptions);
selectorReply.waitForFinished();
if (!selectorReply.isValid()) {
qCWarning(KRFB_FB_PIPEWIRE) << "Couldn't select sources for the screen-casting session";
isValid = false;
return;
}
QDBusConnection::sessionBus().connect(QString(),
selectorReply.value().path(),
QStringLiteral("org.freedesktop.portal.Request"),
QStringLiteral("Response"),
this->q,
SLOT(handleXdpSourcesSelected(uint, QVariantMap)));
}
void PWFrameBuffer::handleXdpSourcesSelected(quint32 code, const QVariantMap &results)
{
d->handleSourcesSelected(code, results);
}
/**
* @brief PWFrameBuffer::Private::handleSourcesSelected - handle Screencast sources selection.
* XDG Portal shows a dialog at this point which allows you to select monitor from the list.
* This function is called after you make a selection.
*
* @param code return code for dbus call. Zero is success, non-zero means error
* @param results map with results of call.
*/
void PWFrameBuffer::Private::handleSourcesSelected(quint32 code, const QVariantMap &)
{
if (code != 0) {
qCWarning(KRFB_FB_PIPEWIRE) << "Failed to select sources: " << code;
isValid = false;
return;
}
// start session
auto startParameters = QVariantMap {
{ QStringLiteral("handle_token"), QStringLiteral("krfb%1").arg(QRandomGenerator::global()->generate()) }
};
auto startReply = dbusXdpRemoteDesktopService->Start(sessionPath, QString(), startParameters);
startReply.waitForFinished();
QDBusConnection::sessionBus().connect(QString(),
startReply.value().path(),
QStringLiteral("org.freedesktop.portal.Request"),
QStringLiteral("Response"),
this->q,
SLOT(handleXdpRemoteDesktopStarted(uint, QVariantMap)));
}
void PWFrameBuffer::handleXdpRemoteDesktopStarted(quint32 code, const QVariantMap &results)
{
d->handleRemoteDesktopStarted(code, results);
}
/**
* @brief PWFrameBuffer::Private::handleScreencastStarted - handle Screencast start.
* At this point there shall be ready pipewire stream to consume.
*
* @param code return code for dbus call. Zero is success, non-zero means error
* @param results map with results of call.
*/
void PWFrameBuffer::Private::handleRemoteDesktopStarted(quint32 code, const QVariantMap &results)
{
if (code != 0) {
qCWarning(KRFB_FB_PIPEWIRE) << "Failed to start screencast: " << code;
isValid = false;
return;
}
if (results.value(QStringLiteral("devices")).toUInt() == 0) {
qCWarning(KRFB_FB_PIPEWIRE) << "No devices were granted" << results;
isValid = false;
return;
}
// there should be only one stream
const Streams streams = qdbus_cast<Streams>(results.value(QStringLiteral("streams")));
if (streams.isEmpty()) {
// maybe we should check deeper with qdbus_cast but this suffices for now
qCWarning(KRFB_FB_PIPEWIRE) << "Failed to get screencast streams";
isValid = false;
return;
}
auto streamReply = dbusXdpScreenCastService->OpenPipeWireRemote(sessionPath, QVariantMap());
streamReply.waitForFinished();
if (!streamReply.isValid()) {
qCWarning(KRFB_FB_PIPEWIRE) << "Couldn't open pipewire remote for the screen-casting session";
isValid = false;
return;
}
QDBusUnixFileDescriptor pipewireFd = streamReply.value();
if (!pipewireFd.isValid()) {
qCWarning(KRFB_FB_PIPEWIRE) << "Couldn't get pipewire connection file descriptor";
isValid = false;
return;
}
if (!stream->createStream(streams.first().nodeId, pipewireFd.takeFileDescriptor())) {
qCWarning(KRFB_FB_PIPEWIRE) << "Couldn't create the pipewire stream";
isValid = false;
return;
}
setVideoSize(qdbus_cast<QSize>(streams.first().map[QStringLiteral("size")].value<QDBusArgument>()));
}
void PWFrameBuffer::Private::handleFrame(const PipeWireFrame &frame)
{
cursor = frame.cursor;
#if KPIPEWIRE_VERSION < QT_VERSION_CHECK(6, 0, 70)
if (!frame.dmabuf && !frame.image) {
#else
if (!frame.dmabuf && !frame.dataFrame) {
#endif
qCDebug(KRFB_FB_PIPEWIRE) << "Got empty buffer. The buffer possibly carried only "
"information about the mouse cursor.";
return;
}
#if KPIPEWIRE_VERSION < QT_VERSION_CHECK(6, 0, 70)
if (frame.image) {
memcpy(q->fb, frame.image->constBits(), frame.image->sizeInBytes());
setVideoSize(frame.image->size());
}
#else
if (frame.dataFrame) {
memcpy(q->fb, frame.dataFrame->data, frame.dataFrame->size.width() * frame.dataFrame->stride);
setVideoSize(frame.dataFrame->size);
}
#endif
else if (frame.dmabuf) {
setVideoSize({frame.dmabuf->width, frame.dmabuf->height});
QImage src((uchar*) q->fb, videoSize.width(), videoSize.height(), QImage::Format_RGB32);
if (!m_dmabufHandler.downloadFrame(src, frame)) {
stream->renegotiateModifierFailed(frame.format, frame.dmabuf->modifier);
qCDebug(KRFB_FB_PIPEWIRE) << "Failed to download frame.";
return;
}
setVideoSize(src.size());
} else {
qCDebug(KRFB_FB_PIPEWIRE) << "Unknown kind of frame";
}
if (auto damage = frame.damage) {
for (const auto &rect : *damage) {
q->tiles.append(rect);
}
} else {
q->tiles.append(QRect(0, 0, videoSize.width(), videoSize.height()));
}
}
void PWFrameBuffer::Private::setVideoSize(const QSize &size)
{
if (q->fb && videoSize == size) {
return;
}
free(q->fb);
q->fb = static_cast<char*>(malloc(size.width() * size.height() * BYTES_PER_PIXEL));
if (!q->fb) {
qCWarning(KRFB_FB_PIPEWIRE) << "Failed to allocate buffer";
isValid = false;
return;
}
videoSize = size;
Q_EMIT q->frameBufferChanged();
}
PWFrameBuffer::Private::~Private()
{
}
PWFrameBuffer::PWFrameBuffer(QObject *parent)
: FrameBuffer (parent),
d(new Private(this))
{
}
PWFrameBuffer::~PWFrameBuffer()
{
free(fb);
fb = nullptr;
}
void PWFrameBuffer::initDBus()
{
d->initDbus();
}
void PWFrameBuffer::startVirtualMonitor(const QString& name, const QSize& resolution, qreal dpr)
{
d->videoSize = resolution * dpr;
using namespace KWayland::Client;
auto connection = ConnectionThread::fromApplication(this);
if (!connection) {
qWarning() << "Failed getting Wayland connection from QPA";
QCoreApplication::exit(1);
return;
}
auto registry = new Registry(this);
connect(registry, &KWayland::Client::Registry::interfaceAnnounced, this, [this, registry, name, dpr, resolution] (const QByteArray &interfaceName, quint32 wlname, quint32 version) {
if (interfaceName != "zkde_screencast_unstable_v1")
return;
auto screencasting = new Screencasting(registry, wlname, version, this);
auto r = screencasting->createVirtualMonitorStream(name, resolution, dpr, Screencasting::Metadata);
connect(r, &ScreencastingStream::created, this, [this] (quint32 nodeId) {
d->stream->createStream(nodeId, 0);
});
});
registry->create(connection);
registry->setup();
}
int PWFrameBuffer::depth()
{
return 32;
}
int PWFrameBuffer::height()
{
if (!d->videoSize.isValid()) {
return 0;
}
return d->videoSize.height();
}
int PWFrameBuffer::width()
{
if (!d->videoSize.isValid()) {
return 0;
}
return d->videoSize.width();
}
int PWFrameBuffer::paddedWidth()
{
return width() * 4;
}
void PWFrameBuffer::getServerFormat(rfbPixelFormat &format)
{
format.bitsPerPixel = 32;
format.depth = 32;
format.trueColour = true;
format.bigEndian = false;
}
void PWFrameBuffer::startMonitor()
{
}
void PWFrameBuffer::stopMonitor()
{
}
QVariant PWFrameBuffer::customProperty(const QString &property) const
{
if (property == QLatin1String("stream_node_id")) {
return QVariant::fromValue<uint>(d->stream->nodeId());
} if (property == QLatin1String("session_handle")) {
return QVariant::fromValue<QDBusObjectPath>(d->sessionPath);
}
return FrameBuffer::customProperty(property);
}
bool PWFrameBuffer::isValid() const
{
return d->isValid;
}
QPoint PWFrameBuffer::cursorPosition()
{
return d->cursor->position;
}

View File

@@ -0,0 +1,63 @@
/* This file is part of the KDE project
Copyright (C) 2018 Oleg Chernovskiy <kanedias@xaker.ru>
Copyright (C) 2018-2020 Jan Grulich <jgrulich@redhat.com>
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.
*/
#ifndef KRFB_FRAMEBUFFER_XCB_XCB_FRAMEBUFFER_H
#define KRFB_FRAMEBUFFER_XCB_XCB_FRAMEBUFFER_H
#include "framebuffer.h"
#include <QWidget>
#include <QVariantMap>
/**
* @brief The PWFrameBuffer class - framebuffer implementation based on XDG Desktop Portal ScreenCast interface.
* The design relies heavily on a presence of XDG D-Bus service and PipeWire daemon.
*
* @author Oleg Chernovskiy <kanedias@xaker.ru>
*/
class PWFrameBuffer: public FrameBuffer
{
Q_OBJECT
public:
using Stream = struct {
uint nodeId;
QVariantMap map;
};
using Streams = QList<Stream>;
PWFrameBuffer(QObject *parent = nullptr);
virtual ~PWFrameBuffer() override;
void initDBus();
void startVirtualMonitor(const QString &name, const QSize &resolution, qreal dpr);
int depth() override;
int height() override;
int width() override;
int paddedWidth() override;
void getServerFormat(rfbPixelFormat &format) override;
void startMonitor() override;
void stopMonitor() override;
QPoint cursorPosition() override;
QVariant customProperty(const QString &property) const override;
bool isValid() const;
private Q_SLOTS:
void handleXdpSessionCreated(quint32 code, const QVariantMap &results);
void handleXdpDevicesSelected(quint32 code, const QVariantMap &results);
void handleXdpSourcesSelected(quint32 code, const QVariantMap &results);
void handleXdpRemoteDesktopStarted(quint32 code, const QVariantMap &results);
private:
class Private;
const QScopedPointer<Private> d;
};
#endif

View File

@@ -0,0 +1,53 @@
/* This file is part of the KDE project
Copyright (C) 2018 Oleg Chernovskiy <kanedias@xaker.ru>
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; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "pw_framebufferplugin.h"
#include "pw_framebuffer.h"
#include <KPluginFactory>
K_PLUGIN_CLASS_WITH_JSON(PWFrameBufferPlugin, "pipewire.json")
PWFrameBufferPlugin::PWFrameBufferPlugin(QObject *parent, const QVariantList &args)
: FrameBufferPlugin(parent, args)
{
}
FrameBuffer *PWFrameBufferPlugin::frameBuffer(const QVariantMap &args)
{
auto pwfb = new PWFrameBuffer;
if (args.contains(QLatin1String("name"))) {
pwfb->startVirtualMonitor(args[QStringLiteral("name")].toString(), args[QStringLiteral("resolution")].toSize(), args[QStringLiteral("scale")].toDouble());
} else {
// D-Bus is most important in XDG-Desktop-Portals init chain, no toys for us if something is wrong with XDP
// PipeWire connectivity is initialized after D-Bus session is started
pwfb->initDBus();
}
// sanity check for dbus/wayland/pipewire errors
if (!pwfb->isValid()) {
delete pwfb;
return nullptr;
}
return pwfb;
}
#include "pw_framebufferplugin.moc"

View File

@@ -0,0 +1,42 @@
/* This file is part of the KDE project
Copyright (C) 2018 Oleg Chernovskiy <kanedias@xaker.ru>
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; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef KRFB_FRAMEBUFFER_PW_PWFRAMEBUFFERPLUGIN_H
#define KRFB_FRAMEBUFFER_PW_PWFRAMEBUFFERPLUGIN_H
#include "framebufferplugin.h"
class FrameBuffer;
class PWFrameBufferPlugin: public FrameBufferPlugin
{
Q_OBJECT
public:
PWFrameBufferPlugin(QObject *parent, const QVariantList &args);
FrameBuffer *frameBuffer(const QVariantMap &args) override;
private:
Q_DISABLE_COPY(PWFrameBufferPlugin)
};
#endif // Header guard

View File

@@ -0,0 +1,113 @@
/*
SPDX-FileCopyrightText: 2020 Aleix Pol Gonzalez <aleixpol@kde.org>
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
*/
#include "screencasting.h"
#include "qwayland-zkde-screencast-unstable-v1.h"
#include <KWayland/Client/registry.h>
#include <QDebug>
#include <QRect>
#include <QPointer>
using namespace KWayland::Client;
class ScreencastingStreamPrivate : public QtWayland::zkde_screencast_stream_unstable_v1
{
public:
ScreencastingStreamPrivate(ScreencastingStream *q)
: q(q)
{
}
~ScreencastingStreamPrivate() override
{
close();
q->deleteLater();
}
void zkde_screencast_stream_unstable_v1_created(uint32_t node) override
{
m_nodeId = node;
Q_EMIT q->created(node);
}
void zkde_screencast_stream_unstable_v1_closed() override
{
Q_EMIT q->closed();
}
void zkde_screencast_stream_unstable_v1_failed(const QString &error) override
{
Q_EMIT q->failed(error);
}
uint m_nodeId = 0;
QPointer<ScreencastingStream> q;
};
ScreencastingStream::ScreencastingStream(QObject *parent)
: QObject(parent)
, d(new ScreencastingStreamPrivate(this))
{
}
ScreencastingStream::~ScreencastingStream() = default;
quint32 ScreencastingStream::nodeId() const
{
return d->m_nodeId;
}
class ScreencastingPrivate : public QtWayland::zkde_screencast_unstable_v1
{
public:
ScreencastingPrivate(Registry *registry, int id, int version, Screencasting *q)
: QtWayland::zkde_screencast_unstable_v1(*registry, id, version)
, q(q)
{
}
ScreencastingPrivate(::zkde_screencast_unstable_v1 *screencasting, Screencasting *q)
: QtWayland::zkde_screencast_unstable_v1(screencasting)
, q(q)
{
}
~ScreencastingPrivate() override
{
destroy();
}
Screencasting *const q;
};
Screencasting::Screencasting(QObject *parent)
: QObject(parent)
{
}
Screencasting::Screencasting(Registry *registry, int id, int version, QObject *parent)
: QObject(parent)
, d(new ScreencastingPrivate(registry, id, version, this))
{
}
Screencasting::~Screencasting() = default;
ScreencastingStream * Screencasting::createVirtualMonitorStream(const QString& name, const QSize& resolution, qreal dpr, Screencasting::CursorMode mode)
{
auto stream = new ScreencastingStream(this);
stream->d->init(d->stream_virtual_output(name, resolution.width(), resolution.height(), wl_fixed_from_double(dpr), mode));
return stream;
}
void Screencasting::setup(::zkde_screencast_unstable_v1 *screencasting)
{
d.reset(new ScreencastingPrivate(screencasting, this));
}
void Screencasting::destroy()
{
d.reset(nullptr);
}

View File

@@ -0,0 +1,75 @@
/*
SPDX-FileCopyrightText: 2020 Aleix Pol Gonzalez <aleixpol@kde.org>
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
*/
#pragma once
#include <QObject>
#include <QSharedPointer>
#include <QVector>
#include <optional>
struct zkde_screencast_unstable_v1;
namespace KWayland
{
namespace Client
{
class PlasmaWindow;
class Registry;
class Output;
}
}
class ScreencastingPrivate;
class ScreencastingSourcePrivate;
class ScreencastingStreamPrivate;
class ScreencastingStream : public QObject
{
Q_OBJECT
public:
ScreencastingStream(QObject *parent);
~ScreencastingStream() override;
quint32 nodeId() const;
Q_SIGNALS:
void created(quint32 nodeid);
void failed(const QString &error);
void closed();
private:
friend class Screencasting;
QScopedPointer<ScreencastingStreamPrivate> d;
};
class Screencasting : public QObject
{
Q_OBJECT
public:
explicit Screencasting(QObject *parent = nullptr);
explicit Screencasting(KWayland::Client::Registry *registry, int id, int version, QObject *parent = nullptr);
~Screencasting() override;
enum CursorMode {
Hidden = 1,
Embedded = 2,
Metadata = 4,
};
Q_ENUM(CursorMode)
ScreencastingStream *createVirtualMonitorStream(const QString &name, const QSize &resolution, qreal dpr, CursorMode mode);
void setup(zkde_screencast_unstable_v1 *screencasting);
void destroy();
Q_SIGNALS:
void initialized();
void removed();
void sourcesChanged();
private:
QScopedPointer<ScreencastingPrivate> d;
};

View File

@@ -1,28 +0,0 @@
include_directories (${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
)
set (krfb_framebuffer_qt_SRCS
qtframebuffer.cpp
qtframebufferplugin.cpp
)
kde4_add_plugin (krfb_framebuffer_qt
${krfb_framebuffer_qt_SRCS}
)
target_link_libraries (krfb_framebuffer_qt
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
${KDE4_KDEUI_LIBS}
krfbprivate
)
install (TARGETS krfb_framebuffer_qt
DESTINATION ${PLUGIN_INSTALL_DIR}
)
install (FILES krfb_framebuffer_qt.desktop
DESTINATION ${SERVICES_INSTALL_DIR}
)

View File

@@ -1,95 +0,0 @@
[Desktop Entry]
Encoding=UTF-8
Comment=Qt based Framebuffer for KRfb.
Comment[ast]=Esquema Qt de buffer pa KRfb
Comment[bs]=Kadrobafer za KRfb na osnovu Qt
Comment[ca]=«Framebuffer» basat en Qt per al KRfb.
Comment[ca@valencia]=«Framebuffer» basat en Qt per al KRfb.
Comment[cs]=Framebuffer založený na Qt pro KRfb.
Comment[da]=Qt-baseret framebuffer til KRfb.
Comment[de]=Qt-basierter Framebuffer für KRfb
Comment[en_GB]=Qt based Framebuffer for KRfb.
Comment[es]=Memoria intermedia de vídeo basada en Qt para KRfb.
Comment[et]=KRfb Qt põhine kaadripuhver
Comment[fi]=QT-perustainen Kehyspuskuri KRfb:lle
Comment[fr]=Sortie vidéo basée sur Qt pour KRfb.
Comment[ga]=Maolán fráma le haghaidh KRfb, bunaithe ar Qt.
Comment[gl]=Framebuffer baseado en Qt para KRfb.
Comment[hr]=Međuspremnik okvira baziran na Qt-u za KRfb.
Comment[ia]=Framebuffer basate sur Qt per KRfb
Comment[it]=Framebuffer basato su Qt per KRfb.
Comment[kk]=Qt негіздеген KRfb-нің кадр буфері.
Comment[km]=Framebuffer មាន​មូលដ្ឋាន​លើ Qt សម្រាប់ KRfb 
Comment[ko]=KRfb를 위한 Qt 기반 프레임버퍼.
Comment[lt]=Qt pagrindu veikiantis Framebuffer skirtas KRfb.
Comment[lv]=Qt balstīts kadrbuferis priekš KRfb.
Comment[nb]=Qt-basert rammebuffer for KRfb.
Comment[nds]=Op Qt opbuut Bildpuffer för KRfb
Comment[nl]=Op Qt gebaseerd framebuffer voor KRfb.
Comment[nn]=Qt basert framebuffer for KRfb.
Comment[pt]='Framebuffer' baseado no Qt para o KRfb.
Comment[pt_BR]=Framebuffer baseado no Qt para o KRfb.
Comment[si]=KRfb සඳහා Qt මත පදනම් වූ රාමු බෆරය
Comment[sk]=Framebuffer založený na Qt pre KRfb.
Comment[sl]=Slikovni medpomnilnik za KRFB, ki temelji na Qt
Comment[sr]=Кадробафер за КРФБ на основу КуТу
Comment[sr@ijekavian]=Кадробафер за КРФБ на основу КуТу
Comment[sr@ijekavianlatin]=Kadrobafer za KRFB na osnovu Qtu
Comment[sr@latin]=Kadrobafer za KRFB na osnovu Qtu
Comment[sv]=Qt-baserad rambuffert för Krfb.
Comment[tr]=KRfb için Qt temelli Çerçeve tamponu.
Comment[uk]=Заснований на Qt буфер кадрів для KRfb.
Comment[x-test]=xxQt based Framebuffer for KRfb.xx
Comment[zh_CN]=基于 Qt 的 KRfb 帧缓冲机制
Comment[zh_TW]=KRfb 的 Qt-based Framebuffer
Name=Qt Framebuffer for KRfb
Name[ast]=Esquema Qt de buffer pa KRfb
Name[bs]=Qt-ov kadrobafer za KRFB
Name[ca]=«Framebuffer» Qt per al KRfb.
Name[ca@valencia]=«Framebuffer» Qt per al KRfb.
Name[cs]=Qt Framebuffer pro KRfb
Name[da]=Qt-framebuffer til KRfb
Name[de]=Qt-Framebuffer für KRfb
Name[en_GB]=Qt Framebuffer for KRfb
Name[es]=Memoria intermedia de vídeo Qt para KRfb
Name[et]=KRfb Qt kaadripuhver
Name[fi]=QT-kehyspuskuri KRfb:lle
Name[fr]=Sortie vidéo Qt pour KRfb
Name[ga]=Maolán fráma Qt le haghaidh KRfb
Name[gl]=Framebuffer de Qt para KRfb
Name[hr]=Qt Framebuffer za KRfb
Name[ia]=Framebuffer Qt per KRfb
Name[it]=Framebuffer Qt per KRfb
Name[kk]=Qt KRfb кадр буфері
Name[km]=Qt Framebuffer សម្រាប់for KRfb
Name[ko]=KRfb를 위한 Qt 프레임버퍼
Name[lt]=Qt Framebufferis skirtas KRfb
Name[lv]=Qt kadrbuferis priekš KRfb.
Name[nb]=Qt rammebuffer for KRfb
Name[nds]=Qt-Bildpuffer för KRfb
Name[nl]=Qt-framebuffer voor KRfb
Name[nn]=Qt-framebuffer for KRfb
Name[pt]='Framebuffer' do Qt para o KRfb
Name[pt_BR]=Framebuffer do Qt para o KRfb
Name[si]=KRfb සඳහා වන Qt රාමුබෆරය
Name[sk]=Qt Framebuffer pre KRfb
Name[sl]=Slikovni medpomnilnik Qt za KRFB
Name[sr]=КуТ‑ов кадробафер за КРФБ
Name[sr@ijekavian]=КуТ‑ов кадробафер за КРФБ
Name[sr@ijekavianlatin]=Qtov kadrobafer za KRFB
Name[sr@latin]=Qtov kadrobafer za KRFB
Name[sv]=Qt-rambuffert för Krfb
Name[tr]=KRfb için Qt Çerçeve tamponu
Name[uk]=Буфер кадрів на Qt для KRfb
Name[x-test]=xxQt Framebuffer for KRfbxx
Name[zh_CN]=KRfb 的 Qt 帧缓冲机制
Name[zh_TW]=Krfb 的 Qt Framebuffer
Type=Service
ServiceTypes=krfb/framebuffer
X-KDE-Library=krfb_framebuffer_qt
X-KDE-PluginInfo-Name=qt
X-KDE-PluginInfo-Version=0.1
X-KDE-PluginInfo-Website=http://www.kde.org
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-EnabledByDefault=true

View File

@@ -1,116 +0,0 @@
/* This file is part of the KDE project
Copyright (C) 2007 Alessandro Praduroux <pradu@pradu.it>
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 2 of the License, or (at your option) any later version.
*/
#include "qtframebuffer.h"
#include "qtframebuffer.moc"
#include <QTimer>
#include <QRegion>
#include <QPixmap>
#include <QBitmap>
const int UPDATE_TIME = 500;
QtFrameBuffer::QtFrameBuffer(WId id, QObject *parent)
: FrameBuffer(id, parent)
{
fbImage = QPixmap::grabWindow(win).toImage();
fb = new char[fbImage.numBytes()];
t = new QTimer(this);
connect(t, SIGNAL(timeout()), SLOT(updateFrameBuffer()));
}
QtFrameBuffer::~QtFrameBuffer()
{
delete [] fb;
fb = 0;
}
int QtFrameBuffer::depth()
{
return fbImage.depth();
}
int QtFrameBuffer::height()
{
return fbImage.height();
}
int QtFrameBuffer::width()
{
return fbImage.width();
}
void QtFrameBuffer::getServerFormat(rfbPixelFormat &format)
{
format.bitsPerPixel = 32;
format.depth = 32;
format.trueColour = true;
format.bigEndian = false;
format.redShift = 16;
format.greenShift = 8;
format.blueShift = 0;
format.redMax = 0xff;
format.greenMax = 0xff;
format.blueMax = 0xff;
}
void QtFrameBuffer::updateFrameBuffer()
{
QImage img = QPixmap::grabWindow(win).toImage();
QSize imgSize = img.size();
// verify what part of the image need to be marked as changed
// fbImage is the previous version of the image,
// img is the current one
#if 0 // This is actually slower than updating the whole desktop...
QImage map(imgSize, QImage::Format_Mono);
map.fill(0);
for (int x = 0; x < imgSize.width(); x++) {
for (int y = 0; y < imgSize.height(); y++) {
if (img.pixel(x, y) != fbImage.pixel(x, y)) {
map.setPixel(x, y, 1);
}
}
}
QRegion r(QBitmap::fromImage(map));
tiles = tiles + r.rects();
#else
tiles.append(img.rect());
#endif
memcpy(fb, (const char *)img.bits(), img.numBytes());
fbImage = img;
}
int QtFrameBuffer::paddedWidth()
{
return fbImage.width() * 4;
}
void QtFrameBuffer::startMonitor()
{
t->start(UPDATE_TIME);
}
void QtFrameBuffer::stopMonitor()
{
t->stop();
}

View File

@@ -1,44 +0,0 @@
/* This file is part of the KDE project
Copyright (C) 2007 Alessandro Praduroux <pradu@pradu.it>
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 2 of the License, or (at your option) any later version.
*/
#ifndef KRFB_FRAMEBUFFER_QT_QTFRAMEBUFFER_H
#define KRFB_FRAMEBUFFER_QT_QTFRAMEBUFFER_H
#include <QImage>
#include "framebuffer.h"
class QTimer;
/**
@author Alessandro Praduroux <pradu@pradu.it>
*/
class QtFrameBuffer : public FrameBuffer
{
Q_OBJECT
public:
explicit QtFrameBuffer(WId id, QObject *parent = 0);
~QtFrameBuffer();
virtual int depth();
virtual int height();
virtual int width();
virtual int paddedWidth();
virtual void getServerFormat(rfbPixelFormat &format);
virtual void startMonitor();
virtual void stopMonitor();
public Q_SLOTS:
void updateFrameBuffer();
private:
QImage fbImage;
QTimer *t;
};
#endif

View File

@@ -1,31 +0,0 @@
include_directories (${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
)
set (krfb_framebuffer_x11_SRCS
x11framebuffer.cpp
x11framebufferplugin.cpp
)
kde4_add_plugin (krfb_framebuffer_x11
${krfb_framebuffer_x11_SRCS}
)
target_link_libraries (krfb_framebuffer_x11
${KDE4_KDEUI_LIBS}
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
${X11_X11_LIB}
${X11_Xdamage_LIB}
${X11_Xext_LIB}
krfbprivate
)
install (TARGETS krfb_framebuffer_x11
DESTINATION ${PLUGIN_INSTALL_DIR}
)
install (FILES krfb_framebuffer_x11.desktop
DESTINATION ${SERVICES_INSTALL_DIR}
)

View File

@@ -1,95 +0,0 @@
[Desktop Entry]
Encoding=UTF-8
Comment=X11 XDamage/XShm based Framebuffer for KRfb.
Comment[ast]=Esquema de buffer pa KRfb basáu en XDamage/XShm
Comment[bs]=X11 XDamage/XShm baziran framebafer za KRfb.
Comment[ca]=«Framebuffer» basat en XDamage/XShmQt de l'X11 per al KRfb.
Comment[ca@valencia]=«Framebuffer» basat en XDamage/XShmQt de l'X11 per al KRfb.
Comment[cs]=Framebuffer založený na X11 XDamage/XShm pro KRfb.
Comment[da]=X11 XDamage/XShm-baseret framebuffer til KRfb.
Comment[de]=X11 XDamage/XShm-basierter Framebuffer für KRfb.
Comment[en_GB]=X11 XDamage/XShm based Framebuffer for KRfb.
Comment[es]=Memoria intermedia de vídeo basada en X11 Damage/XShm para KRfb.
Comment[et]=KRfb X11 XDamage/XShm põhine kaadripuhver
Comment[fi]=X11 XDamage/XShm-perustainen kehyspuskui KRfb:lle.
Comment[fr]=Sortie vidéo basée sur X11 XDamage / XShm pour KRfb.
Comment[ga]=Maolán fráma le haghaidh KRfb, bunaithe ar X11 XDamage/XShm
Comment[gl]=Framebuffer baseado en Xll XDamage/Xshm para XRfb.
Comment[hr]=Međuspreminik okvira baziran na X11 XDamage/XShm za KRfb.
Comment[ia]=Framebuffer basate sur X11 XDamage/XShm per KRfb.
Comment[it]=Framebuffer basato su XDamage/XShm di X11 per KRfb.
Comment[kk]=X11 XDamage/XShm негіздеген KRfb кадр буфері.
Comment[km]=X11 XDamage/XShm based Framebuffer សម្រាប់ KRfb 
Comment[ko]=KRfb를 위한 X11 XDamage/XShm 기반 프레임버퍼.
Comment[lt]=X11 XDamage/XShm paremtas Framebuffer skirtas KRfb.
Comment[lv]=X11 XDamage/XShm balstīts kadrbuferis priekš KRfb.
Comment[nb]=Rammebuffer for KRfb basert på X11 XDamage/XShm.
Comment[nds]=Op X11-XDamage/-XShm opbuut Bildpuffer för KRfb
Comment[nl]=Op X11 XDamage/XShm gebaseerd framebuffer voor KRfb.
Comment[nn]=X11 XDamage/XShm basert framebuffer for KRfb.
Comment[pt]='Framebuffer' baseado no XDamage/XShm do X11 para o KRfb.
Comment[pt_BR]=Framebuffer baseado no XDamage/XShm do X11 para o KRfb.
Comment[si]=KRfb සඳහා වන රාමු බෆරය මත පදනම් වූ X11 XDamage/XShm.
Comment[sk]=Framebuffer založený na X11 XDamage/XShm pre KRfb.
Comment[sl]=Slikovni medpomnilnik za KRFB, ki temelji na X11 XDamage/XShm
Comment[sr]=Кадробафер за КРФБ на основу Икс‑демиџа/Икс‑схма у Иксу11.
Comment[sr@ijekavian]=Кадробафер за КРФБ на основу Икс‑демиџа/Икс‑схма у Иксу11.
Comment[sr@ijekavianlatin]=Kadrobafer za KRFB na osnovu XDamagea/XShma u X11.
Comment[sr@latin]=Kadrobafer za KRFB na osnovu XDamagea/XShma u X11.
Comment[sv]=X11 XDamage/XShm-baserad rambuffert för Krfb.
Comment[tr]=KRfb için X11 XDamage/XShm temelli Çerçeve Tamponu.
Comment[uk]=Заснований на XDamage/XShm X11 буфер кадрів для KRfb.
Comment[x-test]=xxX11 XDamage/XShm based Framebuffer for KRfb.xx
Comment[zh_CN]=基于 X11 XDamage/XShm 扩展的 KRfb 帧缓冲机制。
Comment[zh_TW]=KRfb 的 X11 XDamage/XShm based Framebuffer
Name=X11 Framebuffer for KRfb
Name[ast]=Buffer de X11 pa KRfb
Name[bs]=X11 frame bafer za KRfb
Name[ca]=«Framebuffer» de l'X11 per al KRfb.
Name[ca@valencia]=«Framebuffer» de l'X11 per al KRfb.
Name[cs]=X11 Framebuffer pro KRfb
Name[da]=X11-framebuffer til KRfb
Name[de]=X11-Framebuffer für KRfb
Name[en_GB]=X11 Framebuffer for KRfb
Name[es]=Memoria intermedia de vídeo X11 para KRfb
Name[et]=KRfb X11 kaadripuhver
Name[fi]=X11-kehyspuskuri KRfb:lle
Name[fr]=Sortie vidéo X11 pour KRfb
Name[ga]=Maolán fráma X11 le haghaidh KRfb
Name[gl]=Framebuffer de X11 para KRfb
Name[hr]=Međuspremnik okvira X11 za KRfb
Name[ia]=Framebuffer X11 per KRfb
Name[it]=Framebuffer X11 per KRfb
Name[kk]=X11 KRfb кадр буфері
Name[km]=X11 Framebuffer សម្រាប់ KRfb
Name[ko]=KRfb를 위한 X11 프레임버퍼
Name[lt]=X11 Framebuffer skirtas KRfb
Name[lv]=X11 kadrbuferis priekš KRfb
Name[nb]=X11 rammebuffer for KRfb
Name[nds]=X11-Bildpuffer för KRfb
Name[nl]=X11 framebuffer voor KRfb
Name[nn]=X11-framebuffer for KRfb
Name[pt]='Framebuffer' do X11 para o KRfb
Name[pt_BR]=Framebuffer do X11 para o KRfb
Name[si]=KRfb සඳහා X11 රාමු බෆරය
Name[sk]=X11 Framebuffer pre KRfb
Name[sl]=Slikovni medpomnilnik X11 za KRFB
Name[sr]=Икс11 кадробафер за КРФБ.
Name[sr@ijekavian]=Икс11 кадробафер за КРФБ.
Name[sr@ijekavianlatin]=X11 kadrobafer za KRFB.
Name[sr@latin]=X11 kadrobafer za KRFB.
Name[sv]=X11-rambuffert för Krfb
Name[tr]=KRfb için X11 Çerçeve Tamponu
Name[uk]=Буфер кадрів X11 для KRfb
Name[x-test]=xxX11 Framebuffer for KRfbxx
Name[zh_CN]=KRfb 的 X11 帧缓冲机制
Name[zh_TW]=KRfb 的 X11 Framebuffer
Type=Service
ServiceTypes=krfb/framebuffer
X-KDE-Library=krfb_framebuffer_x11
X-KDE-PluginInfo-Name=x11
X-KDE-PluginInfo-Version=0.1
X-KDE-PluginInfo-Website=http://www.kde.org
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-EnabledByDefault=true

View File

@@ -1,388 +0,0 @@
/* This file is part of the KDE project
Copyright (C) 2007 Alessandro Praduroux <pradu@pradu.it>
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 2 of the License, or (at your option) any later version.
*/
#include "x11framebuffer.h"
#include "x11framebuffer.moc"
#include <config-krfb.h>
#include <QX11Info>
#include <QApplication>
#include <QDesktopWidget>
#include <KApplication>
#include <KDebug>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#ifdef HAVE_XDAMAGE
#include <X11/extensions/Xdamage.h>
#endif
#ifdef HAVE_XSHM
#include <sys/ipc.h>
#include <sys/shm.h>
#include <X11/extensions/XShm.h>
#endif
class X11FrameBuffer::P
{
public:
#ifdef HAVE_XDAMAGE
Damage damage;
#endif
#ifdef HAVE_XSHM
XShmSegmentInfo shminfo;
#endif
XImage *framebufferImage;
XImage *updateTile;
EvWidget *ev;
bool useShm;
int xdamageBaseEvent;
bool running;
};
X11FrameBuffer::X11FrameBuffer(WId id, QObject *parent)
: FrameBuffer(id, parent), d(new X11FrameBuffer::P)
{
#ifdef HAVE_XSHM
d->useShm = XShmQueryExtension(QX11Info::display());
kDebug() << "shm: " << d->useShm;
#else
d->useShm = false;
#endif
d->running = false;
d->framebufferImage = XGetImage(QX11Info::display(),
id,
0,
0,
QApplication::desktop()->width(), //arg, must get a widget ???
QApplication::desktop()->height(),
AllPlanes,
ZPixmap);
if (d->useShm) {
#ifdef HAVE_XSHM
d->updateTile = XShmCreateImage(QX11Info::display(),
DefaultVisual(QX11Info::display(), 0),
d->framebufferImage->bits_per_pixel,
ZPixmap,
NULL,
&d->shminfo,
32,
32);
d->shminfo.shmid = shmget(IPC_PRIVATE,
d->updateTile->bytes_per_line * d->updateTile->height,
IPC_CREAT | 0777);
d->shminfo.shmaddr = d->updateTile->data = (char *)
shmat(d->shminfo.shmid, 0, 0);
d->shminfo.readOnly = False;
XShmAttach(QX11Info::display(), &d->shminfo);
#endif
} else {
;
}
kDebug() << "Got image. bpp: " << d->framebufferImage->bits_per_pixel
<< ", depth: " << d->framebufferImage->depth
<< ", padded width: " << d->framebufferImage->bytes_per_line
<< " (sent: " << d->framebufferImage->width * 4 << ")"
<< endl;
fb = d->framebufferImage->data;
#ifdef HAVE_XDAMAGE
d->ev = new EvWidget(this);
kapp->installX11EventFilter(d->ev);
#endif
}
X11FrameBuffer::~X11FrameBuffer()
{
XDestroyImage(d->framebufferImage);
#ifdef HAVE_XDAMAGE
kapp->removeX11EventFilter(d->ev);
#endif
#ifdef HAVE_XSHM
XShmDetach(QX11Info::display(), &d->shminfo);
XDestroyImage(d->updateTile);
shmdt(d->shminfo.shmaddr);
shmctl(d->shminfo.shmid, IPC_RMID, 0);
#endif
delete d;
fb = 0; // already deleted by XDestroyImage
}
int X11FrameBuffer::depth()
{
return d->framebufferImage->depth;
}
int X11FrameBuffer::height()
{
return d->framebufferImage->height;
}
int X11FrameBuffer::width()
{
return d->framebufferImage->width;
}
int X11FrameBuffer::paddedWidth()
{
return d->framebufferImage->bytes_per_line;
}
void X11FrameBuffer::getServerFormat(rfbPixelFormat &format)
{
format.bitsPerPixel = d->framebufferImage->bits_per_pixel;
format.depth = d->framebufferImage->depth;
format.trueColour = true;
format.bigEndian = ((d->framebufferImage->bitmap_bit_order == MSBFirst) ? true : false);
if (format.bitsPerPixel == 8) {
format.redShift = 0;
format.greenShift = 3;
format.blueShift = 6;
format.redMax = 7;
format.greenMax = 7;
format.blueMax = 3;
} else {
format.redShift = 0;
if (d->framebufferImage->red_mask)
while (!(d->framebufferImage->red_mask & (1 << format.redShift))) {
format.redShift++;
}
format.greenShift = 0;
if (d->framebufferImage->green_mask)
while (!(d->framebufferImage->green_mask & (1 << format.greenShift))) {
format.greenShift++;
}
format.blueShift = 0;
if (d->framebufferImage->blue_mask)
while (!(d->framebufferImage->blue_mask & (1 << format.blueShift))) {
format.blueShift++;
}
format.redMax = d->framebufferImage->red_mask >> format.redShift;
format.greenMax = d->framebufferImage->green_mask >> format.greenShift;
format.blueMax = d->framebufferImage->blue_mask >> format.blueShift;
}
}
void X11FrameBuffer::handleXDamage(XEvent *event)
{
#ifdef HAVE_XDAMAGE
XDamageNotifyEvent *dev = (XDamageNotifyEvent *)event;
QRect r(dev->area.x, dev->area.y, dev->area.width, dev->area.height);
tiles.append(r);
/*if (!dev->more) {
XDamageSubtract(QX11Info::display(),d->damage, None, None);
}*/
#endif
}
void X11FrameBuffer::cleanupRects()
{
QList<QRect> cpy = tiles;
bool inserted = false;
tiles.clear();
// kDebug() << "before cleanup: " << cpy.size();
foreach(const QRect & r, cpy) {
if (tiles.size() > 0) {
for (int i = 0; i < tiles.size(); i++) {
// kDebug() << r << tiles[i];
if (r.intersects(tiles[i])) {
tiles[i] |= r;
inserted = true;
break;
// kDebug() << "merged into " << tiles[i];
}
}
if (!inserted) {
tiles.append(r);
// kDebug() << "appended " << r;
}
} else {
// kDebug() << "appended " << r;
tiles.append(r);
}
}
for (int i = 0; i < tiles.size(); i++) {
tiles[i].adjust(-30, -30, 30, 30);
if (tiles[i].top() < 0) {
tiles[i].setTop(0);
}
if (tiles[i].left() < 0) {
tiles[i].setLeft(0);
}
if (tiles[i].bottom() > d->framebufferImage->height) {
tiles[i].setBottom(d->framebufferImage->height);
}
if (tiles[i].right() > d->framebufferImage->width) {
tiles[i].setRight(d->framebufferImage->width);
}
}
// kDebug() << "after cleanup: " << tiles.size();
}
void X11FrameBuffer::acquireEvents()
{
XEvent ev;
while (XCheckTypedEvent(QX11Info::display(), d->xdamageBaseEvent + XDamageNotify, &ev)) {
handleXDamage(&ev);
}
XDamageSubtract(QX11Info::display(), d->damage, None, None);
}
QList< QRect > X11FrameBuffer::modifiedTiles()
{
QList<QRect> ret;
if (!d->running) {
return ret;
}
kapp->processEvents(); // try to make sure every damage event goes trough;
cleanupRects();
QRect gl;
//d->useShm = false;
if (tiles.size() > 0) {
if (d->useShm) {
#ifdef HAVE_XSHM
foreach(const QRect & r, tiles) {
// kDebug() << r;
gl |= r;
int y = r.y();
int x = r.x();
while (x < r.right()) {
while (y < r.bottom()) {
if (y + d->updateTile->height > d->framebufferImage->height) {
y = d->framebufferImage->height - d->updateTile->height;
}
if (x + d->updateTile->width > d->framebufferImage->width) {
x = d->framebufferImage->width - d->updateTile->width;
}
// kDebug() << "x: " << x << " (" << r.x() << ") y: " << y << " (" << r.y() << ") " << r;
XShmGetImage(QX11Info::display(), win, d->updateTile, x, y, AllPlanes);
int pxsize = d->framebufferImage->bits_per_pixel / 8;
char *dest = fb + ((d->framebufferImage->bytes_per_line * y) + (x * pxsize));
char *src = d->updateTile->data;
for (int i = 0; i < d->updateTile->height; i++) {
memcpy(dest, src, d->updateTile->bytes_per_line);
dest += d->framebufferImage->bytes_per_line;
src += d->updateTile->bytes_per_line;
}
y += d->updateTile->height;
}
x += d->updateTile->width;
y = r.y();
}
}
#endif
} else {
foreach(const QRect & r, tiles) {
XGetSubImage(QX11Info::display(),
win,
r.left(),
r.top(),
r.width(),
r.height(),
AllPlanes,
ZPixmap,
d->framebufferImage,
r.left(),
r.top()
);
}
}
}
// kDebug() << "tot: " << gl;
// kDebug() << tiles.size();
ret = tiles;
tiles.clear();
return ret;
}
void X11FrameBuffer::startMonitor()
{
d->running = true;
#ifdef HAVE_XDAMAGE
d->damage = XDamageCreate(QX11Info::display(), win, XDamageReportRawRectangles);
XDamageSubtract(QX11Info::display(), d->damage, None, None);
#endif
}
void X11FrameBuffer::stopMonitor()
{
d->running = false;
#ifdef HAVE_XDAMAGE
XDamageDestroy(QX11Info::display(), d->damage);
#endif
}
EvWidget::EvWidget(X11FrameBuffer *x11fb)
: QWidget(0), fb(x11fb)
{
#ifdef HAVE_XDAMAGE
int er;
XDamageQueryExtension(QX11Info::display(), &xdamageBaseEvent, &er);
#endif
}
bool EvWidget::x11Event(XEvent *event)
{
#ifdef HAVE_XDAMAGE
if (event->type == xdamageBaseEvent + XDamageNotify) {
fb->handleXDamage(event);
return true;
}
#endif
return false;
}

View File

@@ -1,62 +0,0 @@
/* This file is part of the KDE project
Copyright (C) 2007 Alessandro Praduroux <pradu@pradu.it>
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 2 of the License, or (at your option) any later version.
*/
#ifndef KRFB_FRAMEBUFFER_X11_X11FRAMEBUFFER_H
#define KRFB_FRAMEBUFFER_X11_X11FRAMEBUFFER_H
#include <framebuffer.h>
#include <QWidget>
class X11FrameBuffer;
class EvWidget: public QWidget
{
Q_OBJECT
public:
EvWidget(X11FrameBuffer *x11fb);
protected:
bool x11Event(XEvent *event);
private:
X11FrameBuffer *fb;
int xdamageBaseEvent;
};
/**
@author Alessandro Praduroux <pradu@pradu.it>
*/
class X11FrameBuffer : public FrameBuffer
{
Q_OBJECT
public:
X11FrameBuffer(WId id, QObject *parent = 0);
~X11FrameBuffer();
virtual QList<QRect> modifiedTiles();
virtual int depth();
virtual int height();
virtual int width();
virtual int paddedWidth();
virtual void getServerFormat(rfbPixelFormat &format);
virtual void startMonitor();
virtual void stopMonitor();
void handleXDamage(XEvent *event);
private:
void cleanupRects();
void acquireEvents();
class P;
P *const d;
};
#endif

View File

@@ -0,0 +1,38 @@
include_directories (${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
)
set (krfb_framebuffer_xcb_SRCS
xcb_framebufferplugin.cpp
xcb_framebuffer.cpp
)
ecm_qt_declare_logging_category(krfb_framebuffer_xcb_SRCS
HEADER krfb_fb_xcb_debug.h
IDENTIFIER KRFB_FB_XCB
CATEGORY_NAME krfb.framebuffer.xcb
DESCRIPTION "KRFB XCB framebuffer plugin"
EXPORT KRFB
)
add_library(krfb_framebuffer_xcb MODULE ${krfb_framebuffer_xcb_SRCS})
target_link_libraries (krfb_framebuffer_xcb
Qt::Core
Qt::Gui
Qt::GuiPrivate
XCB::XCB
XCB::RENDER
XCB::SHAPE
XCB::XFIXES
XCB::DAMAGE
XCB::SHM
XCB::IMAGE
KF6::CoreAddons
krfbprivate
)
set_target_properties(krfb_framebuffer_xcb PROPERTIES OUTPUT_NAME xcb)
install (TARGETS krfb_framebuffer_xcb
DESTINATION ${KDE_INSTALL_PLUGINDIR}/krfb/framebuffer
)

View File

@@ -0,0 +1,6 @@
{
"X-KDE-OnlyShowOnQtPlatforms": [
"xcb"
]
}

View File

@@ -0,0 +1,693 @@
/* This file is part of the KDE project
Copyright (C) 2017 Alexey Min <alexey.min@gmail.com>
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 2 of the License, or (at your option) any later version.
*/
#include "xcb_framebuffer.h"
#include "krfb_fb_xcb_debug.h"
#include <xcb/xproto.h>
#include <xcb/damage.h>
#include <xcb/shm.h>
#include <xcb/xcb_image.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <QApplication>
#include <QGuiApplication>
#include <QScreen>
#include <QAbstractNativeEventFilter>
#include <qpa/qplatformnativeinterface.h>
#include <QtGui/private/qtx11extras_p.h>
class KrfbXCBEventFilter: public QAbstractNativeEventFilter
{
public:
KrfbXCBEventFilter(XCBFrameBuffer *owner);
public:
bool nativeEventFilter(const QByteArray &eventType, void *message, qintptr *result) override;
public:
int xdamageBaseEvent;
int xdamageBaseError;
int xshmBaseEvent;
int xshmBaseError;
bool xshmAvail;
XCBFrameBuffer *fb_owner;
};
KrfbXCBEventFilter::KrfbXCBEventFilter(XCBFrameBuffer *owner):
xdamageBaseEvent(0), xdamageBaseError(0),
xshmBaseEvent(0), xshmBaseError(0), xshmAvail(false),
fb_owner(owner)
{
const xcb_query_extension_reply_t *xdamage_data = xcb_get_extension_data(
QX11Info::connection(), &xcb_damage_id);
if (xdamage_data) {
// also query extension version!
// ATTENTION: if we don't do that, xcb_damage_create() will always FAIL!
xcb_damage_query_version_reply_t *xdamage_version = xcb_damage_query_version_reply(
QX11Info::connection(),
xcb_damage_query_version(
QX11Info::connection(),
XCB_DAMAGE_MAJOR_VERSION,
XCB_DAMAGE_MINOR_VERSION),
nullptr);
if (!xdamage_version) {
qWarning() << "xcb framebuffer: ERROR: Failed to get XDamage extension version!\n";
return;
}
#ifdef _DEBUG
qCDebug(KRFB_FB_XCB) << "xcb framebuffer: XDamage extension version:" <<
xdamage_version->major_version << "." << xdamage_version->minor_version;
#endif
free(xdamage_version);
xdamageBaseEvent = xdamage_data->first_event;
xdamageBaseError = xdamage_data->first_error;
// XShm presence is optional. If it is present, all image getting
// operations will be faster, without XShm it will only be slower.
const xcb_query_extension_reply_t *xshm_data = xcb_get_extension_data(
QX11Info::connection(), &xcb_shm_id);
if (xshm_data) {
xshmAvail = true;
xshmBaseEvent = xshm_data->first_event;
xshmBaseError = xshm_data->first_error;
} else {
xshmAvail = false;
qWarning() << "xcb framebuffer: WARNING: XSHM extension not available!";
}
} else {
// if there is no xdamage available, this plugin can be considered useless anyway.
// you can use just qt framebuffer plugin instead...
qWarning() << "xcb framebuffer: ERROR: no XDamage extension available. I am useless.";
qWarning() << "xcb framebuffer: use qt framebuffer plugin instead.";
}
}
bool KrfbXCBEventFilter::nativeEventFilter(const QByteArray &eventType,
void *message, qintptr *result) {
Q_UNUSED(result); // "result" is only used on windows
if (xdamageBaseEvent == 0) return false; // no xdamage extension
if (eventType == "xcb_generic_event_t") {
auto ev = static_cast<xcb_generic_event_t *>(message);
if ((ev->response_type & 0x7F) == (xdamageBaseEvent + XCB_DAMAGE_NOTIFY)) {
// this is xdamage notification
this->fb_owner->handleXDamageNotify(ev);
return true; // filter out this event, stop its processing
}
}
// continue event processing
return false;
}
class XCBFrameBuffer::P {
public:
xcb_damage_damage_t damage;
xcb_shm_segment_info_t shminfo;
xcb_screen_t *rootScreen; // X screen info (all monitors)
xcb_image_t *framebufferImage;
xcb_image_t *updateTile;
KrfbXCBEventFilter *x11EvtFilter;
bool running;
QRect area; // capture area, primary monitor coordinates
WId win;
};
static xcb_screen_t *get_xcb_screen(xcb_connection_t *conn, int screen_num) {
xcb_screen_t *screen = nullptr;
xcb_screen_iterator_t screens_iter = xcb_setup_roots_iterator(xcb_get_setup(conn));
for (; screens_iter.rem; --screen_num, xcb_screen_next(&screens_iter))
if (screen_num == 0)
screen = screens_iter.data;
return screen;
}
XCBFrameBuffer::XCBFrameBuffer(QObject *parent):
FrameBuffer(parent), d(new XCBFrameBuffer::P)
{
d->running = false;
d->damage = XCB_NONE;
d->framebufferImage = nullptr;
d->shminfo.shmaddr = nullptr;
d->shminfo.shmid = XCB_NONE;
d->shminfo.shmseg = XCB_NONE;
d->updateTile = nullptr;
d->area.setRect(0, 0, 0, 0);
d->x11EvtFilter = new KrfbXCBEventFilter(this);
d->rootScreen = get_xcb_screen(QX11Info::connection(), QX11Info::appScreen());
this->fb = nullptr;
QScreen *primaryScreen = QGuiApplication::primaryScreen();
if (primaryScreen) {
QPlatformNativeInterface* native = qApp->platformNativeInterface();
d->win = reinterpret_cast<WId>(native->nativeResourceForScreen(QByteArrayLiteral("rootwindow"), primaryScreen));
qreal scaleFactor = primaryScreen->devicePixelRatio();
d->area = { primaryScreen->geometry().topLeft() * scaleFactor,
primaryScreen->geometry().bottomRight() * scaleFactor };
qCDebug(KRFB_FB_XCB) << "xcb framebuffer: Primary screen: " << primaryScreen->name()
<< ", geometry: " << primaryScreen->geometry()
<< ", device scaling: " << scaleFactor
<< ", native size: " << d->area
<< ", depth: " << primaryScreen->depth();
} else {
qWarning() << "xcb framebuffer: ERROR: Failed to get application's primary screen info!";
return;
}
d->framebufferImage = xcb_image_get(QX11Info::connection(),
d->win,
d->area.left(),
d->area.top(),
d->area.width(),
d->area.height(),
0xFFFFFFFF, // == Xlib: AllPlanes ((unsigned long)~0L)
XCB_IMAGE_FORMAT_Z_PIXMAP);
if (d->framebufferImage) {
#ifdef _DEBUG
qCDebug(KRFB_FB_XCB) << "xcb framebuffer: Got primary screen image. bpp: " << d->framebufferImage->bpp
<< ", size (" << d->framebufferImage->width << d->framebufferImage->height << ")"
<< ", depth: " << d->framebufferImage->depth
<< ", padded width: " << d->framebufferImage->stride;
#endif
this->fb = (char *)d->framebufferImage->data;
} else {
qWarning() << "xcb framebuffer: ERROR: Failed to get primary screen image!";
return;
}
// all XShm operations should take place only if Xshm extension was loaded
if (d->x11EvtFilter->xshmAvail) {
// Create xcb_image_t structure, but do not automatically allocate memory
// for image data storage - it will be allocated as shared memory.
// "If base == 0 and bytes == ~0 and data == 0, no storage will be auto-allocated."
// Width and height of the image = size of the capture area.
d->updateTile = xcb_image_create_native(
QX11Info::connection(),
d->area.width(), // width
d->area.height(), // height
XCB_IMAGE_FORMAT_Z_PIXMAP, // image format
d->rootScreen->root_depth, // depth
nullptr, // base address = 0
(uint32_t)~0, // bytes = 0xffffffff
nullptr); // data = 0
if (d->updateTile) {
#ifdef _DEBUG
qCDebug(KRFB_FB_XCB) << "xcb framebuffer: Successfully created new empty image in native format"
<< "\n size: " << d->updateTile->width << "x" << d->updateTile->height
<< "(stride: " << d->updateTile->stride << ")"
<< "\n bpp, depth: " << d->updateTile->bpp << d->updateTile->depth // 32, 24
<< "\n addr of base, data: " << d->updateTile->base << (void *)d->updateTile->data
<< "\n size: " << d->updateTile->size
<< "\n image byte order = " << d->updateTile->byte_order // == 0 .._LSB_FIRST
<< "\n image bit order = " << d->updateTile->bit_order // == 1 .._MSB_FIRST
<< "\n image plane_mask = " << d->updateTile->plane_mask; // == 16777215 == 0x00FFFFFF
#endif
// allocate shared memory block only once, make its size large enough
// to fit whole capture area (d->area rect)
// so, we get as many bytes as needed for image (updateTile->size)
d->shminfo.shmid = shmget(IPC_PRIVATE, d->updateTile->size, IPC_CREAT | 0777);
// attached shared memory address is stored both in shminfo structure and in xcb_image_t->data
d->shminfo.shmaddr = (uint8_t *)shmat(d->shminfo.shmid, nullptr, 0);
d->updateTile->data = d->shminfo.shmaddr;
// we keep updateTile->base == NULL here, so xcb_image_destroy() will not attempt
// to free this block, just in case.
// attach this shm segment also to X server
d->shminfo.shmseg = xcb_generate_id(QX11Info::connection());
xcb_shm_attach(QX11Info::connection(), d->shminfo.shmseg, d->shminfo.shmid, 0);
#ifdef _DEBUG
qCDebug(KRFB_FB_XCB) << " shm id: " << d->shminfo.shmseg << ", addr: " << (void *)d->shminfo.shmaddr;
#endif
// will return 1 on success (yes!)
int shmget_res = xcb_image_shm_get(
QX11Info::connection(),
d->win,
d->updateTile,
d->shminfo,
d->area.left(), // x
d->area.top(), // y (size taken from image structure itself)?
0xFFFFFFFF);
if (shmget_res == 0) {
// error! shared mem not working?
// will not use shared mem! detach and cleanup
xcb_shm_detach(QX11Info::connection(), d->shminfo.shmseg);
shmdt(d->shminfo.shmaddr);
shmctl(d->shminfo.shmid, IPC_RMID, nullptr); // mark shm segment as removed
d->x11EvtFilter->xshmAvail = false;
d->shminfo.shmaddr = nullptr;
d->shminfo.shmid = XCB_NONE;
d->shminfo.shmseg = XCB_NONE;
qWarning() << "xcb framebuffer: ERROR: xcb_image_shm_get() result: " << shmget_res;
}
// image is freed, and recreated again for every new damage rectangle
// data was allocated manually and points to shared mem;
// tell xcb_image_destroy() do not free image data
d->updateTile->data = nullptr;
xcb_image_destroy(d->updateTile);
d->updateTile = nullptr;
}
}
#ifdef _DEBUG
qCDebug(KRFB_FB_XCB) << "xcb framebuffer: XCBFrameBuffer(), xshm base event = " << d->x11EvtFilter->xshmBaseEvent
<< ", xshm base error = " << d->x11EvtFilter->xdamageBaseError
<< ", xdamage base event = " << d->x11EvtFilter->xdamageBaseEvent
<< ", xdamage base error = " << d->x11EvtFilter->xdamageBaseError;
#endif
QCoreApplication::instance()->installNativeEventFilter(d->x11EvtFilter);
}
XCBFrameBuffer::~XCBFrameBuffer() {
// first - uninstall x11 event filter
QCoreApplication::instance()->removeNativeEventFilter(d->x11EvtFilter);
//
if (d->framebufferImage) {
xcb_image_destroy(d->framebufferImage);
fb = nullptr; // image data was already destroyed by above call
}
if (d->x11EvtFilter->xshmAvail) {
// detach shared memory
if (d->shminfo.shmseg != XCB_NONE)
xcb_shm_detach(QX11Info::connection(), d->shminfo.shmseg); // detach from X server
if (d->shminfo.shmaddr)
shmdt(d->shminfo.shmaddr); // detach addr from our address space
if (d->shminfo.shmid != XCB_NONE)
shmctl(d->shminfo.shmid, IPC_RMID, nullptr); // mark shm segment as removed
}
// and delete image used for shared mem
if (d->updateTile) {
d->updateTile->base = nullptr;
d->updateTile->data = nullptr;
xcb_image_destroy(d->updateTile);
}
// we don't use d->x11EvtFilter anymore, can delete it now
if (d->x11EvtFilter) {
delete d->x11EvtFilter;
}
delete d;
}
int XCBFrameBuffer::depth() {
if (d->framebufferImage) {
return d->framebufferImage->depth;
}
return 0;
}
int XCBFrameBuffer::height() {
if (d->framebufferImage) {
return d->framebufferImage->height;
}
return 0;
}
int XCBFrameBuffer::width() {
if (d->framebufferImage) {
return d->framebufferImage->width;
}
return 0;
}
int XCBFrameBuffer::paddedWidth() {
if (d->framebufferImage) {
return d->framebufferImage->stride;
}
return 0;
}
void XCBFrameBuffer::getServerFormat(rfbPixelFormat &format) {
if (!d->framebufferImage) return;
// get information about XCB visual params
xcb_visualtype_t *root_visualtype = nullptr; // visual info
if (d->rootScreen) {
xcb_visualid_t root_visual = d->rootScreen->root_visual;
xcb_depth_iterator_t depth_iter;
// To get the xcb_visualtype_t structure, it's a bit less easy.
// You have to get the xcb_screen_t structure that you want, get its
// root_visual member, then iterate over the xcb_depth_t's and the
// xcb_visualtype_t's, and compare the xcb_visualid_t of these
// xcb_visualtype_ts: with root_visual
depth_iter = xcb_screen_allowed_depths_iterator(d->rootScreen);
for (; depth_iter.rem; xcb_depth_next(&depth_iter)) {
xcb_visualtype_iterator_t visual_iter;
visual_iter = xcb_depth_visuals_iterator(depth_iter.data);
for (; visual_iter.rem; xcb_visualtype_next(&visual_iter)) {
if (root_visual == visual_iter.data->visual_id) {
root_visualtype = visual_iter.data;
break;
}
}
}
}
// fill in format common info
format.bitsPerPixel = d->framebufferImage->bpp;
format.depth = d->framebufferImage->depth;
format.trueColour = true; // not using color palettes
format.bigEndian = false; // always false for ZPIXMAP format!
// information about pixels layout
if (root_visualtype) {
#ifdef _DEBUG
qDebug("xcb framebuffer: Got info about root visual:\n"
" bits per rgb value: %d\n"
" red mask: %08x\n"
" green mask: %08x\n"
" blue mask: %08x\n",
(int)root_visualtype->bits_per_rgb_value,
root_visualtype->red_mask,
root_visualtype->green_mask,
root_visualtype->blue_mask);
#endif
// calculate shifts
format.redShift = 0;
if (root_visualtype->red_mask) {
while (!(root_visualtype->red_mask & (1 << format.redShift))) {
format.redShift++;
}
}
format.greenShift = 0;
if (root_visualtype->green_mask) {
while (!(root_visualtype->green_mask & (1 << format.greenShift))) {
format.greenShift++;
}
}
format.blueShift = 0;
if (root_visualtype->blue_mask) {
while (!(root_visualtype->blue_mask & (1 << format.blueShift))) {
format.blueShift++;
}
}
// calculate pixel max value.
// NOTE: bits_per_rgb_value is unreliable, thus should be avoided.
format.redMax = root_visualtype->red_mask >> format.redShift;
format.greenMax = root_visualtype->green_mask >> format.greenShift;
format.blueMax = root_visualtype->blue_mask >> format.blueShift;
#ifdef _DEBUG
qCDebug(KRFB_FB_XCB,
" Calculated redShift = %d\n"
" Calculated greenShift = %d\n"
" Calculated blueShift = %d\n"
" Calculated max values: R%d G%d B%d",
format.redShift, format.greenShift, format.blueShift
format.redMax, format.greenMax, format.blueMax);
#endif
} else {
// some kind of fallback (unlikely code execution will go this way)
// idea taken from qt framefuffer sources
if (format.bitsPerPixel == 8) {
format.redShift = 0;
format.greenShift = 3;
format.blueShift = 6;
format.redMax = 7;
format.greenMax = 7;
format.blueMax = 3;
} else if (format.bitsPerPixel == 16) {
// TODO: 16 bits per pixel format ??
// what format of pixels does X server use for 16-bpp?
} else if (format.bitsPerPixel == 32) {
format.redMax = 0xff;
format.greenMax = 0xff;
format.blueMax = 0xff;
if (format.bigEndian) {
format.redShift = 0;
format.greenShift = 8;
format.blueShift = 16;
} else {
format.redShift = 16;
format.greenShift = 8;
format.blueShift = 0;
}
}
}
}
/**
* This function contents was taken from X11 framebuffer source code.
* It simply several intersecting rectangles into one bigger rect.
* Non-intersecting rects are treated as different rects and exist
* separately in this->tiles QList.
*/
void XCBFrameBuffer::cleanupRects() {
QList<QRect> cpy = tiles;
bool inserted = false;
tiles.clear();
QListIterator<QRect> iter(cpy);
while (iter.hasNext()) {
const QRect &r = iter.next();
// skip rects not intersecting with primary monitor
if (!r.intersects(d->area)) continue;
// only take intersection of this rect with primary monitor rect
QRect ri = r.intersected(d->area);
if (tiles.size() > 0) {
for (auto &tile : tiles) {
// if current rect has intersection with tile, unite them
if (ri.intersects(tile)) {
tile |= ri;
inserted = true;
break;
}
}
if (!inserted) {
// else, append to list as different rect
tiles.append(ri);
}
} else {
// tiles list is empty, append first item
tiles.append(ri);
}
}
// increase all rectangles size by 30 pixels each side.
// limit coordinates to primary monitor boundaries.
for (auto &tile : tiles) {
tile.adjust(-30, -30, 30, 30);
if (tile.top() < d->area.top()) {
tile.setTop(d->area.top());
}
if (tile.bottom() > d->area.bottom()) {
tile.setBottom(d->area.bottom());
}
//
if (tile.left() < d->area.left()) {
tile.setLeft(d->area.left());
}
if (tile.right() > d->area.right()) {
tile.setRight(d->area.right());
}
// move update rects so that they are positioned relative to
// framebuffer image, not whole screen
tile.moveTo(tile.left() - d->area.left(),
tile.top() - d->area.top());
}
}
/**
* This function is called by RfbServerManager::updateScreens()
* approximately every 50ms (!!), driven by QTimer to get all
* modified rectangles on the screen
*/
QList<QRect> XCBFrameBuffer::modifiedTiles() {
QList<QRect> ret;
if (!d->running) {
return ret;
}
cleanupRects();
if (tiles.size() > 0) {
if (d->x11EvtFilter->xshmAvail) {
// loop over all damage rectangles gathered up to this time
QListIterator<QRect> iter(tiles);
//foreach(const QRect &r, tiles) {
while (iter.hasNext()) {
const QRect &r = iter.next();
// get image data into shared memory segment
// now rects are positioned relative to framebufferImage,
// but we need to get image from the whole screen, so
// translate whe coordinates
xcb_shm_get_image_cookie_t sgi_cookie = xcb_shm_get_image(
QX11Info::connection(),
d->win,
d->area.left() + r.left(),
d->area.top() + r.top(),
r.width(),
r.height(),
0xFFFFFFFF,
XCB_IMAGE_FORMAT_Z_PIXMAP,
d->shminfo.shmseg,
0);
xcb_shm_get_image_reply_t *sgi_reply = xcb_shm_get_image_reply(
QX11Info::connection(), sgi_cookie, nullptr);
if (sgi_reply) {
// create temporary image to get update rect contents into
d->updateTile = xcb_image_create_native(
QX11Info::connection(),
r.width(),
r.height(),
XCB_IMAGE_FORMAT_Z_PIXMAP,
d->rootScreen->root_depth,
nullptr, // base == 0
(uint32_t)~0, // bytes == ~0
nullptr);
if (d->updateTile) {
d->updateTile->data = d->shminfo.shmaddr;
// copy pixels from this damage rectangle image
// to our total framebuffer image
int pxsize = d->framebufferImage->bpp / 8;
char *dest = fb + ((d->framebufferImage->stride * r.top()) + (r.left() * pxsize));
char *src = (char *)d->updateTile->data;
for (int i = 0; i < d->updateTile->height; i++) {
memcpy(dest, src, d->updateTile->stride); // copy whole row of pixels
dest += d->framebufferImage->stride;
src += d->updateTile->stride;
}
// delete temporary image
d->updateTile->data = nullptr;
xcb_image_destroy(d->updateTile);
d->updateTile = nullptr;
}
free(sgi_reply);
}
} // foreach
} else {
// not using shared memory
// will use just xcb_image_get() and copy pixels
for (const QRect& r : std::as_const(tiles)) {
// I did not find XGetSubImage() analog in XCB!!
// need function that copies pixels from one image to another
xcb_image_t *damagedImage = xcb_image_get(
QX11Info::connection(),
d->win,
r.left(),
r.top(),
r.width(),
r.height(),
0xFFFFFFFF, // AllPlanes
XCB_IMAGE_FORMAT_Z_PIXMAP);
// manually copy pixels
int pxsize = d->framebufferImage->bpp / 8;
char *dest = fb + ((d->framebufferImage->stride * r.top()) + (r.left() * pxsize));
char *src = (char *)damagedImage->data;
// loop every row in damaged image
for (int i = 0; i < damagedImage->height; i++) {
// copy whole row of pixels from src image to dest
memcpy(dest, src, damagedImage->stride);
dest += d->framebufferImage->stride; // move 1 row down in dest
src += damagedImage->stride; // move 1 row down in src
}
//
xcb_image_destroy(damagedImage);
}
}
} // if (tiles.size() > 0)
ret = tiles;
tiles.clear();
// ^^ If we clear here all our known "damage areas", then we can also clear
// damaged area for xdamage? No, we don't need to in our case
// (XCB_DAMAGE_REPORT_LEVEL_RAW_RECTANGLES report mode)
//xcb_damage_subtract(QX11Info::connection(), d->damage, XCB_NONE, XCB_NONE);
return ret;
}
void XCBFrameBuffer::startMonitor() {
if (d->running) return;
d->running = true;
d->damage = xcb_generate_id(QX11Info::connection());
xcb_damage_create(QX11Info::connection(), d->damage, d->win,
XCB_DAMAGE_REPORT_LEVEL_RAW_RECTANGLES);
// (currently) we do not call xcb_damage_subtract() EVER, because
// RAW rectangles are reported. every time some area of the screen
// was changed, we get only that rectangle
//xcb_damage_subtract(QX11Info::connection(), d->damage, XCB_NONE, XCB_NONE);
}
void XCBFrameBuffer::stopMonitor() {
if (!d->running) return;
d->running = false;
xcb_damage_destroy(QX11Info::connection(), d->damage);
}
// void XCBFrameBuffer::acquireEvents() {} // this function was totally unused
// in X11 framebuffer, but it was the only function where XDamageSubtract() was called?
// Also it had a blocking event loop like:
//
// XEvent ev;
// while (XCheckTypedEvent(QX11Info::display(), d->xdamageBaseEvent + XDamageNotify, &ev)) {
// handleXDamage(&ev);
// }
// XDamageSubtract(QX11Info::display(), d->damage, None, None);
//
// This loop takes all available Xdamage events from queue, and ends if there are no
// more such events in input queue.
void XCBFrameBuffer::handleXDamageNotify(xcb_generic_event_t *xevent) {
auto xdevt = (xcb_damage_notify_event_t *)xevent;
QRect r((int)xdevt->area.x, (int)xdevt->area.y,
(int)xdevt->area.width, (int)xdevt->area.height);
this->tiles.append(r);
}

View File

@@ -0,0 +1,48 @@
/* This file is part of the KDE project
Copyright (C) 2017 Alexey Min <alexey.min@gmail.com>
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 2 of the License, or (at your option) any later version.
*/
#ifndef KRFB_FRAMEBUFFER_XCB_XCB_FRAMEBUFFER_H
#define KRFB_FRAMEBUFFER_XCB_XCB_FRAMEBUFFER_H
#include "framebuffer.h"
#include <QWidget>
#include <xcb/xcb.h>
/**
@author Alexey Min <alexey.min@gmail.com>
*/
class XCBFrameBuffer: public FrameBuffer
{
Q_OBJECT
public:
explicit XCBFrameBuffer(QObject *parent = nullptr);
~XCBFrameBuffer() override;
public:
QList<QRect> modifiedTiles() override;
int depth() override;
int height() override;
int width() override;
int paddedWidth() override;
void getServerFormat(rfbPixelFormat &format) override;
void startMonitor() override;
void stopMonitor() override;
public:
void handleXDamageNotify(xcb_generic_event_t *xevent);
private:
void cleanupRects();
class P;
P *const d;
};
#endif

View File

@@ -0,0 +1,39 @@
/* This file is part of the KDE project
Copyright (C) 2017 Alexey Min <alexey.min@gmail.com>
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 2 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; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "xcb_framebufferplugin.h"
#include "xcb_framebuffer.h"
#include <KPluginFactory>
K_PLUGIN_CLASS_WITH_JSON(XCBFrameBufferPlugin, "xcb.json")
XCBFrameBufferPlugin::XCBFrameBufferPlugin(QObject *parent, const QVariantList &args)
: FrameBufferPlugin(parent, args)
{
}
FrameBuffer *XCBFrameBufferPlugin::frameBuffer(const QVariantMap &args)
{
Q_UNUSED(args);
return new XCBFrameBuffer;
}
#include "xcb_framebufferplugin.moc"

View File

@@ -0,0 +1,44 @@
/* This file is part of the KDE project
@author Alexey Min <alexey.min@gmail.com>
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 2 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; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef KRFB_FRAMEBUFFER_XCB_XCBFRAMEBUFFERPLUGIN_H
#define KRFB_FRAMEBUFFER_XCB_XCBFRAMEBUFFERPLUGIN_H
#include "framebufferplugin.h"
#include <QWidget>
class FrameBuffer;
class XCBFrameBufferPlugin: public FrameBufferPlugin
{
Q_OBJECT
public:
XCBFrameBufferPlugin(QObject *parent, const QVariantList &args);
FrameBuffer *frameBuffer(const QVariantMap &args) override;
private:
Q_DISABLE_COPY(XCBFrameBufferPlugin)
};
#endif // Header guard

BIN
icons/48-apps-krfb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

4
icons/CMakeLists.txt Normal file
View File

@@ -0,0 +1,4 @@
ecm_install_icons(ICONS
sc-apps-krfb.svgz
48-apps-krfb.png
DESTINATION ${KDE_INSTALL_ICONDIR} THEME hicolor )

BIN
icons/sc-apps-krfb.svgz Normal file

Binary file not shown.

View File

@@ -1,17 +0,0 @@
include_directories(${CMAKE_BINARY_DIR}/krfb/krfb)
set(kcm_krfb_PART_SRCS kcm_krfb.cpp ${krfbconfig_SRCS})
kde4_add_ui3_files(kcm_krfb_PART_SRCS configurationwidget.ui)
kde4_add_ui3_files(kcm_krfb_PART_SRCS
${CMAKE_SOURCE_DIR}/krfb/krfb/manageinvitations.ui
${CMAKE_SOURCE_DIR}/krfb/krfb/personalinvitewidget.ui
${CMAKE_SOURCE_DIR}/krfb/krfb/invitewidget.ui)
kde4_add_plugin(kcm_krfb ${kcm_krfb_PART_SRCS})
target_link_libraries(kcm_krfb ${KDE4_KDECORE_LIBS} ${KDE4_KDE3SUPPORT_LIBS})
install(TARGETS kcm_krfb DESTINATION ${PLUGIN_INSTALL_DIR})
install( FILES kcmkrfb.desktop DESTINATION ${SERVICES_INSTALL_DIR})

View File

@@ -1,3 +0,0 @@
#! /bin/sh
$EXTRACTRC *.ui >> rc.cpp
$XGETTEXT *.cpp -o $podir/kcm_krfb.pot

View File

@@ -1,509 +0,0 @@
<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
<class>ConfigurationWidget</class>
<widget class="QWidget">
<property name="name">
<cstring>ConfigurationWidget</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>421</width>
<height>445</height>
</rect>
</property>
<property name="icon">
<pixmap>image0</pixmap>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QTabWidget">
<property name="name">
<cstring>TabWidget2</cstring>
</property>
<widget class="QWidget">
<property name="name">
<cstring>tab</cstring>
</property>
<attribute name="title">
<string>Acc&amp;ess</string>
</attribute>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>11</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QGroupBox">
<property name="name">
<cstring>GroupBox1</cstring>
</property>
<property name="title">
<string>Invitations</string>
</property>
<property name="alignment">
<set>AlignAuto</set>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>11</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLabel">
<property name="name">
<cstring>invitationNumLabel</cstring>
</property>
<property name="text">
<string>You have no open invitations.</string>
</property>
</widget>
<widget class="QPushButton">
<property name="name">
<cstring>manageInvitations</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Create &amp;&amp; &amp;Manage Invitations...</string>
</property>
<property name="whatsThis" stdset="0">
<string>Click to view or delete the open invitations.</string>
</property>
</widget>
</vbox>
</widget>
<widget class="QButtonGroup">
<property name="name">
<cstring>ButtonGroup7</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>5</hsizetype>
<vsizetype>1</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Uninvited Connections</string>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>11</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QCheckBox">
<property name="name">
<cstring>allowUninvitedCB</cstring>
</property>
<property name="text">
<string>Allow &amp;uninvited connections</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="whatsThis" stdset="0">
<string>Select this option to allow connecting without inviting. This is useful if you want to access your desktop remotely.</string>
</property>
</widget>
<widget class="QCheckBox">
<property name="name">
<cstring>enableSLPCB</cstring>
</property>
<property name="text">
<string>Announce service &amp;on the network</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="whatsThis" stdset="0">
<string>If you allow uninvited connections and enable this option, Desktop Sharing will announce the service and your identity on the local network, so people can find you and your computer.</string>
</property>
</widget>
<widget class="QCheckBox">
<property name="name">
<cstring>confirmConnectionsCB</cstring>
</property>
<property name="text">
<string>Confirm uninvited connections &amp;before accepting</string>
</property>
<property name="whatsThis" stdset="0">
<string>If enabled, a dialog will appear when somebody attempts to connect, asking you whether you want to accept the connection.</string>
</property>
</widget>
<widget class="QCheckBox">
<property name="name">
<cstring>allowDesktopControlCB</cstring>
</property>
<property name="text">
<string>A&amp;llow uninvited connections to control the desktop</string>
</property>
<property name="whatsThis" stdset="0">
<string>Enable this option to allow uninvited user to control your desktop (using mouse and keyboard).</string>
</property>
</widget>
<widget class="QFrame">
<property name="name">
<cstring>Frame4</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>5</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape">
<enum>NoFrame</enum>
</property>
<property name="frameShadow">
<enum>Plain</enum>
</property>
<property name="layoutMargin" stdset="0">
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>6</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLabel">
<property name="name">
<cstring>TextLabel1</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>1</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Pass&amp;word:</string>
</property>
<property name="buddy" stdset="0">
<cstring>passwordInput</cstring>
</property>
</widget>
<widget class="QLineEdit">
<property name="name">
<cstring>passwordInput</cstring>
</property>
<property name="maxLength">
<number>9</number>
</property>
<property name="echoMode">
<enum>Password</enum>
</property>
<property name="whatsThis" stdset="0">
<string>If you allow uninvited connections, it is highly recommended to set a password in order to protect your computer from unauthorized access.</string>
</property>
</widget>
</vbox>
</widget>
</vbox>
</widget>
<spacer>
<property name="name">
<cstring>Spacer3</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>0</width>
<height>50</height>
</size>
</property>
</spacer>
</vbox>
</widget>
<widget class="QWidget">
<property name="name">
<cstring>tab</cstring>
</property>
<attribute name="title">
<string>&amp;Session</string>
</attribute>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>11</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QGroupBox">
<property name="name">
<cstring>GroupBox4</cstring>
</property>
<property name="title">
<string>Session Preferences</string>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>11</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QCheckBox">
<property name="name">
<cstring>disableBackgroundCB</cstring>
</property>
<property name="text">
<string>Always disable &amp;background image</string>
</property>
<property name="checked">
<bool>false</bool>
</property>
<property name="whatsThis" stdset="0">
<string>Check this option to always disable the background image during a remote session. Otherwise the client decides whether the background will be enabled or disabled.</string>
</property>
</widget>
</vbox>
</widget>
<spacer>
<property name="name">
<cstring>Spacer4</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
</spacer>
</vbox>
</widget>
<widget class="QWidget">
<property name="name">
<cstring>tab</cstring>
</property>
<attribute name="title">
<string>&amp;Network</string>
</attribute>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>11</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QGroupBox">
<property name="name">
<cstring>GroupBox3</cstring>
</property>
<property name="title">
<string>Network Port</string>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>11</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QCheckBox">
<property name="name">
<cstring>autoPortCB</cstring>
</property>
<property name="text">
<string>Assi&amp;gn port automatically</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="whatsThis" stdset="0">
<string>Check this option to assign the network port automatically. This is recommended unless your network setup requires you to use a fixed port, for example because of a firewall.</string>
</property>
</widget>
<widget class="QFrame">
<property name="name">
<cstring>portInputFrame</cstring>
</property>
<property name="enabled">
<bool>false</bool>
</property>
<property name="frameShape">
<enum>NoFrame</enum>
</property>
<property name="frameShadow">
<enum>Plain</enum>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>11</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLabel">
<property name="name">
<cstring>TextLabel1_2</cstring>
</property>
<property name="text">
<string>P&amp;ort:</string>
</property>
<property name="buddy" stdset="0">
<cstring>portInput</cstring>
</property>
</widget>
<widget class="KIntNumInput">
<property name="name">
<cstring>portInput</cstring>
</property>
<property name="value">
<number>5900</number>
</property>
<property name="minimum">
<number>1024</number>
</property>
<property name="maximum">
<number>32767</number>
</property>
<property name="toolTip" stdset="0">
<string>Enter the TCP port number here</string>
</property>
<property name="whatsThis" stdset="0">
<string>Use this field to set a static port number for the desktop sharing service. Note that if the port is already in use the Desktop Sharing service will not be accessible until you free it. It is recommended to assign the port automatically unless you know what you are doing.
Most VNC clients use a display number instead of the actual port. This display number is the offset to port 5900, so port 5901 has the display number 1.</string>
</property>
</widget>
</hbox>
</widget>
</vbox>
</widget>
<spacer>
<property name="name">
<cstring>Spacer4</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
</spacer>
</vbox>
</widget>
</widget>
</vbox>
</widget>
<images>
<image name="image0">
<data format="XPM.GZ" length="8078">789cdd98c7721cc91186ef7c0a04f3c650d4b637a1d001de5b8200880d1db2da604038c29b0dbdbb32ffeceec582b30448015a85fa2726e69b32592633ab9abf7c98d8db589df8f0cbbbcb2bbe3aac26aa115f4c7ca8af4f4eee7ffde73f7e7bf73e2926e45f144413d1fbbfbd7bbf7935514dac9d9d360a540a50204f91827707f6e09d9ecb045c0c8c726e7be600e579cfde787960eb7f69e01cbc38b08d67a6e7cadaef0d8cc15336b0f5b73270095e1898c1d33dd7d65f3a30ca997b6eac7c75e00a3cdf738bf9f36dc789f5cfdd78c3a8e3bb9ebbfa67c651d0b4e059e3b4ecca0fc06110e636ff29701224b5958fc07990e7982f1f838ba0c863d4bfeb990bf06dcfb65eecc0555065980faff45cdafc6e94c57c5085e0497012266cfd7f06a761da98fd7be3346d6d3e042ec222857d5eee39afc14b3d97369e4d30879cc31e1f82abb04a8dbf2847611426d6df09b8888a18fdd145cf564ee7039bbd4fe0322a131baf0773c4dd78578de3dcfc81bf1a6741577e04aea22a36ffb4f2366a538cdf61be71a002c37f623c688f7889b3986d3c740dce55ca1efb19972a947f04b30a7c05ae5460ac775cabd0ff3eb851c13ee697a8c398ff263d77fe760ad60db5f5c57e26910aed2b70ac42f95ec789ad1f617f123c28dfedd8a7660ff3497215cae14f89ec4e6bf383ff279cb0ad1f617f13af427dc46bd2a850bedf73b71f5bc659d2f9f38331e7564e985faa0e6af35b372eb8b6f961fc69a44239e22b8d55e035e33ca96dbf108f291e30fc2fcd5560c45f5aa49dbfd343cfa5cd7f71602b877fa4a50ae3413e49598572f853ea5528477e936013a11cf34f5b1518fb95052ad4477916aac073e04805463ece6215da07e04485f20d70aa02637db24285f94c0f0cfb0ef3cd4a15fac3fa659c716bf9cfec3377f1e642709575f9c7213eb24605b6f1b42af477a98c70c1781dfc01ee65feb7615c8a03a17c1b8c0d427bc4439ea9c0c87f391eb4afc1850aede17f79a902233fe75e0546fce5950a6ced1b1518f92c6f5560c46fa109d8e263aee7ce5fd1bed08465fb83f82f621518fe05f7b2fd803f633b301f1781310130fcadc083fe91bfc4f94428473e90c34104463e2abc0aeb61e5f5b01e8db10a8cfd281a15ea6f1bcbf6dbfa20df16ad0a8c7c50062a30e2bfd4846cf385bf20fd59fc7d34f67965ed11cf65a2c27c62b0844fe74fc83f703fac8747fc9479ef1fd41aabd03fe683e5b0f9e1bc2ef18011dfa55781719e9655d99d8f0ef9a0ac55b067fd377dff0ee74fd9aac028e780bbfb9047bc72d8f7478db10af5b15fac0794e527c4030febe30f3aeec7931aab501ff1cdc9b0bf38df905ecc7f70bf630d50ac175bfba2efdf4d1b73777f7038afb954c13efc957def8fdec65f0dfe3569ac42ff8877ae5311eab3f130be0b631518e7918f5460ecb78f55609cbf382e2cfe71fff4591cc6b67e386fe0ce367e9c5fd84e1b1fee239e55606b5fa9c0b82ff95a85fe111fbef56d63fb8178ab8234b0f3cee1fe54e985c5ce1b8cb78afaf3c0e17cc3f16dfb83f8a9121518f9bd2afaf561ac078663f1087fa9e5f6d79d7fe71db71d633feb34f4a1ddcf118f75a502aff7dcd59f346eea8e919f6a3cd81fe4c7bad11b0f18f9b389faf5a559631518ebd170d3e577c27e3778c0c8cf4807666fbe63dfd547be40b8d8f981fcd9e251debc7a5bfd3fd970f4b6ea6cb0f3ae7a1379c79d0def6ad7bc896ae73b1b9550fb266a5cf5071b076ef48a3318497fdfda18b9c357dc8943e9ef5b1bc2afe84f439fdfda18efe3eecb78fd594cfc6fd9403f47eed89db85377e6beba737c5ec86f47ee12ba72d7eee65b7b2fb1d18df356dadfc1c6bd7b7093d2df949b76336e56becdb979b720658b6ec92dbb15b7ea7ecec68d5b73eb9d8d0de97bd36db98f6e5b2cad49ff7332ab4f52b2e376dd9eb4fe211bd2fb9e8cebb3accb2c32c0a6db7781f4baef42c8beebe7ba8bc4eeb1cc65512c0d6bf6021bb72e76898c3b95fe16e4db9cacd4becb9e7c6ebb5c4a75fd1624166a996d2163bb79a18d52685dfa08c9c96865e5895c46fce433971a819b222f9f3955549346f7f5f33630df496aa5fd9cf4f3209f0734a2c331fa227bd4d721cc6ec10574841ebe6fe356b4a4eb43c774e20ee994cee82b9dd3c5139dcbaf67526a3aa64bf7402c6b78891ebe6fa3141d637d8ec5c2155d4b5f37744b774f742bbf7e9552d3bd58913594b98cd0c3f76d8c44fbb63e92d7127aa0499aa2699a79a269f975524a5b95ccbb5fbd7df1e6fbefdba04b99f59c3b84029aa5399aa705e973919668b9d392d00cadd02aadd13a6dd026cdcabea38dcc678bb69eb1712ffa28b557685b2c7c1a6c2cd10eed76da119aa13db1f299f6c5caa6d49ba56d8976b1213bbff0cc5a8928704b144acb88624a28a58c722aa864c7e2b4eca814ca75c5e4a5de7325354da15be25a6672fcbc0d6eac8dbc257866f4d5f2018ff810a587f2ed80db3136b44df3fcf9f1a73646fc858f507a24df466f62e3984ffa338e4f84feaa79c8ce4b0efa791b2fd90ff1603e7d990dc955f0abdf6d8cf5ab8c523ee3af7cde8de8c2ad0f169ecfbb44a77cc9577ccd3712012b120963e2836ff98eeff98127bb55bab4de5f98dbe517b132c5d37c2d91bc2a56c6c439cff02ccff124cf77abb4f023365047577ec15df2222ff132af3ccd57bcca6bbcce1bac2f5f8dd45b787cdff8817bc97023e3cda77997b7f823eb4938d4f9c9bbcfef363e3d3d3f788777794f6efcffa18d71d69eeaf5ee893faabfdec6ab69bc0dbc7ff067de7f95b7c3f1ef1f788fa223b9535db9377a8fe280438e38e6c48d38e54cbe871cd87b1d37b84b8ce49e7b80d1ac0ddf1f973eae33f67d90732eb8f4ce935bf3ec3d97c27957774dee43aa44eef1adfc25c3f7c7a58feb8cb5e12bce7ded1b2fe3f40762a516aebaba07729b55ddc93b482b7f77c3f7c7a58feb3cb1e147725b997a0bd1961ffd17ff2fe36d6dfcebefeffe0dd22dc353</data>
</image>
</images>
<connections>
<connection>
<sender>autoPortCB</sender>
<signal>toggled(bool)</signal>
<receiver>portInputFrame</receiver>
<slot>setDisabled(bool)</slot>
</connection>
<connection>
<sender>allowUninvitedCB</sender>
<signal>toggled(bool)</signal>
<receiver>confirmConnectionsCB</receiver>
<slot>setEnabled(bool)</slot>
</connection>
<connection>
<sender>allowUninvitedCB</sender>
<signal>toggled(bool)</signal>
<receiver>allowDesktopControlCB</receiver>
<slot>setEnabled(bool)</slot>
</connection>
<connection>
<sender>allowUninvitedCB</sender>
<signal>toggled(bool)</signal>
<receiver>Frame4</receiver>
<slot>setEnabled(bool)</slot>
</connection>
</connections>
<tabstops>
<tabstop>autoPortCB</tabstop>
<tabstop>TabWidget2</tabstop>
<tabstop>manageInvitations</tabstop>
<tabstop>allowUninvitedCB</tabstop>
<tabstop>confirmConnectionsCB</tabstop>
<tabstop>allowDesktopControlCB</tabstop>
<tabstop>passwordInput</tabstop>
<tabstop>portInput</tabstop>
</tabstops>
<customwidgets>
<customwidget>
<class>KIntNumInput</class>
<header location="global">knuminput.h</header>
<container>0</container>
</customwidget>
</customwidgets>
<includehints>
<includehint>knuminput.h</includehint>
<includehint>knuminput.h</includehint>
</includehints>
</UI>

View File

@@ -1,180 +0,0 @@
/***************************************************************************
kcm_krfb.cpp
--------------
begin : Sat Mar 02 2002
copyright : (C) 2002 by Tim Jansen
email : tim@tjansen.de
***************************************************************************/
/***************************************************************************
* *
* 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 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include "kcm_krfb.h"
#include "kcm_krfb.moc"
#include <qlayout.h>
#include <qcheckbox.h>
#include <qlabel.h>
#include <qradiobutton.h>
#include <qlineedit.h>
#include <qbuttongroup.h>
#include <qdatastream.h>
#include <kdialog.h>
#include <knuminput.h>
#include <klocale.h>
#include <kaboutdata.h>
#include <kconfig.h>
#include <kgenericfactory.h>
#include <kdebug.h>
#include <QDBusInterface>
#include <QDBusReply>
#define VERSION "0.7"
typedef KGenericFactory<KcmKRfb, QWidget> KcmKRfbFactory;
K_EXPORT_COMPONENT_FACTORY(krfb, KcmKRfbFactory("kcm_krfb"))
KcmKRfb::KcmKRfb(QWidget *p, const QStringList &) :
KCModule(KcmKRfbFactory::componentData(), p),
m_configuration(KRFB_CONFIGURATION_MODE)
{
KGlobal::locale()->insertCatalog("krfb");
m_confWidget = new ConfigurationWidget(this);
QVBoxLayout *l = new QVBoxLayout(this);
l->setSpacing(KDialog::spacingHint());
l->setMargin(0);
l->add(m_confWidget);
setButtons(Default | Apply | Default);
KAboutData *about = new KAboutData("kcm_krfb", 0, ki18n("Desktop Sharing Control Module"),
VERSION,
ki18n("Configure desktop sharing"), KAboutData::License_GPL,
ki18n("(c) 2002, Tim Jansen\n"),
KLocalizedString(), "http://www.tjansen.de/krfb", "tim@tjansen.de");
about->addAuthor(ki18n("Tim Jansen"), KLocalizedString(), "tim@tjansen.de");
setAboutData(about);
load();
connect(m_confWidget->passwordInput, SIGNAL(textChanged(QString)), SLOT(configChanged()));
connect(m_confWidget->allowUninvitedCB, SIGNAL(clicked()), SLOT(configChanged()));
connect(m_confWidget->enableSLPCB, SIGNAL(clicked()), SLOT(configChanged()));
connect(m_confWidget->confirmConnectionsCB, SIGNAL(clicked()), SLOT(configChanged()));
connect(m_confWidget->allowDesktopControlCB, SIGNAL(clicked()), SLOT(configChanged()));
connect(m_confWidget->autoPortCB, SIGNAL(clicked()), SLOT(configChanged()));
connect(m_confWidget->portInput, SIGNAL(valueChanged(int)), SLOT(configChanged()));
connect((QObject *)m_confWidget->manageInvitations, SIGNAL(clicked()),
&m_configuration, SLOT(showManageInvitationsDialog()));
connect(&m_configuration, SIGNAL(invitationNumChanged(int)),
this, SLOT(setInvitationNum(int)));
setInvitationNum(m_configuration.invitations().size());
connect(m_confWidget->disableBackgroundCB, SIGNAL(clicked()), SLOT(configChanged()));
}
void KcmKRfb::configChanged()
{
emit changed(true);
}
void KcmKRfb::setInvitationNum(int num)
{
if (num == 0) {
m_confWidget->invitationNumLabel->setText(i18n("You have no open invitation."));
} else {
m_confWidget->invitationNumLabel->setText(i18n("Open invitations: %1", num));
}
}
void KcmKRfb::checkKInetd(bool &kinetdAvailable, bool &krfbAvailable)
{
kinetdAvailable = false;
krfbAvailable = false;
//TODO verify it when kinetd will port
QDBusInterface kinetd("org.kde.kded", "/modules/kinetd", "org.kde.kinetd");
QDBusReply<bool> reply = kinetd.call("isInstalled", "krfb");
if (!reply.isValid()) {
return;
}
krfbAvailable = reply;
kinetdAvailable = true;
}
void KcmKRfb::load()
{
bool kinetdAvailable, krfbAvailable;
checkKInetd(kinetdAvailable, krfbAvailable);
m_confWidget->allowUninvitedCB->setChecked(m_configuration.allowUninvitedConnections());
m_confWidget->enableSLPCB->setChecked(m_configuration.enableSLP());
m_confWidget->confirmConnectionsCB->setChecked(m_configuration.askOnConnect());
m_confWidget->allowDesktopControlCB->setChecked(m_configuration.allowDesktopControl());
m_confWidget->passwordInput->setText(m_configuration.password());
m_confWidget->autoPortCB->setChecked(m_configuration.preferredPort() < 0);
m_confWidget->portInput->setValue(m_configuration.preferredPort() > 0 ?
m_configuration.preferredPort() : 5900);
m_confWidget->disableBackgroundCB->setChecked(m_configuration.disableBackground());
emit changed(false);
}
void KcmKRfb::save()
{
m_configuration.update();
bool allowUninvited = m_confWidget->allowUninvitedCB->isChecked();
m_configuration.setAllowUninvited(allowUninvited);
m_configuration.setEnableSLP(m_confWidget->enableSLPCB->isChecked());
m_configuration.setAskOnConnect(m_confWidget->confirmConnectionsCB->isChecked());
m_configuration.setAllowDesktopControl(m_confWidget->allowDesktopControlCB->isChecked());
m_configuration.setPassword(m_confWidget->passwordInput->text());
if (m_confWidget->autoPortCB->isChecked()) {
m_configuration.setPreferredPort(-1);
} else {
m_configuration.setPreferredPort(m_confWidget->portInput->value());
}
m_configuration.setDisableBackground(m_confWidget->disableBackgroundCB->isChecked());
m_configuration.save();
#if 0
kapp->dcopClient()->emitDCOPSignal("KRFB::ConfigChanged", "KRFB_ConfigChanged()", QByteArray());
#endif
emit changed(false);
}
void KcmKRfb::defaults()
{
bool kinetdAvailable, krfbAvailable;
checkKInetd(kinetdAvailable, krfbAvailable);
m_confWidget->allowUninvitedCB->setChecked(false);
m_confWidget->enableSLPCB->setChecked(true);
m_confWidget->confirmConnectionsCB->setChecked(false);
m_confWidget->allowDesktopControlCB->setChecked(false);
m_confWidget->passwordInput->setText("");
m_confWidget->autoPortCB->setChecked(true);
m_confWidget->portInput->setValue(5900);
m_confWidget->disableBackgroundCB->setChecked(false);
emit changed(true);
}
QString KcmKRfb::quickHelp() const
{
return i18n("<h1>Desktop Sharing</h1> This module allows you to configure"
" the KDE desktop sharing.");
}

View File

@@ -1,50 +0,0 @@
/***************************************************************************
kcm_krfb.h
------------
begin : Sat Mar 02 2002
copyright : (C) 2002 by Tim Jansen
email : tim@tjansen.de
***************************************************************************/
/***************************************************************************
* *
* 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 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef _KCM_KRFB_H_
#define _KCM_KRFB_H_
#include <qobject.h>
#include <qdatetime.h>
#define KDE3_SUPPORT
#include <kcmodule.h>
#undef KDE3_SUPPORT
#include "configurationwidget.h"
#include "../krfb/configuration.h"
class KcmKRfb : public KCModule
{
Q_OBJECT
private:
Configuration m_configuration;
ConfigurationWidget *m_confWidget;
void checkKInetd(bool &, bool &);
public:
KcmKRfb(QWidget *p, const QStringList &);
void load();
void save();
void defaults();
QString quickHelp() const;
private slots:
void setInvitationNum(int num);
void configChanged();
};
#endif

View File

@@ -1,205 +0,0 @@
[Desktop Entry]
Icon=krfb
Exec=kcmshell4 kcmkrfb
Type=Service
X-DocPath=krfb/krfb-configuration.html
X-KDE-ServiceTypes=KCModule
X-KDE-Library=kcm_krfb
X-KDE-Factoryname=krfb
X-KDE-ParentApp=kcontrol
Name=Desktop Sharing
Name[af]=Werkskerm Deeling
Name[ar]=مشاركة سطح المكتب
Name[ast]=Escritoriu compartiu
Name[bg]=Споделяне на работния плот
Name[bn]=ডেস্কটপ ভাগাভাগি
Name[br]=Rannañ ar vurev
Name[bs]=Dijeljenje radne površine
Name[ca]=Compartició de l'escriptori
Name[ca@valencia]=Compartició de l'escriptori
Name[cs]=Sdílení pracovní plochy
Name[cy]=Rhannu Penbwrdd
Name[da]=Desktopdeling
Name[de]=Arbeitsflächen-Freigabe
Name[el]=Κοινή χρήση επιφάνειας εργασίας
Name[en_GB]=Desktop Sharing
Name[eo]=Tabula komunigado
Name[es]=Escritorio compartido
Name[et]=Töölaua jagamine
Name[eu]=Mahaigaina partekatzea
Name[fa]=اشتراک رومیزی
Name[fi]=Työpöydän jakaminen
Name[fr]=Partage de bureau
Name[ga]=Roinnt Deisce
Name[gl]=Compartimento do escritorio
Name[he]=שיתוף שולחנות עבודה
Name[hi]=डेस्कटॉप साझेदारी
Name[hne]=डेस्कटाप साझेदारी
Name[hr]=Dijeljenje radne površine
Name[hu]=Munkaasztal-megosztás
Name[ia]=Compartir de scriptorio
Name[is]=Skjáborðamiðlun
Name[it]=Condivisione del desktop
Name[ja]=デスクトップ共有
Name[kk]=Үстелді ортақтастыру
Name[km]=ការ​ចែក​រំលែក​ផ្ទៃ​តុ
Name[ko]=데스크톱 공유
Name[lt]=Dalinimasis darbastaliu
Name[lv]=Darbvirsmas koplietošana
Name[mk]=Делење на работната површина
Name[ml]=പണിയിടം പങ്കുവെക്കല്‍
Name[ms]=Perkongsian Ruang Kerja
Name[nb]=Delte skrivebord
Name[nds]=Schriefdisch-Freegaav
Name[ne]=डेस्कटप साझेदारी
Name[nl]=Bureaublad delen
Name[nn]=Skrivebordsdeling
Name[pa]=ਡੈਸਕਟਾਪ ਸ਼ੇਅਰਿੰਗ
Name[pl]=Współdzielenie pulpitu
Name[pt]=Partilha do Ecrã
Name[pt_BR]=Compartilhamento do área de trabalho
Name[ro]=Partajare birou
Name[ru]=Общий рабочий стол
Name[se]=Čállinbeavdejuohkkin
Name[si]=වැඩතල හවුල්
Name[sk]=Zdieľanie pracovnej plochy
Name[sl]=Deljenje namizja
Name[sr]=Дељење површи
Name[sr@ijekavian]=Дијељење површи
Name[sr@ijekavianlatin]=Dijeljenje površi
Name[sr@latin]=Deljenje površi
Name[sv]=Dela ut skrivbordet
Name[ta]=பணிமேடை பகிர்வு
Name[tg]=Истифодабарии муштараки Мизи корӣ
Name[th]=ใช้งานพื้นที่ทำงานร่วมกัน
Name[tr]=Masaüstü Paylaşımı
Name[ug]=ئۈستەلئۈستىنى ھەمبەھىرلەش
Name[uk]=Спільні стільниці
Name[vi]=Chia sẻ màn hình nền
Name[xh]=Ukwehlulelana kwe Desktop
Name[x-test]=xxDesktop Sharingxx
Name[zh_CN]=桌面共享
Name[zh_HK]=桌面分享
Name[zh_TW]=桌面分享
Comment=Configure Desktop Sharing
Comment[af]=Konfigureer Werkskerm Deeling
Comment[ar]=تعديل مشاركة سطح المكتب
Comment[ast]=Configura'l to escritoriu compartíu
Comment[bg]=Настройки на споделянето на работния плот
Comment[bn]=ডেস্কটপ ভাগাভাগি কনফিগার করুন
Comment[br]=Kefluniañ rannañ ar vurev
Comment[bs]=Podešavanje dijeljenja površine
Comment[ca]=Lupa de l'escriptori
Comment[ca@valencia]=Lupa de l'escriptori
Comment[cs]=Nastavit sdílení pracovní plochy
Comment[cy]=Ffurfweddu Rhannu Penbwrdd
Comment[da]=Indstil desktopdeling
Comment[de]=Freigabe der Arbeitsfläche einrichten
Comment[el]=Ρύθμιση της κοινής χρήσης της επιφάνειας εργασίας
Comment[en_GB]=Configure Desktop Sharing
Comment[eo]=Agordi la tabulan komunigadon
Comment[es]=Configure su escritorio compartido
Comment[et]=Töölaua jagamise seadistamine
Comment[eu]=Konfiguratu mahaigaina partekatzea
Comment[fa]=پیکربندی اشتراک رومیزی
Comment[fi]=Aseta työpöydän jakaminen
Comment[fr]=Configuration du partage du bureau
Comment[ga]=Cumraigh Roinnt Deisce
Comment[gl]=Configurar o compartimento do escritorio
Comment[he]=שינוי הגדרות שיתוף שולחנות העבודה
Comment[hi]=डेस्कटॉप साझेदारी कॉन्फ़िगर करें
Comment[hne]=डेस्कटाप साझेदारी कान्फिगर करव
Comment[hr]=Podešavanje dijeljenja radne površine
Comment[hu]=A munkaasztal-megosztás beállításai
Comment[ia]=Configura le compartir de scriptorio
Comment[is]=Stilla skjáborðsmiðlun
Comment[it]=Configura condivisione del desktop
Comment[ja]=デスクトップ共有の設定
Comment[kk]=Үстелді ортақтастыруды баптау
Comment[km]=កំណត់​រចនា​សម្ព័ន្ធ​ការ​ចែក​រំលែក​ផ្ទៃ​តុ
Comment[ko]=데스크톱 공유 설정
Comment[lt]=Konfigūruoti dalinimąsi darbastaliu
Comment[lv]=Konfigurē darbvirsmas koplietošanu
Comment[mk]=Конфигурирајте делење на површината
Comment[ml]=പണിയിടം പങ്കുവെക്കല്‍ ക്രമീകരിക്കാം
Comment[ms]= Selaraskan Perkongsian Desktop
Comment[nb]=Tilpass delte skrivebord
Comment[nds]=Schriefdisch-Freegaav instellen
Comment[ne]=डेस्कटप साझेदारी कन्फिगर गर्नुहोस्
Comment[nl]=Bureaublad delen instellen
Comment[nn]=Set opp skrivebordsdeling
Comment[pa]=ਡੈਸਕਟਾਪ ਸ਼ੇਅਰਿੰਗ ਸੰਰਚਨਾ
Comment[pl]=Konfiguracja współdzielenia pulpitu
Comment[pt]=Configurar a Partilha do Ecrã
Comment[pt_BR]=Configura o compartilhamento da área de trabalho
Comment[ro]=Configurează partajarea biroului
Comment[ru]=Параметры общего рабочего стола
Comment[se]=Heivet čállinbeavdejuohkkima
Comment[si]=වැඩතල හවුල් සකසන්න
Comment[sk]=Nastavenie zdieľania pracovnej plochy
Comment[sl]=Nastavi deljenje namizja
Comment[sr]=Подешавање дељења површи
Comment[sr@ijekavian]=Подешавање дијељења површи
Comment[sr@ijekavianlatin]=Podešavanje dijeljenja površi
Comment[sr@latin]=Podešavanje deljenja površi
Comment[sv]=Anpassa utdelning av skrivbord
Comment[ta]=பணிமேடை பகிர்வை உள்ளமை
Comment[tg]=Батанзимдарории Истифодабарии муштараки Мизи корӣ
Comment[th]=ปรับแต่งการแบ่งการใช้งานพื้นที่ทำงานร่วมกัน
Comment[tr]=Masaüstü Paylaşımını Yapılandır
Comment[uk]=Налаштувати спільні стільниці
Comment[vi]=Cấu hình chia sẻ màn hình nền
Comment[xh]=Qwalasela Ukusebenzisa ngokuhlangeneyo kwe Desktop
Comment[x-test]=xxConfigure Desktop Sharingxx
Comment[zh_CN]=配置桌面共享
Comment[zh_HK]=設定桌面分享
Comment[zh_TW]=設定桌面分享
X-KDE-Keywords=desktop sharing,krfb,vnc,sharing,krdc,remote desktop connection,invitation,port,slp,uninvited
X-KDE-Keywords[bg]=Keywords=споделяне, работно, място, десктоп, покана, връзка, desktop sharing, krfb, vnc, sharing, krdc, remote desktop connection, invitation, port, slp, uninvited
X-KDE-Keywords[ca]=compartició de l'escriptori,krfb,vnc,compartir,krdc,connexió a l'escriptori remot,invitació,port,slp,no invitat
X-KDE-Keywords[cs]=sdílení plochy,krfb,vnc,sdílení,rdp,krdc,připojení vzdálené plochy,pozvánka,port,slp
X-KDE-Keywords[cy]=rhannu penbwrdd,krfb,vnc,rhannu,rdp,krdc,cysylltiad penbwrdd pell,gwahoddiad,porth,slp,heb wahoddiad
X-KDE-Keywords[da]=desktopdeling,krfb,vnc,deling,krdc,ekstern desktopforbindelse,invitation,port,slp,ikke inviteret
X-KDE-Keywords[de]=Arbeitsfläche freigeben,krfb,VNC,freigeben,krdc,Entfernte Arbeitsfläche,Einladung,Port,slp,uneingeladen,rdp,remote desktop
X-KDE-Keywords[el]=κοινή χρήση επιφάνειας εργασίας,krfb,vnc,κοινή χρήση,krdc,σύνδεση σε απομακρυσμένη επιφάνεια εργασίας,πρόσκληση,θύρα,slp,απρόσκλητο
X-KDE-Keywords[es]=escritorio compartido,krfb,vnc,compartir,rdp,krdc, conexión escritorio remoto,invitación,puerto,slp,no invitado
X-KDE-Keywords[et]=töölaua jagamine,krfb,vnc,jagamine,rdp,krdc,kaugtöölaua ühendus,rdp,kutse,port,slp,kutsumata
X-KDE-Keywords[eu]=mahaigain partekatzea,krfb,vnc,partekatzea,krdc,urruneko mahaigain konexioa,gonbidapena,ataka,slp,gonbidapen gabea
X-KDE-Keywords[fa]=اشتراک رومیزی، krfb، vnc، اتصال رومیزی راه دور، دعوت، درگاه، slp، دعوت‌نشده
X-KDE-Keywords[fi]=työpöydän jakaminen,krfb,vnc,jakaminen,krdc,etätyöpöytäyhteys, kutsu,portti,slp,kutsumaton, työpöytä
X-KDE-Keywords[fr]=partage de bureau,krfb,vnc,partage,rdp,krdc,connexion à un bureau distant,invitation,port,slp,non invité
X-KDE-Keywords[gl]=compartilla de escritorio, vnc, compartir, krdc, conexón ao escritorio remoto, invitación, porto, slt, convidado, compartillar
X-KDE-Keywords[he]=שיתוף שולחן עבודה,שיתוף,חיבור לשולחן עבודה מרוחק,desktop sharing,krfb,vnc,sharing,krdc,remote desktop connection, invitation, port, slp, uninvited
X-KDE-Keywords[hu]=munkaasztal-megosztás,krfb,vnc,megosztás,krdc,csatlakozás távoli munkaasztalhoz,meghívás,port,slp,meghívás nélkül
X-KDE-Keywords[is]=skjáborðsmiðlun,miðlun,krfb,vnc,rdp,krdc,fjarvinnsla,remote desktop connection,rdp
X-KDE-Keywords[it]=condivisione desktop,krfb,vnc,condivisione,krdc,connessione desktop remoto,invito,porta,slp,non invitato
X-KDE-Keywords[ja]=デスクトップ共有,krfb,vnc,共有,rdp,krdc,リモートデスクトップ接続,招待,ポート,slp,uninvited
X-KDE-Keywords[km]=ការ​ចែក​រំ​លែក​ផ្ទៃ​តុ,krfb,vnc,ការ​ចែក​រំលែក,krdc,ការ​ត​ភ្ជាប់​ផ្ទៃ​តុ​ពី​ចម្ងាយ,អញ្ជើញ,ច្រក,slp,មិន​បាន​អញ្ជើញ
X-KDE-Keywords[lt]=desktop sharing,krfb,vnc,sharing,krdc,remote desktop connection,invitation,port,slp,uninvited,dalinimasis darbastaliu,nutolusio darbastalio prijungimas,kvietimas,ryšys,nekviestas,jungtis,prievadas,dalintis,pasidalinti,jungimasis,prisijungti,kviesti
X-KDE-Keywords[mk]=desktop sharing,krfb,vnc,sharing,krdc,remote desktop connection,invitation,port,slp,uninvited,делење на површината,krfb,vnc,делење,krdc,поврзување со оддалечена површина,покана,порта,slp,непоканет
X-KDE-Keywords[ms]= perkongsian ruang kerja, sambungan, liang, desktop sharing,krfb,vnc,sharing,krdc,remote desktop connection,invitation,port,slp,uninvited
X-KDE-Keywords[nb]=skrivebordsdeling,krfb,vnc,deling,krdc,tilkobling til fjernt skrivebord,invitasjon,port,slp,ikke invitert
X-KDE-Keywords[nds]=schriefdisch,freegeven,freegaav,krfb,vnc,delen,krdc,feern Schriefdisch,verbinnen,inladen,port,slp,nich inlaadt
X-KDE-Keywords[ne]=डेस्कटप साझेदारी,krfb,vnc,साझेदारी,krdc, टाढाको डेस्कटप जडान,निमन्त्रणा,पोर्ट,slp,निमन्त्रणा नगरिएको
X-KDE-Keywords[nl]=desktop sharing,krfb,vnc,sharing,rdp,krdc,remote desktop connection,uitnodiging,slp,rdp,verbinding, bureaublad delen,bureaublad op afstand
X-KDE-Keywords[nn]=skrivebordsdeling,krfb,vnc,deling,krdc,nettverksskrivebord,invitasjon,port,slp,ikkje invitert
X-KDE-Keywords[pl]=współdzielenie pulpitu,krfb,vnc,współdzielenie,rdp,krdc,zdalne połączenie, zdalne biurko, zdalny pulpit, zaproszenie,port,slp
X-KDE-Keywords[pt]=partilha do ecrã,krfb,vnc,partilha,krdc,ligação a um ecrã remoto,convite,porto,slp,sem convite
X-KDE-Keywords[pt_BR]=compartilhamento de desktop,krfb,vnc,compartilhamento,krdc,conexão a desktop remoto,convite,porta,slp,não convidado
X-KDE-Keywords[sl]=namizje,souporaba,krfb,vnc,krdc,povezava oddaljenega namizja, povabilo,port,slp,nepovabljen
X-KDE-Keywords[sr]=desktop sharing,krfb,vnc,sharing,krdc,remote desktop connection,invitation,port,slp,uninvited,радна површина,дељење,позив,порт,непозван,удаљено
X-KDE-Keywords[sr@latin]=desktop sharing,krfb,vnc,sharing,krdc,remote desktop connection,invitation,port,slp,uninvited,radna površina,deljenje,poziv,port,nepozvan,udaljeno
X-KDE-Keywords[sv]=dela skrivbord,krfb,vnc,dela,krdc,fjärrskrivbordsanslutning,inbjudan,port,slp
X-KDE-Keywords[ta]=பணிமேடை பகிர்வு,krfb,vnc,பகிர்வு,krdc,தொலை பணிமேடை இணைப்பு,அழைப்பிதழ், துறை, slp, uninvited
X-KDE-Keywords[tr]=masaüstü paylaşımı,krfb,vnc,paylaşım,krdc,uzak masaüstü bağlantısı,davet,port,slp
X-KDE-Keywords[uk]=спільні стільниці,krfb,vnc,спільний,rdp,krdc,з'єднання віддаленої стільниці,запрошення,rdp,slp,без запрошення
X-KDE-Keywords[vi]=chia sẻ màn hình,krfb,vnc,chia sẻ,krdc,màn hình ở xa kết nối,mời kết nối,cổng,slp,không được mời
X-KDE-Keywords[x-test]=xxdesktop sharing,krfb,vnc,sharing,krdc,remote desktop connection,invitation,port,slp,uninvitedxx
X-KDE-Keywords[zh_CN]=desktop sharing,krfb,vnc,sharing,krdc,remote desktop connection,invitation,port,slp,uninvited,桌面共享,共享,远程桌面连接,邀请,端口,未邀请
X-KDE-Keywords[zh_TW]=desktop sharing,krfb,vnc,sharing,rdp,krdc,remote desktop connection,rdp,桌面分享,分享,遠端桌面連線,invitation,port,slp,uninvited
Categories=Qt;KDE;X-KDE-settings-network;Settings;

View File

@@ -1,20 +0,0 @@
########### next target ###############
set(kded_kinetd_PART_SRCS kinetd.cpp)
message(STATUS "Port to krfb DBUS")
# kde4_add_dcop_skels(kded_kinetd_PART_SRCS kinetd.h )
kde4_add_plugin(kded_kinetd ${kded_kinetd_PART_SRCS})
target_link_libraries(kded_kinetd ${KDE4_KIO_LIBS} ${KDE4_KDNSSD_LIBS})
install(TARGETS kded_kinetd DESTINATION ${PLUGIN_INSTALL_DIR})
########### install files ###############
install(FILES kinetd.notifyrc DESTINATION ${DATA_INSTALL_DIR}/krfb)
install(FILES kinetdmodule.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR})
install(FILES kinetd.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kded)

View File

@@ -1,2 +0,0 @@
#! /bin/sh
$XGETTEXT *.cpp -o $podir/kinetd.pot

View File

@@ -1,13 +0,0 @@
Recommended practice to debug a kinetd program
==============================================
Instead of executing your program directly, start a wrapper script that
looks like this:
#!/bin/sh
exec xterm -e gdb --args /opt/kde/bin/krfb $1 $2
Note that you cannot use konsole because it closes the file descriptor. You need
a very recent gdb version for the "--args" option (>= 5.2, only available as
CVS snapshot at this time).

View File

@@ -1,781 +0,0 @@
/***************************************************************************
kinetd.cpp
--------------
begin : Mon Feb 11 2002
copyright : (C) 2002 by Tim Jansen
email : tim@tjansen.de
***************************************************************************/
/***************************************************************************
* *
* 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 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include "kinetd.h"
#include "kinetd.moc"
#include "kinetinterface.h"
#include "kuser.h"
#include "uuid.h"
#include <qregexp.h>
#include <kservicetype.h>
#include <kdebug.h>
#include <kstandarddirs.h>
#include <kconfig.h>
#include <KNotification>
#include <ksocketaddress.h>
#include <ksocketdevice.h>
#include <klocale.h>
#include <kglobal.h>
#include <unistd.h>
#include <fcntl.h>
#include <kpluginfactory.h>
#include <kpluginloader.h>
K_PLUGIN_FACTORY(KInetDFactory,
registerPlugin<KInetD>();
)
K_EXPORT_PLUGIN(KInetDFactory("kinetd"))
PortListener::PortListener(KService::Ptr s,
KConfig *config,
KServiceRegistry *srvreg) :
m_port(-1),
m_serviceRegistered(false),
m_socket(0),
m_config(config),
m_srvreg(srvreg),
m_dnssdreg(0)
{
m_uuid = createUUID();
loadConfig(s);
if (m_valid && m_enabled) {
acquirePort();
}
}
bool PortListener::acquirePort()
{
if (m_socket) {
if ((m_port >= m_portBase) &&
(m_port < (m_portBase + m_autoPortRange))) {
return true;
} else {
delete m_socket;
}
}
m_port = m_portBase;
m_socket = new KNetwork::KServerSocket(m_port, false);
while (!m_socket->bindAndListen()) {
m_port++;
if (m_port >= (m_portBase + m_autoPortRange)) {
kDebug() << "Kinetd cannot load service " << m_serviceName
<< ": unable to get port" << endl;
m_port = -1;
delete m_socket;
m_socket = 0;
return false;
}
delete m_socket;
m_socket = new KNetwork::KServerSocket(m_port, false);
}
connect(m_socket, SIGNAL(accepted(KSocket*)),
SLOT(accepted(KSocket*)));
bool s = m_registerService;
bool sd = m_dnssdRegister;
setServiceRegistrationEnabledInternal(false);
dnssdRegister(false);
setServiceRegistrationEnabledInternal(s);
dnssdRegister(sd);
return true;
}
void PortListener::freePort()
{
m_port = -1;
delete m_socket;
m_socket = 0;
setServiceRegistrationEnabledInternal(m_registerService);
dnssdRegister(false);
}
void PortListener::loadConfig(KService::Ptr s)
{
m_valid = true;
m_autoPortRange = 0;
m_enabled = true;
m_argument.clear();
m_multiInstance = false;
QVariant vid, vport, vautoport, venabled, vargument, vmultiInstance, vurl,
vsattributes, vslifetime, vdname, vdtype, vddata;
m_execPath = s->exec().utf8();
vid = s->property("X-KDE-KINETD-id");
vport = s->property("X-KDE-KINETD-port");
vautoport = s->property("X-KDE-KINETD-autoPortRange");
venabled = s->property("X-KDE-KINETD-enabled");
vargument = s->property("X-KDE-KINETD-argument");
vmultiInstance = s->property("X-KDE-KINETD-multiInstance");
vurl = s->property("X-KDE-KINETD-serviceURL");
vsattributes = s->property("X-KDE-KINETD-serviceAttributes");
vslifetime = s->property("X-KDE-KINETD-serviceLifetime");
vdname = s->property("X-KDE-KINETD-DNSSD-Name");
vdtype = s->property("X-KDE-KINETD-DNSSD-Type");
vddata = s->property("X-KDE-KINETD-DNSSD-Properties");
if (!vid.isValid()) {
kDebug() << "Kinetd cannot load service " << m_serviceName
<< ": no id set" << endl;
m_valid = false;
return;
}
if (!vport.isValid()) {
kDebug() << "Kinetd cannot load service " << m_serviceName
<< ": invalid port" << endl;
m_valid = false;
return;
}
m_serviceName = vid.toString();
m_serviceLifetime = vslifetime.toInt();
if (m_serviceLifetime < 120) { // never less than 120 s
m_serviceLifetime = 120;
}
m_portBase = vport.toInt();
if (vautoport.isValid()) {
m_autoPortRange = vautoport.toInt();
}
if (venabled.isValid()) {
m_enabled = venabled.toBool();
}
if (vargument.isValid()) {
m_argument = vargument.toString();
}
if (vmultiInstance.isValid()) {
m_multiInstance = vmultiInstance.toBool();
}
if (vurl.isValid()) {
m_serviceURL = vurl.toString();
m_registerService = true;
} else {
m_serviceURL.clear();
m_registerService = false;
}
if (vsattributes.isValid()) {
m_serviceAttributes = vsattributes.toString();
} else {
m_serviceAttributes = "";
}
if (vddata.isValid()) {
QStringList attrs = vddata.toStringList();
for (QStringList::iterator it = attrs.begin();
it != attrs.end(); it++) {
QString key = (*it).section('=', 0, 0);
QString value = processServiceTemplate((*it).section('=', 1))[0];
if (!key.isEmpty()) {
m_dnssdData[key] = value;
}
}
}
if (vdname.isValid() && vdtype.isValid()) {
m_dnssdName = processServiceTemplate(vdname.toString())[0];
m_dnssdType = vdtype.toString();
m_dnssdRegister = true;
kDebug() << "DNS-SD register is enabled\n";
} else {
m_dnssdRegister = false;
}
m_slpLifetimeEnd = QDateTime::currentDateTime().addSecs(m_serviceLifetime);
m_defaultPortBase = m_portBase;
m_defaultAutoPortRange = m_autoPortRange;
m_config->setGroup("ListenerConfig");
m_enabled = m_config->readEntry("enabled_" + m_serviceName,
m_enabled);
m_portBase = m_config->readEntry("port_base_" + m_serviceName,
m_portBase);
m_autoPortRange = m_config->readEntry("auto_port_range_" + m_serviceName,
m_autoPortRange);
QDateTime nullTime;
m_expirationTime = m_config->readDateTimeEntry("enabled_expiration_" + m_serviceName,
&nullTime);
if ((!m_expirationTime.isNull()) && (m_expirationTime < QDateTime::currentDateTime())) {
m_enabled = false;
}
m_registerService = m_config->readEntry("enabled_srvreg_" + m_serviceName,
m_registerService);
}
void PortListener::accepted(KSocket *sock)
{
QString host, port;
KSocketDevice device(sock->socket());
KSocketAddress ksa = device->peerAddress();
if (ksa.address()) {
delete sock;
return;
}
KExtendedSocket::resolve(ksa, host, port);
KNotification::event("IncomingConnection",
i18n("Connection from %1", host));
delete ksa;
if ((!m_enabled) ||
((!m_multiInstance) && m_process.isRunning())) {
delete sock;
return;
}
// disable CLOEXEC flag, fixes #77412
fcntl(sock->socket(), F_SETFD, fcntl(sock->socket(), F_GETFD) & ~FD_CLOEXEC);
m_process.clearArguments();
m_process << m_execPath << m_argument << QString::number(sock->socket());
if (!m_process.start(K3Process::DontCare)) {
KNotification::event("ProcessFailed",
i18n("Call \"%1 %2 %3\" failed", m_execPath,
m_argument,
sock->socket()));
}
delete sock;
}
bool PortListener::isValid()
{
return m_valid;
}
bool PortListener::isEnabled()
{
return m_enabled && m_valid;
}
int PortListener::port()
{
return m_port;
}
QStringList PortListener::processServiceTemplate(const QString &a)
{
QStringList l;
QValueVector<KInetInterface> v = KInetInterface::getAllInterfaces(false);
QValueVector<KInetInterface>::Iterator it = v.begin();
while (it != v.end()) {
KInetSocketAddress *address = (*(it++)).address();
if (!address) {
continue;
}
QString hostName = address->nodeName();
KUser u;
QString x = a; // replace does not work in const QString. Why??
l.append(x.replace(QString("%h"), KServiceRegistry::encodeAttributeValue(hostName))
.replace(QString("%p"), QString::number(m_port))
.replace(QString("%u"), KServiceRegistry::encodeAttributeValue(u.loginName()))
.replace(QString("%i"), KServiceRegistry::encodeAttributeValue(m_uuid))
.replace(QString("%f"), KServiceRegistry::encodeAttributeValue(u.fullName())));
}
return l;
}
bool PortListener::setPort(int port, int autoPortRange)
{
if ((port == m_portBase) && (autoPortRange == m_autoPortRange)) {
return (m_port != -1);
}
m_config->setGroup("ListenerConfig");
if (port > 0) {
m_portBase = port;
m_autoPortRange = autoPortRange;
m_config->writeEntry("port_base_" + m_serviceName, m_portBase);
m_config->writeEntry("auto_port_range_" + m_serviceName, m_autoPortRange);
} else {
m_portBase = m_defaultPortBase;
m_autoPortRange = m_defaultAutoPortRange;
m_config->deleteEntry("port_base_" + m_serviceName);
m_config->deleteEntry("auto_port_range_" + m_serviceName);
}
m_config->sync();
if (m_enabled) {
return acquirePort();
} else {
return false;
}
}
void PortListener::setEnabled(bool e)
{
setEnabledInternal(e, QDateTime());
}
void PortListener::setEnabledInternal(bool e, const QDateTime &ex)
{
m_config->setGroup("ListenerConfig");
m_config->writeEntry("enabled_" + m_serviceName, e);
m_config->writeEntry("enabled_expiration_" + m_serviceName, ex);
m_config->sync();
m_expirationTime = ex;
if (e) {
if (m_port < 0) {
acquirePort();
}
m_enabled = m_port >= 0;
} else {
freePort();
m_enabled = false;
}
}
void PortListener::setEnabled(const QDateTime &ex)
{
setEnabledInternal(true, ex);
}
bool PortListener::isServiceRegistrationEnabled()
{
return m_registerService;
}
void PortListener::setServiceRegistrationEnabled(bool e)
{
setServiceRegistrationEnabledInternal(e);
dnssdRegister(e && m_enabled);
m_config->setGroup("ListenerConfig");
m_config->writeEntry("enable_srvreg_" + m_serviceName, e);
m_config->sync();
}
void PortListener::setServiceRegistrationEnabledInternal(bool e)
{
m_registerService = e;
if ((!m_srvreg) || m_serviceURL.isNull()) {
return;
}
if (m_serviceRegistered == (m_enabled && e)) {
return;
}
if (m_enabled && e) {
m_registeredServiceURLs = processServiceTemplate(m_serviceURL);
QStringList attributes = processServiceTemplate(m_serviceAttributes);
QStringList::Iterator it = m_registeredServiceURLs.begin();
QStringList::Iterator it2 = attributes.begin();
while ((it != m_registeredServiceURLs.end()) &&
(it2 != attributes.end())) {
if (!m_srvreg->registerService(
*(it++),
*(it2++),
m_serviceLifetime)) {
kDebug(7021) << "Failure registering SLP service (no slpd running?)";
}
}
m_serviceRegistered = true;
// make lifetime 30s shorter, because the timeout is not precise
m_slpLifetimeEnd = QDateTime::currentDateTime().addSecs(m_serviceLifetime - 30);
} else {
QStringList::Iterator it = m_registeredServiceURLs.begin();
while (it != m_registeredServiceURLs.end()) {
m_srvreg->unregisterService(*(it++));
}
m_serviceRegistered = false;
}
}
void PortListener::dnssdRegister(bool e)
{
if (m_dnssdName.isNull() || m_dnssdType.isNull()) {
return;
}
if (m_dnssdRegistered == e) {
return;
}
if (e) {
m_dnssdRegistered = true;
m_dnssdreg = new DNSSD::PublicService(m_dnssdName, m_dnssdType, m_port);
m_dnssdreg->setTextData(m_dnssdData);
m_dnssdreg->publishAsync();
} else {
m_dnssdRegistered = false;
delete m_dnssdreg;
m_dnssdreg = 0;
}
}
void PortListener::refreshRegistration()
{
if (m_serviceRegistered && (m_slpLifetimeEnd.addSecs(-90) < QDateTime::currentDateTime())) {
setServiceRegistrationEnabledInternal(false);
setServiceRegistrationEnabledInternal(true);
}
}
QDateTime PortListener::expiration()
{
return m_expirationTime;
}
QDateTime PortListener::serviceLifetimeEnd()
{
if (m_serviceRegistered) {
return m_slpLifetimeEnd;
} else {
return QDateTime();
}
}
QString PortListener::name()
{
return m_serviceName;
}
PortListener::~PortListener()
{
setServiceRegistrationEnabledInternal(false);
delete m_socket;
}
KInetD::KInetD(QObject *parent, const QList<QVariant>&) :
KDEDModule(parent)
{
m_config = new KConfig("kinetdrc");
m_srvreg = new KServiceRegistry();
if (!m_srvreg->available()) {
kDebug(7021) << "SLP not available";
delete m_srvreg;
m_srvreg = 0;
}
m_portListeners.setAutoDelete(true);
connect(&m_expirationTimer, SIGNAL(timeout()), SLOT(setExpirationTimer()));
connect(&m_portRetryTimer, SIGNAL(timeout()), SLOT(portRetryTimer()));
connect(&m_reregistrationTimer, SIGNAL(timeout()), SLOT(reregistrationTimer()));
loadServiceList();
}
void KInetD::loadServiceList()
{
m_portListeners.clear();
KService::List kinetdModules =
KServiceType::offers("KInetDModule");
for (KService::List::ConstIterator it = kinetdModules.begin();
it != kinetdModules.end();
it++) {
KService::Ptr s = *it;
PortListener *pl = new PortListener(s, m_config, m_srvreg);
if (pl->isValid()) {
m_portListeners.append(pl);
} else {
delete pl;
}
}
setExpirationTimer();
setPortRetryTimer(true);
setReregistrationTimer();
}
void KInetD::expirationTimer()
{
setExpirationTimer();
setReregistrationTimer();
}
void KInetD::setExpirationTimer()
{
QDateTime nextEx = getNextExpirationTime(); // disables expired portlistener!
if (!nextEx.isNull())
m_expirationTimer.start(QDateTime::currentDateTime().secsTo(nextEx) * 1000 + 30000,
false);
else {
m_expirationTimer.stop();
}
}
void KInetD::portRetryTimer()
{
setPortRetryTimer(true);
setReregistrationTimer();
}
void KInetD::setReregistrationTimer()
{
QDateTime d;
PortListener *pl = m_portListeners.first();
while (pl) {
QDateTime d2 = pl->serviceLifetimeEnd();
if (!d2.isNull()) {
if (d2 < QDateTime::currentDateTime()) {
m_reregistrationTimer.start(0, true);
return;
} else if (d.isNull() || (d2 < d)) {
d = d2;
}
}
pl = m_portListeners.next();
}
if (!d.isNull()) {
int s = QDateTime::currentDateTime().secsTo(d);
if (s < 30) {
s = 30; // max frequency 30s
}
m_reregistrationTimer.start(s * 1000, true);
} else {
m_reregistrationTimer.stop();
}
}
void KInetD::reregistrationTimer()
{
PortListener *pl = m_portListeners.first();
while (pl) {
pl->refreshRegistration();
pl = m_portListeners.next();
}
setReregistrationTimer();
}
void KInetD::setPortRetryTimer(bool retry)
{
int unmappedPorts = 0;
PortListener *pl = m_portListeners.first();
while (pl) {
if (pl->isEnabled() && (pl->port() < 0))
if (retry) {
if (!pl->acquirePort()) {
unmappedPorts++;
}
} else if (pl->port() < 0) {
unmappedPorts++;
}
pl = m_portListeners.next();
}
if (unmappedPorts > 0) {
m_portRetryTimer.start(30000, false);
} else {
m_portRetryTimer.stop();
}
}
PortListener *KInetD::getListenerByName(QString name)
{
PortListener *pl = m_portListeners.first();
while (pl) {
if (pl->name() == name) {
return pl;
}
pl = m_portListeners.next();
}
return pl;
}
// gets next expiration timer, SIDEEFFECT: disables expired portlisteners while doing this
QDateTime KInetD::getNextExpirationTime()
{
PortListener *pl = m_portListeners.first();
QDateTime d;
while (pl) {
QDateTime d2 = pl->expiration();
if (!d2.isNull()) {
if (d2 < QDateTime::currentDateTime()) {
pl->setEnabled(false);
} else if (d.isNull() || (d2 < d)) {
d = d2;
}
}
pl = m_portListeners.next();
}
return d;
}
QStringList KInetD::services()
{
QStringList list;
PortListener *pl = m_portListeners.first();
while (pl) {
list.append(pl->name());
pl = m_portListeners.next();
}
return list;
}
bool KInetD::isEnabled(QString service)
{
PortListener *pl = getListenerByName(service);
if (!pl) {
return false;
}
return pl->isEnabled();
}
int KInetD::port(QString service)
{
PortListener *pl = getListenerByName(service);
if (!pl) {
return -1;
}
return pl->port();
}
bool KInetD::setPort(QString service, int port, int autoPortRange)
{
PortListener *pl = getListenerByName(service);
if (!pl) {
return false;
}
bool s = pl->setPort(port, autoPortRange);
setPortRetryTimer(false);
setReregistrationTimer();
return s;
}
bool KInetD::isInstalled(QString service)
{
PortListener *pl = getListenerByName(service);
return (pl != 0);
}
void KInetD::setEnabled(QString service, bool enable)
{
PortListener *pl = getListenerByName(service);
if (!pl) {
return;
}
pl->setEnabled(enable);
setExpirationTimer();
setReregistrationTimer();
}
void KInetD::setEnabled(QString service, QDateTime expiration)
{
PortListener *pl = getListenerByName(service);
if (!pl) {
return;
}
pl->setEnabled(expiration);
setExpirationTimer();
setReregistrationTimer();
}
void KInetD::setServiceRegistrationEnabled(QString service, bool enable)
{
PortListener *pl = getListenerByName(service);
if (!pl) {
return;
}
pl->setServiceRegistrationEnabled(enable);
setReregistrationTimer();
}
bool KInetD::isServiceRegistrationEnabled(QString service)
{
PortListener *pl = getListenerByName(service);
if (!pl) {
return false;
}
return pl->isServiceRegistrationEnabled();
}
KInetD::~KInetD()
{
m_portListeners.clear();
delete m_config;
delete m_srvreg;
}

View File

@@ -1,157 +0,0 @@
[Desktop Entry]
Type=Service
X-KDE-ServiceTypes=KDEDModule
X-KDE-ModuleType=Library
X-KDE-Library=kinetd
X-KDE-Kded-autoload=true
Name=KDE Internet Daemon
Name[af]=Kde Internet Bediener
Name[ar]=كيدي إنترنت مراقب
Name[ast]=Degorriu d'Internet de KDE
Name[bg]=Интернет демон (KDE)
Name[bn]=কে-ডি-ই ইন্টারনেট ডিমন
Name[br]=Diaoul kenrouedad KDE
Name[bs]=KDE-ov Internet Demon
Name[ca]=Dimoni d'Internet per al KDE
Name[ca@valencia]=Dimoni d'Internet per al KDE
Name[cs]=KDE Internet démon
Name[cy]=Daemon Rhyngrwyd KDE
Name[da]=KDE Internet-dæmon
Name[de]=Internet-Dienst
Name[el]=Δαίμονας διαδικτύου για το KDE
Name[en_GB]=KDE Internet Dæmon
Name[eo]=KDE interreta demono
Name[es]=Demonio de Internet de KDE
Name[et]=KDE internetideemon
Name[eu]=KDE interneteko daemona
Name[fa]=شبح اینترنتی KDE
Name[fi]=KDE:n Internet-palvelin
Name[fr]=Démon Internet de KDE
Name[ga]=Deamhan Idirlín KDE
Name[gl]=Daemon de internet de KDE
Name[he]=תהליך הרקע האינטרנטי של KDE
Name[hi]=केडीई इंटरनेट डेमन
Name[hne]=केडीई इंटरनेट डेमन
Name[hr]=KDE Internet Daemon
Name[hu]=KDE internetes szolgáltatás
Name[ia]=Demone Internet de KDE
Name[is]=KDE Internetþjónn
Name[it]=Demone Internet di KDE
Name[ja]=KDE インターネットデーモン
Name[kk]=KDE Интернет қызметі
Name[km]=ដេមិន​អ៊ីនធឺណិត​របស់ KDE
Name[ko]=KDE 인터넷 데몬
Name[lt]=KDE interneto tarnyba
Name[lv]=KDE Interneta dēmons
Name[mk]=Даемон за Интернет на KDE
Name[ml]=കെഡിഈ ഇന്റര്‍നെറ്റ് സഹായി
Name[ms]=Daemon Internet KDE
Name[nb]=KDEs Internett-nisse
Name[nds]=KDE-Internetdämoon
Name[ne]=केडीई इन्टरनेट डेइमोन
Name[nl]=KDE Internet Daemon
Name[nn]=KDE-Internett-teneste
Name[pa]=KDE ਇੰਟਰਨੈੱਟ ਡੈਮਨ
Name[pl]=Internet/sieć
Name[pt]=Servidor de Internet do KDE
Name[pt_BR]=Servidor de Internet do KDE
Name[ro]=Demon de Internet KDE
Name[ru]=Доступ к Интернету
Name[se]=KDE-Interneahtta-duogášprográmma
Name[si]=KDE ජාල ඩීමනය
Name[sk]=KDE Internet démon
Name[sl]=Internetni strežnik za KDE
Name[sq]=KDE Internet Daemon
Name[sr]=КДЕ‑ов интернет демон
Name[sr@ijekavian]=КДЕ‑ов интернет демон
Name[sr@ijekavianlatin]=KDEov internet demon
Name[sr@latin]=KDEov internet demon
Name[sv]=KDE:s Internetdemon
Name[ta]=கேடிஇ இணைய டேமொன்
Name[tg]=KDE Азозили Интернет
Name[th]=ดีมอนอินเทอร์เน็ตของ KDE
Name[tr]=KDE İnternet Programı
Name[uk]=Фонова служба Інтернет KDE
Name[uz]=KDE Internet demoni
Name[uz@cyrillic]=KDE Интернет демони
Name[vi]=Trình nền Mạng KDE
Name[xh]=KDE Internet Daemon
Name[x-test]=xxKDE Internet Daemonxx
Name[zh_CN]=KDE Internet 守护进程
Name[zh_HK]=KDE 互聯網系統程式
Name[zh_TW]=KDE Internet 伺服程式
Comment=An Internet daemon that starts network services on demand
Comment[ar]=رقيب الإنترنت بدأ خدمة الشبكة على الرقيب
Comment[ast]=Un degorriu d'Internet qu'entama los servicios de rede baxo demanda
Comment[bg]=Интернет демон, който зарежда мрежови услуги при поискване
Comment[bn]=একটি ইন্টারনেট ডিমন যে চাহিদা ভিত্তিক নেটওয়ার্ক সার্ভিস আরম্ভ করে
Comment[bs]=Internet daemon koji pokreće mrežne servise po zahtijevu
Comment[ca]=Un dimoni d'Internet que arrenca els serveis de xarxa sota demanda
Comment[ca@valencia]=Un dimoni d'Internet que arrenca els serveis de xarxa sota demanda
Comment[cs]=Internetový démon spouštějící síťové služby na požádání
Comment[cy]=Daemon Rhyngrwyd sy'n cychwyn gwasanaethau rhwydwaith ar alw
Comment[da]=En internet-dæmon der starter netværkstjenester efter forespørgsel
Comment[de]=Startet Netzwerkdienste bei Bedarf
Comment[el]=Ένας δαίμονας για το διαδίκτυο ο οποίος ξεκινάει τις υπηρεσίες δικτύου όταν απαιτείται
Comment[en_GB]=An Internet dæmon that starts network services on demand
Comment[eo]=Interreta demono kiu lanĉas retajn servojn laŭ bezono
Comment[es]=Un demonio de Internet que inicia los servicios de red a demanda
Comment[et]=Internetideemon, mis käivitab nõudmisel võrguteenused
Comment[eu]=Sare zerbitzuak eskatzean abiarazten dituen Interneteko daemona
Comment[fa]=یک شبح اینترنتی که خدمات شبکه را بر اساس تقاضا آغاز می‌کند
Comment[fi]=Internet-palvelin, joka käynnistää verkkopalveluita
Comment[fr]=Un démon Internet qui démarre le service réseau à la demande
Comment[ga]=Deamhan Idirlín a thosaíonn seirbhísí líonra ar éileamh
Comment[gl]=Un daemon de Internet que inicia servizos de rede baixo demanda
Comment[he]=תהליך רקע של אינטרנט שמתחיל שירותי רשת לפי דרישה
Comment[hi]=एक इंटरनेट डेमन जो मांग पर नेटवर्क सेवा प्रारंभ करता है
Comment[hne]=एक इंटरनेट डेमन जऊन मांग मं नेटवर्क सेवा चालू करथे
Comment[hr]=Internet daemon koji pokreće mrežne usluge kada su zatražene
Comment[hu]=A hálózati szolgáltatások vezérlését biztosító program
Comment[ia]=Un demone internet que starta servicios de rete sur requesta
Comment[is]=Internetþjónn sem ræsir tengingar við Internetið eftir þörfum
Comment[it]=Un demone Internet che avvia i servizi di rete a richiesta
Comment[ja]=要求時にネットワークサービスを起動するインターネットデーモン
Comment[kk]=Талап етілгенде керек желі қызметтерді жегетін қызмет
Comment[km]=ដេមិន​អ៊ីនធឺណិត​ដែល​ចាប់ផ្ដើម​សេវា​បណ្ដាញ​នៅ​ពេល​ត្រូវការ
Comment[ko]=요청에 따라 네트워크 서비스를 시작하는 인터넷 데몬
Comment[lt]=Interneto tarnyba, paleidžianti tinklo tarnybas esant poreikiui
Comment[lv]=Interneta dēmons pēc vajadzības palaiž tīkla servisus
Comment[mk]=Даемон за Интернет кој ги вклучува мрежните сервиси на барање
Comment[ml]=ആവശ്യ‌പ്പെടുമ്പോള്‍ ശൃംഖലാസേവനം തുടങ്ങുന്ന ഒരു ഇന്റര്‍നെറ്റ് സഹായി
Comment[ms]=Daemon Internet yang memulakan servis jaringan di atas permintaan
Comment[nb]=Internett-nisse som starter nettverkstjenester ved behov
Comment[nds]=En Internet-Dämoon, wat Nettwarkdeensten op Anfraag start
Comment[ne]=एउटा इन्टरनेट डेइमोन जसले मागमा सञ्जाल सेवा सुरु गर्दछ
Comment[nl]=Een internetdaemon die netwerkdiensten op afroep start
Comment[nn]=Internett-teneste som startar nettverkstenester når dei trengst
Comment[pa]=ਇੱਕ ਇੰਟਰਨੈੱਟ ਡੈਮਨ, ਜੋ ਕਿ ਲੋੜ ਪੈਣ ਉੱਤੇ ਨੈੱਟਵਰਕ ਸਰਵਿਸਾਂ ਸ਼ੁਰੂ ਕਰਦੀ ਹੈ।
Comment[pl]=Uruchamianie usług na żądanie
Comment[pt]=Um servidor da Internet que inicia os serviços de rede a pedido
Comment[pt_BR]=Um servidor Internet que inicia os serviços de rede por demanda
Comment[ro]=Un demon de Internet ce pornește serviciile de rețea la cerere
Comment[ru]=Служба установления подключения при запросе сетевых ресурсов
Comment[se]=Interneahtta-duogášprográmma mii álggaha fierpmádatbálvalusaid go dárbbašuvvo
Comment[si]=ඉල්ලුම පරිදි ජාල සේවා ආරම්භ කරන අන්තර්ජාල ඩීමනය
Comment[sk]=Internetový démon, ktorý spúšťa sieťové služby na požiadanie
Comment[sl]=Internetni strežnik, ki zažene omrežne storitve na zahtevo
Comment[sr]=Интернет демон који покреће мрежне сервисе по захтеву
Comment[sr@ijekavian]=Интернет демон који покреће мрежне сервисе по захтјеву
Comment[sr@ijekavianlatin]=Internet demon koji pokreće mrežne servise po zahtjevu
Comment[sr@latin]=Internet demon koji pokreće mrežne servise po zahtevu
Comment[sv]=Internetdemon som startar nätverkstjänster vid behov
Comment[ta]=ஒரு இணைய டேமொன், டேமொன் பிணைய சேவையை ஆரம்பிக்கிறது
Comment[tg]=Азозили шабакавие, ки хидматрасони шабакавиро бо дархост сар медиҳад
Comment[th]=ดมอนอินเทอร์เน็ตซึ่งจะเริ่มทำงานบริการเครือข่ายเมื่อมีความต้องการใช้
Comment[tr]=Başlangıçta ağ servisleri tarafından istenen Internet hayalet programı
Comment[uk]=Фонова служба Інтернет, що запускає служби мережі при запиті
Comment[uz]=Talab qilinganda tarmoq xizmatlarini ishga tushuruvchi Internet demoni
Comment[uz@cyrillic]=Талаб қилинганда тармоқ хизматларини ишга тушурувчи Интернет демони
Comment[vi]=Một trình nền Mạng mà chạy các dịch vụ mạng theo nhu cầu
Comment[xh]=Internet daemon eqala iinkonzo zomsebenzi wonatha xa zifunwa
Comment[x-test]=xxAn Internet daemon that starts network services on demandxx
Comment[zh_CN]=按需启动网络服务的守护进程
Comment[zh_HK]=自動依需求起動網絡服務的互聯網系統程式
Comment[zh_TW]=依要求起動網路服務的 Internet 伺服程式

View File

@@ -1,201 +0,0 @@
/***************************************************************************
kinetd.h
------------
begin : Mon Feb 11 2002
copyright : (C) 2002 by Tim Jansen
email : tim@tjansen.de
***************************************************************************/
/***************************************************************************
* *
* 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 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef _KINETD_H_
#define _KINETD_H_
#include <kdedmodule.h>
#include <kservice.h>
#include <k3process.h>
#include <qstringlist.h>
#include <qstring.h>
#include <qdatetime.h>
#include <qtimer.h>
#include <kserversocket.h>
#include <dnssd/publicservice.h>
#include <q3ptrlist.h>
#include "kserviceregistry.h"
class PortListener : public QObject
{
Q_OBJECT
private:
bool m_valid;
QString m_serviceName;
QString m_serviceURL, m_serviceAttributes;
QStringList m_registeredServiceURLs;
QString m_dnssdName, m_dnssdType;
QMap<QString, QString> m_dnssdData;
int m_serviceLifetime;
int m_port;
int m_portBase, m_autoPortRange;
int m_defaultPortBase, m_defaultAutoPortRange;
bool m_multiInstance;
QString m_execPath;
QString m_argument;
bool m_enabled;
bool m_serviceRegistered, m_registerService;
bool m_dnssdRegister, m_dnssdRegistered;
QDateTime m_expirationTime;
QDateTime m_slpLifetimeEnd;
QString m_uuid;
KNetwork::KServerSocket *m_socket;
K3Process m_process;
KConfig *m_config;
KServiceRegistry *m_srvreg;
DNSSD::PublicService *m_dnssdreg;
void freePort();
void loadConfig(KService::Ptr s);
void setEnabledInternal(bool e, const QDateTime &ex);
void dnssdRegister(bool enabled);
void setServiceRegistrationEnabledInternal(bool enabled);
public:
PortListener(KService::Ptr s, KConfig *c, KServiceRegistry *srvreg);
~PortListener();
bool acquirePort();
bool isValid();
QString name();
void setEnabled(bool enabled);
void setEnabled(const QDateTime &expiration);
void setServiceRegistrationEnabled(bool enabled);
bool isServiceRegistrationEnabled();
QDateTime expiration();
QDateTime serviceLifetimeEnd();
bool isEnabled();
int port();
QStringList processServiceTemplate(const QString &a);
bool setPort(int port = -1, int autoProbeRange = 1);
void refreshRegistration();
private slots:
void accepted(KSocket *);
};
class KInetD : public KDEDModule
{
Q_OBJECT
public slots:
/**
* Returns a list of all registered services in KInetd.
* To add a service you need to add a .desktop file with
* the servicetype "KInetDModule" into the services director
* (see kinetdmodule.desktop in servicetypes dir).
* @return a list with the names of all services
*/
QStringList services();
/**
* Returns true if the service exists and is available.
* @param service name of a service as specified in its .desktop file
* @return true if a service with the given name exists and is enabled
*/
bool isEnabled(QString service);
/**
* Enables or disabled the given service. Ignored if the given service
* does not exist.
* @param service name of a service as specified in its .desktop file
* @param enable true to enable, false to disable.
*/
void setEnabled(QString service, bool enable);
/**
* Enables the given service until the given time. Ignored if the given
* service does not exist.
* @param service name of a service as specified in its .desktop file
* @param expiration the time the service will be disabled at
*/
void setEnabled(QString service, QDateTime expiration);
/**
* Returns the port of the service, or -1 if not listening.
* @param service name of a service as specified in its .desktop file
* @return the port or -1 if no port used or service does not exist
*/
int port(QString service);
/**
* Sets the port of the service, and possibly a range of ports to try.
* It will return true if a port could be found. If it did not find one
* but is enabled it will start a timer that probes that port every 30s.
* @param service name of a service as specified in its .desktop file
* @param port the first port number to try or -1 to restore defaults
* @param autoPortRange the number of ports to try
* @return true if a port could be found or service is disabled, false
* otherwise.
*/
bool setPort(QString service, int port = -1, int autoPortRange = 1);
/**
* Tests whether the given service is installed..
* @param service name of a service as specified in its .desktop file
* @return true if installed, false otherwise
*/
bool isInstalled(QString service);
/**
* Enables or disables the SLP registration. Ignored if the service does
* not have a service URL. If the service is disabled the service will
* registered as soon as it is enabled.
* @param service name of a service as specified in its .desktop file
* @param enable true to enable, false to disable.
*/
void setServiceRegistrationEnabled(QString service, bool enabled);
/**
* Returns true if service registration for the given service is enabled.
* Note that this does not mean that the service is currently registered,
* because the service may be disabled.
* @param service name of a service as specified in its .desktop file
* @return true if service registration is enabled
*/
bool isServiceRegistrationEnabled(QString service);
private:
QDateTime getNextExpirationTime();
void setPortRetryTimer(bool retry);
void setReregistrationTimer();
KConfig *m_config;
KServiceRegistry *m_srvreg;
Q3PtrList<PortListener> m_portListeners;
QTimer m_expirationTimer;
QTimer m_portRetryTimer;
QTimer m_reregistrationTimer;
private slots:
void setExpirationTimer();
void expirationTimer();
void portRetryTimer();
void reregistrationTimer();
public:
KInetD(QObject *parent, const QList<QVariant>&);
virtual ~KInetD();
void loadServiceList();
PortListener *getListenerByName(QString name);
};
#endif

View File

@@ -1,344 +0,0 @@
[Global]
IconName=kinetd
Comment=KInetD
Comment[ar]=KInetD
Comment[ast]=KInetD
Comment[bg]=KInetD
Comment[bn]=কে-আইনেট-ডি
Comment[br]=KInetD
Comment[bs]=KInetD
Comment[ca]=KInetD
Comment[ca@valencia]=KInetD
Comment[cs]=KInetD
Comment[cy]=KInetD
Comment[da]=KInetD
Comment[de]=KInetD
Comment[el]=KInetD
Comment[en_GB]=KInetD
Comment[eo]=KInetD
Comment[es]=KInetD
Comment[et]=KInetD
Comment[eu]=KInetD
Comment[fi]=KInetD
Comment[fr]=KInetD
Comment[ga]=KInetD
Comment[gl]=KInetD
Comment[he]=KInetD
Comment[hi]=के-इनिट-डी
Comment[hne]=के-इनिट-डी
Comment[hr]=KInetD
Comment[hu]=KInetD
Comment[ia]=KInetD
Comment[is]=KInetD
Comment[it]=KInetD
Comment[ja]=KInetD
Comment[kk]=KInetD
Comment[km]=KInetD
Comment[ko]=KInetD
Comment[lt]=KInetD
Comment[lv]=KInetD
Comment[mk]=KInetD
Comment[ml]=കെഐനെറ്റ്ഡി
Comment[ms]=KInetD
Comment[nb]=KInetD
Comment[nds]=KInetD
Comment[nl]=KInetD
Comment[nn]=KInetD
Comment[pa]=KInetD
Comment[pl]=KInetD
Comment[pt]=KInetD
Comment[pt_BR]=KInetD
Comment[ro]=KInetD
Comment[ru]=KInetD
Comment[si]=KInetD
Comment[sk]=KInetD
Comment[sl]=KInetD
Comment[sq]=KInetD
Comment[sr]=КинетД
Comment[sr@ijekavian]=КинетД
Comment[sr@ijekavianlatin]=KInetD
Comment[sr@latin]=KInetD
Comment[sv]=Kinetd
Comment[ta]=KInetD
Comment[tg]=KInetD
Comment[tr]=KInetD
Comment[uk]=KInetD
Comment[wa]=KInetD
Comment[xh]=KInetD
Comment[x-test]=xxKInetDxx
Comment[zh_CN]=KInetD
Comment[zh_HK]=KInetD
Comment[zh_TW]=KInetD
[Event/IncomingConnection]
Name=IncomingConnection
Name[ar]=اتصال وارد
Name[ast]=Conexón entrante
Name[bg]=Входяща връзка
Name[bn]=অন্তর্মুখী সংযোগ
Name[br]=Kevreadenn resev
Name[bs]=Dolazna veza
Name[ca]=Connexió entrant
Name[ca@valencia]=Connexió entrant
Name[cs]=Příchozí spojení
Name[cy]=CysylltiadCyrraedd
Name[da]=IndkommendeForbindelse
Name[de]=Eingehende Verbindung
Name[el]=Εισερχόμενη σύνδεση
Name[en_GB]=IncomingConnection
Name[eo]=Envenanta konekto
Name[es]=Conexión entrante
Name[et]=Sissetulev ühendus
Name[eu]=Sarrerako konexioa
Name[fi]=Saapuva yhteys
Name[fr]=Connexion entrante
Name[ga]=Ceangal Isteach
Name[gl]=Conexión entrante
Name[he]=חיבור נכנס
Name[hi]=आवक-कनेक्शन
Name[hne]=आवक-कनेक्सन
Name[hr]=DolaznaVeza
Name[hu]=Bejövő kapcsolat
Name[ia]=Connexion in arrivata
Name[is]=IncomingConnection
Name[it]=Connessioni in entrata
Name[ja]=外部からの接続
Name[kk]=Кіріс қосылым
Name[km]=ការ​តភ្ជាប់​ចូល
Name[ko]=IncomingConnection
Name[lt]=Gautas kvietimas ryšiui
Name[lv]=IenākošaisSavienojums
Name[mk]=Дојдовно поврзување
Name[ml]=ആഗമനബന്ധം
Name[ms]=Sambungan Masuk
Name[nb]=Innkommende tilkobling
Name[nds]=RinkamenVerbinnen
Name[nl]=Inkomende_verbinding
Name[nn]=Innkommande tilkopling
Name[pa]=ਆ ਰਹੇ ਕੁਨੈਕਸ਼ਨ
Name[pl]=Połączenia przychodzące
Name[pt]=IncomingConnection
Name[pt_BR]=Conexões de entrada
Name[ro]=ConexiuneDeIntrare
Name[ru]=Входящее соединение
Name[si]=පැමිණෙන සබැඳිය
Name[sk]=Prichádzajúce pripojenie
Name[sl]=Prejeta povezava
Name[sr]=Долазна веза
Name[sr@ijekavian]=Долазна веза
Name[sr@ijekavianlatin]=Dolazna veza
Name[sr@latin]=Dolazna veza
Name[sv]=Inkommande anslutning
Name[ta]=உள்வரும் இணைப்புகள்
Name[tg]=Пайвастшавии Воридшаванда
Name[th]=มีการเชื่อมต่อเข้ามา
Name[tr]=Gelen Bağlantı
Name[uk]=IncomingConnection
Name[xh]=Uxhumaniso Olungenayo
Name[x-test]=xxIncomingConnectionxx
Name[zh_CN]=进入的连接
Name[zh_HK]=進入連線
Name[zh_TW]=進來的連線
Comment=Received incoming connection
Comment[af]=Ontvang inkomende verbinding
Comment[ar]=تلقي اتصال وارد
Comment[ast]=Recibida conexón entrante
Comment[bg]=Получана е входяща връзка
Comment[bn]=অন্তর্মুখী সংযোগ গ্রহণ করল
Comment[bs]=Primljena dolazeća veza
Comment[ca]=Rebuda connexió entrant
Comment[ca@valencia]=Rebuda connexió entrant
Comment[cs]=Obdrženo příchozí spojení
Comment[cy]=Derbynwyd cysylltiad a gyrhaeddodd
Comment[da]=Modtog indkommende forbindelse
Comment[de]=Verbindungsanfrage eingegangen
Comment[el]=Λήφθηκε μια εισερχόμενη σύνδεση
Comment[en_GB]=Received incoming connection
Comment[eo]=Ricevis envenantan konekton
Comment[es]=Recibida conexión entrante
Comment[et]=Saadi sissetulev ühendus
Comment[eu]=Sarrerako konexio bat jaso da
Comment[fi]=Vastaanotettiin saapuva yhteys
Comment[fr]=Reçu une connexion entrante
Comment[ga]=Fuarthas ceangal isteach
Comment[gl]=Recibiuse unha conexión entrante
Comment[he]=נתקבל חיבור נכנס
Comment[hi]=आवक कनेक्शन प्राप्त
Comment[hne]=आवक कनेक्सन प्राप्त
Comment[hr]=Primio dolaznu vezu
Comment[hu]=Csatlakozási kérés érkezett
Comment[ia]=Connexion in arrivata recipite
Comment[is]=Tók á móti uppkalli
Comment[it]=Ricevuta connessione in entrata
Comment[ja]=外部からの接続がありました
Comment[kk]=Кіріс қосылым ұсынылды
Comment[km]=បាន​ទទួល​ការ​តភ្ជាប់​ចូល
Comment[ko]=들어오는 연결을 받았습니다
Comment[lt]=Gautas kvietimas ryšiui
Comment[lv]=Saņemts ienākošs savienojums
Comment[mk]=Примено е дојдовно поврзување
Comment[ml]=ആഗമനബന്ധം ലഭിച്ചു
Comment[ms]=Menerima sambungan masuk
Comment[nb]=Mottok innkommende tilkobling
Comment[nds]=Tokoppelanfraag kregen
Comment[nl]=Inkomende verbinding ontvangen
Comment[nn]=Fekk ei innkommande tilkopling
Comment[pa]=ਮਿਲੇ ਆ ਰਹੇ ਕੁਨੈਕਸ਼ਨ
Comment[pl]=Otrzymano połączenie przychodzące
Comment[pt]=Foi recebida uma ligação
Comment[pt_BR]=Recebendo conexão de entrada
Comment[ro]=Conexiune de intrare recepționată
Comment[ru]=Входящее соединение завершилось успешно
Comment[si]=ලැබුනු පැමිණෙන සබැඳිය
Comment[sk]=Prijaté prichádzajúce pripojenie
Comment[sl]=Prejeta je prihajajoča povezava
Comment[sr]=Примљена је долазна веза
Comment[sr@ijekavian]=Примљена је долазна веза
Comment[sr@ijekavianlatin]=Primljena je dolazna veza
Comment[sr@latin]=Primljena je dolazna veza
Comment[sv]=Tar emot inkommande anslutning
Comment[tg]=Пайвастшавии воридшаванда қабул гардид
Comment[th]=ได้รับการเชื่อมต่อเข้ามา
Comment[tr]=Gelen bağlantı alınıyor
Comment[uk]=Отримано вхідне з’єднання
Comment[xh]=Uxhulumano olungenayo olufunyenweyo
Comment[x-test]=xxReceived incoming connectionxx
Comment[zh_CN]=收到进入的连接
Comment[zh_HK]=已接收的進入連線
Comment[zh_TW]=接收到進來的連線
Action=None
[Event/ProcessFailed]
Name=ProcessFailed
Name[ar]=فشلت العملية
Name[ast]=Procesu fallíu
Name[bn]=প্রসেস ব্যর্থ
Name[bs]=Neuspio proces
Name[ca]=Procés erroni
Name[ca@valencia]=Procés erroni
Name[cs]=Proces selhal
Name[cy]=MethoddProses
Name[da]=ProcesMislykkedes
Name[de]=Prozess fehlgeschlagen
Name[el]=Η διεργασία απέτυχε
Name[en_GB]=ProcessFailed
Name[eo]=Procezo fiaskis
Name[es]=Proceso fallido
Name[et]=Protsess nurjus
Name[eu]=Prozesuak huts egin du
Name[fi]=Prosessi epäonnistui
Name[fr]=Échec du processus
Name[ga]=PróiseasTeipthe
Name[gl]=Fallou o proceso
Name[he]=תהליך נכשל
Name[hi]=प्रक्रिया-असफल
Name[hne]=काम-फेल
Name[hr]=ProcesNeuspješan
Name[hu]=Hibás folyamat
Name[ia]=Processo falleva
Name[is]=ProcessFailed
Name[it]=Processo non riuscito
Name[ja]=プロセス失敗
Name[kk]=Процес жаңылысы
Name[km]=ដំណើរ​ការ​បាន​បរាជ័យ
Name[ko]=ProcessFailed
Name[lt]=Procesas nepavyko
Name[lv]=ProcessNeveiksmīgs
Name[mk]=Процесот не успеа
Name[ml]=പ്രക്രിയ പരാജയപ്പെട്ടു
Name[ms]=Proses Gagal
Name[nb]=Prosessen mislyktes
Name[nds]=PerzessFehlslaan
Name[nl]=Proces_mislukt
Name[nn]=Prosessen feila
Name[pa]=ਪਰੋਸੈਸ ਫੇਲ੍ਹ
Name[pl]=Błąd procesu
Name[pt]=ProcessFailed
Name[pt_BR]=Falha de processo
Name[ro]=ProcesEșuat
Name[ru]=Ошибка процесса
Name[si]=සැකසුම අසාර්ථකයි
Name[sk]=Proces zlyhal
Name[sl]=Proces ni uspel
Name[sr]=Процес није успео
Name[sr@ijekavian]=Процес није успио
Name[sr@ijekavianlatin]=Proces nije uspio
Name[sr@latin]=Proces nije uspeo
Name[sv]=Process misslyckades
Name[ta]=செயல் தோல்வியுற்றது
Name[tg]=Ҷараён бо Нокомӣ анҷомид
Name[th]=โพรเซสล้มเหลว
Name[tr]=Başarısız İşlemler
Name[uk]=ProcessFailed
Name[xh]=Inkqubo Yahlulekile
Name[x-test]=xxProcessFailedxx
Name[zh_CN]=处理失败
Name[zh_HK]=程序失敗
Name[zh_TW]=行程失敗
Comment=Could not call process to handle connection
Comment[af]=Kon nie roep proses na handvatsel verbinding
Comment[ar]= لا يمكن نداء الإجراء إلى مؤشر الاتصال
Comment[ast]=Nun puede llamase a un procesu pa remanar la conexón
Comment[bn]=সংযোগ পরিচালনা করতে প্রসেস শুরু করতে পারল না
Comment[bs]=Nisam mogao da pozovem proces da opsluži vezu
Comment[ca]=No es pot cridar al procés per a manejar la connexió
Comment[ca@valencia]=No es pot cridar al procés per a manejar la connexió
Comment[cs]=Nelze spustit proces k obsluze spojení
Comment[cy]=Methu galw proses i drin y cysylltiad
Comment[da]=Kunne ikke kalde proces til at håndtere forbindelse
Comment[de]=Der Prozess zur Bearbeitung der Verbindungsanfrage kann nicht gestartet werden
Comment[el]=Αδύνατη η κλήση της διεργασίας για τη διαχείριση της σύνδεσης
Comment[en_GB]=Could not call process to handle connection
Comment[eo]=Ne eblis lanĉi la procezon por trakti la konekton
Comment[es]=No se puede llamar un proceso para manejar la conexión
Comment[et]=Ei suuda käivitada protsessi ühenduse käsitsemiseks
Comment[eu]=Ezin izan da konexioa kudeatzeko prozesua deitu
Comment[fi]=Ei voitu kutsua prosessia yhteyden hoitamiseksi
Comment[fr]=Impossible d'appeler le processus pour gérer la connexion
Comment[ga]=Níorbh fhéidir próiseas a thosú chun an ceangal a láimhseáil
Comment[gl]=Non foi posíbel chamar ao proceso que xestiona a conexión
Comment[he]=אין אפשרות לקרוא לתהליך על מנת לטפל בחיבור
Comment[hi]=कनेक्शन हैंडल करने के लिए प्रक्रिया काल नहीं कर सका
Comment[hne]=कनेक्सन हेंडल करे बर काम काल नइ कर सकिस
Comment[hr]=Nisam mogao pozvati proces za kontrolu veze
Comment[hu]=A kapcsolat kezelése nem sikerült
Comment[ia]=Il non pote appellar processo pro manear connexion
Comment[is]=Gat ekki kallað á forrit til að höndla tengingu
Comment[it]=Impossibile richiamare il processo per gestire la connessione
Comment[ja]=接続を扱うプロセスを呼び出せません
Comment[kk]=Қосылыммен айналысатын процесс шақырылмады
Comment[km]=មិន​អាច​ហៅ​ដំណើរ​ការ ដើម្បី​ដោះស្រាយ​ការ​ត​ភ្ជាប់​បាន​ឡើយ
Comment[ko]=연결을 처리하기 위한 프로세스를 부를 수 없습니다
Comment[lt]=Nepavyko iškviesti proceso apdoroti prisijungimui
Comment[lv]=Neizdevās izsaukt procesu savienojuma apstrādei
Comment[mk]=Не може да се повика процесот за ракување со поврзувањето
Comment[ml]=ബന്ധം കൈകാര്യം ചെയ്യാന്‍ പ്രക്രിയയെ വിളിക്കാന്‍ കഴിഞ്ഞില്ല
Comment[ms]=Tidak dapat memanggil proses untuk mengendalikan sambungan
Comment[nb]=Klarte ikke kalle på prosess for å håndtere tilkobling
Comment[nds]=Perzess för't Verarbeiden vun Tokoppelanfragen lett sik nich opropen
Comment[nl]=Kon geen proces aanroepen om de verbinding af te handelen
Comment[nn]=Klarte ikkje kalla på prosessen som skulle handtera tilkoplinga
Comment[pl]=Nie można było uruchomić procesu obsługi połączenia
Comment[pt]=Não foi possível invocar o processo para lidar com as ligações
Comment[pt_BR]=Não foi possível chamar o processo de controle da conexão
Comment[ro]=Procesul ce manipulează conexiunea nu a putut fi apelat
Comment[ru]=Не удаётся запустить процесс обработки соединения
Comment[si]=සබඳතාව හැසිරවීම සඳහා සැකසීම නොකැඳවන්න
Comment[sk]=Nepodarilo sa spustiť proces na spracovanie pripojenia
Comment[sl]=Ni možno poklicati procesa za upravljanje s povezavo
Comment[sr]=Нисам могао да позовем процес да опслужи везу
Comment[sr@ijekavian]=Нисам могао да позовем процес да опслужи везу
Comment[sr@ijekavianlatin]=Nisam mogao da pozovem proces da opsluži vezu
Comment[sr@latin]=Nisam mogao da pozovem proces da opsluži vezu
Comment[sv]=Kunde inte anropa process för att hantera anslutning
Comment[ta]=இணைப்பை கையாள செயற்பாட்டை அழைக்க முடியவில்லை
Comment[tg]=Барои даскории пайвастшавӣ ҷараён бозхонда нашуд
Comment[th]=ไม่สามารถเรียกโพรเซสเพื่อจัดการรับการเชื่อมต่อได้
Comment[tr]=Elle bağlantıda başarısız çağrı işlemleri
Comment[uk]=Не вдалося викликати процес для з’єднання
Comment[xh]=Ayikwazanga ukubiza inkqubo ezakuphatha uxhulumano
Comment[x-test]=xxCould not call process to handle connectionxx
Comment[zh_CN]=无法调用进程处理连接
Comment[zh_HK]=無法呼叫處理連線的程序
Comment[zh_TW]=無法呼叫行程來處理此連線
Action=None

View File

@@ -1,154 +0,0 @@
# describes the servicetype that you need to implement in order to use
# kinetd.
[Desktop Entry]
Type=ServiceType
X-KDE-ServiceType=KInetDModule
Name=KInetD Module Type
Name[ar]=KInetD نوع الوحدة
Name[ast]=Triba de módulu KInetD
Name[bg]=Модул на KInetD
Name[bn]=কে-আইনেট-ডি মডিউল ধরন
Name[br]=Seurt ar mollad KInetD
Name[bs]=Vrsta modula KInetD-a
Name[ca]=Tipus de mòdul del KInetD
Name[ca@valencia]=Tipus de mòdul del KInetD
Name[cs]=Typ modulu KInetD
Name[cy]=Math Modiwl KInetD
Name[da]=KInetD-modultype
Name[de]=KInetD-Modultyp
Name[el]=Τύπος αρθρώματος KInetD
Name[en_GB]=KInetD Module Type
Name[eo]=KInetD modulotipo
Name[es]=Tipo de módulo KInetD
Name[et]=KInetD mooduli tüüp
Name[eu]=KInetD modulu mota
Name[fa]=نوع پیمانۀ KInetD
Name[fi]=KInetD-moduulityyppi
Name[fr]=Type de module de KInetD
Name[ga]=Cineál Modúil KInetD
Name[gl]=Tipo de módulo KInetD
Name[he]=סוג מודול של KInetD
Name[hi]=के-इनिट-डी मॉड्यूल प्रकार
Name[hne]=के-इनिट-डी माड्यूल किसम
Name[hr]=Tip KInetD Modula
Name[hu]=KInetD modultípus
Name[ia]=Typo de modulo KInetD
Name[is]=KInetD Module tegund
Name[it]=Tipo di modulo KInetD
Name[ja]=KInetD モジュールタイプ
Name[kk]=KInetD модулі
Name[km]=ប្រភេទ​ម៉ូលឌុល KInetD
Name[ko]=KInetD 모듈 종류
Name[lt]=KInetD modulio tipas
Name[lv]=KInetD moduļa tips
Name[mk]=Тип на модул за KInetD
Name[ml]=കെഐനെറ്റ് ഘടക രീതി
Name[ms]=Jenis Modul KInetD
Name[nb]=KInetd-programtillegstype
Name[nds]=KInetD-Moduultyp
Name[ne]=KInetD मोड्युल प्रकार
Name[nl]=KInetD-moduletype
Name[nn]=KInetD-programtilleggstype
Name[pa]=KInetD ਮੋਡੀਊਲ ਟਾਈਪ
Name[pl]=Typ modułu KInetD
Name[pt]=Tipo de Módulo do KInetD
Name[pt_BR]=Módulo KInetD
Name[ro]=Tip modul KInetD
Name[ru]=Модуль KInetD
Name[se]=KInetD-moduvlašládja
Name[si]=KInetD මොඩියුල වර්‍ගය
Name[sk]=Typ modulu KInetD
Name[sl]=Vrsta modula KInetD
Name[sr]=Врста модула КинетД‑а
Name[sr@ijekavian]=Врста модула КинетД‑а
Name[sr@ijekavianlatin]=Vrsta modula KInetDa
Name[sr@latin]=Vrsta modula KInetDa
Name[sv]=Kinetd-modultyp
Name[ta]=KInetD கூறு வகை
Name[tg]=Навъи Модули KInetD
Name[tr]=KInetD Modül Türü
Name[uk]=Тип модулю KinetD
Name[vi]=Kiểu môđun KInetD
Name[xh]=Udidi Lomqongo womlinganiselo we KInetD
Name[x-test]=xxKInetD Module Typexx
Name[zh_CN]=KInetD 模块类型
Name[zh_HK]=KInetD 模組類型
Name[zh_TW]=KInetD 模組類型
# id to manipulate the service
[PropertyDef::X-KDE-KINETD-id]
Type=QString
# describes the TCP port kinetd should listen to
[PropertyDef::X-KDE-KINETD-port]
Type=int
# if set and >0, the number of ports kinetd should probe if the port is in use
[PropertyDef::X-KDE-KINETD-autoPortRange]
Type=int
# if enabled, kinetd will listen on the port. Can be overridden using the
# dcop interface.
[PropertyDef::X-KDE-KINETD-enabled]
Type=bool
# if set, this argument is given to the app to start, followed by the number
# of the socket's fd
[PropertyDef::X-KDE-KINETD-argument]
Type=QString
# if true, kinetd can accepts several connections at the same time. Otherwise
# it will block the port when a connection has been established.
[PropertyDef::X-KDE-KINETD-multiInstance]
Type=bool
# if set, kinetd will register the given URL at the local SLP SA while
# the port is open. It will register one URL for each IP address of the
# host.
# The following strings will be substituted:
# %h with the local IP address
# %p with the port number
# %u with the user's login name
# %f with the user's full name
# %i with a UUID thats identical in all URLs of this service
[PropertyDef::X-KDE-KINETD-serviceURL]
Type=QString
# if kinetd registers a service URL, this string will be used for its attributes.
# The following strings will be substituted:
# %h with the local IP address
# %p with the port number
# %u with the user's login name
# %f with the user's full name
# %i with a UUID thats identical in all URLs of this service
[PropertyDef::X-KDE-KINETD-serviceAttributes]
Type=QString
# the lifetime of a service in seconds. kinets will renew the service
# automatically. Max 65535, never use anything under 2 min. Something like
# 5-20 minutes is a sane value for most desktop applications.
[PropertyDef::X-KDE-KINETD-serviceLifetime]
Type=int
# if set, kinetd will announce service with given name on local network while
# the port is open.
# The following strings will be substituted:
# %h with the local IP address
# %f with the user's full name
# %p with the port number
[PropertyDef::X-KDE-KINETD-DNSSD-Name]
Type=QString
# if kinetd announces service on network using DNS-SD, this string will be used as service
# type. It must be in form _yourservice._udp or _yourservice._tcp
# it uses the same substitution rules as X-KDE-KINETD-DNSSD-Name
[PropertyDef::X-KDE-KINETD-DNSSD-Type]
Type=QString
# defines list of text properties for service announced via DNS-SD
# it uses the same substitution rules as X-KDE-KINETD-DNSSD-Name
[PropertyDef::X-KDE-KINETD-DNSSD-Properties]
Type=QStringList

View File

@@ -2,6 +2,8 @@ configure_file (${CMAKE_CURRENT_SOURCE_DIR}/config-krfb.h.cmake
${CMAKE_CURRENT_BINARY_DIR}/config-krfb.h
)
include(GenerateExportHeader)
#####################################
# First target: libkrfbprivate - a library
# for linking plugins against.
@@ -9,53 +11,46 @@ configure_file (${CMAKE_CURRENT_SOURCE_DIR}/config-krfb.h.cmake
set (krfbprivate_SRCS
framebuffer.cpp
framebufferplugin.cpp
events.cpp
eventsplugin.cpp
)
kde4_add_library (krfbprivate
add_library (krfbprivate
SHARED
${krfbprivate_SRCS}
)
generate_export_header(krfbprivate BASE_NAME krfbprivate)
target_link_libraries (krfbprivate
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
Qt::Core
Qt::Widgets
Qt::GuiPrivate
${X11_X11_LIB}
${LIBVNCSERVER_LIBRARIES}
)
set_target_properties (krfbprivate PROPERTIES
VERSION ${GENERIC_LIB_VERSION}
SOVERSION ${GENERIC_LIB_VERSION}
VERSION 5
SOVERSION 5.0
)
install (TARGETS krfbprivate
${INSTALL_TARGETS_DEFAULT_ARGS}
${KDE_INSTALL_TARGETS_DEFAULT_ARGS}
LIBRARY NAMELINK_SKIP
)
install (FILES
krfb-framebuffer.desktop
DESTINATION ${SERVICETYPES_INSTALL_DIR}
)
#####################################
# Second target: krfb - the app
# itself.
if(BUILD_EXPERIMENTAL_TUBES_SUPPORT AND TELEPATHY_QT4_FOUND)
add_definitions(-DKRFB_WITH_TELEPATHY_TUBES)
include_directories(${TELEPATHY_QT4_INCLUDE_DIR})
endif(BUILD_EXPERIMENTAL_TUBES_SUPPORT AND TELEPATHY_QT4_FOUND)
set (krfb_SRCS
connectiondialog.cpp
events.cpp
framebuffermanager.cpp
invitation.cpp
invitedialog.cpp
invitationmanager.cpp
events.cpp
eventsmanager.cpp
main.cpp
manageinvitationsdialog.cpp
personalinvitedialog.cpp
mainwindow.cpp
sockethelpers.cpp
trayicon.cpp
rfbservermanager.cpp
@@ -65,54 +60,55 @@ set (krfb_SRCS
invitationsrfbclient.cpp
)
if (BUILD_EXPERIMENTAL_TUBES_SUPPORT AND TELEPATHY_QT4_FOUND)
set (krfb_SRCS
${krfb_SRCS}
tubesrfbserver.cpp
tubesrfbclient.cpp
tubesclienthandler.cpp
)
endif (BUILD_EXPERIMENTAL_TUBES_SUPPORT AND TELEPATHY_QT4_FOUND)
ecm_qt_declare_logging_category(krfb_SRCS
HEADER krfbdebug.h
IDENTIFIER KRFB
CATEGORY_NAME krfb.krfb
DESCRIPTION "KRFB Application"
EXPORT KRFB
)
kde4_add_kcfg_files (krfb_SRCS
kconfig_add_kcfg_files (krfb_SRCS
krfbconfig.kcfgc
)
kde4_add_ui_files (krfb_SRCS
ki18n_wrap_ui (krfb_UI_SRCS
ui/configtcp.ui
ui/configsecurity.ui
ui/configframebuffer.ui
ui/connectionwidget.ui
ui/invitewidget.ui
ui/manageinvitations.ui
ui/personalinvitewidget.ui
ui/mainwidget.ui
)
if (BUILD_EXPERIMENTAL_TUBES_SUPPORT AND TELEPATHY_QT4_FOUND)
kde4_add_ui_files(krfb_SRCS ui/tubesconnectionwidget.ui)
endif(BUILD_EXPERIMENTAL_TUBES_SUPPORT AND TELEPATHY_QT4_FOUND)
qt_add_resources(krfb_SRCS
krfb.qrc
)
kde4_add_executable (krfb
add_executable (krfb
${krfb_SRCS}
${krfb_UI_SRCS}
)
target_link_libraries (krfb
krfbprivate
vncserver
${JPEG_LIBRARIES}
${X11_Xext_LIB}
${X11_X11_LIB}
${X11_Xdamage_LIB}
${QT_QTNETWORK_LIBRARY}
${KDE4_KDNSSD_LIBS}
${KDE4_KDEUI_LIBS}
Qt::Network
KF6::CoreAddons
KF6::DBusAddons
KF6::DNSSD
KF6::I18n
KF6::Notifications
KF6::Wallet
KF6::WidgetsAddons
KF6::WindowSystem
KF6::XmlGui
KF6::StatusNotifierItem
${LIBVNCSERVER_LIBRARIES}
)
if (BUILD_EXPERIMENTAL_TUBES_SUPPORT AND TELEPATHY_QT4_FOUND)
target_link_libraries(krfb
${TELEPATHY_QT4_LIBRARIES}
)
endif (BUILD_EXPERIMENTAL_TUBES_SUPPORT AND TELEPATHY_QT4_FOUND)
if (X11_XTest_FOUND)
target_link_libraries (krfb
${X11_XTest_LIB}
@@ -120,25 +116,55 @@ if (X11_XTest_FOUND)
endif (X11_XTest_FOUND)
install (TARGETS krfb
${INSTALL_TARGETS_DEFAULT_ARGS}
${KDE_INSTALL_TARGETS_DEFAULT_ARGS}
)
if (BUILD_EXPERIMENTAL_TUBES_SUPPORT AND TELEPATHY_QT4_FOUND)
configure_file(org.freedesktop.Telepathy.Client.krfb_rfb_handler.service.in
org.freedesktop.Telepathy.Client.krfb_rfb_handler.service)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.freedesktop.Telepathy.Client.krfb_rfb_handler.service
DESTINATION ${DBUS_SERVICES_INSTALL_DIR})
#################################
kconfig_add_kcfg_files (krfbvm_SRCS
krfbconfig.kcfgc
)
install(FILES krfb_rfb_handler.client DESTINATION ${CMAKE_INSTALL_PREFIX}/share/telepathy/clients/)
endif (BUILD_EXPERIMENTAL_TUBES_SUPPORT AND TELEPATHY_QT4_FOUND)
ecm_qt_declare_logging_category(krfbvm_SRCS
HEADER krfbdebug.h
IDENTIFIER KRFB
CATEGORY_NAME krfb.krfb
DESCRIPTION "KRFB Application"
EXPORT KRFB
)
add_executable(krfb-virtualmonitor main-virtualmonitor.cpp ${krfbvm_SRCS} ${krfb_UI_SRCS}
rfbserver.cpp rfbclient.cpp rfbservermanager.cpp eventsmanager.cpp framebuffermanager.cpp sockethelpers.cpp)
target_link_libraries(krfb-virtualmonitor
krfbprivate
Qt::Gui
Qt::Network
KF6::ConfigGui
KF6::CoreAddons
KF6::I18n
KF6::Notifications
KF6::WindowSystem
)
install (TARGETS krfb-virtualmonitor
${KDE_INSTALL_TARGETS_DEFAULT_ARGS}
)
configure_file(org.kde.krfb.virtualmonitor.desktop.cmake ${CMAKE_CURRENT_BINARY_DIR}/org.kde.krfb.virtualmonitor.desktop @ONLY)
install (PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/org.kde.krfb.virtualmonitor.desktop
DESTINATION ${KDE_INSTALL_APPDIR}
)
########### install files ###############
install (PROGRAMS krfb.desktop
DESTINATION ${XDG_APPS_INSTALL_DIR}
install (PROGRAMS org.kde.krfb.desktop
DESTINATION ${KDE_INSTALL_APPDIR}
)
install(FILES org.kde.krfb.appdata.xml
DESTINATION ${KDE_INSTALL_METAINFODIR}
)
install (FILES krfb.notifyrc
DESTINATION ${DATA_INSTALL_DIR}/krfb
DESTINATION ${KDE_INSTALL_DATADIR}/krfb
)

View File

@@ -21,20 +21,33 @@
#include "connectiondialog.h"
#include <KIconLoader>
#include <KLocale>
#include <KStandardGuiItem>
#include <QCheckBox>
#include <QIcon>
#include <QtGui/QCheckBox>
#include <QtGui/QLabel>
#include <KLocalizedString>
#include <KStandardGuiItem>
#include <KConfigGroup>
#include <QDialogButtonBox>
#include <QPushButton>
#include <KGuiItem>
#include <QVBoxLayout>
template <typename UI>
ConnectionDialog<UI>::ConnectionDialog(QWidget *parent)
: KDialog(parent)
: QDialog(parent)
{
setCaption(i18n("New Connection"));
setButtons(Ok | Cancel);
setDefaultButton(Cancel);
setWindowTitle(i18n("New Connection"));
auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::Cancel);
auto mainWidget = new QWidget(this);
auto mainLayout = new QVBoxLayout;
setLayout(mainLayout);
mainLayout->addWidget(mainWidget);
QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok);
okButton->setDefault(true);
okButton->setShortcut(Qt::CTRL | Qt::Key_Return);
connect(buttonBox, &QDialogButtonBox::accepted, this, &ConnectionDialog<UI>::accept);
connect(buttonBox, &QDialogButtonBox::rejected, this, &ConnectionDialog<UI>::reject);
buttonBox->button(QDialogButtonBox::Cancel)->setDefault(true);
setModal(true);
setMinimumSize(500, 200);
@@ -42,17 +55,18 @@ ConnectionDialog<UI>::ConnectionDialog(QWidget *parent)
m_connectWidget = new QWidget(this);
m_ui.setupUi(m_connectWidget);
m_ui.pixmapLabel->setPixmap(KIcon("krfb").pixmap(128));
m_ui.pixmapLabel->setPixmap(QIcon::fromTheme(QStringLiteral("krfb")).pixmap(128));
KGuiItem accept = KStandardGuiItem::ok();
accept.setText(i18n("Accept Connection"));
setButtonGuiItem(Ok, accept);
KGuiItem::assign(okButton, accept);
KGuiItem refuse = KStandardGuiItem::cancel();
refuse.setText(i18n("Refuse Connection"));
setButtonGuiItem(Cancel, refuse);
KGuiItem::assign(buttonBox->button(QDialogButtonBox::Cancel), refuse);
setMainWidget(m_connectWidget);
mainLayout->addWidget(m_connectWidget);
mainLayout->addWidget(buttonBox);
}
//**********
@@ -66,23 +80,3 @@ void InvitationsConnectionDialog::setRemoteHost(const QString &host)
{
m_ui.remoteHost->setText(host);
}
//**********
#ifdef KRFB_WITH_TELEPATHY_TUBES
TubesConnectionDialog::TubesConnectionDialog(QWidget *parent)
: ConnectionDialog<Ui::TubesConnectionWidget>(parent)
{
}
void TubesConnectionDialog::setContactName(const QString & name)
{
QString txt = i18n("You have requested to share your desktop with %1. If you proceed, "
"you will allow the remote user to watch your desktop.", name);
m_ui.mainTextLabel->setText(txt);
}
#endif // KRFB_WITH_TELEPATHY_TUBES
#include "connectiondialog.moc"

View File

@@ -23,14 +23,14 @@
#define CONNECTIONDIALOG_H
#include "ui_connectionwidget.h"
#include <KDialog>
#include <QDialog>
template <typename UI>
class ConnectionDialog : public KDialog
class ConnectionDialog : public QDialog
{
public:
ConnectionDialog(QWidget *parent);
~ConnectionDialog() {};
explicit ConnectionDialog(QWidget *parent);
~ConnectionDialog() override {};
void setAllowRemoteControl(bool b);
bool allowRemoteControl();
@@ -59,24 +59,11 @@ class InvitationsConnectionDialog : public ConnectionDialog<Ui::ConnectionWidget
{
Q_OBJECT
public:
InvitationsConnectionDialog(QWidget *parent);
explicit InvitationsConnectionDialog(QWidget *parent);
void setRemoteHost(const QString & host);
};
//*********
#ifdef KRFB_WITH_TELEPATHY_TUBES
# include "ui_tubesconnectionwidget.h"
class TubesConnectionDialog : public ConnectionDialog<Ui::TubesConnectionWidget>
{
Q_OBJECT
public:
TubesConnectionDialog(QWidget *parent);
void setContactName(const QString & name);
};
#endif // KRFB_WITH_TELEPATHY_TUBES
#endif // CONNECTIONDIALOG_H

View File

@@ -24,177 +24,17 @@
#include "events.h"
#include <QtGui/QApplication>
#include <QtGui/QX11Info>
#include <QtGui/QDesktopWidget>
#include <KGlobal>
#include <X11/Xutil.h>
#include <X11/keysym.h>
#include <X11/extensions/XTest.h>
enum {
LEFTSHIFT = 1,
RIGHTSHIFT = 2,
ALTGR = 4
};
class EventData
EventHandler::EventHandler(QObject *parent)
: QObject(parent)
{
public:
EventData();
//keyboard
Display *dpy;
signed char modifiers[0x100];
KeyCode keycodes[0x100];
KeyCode leftShiftCode;
KeyCode rightShiftCode;
KeyCode altGrCode;
char modifierState;
//mouse
int buttonMask;
private:
void init();
};
K_GLOBAL_STATIC(EventData, data)
EventData::EventData()
{
init();
}
void EventData::init()
void EventHandler::setFrameBufferPlugin(const QSharedPointer<FrameBuffer> &frameBuffer)
{
dpy = QX11Info::display();
buttonMask = 0;
//initialize keycodes
KeySym key, *keymap;
int i, j, minkey, maxkey, syms_per_keycode;
memset(modifiers, -1, sizeof(modifiers));
XDisplayKeycodes(dpy, &minkey, &maxkey);
Q_ASSERT(minkey >= 8);
Q_ASSERT(maxkey < 256);
keymap = (KeySym *) XGetKeyboardMapping(dpy, minkey,
(maxkey - minkey + 1),
&syms_per_keycode);
Q_ASSERT(keymap);
for (i = minkey; i <= maxkey; i++) {
for (j = 0; j < syms_per_keycode; j++) {
key = keymap[(i-minkey)*syms_per_keycode+j];
if (key >= ' ' && key < 0x100 && i == XKeysymToKeycode(dpy, key)) {
keycodes[key] = i;
modifiers[key] = j;
}
}
}
leftShiftCode = XKeysymToKeycode(dpy, XK_Shift_L);
rightShiftCode = XKeysymToKeycode(dpy, XK_Shift_R);
altGrCode = XKeysymToKeycode(dpy, XK_Mode_switch);
XFree((char *)keymap);
fb = frameBuffer;
}
/* this function adjusts the modifiers according to mod (as from modifiers) and data->modifierState */
static void tweakModifiers(signed char mod, bool down)
QSharedPointer<FrameBuffer> EventHandler::frameBuffer()
{
bool isShift = data->modifierState & (LEFTSHIFT | RIGHTSHIFT);
if (mod < 0) {
return;
}
if (isShift && mod != 1) {
if (data->modifierState & LEFTSHIFT) {
XTestFakeKeyEvent(data->dpy, data->leftShiftCode,
down, CurrentTime);
}
if (data->modifierState & RIGHTSHIFT) {
XTestFakeKeyEvent(data->dpy, data->rightShiftCode,
down, CurrentTime);
}
}
if (!isShift && mod == 1) {
XTestFakeKeyEvent(data->dpy, data->leftShiftCode,
down, CurrentTime);
}
if ((data->modifierState & ALTGR) && mod != 2) {
XTestFakeKeyEvent(data->dpy, data->altGrCode,
!down, CurrentTime);
}
if (!(data->modifierState & ALTGR) && mod == 2) {
XTestFakeKeyEvent(data->dpy, data->altGrCode,
down, CurrentTime);
}
}
void EventHandler::handleKeyboard(bool down, rfbKeySym keySym)
{
#define ADJUSTMOD(sym,state) \
if(keySym==sym) { if(down) data->modifierState|=state; else data->modifierState&=~state; }
ADJUSTMOD(XK_Shift_L, LEFTSHIFT);
ADJUSTMOD(XK_Shift_R, RIGHTSHIFT);
ADJUSTMOD(XK_Mode_switch, ALTGR);
if (keySym >= ' ' && keySym < 0x100) {
KeyCode k;
if (down) {
tweakModifiers(data->modifiers[keySym], True);
}
k = data->keycodes[keySym];
if (k != NoSymbol) {
XTestFakeKeyEvent(data->dpy, k, down, CurrentTime);
}
if (down) {
tweakModifiers(data->modifiers[keySym], False);
}
} else {
KeyCode k = XKeysymToKeycode(data->dpy, keySym);
if (k != NoSymbol) {
XTestFakeKeyEvent(data->dpy, k, down, CurrentTime);
}
}
}
void EventHandler::handlePointer(int buttonMask, int x, int y)
{
QDesktopWidget *desktopWidget = QApplication::desktop();
int screen = desktopWidget->screenNumber();
if (screen < 0) {
screen = 0;
}
XTestFakeMotionEvent(data->dpy, screen, x, y, CurrentTime);
for (int i = 0; i < 5; i++) {
if ((data->buttonMask&(1 << i)) != (buttonMask&(1 << i))) {
XTestFakeButtonEvent(data->dpy,
i + 1,
(buttonMask&(1 << i)) ? True : False,
CurrentTime);
}
}
data->buttonMask = buttonMask;
return fb;
}

View File

@@ -25,13 +25,26 @@
#ifndef EVENTS_H
#define EVENTS_H
#include "framebuffer.h"
#include "rfb.h"
#include "krfbprivate_export.h"
class EventHandler
#include <QObject>
class KRFBPRIVATE_EXPORT EventHandler : public QObject
{
Q_OBJECT
public:
static void handleKeyboard(bool down, rfbKeySym key);
static void handlePointer(int buttonMask, int x, int y);
explicit EventHandler(QObject *parent = nullptr);
~EventHandler() override = default;
virtual void handleKeyboard(bool down, rfbKeySym key) = 0;
virtual void handlePointer(int buttonMask, int x, int y) = 0;
void setFrameBufferPlugin(const QSharedPointer<FrameBuffer> &frameBuffer);
QSharedPointer<FrameBuffer> frameBuffer();
private:
// Used to track framebuffer plugin which we need for xdp event plugin
QSharedPointer<FrameBuffer> fb;
};
#endif

76
krfb/eventsmanager.cpp Normal file
View File

@@ -0,0 +1,76 @@
/* This file is part of the KDE project
Copyright (C) 2009 Collabora Ltd <info@collabora.co.uk>
@author George Goldberg <george.goldberg@collabora.co.uk>
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 2 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; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "eventsmanager.h"
#include "eventsplugin.h"
#include "krfbconfig.h"
#include "rfbservermanager.h"
#include "krfbdebug.h"
#include <QGlobalStatic>
#include <KPluginFactory>
#include <KPluginMetaData>
class EventsManagerStatic
{
public:
EventsManager instance;
};
Q_GLOBAL_STATIC(EventsManagerStatic, eventsManagerStatic)
EventsManager::EventsManager()
{
const QVector<KPluginMetaData> plugins = KPluginMetaData::findPlugins(QStringLiteral("krfb/events"), {}, KPluginMetaData::AllowEmptyMetaData);
for (const KPluginMetaData &data : plugins) {
const KPluginFactory::Result<EventsPlugin> result = KPluginFactory::instantiatePlugin<EventsPlugin>(data);
if (result.plugin) {
m_plugins.insert(data.pluginId(), result.plugin);
qCDebug(KRFB) << "Loaded plugin with name " << data.pluginId();
} else {
qCDebug(KRFB) << "unable to load plugin for " << data.fileName() << result.errorString;
}
}
}
EventsManager::~EventsManager() = default;
EventsManager *EventsManager::instance()
{
return &eventsManagerStatic->instance;
}
QSharedPointer<EventHandler> EventsManager::eventHandler()
{
for (auto it = m_plugins.cbegin(); it != m_plugins.constEnd(); it++) {
QSharedPointer<EventHandler> eventHandler(it.value()->eventHandler());
if (eventHandler) {
eventHandler->setFrameBufferPlugin(RfbServerManager::instance()->framebuffer());
return eventHandler;
}
}
// No valid events plugin found.
qCDebug(KRFB) << "No valid event handlers found. returning null.";
return QSharedPointer<EventHandler>();
}

View File

@@ -18,31 +18,43 @@
Boston, MA 02110-1301, USA.
*/
#ifndef KRFB_FRAMEBUFFER_X11_X11FRAMEBUFFERPLUGIN_H
#define KRFB_FRAMEBUFFER_X11_X11FRAMEBUFFERPLUGIN_H
#ifndef KRFB_EVENTSMANAGER_H
#define KRFB_EVENTSMANAGER_H
#include "framebufferplugin.h"
#include "events.h"
#include <kdemacros.h>
#include "krfbprivate_export.h"
#include <QtGui/QWidget>
#include <QtCore/QMap>
#include <QtCore/QObject>
#include <QtCore/QSharedPointer>
#include <QtCore/QWeakPointer>
class FrameBuffer;
#include <QWidget>
class X11FrameBufferPlugin : public FrameBufferPlugin
class EventsPlugin;
class KPluginFactory;
class KRFBPRIVATE_EXPORT EventsManager : public QObject
{
Q_OBJECT
friend class EventsManagerStatic;
public:
X11FrameBufferPlugin(QObject *parent, const QVariantList &args);
virtual ~X11FrameBufferPlugin();
static EventsManager *instance();
virtual FrameBuffer *frameBuffer(WId id);
~EventsManager() override;
QSharedPointer<EventHandler> eventHandler();
private:
Q_DISABLE_COPY(X11FrameBufferPlugin)
Q_DISABLE_COPY(EventsManager)
EventsManager();
QMap<QString, EventsPlugin *> m_plugins;
QList<QWeakPointer<EventHandler> > m_eventHandlers;
};
#endif // Header guard

View File

@@ -1,6 +1,6 @@
/* This file is part of the KDE project
Copyright (C) 2009 Collabora Ltd <info@collabora.co.uk>
@author George Goldberg <george.goldberg@collabora.co.uk>
Copyright (C) 2016 Oleg Chernovskiy <kanedias@xaker.ru>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
@@ -18,30 +18,15 @@
Boston, MA 02110-1301, USA.
*/
#include "x11framebufferplugin.h"
#include "eventsplugin.h"
#include "x11framebuffer.h"
#include "events.h"
#include <KGenericFactory>
X11FrameBufferPlugin::X11FrameBufferPlugin(QObject *parent, const QVariantList &args)
: FrameBufferPlugin(parent, args)
EventsPlugin::EventsPlugin(QObject *parent, const QVariantList &)
: QObject(parent)
{
}
X11FrameBufferPlugin::~X11FrameBufferPlugin()
EventsPlugin::~EventsPlugin()
{
}
FrameBuffer *X11FrameBufferPlugin::frameBuffer(WId id)
{
return new X11FrameBuffer(id);
}
K_PLUGIN_FACTORY(factory, registerPlugin<X11FrameBufferPlugin>();) \
K_EXPORT_PLUGIN(factory("krfb_framebuffer_x11"))
#include "x11framebufferplugin.moc"

View File

@@ -18,31 +18,25 @@
Boston, MA 02110-1301, USA.
*/
#ifndef KRFB_FRAMEBUFFER_QT_QTFRAMEBUFFERPLUGIN_H
#define KRFB_FRAMEBUFFER_QT_QTFRAMEBUFFERPLUGIN_H
#ifndef LIB_KRFB_EVENTSPLUGIN_H
#define LIB_KRFB_EVENTSPLUGIN_H
#include "framebufferplugin.h"
#include "krfbprivate_export.h"
#include <kdemacros.h>
#include <QtCore/QVariantList>
#include <QWidget>
#include <QtGui/QWidget>
class EventHandler;
class FrameBuffer;
class QtFrameBufferPlugin : public FrameBufferPlugin
class KRFBPRIVATE_EXPORT EventsPlugin : public QObject
{
Q_OBJECT
public:
QtFrameBufferPlugin(QObject *parent, const QVariantList &args);
virtual ~QtFrameBufferPlugin();
EventsPlugin(QObject *parent, const QVariantList &args);
~EventsPlugin() override;
virtual FrameBuffer *frameBuffer(WId id);
private:
Q_DISABLE_COPY(QtFrameBufferPlugin)
virtual EventHandler *eventHandler() = 0;
};
#endif // Header guard

View File

@@ -9,13 +9,12 @@
#include "framebuffer.h"
#include "config-krfb.h"
#include <X11/Xutil.h>
#include <config-krfb.h>
#include <QCursor>
FrameBuffer::FrameBuffer(WId id, QObject *parent)
: QObject(parent), win(id)
FrameBuffer::FrameBuffer(QObject *parent)
: QObject(parent)
{
}
@@ -50,6 +49,12 @@ void FrameBuffer::getServerFormat(rfbPixelFormat &)
{
}
QVariant FrameBuffer::customProperty(const QString &property) const
{
Q_UNUSED(property)
return QVariant();
}
int FrameBuffer::depth()
{
return 32;
@@ -68,6 +73,7 @@ void FrameBuffer::stopMonitor()
{
}
#include "framebuffer.moc"
QPoint FrameBuffer::cursorPosition()
{
return QCursor::pos();
}

View File

@@ -12,25 +12,26 @@
#include "rfb.h"
#include <kdemacros.h>
#include "krfbprivate_export.h"
#include <QtCore/QObject>
#include <QtCore/QRect>
#include <QtCore/QList>
#include <QObject>
#include <QRect>
#include <QList>
#include <QVariant>
#include <QWidget>
#include <QtGui/QWidget>
class FrameBuffer;
/**
@author Alessandro Praduroux <pradu@pradu.it>
*/
class KDE_EXPORT FrameBuffer : public QObject
class KRFBPRIVATE_EXPORT FrameBuffer : public QObject
{
Q_OBJECT
public:
explicit FrameBuffer(WId id, QObject *parent = 0);
explicit FrameBuffer(QObject *parent = nullptr);
virtual ~FrameBuffer();
~FrameBuffer() override;
char *data();
@@ -41,12 +42,17 @@ public:
virtual int depth();
virtual void startMonitor();
virtual void stopMonitor();
virtual QPoint cursorPosition();
virtual void getServerFormat(rfbPixelFormat &format);
virtual QVariant customProperty(const QString &property) const;
Q_SIGNALS:
void frameBufferChanged();
protected:
WId win;
char *fb;
char *fb = nullptr;
QList<QRect> tiles;
private:

View File

@@ -22,12 +22,14 @@
#include "framebufferplugin.h"
#include "krfbconfig.h"
#include "krfbdebug.h"
#include <KDebug>
#include <KGlobal>
#include <KServiceTypeTrader>
#include <QGuiApplication>
#include <QGlobalStatic>
#include <KPluginFactory>
#include <KPluginMetaData>
#include <QtCore/QSharedPointer>
class FrameBufferManagerStatic
{
@@ -35,100 +37,68 @@ public:
FrameBufferManager instance;
};
K_GLOBAL_STATIC(FrameBufferManagerStatic, frameBufferManagerStatic)
Q_GLOBAL_STATIC(FrameBufferManagerStatic, frameBufferManagerStatic)
FrameBufferManager::FrameBufferManager()
{
kDebug();
loadPlugins();
}
FrameBufferManager::~FrameBufferManager()
{
kDebug();
}
FrameBufferManager *FrameBufferManager::instance()
{
kDebug();
return &frameBufferManagerStatic->instance;
}
void FrameBufferManager::loadPlugins()
{
kDebug();
// Load the all the plugin factories here, for use later.
KService::List offers = KServiceTypeTrader::self()->query("krfb/framebuffer");
KService::List::const_iterator iter;
for (iter = offers.constBegin(); iter < offers.constEnd(); ++iter) {
QString error;
KService::Ptr service = *iter;
KPluginFactory *factory = KPluginLoader(service->library()).factory();
if (!factory) {
kWarning() << "KPluginFactory could not load the plugin:" << service->library();
continue;
}
FrameBufferPlugin *plugin = factory->create<FrameBufferPlugin>(this);
if (plugin) {
kDebug() << "Loaded plugin:" << service->name();
m_plugins.insert(service->library(), plugin);
const auto platformFilter = [] (const KPluginMetaData &pluginData) {
return pluginData.value(QStringLiteral("X-KDE-OnlyShowOnQtPlatforms"), QStringList()).contains(QGuiApplication::platformName());
};
const QVector<KPluginMetaData> plugins = KPluginMetaData::findPlugins(QStringLiteral("krfb/framebuffer"), platformFilter, KPluginMetaData::AllowEmptyMetaData);
for (const KPluginMetaData &data : plugins) {
const KPluginFactory::Result<FrameBufferPlugin> result = KPluginFactory::instantiatePlugin<FrameBufferPlugin>(data);
if (result.plugin) {
m_plugins.insert(data.pluginId(), result.plugin);
qCDebug(KRFB) << "Loaded plugin with name " << data.pluginId();
} else {
kDebug() << error;
qCDebug(KRFB) << "unable to load plugin for " << data.fileName() << result.errorString;
}
}
}
QSharedPointer<FrameBuffer> FrameBufferManager::frameBuffer(WId id)
FrameBufferManager::~FrameBufferManager()
{
kDebug();
}
FrameBufferManager *FrameBufferManager::instance()
{
return &frameBufferManagerStatic->instance;
}
QSharedPointer<FrameBuffer> FrameBufferManager::frameBuffer(WId id, const QVariantMap &args)
{
// See if there is still an existing framebuffer to this WId.
if (m_frameBuffers.contains(id)) {
QWeakPointer<FrameBuffer> weakFrameBuffer = m_frameBuffers.value(id);
if (weakFrameBuffer) {
kDebug() << "Found cached frame buffer.";
//qDebug() << "Found cached frame buffer.";
return weakFrameBuffer.toStrongRef();
} else {
kDebug() << "Found deleted cached frame buffer. Don't use.";
//qDebug() << "Found deleted cached frame buffer. Don't use.";
m_frameBuffers.remove(id);
}
}
// We don't already have that frame buffer.
QMap<QString, FrameBufferPlugin *>::const_iterator iter = m_plugins.constBegin();
while (iter != m_plugins.constEnd()) {
if (iter.key() == KrfbConfig::preferredFrameBufferPlugin()) {
kDebug() << "Using FrameBuffer:" << KrfbConfig::preferredFrameBufferPlugin();
QSharedPointer<FrameBuffer> frameBuffer(iter.value()->frameBuffer(id));
if (frameBuffer) {
m_frameBuffers.insert(id, frameBuffer.toWeakRef());
return frameBuffer;
}
if (auto preferredPlugin = m_plugins.value(KrfbConfig::preferredFrameBufferPlugin())) {
if (auto frameBuffer = QSharedPointer<FrameBuffer>(preferredPlugin->frameBuffer(args))) {
qCDebug(KRFB) << "Using FrameBuffer:" << KrfbConfig::preferredFrameBufferPlugin();
m_frameBuffers.insert(id, frameBuffer.toWeakRef());
return frameBuffer;
}
}
++iter;
// We don't already have that frame buffer.
for (auto it = m_plugins.cbegin(); it != m_plugins.constEnd(); it++) {
QSharedPointer<FrameBuffer> frameBuffer(it.value()->frameBuffer(args));
if (frameBuffer) {
qCDebug(KRFB) << "Using FrameBuffer:" << it.key();
m_frameBuffers.insert(id, frameBuffer.toWeakRef());
return frameBuffer;
}
}
// No valid framebuffer plugin found.
kDebug() << "No valid framebuffer found. returning null.";
qCDebug(KRFB) << "No valid framebuffer found. returning null.";
return QSharedPointer<FrameBuffer>();
}
#include "framebuffermanager.moc"

View File

@@ -23,19 +23,19 @@
#include "framebuffer.h"
#include <kdemacros.h>
#include "krfbprivate_export.h"
#include <QtCore/QMap>
#include <QtCore/QObject>
#include <QtCore/QSharedPointer>
#include <QtCore/QWeakPointer>
#include <QMap>
#include <QObject>
#include <QSharedPointer>
#include <QWeakPointer>
#include <QtGui/QWidget>
#include <QWidget>
class FrameBufferPlugin;
class KPluginFactory;
class KDE_EXPORT FrameBufferManager : public QObject
class KRFBPRIVATE_EXPORT FrameBufferManager : public QObject
{
Q_OBJECT
friend class FrameBufferManagerStatic;
@@ -43,17 +43,15 @@ class KDE_EXPORT FrameBufferManager : public QObject
public:
static FrameBufferManager *instance();
virtual ~FrameBufferManager();
~FrameBufferManager() override;
QSharedPointer<FrameBuffer> frameBuffer(WId id);
QSharedPointer<FrameBuffer> frameBuffer(WId id, const QVariantMap &args);
private:
Q_DISABLE_COPY(FrameBufferManager)
FrameBufferManager();
void loadPlugins();
QMap<QString, FrameBufferPlugin *> m_plugins;
QMap<WId, QWeakPointer<FrameBuffer> > m_frameBuffers;
};

View File

@@ -30,7 +30,3 @@ FrameBufferPlugin::FrameBufferPlugin(QObject *parent, const QVariantList &)
FrameBufferPlugin::~FrameBufferPlugin()
{
}
#include "framebufferplugin.moc"

View File

@@ -21,25 +21,24 @@
#ifndef LIB_KRFB_FRAMEBUFFERPLUGIN_H
#define LIB_KRFB_FRAMEBUFFERPLUGIN_H
#include <kdemacros.h>
#include "krfbprivate_export.h"
#include <QtCore/QVariantList>
#include <QVariantList>
#include <QWidget>
#include <QtGui/QWidget>
class FrameBuffer;
class KDE_EXPORT FrameBufferPlugin : public QObject
class KRFBPRIVATE_EXPORT FrameBufferPlugin : public QObject
{
Q_OBJECT
public:
FrameBufferPlugin(QObject *parent, const QVariantList &args);
virtual ~FrameBufferPlugin();
explicit FrameBufferPlugin(QObject *parent, const QVariantList &args);
~FrameBufferPlugin() override;
virtual FrameBuffer *frameBuffer(WId id) = 0;
virtual FrameBuffer *frameBuffer(const QVariantMap &args) = 0;
};
#endif // Header guard

View File

@@ -1,120 +0,0 @@
/***************************************************************************
Copyright 2002 Tim Jansen <tim@tjansen.de>
Copyright 2002 Stefan Taferner <taferner@kde.org>
***************************************************************************/
/***************************************************************************
* *
* 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 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include "invitation.h"
#include <KConfigGroup>
#include <KDebug>
#include <KRandom>
#include <KStringHandler>
// a random string that doesn't contain i, I, o, O, 1, 0
// based on KRandom::randomString()
static QString readableRandomString(int length)
{
QString str;
while (length) {
int r = KRandom::random() % 62;
r += 48;
if (r > 57) {
r += 7;
}
if (r > 90) {
r += 6;
}
char c = char(r);
if ((c == 'i') ||
(c == 'I') ||
(c == '1') ||
(c == 'o') ||
(c == 'O') ||
(c == '0')) {
continue;
}
str += c;
length--;
}
return str;
}
Invitation::Invitation()
{
m_password = readableRandomString(4) + '-' + readableRandomString(3);
m_creationTime = QDateTime::currentDateTime();
m_expirationTime = QDateTime::currentDateTime().addSecs(INVITATION_DURATION);
}
Invitation::Invitation(const Invitation &x)
: m_password(x.m_password), m_creationTime(x.m_creationTime), m_expirationTime(x.m_expirationTime)
{
}
Invitation::Invitation(const KConfigGroup &config)
{
m_password = KStringHandler::obscure(config.readEntry("password", QString()));
kDebug() << "read: " << config.readEntry("password", QString()) << " = " << m_password;
m_creationTime = config.readEntry("creation", QDateTime());
m_expirationTime = config.readEntry("expiration", QDateTime());
}
Invitation::~Invitation()
{
}
Invitation &Invitation::operator= (const Invitation &x)
{
m_password = x.m_password;
m_creationTime = x.m_creationTime;
m_expirationTime = x.m_expirationTime;
return *this;
}
void Invitation::save(KConfigGroup &config) const
{
config.writeEntry("password", KStringHandler::obscure(m_password));
config.writeEntry("creation", m_creationTime);
config.writeEntry("expiration", m_expirationTime);
}
QString Invitation::password() const
{
return m_password;
}
QDateTime Invitation::expirationTime() const
{
return m_expirationTime;
}
QDateTime Invitation::creationTime() const
{
return m_creationTime;
}
bool Invitation::isValid() const
{
return m_expirationTime > QDateTime::currentDateTime();
}
bool Invitation::operator ==(const Invitation &ot)
{
return m_creationTime == ot.m_creationTime && m_password == ot.m_password;
}

View File

@@ -1,53 +0,0 @@
/***************************************************************************
invitation.h
-------------------
begin : Sat Mar 30 2002
copyright : (C) 2002 by Tim Jansen
email : tim@tjansen.de
***************************************************************************/
/***************************************************************************
* *
* 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 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef INVITATION_H
#define INVITATION_H
#include <KApplication>
#include <KConfig>
#include <QtCore/QDateTime>
#include <QtCore/QObject>
const int INVITATION_DURATION = 60 * 60;
class Invitation
{
public:
Invitation();
~Invitation();
Invitation(const KConfigGroup &config);
Invitation(const Invitation &x);
Invitation &operator= (const Invitation &x);
bool operator == (const Invitation &ot);
QString password() const;
QDateTime expirationTime() const;
QDateTime creationTime() const;
bool isValid() const;
void save(KConfigGroup &config) const;
private:
QString m_password;
QDateTime m_creationTime;
QDateTime m_expirationTime;
};
#endif

View File

@@ -1,130 +0,0 @@
/* This file is part of the KDE project
Copyright (C) 2007 Alessandro Praduroux <pradu@pradu.it>
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 2 of the License, or (at your option) any later version.
*/
#include "invitationmanager.h"
#include "invitationmanager.moc"
#include <KConfigGroup>
#include <KConfig>
#include <KGlobal>
#include <QtCore/QTimer>
class InvitationManagerPrivate
{
public:
InvitationManager instance;
};
K_GLOBAL_STATIC(InvitationManagerPrivate, invitationManagerPrivate)
InvitationManager *InvitationManager::self()
{
return &invitationManagerPrivate->instance;
}
InvitationManager::InvitationManager()
{
loadInvitations();
QTimer *refreshTimer = new QTimer(this);
connect(refreshTimer, SIGNAL(timeout()), SLOT(loadInvitations()));
refreshTimer->start(1000 * 60);
}
InvitationManager::~InvitationManager()
{
}
void InvitationManager::invalidateOldInvitations()
{
int invNum = invitationList.size();
while (invNum--) {
if (!invitationList[invNum].isValid()) {
invitationList.removeAt(invNum);
}
}
saveInvitations();
}
void InvitationManager::loadInvitations()
{
int invNum = invitationList.size();
KSharedConfigPtr conf = KGlobal::config();
KConfigGroup invitationConfig(conf, "Invitations");
int numInv = invitationConfig.readEntry("invitation_num", 0);
invitationList.clear();
for (int i = 0; i < numInv; i++) {
KConfigGroup ic(conf, QString("Invitation_%1").arg(i));
invitationList.append(Invitation(ic));
}
invalidateOldInvitations();
if (numInv != invNum) {
emit invitationNumChanged(invitationList.size());
}
}
Invitation InvitationManager::addInvitation()
{
Invitation i;
invitationList.append(i);
emit invitationNumChanged(invitationList.size());
saveInvitations();
return i;
}
const QList< Invitation > & InvitationManager::invitations()
{
return invitationList;
}
void InvitationManager::saveInvitations()
{
KSharedConfigPtr conf = KGlobal::config();
KConfigGroup invitationConfig(conf, "Invitations");
int invNum = invitationList.size();
invitationConfig.writeEntry("invitation_num", invNum);
for (int i = 0; i < invNum; i++) {
KConfigGroup ic(conf, QString("Invitation_%1").arg(i));
invitationList[i].save(ic);
}
conf->sync();
}
int InvitationManager::activeInvitations()
{
invalidateOldInvitations();
return invitationList.size();
}
void InvitationManager::removeInvitation(const Invitation &inv)
{
invitationList.removeAll(inv);
saveInvitations();
emit invitationNumChanged(invitationList.size());
}
void InvitationManager::removeAllInvitations()
{
invitationList.clear();
saveInvitations();
emit invitationNumChanged(invitationList.size());
}

View File

@@ -1,58 +0,0 @@
/* This file is part of the KDE project
Copyright (C) 2007 Alessandro Praduroux <pradu@pradu.it>
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 2 of the License, or (at your option) any later version.
*/
#ifndef INVITATIONMANAGER_H
#define INVITATIONMANAGER_H
#include "invitation.h"
#include <QtCore/QList>
#include <QtCore/QObject>
class InvitationManagerPrivate;
/**
@author Alessandro Praduroux <pradu@pradu.it>
*/
class InvitationManager : public QObject
{
Q_OBJECT
friend class InvitationManagerPrivate;
public:
static InvitationManager *self();
~InvitationManager();
Invitation addInvitation();
int activeInvitations();
void removeInvitation(const Invitation &inv);
void removeAllInvitations();
const QList<Invitation> &invitations();
signals:
void invitationNumChanged(int);
public Q_SLOTS:
void loadInvitations();
void saveInvitations();
private:
void invalidateOldInvitations();
InvitationManager();
static InvitationManager *_self;
QList<Invitation> invitationList;
};
#endif

View File

@@ -18,95 +18,96 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "rfb.h"
#include "invitationsrfbclient.h"
#include "invitationmanager.h"
#include "invitationsrfbserver.h"
#include "krfbconfig.h"
#include "sockethelpers.h"
#include "connectiondialog.h"
#include "krfbdebug.h"
#include <KNotification>
#include <KLocale>
#include <KLocalizedString>
bool InvitationsRfbClient::checkPassword(const QByteArray & encryptedPassword)
#include <QSocketNotifier>
#include <poll.h>
#include <KConfigGroup>
struct PendingInvitationsRfbClient::Private
{
bool allowUninvited = KrfbConfig::allowUninvitedConnections();
QByteArray password = KrfbConfig::uninvitedConnectionPassword().toLocal8Bit();
Private(rfbClientPtr client) :
client(client),
askOnConnect(true)
{}
bool authd = false;
kDebug() << "about to start autentication";
rfbClientPtr client;
QSocketNotifier *notifier = nullptr;
bool askOnConnect;
};
if (allowUninvited) {
authd = vncAuthCheckPassword(password, encryptedPassword);
}
static void clientGoneHookNoop(rfbClientPtr cl) { Q_UNUSED(cl); }
if (!authd) {
QList<Invitation> invlist = InvitationManager::self()->invitations();
foreach(const Invitation & it, invlist) {
kDebug() << "checking password";
if (vncAuthCheckPassword(it.password().toLocal8Bit(), encryptedPassword)
&& it.isValid())
{
authd = true;
InvitationManager::self()->removeInvitation(it);
break;
}
}
}
if (!authd) {
if (InvitationManager::self()->invitations().size() > 0) {
KNotification::event("InvalidPasswordInvitations",
i18n("Failed login attempt from %1: wrong password", name()));
} else {
KNotification::event("InvalidPassword",
i18n("Failed login attempt from %1: wrong password", name()));
}
return false;
}
return true;
PendingInvitationsRfbClient::PendingInvitationsRfbClient(rfbClientPtr client, QObject *parent) :
PendingRfbClient(client, parent),
d(new Private(client))
{
d->client->clientGoneHook = clientGoneHookNoop;
}
PendingInvitationsRfbClient::~PendingInvitationsRfbClient()
{
delete d;
}
void PendingInvitationsRfbClient::processNewClient()
{
QString host = peerAddress(m_rfbClient->sock) + ":" + QString::number(peerPort(m_rfbClient->sock));
bool allowUninvited = KrfbConfig::allowUninvitedConnections();
QString host = peerAddress(m_rfbClient->sock) + QLatin1Char(':') + QString::number(peerPort(m_rfbClient->sock));
if (!allowUninvited && InvitationManager::self()->activeInvitations() == 0) {
KNotification::event("UnexpectedConnection",
i18n("Refused uninvited connection attempt from %1", host));
reject();
} else if (!KrfbConfig::askOnConnect()) {
KNotification::event("NewConnectionAutoAccepted",
if (d->askOnConnect == false) {
KNotification::event(QStringLiteral("NewConnectionAutoAccepted"),
i18n("Accepted connection from %1", host));
accept(new InvitationsRfbClient(m_rfbClient, parent()));
} else {
KNotification::event("NewConnectionOnHold",
KNotification::event(QStringLiteral("NewConnectionOnHold"),
i18n("Received connection from %1, on hold (waiting for confirmation)",
host));
InvitationsConnectionDialog *dialog = new InvitationsConnectionDialog(0);
auto dialog = new InvitationsConnectionDialog(nullptr);
dialog->setRemoteHost(host);
dialog->setAllowRemoteControl(KrfbConfig::allowDesktopControl());
connect(dialog, SIGNAL(okClicked()), SLOT(dialogAccepted()));
connect(dialog, SIGNAL(cancelClicked()), SLOT(reject()));
connect(dialog, &InvitationsConnectionDialog::accepted, this, &PendingInvitationsRfbClient::dialogAccepted);
connect(dialog, &InvitationsConnectionDialog::rejected, this, &PendingInvitationsRfbClient::reject);
dialog->show();
}
}
bool PendingInvitationsRfbClient::checkPassword(const QByteArray & encryptedPassword)
{
qCDebug(KRFB) << "about to start authentication";
if(InvitationsRfbServer::instance->allowUnattendedAccess() && vncAuthCheckPassword(
InvitationsRfbServer::instance->unattendedPassword().toLocal8Bit(),
encryptedPassword) ) {
d->askOnConnect = false;
return true;
}
return vncAuthCheckPassword(
InvitationsRfbServer::instance->desktopPassword().toLocal8Bit(),
encryptedPassword);
}
void PendingInvitationsRfbClient::dialogAccepted()
{
InvitationsConnectionDialog *dialog = qobject_cast<InvitationsConnectionDialog *>(sender());
auto dialog = qobject_cast<InvitationsConnectionDialog *>(sender());
Q_ASSERT(dialog);
InvitationsRfbClient *client = new InvitationsRfbClient(m_rfbClient, parent());
auto client = new InvitationsRfbClient(m_rfbClient, parent());
client->setControlEnabled(dialog->allowRemoteControl());
accept(client);
}
#include "invitationsrfbclient.moc"

View File

@@ -23,11 +23,8 @@
class InvitationsRfbClient : public RfbClient
{
public:
InvitationsRfbClient(rfbClientPtr client, QObject* parent = 0)
explicit InvitationsRfbClient(rfbClientPtr client, QObject* parent = nullptr)
: RfbClient(client, parent) {}
protected:
virtual bool checkPassword(const QByteArray & encryptedPassword);
};
@@ -35,14 +32,19 @@ class PendingInvitationsRfbClient : public PendingRfbClient
{
Q_OBJECT
public:
PendingInvitationsRfbClient(rfbClientPtr client, QObject *parent = 0)
: PendingRfbClient(client, parent) {}
explicit PendingInvitationsRfbClient(rfbClientPtr client, QObject *parent = nullptr);
~PendingInvitationsRfbClient() override;
protected Q_SLOTS:
virtual void processNewClient();
void processNewClient() override;
bool checkPassword(const QByteArray & encryptedPassword) override;
private Q_SLOTS:
void dialogAccepted();
private:
struct Private;
Private* const d;
};
#endif // INVITATIONSRFBCLIENT_H

View File

@@ -21,24 +21,123 @@
#include "invitationsrfbserver.h"
#include "invitationsrfbclient.h"
#include "krfbconfig.h"
#include "rfbservermanager.h"
#include <QtCore/QTimer>
#include <QtGui/QApplication>
#include <QtNetwork/QHostInfo>
#include <KNotification>
#include <KLocale>
#include <KMessageBox>
#include <KUser>
#include <DNSSD/PublicService>
#include "krfbdebug.h"
#include <QTimer>
#include <QApplication>
#include <QHostInfo>
#include <QRandomGenerator>
#include <KLocalizedString>
#include <KUser>
#include <KStringHandler>
#include <KWallet>
#include <KDNSSD/PublicService>
using KWallet::Wallet;
// used for KWallet folder name
static const QString s_krfbFolderName(QStringLiteral("krfb"));
//static
InvitationsRfbServer *InvitationsRfbServer::instance;
//static
void InvitationsRfbServer::init()
{
InvitationsRfbServer *server;
server = new InvitationsRfbServer;
server->setListeningPort(KrfbConfig::port());
server->setListeningAddress("0.0.0.0"); // Listen on all available network addresses
server->setPasswordRequired(true);
QTimer::singleShot(0, server, SLOT(startAndCheck()));
instance = new InvitationsRfbServer;
instance->m_publicService = new KDNSSD::PublicService(
i18n("%1@%2 (shared desktop)",
KUser().loginName(),
QHostInfo::localHostName()),
QStringLiteral("_rfb._tcp"),
KrfbConfig::port());
instance->setListeningAddress("0.0.0.0");
instance->setListeningPort(KrfbConfig::port());
instance->setPasswordRequired(true);
instance->m_wallet = nullptr;
if (KrfbConfig::noWallet()) {
instance->walletOpened(false);
} else {
instance->openKWallet();
}
}
const QString& InvitationsRfbServer::desktopPassword() const
{
return m_desktopPassword;
}
void InvitationsRfbServer::setDesktopPassword(const QString& password)
{
m_desktopPassword = password;
// this is called from GUI every time desktop password is edited.
// make sure we save settings immediately each time
saveSecuritySettings();
}
const QString& InvitationsRfbServer::unattendedPassword() const
{
return m_unattendedPassword;
}
void InvitationsRfbServer::setUnattendedPassword(const QString& password)
{
m_unattendedPassword = password;
// this is called from GUI every time unattended password is edited.
// make sure we save settings immediately each time
saveSecuritySettings();
}
bool InvitationsRfbServer::allowUnattendedAccess() const
{
return m_allowUnattendedAccess;
}
bool InvitationsRfbServer::start()
{
if(RfbServer::start()) {
if(KrfbConfig::publishService())
m_publicService->publishAsync();
return true;
}
return false;
}
void InvitationsRfbServer::stop()
{
if(m_publicService->isPublished())
m_publicService->stop();
RfbServer::stop();
}
void InvitationsRfbServer::toggleUnattendedAccess(bool allow)
{
m_allowUnattendedAccess = allow;
// this is called from GUI every time unattended access is toggled.
// make sure we save settings immediately each time
saveSecuritySettings();
}
InvitationsRfbServer::InvitationsRfbServer()
{
m_desktopPassword = readableRandomString(4) + QLatin1Char('-') + readableRandomString(3);
m_unattendedPassword = readableRandomString(4) + QLatin1Char('-') + readableRandomString(3);
KConfigGroup krfbConfig(KSharedConfig::openConfig(),QStringLiteral("Security"));
m_allowUnattendedAccess = krfbConfig.readEntry(
"allowUnattendedAccess", QVariant(false)).toBool();
}
InvitationsRfbServer::~InvitationsRfbServer()
{
InvitationsRfbServer::stop(); // calling virtual funcs in destructor is bad
saveSecuritySettings();
// ^^ also saves passwords in kwallet,
// do it before closing kwallet
if (!KrfbConfig::noWallet() && m_wallet) {
closeKWallet();
}
}
PendingRfbClient* InvitationsRfbServer::newClient(rfbClientPtr client)
@@ -46,26 +145,116 @@ PendingRfbClient* InvitationsRfbServer::newClient(rfbClientPtr client)
return new PendingInvitationsRfbClient(client, this);
}
void InvitationsRfbServer::startAndCheck()
void InvitationsRfbServer::openKWallet()
{
if (!start()) {
KMessageBox::error(0, i18n("Failed to start the krfb server. Invitation-based sharing "
"will not work. Try setting another port in the settings and "
"restart krfb."));
} else {
//publish service
if (KrfbConfig::publishService()) {
DNSSD::PublicService *service = new DNSSD::PublicService(i18n("%1@%2 (shared desktop)",
KUser().loginName(),
QHostInfo::localHostName()),
"_rfb._tcp",
listeningPort());
service->publishAsync();
}
//disconnect when qApp quits
connect(qApp, SIGNAL(aboutToQuit()), this, SLOT(stop()));
m_wallet = Wallet::openWallet(Wallet::NetworkWallet(), 0, Wallet::Asynchronous);
if (m_wallet) {
connect(instance->m_wallet, &KWallet::Wallet::walletOpened,
this, &InvitationsRfbServer::walletOpened);
}
}
#include "invitationsrfbserver.moc"
void InvitationsRfbServer::closeKWallet()
{
if (m_wallet && m_wallet->isOpen()) {
delete m_wallet; // closes the wallet
m_wallet = nullptr;
}
}
void InvitationsRfbServer::walletOpened(bool opened)
{
QString desktopPassword;
QString unattendedPassword;
Q_ASSERT(m_wallet);
if (opened && m_wallet->hasFolder(s_krfbFolderName) && m_wallet->setFolder(s_krfbFolderName) ) {
if (m_wallet->readPassword(QStringLiteral("desktopSharingPassword"), desktopPassword) == 0 &&
!desktopPassword.isEmpty()) {
m_desktopPassword = desktopPassword;
Q_EMIT passwordChanged(m_desktopPassword);
}
if(m_wallet->readPassword(QStringLiteral("unattendedAccessPassword"), unattendedPassword) == 0 &&
!unattendedPassword.isEmpty()) {
m_unattendedPassword = unattendedPassword;
}
} else {
qCDebug(KRFB) << "Could not open KWallet, Falling back to config file";
KConfigGroup krfbConfig(KSharedConfig::openConfig(),QStringLiteral("Security"));
desktopPassword = KStringHandler::obscure(krfbConfig.readEntry(
"desktopPassword", QString()));
if(!desktopPassword.isEmpty()) {
m_desktopPassword = desktopPassword;
Q_EMIT passwordChanged(m_desktopPassword);
}
unattendedPassword = KStringHandler::obscure(krfbConfig.readEntry(
"unattendedPassword", QString()));
if(!unattendedPassword.isEmpty()) {
m_unattendedPassword = unattendedPassword;
}
}
}
// a random string that doesn't contain i, I, o, O, 1, l, 0
// based on KRandom::randomString()
QString InvitationsRfbServer::readableRandomString(int length)
{
QString str;
while (length) {
int r = QRandomGenerator::global()->bounded(62);
r += 48;
if (r > 57) {
r += 7;
}
if (r > 90) {
r += 6;
}
char c = char(r);
if ((c == 'i') ||
(c == 'I') ||
(c == '1') ||
(c == 'l') ||
(c == 'o') ||
(c == 'O') ||
(c == '0')) {
continue;
}
str += QLatin1Char(c);
length--;
}
return str;
}
// one place to deal with all security configuration
void InvitationsRfbServer::saveSecuritySettings()
{
KConfigGroup secConfigGroup(KSharedConfig::openConfig(), QStringLiteral("Security"));
secConfigGroup.writeEntry("allowUnattendedAccess", m_allowUnattendedAccess);
if (KrfbConfig::noWallet()) {
// save passwords in config file only if not using kwallet integration
secConfigGroup.writeEntry("desktopPassword", KStringHandler::obscure(m_desktopPassword));
secConfigGroup.writeEntry("unattendedPassword", KStringHandler::obscure(m_unattendedPassword));
} else {
// using KWallet, erase possibly stored passwords from krfbrc file
secConfigGroup.deleteEntry("desktopPassword");
secConfigGroup.deleteEntry("unattendedPassword");
// update passwords in kwallet
if (m_wallet && m_wallet->isOpen()) {
if (!m_wallet->hasFolder(s_krfbFolderName)) {
m_wallet->createFolder(s_krfbFolderName);
}
if (m_wallet->currentFolder() != s_krfbFolderName) {
m_wallet->setFolder(s_krfbFolderName);
}
m_wallet->writePassword(QStringLiteral("desktopSharingPassword"), m_desktopPassword);
m_wallet->writePassword(QStringLiteral("unattendedAccessPassword"), m_unattendedPassword);
}
}
KrfbConfig::self()->save();
}

View File

@@ -22,21 +22,54 @@
#include "rfbserver.h"
namespace KWallet {
class Wallet;
}
namespace KDNSSD {
class PublicService;
}
class InvitationsRfbServer : public RfbServer
{
Q_OBJECT
public:
static InvitationsRfbServer *instance;
static void init();
protected:
InvitationsRfbServer() : RfbServer(0) {}
const QString& desktopPassword() const;
void setDesktopPassword(const QString&);
const QString& unattendedPassword() const;
void setUnattendedPassword(const QString&);
bool allowUnattendedAccess() const;
virtual PendingRfbClient* newClient(rfbClientPtr client);
Q_SIGNALS:
void passwordChanged(const QString&);
public Q_SLOTS:
bool start() override;
void stop() override;
void toggleUnattendedAccess(bool allow);
void openKWallet();
void closeKWallet();
void saveSecuritySettings();
protected:
InvitationsRfbServer();
~InvitationsRfbServer() override;
PendingRfbClient* newClient(rfbClientPtr client) override;
private Q_SLOTS:
void startAndCheck();
void walletOpened(bool);
private:
KDNSSD::PublicService *m_publicService = nullptr;
bool m_allowUnattendedAccess;
QString m_desktopPassword;
QString m_unattendedPassword;
KWallet::Wallet *m_wallet = nullptr;
QString readableRandomString(int);
Q_DISABLE_COPY(InvitationsRfbServer)
};

View File

@@ -1,87 +0,0 @@
/* This file is part of the KDE project
Copyright (C) 2004 Nadeem Hasan <nhasan@kde.org>
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 2 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; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "invitedialog.h"
#include <KIconLoader>
#include <KLocale>
#include <KStandardGuiItem>
#include <QtGui/QCursor>
#include <QtGui/QLabel>
#include <QtGui/QPushButton>
#include <QtGui/QToolTip>
InviteDialog::InviteDialog(QWidget *parent)
: KDialog(parent)
{
setCaption(i18n("Invitation"));
setButtons(User1 | Close | Help);
setHelp(QString(), "krfb");
setDefaultButton(NoDefault);
setMinimumSize(500, 300);
m_inviteWidget = new QWidget(this);
setupUi(m_inviteWidget);
pixmapLabel->setPixmap(KIcon("krfb").pixmap(128));
setMainWidget(m_inviteWidget);
setButtonGuiItem(User1, KStandardGuiItem::configure());
connect(btnCreateInvite, SIGNAL(clicked()),
SIGNAL(createInviteClicked()));
connect(btnEmailInvite, SIGNAL(clicked()),
SIGNAL(emailInviteClicked()));
connect(btnManageInvite, SIGNAL(clicked()),
SIGNAL(manageInviteClicked()));
connect(helpLabel, SIGNAL(linkActivated(QString)),
SLOT(showWhatsthis()));
}
void InviteDialog::slotUser1()
{
emit configureClicked();
}
void InviteDialog::enableInviteButton(bool enable)
{
btnCreateInvite->setEnabled(enable);
}
void InviteDialog::setInviteCount(int count)
{
btnManageInvite->setText(
i18n("&Manage Invitations (%1)...", count));
}
void InviteDialog::showWhatsthis()
{
QToolTip::showText(QCursor::pos(),
i18n("An invitation creates a one-time password that allows the receiver to connect to your desktop.\n"
"It is valid for only one successful connection and will expire after an hour if it has not been used. \n"
"When somebody connects to your computer a dialog will appear and ask you for permission.\n "
"The connection will not be established before you accept it. In this dialog you can also\n restrict "
"the other person to view your desktop only, without the ability to move your\n mouse pointer or press "
"keys.\nIf you want to create a permanent password for Desktop Sharing, allow 'Uninvited Connections' \n"
"in the configuration."));
}
#include "invitedialog.moc"

View File

@@ -1,50 +0,0 @@
[Desktop Entry]
Type=ServiceType
X-KDE-ServiceType=krfb/framebuffer
Comment=Frame Buffer plugins for KRfb
Comment[ast]=Complementu de buffer pa KRfb
Comment[bs]=Priključci framebafera za KRfb
Comment[ca]=Connectors de «framebuffer» per al KRfb.
Comment[ca@valencia]=Connectors de «framebuffer» per al KRfb.
Comment[cs]=Moduly Frame bufferu pro KRfb
Comment[da]=Framebuffer-plugins til KRfb
Comment[de]=Framebuffer-Module für KRfb
Comment[en_GB]=Frame Buffer plugins for KRfb
Comment[es]=Complementos de memoria intermedia de vídeo para KRfb
Comment[et]=KRfb kaadripuhvri plugin
Comment[fi]=Kehyspuskuriliitännäinen kohteelle KRfb
Comment[fr]=Modules de sortie vidéo pour KRfb
Comment[ga]=Breiseáin Mhaoláin Fráma le haghaidh KRfb
Comment[gl]=Engadido de frame buffer para KRfb
Comment[hr]=Priključci za međuspremnike okvira za KRfb
Comment[ia]=Plug-ins de Frame Buffer per KRfb
Comment[it]=Estensioni del framebuffer per KRfb
Comment[ja]=KRfb の フレームバッファプラグイン
Comment[kk]=KRfb кадр буфер плагині
Comment[km]=កម្មវិធី​ជំនួយ​ Frame Buffer សម្រាប់ KRfb
Comment[ko]=KRfb 프레임버퍼 플러그인
Comment[lt]=Frame Buffer priedai skirti KRfb
Comment[lv]=Kadru bufera sprudņi priekš KRfb
Comment[nb]=Rammebuffer-programtillegg for KRfb
Comment[nds]=Bildpuffer-Modulen för KRfb
Comment[nl]=Framebuffer-plugins voor KRfb
Comment[nn]=Framebuffer-tillegg KRfb
Comment[pa]=KRfb ਲਈ ਫਰੇਮ ਬਫ਼ਰ ਪਲੱਗਇਨ
Comment[pt]='Plugins' de 'framebuffers' para o KRfb
Comment[pt_BR]=Plug-ins de framebuffers para o KRfb
Comment[ru]=Модуль буфера кадров для KRfb
Comment[si]=KRfb සඳහා රාමු බෆර ප්ලගින
Comment[sk]=Frame Buffer modul pre KRfb
Comment[sl]=Vstavki slikovnih medpomnilnikov za KRFB
Comment[sr]=Прикључци кадробафера за КРФБ
Comment[sr@ijekavian]=Прикључци кадробафера за КРФБ
Comment[sr@ijekavianlatin]=Priključci kadrobafera za KRFB
Comment[sr@latin]=Priključci kadrobafera za KRFB
Comment[sv]=Insticksprogram med rambuffert för Krfb
Comment[th]=ส่วนเสริมของ KRfb สำหรับจัดการเฟรมบัฟเฟอร์
Comment[tr]=KRfb için Çerçeve Tamponu eklentileri
Comment[uk]=Додатки буфера кадрів для KRfb
Comment[x-test]=xxFrame Buffer plugins for KRfbxx
Comment[zh_CN]=KRfb 帧缓冲插件
Comment[zh_TW]=KRfb 的 Frame Buffer 外掛程式

View File

@@ -1,143 +0,0 @@
# KDE Config File
[Desktop Entry]
Type=Application
Exec=krfb -caption "%c" %i
Icon=krfb
X-DocPath=krfb/index.html
Terminal=false
Name=Krfb
Name[ar]=Krfb
Name[ast]=Krfb
Name[bg]=Krfb
Name[bn]=কে-আর-এফ-বি
Name[br]=Krfb
Name[bs]=Krfb
Name[ca]=Krfb
Name[ca@valencia]=Krfb
Name[cs]=Krfb
Name[da]=Krfb
Name[de]=Krfb
Name[el]=Krfb
Name[en_GB]=Krfb
Name[eo]=Krfb
Name[es]=Krfb
Name[et]=Krfb
Name[eu]=Krfb
Name[fi]=Krfb
Name[fr]=Krfb
Name[ga]=Krfb
Name[gl]=Krfb
Name[he]=Krfb
Name[hi]=केआरएफबी
Name[hne]=केआरएफबी
Name[hr]=Krfb
Name[hu]=Krfb
Name[ia]=Krfb
Name[is]=Krfb
Name[it]=Krfb
Name[ja]=Krfb
Name[kk]=Krfb
Name[km]=Krfb
Name[ko]=Krfb
Name[lt]=Krfb
Name[lv]=Krfb
Name[ml]=കെആര്‍എഫ്ബി
Name[nb]=Krfb
Name[nds]=KRfb
Name[ne]=Krfb
Name[nl]=Krfb
Name[nn]=Krfb
Name[pa]=Krfb
Name[pl]=Krfb
Name[pt]=Krfb
Name[pt_BR]=Krfb
Name[ro]=Krfb
Name[ru]=Krfb
Name[si]=Krfb
Name[sk]=Krfb
Name[sl]=Krfb
Name[sq]=Krfb
Name[sr]=КРФБ
Name[sr@ijekavian]=КРФБ
Name[sr@ijekavianlatin]=KRFB
Name[sr@latin]=KRFB
Name[sv]=Krfb
Name[tr]=Krfb
Name[uk]=Krfb
Name[uz]=Krfb
Name[uz@cyrillic]=Krfb
Name[vi]=Krfb
Name[x-test]=xxKrfbxx
Name[zh_CN]=Krfb
Name[zh_HK]=Krfb
Name[zh_TW]=桌面分享_Krfb
GenericName=Desktop Sharing
GenericName[ar]=مشاركة سطح المكتب
GenericName[ast]=Escritoriu compartíu
GenericName[bg]=Споделяне на работния плот
GenericName[bn]=ডেস্কটপ ভাগাভাগি
GenericName[br]=Rannañ ar vurev
GenericName[bs]=Dijeljenje radne površine
GenericName[ca]=Compartició de l'escriptori
GenericName[ca@valencia]=Compartició de l'escriptori
GenericName[cs]=Sdílení pracovní plochy
GenericName[cy]=Rhannu Penbwrdd
GenericName[da]=Desktopdeling
GenericName[de]=Arbeitsfläche freigeben
GenericName[el]=Κοινή χρήση επιφάνειας εργασίας
GenericName[en_GB]=Desktop Sharing
GenericName[eo]=Tabula komunigado
GenericName[es]=Escritorio compartido
GenericName[et]=Töölaua jagamine
GenericName[eu]=Mahaigaina partekatzea
GenericName[fa]=اشتراک رومیزی
GenericName[fi]=Työpöydän jakaminen
GenericName[fr]=Partage de bureau
GenericName[ga]=Roinnt Deisce
GenericName[gl]=Compartimento de escritorio
GenericName[he]=שיתוף שולחנות עבודה
GenericName[hi]=डेस्कटॉप साझेदारी
GenericName[hne]=डेस्कटाप साझेदारी
GenericName[hr]=Dijeljenje radne površine
GenericName[hu]=Munkaasztal-megosztás
GenericName[ia]=Compartir de scriptorio
GenericName[is]=Skjáborðsmiðlun
GenericName[it]=Condivisione del desktop
GenericName[ja]=デスクトップ共有
GenericName[kk]=Үстелді ортақтастыру
GenericName[km]=ការ​ចែក​រំលែក​ផ្ទៃ​តុ
GenericName[ko]=데스크톱 공유
GenericName[lt]=Dalinimasis darbastaliu
GenericName[lv]=Darbvirsmas koplietošana
GenericName[ml]=പണിയിടം പങ്കുവെക്കല്‍
GenericName[nb]=Delte skrivebord
GenericName[nds]=Schriefdisch-Freegaav
GenericName[ne]=डेस्कटप साझेदारी
GenericName[nl]=Bureaublad delen
GenericName[nn]=Skrivebordsdeling
GenericName[pa]=ਡੈਸਕਟਾਪ ਸ਼ੇਅਰਿੰਗ
GenericName[pl]=Współdzielenie pulpitu
GenericName[pt]=Partilha do Ecrã
GenericName[pt_BR]=Compartilhamento de ambiente de trabalho
GenericName[ro]=Partajare birou
GenericName[ru]=Общий рабочий стол
GenericName[si]=වැඩතල හවුල්
GenericName[sk]=Zdieľanie pracovnej plochy
GenericName[sl]=Deljenje namizja
GenericName[sr]=Дељење површи
GenericName[sr@ijekavian]=Дијељење површи
GenericName[sr@ijekavianlatin]=Dijeljenje površi
GenericName[sr@latin]=Deljenje površi
GenericName[sv]=Dela ut skrivbordet
GenericName[th]=ใช้งานพื้นที่ทำงานร่วมกัน
GenericName[tr]=Masaüstü Paylaşımı
GenericName[ug]=ئۈستەلئۈستىنى ھەمبەھىرلەش
GenericName[uk]=Спільні стільниці
GenericName[uz]=Ish stoli bilan boʻlishish
GenericName[uz@cyrillic]=Иш столи билан бўлишиш
GenericName[vi]=Chia sẻ màn hình nền
GenericName[x-test]=xxDesktop Sharingxx
GenericName[zh_CN]=桌面共享
GenericName[zh_HK]=桌面分享
GenericName[zh_TW]=桌面分享
Categories=Qt;KDE;System;Network;RemoteAccess;

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