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

Compare commits

...

59 Commits

Author SHA1 Message Date
Script Kiddy
022af12c70 SVN_SILENT made messages (.desktop file)
svn path=/branches/KDE/4.10/kdenetwork/krfb/; revision=1330223
2012-12-31 06:42:41 +00:00
Script Kiddy
535ffcbd15 SVN_SILENT made messages (.desktop file)
svn path=/branches/KDE/4.10/kdenetwork/krfb/; revision=1329682
2012-12-24 08:02:13 +00:00
Script Kiddy
620c8220f8 SVN_SILENT made messages (.desktop file)
svn path=/branches/KDE/4.10/kdenetwork/krfb/; revision=1329614
2012-12-23 06:57:49 +00:00
Script Kiddy
4d30a4e2a2 SVN_SILENT made messages (.desktop file)
svn path=/branches/KDE/4.10/kdenetwork/krfb/; revision=1329446
2012-12-22 07:10:10 +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
Ralf Jung
5097a44442 krfb actually requires Xtst to be built
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1263324
2011-11-09 19:29:05 +00:00
Script Kiddy
b24786205f SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1262529
2011-11-04 08:48:25 +00:00
George Kiagiadakis
9f56633c0b Sync with libvncserver from git (git describe version: 0.9.8-10-g17ce0c5).
My patches in this local fork have been merged upstream, but they
have been merged after 0.9.8 and 0.9.9 hasn't been released yet,
so we cannot yet switch back to finding libvncserver externally.

So I am syncing now with basically what is 0.9.8 + my patches and a few bugfixes.

svn path=/trunk/KDE/kdenetwork/krfb/; revision=1258493
2011-10-11 19:12:14 +00:00
Script Kiddy
7c061ccbf1 SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1256082
2011-09-28 06:29:47 +00:00
George Kiagiadakis
e69fc2b61f Fix compilation with telepathy tubes.
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1254094
2011-09-17 16:13:19 +00:00
Script Kiddy
dda89a146f SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1249564
2011-08-26 06:56:30 +00:00
Script Kiddy
ff967c23c1 SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1248865
2011-08-22 07:37:33 +00:00
Script Kiddy
672311ccea SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1247595
2011-08-16 13:22:20 +00:00
Laurent Montel
2b938c712e normalize signals/slots
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1243993
2011-07-30 12:19:38 +00:00
Script Kiddy
5fd621abc9 SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1242912
2011-07-24 07:37:49 +00:00
Script Kiddy
59183f3c69 SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1241619
2011-07-15 07:33:43 +00:00
Script Kiddy
33cc068753 SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1239971
2011-07-06 08:57:13 +00:00
Script Kiddy
f6d4256f5d SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1235120
2011-06-04 08:17:18 +00:00
Script Kiddy
324f029f10 SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1232057
2011-05-15 08:04:05 +00:00
Script Kiddy
c2c6d43299 SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1231187
2011-05-10 10:07:34 +00:00
Script Kiddy
1c9189bf50 SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1230988
2011-05-09 07:48:38 +00:00
Script Kiddy
705ddc2c07 SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1230856
2011-05-08 07:44:07 +00:00
George Kiagiadakis
5c9a3528b6 Do not crash if the framebuffer plugin cannot be loaded.
BUG: 272290

svn path=/trunk/KDE/kdenetwork/krfb/; revision=1230289
2011-05-03 12:36:52 +00:00
Script Kiddy
ba554fe831 SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1224665
2011-03-13 07:15:28 +00:00
Script Kiddy
cb5f243262 SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1224140
2011-03-08 08:29:16 +00:00
Script Kiddy
f947f69bfb SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1222893
2011-02-27 07:17:42 +00:00
Florian Reinhard
0eb7e1c502 Port krdc,krfb to telepathy-qt4-0.5.x
Reviewed-by: George Kiagiadakis <kiagiadakis.george@gmail.com>Reviewed-by:

svn path=/trunk/KDE/kdenetwork/krfb/; revision=1221586
2011-02-19 10:43:43 +00:00
Script Kiddy
86c5ea3905 SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1217717
2011-01-28 07:17:28 +00:00
Script Kiddy
78ec1e53c8 SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1217412
2011-01-27 06:14:35 +00:00
Script Kiddy
e8da15b195 SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1213675
2011-01-11 09:14:38 +00:00
André Wöbbeking
423c87c382 -pedantic
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1213250
2011-01-09 20:11:44 +00:00
Laurent Montel
60e66e16a0 Fix mem leak
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1212554
2011-01-07 12:33:37 +00:00
67 changed files with 6757 additions and 3178 deletions

View File

@@ -11,13 +11,9 @@ if(NOT INSIDE_KDENETWORK)
include(MacroLibrary)
include(CheckSymbolExists)
if (BUILD_EXPERIMENTAL_TUBES_SUPPORT)
message(WARNING "You enabled experimental Tubes support. Expect breakage!!")
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)
macro_optional_find_package(TelepathyQt4)
macro_log_feature(TelepathyQt4_FOUND "telepathy-qt" "Telepathy Qt Bindings" "http://telepathy.freedesktop.org" FALSE "0.9" "Needed to build Telepathy Tubes support.")
set(CMAKE_REQUIRED_DEFINITIONS ${_KDE_PLATFORM_DEFINITIONS})
@@ -37,7 +33,7 @@ include_directories ("${CMAKE_CURRENT_BINARY_DIR}/krfb"
if(Q_WS_X11)
if(NOT X11_XTest_FOUND)
macro_log_feature(X11_XTest_FOUND "libXtst" "X11 Testing Resource extension library" "http://xorg.freedesktop.org" FALSE "" "useful for automated testing of X clients.")
message(FATAL_ERROR "krfb requires the libXtst (http://xorg.freedesktop.org) to be built")
endif(NOT X11_XTest_FOUND)
endif(Q_WS_X11)

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)

View File

@@ -12,7 +12,7 @@
]>
<!-- Based on kdoctemplate v0.9 January 10 2003 -->
<book lang="&language;">
<book id="krfb" lang="&language;">
<!-- This header contains all of the meta-information for the document such
as Authors, publish date, the abstract, and Keywords -->

View File

@@ -2,29 +2,38 @@
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[el]=Μνήμη εξόδου βίντεο καρέ με βάση το Qt για το KRfb.
Comment[en_GB]=Qt based Framebuffer for KRfb.
Comment[es]=Esquema Qt de buffer para KRfb
Comment[es]=Memoria intermedia de vídeo basada en Qt para KRfb.
Comment[et]=KRfb Qt põhine kaadripuhver
Comment[eu]=Qt-n oinarritutako KRfb-ren irteerako bideoa
Comment[fi]=QT-perustainen Kehyspuskuri KRfb:lle
Comment[fr]=Sortie vidéo basée sur Qt pour KRfb.
Comment[fr]=Sortie vidéo fondé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[hu]=Qt-alapú framebuffer a Krfb-hez.
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[pl]=Bufor ramki na podstawie Qt dla 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]=Кадробафер за КРФБ на основу КуТу
@@ -39,29 +48,38 @@ 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[el]=Qt Framebuffer for KRfb
Name[en_GB]=Qt Framebuffer for KRfb
Name[es]=Esquema Qt de buffer para KRfb
Name[es]=Memoria intermedia de vídeo Qt para KRfb
Name[et]=KRfb Qt kaadripuhver
Name[eu]=KRfb-ren Qt-ko irteerako bideoa
Name[fi]=QT-kehyspuskuri KRfb:lle
Name[fr]=Sortie vidéo Qt pour KRfb
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[hu]=Qt framebuffer a Krfb-hez
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[pl]=Bufor ramki Qt dla 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]=КуТ‑ов кадробафер за КРФБ

View File

@@ -2,29 +2,38 @@
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[el]=Μνήμη εξόδου βίντεο καρέ με βάση το X11 XDamage/XShm για το KRfb.
Comment[en_GB]=X11 XDamage/XShm based Framebuffer for KRfb.
Comment[es]=Esquema de buffer para KRfb basado en XDamage/XShm
Comment[es]=Memoria intermedia de vídeo basada en X11 Damage/XShm para KRfb.
Comment[et]=KRfb X11 XDamage/XShm põhine kaadripuhver
Comment[eu]=X11 XDamage/XShm oinarritutako KRfb-ren irteerako bideoa.
Comment[fi]=X11 XDamage/XShm-perustainen kehyspuskui KRfb:lle.
Comment[fr]=Sortie vidéo basée sur X11 XDamage / XShm pour KRfb.
Comment[fr]=Sortie vidéo fondé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[hu]=X11 XDamage/XShm-alapú framebuffer a Krfb-hez.
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[pl]=Bufor ramki na podstawie X11 XDamage/XShm dla 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.
@@ -39,29 +48,38 @@ 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[el]=X11 Framebuffer for KRfb
Name[en_GB]=X11 Framebuffer for KRfb
Name[es]=Buffer de X11 para KRfb
Name[es]=Memoria intermedia de vídeo X11 para KRfb
Name[et]=KRfb X11 kaadripuhver
Name[eu]=KRfb-ren X11-ko irteerako bideoa
Name[fi]=X11-kehyspuskuri KRfb:lle
Name[fr]=Sortie vidéo X11 pour KRfb
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[hu]=X11 framebuffer a Krfb-hez
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[pl]=Bufor ramki X11 dla 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 кадробафер за КРФБ.

View File

@@ -68,7 +68,7 @@ KcmKRfb::KcmKRfb(QWidget *p, const QStringList &) :
load();
connect(m_confWidget->passwordInput, SIGNAL(textChanged(const QString &)), SLOT(configChanged()));
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()));

View File

@@ -14,9 +14,10 @@ Name=Desktop Sharing
Name[af]=Werkskerm Deeling
Name[ar]=مشاركة سطح المكتب
Name[ast]=Escritoriu compartiu
Name[bg]=Споделяне на работното място
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
@@ -39,6 +40,7 @@ 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]=デスクトップ共有
@@ -58,10 +60,11 @@ Name[nn]=Skrivebordsdeling
Name[pa]=ਡੈਸਕਟਾਪ ਸ਼ੇਅਰਿੰਗ
Name[pl]=Współdzielenie pulpitu
Name[pt]=Partilha do Ecrã
Name[pt_BR]=Compartilhamento do Desktop
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]=Дељење површи
@@ -73,6 +76,7 @@ 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
@@ -85,9 +89,10 @@ Comment=Configure Desktop Sharing
Comment[af]=Konfigureer Werkskerm Deeling
Comment[ar]=تعديل مشاركة سطح المكتب
Comment[ast]=Configura'l to escritoriu compartíu
Comment[bg]=Настройване споделянето на работното място
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
@@ -110,6 +115,7 @@ 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]=デスクトップ共有の設定
@@ -129,10 +135,11 @@ Comment[nn]=Set opp skrivebordsdeling
Comment[pa]=ਡੈਸਕਟਾਪ ਸ਼ੇਅਰਿੰਗ ਸੰਰਚਨਾ
Comment[pl]=Konfiguracja współdzielenia pulpitu
Comment[pt]=Configurar a Partilha do Ecrã
Comment[pt_BR]=Configurar compartilhamento da área de trabalho
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]=Подешавање дељења површи
@@ -152,47 +159,40 @@ 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[bs]=desktop sharing,krfb,vnc,sharing,krdc,remote desktop connection,invitation,port,slp,uninvited,dijeljenje desktopa,udaljeni desktop,nepozvan
X-KDE-Keywords[ca]=compartició d'escriptori,krfb,vnc,compartició,krdc,connexió d'escriptori remot,invitació,port,slp,no invitat
X-KDE-Keywords[ca@valencia]=compartició d'escriptori,krfb,vnc,compartició,krdc,connexió d'escriptori remot,invitació,port,slp,no invitat
X-KDE-Keywords[da]=skrivebordsdeling,krfb,vnc,deling,krdc,remote desktop,fjernskrivebord,invitation,port,slp,uinviteret
X-KDE-Keywords[de]=freigabe der arbeitsfläche,krfb,vnc,freigabe,krdc,fernwartung,einladung,port,slp
X-KDE-Keywords[el]=desktop sharing,krfb,vnc,sharing,krdc,remote desktop connection,invitation,port,slp,uninvited
X-KDE-Keywords[es]=compartición de escritorio,krfb,vnc,compartición,krdc,conexión de escritorio en 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[fi]=desktop sharing,krfb,vnc,sharing,krdc,remote desktop connection,invitation,port,slp,uninvited,työpöydän jakaminen,jakaminen,etätyöpöytä,etäyhteys,kutsu,portti
X-KDE-Keywords[fr]=partage de bureau, Krfb, vnc, partage, Krdc, connexion à un bureau distant, invitation, port, slp, non-invité
X-KDE-Keywords[gl]=compartición do escritorio,krfb,vnc,compartir,krdc,conexión remota de escritorio,invitación,porto,slp,sen invitar
X-KDE-Keywords[hu]=asztalmegosztás,krfb,vnc,megosztás,krdc,távoliasztal-kapcsolat,meghívás,port,slp,meghívatlan
X-KDE-Keywords[ia]=compartir de scriptorio,krfb.vnc,compartir,krdc,connexion de scriptorio remote,invitation,porto,slp,non invitate
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[kk]=desktop sharing,krfb,vnc,sharing,krdc,remote desktop connection,invitation,port,slp,uninvited
X-KDE-Keywords[km]=ការ​ចែក​រំលែក​ផ្ទៃតុ,krfb,vnc,ការ​ចែក​រំលែក,krdc,ការ​តភ្ជាប់​ផ្ទៃ​តុ​ពី​ចម្ងាយ,​ការ​អញ្ជើញ,ច្រក,slp,មិន​ត្រូវ​បានអញ្ជើញ
X-KDE-Keywords[ko]=desktop sharing,krfb,vnc,sharing,krdc,remote desktop connection,invitation,port,slp,uninvited,데스크톱,공유,원격 데스크톱,포트
X-KDE-Keywords[nb]=skrivebordsdeling,krfb,vnc,deling,krdc,tilkoblng til annet skrivebord,invitasjon,port,slp,ikke invitert
X-KDE-Keywords[nds]=Schriefdischfreegaav,krfb,vnc,Freegaav,Verbinnen na feern Schriefdisch,Inladen,Port,Koppelsteed,slp,nich inlaadt
X-KDE-Keywords[nl]=delen van bureaublad,krfb,vnc,delen,krdc,verbinding naar bureaublad op afstand,invitatie,poort,slp,ongenodigd
X-KDE-Keywords[pl]=współdzielenie pulpitu,krfb,vnc,współdzielenie,krdc,podłączenie zdalnego pulpitu,zaproszenie,port,slp,niezaproszony
X-KDE-Keywords[pt]=partilha do ecrã,krfb,vnc,partilha,krdc,ligação ecrã remoto,convite,porto,slp,sem convite
X-KDE-Keywords[pt_BR]=compartilhamento da área de trabalho,krfb,vnc,compartilhar,krdc,conexão à área de trabalho remota,convite,porta,desconvidar
X-KDE-Keywords[sk]=zdieľanie plochy,krfb,vnc,zdieľanie,krdc,vzdialené pripojenie plochy,pozvanie,port,slp,nepozvaný
X-KDE-Keywords[sl]=namizje,deljenje,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@ijekavian]=desktop sharing,krfb,vnc,sharing,krdc,remote desktop connection,invitation,port,slp,uninvited,дељење површи,КРФБ,ВНЦ,дељење,КРДЦ,удаљена површ,позивница,порт,СЛП,непозван
X-KDE-Keywords[sr@ijekavianlatin]=desktop sharing,krfb,vnc,sharing,krdc,remote desktop connection,invitation,port,slp,uninvited,deljenje površi,KRFB,VNC,deljenje,KRDC,udaljena površ,pozivnica,port,SLP,nepozvan
X-KDE-Keywords[sr@latin]=desktop sharing,krfb,vnc,sharing,krdc,remote desktop connection,invitation,port,slp,uninvited,deljenje površi,KRFB,VNC,deljenje,KRDC,udaljena površ,pozivnica,port,SLP,nepozvan
X-KDE-Keywords[sv]=dela skrivbord,krfb,vnc,dela,krdc,fjärrskrivbordsanslutning,inbjudan,port,slp,oinbjuden
X-KDE-Keywords[tr]=masaüstü paylaşımı,krfb,vnc,paylaşım,krdc,uzak masaüstü bağlantısı,davet,port,slp,davet edilmemiş
X-KDE-Keywords[uk]=krfb,vnc,sharing,krdc,remote desktop connection,invitation,port,slp,uninvited,спільне використання,керування,оприлюднення,віддалене з’єднання,запрошення,порт,небажане
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
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,krdc,remote desktop connection,invitation,port,slp,uninvited
Categories=Qt;KDE;X-KDE-settings-network;Settings;

View File

@@ -91,8 +91,8 @@ bool PortListener::acquirePort()
m_socket = new KNetwork::KServerSocket(m_port, false);
}
connect(m_socket, SIGNAL(accepted(KSocket *)),
SLOT(accepted(KSocket *)));
connect(m_socket, SIGNAL(accepted(KSocket*)),
SLOT(accepted(KSocket*)));
bool s = m_registerService;
bool sd = m_dnssdRegister;

View File

@@ -10,9 +10,10 @@ Name=KDE Internet Daemon
Name[af]=Kde Internet Bediener
Name[ar]=كيدي إنترنت مراقب
Name[ast]=Degorriu d'Internet de KDE
Name[bg]=Интернет демон
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
@@ -24,7 +25,7 @@ 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[eu]=KDEren interneteko daemona
Name[fa]=شبح اینترنتی KDE
Name[fi]=KDE:n Internet-palvelin
Name[fr]=Démon Internet de KDE
@@ -35,6 +36,7 @@ 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 インターネットデーモン
@@ -52,14 +54,16 @@ Name[ne]=केडीई इन्टरनेट डेइमोन
Name[nl]=KDE Internet Daemon
Name[nn]=KDE-Internett-teneste
Name[pa]=KDE ਇੰਟਰਨੈੱਟ ਡੈਮਨ
Name[pl]=Internet/sieć
Name[pl]=Demon internetowy dla KDE
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
@@ -81,8 +85,9 @@ 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[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í
@@ -94,7 +99,7 @@ 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[eu]=Sareko 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
@@ -105,6 +110,7 @@ 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]=要求時にネットワークサービスを起動するインターネットデーモン
@@ -122,17 +128,18 @@ 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[pl]=Demon internetowy, który uruchamia usługi sieciowe 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 zahtevu
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]=ஒரு இணைய டேமொன், டேமொன் பிணைய சேவையை ஆரம்பிக்கிறது

View File

@@ -3,8 +3,10 @@ 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
@@ -26,6 +28,7 @@ Comment[hi]=के-इनिट-डी
Comment[hne]=के-इनिट-डी
Comment[hr]=KInetD
Comment[hu]=KInetD
Comment[ia]=KInetD
Comment[is]=KInetD
Comment[it]=KInetD
Comment[ja]=KInetD
@@ -47,8 +50,10 @@ 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
@@ -69,8 +74,10 @@ Comment[zh_TW]=KInetD
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í
@@ -92,6 +99,7 @@ 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]=外部からの接続
@@ -113,6 +121,7 @@ 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]=Долазна веза
@@ -134,7 +143,9 @@ 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í
@@ -156,6 +167,7 @@ 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]=外部からの接続がありました
@@ -177,6 +189,7 @@ 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]=Примљена је долазна веза
@@ -200,6 +213,7 @@ 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
@@ -221,6 +235,7 @@ 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]=プロセス失敗
@@ -242,11 +257,12 @@ 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 uspeo
Name[sr@ijekavian]=Процес није успио
Name[sr@ijekavianlatin]=Proces nije uspio
Name[sr@latin]=Proces nije uspeo
Name[sv]=Process misslyckades
Name[ta]=செயல் தோல்வியுற்றது
@@ -264,6 +280,7 @@ 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í
@@ -285,6 +302,7 @@ 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]=接続を扱うプロセスを呼び出せません
@@ -305,6 +323,7 @@ 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]=Нисам могао да позовем процес да опслужи везу

View File

@@ -9,6 +9,7 @@ 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
@@ -21,7 +22,7 @@ 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[fa]=نوع پیمانه KInetD
Name[fi]=KInetD-moduulityyppi
Name[fr]=Type de module de KInetD
Name[ga]=Cineál Modúil KInetD
@@ -31,6 +32,7 @@ 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 モジュールタイプ
@@ -54,6 +56,7 @@ 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]=Врста модула КинетД‑а

View File

@@ -41,10 +41,10 @@ install (FILES
# Second target: krfb - the app
# itself.
if(BUILD_EXPERIMENTAL_TUBES_SUPPORT AND TELEPATHY_QT4_FOUND)
if(TelepathyQt4_FOUND)
add_definitions(-DKRFB_WITH_TELEPATHY_TUBES)
include_directories(${TELEPATHY_QT4_INCLUDE_DIR})
endif(BUILD_EXPERIMENTAL_TUBES_SUPPORT AND TELEPATHY_QT4_FOUND)
endif()
set (krfb_SRCS
connectiondialog.cpp
@@ -65,14 +65,13 @@ set (krfb_SRCS
invitationsrfbclient.cpp
)
if (BUILD_EXPERIMENTAL_TUBES_SUPPORT AND TELEPATHY_QT4_FOUND)
if(TelepathyQt4_FOUND)
set (krfb_SRCS
${krfb_SRCS}
tubesrfbserver.cpp
tubesrfbclient.cpp
tubesclienthandler.cpp
)
endif (BUILD_EXPERIMENTAL_TUBES_SUPPORT AND TELEPATHY_QT4_FOUND)
endif()
kde4_add_kcfg_files (krfb_SRCS
krfbconfig.kcfgc
@@ -87,9 +86,9 @@ kde4_add_ui_files (krfb_SRCS
ui/personalinvitewidget.ui
)
if (BUILD_EXPERIMENTAL_TUBES_SUPPORT AND TELEPATHY_QT4_FOUND)
if(TelepathyQt4_FOUND)
kde4_add_ui_files(krfb_SRCS ui/tubesconnectionwidget.ui)
endif(BUILD_EXPERIMENTAL_TUBES_SUPPORT AND TELEPATHY_QT4_FOUND)
endif()
kde4_add_executable (krfb
${krfb_SRCS}
@@ -107,11 +106,11 @@ target_link_libraries (krfb
${KDE4_KDEUI_LIBS}
)
if (BUILD_EXPERIMENTAL_TUBES_SUPPORT AND TELEPATHY_QT4_FOUND)
if(TelepathyQt4_FOUND)
target_link_libraries(krfb
${TELEPATHY_QT4_LIBRARIES}
)
endif (BUILD_EXPERIMENTAL_TUBES_SUPPORT AND TELEPATHY_QT4_FOUND)
endif()
if (X11_XTest_FOUND)
target_link_libraries (krfb
@@ -123,14 +122,14 @@ install (TARGETS krfb
${INSTALL_TARGETS_DEFAULT_ARGS}
)
if (BUILD_EXPERIMENTAL_TUBES_SUPPORT AND TELEPATHY_QT4_FOUND)
if(TelepathyQt4_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})
install(FILES krfb_rfb_handler.client DESTINATION ${CMAKE_INSTALL_PREFIX}/share/telepathy/clients/)
endif (BUILD_EXPERIMENTAL_TUBES_SUPPORT AND TELEPATHY_QT4_FOUND)
endif()
########### install files ###############

View File

@@ -60,7 +60,7 @@ private:
void init();
};
K_GLOBAL_STATIC(EventData, data);
K_GLOBAL_STATIC(EventData, data)
EventData::EventData()
{

View File

@@ -4,32 +4,41 @@ 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[el]=Πρόσθετα μνήμης εξόδου βίντεο καρέ για το KRfb
Comment[en_GB]=Frame Buffer plugins for KRfb
Comment[es]=Complemento de buffer para KRfb
Comment[es]=Complementos de memoria intermedia de vídeo para KRfb
Comment[et]=KRfb kaadripuhvri plugin
Comment[eu]=Irteerako bideoaren pluginak KRfb-rentzako
Comment[fi]=Kehyspuskuriliitännäinen kohteelle KRfb
Comment[fr]=Modules de sortie vidéo pour 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[hu]=Framebuffer bővítmények a Krfb-hez
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[pl]=Wtyczki buforów ramek dla KRfb
Comment[pt]='Plugins' de 'framebuffers' para o KRfb
Comment[pt_BR]=Plug-ins de framebuffers para o KRfb
Comment[pt_BR]=Plugins 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]=Прикључци кадробафера за КРФБ

View File

@@ -11,6 +11,7 @@ Name[ast]=Krfb
Name[bg]=Krfb
Name[bn]=কে-আর-এফ-বি
Name[br]=Krfb
Name[bs]=Krfb
Name[ca]=Krfb
Name[ca@valencia]=Krfb
Name[cs]=Krfb
@@ -31,6 +32,7 @@ Name[hi]=केआरएफबी
Name[hne]=केआरएफबी
Name[hr]=Krfb
Name[hu]=Krfb
Name[ia]=Krfb
Name[is]=Krfb
Name[it]=Krfb
Name[ja]=Krfb
@@ -51,14 +53,17 @@ 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[ug]=Krfb
Name[uk]=Krfb
Name[uz]=Krfb
Name[uz@cyrillic]=Krfb
@@ -70,9 +75,10 @@ Name[zh_TW]=桌面分享_Krfb
GenericName=Desktop Sharing
GenericName[ar]=مشاركة سطح المكتب
GenericName[ast]=Escritoriu compartíu
GenericName[bg]=Споделяне на работното място
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
@@ -95,6 +101,7 @@ 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]=デスクトップ共有
@@ -115,6 +122,7 @@ 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]=Дељење површи
@@ -124,6 +132,7 @@ 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]=Иш столи билан бўлишиш

View File

@@ -4,8 +4,10 @@ Comment=Desktop Sharing
Comment[af]=Werkskerm Deeling
Comment[ar]=مشاركة سطح المكتب
Comment[ast]=Escritoriu compartíu
Comment[bg]=Споделяне на работния плот
Comment[bn]=ডেস্কটপ ভাগাভাগি
Comment[br]=Rannañ ar vurev
Comment[bs]=Dijeljenje radne površine
Comment[ca]=Compartició de l'escriptori
Comment[ca@valencia]=Compartició de l'escriptori
Comment[cs]=Sdílení pracovní plochy
@@ -27,6 +29,7 @@ Comment[hi]=डेस्कटॉप साझेदारी
Comment[hne]=डेस्कटाप साझेदारी
Comment[hr]=Dijeljenje radne površine
Comment[hu]=Munkaasztal-megosztás
Comment[ia]=Compartir de scriptorio
Comment[is]=Skjáborðamiðlun
Comment[it]=Condivisione del desktop
Comment[ja]=デスクトップ共有
@@ -48,6 +51,7 @@ Comment[pt]=Partilha do Ecrã
Comment[pt_BR]=Compartilhamento do ambiente de trabalho
Comment[ro]=Partajare birou
Comment[ru]=Параметры общего рабочего стола
Comment[si]=වැඩතල හවුල්
Comment[sk]=Zdieľanie pracovnej plochy
Comment[sl]=Deljenje namizja
Comment[sr]=Дељење површи
@@ -59,6 +63,7 @@ Comment[ta]=பணிமேடை பகிர்வு
Comment[tg]=Истифодаи Муштараки Мизи Корӣ
Comment[th]=ใช้งานพื้นที่ทำงานร่วมกัน
Comment[tr]=Masaüstü Paylaşımı
Comment[ug]=ئۈستەلئۈستىنى ھەمبەھىرلەش
Comment[uk]=Спільні стільниці
Comment[xh]=Ulwahlulelano lwe Desktop
Comment[x-test]=xxDesktop Sharingxx
@@ -70,6 +75,8 @@ Comment[zh_TW]=桌面分享
Name=User Accepts Connection
Name[ar]=المستخدم يقبل الاتصال
Name[ast]=L'usuariu aceuta la conexón
Name[bg]=Потребителят приема връзката
Name[bs]=Korisnik prihvata vezu
Name[ca]=L'usuari accepta la connexió
Name[ca@valencia]=L'usuari accepta la connexió
Name[cs]=Uživatel přijímá spojení
@@ -89,13 +96,14 @@ Name[hi]=उपयोक्ता ने कनेक्शन स्वीक
Name[hne]=कमइया हर कनेक्सन स्वीकारा
Name[hr]=Korisnik prihvaća vezu
Name[hu]=A felhasználó engedélyezi a csatlakozást
Name[ia]=Usator da acceptation a connexion
Name[is]=Notandi samþykkir tengingar
Name[it]=L'utente accetta la connessione
Name[ja]=ユーザが接続を許可
Name[kk]=Пайдаланушы қосылымды қабылдайды
Name[km]=អ្នក​ប្រើ​ទទួល​យក​ការ​ត​ភ្ជាប់
Name[ko]=사용자가 연결을 수락함
Name[lt]=Vartotojas priėmė kvietimą
Name[lt]=Naudotojas priėmė kvietimą
Name[lv]=Lietotājs atļauj savienojumu
Name[ml]=ഉപയോക്താവ് ബന്ധം സ്വീകരിക്കുന്നു
Name[nb]=Bruker godtar tilkobling
@@ -108,6 +116,7 @@ Name[pt]=O Utilizador Aceita a Ligação
Name[pt_BR]=O usuário aceita a conexão
Name[ro]=Utilizatorul acceptă conexiunea
Name[ru]=Пользователь принимает соединения
Name[si]=සබැඳිය පරිශීලකයා තහවුරු කරයි
Name[sk]=Užívateľ akceptuje pripojenie
Name[sl]=Uporabnik sprejel povezavo
Name[sr]=Корисник прихвата везу
@@ -125,7 +134,9 @@ Comment=User accepts connection
Comment[af]=Gebruiker aanvaar verbinding
Comment[ar]=المستخدم يقبل الاتصال
Comment[ast]=L'usuariu aceuta la conexón
Comment[bg]=Потребителят приема връзката
Comment[bn]=ব্যবহারকারী সংযোগ গ্রহণ করে
Comment[bs]=Korisnik prihvata vezu
Comment[ca]=L'usuari accepta la connexió
Comment[ca@valencia]=L'usuari accepta la connexió
Comment[cs]=Uživatel přijímá spojení
@@ -147,13 +158,14 @@ Comment[hi]=उपयोक्ता ने कनेक्शन स्वी
Comment[hne]=कमइया हर कनेक्सन स्वीकारा
Comment[hr]=Korisnik prihvaća vezu
Comment[hu]=A felhasználó engedélyezi a csatlakozást
Comment[ia]=Usator da acceptation a connexion
Comment[is]=Notandi samþykkir tengingu
Comment[it]=L'utente accetta la connessione
Comment[ja]=ユーザが接続を許可
Comment[kk]=Пайдаланушы қосылымды қабылдайды
Comment[km]=អ្នក​ប្រើ​ទទួល​យក​ការ​ត​ភ្ជាប់
Comment[ko]=사용자가 연결을 수락함
Comment[lt]=Vartotojas priėmė kvietimą
Comment[lt]=Naudotojas priėmė kvietimą
Comment[lv]=Lietotājs atļauj savienojumu
Comment[mk]=Корисникот прифаќа поврзување
Comment[ml]=ഉപയോക്താവ് ബന്ധം സ്വീകരിക്കുന്നു
@@ -168,6 +180,7 @@ Comment[pt]=O utilizador aceita a ligação
Comment[pt_BR]=O usuário aceita a conexão
Comment[ro]=Utilizatorul acceptă conexiunea
Comment[ru]=Пользователь принимает соединения
Comment[si]=සබැඳිය පරිශීලකයා තහවුරු කරයි
Comment[sk]=Užívateľ akceptuje pripojenie
Comment[sl]=Uporabnik sprejel povezavo
Comment[sr]=Корисник прихвата везу
@@ -191,6 +204,8 @@ Action=Popup
Name=User Refuses Connection
Name[ar]=المستخدم يرفض الاتصال
Name[ast]=L'usuariu refuga la conexón
Name[bg]=Потребителят отказва връзката
Name[bs]=Korisnik odbija vezu
Name[ca]=L'usuari refusa la connexió
Name[ca@valencia]=L'usuari refusa la connexió
Name[cs]=Uživatel odmítá spojení
@@ -210,13 +225,14 @@ Name[hi]=उपयोक्ता ने कनेक्शन अस्वी
Name[hne]=कमइया हर कनेक्सन अस्वीकारा
Name[hr]=Korisnik odbija vezu
Name[hu]=A felhasználó elutasítja a csatlakozást
Name[ia]=Usator refuta connexion
Name[is]=Notandi hafnar tengingum
Name[it]=L'utente rifiuta la connessione
Name[ja]=ユーザが接続を拒否
Name[kk]=Пайдаланушы қосылымдан бас тартады
Name[km]=អ្នក​ប្រើ​បដិសេធ​ការ​ត​ភ្ជាប់
Name[ko]=사용자가 연결을 거부함
Name[lt]=Vartotojas atmetė kvietimą
Name[lt]=Naudotojas atmetė kvietimą
Name[lv]=Lietotājs noraida savienojumu
Name[ml]=ഉപയോക്താവ് ബന്ധം തിരസ്കരിക്കുന്നു
Name[nb]=Bruker nekter tilkobling
@@ -229,6 +245,7 @@ Name[pt]=O Utilizador Recusa a Ligação
Name[pt_BR]=O usuário rejeita a conexão
Name[ro]=Utilizatorul refuză conexiunea
Name[ru]=Пользователь отклоняет соединения
Name[si]=සබැඳිය පරිශීලකයා තහවුරු නොකරයි
Name[sk]=Užívateľ odmieta pripojenie
Name[sl]=Uporabnik zavrnil povezavo
Name[sr]=Корисник одбија везу
@@ -246,7 +263,9 @@ Comment=User refuses connection
Comment[af]=Gebruiker weier verbinding
Comment[ar]=المستخدم يرفض الاتصال
Comment[ast]=L'usuariu refuga la conexón
Comment[bg]=Потребителят отказва връзката
Comment[bn]=ব্যবহারকারী সংযোগ অস্বীকার করে
Comment[bs]=Korisnik odbija vezu
Comment[ca]=L'usuari refusa la connexió
Comment[ca@valencia]=L'usuari refusa la connexió
Comment[cs]=Uživatel odmítá spojení
@@ -268,13 +287,14 @@ Comment[hi]=उपयोक्ता ने कनेक्शन अस्व
Comment[hne]=कमइया हर कनेक्सन अस्वीकारा
Comment[hr]=Korisnik odbija vezu
Comment[hu]=A felhasználó elutasítja a csatlakozást
Comment[ia]=Usator refuta connexion
Comment[is]=Notandi hafnar tengingu
Comment[it]=L'utente rifiuta la connessione
Comment[ja]=ユーザが接続を拒否
Comment[kk]=Пайдаланушы қосылымды қабылдамайды
Comment[km]=អ្នក​ប្រើ​បដិសេធ​ការ​ត​ភ្ជាប់
Comment[ko]=사용자가 연결을 거부함
Comment[lt]=Vartotojas atmetė kvietimą
Comment[lt]=Naudotojas atmetė kvietimą
Comment[lv]=Lietotājs noraida savienojumu
Comment[mk]=Корисникот одбива поврзување
Comment[ml]=ഉപയോക്താവ് ബന്ധം തിരസ്കരിക്കുന്നു
@@ -289,6 +309,7 @@ Comment[pt]=O utilizador recusa a ligação
Comment[pt_BR]=O usuário rejeita a conexão
Comment[ro]=Utilizatorul refuză conexiunea
Comment[ru]=Пользователь отклоняет соединения
Comment[si]=සබැඳිය පරිශීලකයා තහවුරු නොකරයි
Comment[sk]=Užívateľ odmieta pripojenie
Comment[sl]=Uporabnik zavrnil povezavo
Comment[sr]=Корисник одбија везу
@@ -312,6 +333,8 @@ Action=Popup
Name=Connection Closed
Name[ar]=الاتصال أغلق
Name[ast]=Conexón zarrada
Name[bg]=Връзката е прекъсната
Name[bs]=Konekcija zatvorena
Name[ca]=Connexió tancada
Name[ca@valencia]=Connexió tancada
Name[cs]=Spojení ukončeno
@@ -331,6 +354,7 @@ Name[hi]=कनेक्शन बन्द
Name[hne]=कनेक्सन बन्द
Name[hr]=Veza prekinuta
Name[hu]=A kapcsolat megszűnt
Name[ia]=Connexion claudite
Name[is]=Tengingu lokað
Name[it]=Connessione chiusa
Name[ja]=接続切断
@@ -351,8 +375,10 @@ Name[pt]=Ligação Fechada
Name[pt_BR]=Conexão encerrada
Name[ro]=Conexiune închisă
Name[ru]=Соединение закрыто
Name[si]=සබඳතාව වසා දැමිනි
Name[sk]=Pripojenie bolo ukončené
Name[sl]=Povezava zaprta
Name[sq]=Lidhja u Mbyll
Name[sr]=Веза затворена
Name[sr@ijekavian]=Веза затворена
Name[sr@ijekavianlatin]=Veza zatvorena
@@ -368,8 +394,10 @@ Comment=Connection closed
Comment[af]=Verbinding gesluit
Comment[ar]=تمّ غلق الاتصال
Comment[ast]=Conexón zarrada
Comment[bg]=Връзката е прекъсната
Comment[bn]=সংযোগ বন্ধ করা হল
Comment[br]=Serret eo ar gevreadenn
Comment[bs]=Veza je zatvorena
Comment[ca]=Connexió tancada
Comment[ca@valencia]=Connexió tancada
Comment[cs]=Spojení ukončeno
@@ -391,10 +419,11 @@ Comment[hi]=कनेक्शन बन्द
Comment[hne]=कनेक्सन बन्द
Comment[hr]=Veza prekinuta
Comment[hu]=A kapcsolat megszűnt
Comment[ia]=Connexion claudite
Comment[is]=Tengingu lokað
Comment[it]=Connessione chiusa
Comment[ja]=接続が閉じられました
Comment[kk]=Қосылымдан жабылды
Comment[kk]=Қосылым жабылды
Comment[km]=បាន​បិទ​ការ​ត​ភ្ជាប់
Comment[ko]=연결이 닫힘
Comment[lt]=Ryšys baigtas
@@ -412,8 +441,10 @@ Comment[pt]=A ligação foi encerrada
Comment[pt_BR]=Conexão encerrada
Comment[ro]=Conexiune închisă
Comment[ru]=Соединение закрыто
Comment[si]=සබඳතාව වසාදැමිනි
Comment[sk]=Pripojenie bolo ukončené
Comment[sl]=Povezava zaprta
Comment[sq]=Lidhja u mbyll
Comment[sr]=Веза је затворена
Comment[sr@ijekavian]=Веза је затворена
Comment[sr@ijekavianlatin]=Veza je zatvorena
@@ -423,6 +454,7 @@ Comment[ta]=இணைப்புகள் மூடப்பட்டது
Comment[tg]=Пайвастшавӣ пӯшида аст
Comment[th]=การเชื่อมต่อยุติ
Comment[tr]=Bağlantı kapatıldı
Comment[ug]=باغلىنىش تاقالدى
Comment[uk]=З'єднання закрито
Comment[uz]=Aloqa uzildi
Comment[uz@cyrillic]=Алоқа узилди
@@ -437,6 +469,8 @@ Action=Popup
Name=Invalid Password
Name[ar]=كلمة المرور غير صحيحة
Name[ast]=Contraseña incorreuta
Name[bg]=Неправилна парола
Name[bs]=Neispravna šifra
Name[ca]=Contrasenya no vàlida
Name[ca@valencia]=Contrasenya no vàlida
Name[cs]=Neplatné heslo
@@ -456,6 +490,7 @@ Name[hi]=अवैध पासवर्ड
Name[hne]=अवैध पासवर्ड
Name[hr]=Nevažeća zaporka
Name[hu]=Érvénytelen jelszó
Name[ia]=Contrasigno invalide
Name[is]=Ógilt lykilorð
Name[it]=Password non valida
Name[ja]=無効なパスワード
@@ -475,8 +510,10 @@ Name[pt]=Senha Inválida
Name[pt_BR]=Senha inválida
Name[ro]=Parolă nevalidă
Name[ru]=Неверный пароль
Name[si]=වැරදි මුරපදය
Name[sk]=Neplatné heslo
Name[sl]=Neveljavno geslo
Name[sq]=Fjalëkalim i Pavlefshëm
Name[sr]=Неисправна лозинка
Name[sr@ijekavian]=Неисправна лозинка
Name[sr@ijekavianlatin]=Neispravna lozinka
@@ -484,6 +521,7 @@ Name[sr@latin]=Neispravna lozinka
Name[sv]=Ogiltigt lösenord
Name[th]=รหัสผ่านไม่ถูกต้อง
Name[tr]=Geçersiz Parola
Name[ug]=ئىناۋەتسىز ئىم
Name[uk]=Неправильний пароль
Name[wa]=Sicret nén valåbe
Name[x-test]=xxInvalid Passwordxx
@@ -493,8 +531,10 @@ Comment=Invalid password
Comment[af]=Ongeldige wagwoord
Comment[ar]=كلمة المرور غير صحيحة
Comment[ast]=Contraseña incorreuta
Comment[bg]=Неправилна парола
Comment[bn]=অবৈধ পাসওয়ার্ড
Comment[br]=Tremenger siek
Comment[bs]=Neispravna šifra
Comment[ca]=Contrasenya no vàlida
Comment[ca@valencia]=Contrasenya no vàlida
Comment[cs]=Neplatné heslo
@@ -516,6 +556,7 @@ Comment[hi]=अवैध पासवर्ड
Comment[hne]=अवैध पासवर्ड
Comment[hr]=Nevažeća šifra
Comment[hu]=Érvénytelen jelszó
Comment[ia]=Contrasigno invalide
Comment[is]=Lykilorð ógilt
Comment[it]=Password non valida
Comment[ja]=無効なパスワード
@@ -539,8 +580,10 @@ Comment[pt]=A senha é inválida
Comment[pt_BR]=Senha inválida
Comment[ro]=Parolă nevalidă
Comment[ru]=Неверный пароль
Comment[si]=වැරදි මුරපදය
Comment[sk]=Neplatné heslo
Comment[sl]=Neveljavno geslo
Comment[sq]=Fjalëkalim i pavlefshëm
Comment[sr]=Неисправна лозинка
Comment[sr@ijekavian]=Неисправна лозинка
Comment[sr@ijekavianlatin]=Neispravna lozinka
@@ -550,6 +593,7 @@ Comment[ta]=செல்லாத கடவுச்சொல்
Comment[tg]=Гузарвожаи нодуруст
Comment[th]=รหัสผ่านไม่ถูกต้อง
Comment[tr]=Geçersiz parola
Comment[ug]=ئىناۋەتسىز ئىم
Comment[uk]=Неправильний пароль
Comment[uz]=Maxfiy soʻz haqiqiy emas
Comment[uz@cyrillic]=Махфий сўз ҳақиқий эмас
@@ -565,6 +609,8 @@ Action=Popup
Name=Invalid Password Invitations
Name[ar]=كلمة المرور الدعوات غير صحيحة
Name[ast]=Contraseñas d'invitaciones incorreutes
Name[bg]=Неправилна парола за покана
Name[bs]=Neispravna šifra pozivnice
Name[ca]=Contrasenya de les invitacions no vàlides
Name[ca@valencia]=Contrasenya de les invitacions no vàlides
Name[cs]=Neplatné hesla výzev
@@ -575,7 +621,7 @@ Name[en_GB]=Invalid Password Invitations
Name[eo]=Nevalidaj pasvortaj invitoj
Name[es]=Contraseñas de invitaciones incorrectas
Name[et]=Kutsutu vale parool
Name[eu]=Baliogabeko pasahitz gonbidapena
Name[eu]=Gonbitearen pasahitza baliogabea
Name[fi]=Virheellinen salasana kutsuun
Name[fr]=Invitations de mot de passe non valables
Name[ga]=Cuirí Neamhbhailí Focal Faire
@@ -584,12 +630,13 @@ Name[hi]=अवैध पासवर्ड निमंत्रण
Name[hne]=अवैध पासवर्ड निमंत्रन
Name[hr]=Pozivnice s nevažećim zaporkama
Name[hu]=Érvénytelen jelszavas meghívó
Name[ia]=Invitationes de contrasigno invalide
Name[is]=Ógild lykilorðsboð
Name[it]=Password di invito non valida
Name[ja]=招待に対する無効なパスワード
Name[kk]=Жарамсыз паролімен шақыру
Name[km]=ការ​អញ្ជើញ​ពាក្យ​សម្ងាត់​មិន​ត្រឹមត្រូវ
Name[ko]=잘못된 비밀번호 초대장
Name[ko]=잘못된 호 초대장
Name[lt]=Neteisingas kvietimo slaptažodis
Name[lv]=Nepareiza parole ar ielūgumu
Name[ml]=അസാധുവായ അടയാളവാക്ക് ക്ഷണങ്ങള്‍
@@ -603,6 +650,7 @@ Name[pt]=Convites de Senha Inválidos
Name[pt_BR]=Avisos de senha inválida
Name[ro]=Parolă nevalidă Invitații
Name[ru]=Неверный пароль приглашения
Name[si]=වැරදි මුරපද ආරාධනාවක්
Name[sk]=Neplatné heslo pozvánky
Name[sl]=Povabila z neveljavnimi gesli
Name[sr]=Неисправна лозинка позивнице
@@ -620,7 +668,9 @@ Comment=The invited party sent an invalid password. Connection refused.
Comment[af]=Die uitgenooi party gestuur 'n ongeldige wagwoord. Verbinding geweier.
Comment[ar]=المدعو أرسل كلمة مرور غير صحيحة. رفض الإتصال.
Comment[ast]=L'invitáu unvió una contraseña incorreuta. Conexón refugada.
Comment[bg]=Поканената страна изпрати неправилна парола. Връзката е отказана.
Comment[bn]=আমন্ত্রিত দল একটি অবৈধ পাসওয়ার্ড পাঠাল। সংযোগ অস্বীকার করা হল।
Comment[bs]=Pozvana strana je poslala pogrešnu šifru. Veza je odbijena.
Comment[ca]=La part invitada ha enviat una contrasenya no vàlida. Connexió refusada.
Comment[ca@valencia]=La part invitada ha enviat una contrasenya no vàlida. Connexió refusada.
Comment[cs]=Pozvaná strana poslala neplatné heslo. Spojení odmítnuto.
@@ -632,7 +682,7 @@ Comment[en_GB]=The invited party sent an invalid password. Connection refused.
Comment[eo]=La invitita kliento sendis nevalidan pasvorton. Konekto rifuzita.
Comment[es]=El invitado envió una contraseña incorrecta. Conexión rechazada.
Comment[et]=Kutsutu saatis vigase parooli. Ühendusest keelduti.
Comment[eu]=Gonbidatutako parekoak baliogabeko pasahitza bidali du. Konexioa ukatu da.
Comment[eu]=Gonbidatutako parekoak baliogabeko pasahitza bidali du. Konexioa ukatuta.
Comment[fi]=Kutsuttu taho lähetti virheellisen salasanan. Yhteys hylättiin.
Comment[fr]=La partie invitée a envoyé un mot de passe non valable. Connexion refusée.
Comment[ga]=Sheol an duine le cuireadh focal faire neamhbhailí. Diúltaíodh an ceangal.
@@ -642,12 +692,13 @@ Comment[hi]=निमंत्रित पार्टी ने अवैध
Comment[hne]=निमंत्रित पार्टी हर अवैध पासवर्ड भेजिस. कनेक्सन अस्वीकृत.
Comment[hr]=Stranka koju ste pozvali je poslala nevažeću šifru. Veza odbijena.
Comment[hu]=A meghívott fél érvénytelen jelszót küldött. A csatlakozási kérés elutasítva.
Comment[ia]=Le partita invitate inviava un contrasigno invalide. Connexion refusate.
Comment[is]=Boðinn aðili sendi ógilt lykilorð. Tengingu hafnað
Comment[it]=La parte invitata ha inviato una password non valida. Connessione rifiutata.
Comment[ja]=招待された人が無効なパスワードを送ってきました。接続を拒否しました。
Comment[kk]=Шқырылған жақ дұрыс емес парольді жіберді. Қосылымдан бас тартылды..
Comment[km]=ភាគី​ដែល​បាន​អញ្ជើញ បាន​ផ្ញើ​ពាក្យ​សម្ងាត់​មិន​ត្រឹមត្រូវ ។ ការ​តភ្ជាប់​ត្រូវ​បាន​បដិសេធ ។
Comment[ko]=초대한 사람이 잘못된 비밀번호를 보냈습니다. 연결이 잘못되었습니다.
Comment[ko]=초대한 사람이 잘못된 호를 보냈습니다. 연결이 잘못되었습니다.
Comment[lt]=Pakviestoji pusė atsiuntė neteisingą slaptažodį. Ryšys nutrauktas.
Comment[lv]=Ielūgtā persona nosūtīja nepareizu paroli. Savienojums noraidīts.
Comment[mk]=Поканетата страна испрати невалидна лозинка. Поврзувањето е одбиено.
@@ -661,7 +712,8 @@ Comment[pl]=Z drugiej strony podano błędne hasło. Połączenie odrzucone.
Comment[pt]=O utilizador convidado enviou uma senha inválida. A ligação foi recusada.
Comment[pt_BR]=A parte "convidada" enviou uma senha inválida. Conexão recusada.
Comment[ro]=Partea care invită a trimis o parolă nevalidă. Conexiune refuzată.
Comment[ru]=Приглашенный пользователь ввёл неверный пароль. Соединение отклонено.
Comment[ru]=Приглашённый пользователь ввёл неправильный пароль. Соединение отклонено.
Comment[si]=ආරාධිත පාර්‍ශවය වැරදි මුරපදයක් එවන ලද බැවින් සබඳතාව ප්‍රතික්‍ෂේප විය.
Comment[sk]=Pozvaná strana poslala neplatné heslo. Pripojenie bolo odmietnuté.
Comment[sl]=Povabljena stranka je poslala neveljavno geslo. Povezava zavrnjena.
Comment[sr]=Позвана страна је послала погрешну лозинку. Веза је одбијена.
@@ -685,6 +737,8 @@ Action=Popup
Name=New Connection on Hold
Name[ar]=اتصال جديد على التوقف
Name[ast]=Conexón nueva a la espera
Name[bg]=Изчакване на новата връзка
Name[bs]=Nova veza je na čekanju
Name[ca]=Nova connexió en espera
Name[ca@valencia]=Nova connexió en espera
Name[cs]=Nové spojení pozdrženo
@@ -704,6 +758,7 @@ Name[hi]=नया कनेक्शन होल्ड पर रखा
Name[hne]=नवा कनेक्सन होल्ड मं रखा
Name[hr]=Nova veza na čekanju
Name[hu]=Új kapcsolat tartva
Name[ia]=Nove connexion in pausa
Name[is]=Ný tenging á bið
Name[it]=Nuova connessione in attesa
Name[ja]=保留中の新しい接続
@@ -723,6 +778,7 @@ Name[pt]=Ligação Nova em Espera
Name[pt_BR]=Nova conexão ativa
Name[ro]=Conexiune nouă în așteptare
Name[ru]=Новое соединение приостановлено
Name[si]=නව සබඳතාවක් රඳවා ඇත
Name[sk]=Nové pripojenie bolo pozdržané
Name[sl]=Nova povezava na čakanju
Name[sr]=Нова веза је на чекању
@@ -740,7 +796,9 @@ Comment=Connection requested, user must accept
Comment[af]=Verbinding versoekte, gebruiker moet aanvaar
Comment[ar]=الاتصال طلب، يجب موافقة المستخدم
Comment[ast]=Conexón solicitada, l'usuario tien d'aceutala
Comment[bg]=Поискана е връзка, следва потребителят да приеме
Comment[bn]=সংযোগ অনুরোধ করা হল, ব্যবহারকারীকে অবশ্যই স্বীকার করতে হবে
Comment[bs]=Veza je zahtijevana, korinik mora da je prihvati
Comment[ca]=Connexió sol·licitada, l'usuari ha d'acceptar-la
Comment[ca@valencia]=Connexió sol·licitada, l'usuari ha d'acceptar-la
Comment[cs]=Vyžadováno spojení, uživatel musí přijmout
@@ -752,7 +810,7 @@ Comment[en_GB]=Connection requested, user must accept
Comment[eo]=Konekto pridemandita, la uzanto devas akcepti
Comment[es]=Conexión solicitada, el usuario debe aceptarla
Comment[et]=Nõutakse ühendust, kasutaja peab seda lubama
Comment[eu]=Konexioa eskatu da, erabiltzaileak onartu behar du
Comment[eu]=Konexioa eskatuta, erabiltzaileak onartu behar du
Comment[fi]=Pyydettiin yhteyttä, käyttäjän tulee hyväksyä
Comment[fr]=Connexion demandée, l'utilisateur doit accepter
Comment[ga]=Ceangal iarrtha; ní mór don úsáideoir glacadh leis
@@ -762,13 +820,14 @@ Comment[hi]=कनेक्शन निवेदित. उपयोक्त
Comment[hne]=कनेक्सन निवेदित. कमइया ल स्वीकार होना चाही
Comment[hr]=Veza je zatražena, korisnik mora prihvatiti
Comment[hu]=Csatlakozási kérés, a felhasználónak el kell fogadnia
Comment[ia]=Connexion requirite, usator debe dar acceptation
Comment[is]=Beiðni um tengingu, notandi verður að samþykkja
Comment[it]=Connessione richiesta, l'utente deve accettare
Comment[ja]=接続が要求されています。ユーザが許可しなければなりません。
Comment[kk]=Қосылым сұралды, пайдаланушы жауап беруге тиіс
Comment[km]=បាន​ស្នើ​ការ​ត​ភ្ជាប់​​ អ្នក​ប្រើ​ត្រូវ​តែ​ទទួល​យក
Comment[ko]=연결 요청됨, 사용자가 수락해야 함
Comment[lt]=Kvietimas ryšiui išsiųstas, vartotojas turi priimti kvietimą
Comment[lt]=Kvietimas ryšiui išsiųstas, naudotojas turi priimti kvietimą
Comment[lv]=Ir pieprasīts jauns savienojums, kurš lietotājam ir jāapstiprina
Comment[mk]=Побарано е поврзување, корисникот мора да прифати
Comment[ml]=ബന്ധം ആവശ്യ‌പ്പെട്ടിട്ടുണ്ട്, ഉപയോക്താവ് സ്വീകരിക്കണം
@@ -783,6 +842,7 @@ Comment[pt]=Foi pedida uma ligação que o utilizador deverá aceitar
Comment[pt_BR]=Conexão requisitada; o usuário deve aceitar
Comment[ro]=Conexiune cerută, utilizatorul trebuie să accepte
Comment[ru]=Запрос на соединение, требуется подтверждение пользователя
Comment[si]=සබඳතාව ඉල්ලා ඇත, පරිශීලක තහවුරු කල යුතුයි
Comment[sk]=Vyžiadané pripojenie, užívateľ ho musí akceptovať
Comment[sl]=Povezava zahtevana, uporabnik mora sprejeti
Comment[sr]=Захтевана је веза, корисник мора да је прихвати
@@ -806,6 +866,8 @@ Action=Popup
Name=New Connection Auto Accepted
Name[ar]=اتصال جديد مقبول تلقائيا
Name[ast]=Conexón nueva aceutada automáticamente
Name[bg]=Автоматично приемане на новата връзка
Name[bs]=Nova veza je automatski prihvaćena
Name[ca]=Nova connexió acceptada automàticament
Name[ca@valencia]=Nova connexió acceptada automàticament
Name[cs]=Nové spojení automaticky přijato
@@ -816,7 +878,7 @@ Name[en_GB]=New Connection Auto Accepted
Name[eo]=Nova konekto aŭtomate akceptita
Name[es]=Conexión nueva aceptada automáticamente
Name[et]=Uue ühendusega automaatselt nõus
Name[eu]=Konexio berria auto-onartu da
Name[eu]=Konexio berria automatikoki onartuta
Name[fi]=Uusi yhteys hyväksyttiin automaattisesti
Name[fr]=Nouvelle connexion auto-acceptée
Name[ga]=Ceangal nua bunaithe go huathoibríoch
@@ -825,6 +887,7 @@ Name[hi]=नय कनेक्शन स्वचालित स्वीक
Name[hne]=नय कनेक्सन अपने अपन स्वीकारा
Name[hr]=Nova veza automatski prihvaćena
Name[hu]=Új kapcsolat automatikusan engedélyezve
Name[ia]=Nove connexion con acceptation automatic
Name[is]=Ný tenging sjálfvirkt samþykkt
Name[it]=Nuova connessione accettata automaticamente
Name[ja]=新しい接続の自動受け入れ
@@ -844,6 +907,7 @@ Name[pt]=Nova Ligação Aceite Automaticamente
Name[pt_BR]=Nova conexão com aceitação automática
Name[ro]=Conexiune nouă acceptată automat
Name[ru]=Новое соединение принимается автоматически
Name[si]=නව සබඳතාව ස්වයංක්‍රීයව පිළිගැණිනි
Name[sk]=Nové pripojenie bolo automaticky akceptované
Name[sl]=Nova povezava samodejno sprejeta
Name[sr]=Нова веза је аутоматски прихваћена
@@ -861,7 +925,9 @@ Comment=New connection automatically established
Comment[af]=Nuwe verbinding automaties vasgestel
Comment[ar]=اتصال جديد مفعل تلقائيا
Comment[ast]=Conexón nueva afitada automáticamente
Comment[bg]=Новата връзка е автоматично приета
Comment[bn]=নতুন সংযোগ স্বয়ংক্রীয়ভাবে স্থাপন করা হল
Comment[bs]=Nova veza je automatski uspostavljena
Comment[ca]=Nova connexió establerta automàticament
Comment[ca@valencia]=Nova connexió establerta automàticament
Comment[cs]=Automaticky navázáno nové spojení
@@ -873,7 +939,7 @@ Comment[en_GB]=New connection automatically established
Comment[eo]=Nova konekto aŭtomate establita
Comment[es]=Conexión nueva establecida automáticamente
Comment[et]=Uus ühendus automaatselt loodud
Comment[eu]=Konexio berria automatikoki ezarri da
Comment[eu]=Konexio berria automatikoki ezarrita
Comment[fi]=Uusi yhteys muodostettiin automaattisesti
Comment[fr]=Nouvelle connexion établie automatiquement
Comment[ga]=Ceangal nua bunaithe go huathoibríoch
@@ -883,6 +949,7 @@ Comment[hi]=नया कनेक्शन स्वचलित स्था
Comment[hne]=नवा कनेक्सन अपने अपन स्थापित
Comment[hr]=Nova veza automatski prihvaćena
Comment[hu]=Automatikusan létrejött egy új kapcsolat
Comment[ia]=Nove connexion establite automaticamente
Comment[is]=Nýjar tengingar sjálfkrafa samþykktar
Comment[it]=Nuova connessione stabilita automaticamente
Comment[ja]=新しい接続を自動的に確立しました
@@ -904,6 +971,7 @@ Comment[pt]=Foi estabelecida automaticamente uma nova ligação
Comment[pt_BR]=Nova conexão estabelecida automaticamente
Comment[ro]=Conexiune nouă stabilită automat
Comment[ru]=Новое соединение устанавливается автоматически
Comment[si]=නව සබඳතාව ස්වයංක්‍රීයව සැකසිනි
Comment[sk]=Nové pripojenie bolo automaticky nadviazané
Comment[sl]=Nova povezava samodejno vzpostavljena
Comment[sr]=Нова веза је аутоматски успостављена
@@ -927,6 +995,8 @@ Action=Popup
Name=Too Many Connections
Name[ar]=اتصالات عديدة
Name[ast]=Abondes conexones
Name[bg]=Твърде много връзки
Name[bs]=Previše veza
Name[ca]=Massa connexions
Name[ca@valencia]=Massa connexions
Name[cs]=Příliš mnoho spojení
@@ -946,6 +1016,7 @@ Name[hi]=बहुत सारे कनेक्शन
Name[hne]=बहुत अकन कनेक्सन
Name[hr]=Previše veza
Name[hu]=Túl sok kapcsolat
Name[ia]=Nimie connexiones
Name[is]=Of margar tengingar
Name[it]=Troppe connessioni
Name[ja]=多すぎる接続
@@ -965,6 +1036,7 @@ Name[pt]=Demasiadas Ligações
Name[pt_BR]=Conexões em excesso
Name[ro]=Prea multe conexiuni
Name[ru]=Слишком много соединений
Name[si]=වඩා වැඩි සබඳතා ගණනක්
Name[sk]=Príliš veľa pripojení
Name[sl]=Preveč povezav
Name[sr]=Исувише веза
@@ -982,9 +1054,11 @@ Comment=Busy, connection refused
Comment[af]=Besig, verbinding geweier
Comment[ar]=مشغول، الإتصال رفض
Comment[ast]=Ocupáu, conexón refugada
Comment[bg]=Заето. Връзката е отказана.
Comment[bn]=ব্যস্ত, সংযোগ অস্বীকার করল
Comment[br]=Dalc'het, kevreadenn disteuleret
Comment[ca]=Ocupat, connexió refusada
Comment[bs]=Zauzeto, veza je odbijena
Comment[ca]=Ocupat, connexió rebutjada
Comment[ca@valencia]=Ocupat, connexió refusada
Comment[cs]=Zaneprázdněn, spojení odmítnuto
Comment[cy]=Prysur, gwrthodwyd y cysylltiad
@@ -1005,6 +1079,7 @@ Comment[hi]=व्यस्त, कनेक्शन अस्वीकृत
Comment[hne]=व्यस्त, कनेक्सन अस्वीकृत
Comment[hr]=Zauzeto, veza odbijena
Comment[hu]=A csatlakozási kérés elutasítva túlterhelés miatt
Comment[ia]=Occupate, connexion refusate
Comment[is]=Uptekinn, tengingu hafnað
Comment[it]=Occupato, connessione rifiutata
Comment[ja]=ビジーです、接続を拒否しました
@@ -1026,6 +1101,7 @@ Comment[pt]=Ocupado, pelo a ligação foi recusada
Comment[pt_BR]=Ocupado; conexão recusada
Comment[ro]=Ocupat, conexiune refuzată
Comment[ru]=Занят, соединение отклонено
Comment[si]=කාර්‍යබහුලයි, සබඳතාව නොපිළිගැණිනි
Comment[sk]=Zaneprázdnený, pripojenie bolo odmietnuté
Comment[sl]=Zaposlen, povezava zavrnjena
Comment[sr]=Заузето, веза је одбијена
@@ -1051,6 +1127,8 @@ Action=Popup
Name=Unexpected Connection
Name[ar]=الاتصال غير متوقّع
Name[ast]=Conexón inesperada
Name[bg]=Неочаквана връзка
Name[bs]=Neočekivana veza
Name[ca]=Connexió inesperada
Name[ca@valencia]=Connexió inesperada
Name[cs]=Neočekávané spojení
@@ -1070,6 +1148,7 @@ Name[hi]=अप्रत्याशित कनेक्शन
Name[hne]=अप्रत्यासित कनेक्सन
Name[hr]=Neočekivana veza
Name[hu]=Nem várt kapcsolat
Name[ia]=Connexion impreviste
Name[is]=Óvænt Tenging
Name[it]=Connessione inattesa
Name[ja]=予期しない接続
@@ -1089,8 +1168,10 @@ Name[pt]=Ligação Inesperada
Name[pt_BR]=Conexão inesperada
Name[ro]=Conexiune neașteptată
Name[ru]=Неожиданное соединение
Name[si]=බලාපොරොත්තු රහිත සබඳතාවක්
Name[sk]=Neočakávané pripojenie
Name[sl]=Nepričakovana povezava
Name[sq]=Lidhje e Papritur
Name[sr]=Неочекивана веза
Name[sr@ijekavian]=Неочекивана веза
Name[sr@ijekavianlatin]=Neočekivana veza
@@ -1098,6 +1179,7 @@ Name[sr@latin]=Neočekivana veza
Name[sv]=Oväntad anslutning
Name[th]=เกิดการเชื่อมต่อที่ไม่คาดคิด
Name[tr]=Beklenmeyen Bağlantı
Name[ug]=كۈتۈلمىگەن باغلىنىش
Name[uk]=Неочікуване з’єднання
Name[x-test]=xxUnexpected Connectionxx
Name[zh_CN]=未预料的连接
@@ -1106,7 +1188,9 @@ Comment=Received unexpected connection, abort
Comment[af]=Ontvang onverwagte verbinding, staak
Comment[ar]=استقبال اتصال غير متوقع، إنهاء
Comment[ast]=Recibióse conexón inesperada, albortando
Comment[bg]=Получена е неочаквана връзка. Прекъсване.
Comment[bn]=অপ্রত্যাশিত সংযোগ গ্রহণ করল, বাতিল করুন
Comment[bs]=Primljena je neočekivana veza, prekini
Comment[ca]=Rebuda una connexió inesperada, avortant
Comment[ca@valencia]=Rebuda una connexió inesperada, avortant
Comment[cs]=Obdrženo neočekávané spojení, přerušeno
@@ -1118,7 +1202,7 @@ Comment[en_GB]=Received unexpected connection, abort
Comment[eo]=Ricevis neatenditan konekton, ĉesi
Comment[es]=Recibida conexión inesperada, interrumpir
Comment[et]=Saadi ootamatu ühendus, loobuti
Comment[eu]=Ustegabeko konexioa jaso da, abortatzen
Comment[eu]=Ustekabeko konexioa jaso da, abortatzen
Comment[fi]=Vastaanotettiin odottamaton yhteys, lopeta
Comment[fr]=Reçu une connexion inattendue, interruption
Comment[ga]=Fuarthas ceangal gan choinne, á thobscor
@@ -1128,6 +1212,7 @@ Comment[hi]=अप्रत्याशित कनेक्शन प्रा
Comment[hne]=अप्रत्यासित कनेक्सन प्राप्त. छोड़ा
Comment[hr]=Primio sam neočekivanu vezu, prekid
Comment[hu]=Nem várt csatlakozási kérés érkezett, megszakítás
Comment[ia]=On recipeva connexion impreviste, aborta
Comment[is]=Tók á móti óvæntri tengingu, hætti
Comment[it]=Ricevuta connessione inattesa, terminata
Comment[ja]=予期しない接続を受信しました。廃棄します。
@@ -1148,6 +1233,7 @@ Comment[pt]=Foi recebida uma ligação inesperada, pelo que foi interrompida
Comment[pt_BR]=Conexão recebida inesperadamente; abortar
Comment[ro]=Conexiune neașteptată recepționată, abandonare
Comment[ru]=Получено неожиданное соединение. Отключение
Comment[si]=බලාපොරොත්තු රහිත සබඳතාවක් ලැබිනි, පිටවෙමින්
Comment[sk]=Prijaté neočakávané pripojenie, prerušené
Comment[sl]=Prejeta nepričakovana povezava, prekinjeno
Comment[sr]=Примљена је неочекивана веза, прекидам

View File

@@ -33,8 +33,7 @@
#include <QtGui/qwindowdefs.h>
#ifdef KRFB_WITH_TELEPATHY_TUBES
# include "tubesclienthandler.h"
# include <TelepathyQt4/ClientRegistrar>
# include "tubesrfbserver.h"
#endif
#include <signal.h>
@@ -105,9 +104,7 @@ int main(int argc, char *argv[])
InvitationsRfbServer::init();
#ifdef KRFB_WITH_TELEPATHY_TUBES
Tp::ClientRegistrarPtr clientRegistrar = Tp::ClientRegistrar::create();
clientRegistrar->registerClient(Tp::AbstractClientPtr(new TubesClientHandler),
"krfb_rfb_handler");
TubesRfbServer::init();
#endif
//init the GUI

View File

@@ -88,6 +88,9 @@ bool RfbServer::start()
{
if (!d->screen) {
d->screen = RfbServerManager::instance()->newScreen();
if (!d->screen) {
return false;
}
// server hooks
d->screen->screenData = this;

View File

@@ -175,29 +175,31 @@ void RfbServerManager::unregisterServer(RfbServer* server)
rfbScreenInfoPtr RfbServerManager::newScreen()
{
rfbScreenInfoPtr screen;
rfbScreenInfoPtr screen = NULL;
int w = d->fb->width();
int h = d->fb->height();
int depth = d->fb->depth();
int bpp = depth >> 3;
if (!d->fb.isNull()) {
int w = d->fb->width();
int h = d->fb->height();
int depth = d->fb->depth();
int bpp = depth >> 3;
if (bpp != 1 && bpp != 2 && bpp != 4) {
bpp = 4;
if (bpp != 1 && bpp != 2 && bpp != 4) {
bpp = 4;
}
kDebug() << "bpp: " << bpp;
rfbLogEnable(0);
screen = rfbGetScreen(0, 0, w, h, 8, 3, bpp);
screen->paddedWidthInBytes = d->fb->paddedWidth();
d->fb->getServerFormat(screen->serverFormat);
screen->frameBuffer = d->fb->data();
screen->desktopName = d->desktopName.constData();
screen->cursor = d->myCursor;
}
kDebug() << "bpp: " << bpp;
rfbLogEnable(0);
screen = rfbGetScreen(0, 0, w, h, 8, 3, bpp);
screen->paddedWidthInBytes = d->fb->paddedWidth();
d->fb->getServerFormat(screen->serverFormat);
screen->frameBuffer = d->fb->data();
screen->desktopName = d->desktopName.constData();
screen->cursor = d->myCursor;
return screen;
}

View File

@@ -53,7 +53,7 @@ private:
RfbServerManager();
virtual ~RfbServerManager();
Q_DISABLE_COPY(RfbServerManager);
Q_DISABLE_COPY(RfbServerManager)
friend class RfbServer;
friend class RfbServerManagerStatic;

View File

@@ -1,95 +0,0 @@
/* 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 "tubesclienthandler.h"
#include "tubesrfbserver.h"
#include <TelepathyQt4/Constants>
#include <TelepathyQt4/Debug>
#include <KDebug>
using namespace Tp;
static inline Tp::ChannelClassList channelClassList()
{
QMap<QString, QDBusVariant> filter0;
filter0[TELEPATHY_INTERFACE_CHANNEL ".ChannelType"] =
QDBusVariant(TELEPATHY_INTERFACE_CHANNEL_TYPE_STREAM_TUBE);
filter0[TELEPATHY_INTERFACE_CHANNEL_TYPE_STREAM_TUBE ".Service"] = QDBusVariant("rfb");
filter0[TELEPATHY_INTERFACE_CHANNEL ".Requested"] = QDBusVariant(true);
return Tp::ChannelClassList() << Tp::ChannelClass(filter0);
}
TubesClientHandler::TubesClientHandler()
: AbstractClientHandler(channelClassList(), false)
{
kDebug();
Tp::enableDebug(false);
Tp::enableWarnings(true);
/* Registering telepathy types */
registerTypes();
}
TubesClientHandler::~TubesClientHandler()
{
kDebug();
}
bool TubesClientHandler::bypassApproval() const
{
// Don't bypass approval of channels.
return false;
}
void TubesClientHandler::handleChannels(const Tp::MethodInvocationContextPtr<> &context,
const Tp::AccountPtr &account,
const Tp::ConnectionPtr &connection,
const QList<Tp::ChannelPtr> &channels,
const QList<Tp::ChannelRequestPtr> &requestsSatisfied,
const QDateTime &userActionTime,
const QVariantMap &handlerInfo)
{
kDebug();
Q_UNUSED(account);
Q_UNUSED(connection);
Q_UNUSED(requestsSatisfied);
Q_UNUSED(userActionTime);
Q_UNUSED(handlerInfo);
foreach(const Tp::ChannelPtr &channel, channels) {
kDebug() << "Incoming channel: " << channel;
QVariantMap properties = channel->immutableProperties();
if (properties[TELEPATHY_INTERFACE_CHANNEL ".ChannelType"] ==
TELEPATHY_INTERFACE_CHANNEL_TYPE_STREAM_TUBE) {
kDebug() << "Channel is a stream tube. Handling: " << channel;
new TubesRfbServer(channel);
}
}
context->setFinished();
}

View File

@@ -1,45 +0,0 @@
/* 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.
*/
#ifndef KRFB_TUBESCLIENTHANDLER_H
#define KRFB_TUBESCLIENTHANDLER_H
#include <TelepathyQt4/AbstractClientHandler>
class TubesClientHandler : public Tp::AbstractClientHandler
{
public:
TubesClientHandler();
virtual ~TubesClientHandler();
virtual bool bypassApproval() const;
virtual void handleChannels(const Tp::MethodInvocationContextPtr<> &context,
const Tp::AccountPtr &account,
const Tp::ConnectionPtr &connection,
const QList<Tp::ChannelPtr> &channels,
const QList<Tp::ChannelRequestPtr> &requestsSatisfied,
const QDateTime &userActionTime,
const QVariantMap &handlerInfo);
};
#endif // Header guard

View File

@@ -19,7 +19,7 @@
#define TUBESRFBCLIENT_H
#include "rfbclient.h"
#include <TelepathyQt4/Contact>
#include <TelepathyQt/Contact>
class TubesRfbClient : public RfbClient
{

View File

@@ -1,5 +1,5 @@
/*
Copyright (C) 2009-2010 Collabora Ltd. <info@collabora.co.uk>
Copyright (C) 2009-2011 Collabora Ltd. <info@collabora.co.uk>
@author George Goldberg <george.goldberg@collabora.co.uk>
@author George Kiagiadakis <george.kiagiadakis@collabora.co.uk>
@@ -20,71 +20,89 @@
#include "tubesrfbclient.h"
#include "sockethelpers.h"
#include <QtGui/QApplication>
#include <KDebug>
#include <KMessageBox>
#include <KLocale>
#include <KRandom>
#include <TelepathyQt4/Connection>
#include <TelepathyQt4/Contact>
#include <TelepathyQt4/ContactManager>
#include <TelepathyQt4/PendingContacts>
#include <TelepathyQt4/PendingOperation>
#include <TelepathyQt4/PendingReady>
#include <TelepathyQt/Debug>
#include <TelepathyQt/Contact>
#include <TelepathyQt/AccountFactory>
#include <TelepathyQt/ConnectionFactory>
#include <TelepathyQt/ContactFactory>
#include <TelepathyQt/ChannelFactory>
#include <TelepathyQt/OutgoingStreamTubeChannel>
#include <TelepathyQt/StreamTubeServer>
/* workaround for QtDBus bug */
struct StreamTubeAddress
{
QString address;
uint port;
};
Q_DECLARE_METATYPE(StreamTubeAddress);
//Marshall the StreamTubeAddress data into a D-Bus argument
QDBusArgument &operator<<(QDBusArgument &argument,
const StreamTubeAddress &streamTubeAddress)
{
argument.beginStructure();
argument << streamTubeAddress.address << streamTubeAddress.port;
argument.endStructure();
return argument;
}
// Retrieve the StreamTubeAddress data from the D-Bus argument
const QDBusArgument &operator>>(const QDBusArgument &argument,
StreamTubeAddress &streamTubeAddress)
{
argument.beginStructure();
argument >> streamTubeAddress.address >> streamTubeAddress.port;
argument.endStructure();
return argument;
}
//**************
struct TubesRfbServer::Private
{
Tp::ChannelPtr channel;
QHash<int, Tp::ContactPtr> contactsPerPort;
QHash<int, PendingTubesRfbClient*> clientsPerPort;
Tp::StreamTubeServerPtr stubeServer;
QHash<quint16, Tp::ContactPtr> contactsPerPort;
QHash<quint16, PendingTubesRfbClient*> clientsPerPort;
};
TubesRfbServer::TubesRfbServer(const Tp::ChannelPtr & channel, QObject *parent)
void TubesRfbServer::init()
{
new TubesRfbServer();
//RfbServerManager takes care of deletion
}
TubesRfbServer::TubesRfbServer(QObject *parent)
: RfbServer(parent), d(new Private)
{
kDebug() << "starting ";
kDebug() << "starting";
/* Registering struct containing the tube address */
qDBusRegisterMetaType<StreamTubeAddress>();
Tp::enableDebug(true);
Tp::enableWarnings(true);
Tp::registerTypes();
d->channel = channel;
connect(d->channel->becomeReady(),
SIGNAL(finished(Tp::PendingOperation *)),
SLOT(onChannelReady(Tp::PendingOperation *)));
Tp::AccountFactoryPtr accountFactory = Tp::AccountFactory::create(
QDBusConnection::sessionBus(), Tp::Account::FeatureCore);
setListeningPort(6789);
setListeningAddress("127.0.0.1"); // Listen only on the loopback network interface
Tp::ConnectionFactoryPtr connectionFactory = Tp::ConnectionFactory::create(
QDBusConnection::sessionBus(), Tp::Connection::FeatureCore);
Tp::ChannelFactoryPtr channelFactory = Tp::ChannelFactory::create(
QDBusConnection::sessionBus());
Tp::ContactFactoryPtr contactFactory = Tp::ContactFactory::create(
Tp::Contact::FeatureAlias);
d->stubeServer = Tp::StreamTubeServer::create(
QStringList() << QLatin1String("rfb"),
QStringList(),
QLatin1String("krfb_rfb_handler"),
true,
accountFactory,
connectionFactory,
channelFactory,
contactFactory);
connect(d->stubeServer.data(),
SIGNAL(tubeRequested(Tp::AccountPtr,Tp::OutgoingStreamTubeChannelPtr,
QDateTime,Tp::ChannelRequestHints)),
SLOT(onTubeRequested()));
connect(d->stubeServer.data(),
SIGNAL(tubeClosed(Tp::AccountPtr,Tp::OutgoingStreamTubeChannelPtr,QString,QString)),
SLOT(onTubeClosed()));
connect(d->stubeServer.data(),
SIGNAL(newTcpConnection(QHostAddress,quint16,Tp::AccountPtr,
Tp::ContactPtr,Tp::OutgoingStreamTubeChannelPtr)),
SLOT(onNewTcpConnection(QHostAddress,quint16,Tp::AccountPtr,
Tp::ContactPtr,Tp::OutgoingStreamTubeChannelPtr)));
connect(d->stubeServer.data(),
SIGNAL(tcpConnectionClosed(QHostAddress,quint16,Tp::AccountPtr,Tp::ContactPtr,
QString,QString,Tp::OutgoingStreamTubeChannelPtr)),
SLOT(onTcpConnectionClosed(QHostAddress,quint16,Tp::AccountPtr,Tp::ContactPtr,
QString,QString,Tp::OutgoingStreamTubeChannelPtr)));
// Pick a random port in the private range (4915265535)
setListeningPort((KRandom::random() % 16383) + 49152);
// Listen only on the loopback network interface
setListeningAddress("127.0.0.1");
setPasswordRequired(false);
QTimer::singleShot(0, this, SLOT(startAndCheck()));
}
TubesRfbServer::~TubesRfbServer()
@@ -93,12 +111,80 @@ TubesRfbServer::~TubesRfbServer()
delete d;
}
void TubesRfbServer::startAndCheck()
{
if (!start()) {
//try a few times with different ports
bool ok = false;
for (int i=0; !ok && i<5; i++) {
setListeningPort((KRandom::random() % 16383) + 49152);
ok = start();
}
if (!ok) {
kError() << "Failed to start tubes rfb server";
return;
}
}
//TODO listeningAddress() should be a QHostAddress
d->stubeServer->exportTcpSocket(QHostAddress(QString::fromAscii(listeningAddress())),
listeningPort());
}
void TubesRfbServer::onTubeRequested()
{
kDebug() << "Got a tube";
}
void TubesRfbServer::onTubeClosed()
{
kDebug() << "tube closed";
}
void TubesRfbServer::onNewTcpConnection(const QHostAddress & sourceAddress,
quint16 sourcePort,
const Tp::AccountPtr & account,
const Tp::ContactPtr & contact,
const Tp::OutgoingStreamTubeChannelPtr & tube)
{
Q_UNUSED(account);
Q_UNUSED(tube);
kDebug() << "CM signaled tube connection from" << sourceAddress << ":" << sourcePort;
d->contactsPerPort[sourcePort] = contact;
if (d->clientsPerPort.contains(sourcePort)) {
kDebug() << "client already exists";
d->clientsPerPort[sourcePort]->setContact(contact);
}
}
void TubesRfbServer::onTcpConnectionClosed(const QHostAddress& sourceAddress,
quint16 sourcePort,
const Tp::AccountPtr& account,
const Tp::ContactPtr& contact,
const QString& error,
const QString& message,
const Tp::OutgoingStreamTubeChannelPtr& tube)
{
Q_UNUSED(account);
Q_UNUSED(contact);
Q_UNUSED(tube);
kDebug() << "Connection from" << sourceAddress << ":" << sourcePort << "closed."
<< error << message;
d->clientsPerPort.remove(sourcePort);
d->contactsPerPort.remove(sourcePort);
}
PendingRfbClient* TubesRfbServer::newClient(rfbClientPtr client)
{
kDebug() << "new tubes client";
PendingTubesRfbClient *c = new PendingTubesRfbClient(client, this);
int port = peerPort(client->sock);
quint16 port = peerPort(client->sock);
kDebug() << "new tube client on port" << port;
d->clientsPerPort[port] = c;
if (d->contactsPerPort.contains(port)) {
@@ -109,186 +195,4 @@ PendingRfbClient* TubesRfbServer::newClient(rfbClientPtr client)
return c;
}
/************************** TP TUBES CODE ************************************/
void TubesRfbServer::close()
{
kDebug();
d->channel->requestClose();
}
void TubesRfbServer::cleanup()
{
kDebug();
d->clientsPerPort.clear();
d->contactsPerPort.clear();
stop();
deleteLater();
}
void TubesRfbServer::onChannelReady(Tp::PendingOperation *op)
{
kDebug();
if (op->isError()) {
kWarning() << "Getting channel ready faied:" << op->errorName() << op->errorMessage();
KMessageBox::error(QApplication::activeWindow(),
i18n("An error occurred sharing your desktop."),
i18n("Error"));
cleanup();
return;
}
Tp::Contacts contacts = d->channel->groupContacts();
Tp::ContactManager *contactManager = d->channel->connection()->contactManager();
if (!contactManager) {
kWarning() << "Invalid Contact Manager.";
KMessageBox::error(QApplication::activeWindow(),
i18n("An unknown error occurred sharing your desktop."),
i18n("Error"));
close();
return;
}
QSet<Tp::Contact::Feature> features;
features << Tp::Contact::FeatureAlias;
connect(contactManager->upgradeContacts(contacts.toList(), features),
SIGNAL(finished(Tp::PendingOperation*)),
SLOT(onContactsUpgraded(Tp::PendingOperation*)));
}
void TubesRfbServer::onContactsUpgraded(Tp::PendingOperation *op)
{
kDebug();
if (op->isError()) {
kWarning() << "Upgrading contacts failed:" << op->errorName() << op->errorMessage();
KMessageBox::error(QApplication::activeWindow(),
i18n("An unknown error occurred sharing your desktop."),
i18n("Error"));
close();
return;
}
offerTube();
}
void TubesRfbServer::offerTube()
{
kDebug() << "Channel is ready!";
//start the rfb server
if (!start()) {
kWarning() << "Could not start rfb server";
KMessageBox::error(QApplication::activeWindow(),
i18n("Failed to activate the rfb server."),
i18n("Error"));
close();
return;
}
connect(d->channel.data(),
SIGNAL(invalidated(Tp::DBusProxy*, const QString&, const QString&)),
SLOT(onChannelInvalidated(Tp::DBusProxy*, const QString&,
const QString&)));
/* Interface used to control the tube state */
Tp::Client::ChannelInterfaceTubeInterface *tubeInterface = d->channel->tubeInterface();
/* Interface used to control stream tube */
Tp::Client::ChannelTypeStreamTubeInterface *streamTubeInterface = d->channel->streamTubeInterface();
if (streamTubeInterface && tubeInterface) {
kDebug() << "Offering tube";
connect(tubeInterface,
SIGNAL(TubeChannelStateChanged(uint)),
SLOT(onTubeStateChanged(uint)));
// Offer the stream tube
StreamTubeAddress streamTubeAddress;
streamTubeAddress.address = listeningAddress();
streamTubeAddress.port = listeningPort();
kDebug() << "Offering:" << streamTubeAddress.port << streamTubeAddress.address;
QDBusVariant address;
address.setVariant(qVariantFromValue(streamTubeAddress));
QDBusPendingReply<> ret = streamTubeInterface->Offer(
uint(Tp::SocketAddressTypeIPv4),
address,
uint(Tp::SocketAccessControlPort),
QVariantMap());
connect(new QDBusPendingCallWatcher(ret, this), SIGNAL(finished(QDBusPendingCallWatcher*)),
SLOT(onOfferTubeFinished(QDBusPendingCallWatcher*)));
connect(streamTubeInterface,
SIGNAL(NewRemoteConnection(uint, QDBusVariant, uint)),
SLOT(onNewRemoteConnection(uint, QDBusVariant, uint)));
}
}
void TubesRfbServer::onOfferTubeFinished(QDBusPendingCallWatcher *watcher)
{
QDBusPendingReply<void> reply = *watcher;
if (reply.isError()) {
kWarning() << "Offer tube failed:" << reply.error();
if (reply.error().name() == TELEPATHY_ERROR_NOT_AVAILABLE) {
KMessageBox::error(QApplication::activeWindow(),
i18n("An error occurred sharing your desktop. The person you are "
"trying to share your desktop with does not have the required "
"software installed to access it."),
i18n("Error"));
} else {
KMessageBox::error(QApplication::activeWindow(),
i18n("An unknown error occurred sharing your desktop."),
i18n("Error"));
}
} else {
kDebug() << "Offer Tube succeeded.";
}
}
void TubesRfbServer::onTubeStateChanged(uint state)
{
kDebug() << "Tube state changed:" << state;
}
void TubesRfbServer::onNewRemoteConnection(uint handle, QDBusVariant connectionParam, uint connectionId)
{
Q_UNUSED(connectionId);
QVariant v = connectionParam.variant();
kDebug() << "variant:" << v;
StreamTubeAddress ipv4address = qdbus_cast<StreamTubeAddress>(v);
kDebug() << "NewRemoteConnection: port:" << ipv4address.port << ipv4address.address;
Q_FOREACH(const Tp::ContactPtr & c, d->channel->groupContacts()) {
if (c->handle().value(0) == handle) {
d->contactsPerPort[ipv4address.port] = c;
if (d->clientsPerPort.contains(ipv4address.port)) {
kDebug() << "client already exists";
d->clientsPerPort[ipv4address.port]->setContact(c);
}
break;
}
}
}
void TubesRfbServer::onChannelInvalidated(Tp::DBusProxy *proxy,
const QString &errorName, const QString &errorMessage)
{
Q_UNUSED(proxy);
kDebug() << "Tube channel invalidated:" << errorName << errorMessage;
cleanup();
}
#include "tubesrfbserver.moc"

View File

@@ -1,5 +1,5 @@
/*
Copyright (C) 2009-2010 Collabora Ltd. <info@collabora.co.uk>
Copyright (C) 2009-2011 Collabora Ltd. <info@collabora.co.uk>
@author George Goldberg <george.goldberg@collabora.co.uk>
@author George Kiagiadakis <george.kiagiadakis@collabora.co.uk>
@@ -20,29 +20,43 @@
#define TUBESRFBSERVER_H
#include "rfbserver.h"
#include <TelepathyQt4/Channel>
#include <QtNetwork/QHostAddress>
#include <TelepathyQt/Types>
class TubesRfbServer : public RfbServer
{
Q_OBJECT
public:
TubesRfbServer(const Tp::ChannelPtr & channel, QObject* parent = 0);
static void init();
virtual ~TubesRfbServer();
protected:
TubesRfbServer(QObject *parent = 0);
virtual PendingRfbClient* newClient(rfbClientPtr client);
private Q_SLOTS:
void close();
void cleanup();
void onChannelReady(Tp::PendingOperation *op);
void onContactsUpgraded(Tp::PendingOperation *op);
void offerTube();
void onOfferTubeFinished(QDBusPendingCallWatcher *watcher);
void onTubeStateChanged(uint state);
void onNewRemoteConnection(uint handle, QDBusVariant connectionParam, uint connectionId);
void onChannelInvalidated(Tp::DBusProxy *proxy,
const QString &errorName,
const QString &errorMessage);
void startAndCheck();
void onTubeRequested();
void onTubeClosed();
void onNewTcpConnection(
const QHostAddress &sourceAddress,
quint16 sourcePort,
const Tp::AccountPtr &account,
const Tp::ContactPtr &contact,
const Tp::OutgoingStreamTubeChannelPtr &tube);
void onTcpConnectionClosed(
const QHostAddress &sourceAddress,
quint16 sourcePort,
const Tp::AccountPtr &account,
const Tp::ContactPtr &contact,
const QString &error,
const QString &message,
const Tp::OutgoingStreamTubeChannelPtr &tube);
private:
struct Private;

View File

@@ -1,4 +1,16 @@
project(libvncserver)
# Striped down version of libvncserver's original CMakeLists.txt
project(LibVNCServer)
include(CheckFunctionExists)
include(CheckIncludeFile)
include(CheckTypeSize)
include(TestBigEndian)
include(MacroBoolTo01)
set(FULL_PACKAGE_NAME "Krfb LibVNCServer")
set(PACKAGE_VERSION "0.9.8-10-g17ce0c5")
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
macro_optional_find_package(ZLIB)
macro_log_feature(ZLIB_FOUND "ZLib" "The Zlib compression library" "http://www.zlib.net" FALSE "" "Used by the vncserver library.")
@@ -6,36 +18,61 @@ macro_log_feature(ZLIB_FOUND "ZLib" "The Zlib compression library" "http://www.z
macro_optional_find_package(JPEG)
macro_log_feature(JPEG_FOUND "LibJPEG" "The JPEG library" "" FALSE "" "Used by the vncserver library")
include(CheckIncludeFiles)
include(CheckFunctionExists)
include(CheckCXXSourceCompiles)
include(TestBigEndian)
macro_bool_to_01(ZLIB_FOUND LIBVNCSERVER_HAVE_LIBZ)
macro_bool_to_01(JPEG_FOUND LIBVNCSERVER_HAVE_LIBJPEG)
option(LIBVNCSERVER_ALLOW24BPP "Allow 24 bpp" ON)
# if(GNUTLS_FOUND)
# set(LIBVNCSERVER_WITH_CLIENT_TLS 1)
# endif(GNUTLS_FOUND)
# if(LIBGCRYPT_LIBRARIES)
# message(STATUS "Found libgcrypt: ${LIBGCRYPT_LIBRARIES}")
# set(LIBVNCSERVER_WITH_CLIENT_GCRYPT 1)
# endif(LIBGCRYPT_LIBRARIES)
check_include_files(fcntl.h LIBVNCSERVER_HAVE_FCNTL_H)
check_include_files(unistd.h LIBVNCSERVER_HAVE_UNISTD_H)
check_include_files(sys/socket.h LIBVNCSERVER_HAVE_SYS_SOCKET_H)
check_include_files(sys/types.h LIBVNCSERVER_HAVE_SYS_TYPES_H)
check_include_files(sys/stat.h LIBVNCSERVER_HAVE_SYS_STAT_H)
check_include_files(sys/time.h LIBVNCSERVER_HAVE_SYS_TIME_H)
check_include_files(netinet/in.h LIBVNCSERVER_HAVE_NETINET_IN_H)
check_include_files(stdint.h LIBVNCSERVER_HAVE_STDINT_H)
check_include_files(ifaddrs.h LIBVNCSERVER_HAVE_IFADDRS_H)
check_function_exists(gettimeofday LIBVNCSERVER_HAVE_GETTIMEOFDAY)
check_include_file("fcntl.h" LIBVNCSERVER_HAVE_FCNTL_H)
check_include_file("netinet/in.h" LIBVNCSERVER_HAVE_NETINET_IN_H)
check_include_file("sys/socket.h" LIBVNCSERVER_HAVE_SYS_SOCKET_H)
check_include_file("sys/stat.h" LIBVNCSERVER_HAVE_SYS_STAT_H)
check_include_file("sys/time.h" LIBVNCSERVER_HAVE_SYS_TIME_H)
check_include_file("sys/types.h" LIBVNCSERVER_HAVE_SYS_TYPES_H)
check_include_file("sys/wait.h" LIBVNCSERVER_HAVE_SYS_WAIT_H)
check_include_file("unistd.h" LIBVNCSERVER_HAVE_UNISTD_H)
# headers needed for check_type_size()
check_include_file("arpa/inet.h" HAVE_ARPA_INET_H)
check_include_file("stdint.h" HAVE_STDINT_H)
check_include_file("stddef.h" HAVE_STDDEF_H)
check_include_file("sys/types.h" HAVE_SYS_TYPES_H)
check_function_exists(gettimeofday LIBVNCSERVER_HAVE_GETTIMEOFDAY)
macro_bool_to_01(CMAKE_USE_PTHREADS_INIT LIBVNCSERVER_HAVE_LIBPTHREAD)
if(LIBVNCSERVER_HAVE_SYS_SOCKET_H)
# socklen_t
list(APPEND CMAKE_EXTRA_INCLUDE_FILES "sys/socket.h")
endif(LIBVNCSERVER_HAVE_SYS_SOCKET_H)
if(HAVE_ARPA_INET_H)
# in_addr_t
list(APPEND CMAKE_EXTRA_INCLUDE_FILES "arpa/inet.h")
endif(HAVE_ARPA_INET_H)
check_type_size(pid_t LIBVNCSERVER_PID_T)
check_type_size(size_t LIBVNCSERVER_SIZE_T)
check_type_size(socklen_t LIBVNCSERVER_SOCKLEN_T)
check_type_size(in_addr_t LIBVNCSERVER_IN_ADDR_T)
if(NOT HAVE_LIBVNCSERVER_IN_ADDR_T)
set(LIBVNCSERVER_NEED_INADDR_T 1)
endif(NOT HAVE_LIBVNCSERVER_IN_ADDR_T)
test_big_endian(LIBVNCSERVER_WORDS_BIGENDIAN)
set(LIBVNCSERVER_PACKAGE_STRING "Krfb ${KDE_VERSION} - LibVNCServer 0.9.7")
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/libvncserver-config.h.cmake
${CMAKE_CURRENT_BINARY_DIR}/libvncserver-config.h
)
set(LIBVNCSERVER_SRCS
set(LIBVNCSERVER_SOURCES
main.c
rfbserver.c
rfbregion.c
@@ -60,24 +97,36 @@ set(LIBVNCSERVER_SRCS
scale.c
)
if (ZLIB_FOUND)
include_directories(${ZLIB_INCLUDE_DIRS})
set(LIBVNCSERVER_SRCS ${LIBVNCSERVER_SRCS} zlib.c zrle.c zrleoutstream.c zrlepalettehelper.c zywrletemplate.c)
if(ZLIB_FOUND)
add_definitions(-DLIBVNCSERVER_HAVE_LIBZ)
include_directories(${ZLIB_INCLUDE_DIR})
set(LIBVNCSERVER_SOURCES
${LIBVNCSERVER_SOURCES}
zlib.c
zrle.c
zrleoutstream.c
zrlepalettehelper.c
)
endif(ZLIB_FOUND)
if (JPEG_FOUND)
include_directories(${JPEG_INCLUDE_DIR})
set(LIBVNCSERVER_SRCS ${LIBVNCSERVER_SRCS} tight.c)
endif()
endif()
if(JPEG_FOUND)
add_definitions(-DLIBVNCSERVER_HAVE_LIBJPEG)
include_directories(${JPEG_INCLUDE_DIR})
set(LIBVNCSERVER_SOURCES
${LIBVNCSERVER_SOURCES}
tight.c
)
endif(JPEG_FOUND)
add_library(vncserver STATIC ${LIBVNCSERVER_SRCS})
add_library(vncserver STATIC ${LIBVNCSERVER_SOURCES})
if(WIN32)
set(ADDITIONAL_LIBS ws2_32)
endif(WIN32)
if (ZLIB_FOUND)
target_link_libraries(vncserver ${ZLIB_LIBRARIES})
if (JPEG_FOUND)
target_link_libraries(vncserver ${JPEG_LIBRARIES})
endif()
endif()
target_link_libraries(vncserver
${ADDITIONAL_LIBS}
${ZLIB_LIBRARIES}
${JPEG_LIBRARIES}
)

0
libvncserver/auth.c Executable file → Normal file
View File

88
libvncserver/corre.c Executable file → Normal file
View File

@@ -30,37 +30,19 @@
#include "rfb/rfb.h"
/*
* rreBeforeBuf contains pixel data in the client's format.
* rreAfterBuf contains the RRE encoded version. If the RRE encoded version is
* larger than the raw data or if it exceeds rreAfterBufSize then
* cl->beforeEncBuf contains pixel data in the client's format.
* cl->afterEncBuf contains the RRE encoded version. If the RRE encoded version is
* larger than the raw data or if it exceeds cl->afterEncBufSize then
* raw encoding is used instead.
*/
static int rreBeforeBufSize = 0;
static char *rreBeforeBuf = NULL;
static int rreAfterBufSize = 0;
static char *rreAfterBuf = NULL;
static int rreAfterBufLen = 0;
static int subrectEncode8(uint8_t *data, int w, int h);
static int subrectEncode16(uint16_t *data, int w, int h);
static int subrectEncode32(uint32_t *data, int w, int h);
static int subrectEncode8(rfbClientPtr cl, uint8_t *data, int w, int h);
static int subrectEncode16(rfbClientPtr cl, uint16_t *data, int w, int h);
static int subrectEncode32(rfbClientPtr cl, uint32_t *data, int w, int h);
static uint32_t getBgColour(char *data, int size, int bpp);
static rfbBool rfbSendSmallRectEncodingCoRRE(rfbClientPtr cl, int x, int y,
int w, int h);
void rfbCoRRECleanup(rfbScreenInfoPtr screen)
{
if (rreBeforeBufSize) {
free(rreBeforeBuf);
rreBeforeBufSize=0;
}
if (rreAfterBufSize) {
free(rreAfterBuf);
rreAfterBufSize=0;
}
}
/*
* rfbSendRectEncodingCoRRE - send an arbitrary size rectangle using CoRRE
@@ -114,35 +96,35 @@ rfbSendSmallRectEncodingCoRRE(rfbClientPtr cl,
int maxRawSize = (cl->scaledScreen->width * cl->scaledScreen->height
* (cl->format.bitsPerPixel / 8));
if (rreBeforeBufSize < maxRawSize) {
rreBeforeBufSize = maxRawSize;
if (rreBeforeBuf == NULL)
rreBeforeBuf = (char *)malloc(rreBeforeBufSize);
if (cl->beforeEncBufSize < maxRawSize) {
cl->beforeEncBufSize = maxRawSize;
if (cl->beforeEncBuf == NULL)
cl->beforeEncBuf = (char *)malloc(cl->beforeEncBufSize);
else
rreBeforeBuf = (char *)realloc(rreBeforeBuf, rreBeforeBufSize);
cl->beforeEncBuf = (char *)realloc(cl->beforeEncBuf, cl->beforeEncBufSize);
}
if (rreAfterBufSize < maxRawSize) {
rreAfterBufSize = maxRawSize;
if (rreAfterBuf == NULL)
rreAfterBuf = (char *)malloc(rreAfterBufSize);
if (cl->afterEncBufSize < maxRawSize) {
cl->afterEncBufSize = maxRawSize;
if (cl->afterEncBuf == NULL)
cl->afterEncBuf = (char *)malloc(cl->afterEncBufSize);
else
rreAfterBuf = (char *)realloc(rreAfterBuf, rreAfterBufSize);
cl->afterEncBuf = (char *)realloc(cl->afterEncBuf, cl->afterEncBufSize);
}
(*cl->translateFn)(cl->translateLookupTable,&(cl->screen->serverFormat),
&cl->format, fbptr, rreBeforeBuf,
&cl->format, fbptr, cl->beforeEncBuf,
cl->scaledScreen->paddedWidthInBytes, w, h);
switch (cl->format.bitsPerPixel) {
case 8:
nSubrects = subrectEncode8((uint8_t *)rreBeforeBuf, w, h);
nSubrects = subrectEncode8(cl, (uint8_t *)cl->beforeEncBuf, w, h);
break;
case 16:
nSubrects = subrectEncode16((uint16_t *)rreBeforeBuf, w, h);
nSubrects = subrectEncode16(cl, (uint16_t *)cl->beforeEncBuf, w, h);
break;
case 32:
nSubrects = subrectEncode32((uint32_t *)rreBeforeBuf, w, h);
nSubrects = subrectEncode32(cl, (uint32_t *)cl->beforeEncBuf, w, h);
break;
default:
rfbLog("getBgColour: bpp %d?\n",cl->format.bitsPerPixel);
@@ -157,7 +139,7 @@ rfbSendSmallRectEncodingCoRRE(rfbClientPtr cl,
}
rfbStatRecordEncodingSent(cl,rfbEncodingCoRRE,
sz_rfbFramebufferUpdateRectHeader + sz_rfbRREHeader + rreAfterBufLen,
sz_rfbFramebufferUpdateRectHeader + sz_rfbRREHeader + cl->afterEncBufLen,
sz_rfbFramebufferUpdateRectHeader + w * h * (cl->format.bitsPerPixel / 8));
if (cl->ublen + sz_rfbFramebufferUpdateRectHeader + sz_rfbRREHeader
@@ -182,15 +164,15 @@ rfbSendSmallRectEncodingCoRRE(rfbClientPtr cl,
memcpy(&cl->updateBuf[cl->ublen], (char *)&hdr, sz_rfbRREHeader);
cl->ublen += sz_rfbRREHeader;
for (i = 0; i < rreAfterBufLen;) {
for (i = 0; i < cl->afterEncBufLen;) {
int bytesToCopy = UPDATE_BUF_SIZE - cl->ublen;
if (i + bytesToCopy > rreAfterBufLen) {
bytesToCopy = rreAfterBufLen - i;
if (i + bytesToCopy > cl->afterEncBufLen) {
bytesToCopy = cl->afterEncBufLen - i;
}
memcpy(&cl->updateBuf[cl->ublen], &rreAfterBuf[i], bytesToCopy);
memcpy(&cl->updateBuf[cl->ublen], &cl->afterEncBuf[i], bytesToCopy);
cl->ublen += bytesToCopy;
i += bytesToCopy;
@@ -210,7 +192,7 @@ rfbSendSmallRectEncodingCoRRE(rfbClientPtr cl,
* subrectEncode() encodes the given multicoloured rectangle as a background
* colour overwritten by single-coloured rectangles. It returns the number
* of subrectangles in the encoded buffer, or -1 if subrect encoding won't
* fit in the buffer. It puts the encoded rectangles in rreAfterBuf. The
* fit in the buffer. It puts the encoded rectangles in cl->afterEncBuf. The
* single-colour rectangle partition is not optimal, but does find the biggest
* horizontal or vertical rectangle top-left anchored to each consecutive
* coordinate position.
@@ -221,7 +203,7 @@ rfbSendSmallRectEncodingCoRRE(rfbClientPtr cl,
#define DEFINE_SUBRECT_ENCODE(bpp) \
static int \
subrectEncode##bpp(uint##bpp##_t *data, int w, int h) { \
subrectEncode##bpp(rfbClientPtr client, uint##bpp##_t *data, int w, int h) { \
uint##bpp##_t cl; \
rfbCoRRERectangle subrect; \
int x,y; \
@@ -236,9 +218,9 @@ subrectEncode##bpp(uint##bpp##_t *data, int w, int h) { \
int newLen; \
uint##bpp##_t bg = (uint##bpp##_t)getBgColour((char*)data,w*h,bpp); \
\
*((uint##bpp##_t*)rreAfterBuf) = bg; \
*((uint##bpp##_t*)client->afterEncBuf) = bg; \
\
rreAfterBufLen = (bpp/8); \
client->afterEncBufLen = (bpp/8); \
\
for (y=0; y<h; y++) { \
line = data+(y*w); \
@@ -283,15 +265,15 @@ subrectEncode##bpp(uint##bpp##_t *data, int w, int h) { \
subrect.w = thew; \
subrect.h = theh; \
\
newLen = rreAfterBufLen + (bpp/8) + sz_rfbCoRRERectangle; \
if ((newLen > (w * h * (bpp/8))) || (newLen > rreAfterBufSize)) \
newLen = client->afterEncBufLen + (bpp/8) + sz_rfbCoRRERectangle; \
if ((newLen > (w * h * (bpp/8))) || (newLen > client->afterEncBufSize)) \
return -1; \
\
numsubs += 1; \
*((uint##bpp##_t*)(rreAfterBuf + rreAfterBufLen)) = cl; \
rreAfterBufLen += (bpp/8); \
memcpy(&rreAfterBuf[rreAfterBufLen],&subrect,sz_rfbCoRRERectangle); \
rreAfterBufLen += sz_rfbCoRRERectangle; \
*((uint##bpp##_t*)(client->afterEncBuf + client->afterEncBufLen)) = cl; \
client->afterEncBufLen += (bpp/8); \
memcpy(&client->afterEncBuf[client->afterEncBufLen],&subrect,sz_rfbCoRRERectangle); \
client->afterEncBufLen += sz_rfbCoRRERectangle; \
\
/* \
* Now mark the subrect as done. \

View File

@@ -410,7 +410,7 @@ void rfbMakeXCursorFromRichCursor(rfbScreenInfoPtr rfbScreen,rfbCursorPtr cursor
for(i=0,bit=0x80;i<cursor->width;i++,bit=(bit&1)?0x80:bit>>1) {
if (interp) {
int r = 0, g = 0, b = 0, grey;
char *p = cursor->richSource+j*width+i*bpp;
unsigned char *p = cursor->richSource+j*width+i*bpp;
if (bpp == 1) {
unsigned char* uc = (unsigned char*) p;
SETRGB(uc);
@@ -693,10 +693,13 @@ void rfbRedrawAfterHideCursor(rfbClientPtr cl,sraRegionPtr updateRegion)
if(sraClipRect2(&x,&y,&x2,&y2,0,0,s->width,s->height)) {
sraRegionPtr rect;
rect = sraRgnCreateRect(x,y,x2,y2);
if(updateRegion)
if(updateRegion) {
sraRgnOr(updateRegion,rect);
else
} else {
LOCK(cl->updateMutex);
sraRgnOr(cl->modifiedRegion,rect);
UNLOCK(cl->updateMutex);
}
sraRgnDestroy(rect);
}
}

0
libvncserver/cutpaste.c Executable file → Normal file
View File

0
libvncserver/d3des.c Executable file → Normal file
View File

0
libvncserver/d3des.h Executable file → Normal file
View File

0
libvncserver/draw.c Executable file → Normal file
View File

3
libvncserver/font.c Executable file → Normal file
View File

@@ -24,7 +24,8 @@ int rfbDrawChar(rfbScreenInfoPtr rfbScreen,rfbFontDataPtr font,
d=*data;
data++;
}
if(d&0x80)
if(d&0x80 && y+j >= 0 && y+j < rfbScreen->height &&
x+i >= 0 && x+i < rfbScreen->width)
memcpy(rfbScreen->frameBuffer+(y+j)*rowstride+(x+i)*bpp,colour,bpp);
d<<=1;
}

0
libvncserver/hextile.c Executable file → Normal file
View File

28
libvncserver/httpd.c Executable file → Normal file
View File

@@ -181,7 +181,6 @@ rfbHttpCheckFds(rfbScreenInfoPtr rfbScreen)
}
if (FD_ISSET(rfbScreen->httpListenSock, &fds)) {
int flags;
if (rfbScreen->httpSock >= 0) close(rfbScreen->httpSock);
if ((rfbScreen->httpSock = accept(rfbScreen->httpListenSock,
@@ -189,35 +188,21 @@ rfbHttpCheckFds(rfbScreenInfoPtr rfbScreen)
rfbLogPerror("httpCheckFds: accept");
return;
}
#ifdef __MINGW32__
rfbErr("O_NONBLOCK on MinGW32 NOT IMPLEMENTED");
#else
#ifdef USE_LIBWRAP
if(!hosts_ctl("vnc",STRING_UNKNOWN,inet_ntoa(addr.sin_addr),
STRING_UNKNOWN)) {
rfbLog("Rejected HTTP connection from client %s\n",
inet_ntoa(addr.sin_addr));
#else
flags = fcntl(rfbScreen->httpSock, F_GETFL);
if (flags < 0 || fcntl(rfbScreen->httpSock, F_SETFL, flags | O_NONBLOCK) == -1) {
rfbLogPerror("httpCheckFds: fcntl");
#endif
close(rfbScreen->httpSock);
rfbScreen->httpSock = -1;
return;
}
flags=fcntl(rfbScreen->httpSock,F_GETFL);
if(flags==-1 ||
fcntl(rfbScreen->httpSock,F_SETFL,flags|O_NONBLOCK)==-1) {
rfbLogPerror("httpCheckFds: fcntl");
close(rfbScreen->httpSock);
rfbScreen->httpSock=-1;
return;
}
#endif
if(!rfbSetNonBlocking(rfbScreen->httpSock)) {
close(rfbScreen->httpSock);
rfbScreen->httpSock=-1;
return;
}
/*AddEnabledDevice(httpSock);*/
}
}
@@ -284,6 +269,9 @@ httpProcessInput(rfbScreenInfoPtr rfbScreen)
if (got == 0) {
rfbErr("httpd: premature connection close\n");
} else {
#ifdef WIN32
errno=WSAGetLastError();
#endif
if (errno == EAGAIN) {
return;
}

View File

@@ -1,20 +1,95 @@
#cmakedefine LIBVNCSERVER_HAVE_LIBZ
#cmakedefine LIBVNCSERVER_HAVE_LIBJPEG
#ifndef _RFB_RFBCONFIG_H
#define _RFB_RFBCONFIG_H
#define LIBVNCSERVER_PACKAGE_STRING "@LIBVNCSERVER_PACKAGE_STRING@"
/* rfb/rfbconfig.h. Generated automatically by cmake. */
#cmakedefine LIBVNCSERVER_HAVE_FCNTL_H
#cmakedefine LIBVNCSERVER_HAVE_IFADDRS_H
#cmakedefine LIBVNCSERVER_HAVE_NETINET_IN_H
#cmakedefine LIBVNCSERVER_HAVE_STDINT_H
#cmakedefine LIBVNCSERVER_HAVE_SYS_SOCKET_H
#cmakedefine LIBVNCSERVER_HAVE_SYS_TIME_H
#cmakedefine LIBVNCSERVER_HAVE_SYS_TYPES_H
#cmakedefine LIBVNCSERVER_HAVE_SYS_STAT_H
#cmakedefine LIBVNCSERVER_HAVE_UNISTD_H
#cmakedefine LIBVNCSERVER_WORDS_BIGENDIAN
/* Enable 24 bit per pixel in native framebuffer */
#cmakedefine LIBVNCSERVER_ALLOW24BPP 1
#cmakedefine LIBVNCSERVER_HAVE_GETTIMEOFDAY
/* work around when write() returns ENOENT but does not mean it */
#cmakedefine LIBVNCSERVER_ENOENT_WORKAROUND 1
#define LIBVNCSERVER_ALLOW24BPP
/* Define to 1 if you have the <fcntl.h> header file. */
#cmakedefine LIBVNCSERVER_HAVE_FCNTL_H 1
/* Define to 1 if you have the `gettimeofday' function. */
#cmakedefine LIBVNCSERVER_HAVE_GETTIMEOFDAY 1
/* Define to 1 if you have the `jpeg' library (-ljpeg). */
#cmakedefine LIBVNCSERVER_HAVE_LIBJPEG 1
/* Define to 1 if you have the `pthread' library (-lpthread). */
#cmakedefine LIBVNCSERVER_HAVE_LIBPTHREAD 1
/* Define to 1 if you have the `z' library (-lz). */
#cmakedefine LIBVNCSERVER_HAVE_LIBZ 1
/* Define to 1 if you have the <netinet/in.h> header file. */
#cmakedefine LIBVNCSERVER_HAVE_NETINET_IN_H 1
/* Define to 1 if you have the <sys/socket.h> header file. */
#cmakedefine LIBVNCSERVER_HAVE_SYS_SOCKET_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#cmakedefine LIBVNCSERVER_HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/time.h> header file. */
#cmakedefine LIBVNCSERVER_HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#cmakedefine LIBVNCSERVER_HAVE_SYS_TYPES_H 1
/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
#cmakedefine LIBVNCSERVER_HAVE_SYS_WAIT_H 1
/* Define to 1 if you have the <unistd.h> header file. */
#cmakedefine LIBVNCSERVER_HAVE_UNISTD_H 1
/* Need a typedef for in_addr_t */
#cmakedefine LIBVNCSERVER_NEED_INADDR_T 1
/* Define to the full name and version of this package. */
#define LIBVNCSERVER_PACKAGE_STRING "@FULL_PACKAGE_NAME@ @PACKAGE_VERSION@"
/* Define to the version of this package. */
#define LIBVNCSERVER_PACKAGE_VERSION "@PACKAGE_VERSION@"
/* Define to 1 if libgcrypt is present */
#cmakedefine LIBVNCSERVER_WITH_CLIENT_GCRYPT 1
/* Define to 1 if GnuTLS is present */
#cmakedefine LIBVNCSERVER_WITH_CLIENT_TLS 1
/* Define to 1 if your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */
#cmakedefine LIBVNCSERVER_WORDS_BIGENDIAN 1
/* Define to empty if `const' does not conform to ANSI C. */
#cmakedefine const @CMAKE_CONST@
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
#cmakedefine inline @CMAKE_INLINE@
#endif
/* Define to `int' if <sys/types.h> does not define. */
#cmakedefine HAVE_LIBVNCSERVER_PID_T 1
#ifndef HAVE_LIBVNCSERVER_PID_T
typedef int pid_t;
#endif
/* The type for size_t */
#cmakedefine HAVE_LIBVNCSERVER_SIZE_T 1
#ifndef HAVE_LIBVNCSERVER_SIZE_T
typedef int size_t;
#endif
/* The type for socklen */
#cmakedefine HAVE_LIBVNCSERVER_SOCKLEN_T 1
#ifndef HAVE_LIBVNCSERVER_SOCKLEN_T
typedef int socklen_t;
#endif
/* once: _RFB_RFBCONFIG_H */
#endif

View File

@@ -2,6 +2,14 @@
This file is part of the LZO real-time data compression library.
Copyright (C) 2010 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2009 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer
@@ -24,7 +32,7 @@
You should have received a copy of the GNU General Public License
along with the LZO library; see the file COPYING.
If not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Markus F.X.J. Oberhumer
<markus@oberhumer.com>
@@ -32,22 +40,19 @@
*/
#ifndef __LZOCONF_H
#define __LZOCONF_H
#ifndef __LZOCONF_H_INCLUDED
#define __LZOCONF_H_INCLUDED 1
#define LZO_VERSION 0x1080
#define LZO_VERSION_STRING "1.08"
#define LZO_VERSION_DATE "Jul 12 2002"
#define LZO_VERSION 0x2040
#define LZO_VERSION_STRING "2.04"
#define LZO_VERSION_DATE "Oct 31 2010"
/* internal Autoconf configuration file - only used when building LZO */
#if defined(LZO_HAVE_CONFIG_H)
# include <config.h>
#endif
#include <limits.h>
#ifdef __cplusplus
extern "C" {
#endif
#include <stddef.h>
/***********************************************************************
@@ -64,81 +69,39 @@ extern "C" {
# error "your limits.h macros are broken"
#endif
/* workaround a cpp bug under hpux 10.20 */
#define LZO_0xffffffffL 4294967295ul
/* get OS and architecture defines */
#ifndef __LZODEFS_H_INCLUDED
#include "lzodefs.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
/***********************************************************************
// some core defines
************************************************************************/
#if !defined(LZO_UINT32_C)
# if (UINT_MAX < LZO_0xffffffffL)
# define LZO_UINT32_C(c) c ## UL
# else
# define LZO_UINT32_C(c) c ## U
# endif
#endif
/***********************************************************************
// architecture defines
************************************************************************/
#if !defined(__LZO_WIN) && !defined(__LZO_DOS) && !defined(__LZO_OS2)
# if defined(__WINDOWS__) || defined(_WINDOWS) || defined(_Windows)
# define __LZO_WIN
# elif defined(__WIN32__) || defined(_WIN32) || defined(WIN32)
# define __LZO_WIN
# elif defined(__NT__) || defined(__NT_DLL__) || defined(__WINDOWS_386__)
# define __LZO_WIN
# elif defined(__DOS__) || defined(__MSDOS__) || defined(MSDOS)
# define __LZO_DOS
# elif defined(__OS2__) || defined(__OS2V2__) || defined(OS2)
# define __LZO_OS2
# elif defined(__palmos__)
# define __LZO_PALMOS
# elif defined(__TOS__) || defined(__atarist__)
# define __LZO_TOS
# endif
#endif
#if (UINT_MAX < LZO_0xffffffffL)
# if defined(__LZO_WIN)
# define __LZO_WIN16
# elif defined(__LZO_DOS)
# define __LZO_DOS16
# elif defined(__LZO_PALMOS)
# define __LZO_PALMOS16
# elif defined(__LZO_TOS)
# define __LZO_TOS16
# elif defined(__C166__)
# else
/* porting hint: for pure 16-bit architectures try compiling
* everything with -D__LZO_STRICT_16BIT */
# error "16-bit target not supported - contact me for porting hints"
# endif
#endif
#if !defined(__LZO_i386)
# if defined(__LZO_DOS) || defined(__LZO_WIN16)
# define __LZO_i386
# elif defined(__i386__) || defined(__386__) || defined(_M_IX86)
# define __LZO_i386
# endif
#endif
#if defined(__LZO_STRICT_16BIT)
# if (UINT_MAX < LZO_0xffffffffL)
# include <lzo16bit.h>
# define LZO_UINT32_C(c) ((c) + 0U)
# endif
#endif
/* memory checkers */
#if !defined(__LZO_CHECKER)
# if defined(__BOUNDS_CHECKING_ON)
# define __LZO_CHECKER
# define __LZO_CHECKER 1
# elif defined(__CHECKER__)
# define __LZO_CHECKER
# define __LZO_CHECKER 1
# elif defined(__INSURE__)
# define __LZO_CHECKER
# define __LZO_CHECKER 1
# elif defined(__PURIFY__)
# define __LZO_CHECKER
# define __LZO_CHECKER 1
# endif
#endif
@@ -147,7 +110,37 @@ extern "C" {
// integral and pointer types
************************************************************************/
/* Integral types with 32 bits or more */
/* lzo_uint should match size_t */
#if !defined(LZO_UINT_MAX)
# if defined(LZO_ABI_LLP64) /* WIN64 */
# if defined(LZO_OS_WIN64)
typedef unsigned __int64 lzo_uint;
typedef __int64 lzo_int;
# else
typedef unsigned long long lzo_uint;
typedef long long lzo_int;
# endif
# define LZO_UINT_MAX 0xffffffffffffffffull
# define LZO_INT_MAX 9223372036854775807LL
# define LZO_INT_MIN (-1LL - LZO_INT_MAX)
# elif defined(LZO_ABI_IP32L64) /* MIPS R5900 */
typedef unsigned int lzo_uint;
typedef int lzo_int;
# define LZO_UINT_MAX UINT_MAX
# define LZO_INT_MAX INT_MAX
# define LZO_INT_MIN INT_MIN
# elif (ULONG_MAX >= LZO_0xffffffffL)
typedef unsigned long lzo_uint;
typedef long lzo_int;
# define LZO_UINT_MAX ULONG_MAX
# define LZO_INT_MAX LONG_MAX
# define LZO_INT_MIN LONG_MIN
# else
# error "lzo_uint"
# endif
#endif
/* Integral types with 32 bits or more. */
#if !defined(LZO_UINT32_MAX)
# if (UINT_MAX >= LZO_0xffffffffL)
typedef unsigned int lzo_uint32;
@@ -166,70 +159,26 @@ extern "C" {
# endif
#endif
/* lzo_uint is used like size_t */
#if !defined(LZO_UINT_MAX)
# if (UINT_MAX >= LZO_0xffffffffL)
typedef unsigned int lzo_uint;
typedef int lzo_int;
# define LZO_UINT_MAX UINT_MAX
# define LZO_INT_MAX INT_MAX
# define LZO_INT_MIN INT_MIN
# elif (ULONG_MAX >= LZO_0xffffffffL)
typedef unsigned long lzo_uint;
typedef long lzo_int;
# define LZO_UINT_MAX ULONG_MAX
# define LZO_INT_MAX LONG_MAX
# define LZO_INT_MIN LONG_MIN
# else
# error "lzo_uint"
# endif
#endif
typedef int lzo_bool;
/***********************************************************************
// memory models
************************************************************************/
/* Memory model for the public code segment. */
#if !defined(__LZO_CMODEL)
# if defined(__LZO_DOS16) || defined(__LZO_WIN16)
# define __LZO_CMODEL __far
# elif defined(__LZO_i386) && defined(__WATCOMC__)
# define __LZO_CMODEL __near
# else
# define __LZO_CMODEL
# endif
#endif
/* Memory model for the public data segment. */
#if !defined(__LZO_DMODEL)
# if defined(__LZO_DOS16) || defined(__LZO_WIN16)
# define __LZO_DMODEL __far
# elif defined(__LZO_i386) && defined(__WATCOMC__)
# define __LZO_DMODEL __near
# else
# define __LZO_DMODEL
# endif
/* The larger type of lzo_uint and lzo_uint32. */
#if (LZO_UINT_MAX >= LZO_UINT32_MAX)
# define lzo_xint lzo_uint
#else
# define lzo_xint lzo_uint32
#endif
/* Memory model that allows to access memory at offsets of lzo_uint. */
#if !defined(__LZO_MMODEL)
# if (LZO_UINT_MAX <= UINT_MAX)
# define __LZO_MMODEL
# elif defined(__LZO_DOS16) || defined(__LZO_WIN16)
# define __LZO_MMODEL /*empty*/
# elif defined(LZO_HAVE_MM_HUGE_PTR)
# define __LZO_MMODEL_HUGE 1
# define __LZO_MMODEL __huge
# define LZO_999_UNSUPPORTED
# elif defined(__LZO_PALMOS16) || defined(__LZO_TOS16)
# define __LZO_MMODEL
# else
# error "__LZO_MMODEL"
# define __LZO_MMODEL /*empty*/
# endif
#endif
/* no typedef here because of const-pointer issues */
#define lzo_byte unsigned char __LZO_MMODEL
#define lzo_bytep unsigned char __LZO_MMODEL *
#define lzo_charp char __LZO_MMODEL *
#define lzo_voidp void __LZO_MMODEL *
@@ -239,19 +188,20 @@ typedef int lzo_bool;
#define lzo_int32p lzo_int32 __LZO_MMODEL *
#define lzo_uintp lzo_uint __LZO_MMODEL *
#define lzo_intp lzo_int __LZO_MMODEL *
#define lzo_xintp lzo_xint __LZO_MMODEL *
#define lzo_voidpp lzo_voidp __LZO_MMODEL *
#define lzo_bytepp lzo_bytep __LZO_MMODEL *
/* deprecated - use 'lzo_bytep' instead of 'lzo_byte *' */
#define lzo_byte unsigned char __LZO_MMODEL
#ifndef lzo_sizeof_dict_t
# define lzo_sizeof_dict_t sizeof(lzo_bytep)
#endif
typedef int lzo_bool;
/***********************************************************************
// calling conventions and function types
// function types
************************************************************************/
/* linkage */
/* name mangling */
#if !defined(__LZO_EXTERN_C)
# ifdef __cplusplus
# define __LZO_EXTERN_C extern "C"
@@ -262,115 +212,90 @@ typedef int lzo_bool;
/* calling convention */
#if !defined(__LZO_CDECL)
# if defined(__LZO_DOS16) || defined(__LZO_WIN16)
# define __LZO_CDECL __LZO_CMODEL __cdecl
# elif defined(__LZO_i386) && defined(_MSC_VER)
# define __LZO_CDECL __LZO_CMODEL __cdecl
# elif defined(__LZO_i386) && defined(__WATCOMC__)
# define __LZO_CDECL __LZO_CMODEL __cdecl
# else
# define __LZO_CDECL __LZO_CMODEL
# endif
# define __LZO_CDECL __lzo_cdecl
#endif
#if !defined(__LZO_ENTRY)
# define __LZO_ENTRY __LZO_CDECL
#endif
/* C++ exception specification for extern "C" function types */
#if !defined(__cplusplus)
# undef LZO_NOTHROW
# define LZO_NOTHROW
#elif !defined(LZO_NOTHROW)
# define LZO_NOTHROW
#endif
typedef int
(__LZO_ENTRY *lzo_compress_t) ( const lzo_byte *src, lzo_uint src_len,
lzo_byte *dst, lzo_uintp dst_len,
lzo_voidp wrkmem );
typedef int
(__LZO_ENTRY *lzo_decompress_t) ( const lzo_byte *src, lzo_uint src_len,
lzo_byte *dst, lzo_uintp dst_len,
lzo_voidp wrkmem );
typedef int
(__LZO_ENTRY *lzo_optimize_t) ( lzo_byte *src, lzo_uint src_len,
lzo_byte *dst, lzo_uintp dst_len,
lzo_voidp wrkmem );
typedef int
(__LZO_ENTRY *lzo_compress_dict_t)(const lzo_byte *src, lzo_uint src_len,
lzo_byte *dst, lzo_uintp dst_len,
lzo_voidp wrkmem,
const lzo_byte *dict, lzo_uint dict_len );
typedef int
(__LZO_ENTRY *lzo_decompress_dict_t)(const lzo_byte *src, lzo_uint src_len,
lzo_byte *dst, lzo_uintp dst_len,
lzo_voidp wrkmem,
const lzo_byte *dict, lzo_uint dict_len );
/* assembler versions always use __cdecl */
typedef int
(__LZO_CDECL *lzo_compress_asm_t)( const lzo_byte *src, lzo_uint src_len,
lzo_byte *dst, lzo_uintp dst_len,
lzo_voidp wrkmem );
typedef int
(__LZO_CDECL *lzo_decompress_asm_t)( const lzo_byte *src, lzo_uint src_len,
lzo_byte *dst, lzo_uintp dst_len,
lzo_voidp wrkmem );
/* a progress indicator callback function */
typedef void (__LZO_ENTRY *lzo_progress_callback_t) (lzo_uint, lzo_uint);
/***********************************************************************
// export information
************************************************************************/
/* DLL export information */
#if !defined(__LZO_EXPORT1)
# define __LZO_EXPORT1
# define __LZO_EXPORT1 /*empty*/
#endif
#if !defined(__LZO_EXPORT2)
# define __LZO_EXPORT2
# define __LZO_EXPORT2 /*empty*/
#endif
/* exported calling convention for C functions */
/* __cdecl calling convention for public C and assembly functions */
#if !defined(LZO_PUBLIC)
# define LZO_PUBLIC(_rettype) \
__LZO_EXPORT1 _rettype __LZO_EXPORT2 __LZO_ENTRY
# define LZO_PUBLIC(_rettype) __LZO_EXPORT1 _rettype __LZO_EXPORT2 __LZO_CDECL
#endif
#if !defined(LZO_EXTERN)
# define LZO_EXTERN(_rettype) __LZO_EXTERN_C LZO_PUBLIC(_rettype)
# define LZO_EXTERN(_rettype) __LZO_EXTERN_C LZO_PUBLIC(_rettype)
#endif
#if !defined(LZO_PRIVATE)
# define LZO_PRIVATE(_rettype) static _rettype __LZO_ENTRY
# define LZO_PRIVATE(_rettype) static _rettype __LZO_CDECL
#endif
/* exported __cdecl calling convention for assembler functions */
#if !defined(LZO_PUBLIC_CDECL)
# define LZO_PUBLIC_CDECL(_rettype) \
__LZO_EXPORT1 _rettype __LZO_EXPORT2 __LZO_CDECL
#endif
#if !defined(LZO_EXTERN_CDECL)
# define LZO_EXTERN_CDECL(_rettype) __LZO_EXTERN_C LZO_PUBLIC_CDECL(_rettype)
#endif
/* function types */
typedef int
(__LZO_CDECL *lzo_compress_t) ( const lzo_bytep src, lzo_uint src_len,
lzo_bytep dst, lzo_uintp dst_len,
lzo_voidp wrkmem );
/* exported global variables (LZO currently uses no static variables and
* is fully thread safe) */
#if !defined(LZO_PUBLIC_VAR)
# define LZO_PUBLIC_VAR(_type) \
__LZO_EXPORT1 _type __LZO_EXPORT2 __LZO_DMODEL
#endif
#if !defined(LZO_EXTERN_VAR)
# define LZO_EXTERN_VAR(_type) extern LZO_PUBLIC_VAR(_type)
#endif
typedef int
(__LZO_CDECL *lzo_decompress_t) ( const lzo_bytep src, lzo_uint src_len,
lzo_bytep dst, lzo_uintp dst_len,
lzo_voidp wrkmem );
typedef int
(__LZO_CDECL *lzo_optimize_t) ( lzo_bytep src, lzo_uint src_len,
lzo_bytep dst, lzo_uintp dst_len,
lzo_voidp wrkmem );
typedef int
(__LZO_CDECL *lzo_compress_dict_t)(const lzo_bytep src, lzo_uint src_len,
lzo_bytep dst, lzo_uintp dst_len,
lzo_voidp wrkmem,
const lzo_bytep dict, lzo_uint dict_len );
typedef int
(__LZO_CDECL *lzo_decompress_dict_t)(const lzo_bytep src, lzo_uint src_len,
lzo_bytep dst, lzo_uintp dst_len,
lzo_voidp wrkmem,
const lzo_bytep dict, lzo_uint dict_len );
/* Callback interface. Currently only the progress indicator ("nprogress")
* is used, but this may change in a future release. */
struct lzo_callback_t;
typedef struct lzo_callback_t lzo_callback_t;
#define lzo_callback_p lzo_callback_t __LZO_MMODEL *
/* malloc & free function types */
typedef lzo_voidp (__LZO_CDECL *lzo_alloc_func_t)
(lzo_callback_p self, lzo_uint items, lzo_uint size);
typedef void (__LZO_CDECL *lzo_free_func_t)
(lzo_callback_p self, lzo_voidp ptr);
/* a progress indicator callback function */
typedef void (__LZO_CDECL *lzo_progress_func_t)
(lzo_callback_p, lzo_uint, lzo_uint, int);
struct lzo_callback_t
{
/* custom allocators (set to 0 to disable) */
lzo_alloc_func_t nalloc; /* [not used right now] */
lzo_free_func_t nfree; /* [not used right now] */
/* a progress indicator callback function (set to 0 to disable) */
lzo_progress_func_t nprogress;
/* NOTE: the first parameter "self" of the nalloc/nfree/nprogress
* callbacks points back to this struct, so you are free to store
* some extra info in the following variables. */
lzo_voidp user1;
lzo_xint user2;
lzo_xint user3;
};
/***********************************************************************
@@ -383,26 +308,31 @@ typedef void (__LZO_ENTRY *lzo_progress_callback_t) (lzo_uint, lzo_uint);
*/
#define LZO_E_OK 0
#define LZO_E_ERROR (-1)
#define LZO_E_OUT_OF_MEMORY (-2) /* not used right now */
#define LZO_E_NOT_COMPRESSIBLE (-3) /* not used right now */
#define LZO_E_OUT_OF_MEMORY (-2) /* [not used right now] */
#define LZO_E_NOT_COMPRESSIBLE (-3) /* [not used right now] */
#define LZO_E_INPUT_OVERRUN (-4)
#define LZO_E_OUTPUT_OVERRUN (-5)
#define LZO_E_LOOKBEHIND_OVERRUN (-6)
#define LZO_E_EOF_NOT_FOUND (-7)
#define LZO_E_INPUT_NOT_CONSUMED (-8)
#define LZO_E_NOT_YET_IMPLEMENTED (-9) /* [not used right now] */
#ifndef lzo_sizeof_dict_t
# define lzo_sizeof_dict_t ((unsigned)sizeof(lzo_bytep))
#endif
/* lzo_init() should be the first function you call.
* Check the return code !
*
* lzo_init() is a macro to allow checking that the library and the
* compiler's view of various types are consistent.
*/
#define lzo_init() __lzo_init2(LZO_VERSION,(int)sizeof(short),(int)sizeof(int),\
#define lzo_init() __lzo_init_v2(LZO_VERSION,(int)sizeof(short),(int)sizeof(int),\
(int)sizeof(long),(int)sizeof(lzo_uint32),(int)sizeof(lzo_uint),\
(int)lzo_sizeof_dict_t,(int)sizeof(char *),(int)sizeof(lzo_voidp),\
(int)sizeof(lzo_compress_t))
LZO_EXTERN(int) __lzo_init2(unsigned,int,int,int,int,int,int,int,int,int);
(int)sizeof(lzo_callback_t))
LZO_EXTERN(int) __lzo_init_v2(unsigned,int,int,int,int,int,int,int,int,int);
/* version functions (useful for shared libraries) */
LZO_EXTERN(unsigned) lzo_version(void);
@@ -413,34 +343,70 @@ LZO_EXTERN(const lzo_charp) _lzo_version_date(void);
/* string functions */
LZO_EXTERN(int)
lzo_memcmp(const lzo_voidp _s1, const lzo_voidp _s2, lzo_uint _len);
lzo_memcmp(const lzo_voidp a, const lzo_voidp b, lzo_uint len);
LZO_EXTERN(lzo_voidp)
lzo_memcpy(lzo_voidp _dest, const lzo_voidp _src, lzo_uint _len);
lzo_memcpy(lzo_voidp dst, const lzo_voidp src, lzo_uint len);
LZO_EXTERN(lzo_voidp)
lzo_memmove(lzo_voidp _dest, const lzo_voidp _src, lzo_uint _len);
lzo_memmove(lzo_voidp dst, const lzo_voidp src, lzo_uint len);
LZO_EXTERN(lzo_voidp)
lzo_memset(lzo_voidp _s, int _c, lzo_uint _len);
lzo_memset(lzo_voidp buf, int c, lzo_uint len);
/* checksum functions */
LZO_EXTERN(lzo_uint32)
lzo_adler32(lzo_uint32 _adler, const lzo_byte *_buf, lzo_uint _len);
lzo_adler32(lzo_uint32 c, const lzo_bytep buf, lzo_uint len);
LZO_EXTERN(lzo_uint32)
lzo_crc32(lzo_uint32 _c, const lzo_byte *_buf, lzo_uint _len);
lzo_crc32(lzo_uint32 c, const lzo_bytep buf, lzo_uint len);
LZO_EXTERN(const lzo_uint32p)
lzo_get_crc32_table(void);
/* misc. */
LZO_EXTERN(lzo_bool) lzo_assert(int _expr);
LZO_EXTERN(int) _lzo_config_check(void);
typedef union { lzo_bytep p; lzo_uint u; } __lzo_pu_u;
typedef union { lzo_bytep p; lzo_uint32 u32; } __lzo_pu32_u;
typedef union { void *vp; lzo_bytep bp; lzo_uint32 u32; long l; } lzo_align_t;
typedef union { void *vp; lzo_bytep bp; lzo_uint u; lzo_uint32 u32; unsigned long l; } lzo_align_t;
/* align a char pointer on a boundary that is a multiple of `size' */
LZO_EXTERN(unsigned) __lzo_align_gap(const lzo_voidp _ptr, lzo_uint _size);
#define LZO_PTR_ALIGN_UP(_ptr,_size) \
((_ptr) + (lzo_uint) __lzo_align_gap((const lzo_voidp)(_ptr),(lzo_uint)(_size)))
/* align a char pointer on a boundary that is a multiple of 'size' */
LZO_EXTERN(unsigned) __lzo_align_gap(const lzo_voidp p, lzo_uint size);
#define LZO_PTR_ALIGN_UP(p,size) \
((p) + (lzo_uint) __lzo_align_gap((const lzo_voidp)(p),(lzo_uint)(size)))
/* deprecated - only for backward compatibility */
#define LZO_ALIGN(_ptr,_size) LZO_PTR_ALIGN_UP(_ptr,_size)
/***********************************************************************
// deprecated macros - only for backward compatibility with LZO v1.xx
************************************************************************/
#if defined(LZO_CFG_COMPAT)
#define __LZOCONF_H 1
#if defined(LZO_ARCH_I086)
# define __LZO_i386 1
#elif defined(LZO_ARCH_I386)
# define __LZO_i386 1
#endif
#if defined(LZO_OS_DOS16)
# define __LZO_DOS 1
# define __LZO_DOS16 1
#elif defined(LZO_OS_DOS32)
# define __LZO_DOS 1
#elif defined(LZO_OS_WIN16)
# define __LZO_WIN 1
# define __LZO_WIN16 1
#elif defined(LZO_OS_WIN32)
# define __LZO_WIN 1
#endif
#define __LZO_CMODEL /*empty*/
#define __LZO_DMODEL /*empty*/
#define __LZO_ENTRY __LZO_CDECL
#define LZO_EXTERN_CDECL LZO_EXTERN
#define LZO_ALIGN LZO_PTR_ALIGN_UP
#define lzo_compress_asm_t lzo_compress_t
#define lzo_decompress_asm_t lzo_decompress_t
#endif /* LZO_CFG_COMPAT */
#ifdef __cplusplus
@@ -449,3 +415,5 @@ LZO_EXTERN(unsigned) __lzo_align_gap(const lzo_voidp _ptr, lzo_uint _size);
#endif /* already included */
/* vim:set ts=4 et: */

1851
libvncserver/lzodefs.h Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -31,6 +31,7 @@
#ifndef WIN32
#include <sys/socket.h>
#include <sys/time.h>
#include <netinet/in.h>
#include <unistd.h>
#endif
@@ -145,6 +146,11 @@ rfbUnregisterProtocolExtension(rfbProtocolExtension* extension)
rfbProtocolExtension* rfbGetExtensionIterator()
{
if (! extMutex_initialized) {
INIT_MUTEX(extMutex);
extMutex_initialized = 1;
}
LOCK(extMutex);
return rfbExtensionHead;
}
@@ -444,22 +450,34 @@ clientOutput(void *data)
while (1) {
haveUpdate = false;
while (!haveUpdate) {
if (cl->sock == -1) {
/* Client has disconnected. */
return NULL;
}
LOCK(cl->updateMutex);
haveUpdate = FB_UPDATE_PENDING(cl);
if(!haveUpdate) {
updateRegion = sraRgnCreateRgn(cl->modifiedRegion);
haveUpdate = sraRgnAnd(updateRegion,cl->requestedRegion);
sraRgnDestroy(updateRegion);
}
if (cl->sock == -1) {
/* Client has disconnected. */
return NULL;
}
if (cl->state != RFB_NORMAL || cl->onHold) {
/* just sleep until things get normal */
usleep(cl->screen->deferUpdateTime * 1000);
continue;
}
if (!haveUpdate) {
WAIT(cl->updateCond, cl->updateMutex);
}
UNLOCK(cl->updateMutex);
LOCK(cl->updateMutex);
if (sraRgnEmpty(cl->requestedRegion)) {
; /* always require a FB Update Request (otherwise can crash.) */
} else {
haveUpdate = FB_UPDATE_PENDING(cl);
if(!haveUpdate) {
updateRegion = sraRgnCreateRgn(cl->modifiedRegion);
haveUpdate = sraRgnAnd(updateRegion,cl->requestedRegion);
sraRgnDestroy(updateRegion);
}
}
if (!haveUpdate) {
WAIT(cl->updateCond, cl->updateMutex);
}
UNLOCK(cl->updateMutex);
}
/* OK, now, to save bandwidth, wait a little while for more
@@ -476,7 +494,9 @@ clientOutput(void *data)
/* Now actually send the update. */
rfbIncrClientRef(cl);
LOCK(cl->sendMutex);
rfbSendFramebufferUpdate(cl, updateRegion);
UNLOCK(cl->sendMutex);
rfbDecrClientRef(cl);
sraRgnDestroy(updateRegion);
@@ -498,6 +518,11 @@ clientInput(void *data)
struct timeval tv;
int n;
if (cl->sock == -1) {
/* Client has disconnected. */
break;
}
FD_ZERO(&rfds);
FD_SET(cl->sock, &rfds);
FD_ZERO(&efds);
@@ -527,11 +552,6 @@ clientInput(void *data)
if (FD_ISSET(cl->sock, &rfds) || FD_ISSET(cl->sock, &efds))
rfbProcessClientMessage(cl);
if (cl->sock == -1) {
/* Client has disconnected. */
break;
}
}
/* Get rid of the output thread. */
@@ -880,7 +900,9 @@ rfbScreenInfoPtr rfbGetScreen(int* argc,char** argv,
screen->setTranslateFunction = rfbSetTranslateFunction;
screen->newClientHook = rfbDefaultNewClientHook;
screen->displayHook = NULL;
screen->displayFinishedHook = NULL;
screen->getKeyboardLedStateHook = NULL;
screen->xvpHook = NULL;
/* initialize client list and iterator mutex */
rfbClientListInit(screen);
@@ -982,9 +1004,6 @@ void rfbScreenCleanup(rfbScreenInfoPtr screen)
if(screen->cursor && screen->cursor->cleanup)
rfbFreeCursor(screen->cursor);
rfbRRECleanup(screen);
rfbCoRRECleanup(screen);
rfbUltraCleanup(screen);
#ifdef LIBVNCSERVER_HAVE_LIBZ
rfbZlibCleanup(screen);
#ifdef LIBVNCSERVER_HAVE_LIBJPEG
@@ -1053,7 +1072,6 @@ rfbProcessEvents(rfbScreenInfoPtr screen,long usec)
{
rfbClientIteratorPtr i;
rfbClientPtr cl,clPrev;
struct timeval tv;
rfbBool result=FALSE;
extern rfbClientIteratorPtr
rfbGetClientIteratorWithClosed(rfbScreenInfoPtr rfbScreen);
@@ -1063,9 +1081,6 @@ rfbProcessEvents(rfbScreenInfoPtr screen,long usec)
rfbCheckFds(screen,usec);
rfbHttpCheckFds(screen);
#ifdef CORBA
corbaCheckFds(screen);
#endif
i = rfbGetClientIteratorWithClosed(screen);
cl=rfbClientIteratorHead(i);

File diff suppressed because it is too large Load Diff

View File

@@ -2,6 +2,14 @@
This file is part of the LZO real-time data compression library.
Copyright (C) 2010 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2009 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer
@@ -24,7 +32,7 @@
You should have received a copy of the GNU General Public License
along with the LZO library; see the file COPYING.
If not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Markus F.X.J. Oberhumer
<markus@oberhumer.com>
@@ -39,9 +47,9 @@
#ifndef __MINILZO_H
#define __MINILZO_H
#define __MINILZO_H 1
#define MINILZO_VERSION 0x1080
#define MINILZO_VERSION 0x2040
#ifdef __LZOCONF_H
# error "you cannot use both LZO and miniLZO"
@@ -75,20 +83,20 @@ extern "C" {
/* compression */
LZO_EXTERN(int)
lzo1x_1_compress ( const lzo_byte *src, lzo_uint src_len,
lzo_byte *dst, lzo_uintp dst_len,
lzo1x_1_compress ( const lzo_bytep src, lzo_uint src_len,
lzo_bytep dst, lzo_uintp dst_len,
lzo_voidp wrkmem );
/* decompression */
LZO_EXTERN(int)
lzo1x_decompress ( const lzo_byte *src, lzo_uint src_len,
lzo_byte *dst, lzo_uintp dst_len,
lzo1x_decompress ( const lzo_bytep src, lzo_uint src_len,
lzo_bytep dst, lzo_uintp dst_len,
lzo_voidp wrkmem /* NOT USED */ );
/* safe decompression with overrun testing */
LZO_EXTERN(int)
lzo1x_decompress_safe ( const lzo_byte *src, lzo_uint src_len,
lzo_byte *dst, lzo_uintp dst_len,
lzo1x_decompress_safe ( const lzo_bytep src, lzo_uint src_len,
lzo_bytep dst, lzo_uintp dst_len,
lzo_voidp wrkmem /* NOT USED */ );

View File

@@ -29,16 +29,7 @@ void rfbFreeZrleData(rfbClientPtr cl);
/* from ultra.c */
extern void rfbUltraCleanup(rfbScreenInfoPtr screen);
extern void rfbFreeUltraData(rfbClientPtr cl);
/* from rre.c */
extern void rfbRRECleanup(rfbScreenInfoPtr screen);
/* from corre.c */
extern void rfbCoRRECleanup(rfbScreenInfoPtr screen);
#endif

View File

@@ -1,8 +1,12 @@
#ifndef RFB_H
#define RFB_H
/**
* @defgroup libvncserver_api LibVNCServer API Reference
* @{
*/
/*
* rfb.h - header file for RFB DDX implementation.
/**
* @file rfb.h
*/
/*
@@ -29,7 +33,7 @@
* USA.
*/
#if (defined __cplusplus)
#if(defined __cplusplus)
extern "C"
{
#endif
@@ -44,6 +48,7 @@ extern "C"
#endif
#ifdef __MINGW32__
#undef SOCKET
#include <winsock2.h>
#endif
@@ -135,34 +140,39 @@ typedef rfbBool (*rfbSetTranslateFunctionProcPtr)(struct _rfbClientRec* cl);
typedef rfbBool (*rfbPasswordCheckProcPtr)(struct _rfbClientRec* cl,const char* encryptedPassWord,int len);
typedef enum rfbNewClientAction (*rfbNewClientHookPtr)(struct _rfbClientRec* cl);
typedef void (*rfbDisplayHookPtr)(struct _rfbClientRec* cl);
/* support the capability to view the caps/num/scroll states of the X server */
typedef void (*rfbDisplayFinishedHookPtr)(struct _rfbClientRec* cl, int result);
/** support the capability to view the caps/num/scroll states of the X server */
typedef int (*rfbGetKeyboardLedStateHookPtr)(struct _rfbScreenInfo* screen);
/* If x==1 and y==1 then set the whole display
typedef rfbBool (*rfbXvpHookPtr)(struct _rfbClientRec* cl, uint8_t, uint8_t);
/**
* If x==1 and y==1 then set the whole display
* else find the window underneath x and y and set the framebuffer to the dimensions
* of that window
*/
typedef void (*rfbSetSingleWindowProcPtr) (struct _rfbClientRec* cl, int x, int y);
/* Status determines if the X11 server permits input from the local user
/**
* Status determines if the X11 server permits input from the local user
* status==0 or 1
*/
typedef void (*rfbSetServerInputProcPtr) (struct _rfbClientRec* cl, int status);
/* Permit the server to allow or deny filetransfers. This is defaulted to deny
/**
* Permit the server to allow or deny filetransfers. This is defaulted to deny
* It is called when a client initiates a connection to determine if it is permitted.
*/
typedef int (*rfbFileTransferPermitted) (struct _rfbClientRec* cl);
/* Handle the textchat messages */
/** Handle the textchat messages */
typedef void (*rfbSetTextChat) (struct _rfbClientRec* cl, int length, char *string);
typedef struct {
uint32_t count;
rfbBool is16; /* is the data format short? */
rfbBool is16; /**< is the data format short? */
union {
uint8_t* bytes;
uint16_t* shorts;
} data; /* there have to be count*3 entries */
} data; /**< there have to be count*3 entries */
} rfbColourMap;
/*
/**
* Security handling (RFB protocol version 3.7)
*/
@@ -172,31 +182,31 @@ typedef struct _rfbSecurity {
struct _rfbSecurity* next;
} rfbSecurityHandler;
/*
/**
* Protocol extension handling.
*/
typedef struct _rfbProtocolExtension {
/* returns FALSE if extension should be deactivated for client.
/** returns FALSE if extension should be deactivated for client.
if newClient == NULL, it is always deactivated. */
rfbBool (*newClient)(struct _rfbClientRec* client, void** data);
/* returns FALSE if extension should be deactivated for client.
/** returns FALSE if extension should be deactivated for client.
if init == NULL, it stays activated. */
rfbBool (*init)(struct _rfbClientRec* client, void* data);
/* if pseudoEncodings is not NULL, it contains a 0 terminated
/** if pseudoEncodings is not NULL, it contains a 0 terminated
list of the pseudo encodings handled by this extension. */
int *pseudoEncodings;
/* returns TRUE if that pseudo encoding is handled by the extension.
/** returns TRUE if that pseudo encoding is handled by the extension.
encodingNumber==0 means "reset encodings". */
rfbBool (*enablePseudoEncoding)(struct _rfbClientRec* client,
void** data, int encodingNumber);
/* returns TRUE if message was handled */
/** returns TRUE if message was handled */
rfbBool (*handleMessage)(struct _rfbClientRec* client,
void* data,
const rfbClientToServerMsg* message);
void (*close)(struct _rfbClientRec* client, void* data);
void (*usage)(void);
/* processArguments returns the number of handled arguments */
/** processArguments returns the number of handled arguments */
int (*processArgument)(int argc, char *argv[]);
struct _rfbProtocolExtension* next;
} rfbProtocolExtension;
@@ -207,7 +217,7 @@ typedef struct _rfbExtensionData {
struct _rfbExtensionData* next;
} rfbExtensionData;
/*
/**
* Per-screen (framebuffer) structure. There can be as many as you wish,
* each serving different clients. However, you have to call
* rfbProcessEvents for each of these.
@@ -215,7 +225,7 @@ typedef struct _rfbExtensionData {
typedef struct _rfbScreenInfo
{
/* this structure has children that are scaled versions of this screen */
/** this structure has children that are scaled versions of this screen */
struct _rfbScreenInfo *scaledScreenNext;
int scaledScreenRefCount;
@@ -229,16 +239,17 @@ typedef struct _rfbScreenInfo
rfbPixel blackPixel;
rfbPixel whitePixel;
/* some screen specific data can be put into a struct where screenData
/**
* some screen specific data can be put into a struct where screenData
* points to. You need this if you have more than one screen at the
* same time while using the same functions.
*/
void* screenData;
/* additions by libvncserver */
rfbPixelFormat serverFormat;
rfbColourMap colourMap; /* set this if rfbServerFormat.trueColour==FALSE */
rfbColourMap colourMap; /**< set this if rfbServerFormat.trueColour==FALSE */
const char* desktopName;
char thisHost[255];
@@ -275,13 +286,13 @@ typedef struct _rfbScreenInfo
rfbPasswordCheckProcPtr passwordCheck;
void* authPasswdData;
/* If rfbAuthPasswdData is given a list, this is the first
view only password. */
/** If rfbAuthPasswdData is given a list, this is the first
view only password. */
int authPasswdFirstViewOnly;
/* send only this many rectangles in one update */
/** send only this many rectangles in one update */
int maxRectsPerUpdate;
/* this is the amount of milliseconds to wait at least before sending
/** this is the amount of milliseconds to wait at least before sending
* an update. */
int deferUpdateTime;
#ifdef TODELETE
@@ -291,7 +302,7 @@ typedef struct _rfbScreenInfo
rfbBool neverShared;
rfbBool dontDisconnect;
struct _rfbClientRec* clientHead;
struct _rfbClientRec* pointerClient; /* "Mutex" for pointer events */
struct _rfbClientRec* pointerClient; /**< "Mutex" for pointer events */
/* cursor */
@@ -300,8 +311,9 @@ typedef struct _rfbScreenInfo
rfbBool dontConvertRichCursorToXCursor;
struct rfbCursor* cursor;
/* the frameBufferhas to be supplied by the serving process.
* The buffer will not be freed by
/**
* the frameBuffer has to be supplied by the serving process.
* The buffer will not be freed by
*/
char* frameBuffer;
rfbKbdAddEventProcPtr kbdAddEvent;
@@ -314,13 +326,13 @@ typedef struct _rfbScreenInfo
rfbSetServerInputProcPtr setServerInput;
rfbFileTransferPermitted getFileTransferPermission;
rfbSetTextChat setTextChat;
/* newClientHook is called just after a new client is created */
/** newClientHook is called just after a new client is created */
rfbNewClientHookPtr newClientHook;
/* displayHook is called just before a frame buffer update */
/** displayHook is called just before a frame buffer update */
rfbDisplayHookPtr displayHook;
/* These hooks are called to pass keyboard state back to the client */
/** These hooks are called to pass keyboard state back to the client */
rfbGetKeyboardLedStateHookPtr getKeyboardLedStateHook;
#ifdef LIBVNCSERVER_HAVE_LIBPTHREAD
@@ -328,10 +340,10 @@ typedef struct _rfbScreenInfo
rfbBool backgroundLoop;
#endif
/* if TRUE, an ignoring signal handler is installed for SIGPIPE */
/** if TRUE, an ignoring signal handler is installed for SIGPIPE */
rfbBool ignoreSIGPIPE;
/* if not zero, only a slice of this height is processed every time
/** if not zero, only a slice of this height is processed every time
* an update should be sent. This should make working on a slow
* link more interactive. */
int progressiveSliceHeight;
@@ -339,22 +351,27 @@ typedef struct _rfbScreenInfo
in_addr_t listenInterface;
int deferPtrUpdateTime;
/* handle as many input events as possible (default off) */
/** handle as many input events as possible (default off) */
rfbBool handleEventsEagerly;
/* rfbEncodingServerIdentity */
/** rfbEncodingServerIdentity */
char *versionString;
/* What does the server tell the new clients which version it supports */
/** What does the server tell the new clients which version it supports */
int protocolMajorVersion;
int protocolMinorVersion;
/* command line authorization of file transfers */
/** command line authorization of file transfers */
rfbBool permitFileTransfer;
/** displayFinishedHook is called just after a frame buffer update */
rfbDisplayFinishedHookPtr displayFinishedHook;
/** xvpHook is called to handle an xvp client message */
rfbXvpHookPtr xvpHook;
} rfbScreenInfo, *rfbScreenInfoPtr;
/*
/**
* rfbTranslateFnType is the type of translation functions.
*/
@@ -398,17 +415,17 @@ typedef struct _rfbStatList {
} rfbStatList;
typedef struct _rfbClientRec {
/* back pointer to the screen */
/** back pointer to the screen */
rfbScreenInfoPtr screen;
/* points to a scaled version of the screen buffer in cl->scaledScreenList */
/** points to a scaled version of the screen buffer in cl->scaledScreenList */
rfbScreenInfoPtr scaledScreen;
/* how did the client tell us it wanted the screen changed? Ultra style or palm style? */
/** how did the client tell us it wanted the screen changed? Ultra style or palm style? */
rfbBool PalmVNC;
/* private data. You should put any application client specific data
/** private data. You should put any application client specific data
* into a struct and let clientData point to it. Don't forget to
* free the struct via clientGoneHook!
*
@@ -427,13 +444,13 @@ typedef struct _rfbClientRec {
#ifdef LIBVNCSERVER_HAVE_LIBPTHREAD
pthread_t client_thread;
#endif
/* Possible client states: */
/** Possible client states: */
enum {
RFB_PROTOCOL_VERSION, /* establishing protocol version */
RFB_SECURITY_TYPE, /* negotiating security (RFB v.3.7) */
RFB_AUTHENTICATION, /* authenticating */
RFB_INITIALISATION, /* sending initialisation messages */
RFB_NORMAL /* normal protocol messages */
RFB_PROTOCOL_VERSION, /**< establishing protocol version */
RFB_SECURITY_TYPE, /**< negotiating security (RFB v.3.7) */
RFB_AUTHENTICATION, /**< authenticating */
RFB_INITIALISATION, /**< sending initialisation messages */
RFB_NORMAL /**< normal protocol messages */
} state;
rfbBool reverseConnection;
@@ -471,19 +488,19 @@ typedef struct _rfbClientRec {
the destination copyRegion. Just before an update is sent we remove
from the copyRegion anything in the modifiedRegion. */
sraRegionPtr copyRegion; /* the destination region of the copy */
int copyDX, copyDY; /* the translation by which the copy happens */
sraRegionPtr copyRegion; /**< the destination region of the copy */
int copyDX, copyDY; /**< the translation by which the copy happens */
sraRegionPtr modifiedRegion;
/* As part of the FramebufferUpdateRequest, a client can express interest
/** As part of the FramebufferUpdateRequest, a client can express interest
in a subrectangle of the whole framebuffer. This is stored in the
requestedRegion member. In the normal case this is the whole
framebuffer if the client is ready, empty if it's not. */
sraRegionPtr requestedRegion;
/* The following member represents the state of the "deferred update" timer
/** The following member represents the state of the "deferred update" timer
- when the framebuffer is modified and the client is ready, in most
cases it is more efficient to defer sending the update by a few
milliseconds so that several changes to the framebuffer can be combined
@@ -495,14 +512,14 @@ typedef struct _rfbClientRec {
int lastPtrY;
int lastPtrButtons;
/* translateFn points to the translation function which is used to copy
/** translateFn points to the translation function which is used to copy
and translate a rectangle from the framebuffer to an output buffer. */
rfbTranslateFnType translateFn;
char *translateLookupTable;
rfbPixelFormat format;
/*
/**
* UPDATE_BUF_SIZE must be big enough to send at least one whole line of the
* framebuffer. So for a max screen width of say 2K with 32-bit pixels this
* means 8K minimum.
@@ -518,14 +535,14 @@ typedef struct _rfbClientRec {
struct _rfbStatList *statMsgList;
int rawBytesEquivalent;
int bytesSent;
#ifdef LIBVNCSERVER_HAVE_LIBZ
/* zlib encoding -- necessary compression state info per client */
struct z_stream_s compStream;
rfbBool compStreamInited;
uint32_t zlibCompressLevel;
/* the quality level is also used by ZYWRLE */
/** the quality level is also used by ZYWRLE */
int tightQualityLevel;
#ifdef LIBVNCSERVER_HAVE_LIBJPEG
@@ -543,28 +560,28 @@ typedef struct _rfbClientRec {
rfbFileTransferData fileTransfer;
int lastKeyboardLedState; /* keep track of last value so we can send *change* events */
rfbBool enableSupportedMessages; /* client supports SupportedMessages encoding */
rfbBool enableSupportedEncodings; /* client supports SupportedEncodings encoding */
rfbBool enableServerIdentity; /* client supports ServerIdentity encoding */
rfbBool enableKeyboardLedState; /* client supports KeyboardState encoding */
rfbBool enableLastRectEncoding; /* client supports LastRect encoding */
rfbBool enableCursorShapeUpdates; /* client supports cursor shape updates */
rfbBool enableCursorPosUpdates; /* client supports cursor position updates */
rfbBool useRichCursorEncoding; /* rfbEncodingRichCursor is preferred */
rfbBool cursorWasChanged; /* cursor shape update should be sent */
rfbBool cursorWasMoved; /* cursor position update should be sent */
int cursorX,cursorY; /* the coordinates of the cursor,
int lastKeyboardLedState; /**< keep track of last value so we can send *change* events */
rfbBool enableSupportedMessages; /**< client supports SupportedMessages encoding */
rfbBool enableSupportedEncodings; /**< client supports SupportedEncodings encoding */
rfbBool enableServerIdentity; /**< client supports ServerIdentity encoding */
rfbBool enableKeyboardLedState; /**< client supports KeyboardState encoding */
rfbBool enableLastRectEncoding; /**< client supports LastRect encoding */
rfbBool enableCursorShapeUpdates; /**< client supports cursor shape updates */
rfbBool enableCursorPosUpdates; /**< client supports cursor position updates */
rfbBool useRichCursorEncoding; /**< rfbEncodingRichCursor is preferred */
rfbBool cursorWasChanged; /**< cursor shape update should be sent */
rfbBool cursorWasMoved; /**< cursor position update should be sent */
int cursorX,cursorY; /**< the coordinates of the cursor,
if enableCursorShapeUpdates = FALSE */
rfbBool useNewFBSize; /* client supports NewFBSize encoding */
rfbBool newFBSizePending; /* framebuffer size was changed */
rfbBool useNewFBSize; /**< client supports NewFBSize encoding */
rfbBool newFBSizePending; /**< framebuffer size was changed */
struct _rfbClientRec *prev;
struct _rfbClientRec *next;
#ifdef LIBVNCSERVER_HAVE_LIBPTHREAD
/* whenever a client is referenced, the refCount has to be incremented
/** whenever a client is referenced, the refCount has to be incremented
and afterwards decremented, so that the client is not cleaned up
while being referenced.
Use the functions rfbIncrClientRef(cl) and rfbDecrClientRef(cl);
@@ -584,14 +601,32 @@ typedef struct _rfbClientRec {
int zywrleBuf[rfbZRLETileWidth * rfbZRLETileHeight];
#endif
/* if progressive updating is on, this variable holds the current
/** if progressive updating is on, this variable holds the current
* y coordinate of the progressive slice. */
int progressiveSliceY;
rfbExtensionData* extensions;
/** for threaded zrle */
char *zrleBeforeBuf;
void *paletteHelper;
/** for thread safety for rfbSendFBUpdate() */
#ifdef LIBVNCSERVER_HAVE_LIBPTHREAD
#define LIBVNCSERVER_SEND_MUTEX
MUTEX(sendMutex);
#endif
/* buffers to hold pixel data before and after encoding.
per-client for thread safety */
char *beforeEncBuf;
int beforeEncBufSize;
char *afterEncBuf;
int afterEncBufSize;
int afterEncBufLen;
} rfbClientRec, *rfbClientPtr;
/*
/**
* This macro is used to test whether there is a framebuffer update needing to
* be sent to the client.
*/
@@ -648,6 +683,7 @@ extern int rfbConnectToTcpAddr(char* host, int port);
extern int rfbListenOnTCPPort(int port, in_addr_t iface);
extern int rfbListenOnUDPPort(int port, in_addr_t iface);
extern int rfbStringToAddr(char* string,in_addr_t* addr);
extern rfbBool rfbSetNonBlocking(int sock);
/* rfbserver.c */
@@ -749,7 +785,7 @@ extern rfbBool rfbSendRectEncodingUltra(rfbClientPtr cl, int x,int y,int w,int h
#ifdef LIBVNCSERVER_HAVE_LIBZ
/* zlib.c */
/* Minimum zlib rectangle size in bytes. Anything smaller will
/** Minimum zlib rectangle size in bytes. Anything smaller will
* not compress well due to overhead.
*/
#define VNC_ENCODE_ZLIB_MIN_COMP_SIZE (17)
@@ -781,16 +817,16 @@ extern rfbBool rfbSendRectEncodingTight(rfbClientPtr cl, int x,int y,int w,int h
/* cursor.c */
typedef struct rfbCursor {
/* set this to true if LibVNCServer has to free this cursor */
/** set this to true if LibVNCServer has to free this cursor */
rfbBool cleanup, cleanupSource, cleanupMask, cleanupRichSource;
unsigned char *source; /* points to bits */
unsigned char *mask; /* points to bits */
unsigned short width, height, xhot, yhot; /* metrics */
unsigned short foreRed, foreGreen, foreBlue; /* device-independent colour */
unsigned short backRed, backGreen, backBlue; /* device-independent colour */
unsigned char *richSource; /* source bytes for a rich cursor */
unsigned char *alphaSource; /* source for alpha blending info */
rfbBool alphaPreMultiplied; /* if richSource already has alpha applied */
unsigned char *source; /**< points to bits */
unsigned char *mask; /**< points to bits */
unsigned short width, height, xhot, yhot; /**< metrics */
unsigned short foreRed, foreGreen, foreBlue; /**< device-independent colour */
unsigned short backRed, backGreen, backBlue; /**< device-independent colour */
unsigned char *richSource; /**< source bytes for a rich cursor */
unsigned char *alphaSource; /**< source for alpha blending info */
rfbBool alphaPreMultiplied; /**< if richSource already has alpha applied */
} rfbCursor, *rfbCursorPtr;
extern unsigned char rfbReverseByte[0x100];
@@ -805,7 +841,7 @@ extern void rfbMakeRichCursorFromXCursor(rfbScreenInfoPtr rfbScreen,rfbCursorPtr
extern void rfbFreeCursor(rfbCursorPtr cursor);
extern void rfbSetCursor(rfbScreenInfoPtr rfbScreen,rfbCursorPtr c);
/* cursor handling for the pointer */
/** cursor handling for the pointer */
extern void rfbDefaultPtrAddEvent(int buttonMask,int x,int y,rfbClientPtr cl);
/* zrle.c */
@@ -822,7 +858,7 @@ extern void rfbPrintStats(rfbClientPtr cl);
typedef struct rfbFontData {
unsigned char* data;
/*
/**
metaData is a 256*5 array:
for each character
(offset,width,height,x,y)
@@ -832,18 +868,18 @@ typedef struct rfbFontData {
int rfbDrawChar(rfbScreenInfoPtr rfbScreen,rfbFontDataPtr font,int x,int y,unsigned char c,rfbPixel colour);
void rfbDrawString(rfbScreenInfoPtr rfbScreen,rfbFontDataPtr font,int x,int y,const char* string,rfbPixel colour);
/* if colour==backColour, background is transparent */
/** if colour==backColour, background is transparent */
int rfbDrawCharWithClip(rfbScreenInfoPtr rfbScreen,rfbFontDataPtr font,int x,int y,unsigned char c,int x1,int y1,int x2,int y2,rfbPixel colour,rfbPixel backColour);
void rfbDrawStringWithClip(rfbScreenInfoPtr rfbScreen,rfbFontDataPtr font,int x,int y,const char* string,int x1,int y1,int x2,int y2,rfbPixel colour,rfbPixel backColour);
int rfbWidthOfString(rfbFontDataPtr font,const char* string);
int rfbWidthOfChar(rfbFontDataPtr font,unsigned char c);
void rfbFontBBox(rfbFontDataPtr font,unsigned char c,int* x1,int* y1,int* x2,int* y2);
/* this returns the smallest box enclosing any character of font. */
/** this returns the smallest box enclosing any character of font. */
void rfbWholeFontBBox(rfbFontDataPtr font,int *x1, int *y1, int *x2, int *y2);
/* dynamically load a linux console font (4096 bytes, 256 glyphs a 8x16 */
/** dynamically load a linux console font (4096 bytes, 256 glyphs a 8x16 */
rfbFontDataPtr rfbLoadConsoleFont(char *filename);
/* free a dynamically loaded font */
/** free a dynamically loaded font */
void rfbFreeFont(rfbFontDataPtr font);
/* draw.c */
@@ -854,7 +890,7 @@ void rfbDrawLine(rfbScreenInfoPtr s,int x1,int y1,int x2,int y2,rfbPixel col);
/* selbox.c */
/* this opens a modal select box. list is an array of strings, the end marked
/** this opens a modal select box. list is an array of strings, the end marked
with a NULL.
It returns the index in the list or -1 if cancelled or something else
wasn't kosher. */
@@ -898,7 +934,7 @@ rfbBool rfbEnableExtension(rfbClientPtr cl, rfbProtocolExtension* extension,
rfbBool rfbDisableExtension(rfbClientPtr cl, rfbProtocolExtension* extension);
void* rfbGetExtensionClientData(rfbClientPtr cl, rfbProtocolExtension* extension);
/* to check against plain passwords */
/** to check against plain passwords */
rfbBool rfbCheckPasswordByList(rfbClientPtr cl,const char* response,int len);
/* functions to make a vnc server */
@@ -932,7 +968,7 @@ extern rfbBool rfbIsActive(rfbScreenInfoPtr screenInfo);
/* TightVNC file transfer extension */
void rfbRegisterTightVNCFileTransferExtension();
void rfbUnregisterTightVNCFileTransferExtension();
void rfbUnregisterTightVNCFileTransferExtension();
/* Statistics */
extern char *messageNameServer2Client(uint32_t type, char *buf, int len);
@@ -960,10 +996,10 @@ extern int rfbStatGetMessageCountRcvd(rfbClientPtr cl, uint32_t type);
extern int rfbStatGetEncodingCountSent(rfbClientPtr cl, uint32_t type);
extern int rfbStatGetEncodingCountRcvd(rfbClientPtr cl, uint32_t type);
/* Set which version you want to advertise 3.3, 3.6, 3.7 and 3.8 are currently supported*/
/** Set which version you want to advertise 3.3, 3.6, 3.7 and 3.8 are currently supported*/
extern void rfbSetProtocolVersion(rfbScreenInfoPtr rfbScreen, int major_, int minor_);
/* send a TextChat message to a client */
/** send a TextChat message to a client */
extern rfbBool rfbSendTextChatMessage(rfbClientPtr cl, uint32_t length, char *buffer);
@@ -975,9 +1011,178 @@ rfbBool rfbProcessNewConnection(rfbScreenInfoPtr rfbScreen);
rfbBool rfbUpdateClient(rfbClientPtr cl);
#if (defined __cplusplus)
#if(defined __cplusplus)
}
#endif
#endif
/**
* @}
*/
/**
@page libvncserver_doc LibVNCServer Documentation
@section create_server Creating a server instance
To make a server, you just have to initialise a server structure using the
function rfbGetScreen(), like
@code
rfbScreenInfoPtr screen =
rfbGetScreen(argc,argv,screenwidth,screenheight,8,3,bpp);
@endcode
where byte per pixel should be 1, 2 or 4. If performance doesn't matter,
you may try bpp=3 (internally one cannot use native data types in this
case; if you want to use this, look at pnmshow24.c).
You then can set hooks and io functions (see @ref making_it_interactive) or other
options (see @ref server_options).
And you allocate the frame buffer like this:
@code
screen->frameBuffer = (char*)malloc(screenwidth*screenheight*bpp);
@endcode
After that, you initialize the server, like
@code
rfbInitServer(screen);
@endcode
You can use a blocking event loop, a background (pthread based) event loop,
or implement your own using the rfbProcessEvents() function.
@subsection server_options Optional Server Features
These options have to be set between rfbGetScreen() and rfbInitServer().
If you already have a socket to talk to, just set rfbScreenInfo::inetdSock
(originally this is for inetd handling, but why not use it for your purpose?).
To also start an HTTP server (running on port 5800+display_number), you have
to set rfbScreenInfo::httpDir to a directory containing vncviewer.jar and
index.vnc (like the included "classes" directory).
@section making_it_interactive Making it interactive
Whenever you draw something, you have to call
@code
rfbMarkRectAsModified(screen,x1,y1,x2,y2).
@endcode
This tells LibVNCServer to send updates to all connected clients.
There exist the following IO functions as members of rfbScreen:
rfbScreenInfo::kbdAddEvent(), rfbScreenInfo::kbdReleaseAllKeys(), rfbScreenInfo::ptrAddEvent() and rfbScreenInfo::setXCutText()
rfbScreenInfo::kbdAddEvent()
is called when a key is pressed.
rfbScreenInfo::kbdReleaseAllKeys()
is not called at all (maybe in the future).
rfbScreenInfo::ptrAddEvent()
is called when the mouse moves or a button is pressed.
WARNING: if you want to have proper cursor handling, call
rfbDefaultPtrAddEvent()
in your own function. This sets the coordinates of the cursor.
rfbScreenInfo::setXCutText()
is called when the selection changes.
There are only two hooks:
rfbScreenInfo::newClientHook()
is called when a new client has connected.
rfbScreenInfo::displayHook()
is called just before a frame buffer update is sent.
You can also override the following methods:
rfbScreenInfo::getCursorPtr()
This could be used to make an animated cursor (if you really want ...)
rfbScreenInfo::setTranslateFunction()
If you insist on colour maps or something more obscure, you have to
implement this. Default is a trueColour mapping.
@section cursor_handling Cursor handling
The screen holds a pointer
rfbScreenInfo::cursor
to the current cursor. Whenever you set it, remember that any dynamically
created cursor (like return value from rfbMakeXCursor()) is not free'd!
The rfbCursor structure consists mainly of a mask and a source. The rfbCursor::mask
describes, which pixels are drawn for the cursor (a cursor needn't be
rectangular). The rfbCursor::source describes, which colour those pixels should have.
The standard is an XCursor: a cursor with a foreground and a background
colour (stored in backRed,backGreen,backBlue and the same for foreground
in a range from 0-0xffff). Therefore, the arrays "mask" and "source"
contain pixels as single bits stored in bytes in MSB order. The rows are
padded, such that each row begins with a new byte (i.e. a 10x4
cursor's mask has 2x4 bytes, because 2 bytes are needed to hold 10 bits).
It is however very easy to make a cursor like this:
@code
char* cur=" "
" xx "
" x "
" ";
char* mask="xxxx"
"xxxx"
"xxxx"
"xxx ";
rfbCursorPtr c=rfbMakeXCursor(4,4,cur,mask);
@endcode
You can even set rfbCursor::mask to NULL in this call and LibVNCServer will calculate
a mask for you (dynamically, so you have to free it yourself).
There is also an array named rfbCursor::richSource for colourful cursors. They have
the same format as the frameBuffer (i.e. if the server is 32 bit,
a 10x4 cursor has 4x10x4 bytes).
@section screen_client_difference What is the difference between rfbScreenInfoPtr and rfbClientPtr?
The rfbScreenInfoPtr is a pointer to a rfbScreenInfo structure, which
holds information about the server, like pixel format, io functions,
frame buffer etc. The rfbClientPtr is a pointer to an rfbClientRec structure, which holds
information about a client, like pixel format, socket of the
connection, etc. A server can have several clients, but needn't have any. So, if you
have a server and three clients are connected, you have one instance
of a rfbScreenInfo and three instances of rfbClientRec's.
The rfbClientRec structure holds a member rfbClientRec::screen which points to the server.
So, to access the server from the client structure, you use client->screen.
To access all clients from a server be sure to use the provided iterator
rfbGetClientIterator()
with
rfbClientIteratorNext()
and
rfbReleaseClientIterator()
to prevent thread clashes.
@section example_code Example Code
There are two documented examples included:
- example.c, a shared scribble sheet
- pnmshow.c, a program to show PNMs (pictures) over the net.
The examples are not too well documented, but easy straight forward and a
good starting point.
Try example.c: it outputs on which port it listens (default: 5900), so it is
display 0. To view, call @code vncviewer :0 @endcode
You should see a sheet with a gradient and "Hello World!" written on it. Try
to paint something. Note that everytime you click, there is some bigger blot,
whereas when you drag the mouse while clicked you draw a line. The size of the
blot depends on the mouse button you click. Open a second vncviewer with
the same parameters and watch it as you paint in the other window. This also
works over internet. You just have to know either the name or the IP of your
machine. Then it is @code vncviewer machine.where.example.runs.com:0 @endcode
or similar for the remote client. Now you are ready to type something. Be sure
that your mouse sits still, because everytime the mouse moves, the cursor is
reset to the position of the pointer! If you are done with that demo, press
the down or up arrows. If your viewer supports it, then the dimensions of the
sheet change. Just press Escape in the viewer. Note that the server still
runs, even if you closed both windows. When you reconnect now, everything you
painted and wrote is still there. You can press "Page Up" for a blank page.
The demo pnmshow.c is much simpler: you either provide a filename as argument
or pipe a file through stdin. Note that the file has to be a raw pnm/ppm file,
i.e. a truecolour graphics. Only the Escape key is implemented. This may be
the best starting point if you want to learn how to use LibVNCServer. You
are confronted with the fact that the bytes per pixel can only be 8, 16 or 32.
*/
#endif

View File

@@ -1,6 +1,11 @@
#ifndef RFBCLIENT_H
#define RFBCLIENT_H
/**
* @defgroup libvncclient_api LibVNCClient API Reference
* @{
*/
/*
* Copyright (C) 2000, 2001 Const Kaplinsky. All Rights Reserved.
* Copyright (C) 2000 Tridia Corporation. All Rights Reserved.
@@ -22,8 +27,8 @@
* USA.
*/
/*
* vncviewer.h
/**
* @file rfbclient.h
*/
#include <stdio.h>
@@ -33,6 +38,9 @@
#include <unistd.h>
#include "rfbproto.h"
#include "keysym.h"
#ifdef LIBVNCSERVER_WITH_CLIENT_TLS
#include <gnutls/gnutls.h>
#endif
#define rfbClientSwap16IfLE(s) \
(*(char *)&client->endianTest ? ((((s) & 0xff) << 8) | (((s) >> 8) & 0xff)) : (s))
@@ -43,6 +51,16 @@
(((l) & 0x0000ff00) << 8) | \
(((l) & 0x000000ff) << 24)) : (l))
#define rfbClientSwap64IfLE(l) \
(*(char *)&client->endianTest ? ((((l) & 0xff00000000000000ULL) >> 56) | \
(((l) & 0x00ff000000000000ULL) >> 40) | \
(((l) & 0x0000ff0000000000ULL) >> 24) | \
(((l) & 0x000000ff00000000ULL) >> 8) | \
(((l) & 0x00000000ff000000ULL) << 8) | \
(((l) & 0x0000000000ff0000ULL) << 24) | \
(((l) & 0x000000000000ff00ULL) << 40) | \
(((l) & 0x00000000000000ffULL) << 56)) : (l))
#define FLASH_PORT_OFFSET 5400
#define LISTEN_PORT_OFFSET 5500
#define TUNNEL_PORT_OFFSET 5500
@@ -54,12 +72,12 @@
#define DEFAULT_VIA_CMD \
(DEFAULT_SSH_CMD " -f -L %L:%H:%R %G sleep 20")
#if (defined __cplusplus)
#if(defined __cplusplus)
extern "C"
{
#endif
/* vncrec */
/** vncrec */
typedef struct {
FILE* file;
@@ -68,7 +86,7 @@ typedef struct {
rfbBool doNotSleep;
} rfbVNCRec;
/* client data */
/** client data */
typedef struct rfbClientData {
void* tag;
@@ -76,7 +94,7 @@ typedef struct rfbClientData {
struct rfbClientData* next;
} rfbClientData;
/* app data (belongs into rfbClient?) */
/** app data (belongs into rfbClient?) */
typedef struct {
rfbBool shareDesktop;
@@ -94,20 +112,44 @@ typedef struct {
int qualityLevel;
rfbBool enableJPEG;
rfbBool useRemoteCursor;
rfbBool palmVNC; /* use palmvnc specific SetScale (vs ultravnc) */
int scaleSetting; /* 0 means no scale set, else 1/scaleSetting */
rfbBool palmVNC; /**< use palmvnc specific SetScale (vs ultravnc) */
int scaleSetting; /**< 0 means no scale set, else 1/scaleSetting */
} AppData;
/** For GetCredentialProc callback function to return */
typedef union _rfbCredential
{
/** X509 (VeNCrypt) */
struct
{
char *x509CACertFile;
char *x509CACrlFile;
char *x509ClientCertFile;
char *x509ClientKeyFile;
} x509Credential;
/** Plain (VeNCrypt), MSLogon (UltraVNC) */
struct
{
char *username;
char *password;
} userCredential;
} rfbCredential;
#define rfbCredentialTypeX509 1
#define rfbCredentialTypeUser 2
struct _rfbClient;
typedef void (*HandleTextChatProc)(struct _rfbClient* client, int value, char *text);
typedef void (*HandleXvpMsgProc)(struct _rfbClient* client, uint8_t version, uint8_t opcode);
typedef void (*HandleKeyboardLedStateProc)(struct _rfbClient* client, int value, int pad);
typedef rfbBool (*HandleCursorPosProc)(struct _rfbClient* client, int x, int y);
typedef void (*SoftCursorLockAreaProc)(struct _rfbClient* client, int x, int y, int w, int h);
typedef void (*SoftCursorUnlockScreenProc)(struct _rfbClient* client);
typedef void (*GotFrameBufferUpdateProc)(struct _rfbClient* client, int x, int y, int w, int h);
typedef void (*FinishedFrameBufferUpdateProc)(struct _rfbClient* client);
typedef char* (*GetPasswordProc)(struct _rfbClient* client);
typedef rfbCredential* (*GetCredentialProc)(struct _rfbClient* client, int credentialType);
typedef rfbBool (*MallocFrameBufferProc)(struct _rfbClient* client);
typedef void (*GotXCutTextProc)(struct _rfbClient* client, const char *text, int textlen);
typedef void (*BellProc)(struct _rfbClient* client);
@@ -125,7 +167,7 @@ typedef struct _rfbClient {
const char* programName;
char* serverHost;
int serverPort; /* if -1, then use file recorded by vncrec */
int serverPort; /**< if -1, then use file recorded by vncrec */
rfbBool listenSpecified;
int listenPort, flashPort;
@@ -133,7 +175,7 @@ typedef struct _rfbClient {
int x, y, w, h;
} updateRect;
/* Note that the CoRRE encoding uses this buffer and assumes it is big enough
/** Note that the CoRRE encoding uses this buffer and assumes it is big enough
to hold 255 * 255 * 32 bits -> 260100 bytes. 640*480 = 307200 bytes.
Hextile also assumes it is big enough to hold 16 * 16 * 32 bits.
Tight encoding assumes BUFFER_SIZE is at least 16384 bytes. */
@@ -150,6 +192,9 @@ typedef struct _rfbClient {
rfbPixelFormat format;
rfbServerInitMsg si;
/* listen.c */
int listenSock;
/* sockets.c */
#define RFB_BUF_SIZE 8192
char buf[RFB_BUF_SIZE];
@@ -181,7 +226,7 @@ typedef struct _rfbClient {
* Variables for the ``tight'' encoding implementation.
*/
/* Separate buffer for compressed data. */
/** Separate buffer for compressed data. */
#define ZLIB_BUFFER_SIZE 30000
char zlib_buffer[ZLIB_BUFFER_SIZE];
@@ -196,7 +241,7 @@ typedef struct _rfbClient {
uint8_t tightPrevRow[2048*3*sizeof(uint16_t)];
#ifdef LIBVNCSERVER_HAVE_LIBJPEG
/* JPEG decoder state. */
/** JPEG decoder state. */
rfbBool jpegError;
struct jpeg_source_mgr* jpegSrcManager;
@@ -210,7 +255,7 @@ typedef struct _rfbClient {
/* cursor.c */
uint8_t *rcSource, *rcMask;
/* private data pointer */
/** private data pointer */
rfbClientData* clientData;
rfbVNCRec* vncRec;
@@ -228,7 +273,8 @@ typedef struct _rfbClient {
SoftCursorLockAreaProc SoftCursorLockArea;
SoftCursorUnlockScreenProc SoftCursorUnlockScreen;
GotFrameBufferUpdateProc GotFrameBufferUpdate;
/* the pointer returned by GetPassword will be freed after use! */
FinishedFrameBufferUpdateProc FinishedFrameBufferUpdate;
/** the pointer returned by GetPassword will be freed after use! */
GetPasswordProc GetPassword;
MallocFrameBufferProc MallocFrameBuffer;
GotXCutTextProc GotXCutText;
@@ -237,7 +283,7 @@ typedef struct _rfbClient {
GotCursorShapeProc GotCursorShape;
GotCopyRectProc GotCopyRect;
/* Which messages are supported by the server
/** Which messages are supported by the server
* This is a *guess* for most servers.
* (If we can even detect the type of server)
*
@@ -247,8 +293,38 @@ typedef struct _rfbClient {
*/
rfbSupportedMessages supportedMessages;
/* negotiated protocol version */
/** negotiated protocol version */
int major, minor;
/** The selected security types */
uint32_t authScheme, subAuthScheme;
#ifdef LIBVNCSERVER_WITH_CLIENT_TLS
/** The TLS session for Anonymous TLS and VeNCrypt */
gnutls_session_t tlsSession;
#endif
/** To support security types that requires user input (except VNC password
* authentication), for example VeNCrypt and MSLogon, this callback function
* must be set before the authentication. Otherwise, it implicates that the
* caller application does not support it and related security types should
* be bypassed.
*/
GetCredentialProc GetCredential;
/** The 0-terminated security types supported by the client.
* Set by function SetClientAuthSchemes() */
uint32_t *clientAuthSchemes;
/** When the server is a repeater, this specifies the final destination */
char *destHost;
int destPort;
/** the QoS IP DSCP for this client */
int QoS_DSCP;
/** hook to handle xvp server messages */
HandleXvpMsgProc HandleXvpMsg;
} rfbClient;
/* cursor.c */
@@ -258,6 +334,7 @@ extern rfbBool HandleCursorShape(rfbClient* client,int xhot, int yhot, int width
/* listen.c */
extern void listenForIncomingConnections(rfbClient* viewer);
extern int listenForIncomingConnectionsNoFork(rfbClient* viewer, int usec_timeout);
/* rfbproto.c */
@@ -265,6 +342,8 @@ extern rfbBool rfbEnableClientLogging;
typedef void (*rfbClientLogProc)(const char *format, ...);
extern rfbClientLogProc rfbClientLog,rfbClientErr;
extern rfbBool ConnectToRFBServer(rfbClient* client,const char *hostname, int port);
extern rfbBool ConnectToRFBRepeater(rfbClient* client,const char *repeaterHost, int repeaterPort, const char *destHost, int destPort);
extern void SetClientAuthSchemes(rfbClient* client,const uint32_t *authSchemes, int size);
extern rfbBool InitialiseRFBConnection(rfbClient* client);
extern rfbBool SetFormatAndEncodings(rfbClient* client);
extern rfbBool SendIncrementalFramebufferUpdateRequest(rfbClient* client);
@@ -282,9 +361,13 @@ extern rfbBool TextChatOpen(rfbClient* client);
extern rfbBool TextChatClose(rfbClient* client);
extern rfbBool TextChatFinish(rfbClient* client);
extern rfbBool PermitServerInput(rfbClient* client, int enabled);
extern rfbBool SendXvpMsg(rfbClient* client, uint8_t version, uint8_t code);
extern void PrintPixelFormat(rfbPixelFormat *format);
extern rfbBool SupportsClient2Server(rfbClient* client, int messageType);
extern rfbBool SupportsServer2Client(rfbClient* client, int messageType);
/* client data */
void rfbClientSetClientData(rfbClient* client, void* tag, void* data);
@@ -294,10 +377,10 @@ void* rfbClientGetClientData(rfbClient* client, void* tag);
typedef struct _rfbClientProtocolExtension {
int* encodings;
/* returns TRUE if the encoding was handled */
/** returns TRUE if the encoding was handled */
rfbBool (*handleEncoding)(rfbClient* cl,
rfbFramebufferUpdateRectHeader* rect);
/* returns TRUE if it handled the message */
/** returns TRUE if it handled the message */
rfbBool (*handleMessage)(rfbClient* cl,
rfbServerToClientMsg* message);
struct _rfbClientProtocolExtension* next;
@@ -314,8 +397,11 @@ extern rfbBool WriteToRFBServer(rfbClient* client, char *buf, int n);
extern int FindFreeTcpPort(void);
extern int ListenAtTcpPort(int port);
extern int ConnectClientToTcpAddr(unsigned int host, int port);
extern int ConnectClientToTcpAddr6(const char *hostname, int port);
extern int ConnectClientToUnixSock(const char *sockFile);
extern int AcceptTcpConnection(int listenSock);
extern rfbBool SetNonBlocking(int sock);
extern rfbBool SetDSCP(int sock, int dscp);
extern rfbBool StringToIPAddr(const char *str, unsigned int *addr);
extern rfbBool SameMachine(int sock);
@@ -324,12 +410,21 @@ extern int WaitForMessage(rfbClient* client,unsigned int usecs);
/* vncviewer.c */
rfbClient* rfbGetClient(int bitsPerSample,int samplesPerPixel,int bytesPerPixel);
rfbBool rfbInitClient(rfbClient* client,int* argc,char** argv);
/* rfbClientCleanup() does not touch client->frameBuffer */
/** rfbClientCleanup() does not touch client->frameBuffer */
void rfbClientCleanup(rfbClient* client);
#if (defined __cplusplus)
#if(defined __cplusplus)
}
#endif
#endif
/**
* @}
*/
/**
@page libvncclient_doc LibVNCClient Documentation
@section example_code Example Code
See SDLvncviewer.c for a rather complete client example.
*/
#endif

View File

@@ -1,6 +1,17 @@
#ifndef RFBPROTO_H
#define RFBPROTO_H
/**
@mainpage
@li @ref libvncserver_api
@li @ref libvncserver_doc
@li @ref libvncclient_api
@li @ref libvncclient_doc
*/
/*
* Copyright (C) 2005 Rohit Kumar, Johannes E. Schindelin
* Copyright (C) 2000-2002 Constantin Kaplinsky. All Rights Reserved.
@@ -68,6 +79,16 @@
#endif
#endif
/* some autotool versions do not properly prefix
WORDS_BIGENDIAN, so do that manually */
#ifdef WORDS_BIGENDIAN
#define LIBVNCSERVER_WORDS_BIGENDIAN
#endif
/* MS compilers don't have strncasecmp */
#ifdef _MSC_VER
#define strncasecmp _strnicmp
#endif
#if !defined(WIN32) || defined(__MINGW32__)
#define max(a,b) (((a)>(b))?(a):(b))
@@ -96,7 +117,7 @@ typedef uint32_t in_addr_t;
#define INADDR_NONE ((in_addr_t) 0xffffffff)
#endif
#define MAX_ENCODINGS 20
#define MAX_ENCODINGS 21
/*****************************************************************************
*
@@ -264,6 +285,19 @@ typedef char rfbProtocolVersionMsg[13]; /* allow extra byte for null */
#define rfbTight 16
#define rfbUltra 17
#define rfbTLS 18
#define rfbVeNCrypt 19
#define rfbARD 30
#define rfbMSLogon 0xfffffffa
#define rfbVeNCryptPlain 256
#define rfbVeNCryptTLSNone 257
#define rfbVeNCryptTLSVNC 258
#define rfbVeNCryptTLSPlain 259
#define rfbVeNCryptX509None 260
#define rfbVeNCryptX509VNC 261
#define rfbVeNCryptX509Plain 262
#define rfbVeNCryptX509SASL 263
#define rfbVeNCryptTLSSASL 264
/*
* rfbConnFailed: For some reason the connection failed (e.g. the server
@@ -357,7 +391,6 @@ typedef struct {
#define rfbServerCutText 3
/* Modif sf@2002 */
#define rfbResizeFrameBuffer 4
#define rfbKeyFrameUpdate 5
#define rfbPalmVNCReSizeFrameBuffer 0xF
/* client -> server */
@@ -380,9 +413,10 @@ typedef struct {
/* Modif sf@2002 - TextChat - Bidirectionnal */
#define rfbTextChat 11
/* Modif cs@2005 */
#define rfbKeyFrameRequest 12
/* PalmVNC 1.4 & 2.0 SetScale Factor message */
#define rfbPalmVNCSetScaleFactor 0xF
/* Xvp message - bidirectional */
#define rfbXvp 250
@@ -417,6 +451,9 @@ typedef struct {
#define rfbEncodingSolMonoZip 0xFFFF0008
#define rfbEncodingUltraZip 0xFFFF0009
/* Xvp pseudo-encoding */
#define rfbEncodingXvp 0xFFFFFECB
/*
* Special encoding numbers:
* 0xFFFFFF00 .. 0xFFFFFF0F -- encoding-specific compression levels;
@@ -489,18 +526,6 @@ typedef struct {
#define sz_rfbFramebufferUpdateMsg 4
/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
* KeyFrameUpdate - Acknowledgment of a key frame request, it tells the client
* that the next update received will be a key frame.
*/
typedef struct {
uint8_t type;
} rfbKeyFrameUpdateMsg;
#define sz_rfbKeyFrameUpdateMsg 1
/*
* Each rectangle of pixel data consists of a header describing the position
* and size of the rectangle and a type word describing the encoding of the
@@ -1039,6 +1064,44 @@ typedef struct _rfbTextChatMsg {
#define rfbTextChatFinished 0xFFFFFFFD
/*-----------------------------------------------------------------------------
* Xvp Message
* Bidirectional message
* A server which supports the xvp extension declares this by sending a message
* with an Xvp_INIT xvp-message-code when it receives a request from the client
* to use the xvp Pseudo-encoding. The server must specify in this message the
* highest xvp-extension-version it supports: the client may assume that the
* server supports all versions from 1 up to this value. The client is then
* free to use any supported version. Currently, only version 1 is defined.
*
* A server which subsequently receives an xvp Client Message requesting an
* operation which it is unable to perform, informs the client of this by
* sending a message with an Xvp_FAIL xvp-message-code, and the same
* xvp-extension-version as included in the client's operation request.
*
* A client supporting the xvp extension sends this to request that the server
* initiate a clean shutdown, clean reboot or abrupt reset of the system whose
* framebuffer the client is displaying.
*/
typedef struct {
uint8_t type; /* always rfbXvp */
uint8_t pad;
uint8_t version; /* xvp extension version */
uint8_t code; /* xvp message code */
} rfbXvpMsg;
#define sz_rfbXvpMsg (4)
/* server message codes */
#define rfbXvp_Fail 0
#define rfbXvp_Init 1
/* client message codes */
#define rfbXvp_Shutdown 2
#define rfbXvp_Reboot 3
#define rfbXvp_Reset 4
/*-----------------------------------------------------------------------------
* Modif sf@2002
@@ -1093,6 +1156,7 @@ typedef union {
rfbPalmVNCReSizeFrameBufferMsg prsfb;
rfbFileTransferMsg ft;
rfbTextChatMsg tc;
rfbXvpMsg xvp;
} rfbServerToClientMsg;
@@ -1328,6 +1392,7 @@ typedef struct _rfbSetSWMsg {
#define sz_rfbSetSWMsg 6
/*-----------------------------------------------------------------------------
* Union of all client->server messages.
*/
@@ -1347,6 +1412,7 @@ typedef union {
rfbFileTransferMsg ft;
rfbSetSWMsg sw;
rfbTextChatMsg tc;
rfbXvpMsg xvp;
} rfbClientToServerMsg;
/*

0
libvncserver/rfb/rfbregion.h Executable file → Normal file
View File

0
libvncserver/rfbregion.c Executable file → Normal file
View File

View File

@@ -54,10 +54,6 @@
#endif
#endif
#ifdef CORBA
#include <vncserverctrl.h>
#endif
#ifdef DEBUGPROTO
#undef DEBUGPROTO
#define DEBUGPROTO(x) x
@@ -214,15 +210,11 @@ rfbNewClientConnection(rfbScreenInfoPtr rfbScreen,
rfbClientPtr cl;
cl = rfbNewClient(rfbScreen,sock);
#ifdef CORBA
if(cl!=NULL)
newConnection(cl, (KEYBOARD_DEVICE|POINTER_DEVICE),1,1,1);
#endif
}
/*
* rfbReverseConnection is called by the CORBA stuff to make an outward
* rfbReverseConnection is called to make an outward
* connection to a "listening" RFB client.
*/
@@ -307,13 +299,10 @@ rfbNewTCPOrUDPClient(rfbScreenInfoPtr rfbScreen,
}
rfbReleaseClientIterator(iterator);
#ifndef WIN32
if (fcntl(sock, F_SETFL, O_NONBLOCK) < 0) {
rfbLogPerror("fcntl failed");
if(!rfbSetNonBlocking(sock)) {
close(sock);
return NULL;
}
#endif
if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY,
(char *)&one, sizeof(one)) < 0) {
@@ -327,6 +316,7 @@ rfbNewTCPOrUDPClient(rfbScreenInfoPtr rfbScreen,
INIT_MUTEX(cl->outputMutex);
INIT_MUTEX(cl->refCountMutex);
INIT_MUTEX(cl->sendMutex);
INIT_COND(cl->deleteCond);
cl->state = RFB_PROTOCOL_VERSION;
@@ -484,7 +474,7 @@ rfbClientConnectionGone(rfbClientPtr cl)
if (cl->next)
cl->next->prev = cl->prev;
if(cl->sock>0)
if(cl->sock>=0)
close(cl->sock);
if (cl->scaledScreen!=NULL)
@@ -496,6 +486,10 @@ rfbClientConnectionGone(rfbClientPtr cl)
rfbFreeUltraData(cl);
/* free buffers holding pixel data before and after encoding */
free(cl->beforeEncBuf);
free(cl->afterEncBuf);
#ifdef LIBVNCSERVER_HAVE_LIBPTHREAD
if(cl->screen->backgroundLoop != FALSE) {
int i;
@@ -550,9 +544,9 @@ rfbClientConnectionGone(rfbClientPtr cl)
UNLOCK(cl->outputMutex);
TINI_MUTEX(cl->outputMutex);
#ifdef CORBA
destroyConnection(cl);
#endif
LOCK(cl->sendMutex);
UNLOCK(cl->sendMutex);
TINI_MUTEX(cl->sendMutex);
rfbPrintStats(cl);
@@ -609,14 +603,9 @@ rfbProcessClientProtocolVersion(rfbClientPtr cl)
pv[sz_rfbProtocolVersionMsg] = 0;
if (sscanf(pv,rfbProtocolVersionFormat,&major_,&minor_) != 2) {
char name[1024];
if(sscanf(pv,"RFB %03d.%03d %1023s\n",&major_,&minor_,name) != 3) {
rfbErr("rfbProcessClientProtocolVersion: not a valid RFB client: %s\n", pv);
rfbCloseClient(cl);
return;
}
free(cl->host);
cl->host=strdup(name);
rfbErr("rfbProcessClientProtocolVersion: not a valid RFB client: %s\n", pv);
rfbCloseClient(cl);
return;
}
rfbLog("Client Protocol Version %d.%d\n", major_, minor_);
@@ -882,16 +871,16 @@ rfbSendSupportedMessages(rfbClientPtr cl)
/*rfbSetBit(msgs.client2server, rfbSetServerInput); */
/*rfbSetBit(msgs.client2server, rfbSetSW); */
/*rfbSetBit(msgs.client2server, rfbTextChat); */
/*rfbSetBit(msgs.client2server, rfbKeyFrameRequest); */
rfbSetBit(msgs.client2server, rfbPalmVNCSetScaleFactor);
rfbSetBit(msgs.client2server, rfbXvp);
rfbSetBit(msgs.server2client, rfbFramebufferUpdate);
rfbSetBit(msgs.server2client, rfbSetColourMapEntries);
rfbSetBit(msgs.server2client, rfbBell);
rfbSetBit(msgs.server2client, rfbServerCutText);
rfbSetBit(msgs.server2client, rfbResizeFrameBuffer);
/*rfbSetBit(msgs.server2client, rfbKeyFrameUpdate); */
rfbSetBit(msgs.server2client, rfbPalmVNCReSizeFrameBuffer);
rfbSetBit(msgs.server2client, rfbXvp);
memcpy(&cl->updateBuf[cl->ublen], (char *)&msgs, sz_rfbSupportedMessages);
cl->ublen += sz_rfbSupportedMessages;
@@ -1037,6 +1026,33 @@ rfbSendServerIdentity(rfbClientPtr cl)
return TRUE;
}
/*
* Send an xvp server message
*/
rfbBool
rfbSendXvp(rfbClientPtr cl, uint8_t version, uint8_t code)
{
rfbXvpMsg xvp;
xvp.type = rfbXvp;
xvp.pad = 0;
xvp.version = version;
xvp.code = code;
LOCK(cl->sendMutex);
if (rfbWriteExact(cl, (char *)&xvp, sz_rfbXvpMsg) < 0) {
rfbLogPerror("rfbSendXvp: write");
rfbCloseClient(cl);
}
UNLOCK(cl->sendMutex);
rfbStatRecordMessageSent(cl, rfbXvp, sz_rfbXvpMsg, sz_rfbXvpMsg);
return TRUE;
}
rfbBool rfbSendTextChatMessage(rfbClientPtr cl, uint32_t length, char *buffer)
{
rfbTextChatMsg tc;
@@ -1102,9 +1118,11 @@ rfbBool rfbSendFileTransferMessage(rfbClientPtr cl, uint8_t contentType, uint8_t
/*
rfbLog("rfbSendFileTransferMessage( %dtype, %dparam, %dsize, %dlen, %p)\n", contentType, contentParam, size, length, buffer);
*/
LOCK(cl->sendMutex);
if (rfbWriteExact(cl, (char *)&ft, sz_rfbFileTransferMsg) < 0) {
rfbLogPerror("rfbSendFileTransferMessage: write");
rfbCloseClient(cl);
UNLOCK(cl->sendMutex);
return FALSE;
}
@@ -1113,9 +1131,11 @@ rfbBool rfbSendFileTransferMessage(rfbClientPtr cl, uint8_t contentType, uint8_t
if (rfbWriteExact(cl, buffer, length) < 0) {
rfbLogPerror("rfbSendFileTransferMessage: write");
rfbCloseClient(cl);
UNLOCK(cl->sendMutex);
return FALSE;
}
}
UNLOCK(cl->sendMutex);
rfbStatRecordMessageSent(cl, rfbFileTransfer, sz_rfbFileTransferMsg+length, sz_rfbFileTransferMsg+length);
@@ -1250,7 +1270,11 @@ rfbBool rfbSendDirContent(rfbClientPtr cl, int length, char *buffer)
/*
rfbLog("rfbProcessFileTransfer() rfbDirContentRequest: rfbRDirContent: Sending \"%s\"\n", (char *)win32filename.cFileName);
*/
if (rfbSendFileTransferMessage(cl, rfbDirPacket, rfbADirectory, 0, nOptLen, (char *)&win32filename)==FALSE) return FALSE;
if (rfbSendFileTransferMessage(cl, rfbDirPacket, rfbADirectory, 0, nOptLen, (char *)&win32filename)==FALSE)
{
closedir(dirp);
return FALSE;
}
}
}
}
@@ -1326,6 +1350,9 @@ rfbBool rfbSendFileTransferChunk(rfbClientPtr cl)
n = select(cl->sock + 1, NULL, &wfds, NULL, &tv);
if (n<0) {
#ifdef WIN32
errno=WSAGetLastError();
#endif
rfbLog("rfbSendFileTransferChunk() select failed: %s\n", strerror(errno));
}
/* We have space on the transmit queue */
@@ -1345,6 +1372,9 @@ rfbBool rfbSendFileTransferChunk(rfbClientPtr cl)
return retval;
case -1:
/* TODO : send an error msg to the client... */
#ifdef WIN32
errno=WSAGetLastError();
#endif
rfbLog("rfbSendFileTransferChunk(): %s\n",strerror(errno));
retval = rfbSendFileTransferMessage(cl, rfbAbortFileTransfer, 0, 0, 0, NULL);
close(cl->fileTransfer.fd);
@@ -1525,12 +1555,15 @@ rfbBool rfbProcessFileTransfer(rfbClientPtr cl, uint8_t contentType, uint8_t con
/* TODO: finish 64-bit file size support */
sizeHtmp = 0;
LOCK(cl->sendMutex);
if (rfbWriteExact(cl, (char *)&sizeHtmp, 4) < 0) {
rfbLogPerror("rfbProcessFileTransfer: write");
rfbCloseClient(cl);
UNLOCK(cl->sendMutex);
if (buffer!=NULL) free(buffer);
return FALSE;
}
UNLOCK(cl->sendMutex);
break;
case rfbFileHeader:
@@ -1624,7 +1657,7 @@ rfbBool rfbProcessFileTransfer(rfbClientPtr cl, uint8_t contentType, uint8_t con
#ifdef LIBVNCSERVER_HAVE_LIBZ
/* compressed packet */
nRet = uncompress(compBuff,&nRawBytes,(const unsigned char*)buffer, length);
retval=write(cl->fileTransfer.fd, compBuff, nRawBytes);
retval=write(cl->fileTransfer.fd, (char*)compBuff, nRawBytes);
#else
/* Write the file out as received... */
retval=write(cl->fileTransfer.fd, buffer, length);
@@ -1983,7 +2016,15 @@ rfbProcessClientNormalMessage(rfbClientPtr cl)
"%s\n", cl->host);
cl->enableServerIdentity = TRUE;
}
break;
break;
case rfbEncodingXvp:
rfbLog("Enabling Xvp protocol extension for client "
"%s\n", cl->host);
if (!rfbSendXvp(cl, 1, rfbXvp_Init)) {
rfbCloseClient(cl);
return;
}
break;
default:
#ifdef LIBVNCSERVER_HAVE_LIBZ
if ( enc >= (uint32_t)rfbEncodingCompressLevel0 &&
@@ -2122,6 +2163,7 @@ rfbProcessClientNormalMessage(rfbClientPtr cl)
if (!cl->format.trueColour) {
if (!rfbSetClientColourMap(cl, 0, 0)) {
sraRgnDestroy(tmpRegion);
TSIGNAL(cl->updateCond);
UNLOCK(cl->updateMutex);
return;
}
@@ -2366,6 +2408,28 @@ rfbProcessClientNormalMessage(rfbClientPtr cl)
rfbSendNewScaleSize(cl);
return;
case rfbXvp:
if ((n = rfbReadExact(cl, ((char *)&msg) + 1,
sz_rfbXvpMsg - 1)) <= 0) {
if (n != 0)
rfbLogPerror("rfbProcessClientNormalMessage: read");
rfbCloseClient(cl);
return;
}
rfbStatRecordMessageRcvd(cl, msg.type, sz_rfbXvpMsg, sz_rfbXvpMsg);
/* only version when is defined, so echo back a fail */
if(msg.xvp.version != 1) {
rfbSendXvp(cl, msg.xvp.version, rfbXvp_Fail);
}
else {
/* if the hook exists and fails, send a fail msg */
if(cl->screen->xvpHook && !cl->screen->xvpHook(cl, msg.xvp.version, msg.xvp.code))
rfbSendXvp(cl, 1, rfbXvp_Fail);
}
return;
default:
{
rfbExtensionData *e,*next;
@@ -2433,9 +2497,14 @@ rfbSendFramebufferUpdate(rfbClientPtr cl,
fu->nRects = Swap16IfLE(1);
cl->ublen = sz_rfbFramebufferUpdateMsg;
if (!rfbSendNewFBSize(cl, cl->scaledScreen->width, cl->scaledScreen->height)) {
if(cl->screen->displayFinishedHook)
cl->screen->displayFinishedHook(cl, FALSE);
return FALSE;
}
return rfbSendUpdateBuf(cl);
result = rfbSendUpdateBuf(cl);
if(cl->screen->displayFinishedHook)
cl->screen->displayFinishedHook(cl, result);
return result;
}
/*
@@ -2551,6 +2620,8 @@ rfbSendFramebufferUpdate(rfbClientPtr cl,
!sendSupportedMessages && !sendSupportedEncodings && !sendServerIdentity) {
sraRgnDestroy(updateRegion);
UNLOCK(cl->updateMutex);
if(cl->screen->displayFinishedHook)
cl->screen->displayFinishedHook(cl, TRUE);
return TRUE;
}
@@ -2747,7 +2818,7 @@ rfbSendFramebufferUpdate(rfbClientPtr cl,
if (!rfbSendServerIdentity(cl))
goto updateFailed;
}
if (!sraRgnEmpty(updateCopyRegion)) {
if (!rfbSendCopyRegion(cl,updateCopyRegion,dx,dy))
goto updateFailed;
@@ -2828,6 +2899,9 @@ updateFailed:
sraRgnReleaseIterator(i);
sraRgnDestroy(updateRegion);
sraRgnDestroy(updateCopyRegion);
if(cl->screen->displayFinishedHook)
cl->screen->displayFinishedHook(cl, result);
return result;
}
@@ -3103,12 +3177,15 @@ rfbSendSetColourMapEntries(rfbClientPtr cl,
len += nColours * 3 * 2;
LOCK(cl->sendMutex);
if (rfbWriteExact(cl, wbuf, len) < 0) {
rfbLogPerror("rfbSendSetColourMapEntries: write");
rfbCloseClient(cl);
if (wbuf != buf) free(wbuf);
UNLOCK(cl->sendMutex);
return FALSE;
}
UNLOCK(cl->sendMutex);
rfbStatRecordMessageSent(cl, rfbSetColourMapEntries, len, len);
if (wbuf != buf) free(wbuf);
@@ -3129,10 +3206,12 @@ rfbSendBell(rfbScreenInfoPtr rfbScreen)
i = rfbGetClientIterator(rfbScreen);
while((cl=rfbClientIteratorNext(i))) {
b.type = rfbBell;
LOCK(cl->sendMutex);
if (rfbWriteExact(cl, (char *)&b, sz_rfbBellMsg) < 0) {
rfbLogPerror("rfbSendBell: write");
rfbCloseClient(cl);
}
UNLOCK(cl->sendMutex);
}
rfbStatRecordMessageSent(cl, rfbBell, sz_rfbBellMsg, sz_rfbBellMsg);
rfbReleaseClientIterator(i);
@@ -3154,16 +3233,19 @@ rfbSendServerCutText(rfbScreenInfoPtr rfbScreen,char *str, int len)
while ((cl = rfbClientIteratorNext(iterator)) != NULL) {
sct.type = rfbServerCutText;
sct.length = Swap32IfLE(len);
LOCK(cl->sendMutex);
if (rfbWriteExact(cl, (char *)&sct,
sz_rfbServerCutTextMsg) < 0) {
rfbLogPerror("rfbSendServerCutText: write");
rfbCloseClient(cl);
UNLOCK(cl->sendMutex);
continue;
}
if (rfbWriteExact(cl, str, len) < 0) {
rfbLogPerror("rfbSendServerCutText: write");
rfbCloseClient(cl);
}
UNLOCK(cl->sendMutex);
rfbStatRecordMessageSent(cl, rfbServerCutText, sz_rfbServerCutTextMsg+len, sz_rfbServerCutTextMsg+len);
}
rfbReleaseClientIterator(iterator);
@@ -3183,7 +3265,7 @@ void
rfbNewUDPConnection(rfbScreenInfoPtr rfbScreen,
int sock)
{
if (write(sock, &ptrAcceleration, 1) < 0) {
if (write(sock, (char*) &ptrAcceleration, 1) < 0) {
rfbLogPerror("rfbNewUDPConnection: write");
}
}

90
libvncserver/rre.c Executable file → Normal file
View File

@@ -29,38 +29,18 @@
#include "rfb/rfb.h"
/*
* rreBeforeBuf contains pixel data in the client's format.
* rreAfterBuf contains the RRE encoded version. If the RRE encoded version is
* larger than the raw data or if it exceeds rreAfterBufSize then
* cl->beforeEncBuf contains pixel data in the client's format.
* cl->afterEncBuf contains the RRE encoded version. If the RRE encoded version is
* larger than the raw data or if it exceeds cl->afterEncBufSize then
* raw encoding is used instead.
*/
static int rreBeforeBufSize = 0;
static char *rreBeforeBuf = NULL;
static int rreAfterBufSize = 0;
static char *rreAfterBuf = NULL;
static int rreAfterBufLen=0;
static int subrectEncode8(uint8_t *data, int w, int h);
static int subrectEncode16(uint16_t *data, int w, int h);
static int subrectEncode32(uint32_t *data, int w, int h);
static int subrectEncode8(rfbClientPtr cl, uint8_t *data, int w, int h);
static int subrectEncode16(rfbClientPtr cl, uint16_t *data, int w, int h);
static int subrectEncode32(rfbClientPtr cl, uint32_t *data, int w, int h);
static uint32_t getBgColour(char *data, int size, int bpp);
void rfbRRECleanup(rfbScreenInfoPtr screen)
{
if (rreBeforeBufSize) {
free(rreBeforeBuf);
rreBeforeBufSize=0;
}
if (rreAfterBufSize) {
free(rreAfterBuf);
rreAfterBufSize=0;
}
}
/*
* rfbSendRectEncodingRRE - send a given rectangle using RRE encoding.
*/
@@ -82,36 +62,36 @@ rfbSendRectEncodingRRE(rfbClientPtr cl,
int maxRawSize = (cl->scaledScreen->width * cl->scaledScreen->height
* (cl->format.bitsPerPixel / 8));
if (rreBeforeBufSize < maxRawSize) {
rreBeforeBufSize = maxRawSize;
if (rreBeforeBuf == NULL)
rreBeforeBuf = (char *)malloc(rreBeforeBufSize);
if (cl->beforeEncBufSize < maxRawSize) {
cl->beforeEncBufSize = maxRawSize;
if (cl->beforeEncBuf == NULL)
cl->beforeEncBuf = (char *)malloc(cl->beforeEncBufSize);
else
rreBeforeBuf = (char *)realloc(rreBeforeBuf, rreBeforeBufSize);
cl->beforeEncBuf = (char *)realloc(cl->beforeEncBuf, cl->beforeEncBufSize);
}
if (rreAfterBufSize < maxRawSize) {
rreAfterBufSize = maxRawSize;
if (rreAfterBuf == NULL)
rreAfterBuf = (char *)malloc(rreAfterBufSize);
if (cl->afterEncBufSize < maxRawSize) {
cl->afterEncBufSize = maxRawSize;
if (cl->afterEncBuf == NULL)
cl->afterEncBuf = (char *)malloc(cl->afterEncBufSize);
else
rreAfterBuf = (char *)realloc(rreAfterBuf, rreAfterBufSize);
cl->afterEncBuf = (char *)realloc(cl->afterEncBuf, cl->afterEncBufSize);
}
(*cl->translateFn)(cl->translateLookupTable,
&(cl->screen->serverFormat),
&cl->format, fbptr, rreBeforeBuf,
&cl->format, fbptr, cl->beforeEncBuf,
cl->scaledScreen->paddedWidthInBytes, w, h);
switch (cl->format.bitsPerPixel) {
case 8:
nSubrects = subrectEncode8((uint8_t *)rreBeforeBuf, w, h);
nSubrects = subrectEncode8(cl, (uint8_t *)cl->beforeEncBuf, w, h);
break;
case 16:
nSubrects = subrectEncode16((uint16_t *)rreBeforeBuf, w, h);
nSubrects = subrectEncode16(cl, (uint16_t *)cl->beforeEncBuf, w, h);
break;
case 32:
nSubrects = subrectEncode32((uint32_t *)rreBeforeBuf, w, h);
nSubrects = subrectEncode32(cl, (uint32_t *)cl->beforeEncBuf, w, h);
break;
default:
rfbLog("getBgColour: bpp %d?\n",cl->format.bitsPerPixel);
@@ -126,7 +106,7 @@ rfbSendRectEncodingRRE(rfbClientPtr cl,
}
rfbStatRecordEncodingSent(cl, rfbEncodingRRE,
sz_rfbFramebufferUpdateRectHeader + sz_rfbRREHeader + rreAfterBufLen,
sz_rfbFramebufferUpdateRectHeader + sz_rfbRREHeader + cl->afterEncBufLen,
sz_rfbFramebufferUpdateRectHeader + w * h * (cl->format.bitsPerPixel / 8));
if (cl->ublen + sz_rfbFramebufferUpdateRectHeader + sz_rfbRREHeader
@@ -151,15 +131,15 @@ rfbSendRectEncodingRRE(rfbClientPtr cl,
memcpy(&cl->updateBuf[cl->ublen], (char *)&hdr, sz_rfbRREHeader);
cl->ublen += sz_rfbRREHeader;
for (i = 0; i < rreAfterBufLen;) {
for (i = 0; i < cl->afterEncBufLen;) {
int bytesToCopy = UPDATE_BUF_SIZE - cl->ublen;
if (i + bytesToCopy > rreAfterBufLen) {
bytesToCopy = rreAfterBufLen - i;
if (i + bytesToCopy > cl->afterEncBufLen) {
bytesToCopy = cl->afterEncBufLen - i;
}
memcpy(&cl->updateBuf[cl->ublen], &rreAfterBuf[i], bytesToCopy);
memcpy(&cl->updateBuf[cl->ublen], &cl->afterEncBuf[i], bytesToCopy);
cl->ublen += bytesToCopy;
i += bytesToCopy;
@@ -179,7 +159,7 @@ rfbSendRectEncodingRRE(rfbClientPtr cl,
* subrectEncode() encodes the given multicoloured rectangle as a background
* colour overwritten by single-coloured rectangles. It returns the number
* of subrectangles in the encoded buffer, or -1 if subrect encoding won't
* fit in the buffer. It puts the encoded rectangles in rreAfterBuf. The
* fit in the buffer. It puts the encoded rectangles in cl->afterEncBuf. The
* single-colour rectangle partition is not optimal, but does find the biggest
* horizontal or vertical rectangle top-left anchored to each consecutive
* coordinate position.
@@ -190,7 +170,7 @@ rfbSendRectEncodingRRE(rfbClientPtr cl,
#define DEFINE_SUBRECT_ENCODE(bpp) \
static int \
subrectEncode##bpp(uint##bpp##_t *data, int w, int h) { \
subrectEncode##bpp(rfbClientPtr client, uint##bpp##_t *data, int w, int h) { \
uint##bpp##_t cl; \
rfbRectangle subrect; \
int x,y; \
@@ -205,9 +185,9 @@ subrectEncode##bpp(uint##bpp##_t *data, int w, int h) { \
int newLen; \
uint##bpp##_t bg = (uint##bpp##_t)getBgColour((char*)data,w*h,bpp); \
\
*((uint##bpp##_t*)rreAfterBuf) = bg; \
*((uint##bpp##_t*)client->afterEncBuf) = bg; \
\
rreAfterBufLen = (bpp/8); \
client->afterEncBufLen = (bpp/8); \
\
for (y=0; y<h; y++) { \
line = data+(y*w); \
@@ -252,15 +232,15 @@ subrectEncode##bpp(uint##bpp##_t *data, int w, int h) { \
subrect.w = Swap16IfLE(thew); \
subrect.h = Swap16IfLE(theh); \
\
newLen = rreAfterBufLen + (bpp/8) + sz_rfbRectangle; \
if ((newLen > (w * h * (bpp/8))) || (newLen > rreAfterBufSize)) \
newLen = client->afterEncBufLen + (bpp/8) + sz_rfbRectangle; \
if ((newLen > (w * h * (bpp/8))) || (newLen > client->afterEncBufSize)) \
return -1; \
\
numsubs += 1; \
*((uint##bpp##_t*)(rreAfterBuf + rreAfterBufLen)) = cl; \
rreAfterBufLen += (bpp/8); \
memcpy(&rreAfterBuf[rreAfterBufLen],&subrect,sz_rfbRectangle); \
rreAfterBufLen += sz_rfbRectangle; \
*((uint##bpp##_t*)(client->afterEncBuf + client->afterEncBufLen)) = cl; \
client->afterEncBufLen += (bpp/8); \
memcpy(&client->afterEncBuf[client->afterEncBufLen],&subrect,sz_rfbRectangle); \
client->afterEncBufLen += sz_rfbRectangle; \
\
/* \
* Now mark the subrect as done. \

View File

@@ -54,10 +54,6 @@
#endif
#endif
#ifdef CORBA
#include <vncserverctrl.h>
#endif
#ifdef DEBUGPROTO
#undef DEBUGPROTO
#define DEBUGPROTO(x) x

0
libvncserver/selbox.c Executable file → Normal file
View File

84
libvncserver/sockets.c Executable file → Normal file
View File

@@ -116,12 +116,8 @@ rfbInitSockets(rfbScreenInfoPtr rfbScreen)
if (rfbScreen->inetdSock != -1) {
const int one = 1;
#ifndef WIN32
if (fcntl(rfbScreen->inetdSock, F_SETFL, O_NONBLOCK) < 0) {
rfbLogPerror("fcntl");
if(!rfbSetNonBlocking(rfbScreen->inetdSock))
return;
}
#endif
if (setsockopt(rfbScreen->inetdSock, IPPROTO_TCP, TCP_NODELAY,
(char *)&one, sizeof(one)) < 0) {
@@ -222,8 +218,6 @@ rfbCheckFds(rfbScreenInfoPtr rfbScreen,long usec)
struct sockaddr_in addr;
socklen_t addrlen = sizeof(addr);
char buf[6];
const int one = 1;
int sock;
rfbClientIteratorPtr i;
rfbClientPtr cl;
int result = 0;
@@ -336,33 +330,30 @@ rfbProcessNewConnection(rfbScreenInfoPtr rfbScreen)
socklen_t addrlen = sizeof(addr);
if ((sock = accept(rfbScreen->listenSock,
(struct sockaddr *)&addr, &addrlen)) < 0) {
rfbLogPerror("rfbCheckFds: accept");
return FALSE;
(struct sockaddr *)&addr, &addrlen)) < 0) {
rfbLogPerror("rfbCheckFds: accept");
return FALSE;
}
#ifndef WIN32
if (fcntl(sock, F_SETFL, O_NONBLOCK) < 0) {
rfbLogPerror("rfbCheckFds: fcntl");
closesocket(sock);
return FALSE;
if(!rfbSetNonBlocking(sock)) {
closesocket(sock);
return FALSE;
}
#endif
if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY,
(char *)&one, sizeof(one)) < 0) {
rfbLogPerror("rfbCheckFds: setsockopt");
closesocket(sock);
return FALSE;
(char *)&one, sizeof(one)) < 0) {
rfbLogPerror("rfbCheckFds: setsockopt");
closesocket(sock);
return FALSE;
}
#ifdef USE_LIBWRAP
if(!hosts_ctl("vnc",STRING_UNKNOWN,inet_ntoa(addr.sin_addr),
STRING_UNKNOWN)) {
rfbLog("Rejected connection from client %s\n",
inet_ntoa(addr.sin_addr));
closesocket(sock);
return FALSE;
STRING_UNKNOWN)) {
rfbLog("Rejected connection from client %s\n",
inet_ntoa(addr.sin_addr));
closesocket(sock);
return FALSE;
}
#endif
@@ -432,13 +423,10 @@ rfbConnect(rfbScreenInfoPtr rfbScreen,
return -1;
}
#ifndef WIN32
if (fcntl(sock, F_SETFL, O_NONBLOCK) < 0) {
rfbLogPerror("fcntl failed");
closesocket(sock);
if(!rfbSetNonBlocking(sock)) {
closesocket(sock);
return -1;
}
#endif
if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY,
(char *)&one, sizeof(one)) < 0) {
@@ -522,7 +510,11 @@ rfbReadExactTimeout(rfbClientPtr cl, char* buf, int len, int timeout)
int rfbReadExact(rfbClientPtr cl,char* buf,int len)
{
return(rfbReadExactTimeout(cl,buf,len,rfbMaxClientWait));
/* favor the per-screen value if set */
if(cl->screen && cl->screen->maxClientWait)
return(rfbReadExactTimeout(cl,buf,len,cl->screen->maxClientWait));
else
return(rfbReadExactTimeout(cl,buf,len,rfbMaxClientWait));
}
/*
@@ -541,6 +533,7 @@ rfbWriteExact(rfbClientPtr cl,
fd_set fds;
struct timeval tv;
int totalTimeWaited = 0;
const int timeout = (cl->screen && cl->screen->maxClientWait) ? cl->screen->maxClientWait : rfbMaxClientWait;
#undef DEBUG_WRITE_EXACT
#ifdef DEBUG_WRITE_EXACT
@@ -576,7 +569,7 @@ rfbWriteExact(rfbClientPtr cl,
return n;
}
/* Retry every 5 seconds until we exceed rfbMaxClientWait. We
/* Retry every 5 seconds until we exceed timeout. We
need to do this because select doesn't necessarily return
immediately when the other end has gone away */
@@ -586,6 +579,9 @@ rfbWriteExact(rfbClientPtr cl,
tv.tv_usec = 0;
n = select(sock+1, NULL, &fds, NULL /* &fds */, &tv);
if (n < 0) {
#ifdef WIN32
errno=WSAGetLastError();
#endif
if(errno==EINTR)
continue;
rfbLogPerror("WriteExact: select");
@@ -594,7 +590,7 @@ rfbWriteExact(rfbClientPtr cl,
}
if (n == 0) {
totalTimeWaited += 5000;
if (totalTimeWaited >= rfbMaxClientWait) {
if (totalTimeWaited >= timeout) {
errno = ETIMEDOUT;
UNLOCK(cl->outputMutex);
return -1;
@@ -652,7 +648,7 @@ rfbListenOnTCPPort(int port,
closesocket(sock);
return -1;
}
if (listen(sock, 5) < 0) {
if (listen(sock, 32) < 0) {
closesocket(sock);
return -1;
}
@@ -719,3 +715,23 @@ rfbListenOnUDPPort(int port,
return sock;
}
/*
* rfbSetNonBlocking sets a socket into non-blocking mode.
*/
rfbBool
rfbSetNonBlocking(int sock)
{
#ifdef WIN32
unsigned long block=1;
if(ioctlsocket(sock, FIONBIO, &block) == SOCKET_ERROR) {
errno=WSAGetLastError();
#else
int flags = fcntl(sock, F_GETFL);
if(flags < 0 || fcntl(sock, F_SETFL, flags | O_NONBLOCK) < 0) {
#endif
rfbLogPerror("Setting socket to non-blocking failed");
return FALSE;
}
return TRUE;
}

4
libvncserver/stats.c Executable file → Normal file
View File

@@ -51,10 +51,10 @@ char *messageNameServer2Client(uint32_t type, char *buf, int len) {
case rfbBell: snprintf(buf, len, "Bell"); break;
case rfbServerCutText: snprintf(buf, len, "ServerCutText"); break;
case rfbResizeFrameBuffer: snprintf(buf, len, "ResizeFrameBuffer"); break;
case rfbKeyFrameUpdate: snprintf(buf, len, "KeyFrameUpdate"); break;
case rfbFileTransfer: snprintf(buf, len, "FileTransfer"); break;
case rfbTextChat: snprintf(buf, len, "TextChat"); break;
case rfbPalmVNCReSizeFrameBuffer: snprintf(buf, len, "PalmVNCReSize"); break;
case rfbXvp: snprintf(buf, len, "XvpServerMessage"); break;
default:
snprintf(buf, len, "svr2cli-0x%08X", 0xFF);
}
@@ -76,8 +76,8 @@ char *messageNameClient2Server(uint32_t type, char *buf, int len) {
case rfbSetServerInput: snprintf(buf, len, "SetServerInput"); break;
case rfbSetSW: snprintf(buf, len, "SetSingleWindow"); break;
case rfbTextChat: snprintf(buf, len, "TextChat"); break;
case rfbKeyFrameRequest: snprintf(buf, len, "KeyFrameRequest"); break;
case rfbPalmVNCSetScaleFactor: snprintf(buf, len, "PalmVNCSetScale"); break;
case rfbXvp: snprintf(buf, len, "XvpClientMessage"); break;
default:
snprintf(buf, len, "cli2svr-0x%08X", type);

0
libvncserver/tableinit24.c Executable file → Normal file
View File

0
libvncserver/tableinitcmtemplate.c Executable file → Normal file
View File

0
libvncserver/tableinittctemplate.c Executable file → Normal file
View File

0
libvncserver/tabletrans24template.c Executable file → Normal file
View File

0
libvncserver/tabletranstemplate.c Executable file → Normal file
View File

View File

@@ -34,6 +34,9 @@
#define NEEDFAR_POINTERS
#endif
#ifdef _RPCNDR_H /* This Windows header typedefs 'boolean', jpeglib has to know */
#define HAVE_BOOLEAN
#endif
#include <jpeglib.h>
/* Note: The following constant should not be changed. */
@@ -47,9 +50,20 @@
/* May be set to TRUE with "-lazytight" Xvnc option. */
rfbBool rfbTightDisableGradient = FALSE;
/* This variable is set on every rfbSendRectEncodingTight() call. */
static rfbBool usePixelFormat24;
/*
* There is so much access of the Tight encoding static data buffers
* that we resort to using thread local storage instead of having
* per-client data.
*/
#if LIBVNCSERVER_HAVE_LIBPTHREAD && LIBVNCSERVER_HAVE_TLS && !defined(TLS) && defined(__linux__)
#define TLS __thread
#endif
#ifndef TLS
#define TLS
#endif
/* This variable is set on every rfbSendRectEncodingTight() call. */
static TLS rfbBool usePixelFormat24 = FALSE;
/* Compression level stuff. The following array contains various
encoder parameters for each of 10 compression levels (0..9).
@@ -77,8 +91,8 @@ static TIGHT_CONF tightConf[10] = {
{ 65536, 2048, 32, 8192, 9, 9, 9, 6, 200, 500, 96, 80, 200, 500 }
};
static int compressLevel;
static int qualityLevel;
static TLS int compressLevel = 0;
static TLS int qualityLevel = 0;
/* Stuff dealing with palettes. */
@@ -100,31 +114,33 @@ typedef struct PALETTE_s {
} PALETTE;
/* TODO: move into rfbScreen struct */
static int paletteNumColors, paletteMaxColors;
static uint32_t monoBackground, monoForeground;
static PALETTE palette;
static TLS int paletteNumColors = 0;
static TLS int paletteMaxColors = 0;
static TLS uint32_t monoBackground = 0;
static TLS uint32_t monoForeground = 0;
static TLS PALETTE palette;
/* Pointers to dynamically-allocated buffers. */
static int tightBeforeBufSize = 0;
static char *tightBeforeBuf = NULL;
static TLS int tightBeforeBufSize = 0;
static TLS char *tightBeforeBuf = NULL;
static int tightAfterBufSize = 0;
static char *tightAfterBuf = NULL;
static TLS int tightAfterBufSize = 0;
static TLS char *tightAfterBuf = NULL;
static int *prevRowBuf = NULL;
static TLS int *prevRowBuf = NULL;
void rfbTightCleanup(rfbScreenInfoPtr screen)
{
if(tightBeforeBufSize) {
free(tightBeforeBuf);
tightBeforeBuf = NULL;
tightBeforeBufSize=0;
tightBeforeBuf = NULL;
}
if(tightAfterBufSize) {
free(tightAfterBuf);
tightAfterBuf = NULL;
tightAfterBufSize=0;
tightAfterBuf = NULL;
}
}
@@ -1629,9 +1645,9 @@ DEFINE_DETECT_FUNCTION(32)
* JPEG compression stuff.
*/
static struct jpeg_destination_mgr jpegDstManager;
static rfbBool jpegError;
static int jpegDstDataLen;
static TLS struct jpeg_destination_mgr jpegDstManager;
static TLS rfbBool jpegError = FALSE;
static TLS int jpegDstDataLen = 0;
static rfbBool
SendJpegRect(rfbClientPtr cl, int x, int y, int w, int h, int quality)

2
libvncserver/translate.c Executable file → Normal file
View File

@@ -423,6 +423,7 @@ rfbSetClientColourMap(rfbClientPtr cl, int firstColour, int nColours)
}
if (cl->format.trueColour) {
LOCK(cl->updateMutex);
(*rfbInitColourMapSingleTableFns
[BPP2OFFSET(cl->format.bitsPerPixel)]) (&cl->translateLookupTable,
&cl->screen->serverFormat, &cl->format,&cl->screen->colourMap);
@@ -430,6 +431,7 @@ rfbSetClientColourMap(rfbClientPtr cl, int firstColour, int nColours)
sraRgnDestroy(cl->modifiedRegion);
cl->modifiedRegion =
sraRgnCreateRect(0,0,cl->screen->width,cl->screen->height);
UNLOCK(cl->updateMutex);
return TRUE;
}

View File

@@ -11,19 +11,13 @@
#include "minilzo.h"
/*
* lzoBeforeBuf contains pixel data in the client's format.
* lzoAfterBuf contains the lzo (deflated) encoding version.
* cl->beforeEncBuf contains pixel data in the client's format.
* cl->afterEncBuf contains the lzo (deflated) encoding version.
* If the lzo compressed/encoded version is
* larger than the raw data or if it exceeds lzoAfterBufSize then
* larger than the raw data or if it exceeds cl->afterEncBufSize then
* raw encoding is used instead.
*/
static int lzoBeforeBufSize = 0;
static char *lzoBeforeBuf = NULL;
static int lzoAfterBufSize = 0;
static char *lzoAfterBuf = NULL;
static int lzoAfterBufLen = 0;
/*
* rfbSendOneRectEncodingZlib - send a given rectangle using one Zlib
@@ -32,17 +26,6 @@ static int lzoAfterBufLen = 0;
#define MAX_WRKMEM ((LZO1X_1_MEM_COMPRESS) + (sizeof(lzo_align_t) - 1)) / sizeof(lzo_align_t)
void rfbUltraCleanup(rfbScreenInfoPtr screen)
{
if (lzoBeforeBufSize) {
free(lzoBeforeBuf);
lzoBeforeBufSize=0;
}
if (lzoAfterBufSize) {
free(lzoAfterBuf);
lzoAfterBufSize=0;
}
}
void rfbFreeUltraData(rfbClientPtr cl) {
if (cl->compStreamInitedLZO) {
@@ -67,16 +50,16 @@ rfbSendOneRectEncodingUltra(rfbClientPtr cl,
+ (x * (cl->scaledScreen->bitsPerPixel / 8)));
int maxRawSize;
int maxCompSize;
lzo_uint maxCompSize;
maxRawSize = (w * h * (cl->format.bitsPerPixel / 8));
if (lzoBeforeBufSize < maxRawSize) {
lzoBeforeBufSize = maxRawSize;
if (lzoBeforeBuf == NULL)
lzoBeforeBuf = (char *)malloc(lzoBeforeBufSize);
if (cl->beforeEncBufSize < maxRawSize) {
cl->beforeEncBufSize = maxRawSize;
if (cl->beforeEncBuf == NULL)
cl->beforeEncBuf = (char *)malloc(cl->beforeEncBufSize);
else
lzoBeforeBuf = (char *)realloc(lzoBeforeBuf, lzoBeforeBufSize);
cl->beforeEncBuf = (char *)realloc(cl->beforeEncBuf, cl->beforeEncBufSize);
}
/*
@@ -85,19 +68,19 @@ rfbSendOneRectEncodingUltra(rfbClientPtr cl,
*/
maxCompSize = (maxRawSize + maxRawSize / 16 + 64 + 3);
if (lzoAfterBufSize < maxCompSize) {
lzoAfterBufSize = maxCompSize;
if (lzoAfterBuf == NULL)
lzoAfterBuf = (char *)malloc(lzoAfterBufSize);
if (cl->afterEncBufSize < (int)maxCompSize) {
cl->afterEncBufSize = maxCompSize;
if (cl->afterEncBuf == NULL)
cl->afterEncBuf = (char *)malloc(cl->afterEncBufSize);
else
lzoAfterBuf = (char *)realloc(lzoAfterBuf, lzoAfterBufSize);
cl->afterEncBuf = (char *)realloc(cl->afterEncBuf, cl->afterEncBufSize);
}
/*
* Convert pixel data to client format.
*/
(*cl->translateFn)(cl->translateLookupTable, &cl->screen->serverFormat,
&cl->format, fbptr, lzoBeforeBuf,
&cl->format, fbptr, cl->beforeEncBuf,
cl->scaledScreen->paddedWidthInBytes, w, h);
if ( cl->compStreamInitedLZO == FALSE ) {
@@ -109,11 +92,11 @@ rfbSendOneRectEncodingUltra(rfbClientPtr cl,
}
/* Perform the compression here. */
deflateResult = lzo1x_1_compress((unsigned char *)lzoBeforeBuf, (lzo_uint)(w * h * (cl->format.bitsPerPixel / 8)), (unsigned char *)lzoAfterBuf, (lzo_uint *)&maxCompSize, cl->lzoWrkMem);
deflateResult = lzo1x_1_compress((unsigned char *)cl->beforeEncBuf, (lzo_uint)(w * h * (cl->format.bitsPerPixel / 8)), (unsigned char *)cl->afterEncBuf, &maxCompSize, cl->lzoWrkMem);
/* maxCompSize now contains the compressed size */
/* Find the total size of the resulting compressed data. */
lzoAfterBufLen = maxCompSize;
cl->afterEncBufLen = maxCompSize;
if ( deflateResult != LZO_E_OK ) {
rfbErr("lzo deflation error: %d\n", deflateResult);
@@ -121,7 +104,7 @@ rfbSendOneRectEncodingUltra(rfbClientPtr cl,
}
/* Update statics */
rfbStatRecordEncodingSent(cl, rfbEncodingUltra, sz_rfbFramebufferUpdateRectHeader + sz_rfbZlibHeader + lzoAfterBufLen, maxRawSize);
rfbStatRecordEncodingSent(cl, rfbEncodingUltra, sz_rfbFramebufferUpdateRectHeader + sz_rfbZlibHeader + cl->afterEncBufLen, maxRawSize);
if (cl->ublen + sz_rfbFramebufferUpdateRectHeader + sz_rfbZlibHeader
> UPDATE_BUF_SIZE)
@@ -140,21 +123,21 @@ rfbSendOneRectEncodingUltra(rfbClientPtr cl,
sz_rfbFramebufferUpdateRectHeader);
cl->ublen += sz_rfbFramebufferUpdateRectHeader;
hdr.nBytes = Swap32IfLE(lzoAfterBufLen);
hdr.nBytes = Swap32IfLE(cl->afterEncBufLen);
memcpy(&cl->updateBuf[cl->ublen], (char *)&hdr, sz_rfbZlibHeader);
cl->ublen += sz_rfbZlibHeader;
/* We might want to try sending the data directly... */
for (i = 0; i < lzoAfterBufLen;) {
for (i = 0; i < cl->afterEncBufLen;) {
int bytesToCopy = UPDATE_BUF_SIZE - cl->ublen;
if (i + bytesToCopy > lzoAfterBufLen) {
bytesToCopy = lzoAfterBufLen - i;
if (i + bytesToCopy > cl->afterEncBufLen) {
bytesToCopy = cl->afterEncBufLen - i;
}
memcpy(&cl->updateBuf[cl->ublen], &lzoAfterBuf[i], bytesToCopy);
memcpy(&cl->updateBuf[cl->ublen], &cl->afterEncBuf[i], bytesToCopy);
cl->ublen += bytesToCopy;
i += bytesToCopy;

View File

@@ -24,6 +24,7 @@
#ifdef __STRICT_ANSI__
#define _BSD_SOURCE
#define _POSIX_SOURCE
#define _XOPEN_SOURCE 600
#endif
#ifdef LIBVNCSERVER_HAVE_SYS_TYPES_H
#include <sys/types.h>
@@ -101,7 +102,7 @@ rfbEncryptAndStorePasswd(char *passwd, char *fname)
for (i = 0; i < 8; i++) {
putc(encryptedPasswd[i], fp);
}
fclose(fp);
return 0;
}
@@ -120,12 +121,16 @@ rfbDecryptPasswdFromFile(char *fname)
int i, ch;
unsigned char *passwd = (unsigned char *)malloc(9);
if ((fp = fopen(fname,"r")) == NULL) return NULL;
if ((fp = fopen(fname,"r")) == NULL) {
free(passwd);
return NULL;
}
for (i = 0; i < 8; i++) {
ch = getc(fp);
if (ch == EOF) {
fclose(fp);
free(passwd);
return NULL;
}
passwd[i] = ch;
@@ -159,7 +164,7 @@ rfbRandomBytes(unsigned char *bytes)
}
for (i = 0; i < CHALLENGESIZE; i++) {
bytes[i] = (unsigned char)(random() & 255);
bytes[i] = (unsigned char)(random() & 255);
}
}
@@ -191,3 +196,17 @@ rfbEncryptBytes(unsigned char *bytes, char *passwd)
rfbDes(bytes+i, bytes+i);
}
}
void
rfbEncryptBytes2(unsigned char *where, const int length, unsigned char *key) {
int i, j;
rfbDesKey(key, EN0);
for (i = 0; i< 8; i++)
where[i] ^= key[i];
rfbDes(where, where);
for (i = 8; i < length; i += 8) {
for (j = 0; j < 8; j++)
where[i + j] ^= where[i + j - 8];
rfbDes(where + i, where + i);
}
}

View File

@@ -40,12 +40,24 @@
* raw encoding is used instead.
*/
static int zlibBeforeBufSize = 0;
static char *zlibBeforeBuf = NULL;
/*
* Out of lazyiness, we use thread local storage for zlib as we did for
* tight. N.B. ZRLE does it the traditional way with per-client storage
* (and so at least ZRLE will work threaded on older systems.)
*/
#if LIBVNCSERVER_HAVE_LIBPTHREAD && LIBVNCSERVER_HAVE_TLS && !defined(TLS) && defined(__linux__)
#define TLS __thread
#endif
#ifndef TLS
#define TLS
#endif
static int zlibAfterBufSize = 0;
static char *zlibAfterBuf = NULL;
static int zlibAfterBufLen;
static TLS int zlibBeforeBufSize = 0;
static TLS char *zlibBeforeBuf = NULL;
static TLS int zlibAfterBufSize = 0;
static TLS char *zlibAfterBuf = NULL;
static TLS int zlibAfterBufLen = 0;
void rfbZlibCleanup(rfbScreenInfoPtr screen)
{

View File

@@ -96,22 +96,23 @@
* data.
*/
/* TODO: put into rfbClient struct */
static char zrleBeforeBuf[rfbZRLETileWidth * rfbZRLETileHeight * 4 + 4];
/*
* rfbSendRectEncodingZRLE - send a given rectangle using ZRLE encoding.
*/
rfbBool rfbSendRectEncodingZRLE(rfbClientPtr cl, int x, int y, int w, int h)
{
zrleOutStream* zos;
rfbFramebufferUpdateRectHeader rect;
rfbZRLEHeader hdr;
int i;
char *zrleBeforeBuf;
if (cl->zrleBeforeBuf == NULL) {
cl->zrleBeforeBuf = (char *) malloc(rfbZRLETileWidth * rfbZRLETileHeight * 4 + 4);
}
zrleBeforeBuf = cl->zrleBeforeBuf;
if (cl->preferredEncoding == rfbEncodingZYWRLE) {
if (cl->tightQualityLevel < 0) {
@@ -238,8 +239,19 @@ rfbBool rfbSendRectEncodingZRLE(rfbClientPtr cl, int x, int y, int w, int h)
void rfbFreeZrleData(rfbClientPtr cl)
{
if (cl->zrleData)
zrleOutStreamFree(cl->zrleData);
cl->zrleData = NULL;
if (cl->zrleData) {
zrleOutStreamFree(cl->zrleData);
}
cl->zrleData = NULL;
if (cl->zrleBeforeBuf) {
free(cl->zrleBeforeBuf);
}
cl->zrleBeforeBuf = NULL;
if (cl->paletteHelper) {
free(cl->paletteHelper);
}
cl->paletteHelper = NULL;
}

View File

@@ -84,12 +84,10 @@ static const int bitsPerPackedPixel[] = {
0, 1, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
};
static zrlePaletteHelper paletteHelper;
#endif /* ZRLE_ONCE */
void ZRLE_ENCODE_TILE (PIXEL_T* data, int w, int h, zrleOutStream* os,
int zywrle_level, int *zywrleBuf);
int zywrle_level, int *zywrleBuf, void *paletteHelper);
#if BPP!=8
#define ZYWRLE_ENCODE
@@ -111,8 +109,12 @@ static void ZRLE_ENCODE (int x, int y, int w, int h,
GET_IMAGE_INTO_BUF(tx,ty,tw,th,buf);
if (cl->paletteHelper == NULL) {
cl->paletteHelper = (void *) calloc(sizeof(zrlePaletteHelper), 1);
}
ZRLE_ENCODE_TILE((PIXEL_T*)buf, tw, th, os,
cl->zywrleLevel, cl->zywrleBuf);
cl->zywrleLevel, cl->zywrleBuf, cl->paletteHelper);
}
}
zrleOutStreamFlush(os);
@@ -120,7 +122,7 @@ static void ZRLE_ENCODE (int x, int y, int w, int h,
void ZRLE_ENCODE_TILE(PIXEL_T* data, int w, int h, zrleOutStream* os,
int zywrle_level, int *zywrleBuf)
int zywrle_level, int *zywrleBuf, void *paletteHelper)
{
/* First find the palette and the number of runs */
@@ -140,7 +142,7 @@ void ZRLE_ENCODE_TILE(PIXEL_T* data, int w, int h, zrleOutStream* os,
PIXEL_T* end = ptr + h * w;
*end = ~*(end-1); /* one past the end is different so the while loop ends */
ph = &paletteHelper;
ph = (zrlePaletteHelper *) paletteHelper;
zrlePaletteHelperInit(ph);
while (ptr < end) {
@@ -289,7 +291,7 @@ void ZRLE_ENCODE_TILE(PIXEL_T* data, int w, int h, zrleOutStream* os,
#if BPP!=8
if (zywrle_level > 0 && !(zywrle_level & 0x80)) {
ZYWRLE_ANALYZE(data, data, w, h, w, zywrle_level, zywrleBuf);
ZRLE_ENCODE_TILE(data, w, h, os, zywrle_level | 0x80, zywrleBuf);
ZRLE_ENCODE_TILE(data, w, h, os, zywrle_level | 0x80, zywrleBuf, paletteHelper);
}
else
#endif

0
libvncserver/zrletypes.h Executable file → Normal file
View File