Commit Graph

5 Commits

Author SHA1 Message Date
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 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
Davide Beatrici
8542c9a857 FEAT(positional-audio): Add searchInBuffer() and findPattern()
searchInBuffer() searches for the specified pattern in the specified buffer. "?" is used as wildcard.

findPattern(), given a start address and the size of the area, reads memory in chunks of 32 KiB.

It stops when a match is found, the end is reached or an error is encountered (peek() fails).

There's also an overload which iterates through the specified module's readable regions.
2020-11-11 05:25:52 +01:00
Davide Beatrici
c96153e2c6 REFAC(plugins): Move "m_ok" variable from HostLinux and HostWindows to Process
HostWindows' constructor only initializes its variables now, like HostLinux'.
2020-11-02 09:15:54 +01:00
Davide Beatrici
253b814ba5 FEAT(plugins): Add classes for process-related functions
Since most of the functions are already using C++, why not use classes as well?

This commit introduces the following classes:

- HostLinux: can only be compiled on Linux.
Implements peek() and module().

- HostWindows: can only be compiled on Windows.
Implements peek() and module().

- Process: abstract (cannot be instantiated directly).
Inherits from HostLinux on Linux and from HostWindows on Windows.
Provides functions that can be used with both Linux and Windows processes.
Pure virtual functions are implemented in the following classes:

- ProcessLinux: meant to be used with Linux processes, inherits from Process.
Only implements exportedSymbol(), due to the other functions being universal.
The constructor detects the architecture through the ELF header.

- ProcessWindows: meant to be used with Windows processes, inherits from Process.
Only implements exportedSymbol(), due to the other functions being universal.
The constructor detects the architecture through the NT header.
2020-10-28 19:26:56 +01:00