aboutsummaryrefslogtreecommitdiffstats
path: root/common/rfb/CConnection.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Move colour map check to CConnectionPierre Ossman2025-03-301-0/+7
| | | | | This is a generic thing, not specific to the FLTK viewer. It belongs in the core code.
* Don't force everyone to implement setCursorPos()Pierre Ossman2025-03-301-0/+4
| | | | | You need to activate the feature by setting supportsCursorPosition, so there is no point in forcing everyone to implement the handler.
* Properly store cursor in ServerParams objectPierre Ossman2025-03-301-0/+9
| | | | | | We already had a field in the ServerParams structure, but we never actually stored anything in it. Let's fix that so the cursor behaves like other state we get from the server.
* Remove unused CConnection/SConnection callbacksPierre Ossman2025-03-291-5/+0
| | | | These have never been used for anything and just clutter up the API.
* Make CMsgHandler/SMsgHandler pure interfacesPierre Ossman2025-03-291-22/+81
| | | | | | It's a bit confusing that some handling is done in CMsgHandler/SMsgHandler, and some handling is done in CConnection/SConnection.
* Don't modify user settings in auto modePierre Ossman2025-03-291-0/+10
| | | | | Only override the actively used values, not the user values that are stored and displayed in the options dialog.
* Rename core/util to core/stringPierre Ossman2025-02-251-1/+1
| | | | | It's just string helper functions here, so let's get rid of the catch-all name for this module.
* Get rid of __rfbmax()/__rfbmin()Pierre Ossman2025-02-251-3/+2
| | | | | | | | They weren't that well used, and were mostly just confusing special functions anyway. Allows us to move away from generic and ambigious headers such as "util".
* Move logging to core libraryPierre Ossman2025-02-251-3/+2
| | | | | | | Make it clearer what is protocol handling and what is just general plumbing. This is one step of several.
* Move utility functions to core libraryPierre Ossman2025-02-131-8/+8
| | | | | | | Make it clearer what is protocol handling and what is just general plumbing. This is one step of several.
* Move basic data types to core libraryPierre Ossman2025-02-131-3/+3
| | | | | | | Make it clearer what is protocol handling and what is just general plumbing. This is one step of several.
* Use initializer lists for basic data typesPierre Ossman2025-02-131-3/+3
| | | | | | | | Try to keep the code more compact for the simple things where the type should be obvious from the context. Helps us avoid line wrapping. Also remove explicit conversions to Region where the compiler is able to figure it out by itself, again to reduce line length.
* Reduce header #include:sPierre Ossman2025-02-131-0/+6
| | | | | Make compile times faster by reducing the number of headers included in other headers.
* Remove superfluous resizeFramebuffer() callsPierre Ossman2025-02-051-0/+6
| | | | | | | These are not needed since the cleanup in 6ea58ba. At the same time, move the error logging for a failed SetDesktopSize to the base CConnection class as it is a generic thing.
* Merge branch 'keysplit' of https://github.com/CendioOssman/tigervncPierre Ossman2024-12-041-0/+87
|\
| * Move keyboard tracking to CConnectionPierre Ossman2024-12-041-0/+87
| | | | | | | | | | | | This is a general thing so move it in to the core library instead, letting vncviewer focus on just translation of system events to VNC ones.
* | Capitalize some more logging and exceptionsPierre Ossman2024-11-221-4/+4
| |
* | Merge branch 'master' of https://github.com/madnicendio/tigervncPierre Ossman2024-11-221-9/+9
|\ \
| * | Capitalize first letter in log, exception & errorMadeleine Nilsson2024-11-211-9/+9
| |/ | | | | | | The reason for this is to keep a consistency through out the project.
* | Merge branch 'mouse-button-support' of https://github.com/CendioHalim/tigervncPierre Ossman2024-11-181-0/+1
|\ \
| * | vncviewer: support for back/forward mouse buttonsAdam Halim2024-10-221-0/+1
| |/ | | | | | | | | | | | | | | This commit implements the pseudo-encoding ExtendedMouseButtons which makes it possible to use the back/forward mouse buttons. This commit contains work originally done by PixelSmith <manny33@frontbuffer.com>.
* | Use standard library naming for exceptionsPierre Ossman2024-11-061-10/+10
| | | | | | | | | | This makes things more consistent since we mix with the standard library exceptions so often.
* | Use specific class for protocol problemsPierre Ossman2024-11-061-6/+8
| | | | | | | | Make it easier to identify communication issues.
* | Use standard exception classesPierre Ossman2024-11-061-3/+3
| | | | | | | | | | Use the more specific already included exception classes for common errors to keep things more understandable.
* | Subclass exceptions from std::exceptionPierre Ossman2024-11-061-1/+1
| | | | | | | | | | Make sure our exceptions are part of the standard exception class hierarchy.
* | Use what() to access exception descriptionPierre Ossman2024-11-061-1/+1
| | | | | | | | Harmonize with the standard C++ exceptions.
* | Use static string for exceptionsPierre Ossman2024-11-061-2/+2
|/ | | | | In preparation for using the built in C++ exception classes, which do not accept a format string.
* Remove auth exception prefixPierre Ossman2024-08-071-1/+1
| | | | | | | | This prefix often just added noise, and could sometimes be added multiple times. It's better that user interface catch the specific exception type and give a more descriptive presentation to the user. This is partially a revert of 1922550.
* Avoid shadowing variablesPierre Ossman2024-06-241-2/+2
| | | | | It's a source of confusion and possibly bugs to reuse the same variable name for multiple things.
* Prefer std::find() over manual searchPierre Ossman2024-06-241-16/+8
| | | | | Let's avoid reimplementing something basic that's available in the standard library. It also makes the code easier to read.
* Use nullptr in all C++ codePierre Ossman2024-06-241-13/+13
| | | | | It's more readable than 0, and a bit safer than NULL, so let's try to follow modern norms.
* Add own keysym to name functionPierre Ossman2023-11-161-0/+1
| | | | | | | | | This is mainly a copy of XKeysymToString() from libX11. We've also added a wrapper that still gives a string, even if there is no name for the requested keysym. This grows the binaries a bit, but not with any extreme amount so is hopefully worth it to get better debug logging.
* Clean up string encoding handlingPierre Ossman2023-06-301-4/+8
| | | | | | We should handle this in the low-level protocol code as much as possible to avoid mistakes. This way the rest of the code can assume that strings are always UTF-8 with \n line endings.
* Consistently use uint8_t for data buffersPierre Ossman2023-03-181-4/+4
| | | | | These will always be byte streams at heart, so let's try to keep them with a proper type. Should make it clearer how they will be used.
* Use operator overloading for comparisonPierre Ossman2023-02-041-1/+1
| | | | | It is much more natural than custom methods for this very common operation.
* Use std::string for string memory managementPierre Ossman2023-02-041-17/+9
| | | | | Avoids a bit of complexity by delegating that handling to a string object.
* Use std::string instead of CharArrayPierre Ossman2023-02-041-2/+2
| | | | | Let's use a more common type instead of something homegrown. Should be more familiar to new developers.
* Use std::vector for temporary char arraysPierre Ossman2023-02-041-4/+4
| | | | | | | | It's more standard and familiar than our custom CharArray type, and it still gives us automatic freeing of the buffer. We could probably have used std::unique_ptr instead, but we are currently targeting older compilers where C++11 isn't standard yet.
* Return std::string instead of dynamic allocationsPierre Ossman2023-02-041-7/+8
| | | | | | We mostly use classical C strings, but the memory management around them can get confusing and error prone. Let's use std::string for the cases where we need to return a newly allocated string.
* Use stdint typesPierre Ossman2023-02-011-17/+17
| | | | | Avoid having our own custom stuff and instead use the modern, standard types, for familiarity.
* Explicitly mark unused parametersPierre Ossman2023-01-041-2/+2
| | | | | This allows us to separate accidentally unused, from explicitly unused parameters, which allows us to turn on such checks in the compiler.
* Stop supplying flags to clipboard peek handlerPierre Ossman2023-01-041-1/+1
| | | | The flags should always be empty anyway.
* Flush decoder errors on close()Pierre Ossman2022-11-071-0/+10
| | | | | | We don't want any stray exceptions as we are cleaning up, so handle any still pending decoder errors by just logging them. We are already shutting down so there is no need to abort the connection here.
* Make sure server name is always a valid stringPierre Ossman2022-03-241-1/+8
| | | | | Otherwise we can get crashes on NULL dereference. This should only happen on reverse connections where we don't have a server address.
* Be consistent in including config.hPierre Ossman2021-12-301-0/+5
| | | | | | The generally recommended way is to include it from source files, not headers. We had a mix of both. Let's try to be consistent and follow the recommended way.
* Support the VMware Cursor Position extension on vncviewerlhchavez2021-03-111-2/+5
| | | | | | | | This change makes it possible for re-synchronizing the remote cursor on the vncviewer when in fullscreen mode. This is done by locally moving the cursor position to what the server thinks it should be. Now SDL games should work!
* Merge branch 'autoclip' of https://github.com/CendioOssman/tigervncPierre Ossman2021-02-031-10/+37
|\
| * Add debug logging for ignored clipboard eventsPierre Ossman2021-01-051-3/+9
| |
| * Handle clipboard peek with missing dataPierre Ossman2021-01-051-3/+1
| | | | | | | | | | The peer expects a response, so we should also be able to respond that there is no clipboard data currently available.
| * Handle unsolicited clipboard transfersPierre Ossman2021-01-041-4/+27
| | | | | | | | | | | | The extended clipboard protocol has the ability for the peer to request things to be sent automatically, without a request message. Make sure we honor such settings.