MAINT: Rename Murmur.ice to MumbleServer.ice

This commit is contained in:
Robert Adam 2022-09-08 13:48:40 +02:00
parent 1852692490
commit b81b06001d
10 changed files with 564 additions and 556 deletions

View File

@ -116,7 +116,7 @@ if(server)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/mumble-server.service" DESTINATION "${SYSTEMD_SERVICE_DIR}" COMPONENT mumble_server)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/mumble-server-user-wrapper" DESTINATION "${MUMBLE_INSTALL_EXECUTABLEDIR}" COMPONENT mumble_server)
install(FILES "config_files/mumble-server.conf" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/dbus-1/system.d" COMPONENT mumble_server)
install(FILES "${CMAKE_SOURCE_DIR}/src/murmur/Murmur.ice" DESTINATION "${MUMBLE_INSTALL_SYSCONFDIR}" COMPONENT mumble_server)
install(FILES "${CMAKE_SOURCE_DIR}/src/murmur/MumbleServer.ice" DESTINATION "${MUMBLE_INSTALL_SYSCONFDIR}" COMPONENT mumble_server)
endif()
endif()

View File

@ -8,73 +8,58 @@ Note: If not stated otherwise all referenced files live in `src/murmur/`.
The files involved in extending the Ice interface are
| **File** | **Description** |
| -------- | --------------- |
| `Murmur.ice` | Contains the formal definition of the interface |
| `Murmur.h` | Contains the C++ interface definition (abstract base classes). This file is automatically generated based on `Murmur.ice` when invoking cmake (via `slice2cpp`). It lives in `<build directory>/src/murmur`. This file is needed to generate `MurmurIceWrapper.cpp` |
| `Murmur.cpp` | Contains some boilerplate and Ice-internal implementation code. This file is generated and lives alongside `Murmur.h` |
| `MurmurI.h` | Contains the definition of the actually implemented API classes (`ServerI` and `MetaI`). These extend the abstract base classes from `Murmur.h` |
| `MurmurIceWrapper.cpp` | Contains wrapper implementation of the `*I` API classes. This file is auto-generated by the `scripts/generateIceWrapper.py` script |
| `MurmurIce.h` | Contains the definition of a statically used helper class |
| `MurmurIce.cpp` | Contains the implementation of that helper class **and** _static_ functions used to actually implement the server-side functionality of the Ice API functions |
| `RPC.cpp` | Contains the implementations of the `Server` (the Mumble server, _not_ the Ice API type) class's member functions that are required to make certain functionality accessible to the static functions in `MurmurIce.cpp` |
| `MumbleServer.ice` | Contains the formal definition of the interface |
| `MumbleServer.h` | Contains the C++ interface definition (abstract base classes). This file is generated based on `MumbleServer.ice` when invoking cmake (via `slice2cpp`). |
| `MumbleServer.cpp` | Contains some boilerplate and Ice-internal implementation code. This file is automatically generated. |
| `MumbleServerI.h` | Contains the definition of the actually implemented API classes (`ServerI` and `MetaI`). These extend the abstract base classes from `MumbleServer.h` |
| `MumbleServerWrapper.cpp` | Contains wrapper implementation of the `*I` API classes. This file is automatically generated. |
| `MumbleServere.h` | Contains the definition of a statically used helper class |
| `MumbleServere.cpp` | Contains the implementation of that helper class **and** _static_ functions used to actually implement the server-side functionality of the Ice API functions |
| `RPC.cpp` | Contains the implementations of the `Server` (the Mumble server, _not_ the Ice API type) class's member functions that are required to make certain functionality accessible to the static functions in `MumbleServerIce.cpp` |
All auto-generated functions will end up in the corresponding directory inside the `build` directory.
## Overview
The steps are
1. Let cmake invoke `slice2cpp` to generate `Murmur.h` and `Murmur.cpp`
2. Invoke `generateIceWrapper.py` to generate `MurmurIceWrapper.cpp`
3. Add new function declarations to `MurmurU.h`
4. Write impl function in `MurmurIce.cpp`
5. Potentially write new public API functions (declare in `Server.h` and define in `RPC.cpp`
1. Add new function declarations to `MumbleServerI.h`
2. Write impl function in `MumbleServerIce.cpp`
3. Potentially write new public API functions (declare in `Server.h` and define in `RPC.cpp`
## Detailed instructions
## Details
Before proceeding any further you should run cmake once in order for these files to get generated as they are needed for the next step. Assuming your
build directory lives directly under the repository's root, you can do this by invoking
```bash
cmake ..
```
The next step is the generation of the `MurmurIceWrapper.cpp` file by executing the following command (assuming the call is performed from the
repository's root and the build directory is called `build`):
```bash
$ python3 scripts/generateIceWrapper.py --ice-file src/murmur/Murmur.ice --generated-ice-header build/src/murmur/Murmur.h --out-file src/murmur/MurmurIceWrapper.cpp
Using ICE-file at "src/murmur/Murmur.ice"
Using ICE-generated header file at "build/src/murmur/Murmur.h"
```
The paths that are given in the example may have to be adapted in order for it to work on your machine.
The `MurmurIceWrapper.cpp` file generates the `*_async` versions of the Ice callbacks that handle the async nature of these callbacks and also
The `MumbleServerIceWrapper.cpp` file contains the `*_async` versions of the Ice callbacks that handle the async nature of these callbacks and also
contain the boilerplate for e.g. verification of the caller and things like this. Most importantly though these functions call the `impl_*` functions
defined in `MurmurIce.cpp`. For instance a function called `updateCertificates` inside the `Server` class will call `impl_Server_updateCertificate`
which has to be defined as a `static` function inside `MurmurIce.cpp`.
defined in `MumbleServerIce.cpp`. For instance a function called `updateCertificates` inside the `Server` class will call
`impl_Server_updateCertificate` which has to be defined as a `static` function inside `MumbleServerIce.cpp`.
The declaration of the async functions generated this way are contained inside `MurmurI.h`. You have to manually add the function's declaration into
there. The easiest way to do this is to let the script generate the implementation as described above and then copy the function signature from there
into the `Murmur.h` file (make the declaration `virtual` though).
The declarations of the async functions generated this way are contained inside `MumbleServerI.h`. You have to manually add the function's declaration
into there. The easiest way to do this is to let the implementation be auto-generated and then copy the function signature from there into the
`MumbleServer.h` file (make the declaration `virtual` though).
The impl function's signature is always
```cpp
static void impl_<className>_<functionName>(const ::Murmur::AMD_<className>_<functionName>Ptr cb [, int server_id] [, <function arguments>]) {
static void impl_<className>_<functionName>(const ::MumbleServer::AMD_<className>_<functionName>Ptr cb [, int server_id] [, <function arguments>]) {
// Implementation goes here
cb->ice_response([<function return value>]);
}
```
- `<className>`: Name of the class the function is declared in (e.g. `Server` or `Meta`)
- `<functionName>`: Name of the function as declared in the `Murmur.ice` file
- `<functionName>`: Name of the function as declared in the `MumbleServer.ice` file
- `[, int server_id]`: Only needed when extending the `Server` API class (the brackets are not part of what needs to be written in code)
- `[, <function arguments>]`: To be replaced by the list of arguments the function takes
- `[<function return value>]`: To be replaced with the value this function returns or to be removed if the function does not return anything.
If you have used non-default types that are declared in `Murmur.ice` (e.g. `IdList`), you can reference them here as `::Murmur::<typeName>` (e.g.
`::Murmur::IdList`).
If you have used non-default types that are declared in `MumbleServer.ice` (e.g. `IdList`), you can reference them here as
`::MumbleServer::<typeName>` (e.g. `::MumbleServer::IdList`).
Error reporting works via the `cb->ice_exception` function and if everything went well, the function must end by calling `cb->ice_response`
(potentially passing a value to that function that shall be returned to the caller of the function).
In general it is a good idea to have a look at the existing implementation inside `MurmurIce.cpp` and take inspiration from those.
In general it is a good idea to have a look at the existing implementation inside `MumbleServerIce.cpp` and take inspiration from those.
Note that the implementations make heavy use of macros (e.g. `NEED_SERVER`, `NEED_CHANNEL`, etc.). These will initialize the corresponding variables
(`server`, `channel`, etc.) based in the parameters fed into the function (In order to obtain the channel, user, etc. you always have to initialize
@ -91,22 +76,26 @@ public API function in the Mumble `Server` class that has the implementation in
## Testing Ice interface changes
So far, you've used `Murmur.ice` to modify and generate **server-side** code. The same file can be used to create Ice **clients**, which then interact with the server. A small amount of configuration is required, namely:
So far, you've used `MumbleServer.ice` to modify and generate **server-side** code. The same file can be used to create Ice **clients**, which then
interact with the server. A small amount of configuration is required, namely:
| **Setting** | **Example** | **Description** |
| --- | --- | --- |
| `host` | `127.0.0.1` | The IP address (or domain) to which Murmur's Ice interface is bound. (Check [`murmur.ini`'s `ice` property `-h` flag](../../scripts/murmur.ini#L65).) |
| `host` | `127.0.0.1` | The IP address (or domain) to which MumbleServer's Ice interface is bound. (Check [`murmur.ini`'s `ice` property `-h` flag](../../scripts/murmur.ini#L65).) |
| `port` | `6502` | The TCP port on which Ice's interface is listening. (Check [`murmur.ini`'s `ice` property `-p` flag](../../scripts/murmur.ini#L65).) |
| `secret` | `ice_pa55word` | A clear-text "password" used to authorize with the Ice server. (This will either be [`icesecretread`](../../scripts/murmur.ini#L79) or [`icesecretwrite`](../../scripts/murmur.ini#L80) from [`murmur.ini`](../../scripts/murmur.ini), with read-only or read-write privileges respectively.) |
| `slicefile` | `Murmur.ice` | The [`Murmur.ice`](../../src/murmur/Murmur.ice) file, containing any changes you intend to test. (This can be dynamically fetched from the Murmur server, provided it's running, has Ice exposed, and was built with the updated `Murmur.ice` file.) |
| `slicefile` | `MumbleServer.ice` | The [`MumbleServer.ice`](../../src/murmur/MumbleServer.ice) file, containing any changes you intend to test. (This can be dynamically fetched from the Mumble server, provided it's running, has Ice exposed, and was built with the updated `MumbleServer.ice` file.) |
> :warning: Since Murmur's Ice interface is clear-text, there are security factors to consider. Use a strong-ish, unique secret, not used for any other case.
> :warning: Since the server's Ice interface is clear-text, there are security factors to consider. Use a strong-ish, unique secret, not used for
> any other case.
An existing Python Ice client is [`mice.py`](https://github.com/mumble-voip/mumble-scripts/blob/master/Helpers/mice.py), which simply creates necessary Ice objects and then drops you into an interactive Python shell. (Refer to the [Wiki](https://wiki.mumble.info/wiki/Mice) and [Natenom](https://blog.natenom.com/2016/02/an-introduction-on-how-to-manage-your-mumble-server-murmur-through-ice-with-mice/) for longer guides.)
An existing Python Ice client is [`mice.py`](https://github.com/mumble-voip/mumble-scripts/blob/master/Helpers/mice.py), which simply creates
necessary Ice objects and then drops you into an interactive Python shell. (Refer to the [Wiki](https://wiki.mumble.info/wiki/Mice) and
[Natenom](https://blog.natenom.com/2016/02/an-introduction-on-how-to-manage-your-mumble-server-murmur-through-ice-with-mice/) for longer guides.)
```python
# Make sure Murmur is running (in a separate terminal)
# $ ./murmur.x86 ...
# Make sure the Mumble server is running (in a separate terminal)
# $ ./mumble-server ...
# Grab mice.py
$ wget --quiet https://raw.githubusercontent.com/mumble-voip/mumble-scripts/master/Helpers/mice.py
@ -117,7 +106,7 @@ host = "127.0.0.1"
port = 6502
secret = "ice_pa55word"
prxstr = "Meta:tcp -h {} -p {} -t 1000".format(host, port)
slicefile = "Murmur.ice"
slicefile = "MumbleServer.ice"
EOF
@ -129,7 +118,7 @@ Import ice... Done
Trying to retrieve slice dynamically from server... Success
Import dynamically compiled murmur class... Done
Establish ice connection... [protected]... Done
Murmur object accessible via 'murmur' or 'm'
MumbleServer object accessible via 'murmur' or 'm'
1 booted servers in 'sl', 's' contains 's/1 -t -e 1.0:tcp -h 127.0.0.1 -p 6502 -t 60000'
--- Reached interactive mode ---
@ -155,4 +144,6 @@ In [5]: [(user.session, user.name) for user in s.getUsers().values()]
Out[5]: [(7L, 'Bob')]
```
> :information_source: Refer to [the Wiki for additional 3rd-party applications](https://wiki.mumble.info/wiki/3rd_Party_Applications) which leverage Murmur's Ice interface.
> :information_source: Refer to [the Wiki for additional 3rd-party applications](https://wiki.mumble.info/wiki/3rd_Party_Applications) which leverage
> the server's Ice interface.

View File

@ -18,7 +18,7 @@ public class ServerInstaller : MumbleInstall {
string upgradeGuid = "03E9476F-0F75-4661-BFC9-A9DAEB23D3A0";
string[] binaries = {
"mumble-server.exe",
"Murmur.ice"
"MumbleServer.ice"
};
string[] licenses = {

View File

@ -36,7 +36,7 @@ def create_disclaimerComment():
return "// This file was auto-generated by scripts/generateIceWrapper.py on " + datetime.now().strftime("%Y-%m-%d") + " -- DO NOT EDIT MANUALLY!\n"
def generateFunction(className, functionName, wrapArgs, callArgs):
function = "void ::Murmur::" + className + "I::" + functionName + "_async(" + (", ".join(wrapArgs)) + ") {\n"
function = "void ::MumbleServer::" + className + "I::" + functionName + "_async(" + (", ".join(wrapArgs)) + ") {\n"
function += "\t// qWarning() << \"" + functionName + "\" << meta->mp.qsIceSecretRead.isNull() << meta->mp.qsIceSecretRead.isEmpty();\n"
function += "#ifndef ACCESS_" + className + "_" + functionName + "_ALL\n"
function += "#\tifdef ACCESS_" + className + "_" + functionName + "_READ\n"
@ -84,11 +84,11 @@ def main():
rootDir = os.path.dirname(os.path.dirname(scriptPath))
if args.ice_file is None:
# Try to figure out the path to the ice-file (Murmur.ice)
args.ice_file = os.path.join(rootDir, "src", "murmur", "Murmur.ice")
# Try to figure out the path to the ice-file (MumbleServer.ice)
args.ice_file = os.path.join(rootDir, "src", "murmur", "MumbleServer.ice")
if args.generated_ice_header is None:
# Try to figure out path to the generated header file (in the build dir)
args.generated_ice_header = os.path.join(rootDir, "build", "src", "murmur", "Murmur.h")
args.generated_ice_header = os.path.join(rootDir, "build", "src", "murmur", "MumbleServer.h")
if not args.quiet:
print("Using ICE-file at \"%s\"" % args.ice_file)
@ -185,7 +185,7 @@ def main():
wrapperContent += generateFunction(targetClass, functionName, wrapArgs, callArgs) + "\n"
wrapperContent += "void ::Murmur::MetaI::getSlice_async(const ::Murmur::AMD_Meta_getSlicePtr &cb, const Ice::Current&) {\n"
wrapperContent += "void ::MumbleServer::MetaI::getSlice_async(const ::MumbleServer::AMD_Meta_getSlicePtr &cb, const Ice::Current&) {\n"
wrapperContent += "\tcb->ice_response(std::string(\"" + iceSpec + "\"));\n"
wrapperContent += "}\n"

View File

@ -10,7 +10,7 @@ set(MURMUR_PLIST "${CMAKE_CURRENT_BINARY_DIR}/murmur.plist")
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/murmur.plist.in" "${MURMUR_PLIST}")
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/murmur.rc.in" "${MURMUR_RC}")
set(ICE_FILE "${CMAKE_CURRENT_SOURCE_DIR}/Murmur.ice")
set(ICE_FILE "${CMAKE_CURRENT_SOURCE_DIR}/MumbleServer.ice")
include(qt-utils)
@ -235,18 +235,18 @@ if(ice)
)
add_custom_target(generate_murmur_ice_wrapper
DEPENDS "MurmurIceWrapper.cpp"
DEPENDS "MumbleServerIceWrapper.cpp"
)
add_dependencies(mumble-server generate_murmur_ice_wrapper)
add_custom_command(
OUTPUT "MurmurIceWrapper.cpp"
OUTPUT "MumbleServerIceWrapper.cpp"
COMMAND ${PYTHON_INTERPRETER}
ARGS "${CMAKE_SOURCE_DIR}/scripts/generateIceWrapper.py" -i "${ICE_FILE}"
-g "${ICE_FILE_NAME}.h" -o "MurmurIceWrapper.cpp" -q
-g "${ICE_FILE_NAME}.h" -o "MumbleServerIceWrapper.cpp" -q
DEPENDS ${ICE_GENERATED_FILES}
COMMENT "Generating MurmurIceWrapper"
COMMENT "Generating MumbleServerIceWrapper"
)
# Even though the file is a .cpp, it is still being included in MurmurIce.cpp
# Even though the file is a .cpp, it is still being included in MumbleServerIce.cpp
target_include_directories(mumble-server PRIVATE "${CMAKE_CURRENT_BINARY_DIR}")
# We explicitly tell CMake not to call any autogen tools (e.g. MOC) for the generated files.
@ -255,8 +255,8 @@ if(ice)
target_sources(mumble-server
PRIVATE
"MurmurIce.cpp"
"MurmurIce.h"
"MumbleServerIce.cpp"
"MumbleServerIce.h"
${ICE_GENERATED_FILES}
)
target_compile_definitions(mumble-server

View File

@ -13,7 +13,7 @@
#include <Ice/SliceChecksumDict.ice>
module Murmur
module MumbleServer
{
/** A network address in IPv6 format.

200
src/murmur/MumbleServerI.h Normal file
View File

@ -0,0 +1,200 @@
// Copyright 2008-2022 The Mumble Developers. All rights reserved.
// Use of this source code is governed by a BSD-style license
// that can be found in the LICENSE file at the root of the
// Mumble source tree or at <https://www.mumble.info/LICENSE>.
#ifndef MUMBLE_MURMUR_MURMURI_H_
#define MUMBLE_MURMUR_MURMURI_H_
#include <MumbleServer.h>
namespace MumbleServer {
class ServerI : virtual public Server {
public:
virtual void isRunning_async(const ::MumbleServer::AMD_Server_isRunningPtr &, const Ice::Current &);
virtual void start_async(const ::MumbleServer::AMD_Server_startPtr &, const Ice::Current &);
virtual void stop_async(const ::MumbleServer::AMD_Server_stopPtr &, const Ice::Current &);
virtual void delete_async(const ::MumbleServer::AMD_Server_deletePtr &, const Ice::Current &);
virtual void addCallback_async(const ::MumbleServer::AMD_Server_addCallbackPtr &,
const ::MumbleServer::ServerCallbackPrx &, const ::Ice::Current &);
virtual void removeCallback_async(const ::MumbleServer::AMD_Server_removeCallbackPtr &,
const ::MumbleServer::ServerCallbackPrx &, const ::Ice::Current &);
virtual void setAuthenticator_async(const ::MumbleServer::AMD_Server_setAuthenticatorPtr &,
const ::MumbleServer::ServerAuthenticatorPrx &, const ::Ice::Current &);
virtual void id_async(const ::MumbleServer::AMD_Server_idPtr &, const Ice::Current &);
virtual void getConf_async(const ::MumbleServer::AMD_Server_getConfPtr &, const ::std::string &,
const Ice::Current &);
virtual void getAllConf_async(const ::MumbleServer::AMD_Server_getAllConfPtr &, const Ice::Current &);
virtual void setConf_async(const ::MumbleServer::AMD_Server_setConfPtr &, const ::std::string &,
const ::std::string &, const Ice::Current &);
virtual void setSuperuserPassword_async(const ::MumbleServer::AMD_Server_setSuperuserPasswordPtr &,
const ::std::string &, const Ice::Current &);
virtual void getLog_async(const ::MumbleServer::AMD_Server_getLogPtr &, ::Ice::Int, ::Ice::Int,
const Ice::Current &);
virtual void getLogLen_async(const ::MumbleServer::AMD_Server_getLogLenPtr &, const Ice::Current &);
virtual void getUsers_async(const ::MumbleServer::AMD_Server_getUsersPtr &, const Ice::Current &);
virtual void getChannels_async(const ::MumbleServer::AMD_Server_getChannelsPtr &, const Ice::Current &);
virtual void getTree_async(const ::MumbleServer::AMD_Server_getTreePtr &, const Ice::Current &);
virtual void getCertificateList_async(const ::MumbleServer::AMD_Server_getCertificateListPtr &, ::Ice::Int,
const ::Ice::Current &);
virtual void getBans_async(const ::MumbleServer::AMD_Server_getBansPtr &, const Ice::Current &);
virtual void setBans_async(const ::MumbleServer::AMD_Server_setBansPtr &, const ::MumbleServer::BanList &,
const Ice::Current &);
virtual void kickUser_async(const ::MumbleServer::AMD_Server_kickUserPtr &, ::Ice::Int, const ::std::string &,
const Ice::Current &);
virtual void sendMessage_async(const ::MumbleServer::AMD_Server_sendMessagePtr &, ::Ice::Int, const ::std::string &,
const Ice::Current &);
virtual void hasPermission_async(const ::MumbleServer::AMD_Server_hasPermissionPtr &, ::Ice::Int, ::Ice::Int,
::Ice::Int, const ::Ice::Current &);
virtual void effectivePermissions_async(const ::MumbleServer::AMD_Server_effectivePermissionsPtr &, ::Ice::Int,
::Ice::Int, const ::Ice::Current &);
virtual void addContextCallback_async(const ::MumbleServer::AMD_Server_addContextCallbackPtr &, ::Ice::Int,
const ::std::string &, const ::std::string &,
const ::MumbleServer::ServerContextCallbackPrx &, int,
const ::Ice::Current &);
virtual void removeContextCallback_async(const ::MumbleServer::AMD_Server_removeContextCallbackPtr &,
const ::MumbleServer::ServerContextCallbackPrx &, const ::Ice::Current &);
virtual void getState_async(const ::MumbleServer::AMD_Server_getStatePtr &, ::Ice::Int, const Ice::Current &);
virtual void setState_async(const ::MumbleServer::AMD_Server_setStatePtr &, const ::MumbleServer::User &,
const Ice::Current &);
virtual void getChannelState_async(const ::MumbleServer::AMD_Server_getChannelStatePtr &, ::Ice::Int,
const Ice::Current &);
virtual void setChannelState_async(const ::MumbleServer::AMD_Server_setChannelStatePtr &,
const ::MumbleServer::Channel &, const Ice::Current &);
virtual void removeChannel_async(const ::MumbleServer::AMD_Server_removeChannelPtr &, ::Ice::Int,
const Ice::Current &);
virtual void addChannel_async(const ::MumbleServer::AMD_Server_addChannelPtr &, const ::std::string &, ::Ice::Int,
const Ice::Current &);
virtual void sendMessageChannel_async(const ::MumbleServer::AMD_Server_sendMessageChannelPtr &, ::Ice::Int, bool,
const ::std::string &, const Ice::Current &);
virtual void getACL_async(const ::MumbleServer::AMD_Server_getACLPtr &, ::Ice::Int, const Ice::Current &);
virtual void setACL_async(const ::MumbleServer::AMD_Server_setACLPtr &, ::Ice::Int, const ::MumbleServer::ACLList &,
const ::MumbleServer::GroupList &, bool, const Ice::Current &);
virtual void removeUserFromGroup_async(const ::MumbleServer::AMD_Server_removeUserFromGroupPtr &, ::Ice::Int,
::Ice::Int, const ::std::string &, const ::Ice::Current &);
virtual void addUserToGroup_async(const ::MumbleServer::AMD_Server_addUserToGroupPtr &, ::Ice::Int, ::Ice::Int,
const ::std::string &, const ::Ice::Current &);
virtual void redirectWhisperGroup_async(const ::MumbleServer::AMD_Server_redirectWhisperGroupPtr &, ::Ice::Int,
const ::std::string &, const ::std::string &, const ::Ice::Current &);
virtual void getUserNames_async(const ::MumbleServer::AMD_Server_getUserNamesPtr &, const ::MumbleServer::IdList &,
const Ice::Current &);
virtual void getUserIds_async(const ::MumbleServer::AMD_Server_getUserIdsPtr &, const ::MumbleServer::NameList &,
const Ice::Current &);
virtual void registerUser_async(const ::MumbleServer::AMD_Server_registerUserPtr &,
const ::MumbleServer::UserInfoMap &, const Ice::Current &);
virtual void unregisterUser_async(const ::MumbleServer::AMD_Server_unregisterUserPtr &, ::Ice::Int,
const Ice::Current &);
virtual void updateRegistration_async(const ::MumbleServer::AMD_Server_updateRegistrationPtr &, Ice::Int,
const ::MumbleServer::UserInfoMap &, const Ice::Current &);
virtual void getRegistration_async(const ::MumbleServer::AMD_Server_getRegistrationPtr &, ::Ice::Int,
const Ice::Current &);
virtual void getRegisteredUsers_async(const ::MumbleServer::AMD_Server_getRegisteredUsersPtr &,
const ::std::string &, const Ice::Current &);
virtual void verifyPassword_async(const ::MumbleServer::AMD_Server_verifyPasswordPtr &, const ::std::string &,
const ::std::string &, const Ice::Current &);
virtual void getTexture_async(const ::MumbleServer::AMD_Server_getTexturePtr &, ::Ice::Int, const Ice::Current &);
virtual void setTexture_async(const ::MumbleServer::AMD_Server_setTexturePtr &, ::Ice::Int,
const ::MumbleServer::Texture &, const Ice::Current &);
virtual void getUptime_async(const ::MumbleServer::AMD_Server_getUptimePtr &, const Ice::Current &);
virtual void updateCertificate_async(const ::MumbleServer::AMD_Server_updateCertificatePtr &, const std::string &,
const std::string &, const std::string &, const Ice::Current &);
virtual void startListening_async(const ::MumbleServer::AMD_Server_startListeningPtr &, ::Ice::Int, ::Ice::Int,
const Ice::Current &);
virtual void stopListening_async(const ::MumbleServer::AMD_Server_stopListeningPtr &, ::Ice::Int, ::Ice::Int,
const Ice::Current &);
virtual void isListening_async(const ::MumbleServer::AMD_Server_isListeningPtr &, ::Ice::Int, ::Ice::Int,
const Ice::Current &);
virtual void getListeningChannels_async(const ::MumbleServer::AMD_Server_getListeningChannelsPtr &, ::Ice::Int,
const Ice::Current &);
virtual void getListeningUsers_async(const ::MumbleServer::AMD_Server_getListeningUsersPtr &, ::Ice::Int,
const Ice::Current &);
virtual void sendWelcomeMessage_async(const ::MumbleServer::AMD_Server_sendWelcomeMessagePtr &,
const ::MumbleServer::IdList &p1, const ::Ice::Current &current);
virtual void ice_ping(const Ice::Current &) const;
};
class MetaI : virtual public Meta {
public:
virtual void getSliceChecksums_async(const ::MumbleServer::AMD_Meta_getSliceChecksumsPtr &, const ::Ice::Current &);
virtual void getServer_async(const ::MumbleServer::AMD_Meta_getServerPtr &, ::Ice::Int, const Ice::Current &);
virtual void newServer_async(const ::MumbleServer::AMD_Meta_newServerPtr &, const Ice::Current &);
virtual void getBootedServers_async(const ::MumbleServer::AMD_Meta_getBootedServersPtr &, const Ice::Current &);
virtual void getAllServers_async(const ::MumbleServer::AMD_Meta_getAllServersPtr &, const Ice::Current &);
virtual void getDefaultConf_async(const ::MumbleServer::AMD_Meta_getDefaultConfPtr &, const Ice::Current &);
virtual void getVersion_async(const ::MumbleServer::AMD_Meta_getVersionPtr &, const Ice::Current &);
virtual void addCallback_async(const ::MumbleServer::AMD_Meta_addCallbackPtr &,
const ::MumbleServer::MetaCallbackPrx &, const ::Ice::Current & = ::Ice::Current());
virtual void removeCallback_async(const ::MumbleServer::AMD_Meta_removeCallbackPtr &,
const ::MumbleServer::MetaCallbackPrx &,
const ::Ice::Current & = ::Ice::Current());
virtual void getUptime_async(const ::MumbleServer::AMD_Meta_getUptimePtr &, const Ice::Current &);
virtual void getSlice_async(const ::MumbleServer::AMD_Meta_getSlicePtr &, const Ice::Current &);
};
} // namespace MumbleServer
#endif

File diff suppressed because it is too large Load Diff

View File

@ -3,32 +3,31 @@
// that can be found in the LICENSE file at the root of the
// Mumble source tree or at <https://www.mumble.info/LICENSE>.
#ifdef USE_ICE
# ifndef MUMBLE_MURMUR_MURMURICE_H_
# define MUMBLE_MURMUR_MURMURICE_H_
#ifndef MUMBLE_MURMUR_MURMURICE_H_
#define MUMBLE_MURMUR_MURMURICE_H_
# include <QtCore/QtGlobal>
#include <QtCore/QtGlobal>
# if defined(Q_OS_WIN) && !defined(WIN32_LEAN_AND_MEAN)
#if defined(Q_OS_WIN) && !defined(WIN32_LEAN_AND_MEAN)
// To prevent <windows.h> (included by Ice) from including <winsock.h>.
# define WIN32_LEAN_AND_MEAN
# endif
# define WIN32_LEAN_AND_MEAN
#endif
# include <QtCore/QList>
# include <QtCore/QMap>
# include <QtCore/QMutex>
# include <QtCore/QObject>
# include <QtCore/QWaitCondition>
# include <QtNetwork/QSslCertificate>
#include <QtCore/QList>
#include <QtCore/QMap>
#include <QtCore/QMutex>
#include <QtCore/QObject>
#include <QtCore/QWaitCondition>
#include <QtNetwork/QSslCertificate>
# include "MurmurI.h"
#include "MumbleServerI.h"
class Channel;
class Server;
class User;
struct TextMessage;
class MurmurIce : public QObject {
class MumbleServerIce : public QObject {
friend class MurmurLocker;
Q_OBJECT;
@ -37,36 +36,37 @@ protected:
QMutex qmEvent;
QWaitCondition qwcEvent;
void customEvent(QEvent *evt);
void badMetaProxy(const ::Murmur::MetaCallbackPrx &prx);
void badServerProxy(const ::Murmur::ServerCallbackPrx &prx, const ::Server *server);
void badMetaProxy(const ::MumbleServer::MetaCallbackPrx &prx);
void badServerProxy(const ::MumbleServer::ServerCallbackPrx &prx, const ::Server *server);
void badAuthenticator(::Server *);
QList<::Murmur::MetaCallbackPrx > qlMetaCallbacks;
QMap< int, QList<::Murmur::ServerCallbackPrx > > qmServerCallbacks;
QMap< int, QMap< int, QMap< QString, ::Murmur::ServerContextCallbackPrx > > > qmServerContextCallbacks;
QMap< int, ::Murmur::ServerAuthenticatorPrx > qmServerAuthenticator;
QMap< int, ::Murmur::ServerUpdatingAuthenticatorPrx > qmServerUpdatingAuthenticator;
QList<::MumbleServer::MetaCallbackPrx > qlMetaCallbacks;
QMap< int, QList<::MumbleServer::ServerCallbackPrx > > qmServerCallbacks;
QMap< int, QMap< int, QMap< QString, ::MumbleServer::ServerContextCallbackPrx > > > qmServerContextCallbacks;
QMap< int, ::MumbleServer::ServerAuthenticatorPrx > qmServerAuthenticator;
QMap< int, ::MumbleServer::ServerUpdatingAuthenticatorPrx > qmServerUpdatingAuthenticator;
public:
Ice::CommunicatorPtr communicator;
Ice::ObjectAdapterPtr adapter;
MurmurIce();
~MurmurIce();
MumbleServerIce();
~MumbleServerIce();
void addMetaCallback(const ::Murmur::MetaCallbackPrx &prx);
void removeMetaCallback(const ::Murmur::MetaCallbackPrx &prx);
void addServerCallback(const ::Server *server, const ::Murmur::ServerCallbackPrx &prx);
void removeServerCallback(const ::Server *server, const ::Murmur::ServerCallbackPrx &prx);
void addMetaCallback(const ::MumbleServer::MetaCallbackPrx &prx);
void removeMetaCallback(const ::MumbleServer::MetaCallbackPrx &prx);
void addServerCallback(const ::Server *server, const ::MumbleServer::ServerCallbackPrx &prx);
void removeServerCallback(const ::Server *server, const ::MumbleServer::ServerCallbackPrx &prx);
void removeServerCallbacks(const ::Server *server);
void addServerContextCallback(const ::Server *server, int session_id, const QString &action,
const ::Murmur::ServerContextCallbackPrx &prx);
const QMap< int, QMap< QString, ::Murmur::ServerContextCallbackPrx > >
const ::MumbleServer::ServerContextCallbackPrx &prx);
const QMap< int, QMap< QString, ::MumbleServer::ServerContextCallbackPrx > >
getServerContextCallbacks(const ::Server *server) const;
void removeServerContextCallback(const ::Server *server, int session_id, const QString &action);
void setServerAuthenticator(const ::Server *server, const ::Murmur::ServerAuthenticatorPrx &prx);
const ::Murmur::ServerAuthenticatorPrx getServerAuthenticator(const ::Server *server) const;
void setServerAuthenticator(const ::Server *server, const ::MumbleServer::ServerAuthenticatorPrx &prx);
const ::MumbleServer::ServerAuthenticatorPrx getServerAuthenticator(const ::Server *server) const;
void removeServerAuthenticator(const ::Server *server);
void setServerUpdatingAuthenticator(const ::Server *server, const ::Murmur::ServerUpdatingAuthenticatorPrx &prx);
const ::Murmur::ServerUpdatingAuthenticatorPrx getServerUpdatingAuthenticator(const ::Server *server) const;
void setServerUpdatingAuthenticator(const ::Server *server,
const ::MumbleServer::ServerUpdatingAuthenticatorPrx &prx);
const ::MumbleServer::ServerUpdatingAuthenticatorPrx getServerUpdatingAuthenticator(const ::Server *server) const;
void removeServerUpdatingAuthenticator(const ::Server *server);
public slots:
@ -96,5 +96,4 @@ public slots:
void contextAction(const User *, const QString &, unsigned int, int);
};
# endif
#endif

View File

@ -1,193 +0,0 @@
// Copyright 2008-2022 The Mumble Developers. All rights reserved.
// Use of this source code is governed by a BSD-style license
// that can be found in the LICENSE file at the root of the
// Mumble source tree or at <https://www.mumble.info/LICENSE>.
#ifndef MUMBLE_MURMUR_MURMURI_H_
#define MUMBLE_MURMUR_MURMURI_H_
#include <Murmur.h>
namespace Murmur {
class ServerI : virtual public Server {
public:
virtual void isRunning_async(const ::Murmur::AMD_Server_isRunningPtr &, const Ice::Current &);
virtual void start_async(const ::Murmur::AMD_Server_startPtr &, const Ice::Current &);
virtual void stop_async(const ::Murmur::AMD_Server_stopPtr &, const Ice::Current &);
virtual void delete_async(const ::Murmur::AMD_Server_deletePtr &, const Ice::Current &);
virtual void addCallback_async(const ::Murmur::AMD_Server_addCallbackPtr &, const ::Murmur::ServerCallbackPrx &,
const ::Ice::Current &);
virtual void removeCallback_async(const ::Murmur::AMD_Server_removeCallbackPtr &,
const ::Murmur::ServerCallbackPrx &, const ::Ice::Current &);
virtual void setAuthenticator_async(const ::Murmur::AMD_Server_setAuthenticatorPtr &,
const ::Murmur::ServerAuthenticatorPrx &, const ::Ice::Current &);
virtual void id_async(const ::Murmur::AMD_Server_idPtr &, const Ice::Current &);
virtual void getConf_async(const ::Murmur::AMD_Server_getConfPtr &, const ::std::string &, const Ice::Current &);
virtual void getAllConf_async(const ::Murmur::AMD_Server_getAllConfPtr &, const Ice::Current &);
virtual void setConf_async(const ::Murmur::AMD_Server_setConfPtr &, const ::std::string &, const ::std::string &,
const Ice::Current &);
virtual void setSuperuserPassword_async(const ::Murmur::AMD_Server_setSuperuserPasswordPtr &, const ::std::string &,
const Ice::Current &);
virtual void getLog_async(const ::Murmur::AMD_Server_getLogPtr &, ::Ice::Int, ::Ice::Int, const Ice::Current &);
virtual void getLogLen_async(const ::Murmur::AMD_Server_getLogLenPtr &, const Ice::Current &);
virtual void getUsers_async(const ::Murmur::AMD_Server_getUsersPtr &, const Ice::Current &);
virtual void getChannels_async(const ::Murmur::AMD_Server_getChannelsPtr &, const Ice::Current &);
virtual void getTree_async(const ::Murmur::AMD_Server_getTreePtr &, const Ice::Current &);
virtual void getCertificateList_async(const ::Murmur::AMD_Server_getCertificateListPtr &, ::Ice::Int,
const ::Ice::Current &);
virtual void getBans_async(const ::Murmur::AMD_Server_getBansPtr &, const Ice::Current &);
virtual void setBans_async(const ::Murmur::AMD_Server_setBansPtr &, const ::Murmur::BanList &,
const Ice::Current &);
virtual void kickUser_async(const ::Murmur::AMD_Server_kickUserPtr &, ::Ice::Int, const ::std::string &,
const Ice::Current &);
virtual void sendMessage_async(const ::Murmur::AMD_Server_sendMessagePtr &, ::Ice::Int, const ::std::string &,
const Ice::Current &);
virtual void hasPermission_async(const ::Murmur::AMD_Server_hasPermissionPtr &, ::Ice::Int, ::Ice::Int, ::Ice::Int,
const ::Ice::Current &);
virtual void effectivePermissions_async(const ::Murmur::AMD_Server_effectivePermissionsPtr &, ::Ice::Int,
::Ice::Int, const ::Ice::Current &);
virtual void addContextCallback_async(const ::Murmur::AMD_Server_addContextCallbackPtr &, ::Ice::Int,
const ::std::string &, const ::std::string &,
const ::Murmur::ServerContextCallbackPrx &, int, const ::Ice::Current &);
virtual void removeContextCallback_async(const ::Murmur::AMD_Server_removeContextCallbackPtr &,
const ::Murmur::ServerContextCallbackPrx &, const ::Ice::Current &);
virtual void getState_async(const ::Murmur::AMD_Server_getStatePtr &, ::Ice::Int, const Ice::Current &);
virtual void setState_async(const ::Murmur::AMD_Server_setStatePtr &, const ::Murmur::User &, const Ice::Current &);
virtual void getChannelState_async(const ::Murmur::AMD_Server_getChannelStatePtr &, ::Ice::Int,
const Ice::Current &);
virtual void setChannelState_async(const ::Murmur::AMD_Server_setChannelStatePtr &, const ::Murmur::Channel &,
const Ice::Current &);
virtual void removeChannel_async(const ::Murmur::AMD_Server_removeChannelPtr &, ::Ice::Int, const Ice::Current &);
virtual void addChannel_async(const ::Murmur::AMD_Server_addChannelPtr &, const ::std::string &, ::Ice::Int,
const Ice::Current &);
virtual void sendMessageChannel_async(const ::Murmur::AMD_Server_sendMessageChannelPtr &, ::Ice::Int, bool,
const ::std::string &, const Ice::Current &);
virtual void getACL_async(const ::Murmur::AMD_Server_getACLPtr &, ::Ice::Int, const Ice::Current &);
virtual void setACL_async(const ::Murmur::AMD_Server_setACLPtr &, ::Ice::Int, const ::Murmur::ACLList &,
const ::Murmur::GroupList &, bool, const Ice::Current &);
virtual void removeUserFromGroup_async(const ::Murmur::AMD_Server_removeUserFromGroupPtr &, ::Ice::Int, ::Ice::Int,
const ::std::string &, const ::Ice::Current &);
virtual void addUserToGroup_async(const ::Murmur::AMD_Server_addUserToGroupPtr &, ::Ice::Int, ::Ice::Int,
const ::std::string &, const ::Ice::Current &);
virtual void redirectWhisperGroup_async(const ::Murmur::AMD_Server_redirectWhisperGroupPtr &, ::Ice::Int,
const ::std::string &, const ::std::string &, const ::Ice::Current &);
virtual void getUserNames_async(const ::Murmur::AMD_Server_getUserNamesPtr &, const ::Murmur::IdList &,
const Ice::Current &);
virtual void getUserIds_async(const ::Murmur::AMD_Server_getUserIdsPtr &, const ::Murmur::NameList &,
const Ice::Current &);
virtual void registerUser_async(const ::Murmur::AMD_Server_registerUserPtr &, const Murmur::UserInfoMap &,
const Ice::Current &);
virtual void unregisterUser_async(const ::Murmur::AMD_Server_unregisterUserPtr &, ::Ice::Int, const Ice::Current &);
virtual void updateRegistration_async(const ::Murmur::AMD_Server_updateRegistrationPtr &, Ice::Int,
const Murmur::UserInfoMap &, const Ice::Current &);
virtual void getRegistration_async(const ::Murmur::AMD_Server_getRegistrationPtr &, ::Ice::Int,
const Ice::Current &);
virtual void getRegisteredUsers_async(const ::Murmur::AMD_Server_getRegisteredUsersPtr &, const ::std::string &,
const Ice::Current &);
virtual void verifyPassword_async(const ::Murmur::AMD_Server_verifyPasswordPtr &, const ::std::string &,
const ::std::string &, const Ice::Current &);
virtual void getTexture_async(const ::Murmur::AMD_Server_getTexturePtr &, ::Ice::Int, const Ice::Current &);
virtual void setTexture_async(const ::Murmur::AMD_Server_setTexturePtr &, ::Ice::Int, const ::Murmur::Texture &,
const Ice::Current &);
virtual void getUptime_async(const ::Murmur::AMD_Server_getUptimePtr &, const Ice::Current &);
virtual void updateCertificate_async(const ::Murmur::AMD_Server_updateCertificatePtr &, const std::string &,
const std::string &, const std::string &, const Ice::Current &);
virtual void startListening_async(const ::Murmur::AMD_Server_startListeningPtr &, ::Ice::Int, ::Ice::Int,
const Ice::Current &);
virtual void stopListening_async(const ::Murmur::AMD_Server_stopListeningPtr &, ::Ice::Int, ::Ice::Int,
const Ice::Current &);
virtual void isListening_async(const ::Murmur::AMD_Server_isListeningPtr &, ::Ice::Int, ::Ice::Int,
const Ice::Current &);
virtual void getListeningChannels_async(const ::Murmur::AMD_Server_getListeningChannelsPtr &, ::Ice::Int,
const Ice::Current &);
virtual void getListeningUsers_async(const ::Murmur::AMD_Server_getListeningUsersPtr &, ::Ice::Int,
const Ice::Current &);
virtual void sendWelcomeMessage_async(const ::Murmur::AMD_Server_sendWelcomeMessagePtr &,
const ::Murmur::IdList &p1, const ::Ice::Current &current);
virtual void ice_ping(const Ice::Current &) const;
};
class MetaI : virtual public Meta {
public:
virtual void getSliceChecksums_async(const ::Murmur::AMD_Meta_getSliceChecksumsPtr &, const ::Ice::Current &);
virtual void getServer_async(const ::Murmur::AMD_Meta_getServerPtr &, ::Ice::Int, const Ice::Current &);
virtual void newServer_async(const ::Murmur::AMD_Meta_newServerPtr &, const Ice::Current &);
virtual void getBootedServers_async(const ::Murmur::AMD_Meta_getBootedServersPtr &, const Ice::Current &);
virtual void getAllServers_async(const ::Murmur::AMD_Meta_getAllServersPtr &, const Ice::Current &);
virtual void getDefaultConf_async(const ::Murmur::AMD_Meta_getDefaultConfPtr &, const Ice::Current &);
virtual void getVersion_async(const ::Murmur::AMD_Meta_getVersionPtr &, const Ice::Current &);
virtual void addCallback_async(const ::Murmur::AMD_Meta_addCallbackPtr &, const ::Murmur::MetaCallbackPrx &,
const ::Ice::Current & = ::Ice::Current());
virtual void removeCallback_async(const ::Murmur::AMD_Meta_removeCallbackPtr &, const ::Murmur::MetaCallbackPrx &,
const ::Ice::Current & = ::Ice::Current());
virtual void getUptime_async(const ::Murmur::AMD_Meta_getUptimePtr &, const Ice::Current &);
virtual void getSlice_async(const ::Murmur::AMD_Meta_getSlicePtr &, const Ice::Current &);
};
} // namespace Murmur
#endif