Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Adam <dev@robert-adam.de>2021-11-14 19:51:41 +0300
committerRobert Adam <dev@robert-adam.de>2021-11-18 21:25:28 +0300
commit60888caadcdac6aabee3f52ee0a4404ccc4dca97 (patch)
tree4bf4808543c2a3721cdfbd8589047e8d9d96e452
parente54798cbd3d593a0e233f3dc011201b48eba9975 (diff)
FEAT(plugins): Add typedef for API type
This typedef can be used by plugins that don't want to hard-code the type of the Mumble API type (which contains the API's version) into their source code. If this typedef is used, a newer API can be used simply by including a different API header.
-rw-r--r--plugins/MumbleAPI_v_1_0_x.h2
-rw-r--r--plugins/testPlugin/testPlugin.cpp2
2 files changed, 3 insertions, 1 deletions
diff --git a/plugins/MumbleAPI_v_1_0_x.h b/plugins/MumbleAPI_v_1_0_x.h
index cfc699c76..2cd80a807 100644
--- a/plugins/MumbleAPI_v_1_0_x.h
+++ b/plugins/MumbleAPI_v_1_0_x.h
@@ -527,4 +527,6 @@ struct MumbleAPI_v_1_0_x {
mumble_error_t(PLUGIN_CALLING_CONVENTION *playSample)(mumble_plugin_id_t callerID, const char *samplePath);
};
+typedef struct MumbleAPI_v_1_0_x mumble_api_t;
+
#endif // EXTERNAL_MUMBLE_PLUGIN_API_H_
diff --git a/plugins/testPlugin/testPlugin.cpp b/plugins/testPlugin/testPlugin.cpp
index ebeab6b19..4ea6a41f2 100644
--- a/plugins/testPlugin/testPlugin.cpp
+++ b/plugins/testPlugin/testPlugin.cpp
@@ -34,7 +34,7 @@ std::ostream &operator<<(std::ostream &stream, const mumble_version_t version) {
//////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////
-MumbleAPI_v_1_0_x mumAPI;
+mumble_api_t mumAPI;
mumble_connection_t activeConnection;
mumble_plugin_id_t ownID;