Commit Graph

69 Commits

Author SHA1 Message Date
Robert Adam
330c356e71 MAINT: Remove copyright year from all copyright notices
Keeping these up-to-date is just super tedious and they don't really
fulfill any purpose these days.
2024-09-30 18:06:20 +02:00
Davide Beatrici
ffddb3ce54 REFAC(client): Replace <codecvt> usage
Deprecated in C++17 and slated for removal in C++26.

Unfortunately no standard replacement is available yet.
2024-07-26 20:14:22 +02:00
Robert Adam
2b35c0c28f REFAC(plugins): Unified Mumble plugin headers
Having different include files that are needed (and which are
inter-dependent) to create your own plugin, makes things harder than it
needs to be.

Therefore, all plugin header files (those for the "new" (1.4) plugin
framework anyway) have been combined into one header file. Thus,
developers now only have to download a single file and include that
instead of having to figure out what files to download and what to
include where.

Taking the chance, the version number has been removed from the header
file's name. This allows one to track changes made to the API via git
(which is not quite as easy if you create a new file every time you make
a change).
2023-07-27 19:39:30 +02:00
Autumn
6647cbd63c REFAC(plugins): Specialize SharedMemory to LinkedMem
SharedMemory is only used to point to an instance of LinkedMem.
Preventing it from having a dynamic size simplifies the code.
2023-04-11 13:40:39 -07:00
Autumn
51c3e42648 FIX(plugins): Use atomic operations in Link plugin
The Link plugin uses an inherently racy protocol to communicate with
applications: shared memory with no means of synchronization. This
commit makes no changes to this protocol and shouldn't break anything
that was working before. That means it doesn't eliminate race
conditions, but it does allow the plugin to work without the risk of
*data races* specifically, which are undefined behavior.

This is done by using 32-bit atomic operations to copy the LinkedMem
struct out of shared memory before reading from it. This should work
well, since every field of LinkedMem has a size that's a multiple of
32 bits, and 32-bit atomics are widely supported.

With this change, applications can avoid data races with the Link
plugin by also accessing shared memory exclusively with 32-bit atomic
operations. Applications that already work with the plugin should
continue to work.
2023-04-11 13:40:06 -07:00
Robert Adam
249d2c6298 MAINT: Update copyright headers to 2023 2023-01-08 15:54:35 +01:00
Robert Adam
d100ff1467 MAINT: Update copyright to 2022 2022-01-04 20:17:33 +01:00
Robert Adam
e981827de5 MAINT: Add Link plugin tester
This commit adds a small CLI program that just connects to the Link
plugin and sends random positions to it. It is meant to be used as a
test-case for the Link plugin.
2021-11-18 19:25:28 +01:00
Robert Adam
658b33e4c8 REFAC(plugins): Unify Link plugin implementations
This commit merges the two separate Link plugin implementations that
were previously used (one for Posix and one for Windows systems) and
merges them into a single one (abstracting away the platform differences
at most places).

While doing so, this commit ports the "Link" plugin to the new plugin
API (introduced with Mumble 1.4.0), such that it can make use of the
possibility to set a custom context prefix. Thus, this prefix is no
longer dependent on the plugin name (in Link's case it is set to
whatever the linked application declares as its name).

Fixes #5217
2021-11-18 19:25:28 +01:00
Robert Adam
bed0fa57fa REFAC(plugins): Add SharedMemory class
This abstracts away the platform differences between Posix and Windows
systems when it comes to managing shared memory.
2021-11-18 19:25:28 +01:00
Robert Adam
9b50fd7a12 BUILD(cmake): Reorganize how plugins are handled
Instead of excluding all plugins but the link one on OSes other than
Windows and Linux, the new approach allows for a more granular control
by introducing a list of plugins that is supported on the different
platforms.

This replaces the globbing approach which means that new plugins have
now to be included in this list explicitly.

The advantage of this is that this allows for a much greater flexibility
for handling plugins on different OS.

Furthermore the plugin's own directory is no longer added to the
include-path by default. If a plugin wishes to do this, it should do so
explicitly. This should help make the plugins easier to move around in
the future.
2021-06-16 19:24:25 +02:00
Robert Adam
27dbee8e62 FEAT(client): Plugin framework
This commit introduces a new plugin framework into the codebase of the
Mumble client. Note that "plugin" here really refers to a (more or less)
general purpose plugin and is therefore not to be confused with the
previously available positional data plugins (only responsible for
fetching positional data from a running game and passing that to
Mumble).

The plugin interface is written in C, removing the compiler-dependence
the old "plugins" had. Instead plugins can now be written in an
arbitrary language as long as that language is capable of being compiled
into a shared library and also being capable of being C-compatible.

As already indicated a plugin is essentially a shared library that
provides certain functions that allow Mumble to interface with it.

Inside Mumble the so-called PluginManager is responsible for managing
the plugins and relaying events to the respective callbacks. Plugins
themselves can also interact with Mumble on their own initiative by
using the provided API functions.

Fixes #2455
Fixes #2148
Fixes #1594
Fixes #2051
Fixes #3742
Fixes #4575
Fixes #4751
2021-04-16 20:15:44 +02:00
Robert
56db3410c5 MAINT: Update copyright notice to 2021 (Part II)
Apparently the first commit (59ae429972)
did not include all files.

Furthermore the used script tended to produce funny results in certain
cases. This has been fixed and as a result thereof a few more changes
were made in this second run.
2021-04-09 15:41:49 +02:00
Robert Adam
59ae429972 MAINT: Update copyright notice to 2021
This was done by running scripts/updateLicenseHeaders.py and then
manually editing the LICENSE file.
2021-03-02 10:15:01 +01:00
Robert
af7dac72f4 FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
Robert Adam
34c602c85b BUILD(qmake): Remove
This commit removes all qmake-related build-files from the system. We
have now migrated to cmake and are no longer maintaining qmake anyways
and therefore there is no reason to keep it.

Removing it also clearly states to any potential user/programmer that
this project is no longer intended to be compiled with qmake.

Given that the .pri files no longer exist, the mumble-version.py script
had to be adapted to read the version from the CMakeLists.txt file
instead.

Furthermore a few of the submodules support cmake natively and therefore
we no longer need the src/buid-directory approach in order to build
them. The respective build dirs have been removed and the src-dirs have
been renamed.
2020-09-02 08:29:45 +02:00
Davide Beatrici
6b87ac6221 Plugins: add CMakeLists.txt files 2020-07-11 19:34:49 +02:00
Popkornium18
691c38736a REFAC(plugins): replace NULL with nullptr
This changes all occurances of NULL in the plugins source
dir to nullptr. Additionally explicit comparisons with NULL were
removed.
2020-06-28 19:04:27 +02:00
Davide Beatrici
4e67a2fafb Auto-update LICENSE.header in source files 2020-01-07 03:09:22 +01:00
Davide Beatrici
5db12321ac plugins: link to user32 in common project (only on Windows) 2019-10-11 22:48:06 +02:00
Davide Beatrici
b427333257 Auto-update LICENSE.header in source files 2019-01-25 04:56:19 +01:00
Mikkel Krautz
f6ba3a52bf Auto-update LICENSE.header in source files. 2018-01-01 23:05:37 +01:00
Jan Klass
23e763888f Fix assignment spacing in pro files
Consistently use single space before assignment operator.
2017-08-05 20:44:00 +02:00
Jan Klass
27a983d094 Fix indentation in pro files
Make them consistently two spaces indentation.

In two places a wrong indentation level was fixed.
2017-08-05 20:37:19 +02:00
Mikkel Krautz
91ebb8b0b5 Update tree copyrights to 2017. 2017-01-08 21:05:57 +01:00
Mikkel Krautz
74f5930e1c *.pro: use 'linux*' instead of 'linux' for Linux conditionals.
This makes the check Qt 4-compatible.
2016-12-08 22:41:24 +01:00
Mikkel
473b874c54 Only link against -lrt when using a linux mkspec.
In this case, the linux mkspec should really be a
check for glibc. But there isn't an easily available
way to check that in qmake -- so gate it behind linux
instead.

If/when we need to support other libcs on Linux, we'll
find a suitable solution.
2016-11-27 11:54:46 +01:00
Mikkel Krautz
2f5118c6ec plugins: use MUMBLE_PLUGIN_EXPORT instead of __attribute__((visibility("default"))). 2016-08-13 23:04:37 +02:00
Mikkel Krautz
b19840cd10 plugins: use MUMBLE_PLUGIN_EXPORT instead of __declspec(dllexport). 2016-08-13 22:59:30 +02:00
Davide Beatrici
713d531fe9 plugins/link: Initialize wsPluginName to fix #2482 2016-08-08 18:32:24 +02:00
Mikkel Krautz
042efe4d4b plugins/link: remove uses of HWND in about() and config(). 2016-08-06 17:18:11 +02:00
Mikkel Krautz
313be4b66b plugins: update to use LICENSE.header. 2016-05-10 22:42:04 +02:00
Stefan Hacker
d3d6920da9 Fix various warnings in Linux build
This patch fixes various warnings encountered
in the build when using gcc 4.9.
2015-07-04 15:12:49 +02:00
Mikkel Krautz
752a630063 plugins/link: make POSIX link work with Apple clang++ (Xcode 4.5). 2012-10-27 16:30:02 +02:00
Kissaki
9bd10b0001 refacs; initialization, var-scope reduction, replace c-style casts, rm unused
* DBus.h, AudioOutputSpeech.cpp: initialize uninitialized members,
* d3d10.cpp: actually use assigned results for a dbg output
* lib.cpp, link.cpp: c-style to c++-style casts
* SpeexMark.cpp, ResampMark.cpp: rm unused var
* AGC.cpp, ResampMark.cpp:
rm unused var (ineffective return statement after prior return;
thus removing unused code - but someone check if sth. was missed there)
2012-10-24 19:24:33 +02:00
Benjamin Jemlich
f90c6e35ab More plugin touching 2012-05-01 11:12:43 +02:00
Thorvald Natvig
7de5ebc18f Indent, changelog, submodule and language update 2011-06-11 02:58:17 +02:00
Thorvald Natvig
2dad2795bd Move overlayBlacklist and care about error on ftruncate 2011-05-15 16:09:38 -07:00
Thorvald Natvig
f3437a6ba7 Update copyright year ranges of dev team. 2011-03-18 05:52:51 +01:00
Thorvald Natvig
71e5e85277 Backwards compatible plugin structure 2010-02-25 14:14:44 +01:00
Thorvald Natvig
6d9bc4e116 Send pidmap to plugin trylock 2010-02-25 13:15:18 +01:00
Thorvald Natvig
16339bfc91 Update license to 2010 2010-01-05 08:49:22 +01:00
Thorvald Natvig
45da4e1569 Add license info to a few plugins 2010-01-05 05:34:09 +01:00
Mikkel Krautz
e96809e15d Extract .dSYM debug symbols on Mac OS X when using CONFIG=symbols. 2009-11-22 16:28:05 +01:00
Thorvald Natvig
f91647345b Avoid constref initializers of std::wstring inside const structs 2009-04-27 00:18:19 +02:00
Thorvald Natvig
a6886afe8f Indent, changelog and submodule update 2009-04-22 14:59:59 +02:00
Thorvald Natvig
965a35409a Check magic signature on plugins 2009-04-18 17:14:01 +02:00
Thorvald Natvig
5e79b062a3 Link 1.2.0 for nix 2009-04-18 17:11:09 +02:00
Thorvald Natvig
82c7cdcd15 Link 1.2.0 for Win32 2009-04-18 17:03:52 +02:00
Mikkel Krautz
89886d9919 Make 1.2 branch build on OSX. 2009-04-02 20:07:08 +02:00