Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API version 26 support #20

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
BSD 3-Clause License

Copyright (c) 2023 Carl Kittelberger

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# TeamSpeak3 Plugin SDK for Golang

This library allows developers to write plugins for the TeamSpeak3 client in
Go.

Note that its current functionality is limited. A huge part has not been
implemented yet but this should be enough to interact with the chat or set up
automations.

## Requirements

- Go 1.18 or newer (older versions have not been tested against).
- A working C compiler suite.
- Your own unpacked copy of [Version 24 the TeamSpeak3 Plugin SDK](https://github.com/TeamSpeak-Systems/ts3client-pluginsdk/tree/a39d50383b4a023941c31c08fe0c9766b149ed01).
To download it just click "Code" and then "Download ZIP" there.
- Having the `include/` directory exported as part of environment variable
`CGO_CPPFLAGS` (e.g. `-I/path/to/your/sdk/copy/include/`).

## License

This library has been licensed under the BSD 3-Clause License in hopes to keep
it entirely compatible with the original TeamSpeak3 Plugin SDK.

There are known open-source licensing complications in regards to the
TeamSpeak3 Plugin SDK itself (see [ts3client-pluginsdk#3]) which I am trying
to comply with on best efforts and with best intentions in mind. If a
violation of copyright or license exists in this repository, do contact me
either via GitHub issues or via the e-mail used for my Git commits.

[ts3client-pluginsdk#3]: https://github.com/TeamSpeak-Systems/ts3client-pluginsdk/issues/3
18 changes: 9 additions & 9 deletions plugin_definitions.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ts3plugin

/*
#cgo CFLAGS: -I./pluginsdk/include -I.
#cgo CFLAGS: -I.

#include <stdio.h> // uint types

Expand All @@ -13,30 +13,30 @@ import "C"
type PluginConfigureOffer int

const (
PLUGIN_OFFERS_NO_CONFIGURE = 0 /* Plugin does not implement ts3plugin_configure */
PLUGIN_OFFERS_CONFIGURE_NEW_THREAD /* Plugin does implement ts3plugin_configure and requests to run this function in an own thread */
PLUGIN_OFFERS_CONFIGURE_QT_THREAD /* Plugin does implement ts3plugin_configure and requests to run this function in the Qt GUI thread */
PLUGIN_OFFERS_NO_CONFIGURE = iota /* Plugin does not implement ts3plugin_configure */
PLUGIN_OFFERS_CONFIGURE_NEW_THREAD /* Plugin does implement ts3plugin_configure and requests to run this function in an own thread */
PLUGIN_OFFERS_CONFIGURE_QT_THREAD /* Plugin does implement ts3plugin_configure and requests to run this function in the Qt GUI thread */
)

type PluginMessageTarget int

const (
PLUGIN_MESSAGE_TARGET_SERVER = 0
PLUGIN_MESSAGE_TARGET_SERVER = iota
PLUGIN_MESSAGE_TARGET_CHANNEL
)

type PluginItemType int

const (
PLUGIN_SERVER = 0
PLUGIN_SERVER = iota
PLUGIN_CHANNEL
PLUGIN_CLIENT
)

type PluginMenuType int

const (
PLUGIN_MENU_TYPE_GLOBAL = 0
PLUGIN_MENU_TYPE_GLOBAL = iota
PLUGIN_MENU_TYPE_CHANNEL
PLUGIN_MENU_TYPE_CLIENT
)
Expand Down Expand Up @@ -68,7 +68,7 @@ type PluginBookmarkList struct {
type PluginGuiProfile int

const (
PLUGIN_GUI_SOUND_CAPTURE PluginGuiProfile = 0
PLUGIN_GUI_SOUND_CAPTURE PluginGuiProfile = iota
PLUGIN_GUI_SOUND_PLAYBACK
PLUGIN_GUI_HOTKEY
PLUGIN_GUI_SOUNDPACK
Expand All @@ -78,7 +78,7 @@ const (
type PluginConnectTab int

const (
PLUGIN_CONNECT_TAB_NEW PluginConnectTab = 0
PLUGIN_CONNECT_TAB_NEW PluginConnectTab = iota
PLUGIN_CONNECT_TAB_CURRENT
PLUGIN_CONNECT_TAB_NEW_IF_CURRENT_CONNECTED
)
2 changes: 0 additions & 2 deletions pluginsdk/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions pluginsdk/.travis.yml

This file was deleted.

16 changes: 0 additions & 16 deletions pluginsdk/Makefile

This file was deleted.

19 changes: 0 additions & 19 deletions pluginsdk/README.md

This file was deleted.

8 changes: 0 additions & 8 deletions pluginsdk/docs/client.html

This file was deleted.

Binary file removed pluginsdk/docs/client.pdf
Binary file not shown.
1 change: 0 additions & 1 deletion pluginsdk/docs/client_html/ar01s01.html

This file was deleted.

1 change: 0 additions & 1 deletion pluginsdk/docs/client_html/ar01s02.html

This file was deleted.

1 change: 0 additions & 1 deletion pluginsdk/docs/client_html/ar01s03.html

This file was deleted.

Loading