From b3d250dd43ea974beeb4dffcf445a9853805e387 Mon Sep 17 00:00:00 2001 From: rogo Date: Sat, 18 Apr 2020 16:55:51 +0200 Subject: [PATCH] moved over to qt project --- TS_WIFILED.pro | 29 + docs/client.pdf => client.pdf | Bin docs/client.html | 8 - docs/client_html/ar01s01.html | 1 - docs/client_html/ar01s02.html | 1 - docs/client_html/ar01s03.html | 1 - docs/client_html/ar01s04.html | 21 - docs/client_html/ar01s05.html | 33 - docs/client_html/ar01s06.html | 22 - docs/client_html/ar01s07.html | 3 - docs/client_html/ar01s08.html | 5 - docs/client_html/ar01s09.html | 62 - docs/client_html/ar01s10.html | 5 - docs/client_html/ar01s11.html | 27 - docs/client_html/ar01s12.html | 14 - docs/client_html/ar01s13.html | 9 - docs/client_html/ar01s13s02.html | 69 - docs/client_html/ar01s13s03.html | 10 - docs/client_html/ar01s13s04.html | 23 - docs/client_html/ar01s13s05.html | 44 - docs/client_html/ar01s13s06.html | 1 - docs/client_html/ar01s14.html | 3 - docs/client_html/ar01s15.html | 13 - docs/client_html/ar01s16.html | 9 - docs/client_html/ar01s17.html | 32 - docs/client_html/ar01s18.html | 19 - docs/client_html/ar01s19.html | 13 - docs/client_html/ar01s20.html | 16 - docs/client_html/ar01s21.html | 41 - docs/client_html/ar01s22.html | 143 -- docs/client_html/ar01s22s02.html | 75 - docs/client_html/ar01s22s02s02.html | 7 - docs/client_html/ar01s22s03.html | 49 - docs/client_html/ar01s23.html | 27 - docs/client_html/ar01s23s02.html | 36 - docs/client_html/ar01s23s03.html | 6 - docs/client_html/ar01s23s04.html | 6 - docs/client_html/ar01s23s05.html | 1 - docs/client_html/ar01s23s05s01.html | 15 - docs/client_html/ar01s23s05s02.html | 8 - docs/client_html/ar01s23s06.html | 14 - docs/client_html/ar01s23s07.html | 28 - docs/client_html/ar01s24.html | 13 - docs/client_html/ar01s25.html | 24 - docs/client_html/ar01s26.html | 3 - docs/client_html/ar01s27.html | 19 - docs/client_html/ar01s28.html | 14 - docs/client_html/ar01s29.html | 95 - docs/client_html/ar01s30.html | 47 - docs/client_html/images/caution.png | Bin 887 -> 0 bytes docs/client_html/images/home.png | Bin 879 -> 0 bytes docs/client_html/images/important.png | Bin 887 -> 0 bytes docs/client_html/images/logo.png | Bin 7194 -> 0 bytes docs/client_html/images/next.png | Bin 681 -> 0 bytes docs/client_html/images/note.png | Bin 815 -> 0 bytes docs/client_html/images/prev.png | Bin 649 -> 0 bytes docs/client_html/images/up.png | Bin 612 -> 0 bytes docs/client_html/index.html | 5 - docs/client_html/ix01.html | 1 - docs/client_html/ts3doc.css | 50 - src/curl/curl.h | 2889 ------------------------- src/curl/curlver.h | 77 - src/curl/easy.h | 112 - src/curl/mprintf.h | 50 - src/curl/multi.h | 456 ---- src/curl/stdcheaders.h | 33 - src/curl/system.h | 504 ----- src/curl/typecheck-gcc.h | 699 ------ src/curl/urlapi.h | 125 -- src/icons/1.png | Bin 234 -> 0 bytes src/icons/2.png | Bin 297 -> 0 bytes src/icons/3.png | Bin 303 -> 0 bytes src/icons/t.png | Bin 241 -> 0 bytes src/plugin.c | 132 +- src/test_plugin.sln | 31 - src/test_plugin.vcxproj | 170 -- src/test_plugin.vcxproj.filters | 53 - 77 files changed, 93 insertions(+), 6458 deletions(-) create mode 100644 TS_WIFILED.pro rename docs/client.pdf => client.pdf (100%) delete mode 100644 docs/client.html delete mode 100644 docs/client_html/ar01s01.html delete mode 100644 docs/client_html/ar01s02.html delete mode 100644 docs/client_html/ar01s03.html delete mode 100644 docs/client_html/ar01s04.html delete mode 100644 docs/client_html/ar01s05.html delete mode 100644 docs/client_html/ar01s06.html delete mode 100644 docs/client_html/ar01s07.html delete mode 100644 docs/client_html/ar01s08.html delete mode 100644 docs/client_html/ar01s09.html delete mode 100644 docs/client_html/ar01s10.html delete mode 100644 docs/client_html/ar01s11.html delete mode 100644 docs/client_html/ar01s12.html delete mode 100644 docs/client_html/ar01s13.html delete mode 100644 docs/client_html/ar01s13s02.html delete mode 100644 docs/client_html/ar01s13s03.html delete mode 100644 docs/client_html/ar01s13s04.html delete mode 100644 docs/client_html/ar01s13s05.html delete mode 100644 docs/client_html/ar01s13s06.html delete mode 100644 docs/client_html/ar01s14.html delete mode 100644 docs/client_html/ar01s15.html delete mode 100644 docs/client_html/ar01s16.html delete mode 100644 docs/client_html/ar01s17.html delete mode 100644 docs/client_html/ar01s18.html delete mode 100644 docs/client_html/ar01s19.html delete mode 100644 docs/client_html/ar01s20.html delete mode 100644 docs/client_html/ar01s21.html delete mode 100644 docs/client_html/ar01s22.html delete mode 100644 docs/client_html/ar01s22s02.html delete mode 100644 docs/client_html/ar01s22s02s02.html delete mode 100644 docs/client_html/ar01s22s03.html delete mode 100644 docs/client_html/ar01s23.html delete mode 100644 docs/client_html/ar01s23s02.html delete mode 100644 docs/client_html/ar01s23s03.html delete mode 100644 docs/client_html/ar01s23s04.html delete mode 100644 docs/client_html/ar01s23s05.html delete mode 100644 docs/client_html/ar01s23s05s01.html delete mode 100644 docs/client_html/ar01s23s05s02.html delete mode 100644 docs/client_html/ar01s23s06.html delete mode 100644 docs/client_html/ar01s23s07.html delete mode 100644 docs/client_html/ar01s24.html delete mode 100644 docs/client_html/ar01s25.html delete mode 100644 docs/client_html/ar01s26.html delete mode 100644 docs/client_html/ar01s27.html delete mode 100644 docs/client_html/ar01s28.html delete mode 100644 docs/client_html/ar01s29.html delete mode 100644 docs/client_html/ar01s30.html delete mode 100644 docs/client_html/images/caution.png delete mode 100644 docs/client_html/images/home.png delete mode 100644 docs/client_html/images/important.png delete mode 100644 docs/client_html/images/logo.png delete mode 100644 docs/client_html/images/next.png delete mode 100644 docs/client_html/images/note.png delete mode 100644 docs/client_html/images/prev.png delete mode 100644 docs/client_html/images/up.png delete mode 100644 docs/client_html/index.html delete mode 100644 docs/client_html/ix01.html delete mode 100644 docs/client_html/ts3doc.css delete mode 100644 src/curl/curl.h delete mode 100644 src/curl/curlver.h delete mode 100644 src/curl/easy.h delete mode 100644 src/curl/mprintf.h delete mode 100644 src/curl/multi.h delete mode 100644 src/curl/stdcheaders.h delete mode 100644 src/curl/system.h delete mode 100644 src/curl/typecheck-gcc.h delete mode 100644 src/curl/urlapi.h delete mode 100644 src/icons/1.png delete mode 100644 src/icons/2.png delete mode 100644 src/icons/3.png delete mode 100644 src/icons/t.png delete mode 100644 src/test_plugin.sln delete mode 100644 src/test_plugin.vcxproj delete mode 100644 src/test_plugin.vcxproj.filters diff --git a/TS_WIFILED.pro b/TS_WIFILED.pro new file mode 100644 index 0000000..056aabc --- /dev/null +++ b/TS_WIFILED.pro @@ -0,0 +1,29 @@ +# Created by and for Qt Creator This file was created for editing the project sources only. +# You may attempt to use it for building too, by modifying this file here. + +#TARGET = TS_WIFILED + +TEMPLATE = lib + +HEADERS = \ + $$PWD/include/teamlog/logtypes.h \ + $$PWD/include/teamspeak/clientlib_publicdefinitions.h \ + $$PWD/include/teamspeak/public_definitions.h \ + $$PWD/include/teamspeak/public_errors.h \ + $$PWD/include/teamspeak/public_errors_rare.h \ + $$PWD/include/teamspeak/public_rare_definitions.h \ + $$PWD/include/plugin_definitions.h \ + $$PWD/include/ts3_functions.h \ + $$PWD/src/plugin.h + +SOURCES = \ + $$PWD/src/plugin.c + +INCLUDEPATH = \ + $$PWD/include \ + $$PWD/include/teamlog \ + $$PWD/include/teamspeak \ + $$PWD/src \ + +#DEFINES = + diff --git a/docs/client.pdf b/client.pdf similarity index 100% rename from docs/client.pdf rename to client.pdf diff --git a/docs/client.html b/docs/client.html deleted file mode 100644 index 929a6a1..0000000 --- a/docs/client.html +++ /dev/null @@ -1,8 +0,0 @@ - - - - -

You will be automatically forwarded to the Client SDK manual.
Click on the link below if your browser does not support forwarding.

-

Client SDK manual

- - diff --git a/docs/client_html/ar01s01.html b/docs/client_html/ar01s01.html deleted file mode 100644 index 6f44a24..0000000 --- a/docs/client_html/ar01s01.html +++ /dev/null @@ -1 +0,0 @@ -Introduction

Introduction

TeamSpeak 3 is a scalable Voice-Over-IP application consisting of client and server software. TeamSpeak is generally regarded as the leading VoIP system offering a superior voice quality, scalability and usability.

The cross-platform Software Development Kit allows the easy integration of the TeamSpeak client and server technology into own applications.

Tis document provides an introduction to client-side programming with the TeamSpeak 3 SDK, the so-called Client Lib. This library encapsulates client-side functionality while keeping the user interface separated and modular.

diff --git a/docs/client_html/ar01s02.html b/docs/client_html/ar01s02.html deleted file mode 100644 index fc01461..0000000 --- a/docs/client_html/ar01s02.html +++ /dev/null @@ -1 +0,0 @@ -System requirements

System requirements

For developing third-party clients with the TeamSpeak 3 Client Lib the following system requirements apply:

  • Windows

    Windows 7, 8, 8.1 (32- and 64-bit)

  • Mac OS X

    Mac OS X 10.6 and above

  • Linux

    Any recent Linux distribution with libstdc++ 6 (32- and 64-bit)

[Important]Important

The calling convention used in the functions exported by the shared TeamSpeak 3 SDK libaries is cdecl. You must not use another calling convention, like stdcall on Windows, when declaring function pointers to the TeamSpeak 3 SDK libraries. Otherwise stack corruption at runtime may occur.

diff --git a/docs/client_html/ar01s03.html b/docs/client_html/ar01s03.html deleted file mode 100644 index 71ff35c..0000000 --- a/docs/client_html/ar01s03.html +++ /dev/null @@ -1 +0,0 @@ -Overview of header files

Overview of header files

The following header files are deployed to SDK developers:

  • clientlib.h

    Declares the function prototypes and callbacks for the communication between Client Lib and Client UI. While the Client UI makes function calls into the Client Lib using the declared prototypes, the Client Lib calls the Client UI via callbacks.

  • clientlib_publicdefinitions.h

    Defines various enums and structs used by the Client UI and Client Lib. These definitions are used by the functions and callbacks declared in clientlib.h

  • public_definitions.h

    Defines various enums and structs used by both client- and server-side.

  • public_sdk_definitions.h

    Enum definitions for filetransfer support.

  • public_errors.h

    Defines the error codes returned by every Client Lib function and onServerErrorEvent. Error codes are organized in several groups. The first byte of the error code defines the error group, the second the count within the group.

diff --git a/docs/client_html/ar01s04.html b/docs/client_html/ar01s04.html deleted file mode 100644 index c2184bb..0000000 --- a/docs/client_html/ar01s04.html +++ /dev/null @@ -1,21 +0,0 @@ -Calling Client Lib functions

Calling Client Lib functions

Client Lib functions follow a common pattern. They always return an error code or ERROR_ok on success. If there is a result variable, it is always the last variable in the functions parameters list.

ERROR ts3client_FUNCNAME(arg1, arg2, ..., &result);

Result variables should only be accessed if the function returned ERROR_ok. Otherwise the state of the result variable is undefined.

In those cases where the result variable is a basic type (int, float etc.), the memory for the result variable has to be declared by the caller. Simply pass the address of the variable to the Client Lib function.

int result;
-
-if(ts3client_XXX(arg1, arg2, ..., &result) == ERROR_ok) {
-    /* Use result variable */
-} else {
-    /* Handle error, result variable is undefined */
-}

If the result variable is a pointer type (C strings, arrays etc.), the memory is allocated by the Client Lib function. In that case, the caller has to release the allocated memory later by using ts3client_freeMemory. It is important to only access and release the memory if the function returned ERROR_ok. Should the function return an error, the result variable is uninitialized, so freeing or accessing it could crash the application.

char* result;
-
-if(ts3client_XXX(arg1, arg2, ..., &result) == ERROR_ok) {
-    /* Use result variable */
-    ts3client_freeMemory(result);  /* Release result variable */
-} else {
-    /* Handle error, result variable is undefined. Do not access or release it. */
-}
[Note]Note

Client Lib functions are thread-safe. It is possible to access the Client Lib from several threads at the same time.

Return code

Client Lib functions that interact with the server take an additional parameter returnCode, which can be used to find out which action results in a later server error. If you pass a custom string as return code, the onServerErrorEvent callback will receive the same custom string in its returnCode parameter. If no error occured, onServerErrorEvent will indicate success py passing the error code ERROR_ok.

Pass NULL as returnCode if you do not need the feature. In this case, if no error occurs onServerErrorEvent will not be called.

An example, request moving a client:

ts3client_requestClientMove(scHandlerID, clientID, newChannelID, password, "MyClientMoveReturnCode");

If an error occurs, the onServerErrorEvent callback is called:

void my_onServerErrorEvent(uint64 serverConnectionHandlerID, const char* errorMessage,
-                           unsigned int error, const char* returnCode, const char* extraMessage) {
-    if(strcmp(returnCode, "MyClientMoveReturnCode")) == 0) {
-        /* We know this error is the reaction to above called function as we got the same returnCode */
-	if(error == ERROR_ok) {
-	    /* Success */
-	}
-}
diff --git a/docs/client_html/ar01s05.html b/docs/client_html/ar01s05.html deleted file mode 100644 index 350acdb..0000000 --- a/docs/client_html/ar01s05.html +++ /dev/null @@ -1,33 +0,0 @@ -Initializing

Initializing

When starting the client, initialize the Client Lib with a call to -

unsigned int ts3client_initClientLib(functionPointers,  
 functionRarePointers,  
 usedLogTypes,  
 logFileFolder,  
 resourcesFolder); 
const struct ClientUIFunctions* functionPointers;
const struct ClientUIFunctionsRare* functionRarePointers;
int usedLogTypes;
const char* logFileFolder;
const char* resourcesFolder;
 

-

  • functionPointers

    Callback function pointers. See below.

  • functionRarePointers

    Unused by SDK, pass NULL.

  • usedLogTypes

    Defines the log output types. The Client Lib can output log messages (called by ts3client_logMessage) to a file (located in the logs directory relative to the client executable), to stdout or to user defined callbacks. If user callbacks are activated, the onUserLoggingMessageEvent event needs to be implemented.

    Available values are defined by the enum LogTypes (see public_definitions.h):

    enum LogTypes {
    -    LogType_NONE          = 0x0000,
    -    LogType_FILE          = 0x0001,
    -    LogType_CONSOLE       = 0x0002,
    -    LogType_USERLOGGING   = 0x0004,
    -    LogType_NO_NETLOGGING = 0x0008,
    -    LogType_DATABASE      = 0x0010,
    -};

    Multiple log types can be combined with a binary OR. If only LogType_NONE is used, local logging is disabled.

    [Note]Note

    Logging to console can slow down the application on Windows. Hence we do not recommend to log to the console on Windows other than in debug builds.

    [Note]Note

    LogType_NO_NETLOGGING is no longer used. Previously this controlled if the Client Lib would send warning, error and critical log entries to a webserver for analysis. As netlogging does not occur anymore, this flag has no effect anymore.

    LogType_DATABASE has no effect in the Client Lib, this is only used by the server.

  • logFileFolder

    If file logging is used, this defines the location where the logs are written to. Pass NULL for the default behaviour, which is to use a folder called logs in the current working directory.

    resourcesFolder

    Resource path pointing to the directory where the soundbackends folder is located. Required so your application finds the sound backend shared libraries. This should usually point to the root or bin directory of your application, depending where the soundbackends directory is located.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h.

[Note]Note

This function must not be called more than once.

The callback mechanism

The communication from Client Lib to Client UI takes place using callbacks. The Client UI has to define a series of function pointers using the struct ClientUIFunctions (see clientlib.h). These callbacks are used to forward any incoming server actions to the Client UI for further processing.

[Note]Note

All the clientlib callbacks are asynchronous, except for the sound callbacks which allow to directly manipulate the sound buffer.

A callback example in C:

static void my_onConnectStatusChangeEvent_Callback(uint64 serverConnectionHandlerID,
-                                                   int newStatus,
-                                                   int errorNumber) {
-    /* Implementation */
-}

C++ developers can also use static member functions for the callbacks.

Before calling ts3client_initClientLib, create an instance of struct ClientUIFunctions, initialize all function pointers with NULL and assign the structs function pointers to your callback functions: -

unsigned int error;
-
-/* Create struct */
-ClientUIFunctions clUIFuncs;
-
-/* Initialize all function pointers with NULL */
-memset(&clUIFuncs, 0, sizeof(struct ClientUIFunctions));
-
-/* Assign those function pointers you implemented */
-clUIFuncs.onConnectStatusChangeEvent = my_onConnectStatusChangeEvent_Callback;
-clUIFuncs.onNewChannelEvent          = my_onNewChannelEvent_Callback;
-(...)
-
-/* Initialize client lib with callback function pointers */
-error = ts3client_initClientLib(&clUIFuncs, NULL, LogType_FILE | LogType_CONSOLE);
-if(error != ERROR_ok) {
-    printf("Error initializing clientlib: %d\n", error);
-    (...)
-}
[Important]Important

As long as you initialize unimplemented callbacks with NULL, the Client Lib won't attempt to call those function pointers. However, if you leave unimplemented callbacks undefined, the Client Lib will crash when trying to calling them.

[Note]Note

All callbacks used in the SDK are found in the struct ClientUIFunctions (see public_definitions.h). Callbacks bundled in the struct ClientUIFunctionsRare are not used by the SDK. These callbacks were split in a separate structs to avoid polluting the SDK headers with code used only internally.

diff --git a/docs/client_html/ar01s06.html b/docs/client_html/ar01s06.html deleted file mode 100644 index 07329ee..0000000 --- a/docs/client_html/ar01s06.html +++ /dev/null @@ -1,22 +0,0 @@ -Querying the library version

Querying the library version

The complete Client Lib version string can be queried with

unsigned int ts3client_getClientLibVersion(result); 
char** result;
 
  • result

    Address of a variable that receives the clientlib version string, encoded in UTF-8.

[Caution]Caution

The result string must be released using ts3client_freeMemory. If an error has occured, the result string is uninitialized and must not be released.


-

To get only the version number, which is a part of the complete version string, as numeric value: -

unsigned int ts3client_getClientLibVersionNumber(result); 
uint64* result;
 

-

  • result

    Address of a variable that receives the numeric clientlib version.

Both functions return ERROR_ok on success, otherwise an error code as defined in public_errors.h.


-

An example using ts3client_getClientLibVersion: -

unsigned int error;
-char* version;
-error = ts3client_getClientLibVersion(&version);
-if(error != ERROR_ok) {
-    printf("Error querying clientlib version: %d\n", error);
-    return;
-}
-printf("Client library version: %s\n", version);  /* Print version */
-ts3client_freeMemory(version);  /* Release string */

Example using ts3client_getClientLibVersionNumber: -

unsigned int error;
-uint64 version;
-error = ts3client_getClientLibVersionNumber(&version);
-if(error != ERROR_ok) {
-    printf("Error querying clientlib version number: %d\n", error);
-    return;
-}
-printf("Client library version number: %ld\n", version);  /* Print version */
diff --git a/docs/client_html/ar01s07.html b/docs/client_html/ar01s07.html deleted file mode 100644 index 5b8139d..0000000 --- a/docs/client_html/ar01s07.html +++ /dev/null @@ -1,3 +0,0 @@ -Shutting down

Shutting down

Before exiting the client application, the Client Lib should be shut down with -

unsigned int ts3client_destroyClientLib(); 
 

-

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h.

Make sure to call this function after disconnecting from any TeamSpeak 3 servers. Any call to Client Lib functions after shutting down has undefined results.

diff --git a/docs/client_html/ar01s08.html b/docs/client_html/ar01s08.html deleted file mode 100644 index f669d70..0000000 --- a/docs/client_html/ar01s08.html +++ /dev/null @@ -1,5 +0,0 @@ -Managing server connection handlers

Managing server connection handlers

Before connecting to a TeamSpeak 3 server, a new server connection handler needs to be spawned. Each handler is identified by a unique ID (usually called serverConnectionHandlerID). With one server connection handler a connection can be established and dropped multiple times, so for simply reconnecting to the same or another server no new handler needs to be spawned but existing ones can be reused. However, for using multiple connections simultaneously a new handler has to be spawned for each connection.

To create a new server connection handler and receive its ID, call -

unsigned int ts3client_spawnNewServerConnectionHandler(port,  
 result); 
int port;
uint64* result;
 

-

  • port

    Port the client should bind on. Specify zero to let the operating system chose any free port. In most cases passing zero is the best choice.

    If port is specified, the function return value should be checked for ERROR_unable_to_bind_network_port. Handle this error by switching to an alternative port until a "free" port is hit and the function returns ERROR_ok.

    [Caution]Caution

    Do not specify a non-zero value for port unless you absolutely need a specific port. Passing zero is the better way in most use cases.

  • result

    Address of a variable that receives the server connection handler ID.

To destroy a server connection handler, call -

unsigned int ts3client_destroyServerConnectionHandler(serverConnectionHandlerID); 
uint64 serverConnectionHandlerID;
 

-

  • serverConnectionHandlerID

    ID of the server connection handler to destroy.

Both functions return ERROR_ok on success, otherwise an error code as defined in public_errors.h.

[Important]Important

Destroying invalidates the handler ID, so it must not be used anymore afterwards. Also do not destroy a server connection handler ID from within a callback.

diff --git a/docs/client_html/ar01s09.html b/docs/client_html/ar01s09.html deleted file mode 100644 index d673087..0000000 --- a/docs/client_html/ar01s09.html +++ /dev/null @@ -1,62 +0,0 @@ -Connecting to a server

Connecting to a server

To connect to a server, a client application is required to request an identity from the Client Lib. This string should be requested only once and then locally stored in the applications configuration. The next time the application connects to a server, the identity should be read from the configuration and reused again. -

unsigned int ts3client_createIdentity(result); 
char** result;
 

-

  • result

    Address of a variable that receives the identity string, encoded in UTF-8.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h. If an error occured, the result string is uninitialized and must not be accessed.

[Caution]Caution

The result string must be released using ts3client_freeMemory. If an error has occured, the result string is uninitialized and must not be released.


-

Once a server connection handler has been spawned and an identity is available, connect to a TeamSpeak 3 server with -

unsigned int ts3client_startConnection(serverConnectionHandlerID,  
 identity,  
 ip,  
 port,  
 nickname,  
 defaultChannelArray,  
 defaultChannelPassword,  
 serverPassword); 
uint64 serverConnectionHandlerID;
const char* identity;
const char* ip;
unsigned int port;
const char* nickname;
const char** defaultChannelArray;
const char* defaultChannelPassword;
const char* serverPassword;
 

-

  • serverConnectionHandlerID

    Unique identifier for this server connection. Created with ts3client_spawnNewServerConnectionHandler

  • identity

    The clients identity. This string has to be created by calling ts3client_createIdentity. Please note an application should create the identity only once, store the string locally and reuse it for future connections.

  • ip

    Hostname or IP of the TeamSpeak 3 server.

    If you pass a hostname instead of an IP, the Client Lib will try to resolve it to an IP, but the function may block for an unusually long period of time while resolving is taking place. If you are relying on the function to return quickly, we recommend to resolve the hostname yourself (e.g. asynchronously) and then call ts3client_startConnection with the IP instead of the hostname.

  • port

    UDP port of the TeamSpeak 3 server, by default 9987. TeamSpeak 3 uses UDP. Support for TCP might be added in the future.

  • nickname

    On login, the client attempts to take this nickname on the connected server. Note this is not necessarily the actually assigned nickname, as the server can modifiy the nickname ("gandalf_1" instead the requested "gandalf") or refuse blocked names.

  • defaultChannelArray

    String array defining the path to a channel on the TeamSpeak 3 server. If the channel exists and the user has sufficient rights and supplies the correct password if required, the channel will be joined on login.

    To define the path to a subchannel of arbitrary level, create an array of channel names detailing the position of the default channel (e.g. "grandparent", "parent", "mydefault", ""). The array is terminated with a empty string.

    Pass NULL to join the servers default channel.

  • defaultChannelPassword

    Password for the default channel. Pass an empty string if no password is required or no default channel is specified.

  • serverPassword

    Password for the server. Pass an empty string if the server does not require a password.

All strings need to be encoded in UTF-8 format.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h. When trying to connect with an invalid identity, the Client Lib will set the error ERROR_client_could_not_validate_identity.


-

There is an alternative convinience function to start the connection which takes a channelID as parameter for the default channel instead of a channel name string array. -

unsigned int ts3client_startConnectionWithChannelID(serverConnectionHandlerID,  
 identity,  
 ip,  
 port,  
 nickname,  
 defaultChannelId,  
 defaultChannelPassword,  
 serverPassword); 
uint64 serverConnectionHandlerID;
const char* identity;
const char* ip;
unsigned int port;
const char* nickname;
uint64 defaultChannelId;
const char* defaultChannelPassword;
const char* serverPassword;
 

-

  • serverConnectionHandlerID

    Unique identifier for this server connection. Created with ts3client_spawnNewServerConnectionHandler

  • identity

    The clients identity. This string has to be created by calling ts3client_createIdentity. Please note an application should create the identity only once, store the string locally and reuse it for future connections.

  • ip

    Hostname or IP of the TeamSpeak 3 server.

    If you pass a hostname instead of an IP, the Client Lib will try to resolve it to an IP, but the function may block for an unusually long period of time while resolving is taking place. If you are relying on the function to return quickly, we recommend to resolve the hostname yourself (e.g. asynchronously) and then call ts3client_startConnection with the IP instead of the hostname.

  • port

    UDP port of the TeamSpeak 3 server, by default 9987. TeamSpeak 3 uses UDP. Support for TCP might be added in the future.

  • nickname

    On login, the client attempts to take this nickname on the connected server. Note this is not necessarily the actually assigned nickname, as the server can modifiy the nickname ("gandalf_1" instead the requested "gandalf") or refuse blocked names.

  • defaultChannelID

    Specifies ID of the channel on the TeamSpeak server we want to connect to. This is an alternative way to define the channel by ID instead of channel path as in ts3client_startConnection. If the specified channel does no longer exist or if the channel password is incorrect, the user will be connected to the default channel of the TeamSpeak server.

  • defaultChannelPassword

    Password for the default channel. Pass an empty string if no password is required or no default channel is specified.

  • serverPassword

    Password for the server. Pass an empty string if the server does not require a password.


-  

Example code to request a connection to a TeamSpeak 3 server:

unsigned int error;
-uint64 scHandlerID;
-char* identity;
-
-error = ts3client_spawnNewServerConnectionHandler(&scHandlerID);
-if(error != ERROR_ok) {
-    printf("Error spawning server conection handler: %d\n", error);
-    return;
-}
-
-error = ts3client_createIdentity(&identity);  /* Application should store and reuse the identity */
-if(error != ERROR_ok) {
-    printf("Error creating identity: %d\n", error);
-    return;
-}
-
-error = ts3client_startConnection(scHandlerID,
-                                  identity
-                                  "my-teamspeak-server.com",
-				  9987,
-				  "Gandalf",
-				  NULL,      // Join servers default channel
-				  "",        // Empty default channel password
-				  "secret"); // Server password
-if(error != ERROR_ok) {
-    (...)
-}			  
-ts3client_freeMemory(identity);  /* Don't need this anymore */


-

After calling ts3client_startConnection, the client will be informed of the connection status changes by the callback

void onConnectStatusChangeEvent(serverConnectionHandlerID,  
 newStatus,  
 errorNumber); 
uint64 serverConnectionHandlerID;
int newStatus;
int errorNumber;
 
  • newStatus

    The new connect state as defined by the enum ConnectStatus:

    enum ConnectStatus {
    -    STATUS_DISCONNECTED = 0,       //There is no activity to the server, this is the default value
    -    STATUS_CONNECTING,             //We are trying to connect, we haven't got a clientID yet, we
    -                                   //haven't been accepted by the server
    -    STATUS_CONNECTED,              //The server has accepted us, we can talk and hear and we got a
    -                                   //clientID, but we don't have the channels and clients yet, we
    -                                   //can get server infos (welcome msg etc.)
    -    STATUS_CONNECTION_ESTABLISHING,//we are CONNECTED and we are visible
    -    STATUS_CONNECTION_ESTABLISHED, //we are CONNECTED and we have the client and channels available
    -};
  • errorNumber

    Should be ERROR_ok (zero) when connecting

- While connecting, the states will switch through the values STATUS_CONNECTING, STATUS_CONNECTED and STATUS_CONNECTION_ESTABLISHED. Once the state STATUS_CONNECTED has been reached, there the server welcome message is available, which can be queried by the client:

  • Welcome message

    Query the server variable VIRTUALSERVER_WELCOMEMESSAGE for the message text using the function ts3client_getServerVariableAsString:

    char* welcomeMsg;
    -if(ts3client_getServerVariableAsString(serverConnectionHandlerID, VIRTUALSERVER_WELCOMEMESSAGE, &welcomeMsg)
    -   != ERROR_ok) {
    -    printf("Error getting server welcome message: %d\n", error);
    -    return;
    -}
    -print("Welcome message: %s\n", welcomeMsg);  /* Display message */
    -ts3client_freeMemory(welcomeMsg);  /* Release memory */


-

To check if a connection to a given server connection handler is established, call: -

unsigned int ts3client_getConnectionStatus(serverConnectionHandlerID,  
 result); 
uint64 serverConnectionHandlerID;
int* result;
 

-

  • serverConnectionHandlerID

    ID of the server connection handler of which the connection state is checked.

  • result

    Address of a variable that receives the result: 1 - Connected, 0 - Not connected.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h.


-

After the state STATUS_CONNECTED has been reached, the client is assigned an ID which identifies the client on this server. This ID can be queried with -

unsigned int ts3client_getClientID(serverConnectionHandlerID,  
 result); 
uint64 serverConnectionHandlerID;
anyID* result;
 

-

  • serverConnectionHandlerID

    ID of the server connection handler on which we are querying the own client ID.

  • result

    Address of a variable that receives the client ID. Client IDs start with the value 1.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h.


-

After connection has been established, all current channels on the server are announced to the client. This happens with delays to avoid a flood of information after connecting. The client is informed about the existance of each channel with the following event:

void onNewChannelEvent(serverConnectionHandlerID,  
 channelID,  
 channelParentID); 
uint64 serverConnectionHandlerID;
uint64 channelID;
uint64 channelParentID;
 
  • serverConnectionHandlerID

    The server connection handler ID.

  • channelID

    The ID of the announced channel.

  • channelParentID

    ID of the parent channel.

Channel IDs start with the value 1.

The order in which channels are announced by onNewChannelEvent is defined by the channel order as explained in the chapter Channel sorting.

All clients currently logged to the server are announced after connecting with the callback onClientMoveEvent.

diff --git a/docs/client_html/ar01s10.html b/docs/client_html/ar01s10.html deleted file mode 100644 index 4872f2d..0000000 --- a/docs/client_html/ar01s10.html +++ /dev/null @@ -1,5 +0,0 @@ -Disconnecting from a server

Disconnecting from a server

To disconnect from a TeamSpeak 3 server call -

unsigned int ts3client_stopConnection(serverConnectionHandlerID,  
 quitMessage); 
uint64 serverConnectionHandlerID;
const char* quitMessage;
 

-

  • serverConnectionHandlerID

    The unique ID for this server connection handler.

  • quitMessage

    A message like for example "leaving". The string needs to be encoded in UTF-8 format.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h.

Like with connecting, on successful disconnecting the client will receive an event:


-

void onConnectStatusChangeEvent(serverConnectionHandlerID,  
 newStatus,  
 errorNumber); 
uint64 serverConnectionHandlerID;
int newStatus;
int errorNumber;
 
  • newStatus

    Set to STATUS_DISCONNECTED as defined by the enum ConnectStatus.

  • errorNumber

    errorNumber is expected to be ERROR_ok as response to calling ts3client_stopConnection.

    Values other than ERROR_ok occur when the connection has been lost for reasons not initiated by the user, e.g. network error, forcefully disconnected etc.


-

Should the server be shutdown, the follow event will be called:

void onServerStopEvent(serverConnectionHandlerID,  
 shutdownMessage); 
uint64 serverConnectionHandlerID;
const char* shutdownMessage;
 
  • serverConnectionHandlerID

    Server connection handler ID of the stopped server.

  • shutdownMessage

    Message announcing the reason for the shutdown sent by the server. Has to be encoded in UTF-8 format.

diff --git a/docs/client_html/ar01s11.html b/docs/client_html/ar01s11.html deleted file mode 100644 index be5e4a8..0000000 --- a/docs/client_html/ar01s11.html +++ /dev/null @@ -1,27 +0,0 @@ -Error handling

Error handling

Each Client Lib function returns either ERROR_ok on success or an error value as defined in public_errors.h if the function fails.

The returned error codes are organized in groups, where the first byte defines the error group and the second the count within the group: The naming convention is ERROR_<group>_<error>, for example ERROR_client_invalid_id.

Example:

unsigned int error;
-char* welcomeMsg;
-
-error = ts3client_getServerVariableAsString(serverConnectionHandlerID,
-                                            VIRTUALSERVER_WELCOMEMESSAGE,
-                                            &welcomeMsg);
-if(error == ERROR_ok) {
-    /* Use welcomeMsg... */
-    ts3client_freeMemory(welcomeMsg);  /* Release memory *only* if function did not return an error */
-} else {
-    /* Handle error */
-    /* Do not access or release welcomeMessage, the variable is undefined */
-}
[Important]Important

Client Lib functions returning C-strings or arrays dynamically allocate memory which has to be freed by the caller using ts3client_freeMemory. It is important to only access and release the memory if the function returned ERROR_ok. Should the function return an error, the result variable is uninitialized, so freeing or accessing it could crash the application.

See the section Calling Client Lib functions for additional notes and examples.


-

A printable error string for a specific error code can be queried with -

unsigned int ts3client_getErrorMessage(errorCode,  
 error); 
unsigned int errorCode;
char** error;
 

-

  • errorCode

    The error code returned from all Client Lib functions.

  • error

    Address of a variable that receives the error message string, encoded in UTF-8 format. Unless the return value of the function is not ERROR_ok, the string should be released with ts3client_freeMemory.

Example:

unsigned int error;
-anyID myID;
-
-error = ts3client_getClientID(scHandlerID, &myID);  /* Calling some Client Lib function */
-if(error != ERROR_ok) {
-    char* errorMsg;
-    if(ts3client_getErrorMessage(error, &errorMsg) == ERROR_ok) {  /* Query printable error */
-        printf("Error querying client ID: %s\n", errorMsg);
-        ts3client_freeMemory(errorMsg);  /* Release memory */
-    }
-}


-

In addition to actively querying errors like above, error codes can be sent by the server to the client. In that case the following event is called:

void onServerErrorEvent(serverConnectionHandlerID,  
 errorMessage,  
 error,  
 returnCode,  
 extraMessage); 
uint64 serverConnectionHandlerID;
const char* errorMessage;
unsigned int error;
const char* returnCode;
const char* extraMessage;
 
  • serverConnectionHandlerID

    The connection handler ID of the server who sent the error event.

  • errorMessage

    String containing a verbose error message, encoded in UTF-8 format.

  • error

    Error code as defined in public_errors.h.

  • returnCode

    String containing the return code if it has been set by the Client Lib function call which caused this error event.

    See return code documentation.

  • extraMessage

    Can contain additional information about the occured error. If no additional information is available, this parameter is an empty string.

diff --git a/docs/client_html/ar01s12.html b/docs/client_html/ar01s12.html deleted file mode 100644 index b9229c9..0000000 --- a/docs/client_html/ar01s12.html +++ /dev/null @@ -1,14 +0,0 @@ -Logging

Logging

The TeamSpeak 3 Client Lib offers basic logging functions: - -

unsigned int ts3client_logMessage(logMessage,  
 severity,  
 channel,  
 logID); 
const char* logMessage;
LogLevel severity;
const char* channel;
uint64 logID;
 

-

  • logMessage

    Text written to log.

  • severity

    The level of the message, warning or error. Defined by the enum LogLevel in clientlib_publicdefinitions.h:

    enum LogLevel {
    -    LogLevel_CRITICAL = 0, //these messages stop the program
    -    LogLevel_ERROR,        //everything that is really bad, but not so bad we need to shut down
    -    LogLevel_WARNING,      //everything that *might* be bad
    -    LogLevel_DEBUG,        //output that might help find a problem
    -    LogLevel_INFO,         //informational output, like "starting database version x.y.z"
    -    LogLevel_DEVEL         //developer only output (will not be displayed in release mode)
    -};
  • channel

    Custom text to categorize the message channel (i.e. "Client", "Sound").

    Pass an empty string if unused.

  • logID

    Server connection handler ID to identify the current server connection when using multiple connections.

    Pass 0 if unused.

All strings need to be encoded in UTF-8 format.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h.

Log messages can be printed to stdout, logged to a file logs/ts3client_[date]__[time].log and sent to user-defined callbacks. The log output behaviour is defined when initialzing the client library with ts3client_initClientLib.

Unless user-defined logging is used, program execution will halt on a log message with severity LogLevel_CRITICAL.

User-defined logging

If user-defined logging was enabled when initialzing the Client Lib by passing LogType_USERLOGGING to the usedLogTypes parameter of ts3client_initClientLib, log messages will be sent to the following callback, which allows user customizable logging and handling or critical errors:

void onUserLoggingMessageEvent(logMessage,  
 logLevel,  
 logChannel,  
 logID,  
 logTime,  
 completeLogString); 
const char* logMessage;
int logLevel;
const char* logChannel;
uint64 logID;
const char* logTime;
const char* completeLogString;
 

Most callback parameters reflect the arguments passed to the logMessage function.

  • logMessage

    Actual log message text.

  • logLevel

    Severity of log message, defined by the enum LogLevel. Note that only log messages of a level higher than the one configured with ts3client_setLogVerbosity will appear.

  • logChannel

    Optional custom text to categorize the message channel.

  • logID

    Server connection handler ID identifying the current server connection when using multiple connections.

  • logTime

    String with date and time when the log message occured.

  • completeLogString

    Provides a verbose log message including all previous parameters for convinience.


-

The severity of log messages that are passed to above callback can be configured with: -

unsigned int ts3client_setLogVerbosity(logVerbosity); 
enum LogLevel logVerbosity;
 

-

  • logVerbosity

    Only messages with a log level equal or higher than logVerbosity will be sent to the callback. The default value is LogLevel_DEVEL.

    For example, after calling

    ts3client_setLogVerbosity(LogLevel_ERROR);

    only log messages of level LogLevel_ERROR and LogLevel_CRITICAL will be passed to onUserLoggingMessageEvent.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h.

diff --git a/docs/client_html/ar01s13.html b/docs/client_html/ar01s13.html deleted file mode 100644 index 153a644..0000000 --- a/docs/client_html/ar01s13.html +++ /dev/null @@ -1,9 +0,0 @@ -Using playback and capture modes and devices

Using playback and capture modes and devices

The Client Lib takes care of initializing, using and releasing sound playback and capture devices. Accessing devices is handled by the sound backend shared libraries, found in the soundbackends directory in the SDK. There are different backends available on the supported operating systems: DirectSound and Windows Audio Session API on Windows, Alsa and PulseAudio on Linux, CoreAudio on Mac OS X.

All strings passed to and from the Client Lib have to be encoded in UTF-8 format.

Initializing modes and devices

To initialize a playback and capture device for a TeamSpeak 3 server connection handler, call -

unsigned int ts3client_openPlaybackDevice(serverConnectionHandlerID,  
 modeID,  
 playbackDevice); 
uint64 serverConnectionHandlerID;
const char* modeID;
const char* playbackDevice;
 

-

  • serverConnectionHandlerID

    Connection handler of the server on which you want to initialize the playback device.

  • modeID

    The playback mode to use. Valid modes are returned by ts3client_getDefaultPlayBackMode and ts3client_getPlaybackModeList.

    Passing an empty string will use the default playback mode.

  • playbackDevice

    Valid parameters are: -

    - The string needs to be encoded in UTF-8 format. -

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h. A likely error is ERROR_sound_could_not_open_playback_device if the sound backend fails to find a usable playback device.


-

unsigned int ts3client_openCaptureDevice(serverConnectionHandlerID,  
 modeID,  
 captureDevice); 
uint64 serverConnectionHandlerID;
const char* modeID;
const char* captureDevice;
 
  • serverConnectionHandlerID

    Connection handler of the server on which you want to initialize the capture device.

  • modeID

    The capture mode to use. Valid modes are returned by ts3client_getDefaultCaptureMode and ts3client_getCaptureModeList.

    Passing an empty string will use the default capture mode.

  • captureDevice

    Valid parameters are: -

    -

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h. Likely errors are ERROR_sound_could_not_open_capture_device if the device fails to open or ERROR_sound_handler_has_device if the device is already opened. To avoid this problem, it is recommended to close the capture device before opening it again.

diff --git a/docs/client_html/ar01s13s02.html b/docs/client_html/ar01s13s02.html deleted file mode 100644 index 7d4f4fb..0000000 --- a/docs/client_html/ar01s13s02.html +++ /dev/null @@ -1,69 +0,0 @@ -Querying available modes and devices

Querying available modes and devices

Various playback and capture modes are available: DirectSound on all Windows platforms, Windows Audio Session API for Windows Vista and Windows 7; Alsa and PulseAudio on Linux; CoreAudio on Mac OS X.

Available device names may differ depending on the current mode.

The default playback and capture modes can be queried with: -

unsigned int ts3client_getDefaultPlayBackMode(result); 
char** result;
 

- -

unsigned int ts3client_getDefaultCaptureMode(result); 
char** result;
 

-

  • result

    Address of a variable that receives the default playback or capture mode. The value can be used as parameter for the functions querying and opening devices. Unless the function returns an error, the string must be released using ts3client_freeMemory.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h.


-

All available playback and capture modes can be queried with: -

unsigned int ts3client_getPlaybackModeList(result); 
char*** result;
 

- -

unsigned int ts3client_getCaptureModeList(result); 
char*** result;
 

-

  • result

    Address of a variable that receives a NULL-terminated array of C-strings listing available playback or capture modes.

    Unless the function returns an error, the caller must release each element of the array (the C-string) and finally the complete array with ts3client_freeMemory.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h. In case of an error, the result array is uninitialized and must not be accessed or released.

Example to query all available playback modes:

char** array;
-
-if(ts3client_getPlaybackModeList(&array) == ERROR_ok) {
-    for(int i=0; array[i] != NULL; ++i) {
-        printf("Mode: %s\n", array[i]);
-        ts3client_freeMemory(array[i]);  // Free C-string
-    }
-    ts3client_freeMemory(array);  // Free the array
-}


-

Playback and capture devices available for the given mode can be listed, as well as the current operating systems default. The returned device values can be used to initialize the devices.

To query the default playback and capture device, call -

unsigned int ts3client_getDefaultPlaybackDevice(modeID,  
 result); 
const char* modeID;
char*** result;
 

- -

unsigned int ts3client_getDefaultCaptureDevice(modeID,  
 result); 
const char* modeID;
char*** result;
 

-

  • mode

    Defines the playback/capture mode to use. For different modes there might be different default devices. Valid modes are returned by ts3client_getDefaultPlayBackMode / ts3client_getDefaultCaptureMode and ts3client_getPlaybackModeList / ts3client_getCaptureModeList.

  • result

    Address of a variable that receives an array of two C-strings. The first element contains the device name, the second the device ID.

    Unless the function returns an error, the caller must free the two array elements and the complete array with ts3client_freeMemory.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h. In case of an error, the result array is uninitialized and must not be released.

Example to query the default playback device:

char* defaultMode;
-
-/* Get default playback mode */
-if(ts3client_getDefaultPlayBackMode(&defaultMode) == ERROR_ok) {
-    char** defaultPlaybackDevice;
-
-    /* Get default playback device */
-    if(ts3client_getDefaultPlaybackDevice(defaultMode, &defaultPlaybackDevice) == ERROR_ok) {
-        printf("Default playback device name: %s\n", defaultPlaybackDevice[0]);  /* First element: Device name */
-        printf("Default playback device ID: %s\n",   defaultPlaybackDevice[1]);  /* Second element: Device ID */
-
-        /* Release the two array elements and the array */
-        ts3client_freeMemory(defaultPlaybackDevice[0]);
-        ts3client_freeMemory(defaultPlaybackDevice[1]);
-        ts3client_freeMemory(defaultPlaybackDevice);
-    } else {
-        printf("Failed to get default playback device\n");
-    }
-} else {
-    printf("Failed to get default playback mode\n");
-}


-

To get a list of all available playback and capture devices for the specified mode, call -

unsigned int ts3client_getPlaybackDeviceList(modeID,  
 result); 
const char* modeID;
char**** result;
 

- -

unsigned int ts3client_getCaptureDeviceList(modeID,  
 result); 
const char* modeID;
char**** result;
 

-

  • modeID

    Defines the playback/capture mode to use. For different modes there might be different device lists. Valid modes are returned by ts3client_getDefaultPlayBackMode / ts3client_getDefaultCaptureMode and ts3client_getPlaybackModeList / ts3client_getCaptureModeList.

  • result

    Address of a variable that receives a NULL-terminated array { { char* deviceName, char* deviceID }, { char* deviceName, char* deviceID }, ... , NULL }.

    Unless the function returns an error, the elements of the array and the array itself need to be freed using ts3client_freeMemory.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h. In case of an error, the result array is uninitialized and must not be released.

Example to query all available playback devices:

char* defaultMode;
-
-if(ts3client_getDefaultPlayBackMode(&defaultMode) == ERROR_ok) {
-    char*** array;
-
-    if(ts3client_getPlaybackDeviceList(defaultMode, &array) == ERROR_ok) {
-        for(int i=0; array[i] != NULL; ++i) {
-            printf("Playback device name: %s\n", array[i][0]);  /* First element: Device name */
-            printf("Playback device ID: %s\n",   array[i][1]);  /* Second element: Device ID */
-
-            /* Free element */
-            ts3client_freeMemory(array[i][0]);
-            ts3client_freeMemory(array[i][1]);
-            ts3client_freeMemory(array[i]);
-        }
-        ts3client_freeMemory(array);  /* Free complete array */
-    } else {
-        printf("Error getting playback device list\n");
-    }
-} else {
-    printf("Error getting default playback mode\n");
-}
diff --git a/docs/client_html/ar01s13s03.html b/docs/client_html/ar01s13s03.html deleted file mode 100644 index f1333ac..0000000 --- a/docs/client_html/ar01s13s03.html +++ /dev/null @@ -1,10 +0,0 @@ -Checking current modes and devices

Checking current modes and devices

The currently used playback and capture modes for a given server connection handler can be checked with: -

unsigned int ts3client_getCurrentPlayBackMode(serverConnectionHandlerID,  
 result); 
uint64 serverConnectionHandlerID;
char** result;
 

- -

unsigned int ts3client_getCurrentCaptureMode(serverConnectionHandlerID,  
 result); 
uint64 serverConnectionHandlerID;
char** result;
 

-

  • serverConnectionHandlerID

    ID of the server connection handler for which the current playback or capture modes are queried.

  • result

    Address of a variable that receives the current playback or capture mode. Unless the function returns an error, the string must be released using ts3client_freeMemory.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h.


-

Check the currently used playback and capture devices for a given server connection handler with: -

unsigned int ts3client_getCurrentPlaybackDeviceName(serverConnectionHandlerID,  
 result,  
 isDefault); 
uint64 serverConnectionHandlerID;
char** result;
int* isDefault;
 

- -

unsigned int ts3client_getCurrentCaptureDeviceName(serverConnectionHandlerID,  
 result,  
 isDefault); 
uint64 serverConnectionHandlerID;
char** result;
int* isDefault;
 

-

  • serverConnectionHandlerID

    ID of the server connection handler for which the current playback or capture devices are queried.

  • result

    Address of a variable that receives the current playback or capture device. Unless the function returns an error, the string must be released using ts3client_freeMemory.

  • result

    Address of a variable that receives a flag if this device is the default playback/capture device. If this is not needed, pass NULL instead.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h. If an error has occured, the result string is uninitialized and must not be released.

diff --git a/docs/client_html/ar01s13s04.html b/docs/client_html/ar01s13s04.html deleted file mode 100644 index 9f895c9..0000000 --- a/docs/client_html/ar01s13s04.html +++ /dev/null @@ -1,23 +0,0 @@ -Closing devices

Closing devices

To close the capture and playback devices for a given server connection handler: -

unsigned int ts3client_closeCaptureDevice(serverConnectionHandlerID); 
uint64 serverConnectionHandlerID;
 

- -

unsigned int ts3client_closePlaybackDevice(serverConnectionHandlerID); 
uint64 serverConnectionHandlerID;
 

-

  • serverConnectionHandlerID

    ID of the server connection handler for which the playback or capture device should be closed.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h.


-

ts3client_closePlaybackDevice will not block until all current sounds have finished playing but will shutdown the device immediately, possibly interrupting the still playing sounds. To shutdown the playback device more gracefully, use the following function: -

unsigned int ts3client_initiateGracefulPlaybackShutdown(serverConnectionHandlerID); 
uint64 serverConnectionHandlerID;
 

-

  • serverConnectionHandlerID

    ID of the server connection handler for which the playback or capture device should be shut down.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h.


-

While ts3client_initiateGracefulPlaybackShutdown will not block until all sounds have finished playing, too, it will notify the client when the playback device can be safely closed by sending the callback: -

void onPlaybackShutdownCompleteEvent(serverConnectionHandlerID); 
uint64 serverConnectionHandlerID;
 

-

  • serverConnectionHandlerID

    ID of the server connection handler on which the playback device has been shut down.

Example code to gracefully shutdown the playback devicef:

/* Instead of calling ts3client_closePlaybackDevice() directly */
-if(ts3client_initiateGracefulPlaybackShutdown(currentScHandlerID) != ERROR_ok) {
-    printf("Failed to initiate graceful playback shutdown\n");
-    return;
-}
-
-/* Event notifying the playback device has been shutdown */
-void my_onPlaybackShutdownCompleteEvent(uint64 scHandlerID) {
-    /* Now we can safely close the device */
-    if(ts3client_closePlaybackDevice(scHandlerID) != ERROR_ok) {
-        printf("Error closing playback device\n");
-    }
-}
[Note]Note

Devices are closed automatically when calling ts3client_destroyServerConnectionHandler.

[Note]Note

To change a device, close it first and then reopen it.

diff --git a/docs/client_html/ar01s13s05.html b/docs/client_html/ar01s13s05.html deleted file mode 100644 index b3755a4..0000000 --- a/docs/client_html/ar01s13s05.html +++ /dev/null @@ -1,44 +0,0 @@ -Using custom devices

Using custom devices

Instead of opening existing sound devices that TeamSpeak has detected, you can also use our custom capture and playback mechanism to allow you to override the way in which TeamSpeak does capture and playback. When you have opened a custom capture and playback device you must regularly supply new "captured" sound data via the ts3client_processCustomCaptureData function and retrieve data that should be "played back" via ts3client_acquireCustomPlaybackData. Where exactly this captured sound data comes from and where the playback data goes to is up to you, which allows a lot of cool things to be done with this mechanism.

Implementing own custom devices is for special use cases and entirely optional.

Registering a custom device announces the device ID and name to the Client Lib. Once a custom device has been registered under a device ID, the device can be opened like any standard device with ts3client_openCaptureDevice and ts3client_openPlaybackDevice.

void ts3client_registerCustomDevice(deviceID,  
 deviceDisplayName,  
 capFrequency,  
 capChannels,  
 playFrequency,  
 playChannels); 
const char* deviceID;
const char* deviceDisplayName;
int capFrequency;
int capChannels;
int playFrequency;
int playChannels;
 
  • deviceID

    ID string of the custom device, under which the device can be later accessed.

  • deviceDisplayName

    Displayed name of the custom device. Freely choose a name which identifies your device.

  • capFrequency

    Frequency of the capture device.

  • capChannels

    Number of channels of the capture device. This value depends on if the used codec is a mono or stereo codec.

  • playFrequency

    Frequency of the playback device.

  • playChannels

    Number of channels of the playback device.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h.


-

Unregistering a custom device will automatically close the device:

void ts3client_unregisterCustomDevice(deviceID); 
const char* deviceID;
 
  • deviceID

    ID string of the custom device to unregister. This is the ID under which the device was registered with ts3client_registerCustomDevice.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h.


-

To send the captured data from your device to the Client Lib:

void ts3client_processCustomCaptureData(deviceID,  
 buffer,  
 samples); 
const char* deviceID;
const short* buffer;
int samples;
 
  • deviceID

    ID string of the custom device. This is the ID under which the device was registered with ts3client_registerCustomDevice.

  • buffer

    Capture data buffer containing the data captured by the custom device.

  • samples

    Size of the capture data buffer.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h.


-

Retrieve playback data from the Client Lib:

void ts3client_acquireCustomPlaybackData(deviceID,  
 buffer,  
 samples); 
const char* deviceID;
const short* buffer;
int samples;
 
  • deviceID

    ID string of the custom device. This is the ID under which the device was registered with ts3client_registerCustomDevice.

  • buffer

    Buffer containing the playback data retrieved from the Client Lib.

  • samples

    Size of the playback data buffer.

Returns ERROR_ok if playback data is available or ERROR_sound_no_data if the Client Lib currently has no playback data.

The return value ERROR_sound_no_data can be used for performance optimisation, it means there is currently only silence (nobody is talking, no wave files being played etc.) and instead of returning a buffer full of zeroes it just notifies the user there is currently no data, which allows you to not playback any sound data for that moment, if your API supports that (potentially saving some CPU), or to just fill the sound buffer with zeroes and playback this if your sound API demands you to fill it with something for every given time.


-

Overview on registering and opening a custom device:

/* Register a new custom sound device with specified frequency and number of channels */
-if(ts3client_registerCustomDevice("customWaveDeviceId", "Nice displayable wave device name", captureFrequency, captureChannels, playbackFrequncy, playbackChannels) != ERROR_ok) {
-    printf("Failed to register custom device\n");
-}
-
-/* Open capture device we created earlier */
-if(ts3client_openCaptureDevice(scHandlerID, "custom", "customWaveDeviceId") != ERROR_ok) {
-    printf("Error opening capture device\n");
-}
-
-/* Open playback device we created earlier */
-if(ts3client_openPlaybackDevice(scHandlerID, "custom", "customWaveDeviceId") != ERROR_ok) {
-    printf("Error opening playback device\n");
-}
-
-/* Main loop */
-while(!abort) {
-    /* Fill captureBuffer from your custom device */
-
-    /* Stream your capture data to the client lib */
-	if(ts3client_processCustomCaptureData("customWaveDeviceId", captureBuffer, captureBufferSize) != ERROR_ok) {
-        printf("Failed to process capture data\n");
-    }
-
-    /* Get playback data from the client lib */
-    error = ts3client_acquireCustomPlaybackData("customWaveDeviceId", playbackBuffer, playbackBufferSize);
-    if(error == ERROR_ok) {
-        /* Playback data available, send playbackBuffer to your custom device */
-    } else if(error == ERROR_sound_no_data) {
-        /* Not an error. The client lib has no playback data available. Depending on your custom sound API, either
-           pause playback for performance optimisation or send a buffer of zeros. */
-    } else {
-        printf("Failed to get playback data\n");  /* Error occured */
-    }
-}
-
-/* Unregister the custom device. This automatically close the device. */
-if(ts3client_unregisterCustomDevice("customaveDeviceId") != ERROR_ok) {
-    printf("Failed to unregister custom device\n");
-}
[Note]Note

Further sample code on how to use a custom device can be found in the “client_customdevice” example included in the SDK.

diff --git a/docs/client_html/ar01s13s06.html b/docs/client_html/ar01s13s06.html deleted file mode 100644 index 2f79def..0000000 --- a/docs/client_html/ar01s13s06.html +++ /dev/null @@ -1 +0,0 @@ -Activating the capture device

Activating the capture device

[Note]Note

Using this function is only required when connecting to multiple servers.

When connecting to multiple servers with the same client, the capture device can only be active for one server at the same time. As soon as the client connects to a new server, the Client Lib will deactivate the capture device of the previously active server. When a user wants to talk to that previous server again, the client needs to reactivate the capture device.

unsigned int ts3client_activateCaptureDevice(serverConnectionHandlerID); 
uint64 serverConnectionHandlerID;
 
  • serverConnectionHandlerID

    ID of the server connection handler on which the capture device should be activated.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h.

If the capture device is already active, this function has no effect.

Opening a new capture device will automatically activate it, so calling this function is only necessary with multiple server connections and when reactivating a previously deactivated device.

If the capture device for a given server connection handler has been deactivated by the Client Lib, the flag CLIENT_INPUT_HARDWARE will be set. This can be queried with the function ts3client_getClientSelfVariableAsInt.

diff --git a/docs/client_html/ar01s14.html b/docs/client_html/ar01s14.html deleted file mode 100644 index 54c0f07..0000000 --- a/docs/client_html/ar01s14.html +++ /dev/null @@ -1,3 +0,0 @@ -Sound codecs

Sound codecs

TeamSpeak 3 supports the following sound sampling rates:

  • Speex Narrowband (8 kHz)

  • Speex Wideband (16 kHz)

  • Speex Ultra-Wideband (32 kHz)

  • Celt (Mono, 48kHz)

  • Opus Voice (Mono, 48khz)

  • Opus Music (Stereo, 48khz)

[Note]Note

Opus Voice is recommended for voice transmission. Speex and Celt codecs may be removed in future versions of this SDK.


-

Bandwidth usage generally depends on the used codec and the encoders quality setting.

Estimated bitrates (bps) for codecs per quality:

QualityNarrowbandWidebandUltra-WidebandCeltOpus VoiceOpus Music
02,1503,9504,15032,0004,0967,200
13,9505,7507,55032,0008,19214,400
25,9507,7509,55040,00012,28821,600
38,0009,80011,60040,00016,38428,800
48,00012,80014,60040,00020,48036,000
511,00016,80018,60048,00024,57643,200
611,00020,60022,40048,00028,67250,400
715,00023,80025,60048,00032,76857,600
815,00027,80029,60048,00036,86464,800
918,20034,40036,20064,00040,96072,000
1024,60042,40044,20096,00045,05679,200

Change the quality to find a good middle between voice quality and bandwidth usage. Overall the Opus codec delivers the best quality per used bandwidth.

Users need to use the same codec when talking to each others. The smallest unit of participants using the same codec is a channel. Different channels on the same TeamSpeak 3 server can use different codecs. The channel codec should be customizable by the users to allow for flexibility concerning bandwidth vs. quality concerns.

The codec can be set or changed for a given channel using the function ts3client_setChannelVariableAsInt by passing CHANNEL_CODEC for the properties flag:

ts3client_setChannelVariableAsInt(scHandlerID, channelID, CHANNEL_CODEC, codec);

Available values for CHANNEL_CODEC are: -

  • 0 - Speex Narrowband)

  • 1 - Speex Wideband

  • 2 - Speex Ultra-Wideband

  • 3 - Celt

  • 4 - Opus Voice

  • 5 - Opus Music

For details on using the function ts3client_setChannelVariableAsInt see the appropriate section on changing channel data.

diff --git a/docs/client_html/ar01s15.html b/docs/client_html/ar01s15.html deleted file mode 100644 index d301d47..0000000 --- a/docs/client_html/ar01s15.html +++ /dev/null @@ -1,13 +0,0 @@ -Encoder options

Encoder options

Speech quality and bandwidth usage depend on the used Speex encoder. As Speex is a lossy code, the quality value controls the balance between voice quality and network traffic. Valid quality values range from 0 to 10, default is 7. The encoding quality can be configured for each channel using the CHANNEL_CODEC_QUALITY property. The currently used channel codec, codec quality and estimated average used bitrate (without overhead) can be queried with ts3client_getEncodeConfigValue.

[Note]Note

Encoder options are tied to a capture device, so querying the values only makes sense after a device has been opened.

All strings passed from the Client Lib are encoded in UTF-8 format.

unsigned int ts3client_getEncodeConfigValue(serverConnectionHandlerID,  
 ident,  
 result); 
uint64 serverConnectionHandlerID;
const char* ident;
char** result;
 
  • serverConnectionHandlerID

    Server connection handler ID

  • ident

    String containing the queried encoder option. Available values are “name”, “quality” and “bitrate”.

  • result

    Address of a variable that receives the result string. Unless an error occured, the result string must be released using ts3client_freeMemory.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h. If an error has occured, the result string is uninitialized and must not be released.

To adjust the channel codec quality to a value of 5, you would call: -

ts3client_setChannelVariableAsInt(scHandlerID, channelID, CHANNEL_CODEC_QUALITY, 5);

See the chapter about channel information for details about how to set channel variables.

To query information about the current channel quality, do: -

char *name, *quality, *bitrate;
-ts3client_getEncodeConfigValue(scHandlerID, "name", &name);
-ts3client_getEncodeConfigValue(scHandlerID, "quality", &quality);
-ts3client_getEncodeConfigValue(scHandlerID, "bitrate", &bitrate);
-
-printf("Name = %s, quality = %s, bitrate = %s\n", name, quality, bitrate);
-
-ts3client_freeMemory(name);
-ts3client_freeMemory(quality);
-ts3client_freeMemory(bitrate);

-

diff --git a/docs/client_html/ar01s16.html b/docs/client_html/ar01s16.html deleted file mode 100644 index 299b2a9..0000000 --- a/docs/client_html/ar01s16.html +++ /dev/null @@ -1,9 +0,0 @@ -Preprocessor options

Preprocessor options

Sound input is preprocessed by the Client Lib before the data is encoded and sent to the TeamSpeak 3 server. The preprocessor is responsible for noise suppression, automatic gain control (AGC) and voice activity detection (VAD).

The preprocessor can be controlled by setting various preprocessor flags. These flags are unique to each server connection.

[Note]Note

Preprocessor flags are tied to a capture device, so changing the values only makes sense after a device has been opened.

Preprocessor flags can be queried using -

unsigned int ts3client_getPreProcessorConfigValue(serverConnectionHandlerID,  
 ident,  
 result); 
uint64 serverConnectionHandlerID;
const char* ident;
char** result;
 

-

  • serverConnectionHandlerID

    The server connection handler ID.

  • ident

    The proprocessor flag to be queried. The following keys are available:

    • name

      Type of the used preprocessor. Currently this returns a constant string “Speex preprocessor”.

    • denoise

      Check if noise suppression is enabled. Returns “true” or “false”.

    • vad

      Check if Voice Activity Detection is enabled. Returns “true” or “false”.

    • voiceactivation_level

      Checks the Voice Activity Detection level in decibel. Returns a string with a numeric value, convert this to an integer.

    • vad_extrabuffersize

      Checks Voice Activity Detection extrabuffer size. Returns a string with a numeric value.

    • agc

      Check if Automatic Gain Control is enabled. Returns “true” or “false”.

    • agc_level

      Checks AGC level. Returns a string with a numeric value.

    • agc_max_gain

      Checks AGC max gain. Returns a string with a numeric value.

    • echo_canceling

      Checks if echo canceling is enabled. Returns a string with a boolean value.

  • result

    Address of a variable that receives the result as a string encoded in UTF-8 format. If no error occured the returned string must be released using ts3client_freeMemory.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h. If an error has occured, the result string is uninitialized and must not be released.


-

To configure the proprocessor use -

unsigned int ts3client_setPreProcessorConfigValue(serverConnectionHandlerID,  
 ident,  
 value); 
uint64 serverConnectionHandlerID;
const char* ident;
const char* value;
 

-

  • serverConnectionHandlerID

    The server connection handler ID.

  • ident

    The preprocessor flag to be configure. The following keys can be changed:

    • denoise

      Enable or disable noise suppression. Value can be “true” or “false”. Enabled by default.

    • vad

      Enable or disable Voice Activity Detection. Value can be “true” or “false”. Enabled by default.

    • voiceactivation_level

      Voice Activity Detection level in decibel. Numeric value converted to string. A high voice activation level means you have to speak louder into the microphone in order to start transmitting.

      Reasonable values range from -50 to 50. Default is 0.

      To adjust the VAD level in your client, you can call ts3client_getPreProcessorInfoValueFloat with the identifier “decibel_last_period” over a period of time to query the current voice input level.

    • vad_extrabuffersize

      Voice Activity Detection extrabuffer size. Numeric value converted to string. Should be “0” to “8”, defaults to “2”. Lower value means faster transmission, higher value means better VAD quality but higher latency.

    • agc

      Enable or disable Automatic Gain Control. Value can be “true” or “false”. Enabled by default.

    • agc_level

      AGC level. Numeric value converted to string. Default is “16000”.

    • agc_max_gain

      AGC max gain. Numeric value converted to string. Default is “30”.

    • echo_canceling

      Enable echo canceling. Boolean value converted to string. Default is “false”.

  • value

    String value to be set for the given preprocessor identifier. In case of on/off switches, use “true” or “false”.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h.

[Note]Note

It is not necessary to change all those values. The default values are reasonable. “voiceactivation_level” is often the only value that needs to be adjusted.


-

The following function retrieves preprocessor information as a floating-point variable instead of a string: -

unsigned int ts3client_getPreProcessorInfoValueFloat(serverConnectionHandlerID,  
 ident,  
 result); 
uint64 serverConnectionHandlerID;
const char* ident;
float* result;
 

-

  • serverConnectionHandlerID

    The server connection handler ID.

  • ident

    The proprocessor flag to be queried. Currently the only valid identifier for this function is “decibel_last_period”, which can be used to adjust the VAD level as described above.

  • result

    Address of a variable that receives the result value as a float.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h.

diff --git a/docs/client_html/ar01s17.html b/docs/client_html/ar01s17.html deleted file mode 100644 index d1b39a3..0000000 --- a/docs/client_html/ar01s17.html +++ /dev/null @@ -1,32 +0,0 @@ -Playback options

Playback options

Sound output can be configured using playback options. Currently the output value can be adjusted.

Playback options can be queried: -

unsigned int ts3client_getPlaybackConfigValueAsFloat(serverConnectionHandlerID,  
 ident,  
 result); 
uint64 serverConnectionHandlerID;
const char* ident;
float* result;
 

-

  • serverConnectionHandlerID

    ID of the server connection handler for which the playback option is queried.

  • ident

    Identifier of the parameter to be configured. Possible values are: -

    • volume_modifier

      Modify the voice volume of other speakers. Value is in decibel, so 0 is no modification, negative values make the signal quieter and values greater than zero boost the signal louder than it is. Be careful with high positive values, as you can really cause bad audio quality due to clipping. The maximum possible Value is 30.

      Zero and all negative values cannot cause clipping and distortion, and are preferred for optimal audio quality. Values greater than zero and less than +6 dB might cause moderate clipping and distortion, but should still be within acceptable bounds. Values greater than +6 dB will cause clipping and distortion that will negatively affect your audio quality. It is advised to choose lower values. Generally we recommend to not allow values higher than 15 db.

    • volume_factor_wave

      Adjust the volume of wave files played by ts3client_playWaveFile and ts3client_playWaveFileHandle. The value is a float defining the volume reduction in decibel. Reasonable values range from “-40.0” (very silent) to “0.0” (loudest).

  • result

    Address of a variable that receives the playback configuration value as floating-point number.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h.


-

To change playback options, call: -

unsigned int ts3client_setPlaybackConfigValue(serverConnectionHandlerID,  
 ident,  
 value); 
uint64 serverConnectionHandlerID;
const char* ident;
const char* value;
 

-

  • serverConnectionHandlerID

    ID of the server connection handler for which the playback option is queried.

  • ident

    Identifier of the parameter to be configured. The values are the same as in ts3client_getPlaybackConfigValueAsFloat above.

  • value

    String with the value to set the option to, encoded in UTF-8 format.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h.

[Note]Note

Playback options are tied to a playback device, so changing the values only makes sense after a device has been opened.

Example code:

unsigned int error;
-float value;
-
-if((error = ts3client_setPlaybackConfigValue(scHandlerID, "volume_modifier", "5.5")) != ERROR_ok) {
-    printf("Error setting playback config value: %d\n", error);
-    return;
-}
-
-if((error = ts3client_getPlaybackConfigValueAsFloat(scHandlerID, "volume_modifier", &value)) != ERROR_ok) {
-    printf("Error getting playback config value: %d\n", error);
-    return;
-}
-
-printf("Volume modifier playback option: %f\n", value);


-

In addition to changing the global voice volume modifier of all speakers by changing the “volume_modifier” parameter, voice volume of individual clients can be adjusted with: -

unsigned int ts3client_setClientVolumeModifier(serverConnectionHandlerID,  
 clientID,  
 value); 
uint64 serverConnectionHandlerID;
anyID clientID;
float value;
 

-

  • serverConnectionHandlerID

    ID of the server connection handler on which the client volume modifier should be adjusted.

  • clientID

    ID of the client whose volume modifier should be adjusted.

  • value

    The new client volume modifier value as float.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h.

When calculating the volume for individual clients, both the global and client volume modifiers will be taken into account.

Client volume modifiers are valid as long as the specified client is visible. Once the client leaves visibility by joining an unsubscribed channel or disconnecting from the server, the client volume modifier will be lost. When the client enters visibility again, the modifier has to be set again by calling this function.

Example:

-unsigned int error;
-anyID clientID = 123;
-float value = 10.0f;
-
-if((error = ts3client_setClientVolumeModifier(scHandlerID, clientID, value)) != ERROR_ok) {
-    printf("Error setting client volume modifier: %d\n", error);
-	return;
-}
-
diff --git a/docs/client_html/ar01s18.html b/docs/client_html/ar01s18.html deleted file mode 100644 index d08c01d..0000000 --- a/docs/client_html/ar01s18.html +++ /dev/null @@ -1,19 +0,0 @@ -Accessing the voice buffer

Accessing the voice buffer

The TeamSpeak Client Lib allows users to access the raw playback and capture voice data and even modify it, for example to add effects to the voice. These callbacks are also used by the TeamSpeak client for the voice recording feature.

Using these low-level callbacks is not required and should be reserved for specific needs. Most SDK applications won't need to implement these callbacks.


-

The following event is called when a voice packet from a client (not own client) is decoded and about to be played over your sound device, but before it is 3D positioned and mixed with other sounds. You can use this function to alter the voice data (for example when you want to do effects on it) or to simply get voice data. The TeamSpeak client uses this function to record sessions.

void onEditPlaybackVoiceDataEvent(serverConnectionHandlerID,  
 clientID,  
 samples,  
 sampleCount,  
 channels); 
uint64 serverConnectionHandlerID;
anyID clientID;
short* samples;
int sampleCount;
int channels;
 
  • serverConnectionHandlerID

    ID of the server connection handler from which the voice data was sent.

  • clientID

    ID of the client whose voice data is received.

  • samples

    Pointer to the voice data (signed 16 bit @ 48KHz).

  • sampleCount

    Number of samples the "samples" variable points to.

  • channels

    Number of channels in the sound data.


-

The following event is called when a voice packet from a client (not own client) is decoded and 3D positioned and about to be played over your sound device, but before it is mixed with other sounds. You can use this function to alter/get the voice data after 3D positioning.

void onEditPostProcessVoiceDataEvent(serverConnectionHandlerID,  
 clientID,  
 samples,  
 sampleCount,  
 channels,  
 channelSpeakerArray,  
 channelFillMask); 
uint64 serverConnectionHandlerID;
anyID clientID;
short* samples;
int sampleCount;
int channels;
const unsigned int* channelSpeakerArray;
unsigned int* channelFillMask;
 
  • serverConnectionHandlerID

    ID of the server connection handler from which the voice data was sent.

  • clientID

    ID of the client whose voice data is received.

  • samples

    Pointer to the voice data (signed 16 bit @ 48KHz).

  • sampleCount

    Number of samples the "samples" variable points to.

  • channels

    Number of channels in the sound data.

  • channelSpeakerArray

    An array with channels entries, defining the speaker each channels represents. The speaker values can be found in the SPEAKER_* defines within public_definitions.h.

    For example for stereo (channels = 2), the array might look liks this: -

    channelSpeakerArray[0] = SPEAKER_FRONT_LEFT
    -channelSpeakerArray[1] = SPEAKER_FRONT_RIGHT
  • channelFillMask

    A pointer to a bit-mask defining which channels are filled. For efficiency reasons, not all channels need to have actual sound data in it. So before this data is used, use this bit-mask to check if the channel is actually filled. If you decide to add data to a channel that is empty, set the bit for this channel in this mask.

For example, this callback reports:

channels = 6
-channelSpeakerArray[0] = SPEAKER_FRONT_CENTER
-channelSpeakerArray[1] = SPEAKER_LOW_FREQUENCY
-channelSpeakerArray[2] = SPEAKER_BACK_LEFT
-channelSpeakerArray[3] = SPEAKER_BACK_RIGHT
-channelSpeakerArray[4] = SPEAKER_SIDE_LEFT
-channelSpeakerArray[5] = SPEAKER_SIDE_RIGHT  // Quite unusual setup
-*channelFillMask = 1

This means "samples" points to 6 channel data, but only the SPEAKER_FRONT_CENTER channel has data, the other channels are undefined (not necessarily 0, but undefined).

So for the first sample, samples[0] has data and samples[1], samples[2], samples[3], samples[4] and samples[5] are undefined.

If you want to add SPEAKER_BACK_RIGHT channel data you would do something like:

*channelFillMask |= 1<<3;  // SPEAKER_BACK_RIGHT is the 4th channel (is index 3) according to *channelSpeakerArray.
-for(int i=0; i<sampleCount; ++i){
-    samples[3 + (i*channels) ] = getChannelSoundData(SPEAKER_BACK_RIGHT, i); 
-}


-

The following event is called when all sounds that are about to be played back for this server connection are mixed. This is the last chance to alter/get sound.

You can use this function to alter/get the sound data before playback.

void onEditMixedPlaybackVoiceDataEvent(serverConnectionHandlerID,  
 samples,  
 sampleCount,  
 channels,  
 channelSpeakerArray,  
 channelFillMask); 
uint64 serverConnectionHandlerID;
short* samples;
int sampleCount;
int channels;
const unsigned int* channelSpeakerArray;
unsigned int* channelFillMask;
 
  • serverConnectionHandlerID

    ID of the server connection handler from which the voice data was sent.

  • samples

    Pointer to the voice data (signed 16 bit @ 48KHz).

  • sampleCount

    Number of samples the "samples" variable points to.

  • channels

    Number of channels in the sound data.

  • channelSpeakerArray

    An array with channels entries, defining the speaker each channels represents. The speaker values can be found in the SPEAKER_* defines within public_definitions.h.

    For example for stereo (channels = 2), the array might look liks this: -

    channelSpeakerArray[0] = SPEAKER_FRONT_LEFT
    -channelSpeakerArray[1] = SPEAKER_FRONT_RIGHT
  • channelFillMask

    A pointer to a bit-mask of which channels are filled. For efficiency reasons, not all channels need to have actual sound data in it. So before this data is used, use this bit-mask to check if the channel is actually filled. If you decide to add data to a channel that is empty, set the bit for this channel in this mask.


-

The following event is called after sound is recorded from the sound device and is preprocessed. This event can be used to get/alter recorded sound. Also it can be determined if this sound will be send, or muted. This is used by the TeamSpeak client to record sessions.

If the sound data will be send, (*edited | 2) is true. If the sound data is changed, set bit 1 (*edited |=1). If the sound should not be send, clear bit 2. (*edited &= ~2)

void onEditCapturedVoiceDataEvent(serverConnectionHandlerID,  
 samples,  
 sampleCount,  
 channels,  
 edited); 
uint64 serverConnectionHandlerID;
short* samples;
int sampleCount;
int channels;
int* edited;
 
  • serverConnectionHandlerID

    ID of the server connection handler from which the voice data was sent.

  • samples

    Pointer to the voice data (signed 16 bit @ 48KHz).

  • sampleCount

    Number of samples the "samples" variable points to.

  • channels

    Number of channels in the sound data.

  • edited

    When called, bit 2 indicates if the sound is about to be sent to the server.

    On return, set bit 1 if the sound data was changed.

Voice recording

When using the above callbacks to record voice, you should notify the server when recording starts or stops with the following functions:

unsigned int ts3client_startVoiceRecording(serverConnectionHandlerID); 
uint64 serverConnectionHandlerID;
 
unsigned int ts3client_stopVoiceRecording(serverConnectionHandlerID); 
uint64 serverConnectionHandlerID;
 
  • serverConnectionHandlerID

    ID of the server connection handler on which voice recording should be started or stopped.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h.

diff --git a/docs/client_html/ar01s19.html b/docs/client_html/ar01s19.html deleted file mode 100644 index 494d725..0000000 --- a/docs/client_html/ar01s19.html +++ /dev/null @@ -1,13 +0,0 @@ -Playing wave files

Playing wave files

The TeamSpeak Client Lib offers support to play wave files from the local harddisk.

To play a local wave file, call -

unsigned int ts3client_playWaveFile(serverConnectionHandlerID,  
 path); 
anyID serverConnectionHandlerID;
const char* path;
 

-

  • serverConnectionHandlerID

    ID of the server connection handler defining which playback device is to be used to play the sound file.

  • path

    Local filepath of the sound file in WAV format to be played, encoded in UTF-8.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h.

This is the simple version of playing a sound file. It's a fire-and-forget mechanism, this function will not block.


-

The more complex version is to play an optionally looping sound and obtain a handle, which can be used to pause, unpause and stop the loop. -

unsigned int ts3client_playWaveFileHandle(serverConnectionHandlerID,  
 path,  
 loop,  
 waveHandle); 
anyID serverConnectionHandlerID;
const char* path;
int loop;
uint64* waveHandle;
 

-

  • serverConnectionHandlerID

    ID of the server connection handler defining which playback device is to be used to play the sound file.

  • path

    Local filepath of the sound file in WAV format to be played, encoded in UTF-8.

  • loop

    If set to 1, the sound will be looping until the handle is paused or closed.

  • waveHandle

    Memory address of a variable in which the handle is written. Use this handle to call ts3client_pauseWaveFileHandle and ts3client_closeWaveFileHandle.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h. If an error occured, waveHandle is uninitialized and must not be used.


-

Using the handle obtained by ts3client_playWaveFileHandle, sounds can be paused and unpaused with -

unsigned int ts3client_pauseWaveFileHandle(serverConnectionHandlerID,  
 waveHandle,  
 pause); 
anyID serverConnectionHandlerID;
uint64 waveHandle;
int pause;
 

-

  • serverConnectionHandlerID

    ID of the server connection handler defining which playback device is to be used to play the sound file.

  • waveHandle

    Wave handle obtained by ts3client_playWaveFileHandle.

  • pause

    If set to 1, the sound will be paused. Set to 0 to unpause.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h.


-

Using the handle obtained by ts3client_playWaveFileHandle, sounds can be closed with -

unsigned int ts3client_closeWaveFileHandle(serverConnectionHandlerID,  
 waveHandle); 
anyID serverConnectionHandlerID;
uint64 waveHandle;
 

-

  • serverConnectionHandlerID

    ID of the server connection handler defining which playback device is to be used to play the sound file.

  • waveHandle

    Wave handle obtained by ts3client_playWaveFileHandle.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h.


-

diff --git a/docs/client_html/ar01s20.html b/docs/client_html/ar01s20.html deleted file mode 100644 index 195c31e..0000000 --- a/docs/client_html/ar01s20.html +++ /dev/null @@ -1,16 +0,0 @@ -3D Sound

3D Sound

TeamSpeak 3 supports 3D sound to assign each speaker a unique position in 3D space. Provided are functions to modify the 3D position, velocity and orientation of own and foreign clients.

Generally the struct TS3_VECTOR describes a vector in 3D space:

typedef struct {
-    float x;        /* X coordinate in 3D space. */
-    float y;        /* Y coordinate in 3D space. */
-    float z;        /* Z coordinate in 3D space. */
-} TS3_VECTOR;

To set the position, velocity and orientation of the own client in 3D space, call: -

unsigned int ts3client_systemset3DListenerAttributes(serverConnectionHandlerID,  
 position,  
 forward,  
 up); 
uint64 serverConnectionHandlerID;
const TS3_VECTOR* position;
const TS3_VECTOR* forward;
const TS3_VECTOR* up;
 

-

  • serverConnectionHandlerID

    ID of the server connection handler on which the 3D sound listener attributes are to be set.

  • position

    3D position of the own client.

    If passing NULL, the parameter is ignored and the value not updated.

  • forward

    Forward orientation of the listener. The vector must be of unit length and perpendicular to the up vector.

    If passing NULL, the parameter is ignored and the value not updated.

  • up

    Upward orientation of the listener. The vector must be of unit length and perpendicular to the forward vector.

    If passing NULL, the parameter is ignored and the value not updated.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h.


-

To adjust 3D sound system settings use: -

unsigned int ts3client_systemset3DSettings(serverConnectionHandlerID,  
 distanceFactor,  
 rolloffScale); 
uint64 serverConnectionHandlerID;
float distanceFactor;
float rolloffScale;
 

-

  • serverConnectionHandlerID

    ID of the server connection handler on which the 3D sound system settings are to be adjusted.

  • distanceFactor

    Relative distance factor. Default is 1.0 = 1 meter

  • rolloffScale

    Scaling factor for 3D sound rolloff. Defines how fast sound volume will attenuate. As higher the value, as faster the sound is toned with increasing distance.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h.


-

To adjust a clients position and velocity in 3D space, call: -

unsigned int ts3client_channelset3DAttributes(serverConnectionHandlerID,  
 clientID,  
 position); 
uint64 serverConnectionHandlerID;
anyID clientID;
const TS3_VECTOR* position;
 

-

  • serverConnectionHandlerID

    ID of the server connection handler on which the 3D sound channel attributes are to be adjusted.

  • clientID

    ID of the client to adjust.

  • position

    Vector specifying the position of the given client in 3D space.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h.


-

The following event is called to calculate volume attenuation for distance in 3D positioning of clients.

void onCustom3dRolloffCalculationClientEvent(serverConnectionHandlerID,  
 clientID,  
 distance,  
 volume); 
uint64 serverConnectionHandlerID;
anyID clientID;
float distance;
float* volume;
 
  • serverConnectionHandlerID

    ID of the server connection handler on which the volume attenuation calculation occured.

  • clientID

    ID of the client which is being 3D positioned.

  • distance

    The distance between the listener and the client.

  • volume

    The volume which the Client Lib calculated. This can be changed in this callback.


-

The following event is called to calculate volume attenuation for distance in 3D positioning of a wave file that was opened previously with ts3client_playWaveFileHandle.

void onCustom3dRolloffCalculationWaveEvent(serverConnectionHandlerID,  
 waveHandle,  
 distance,  
 volume); 
uint64 serverConnectionHandlerID;
uint64 waveHandle;
float distance;
float* volume;
 
  • serverConnectionHandlerID

    ID of the server connection handler on which the volume attenuation calculation occured.

  • waveHandle

    Handle for the playing wave file, returned by ts3client_playWaveFileHandle.

  • distance

    The distance between the listener and the client.

  • volume

    The volume which the Client Lib calculated. This can be changed in this callback.


-

This method is used to 3D position a wave file that was opened previously with ts3client_playWaveFileHandle.

unsigned int ts3client_set3DWaveAttributes(serverConnectionHandlerID,  
 waveHandle,  
 position); 
uint64 serverConnectionHandlerID;
uint64 waveHandle;
const TS3_VECTOR* position;
 
  • serverConnectionHandlerID

    ID of the server connection handler on which the volume attenuation calculation occured.

  • waveHandle

    Handle for the playing wave file, returned by ts3client_playWaveFileHandle.

  • position

    The 3D position of the sound.

  • volume

    The volume which the Client Lib calculated. This can be changed in this callback.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h.

diff --git a/docs/client_html/ar01s21.html b/docs/client_html/ar01s21.html deleted file mode 100644 index 4d89ab6..0000000 --- a/docs/client_html/ar01s21.html +++ /dev/null @@ -1,41 +0,0 @@ -Query available servers, channels and clients

Query available servers, channels and clients

A client can connect to multiple servers. To list all currently existing server connection handlers, call: -

unsigned int ts3client_getServerConnectionHandlerList(result); 
uint64** result;
 

-

  • result

    Address of a variable that receives a NULL-termianted array of all currently existing server connection handler IDs. Unless an error occurs, the array must be released using ts3client_freeMemory.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h. If an error has occured, the result array is uninitialized and must not be released.


-

A list of all channels on the specified virtual server can be queried with: -

unsigned int ts3client_getChannelList(serverConnectionHandlerID,  
 result); 
uint64 serverConnectionHandlerID;
uint64** result;
 

-

  • serverConnectionHandlerID

    ID of the server connection handler for which the list of channels is requested.

  • result

    Address of a variable that receives a NULL-termianted array of channel IDs. Unless an error occurs, the array must be released using ts3client_freeMemory.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h. If an error has occured, the result array is uninitialized and must not be released.


-

To get a list of all currently visible clients on the specified virtual server: -

unsigned intts3client_getClientList(serverConnectionHandlerID,  
 result); 
uint64 serverConnectionHandlerID;
anyID** result;
 

-

  • serverConnectionHandlerID

    ID of the server connection handler for which the list of clients is requested.

  • result

    Address of a variable that receives a NULL-termianted array of client IDs. Unless an error occurs, the array must be released using ts3client_freeMemory.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h. If an error has occured, the result array is uninitialized and must not be released.


-

To get a list of all clients in the specified channel if the channel is currently subscribed: -

unsigned int ts3client_getChannelClientList(serverConnectionHandlerID,  
 channelID,  
 result); 
uint64 serverConnectionHandlerID;
uint64 channelID;
anyID** result;
 

-

  • serverConnectionHandlerID

    ID of the server connection handler for which the list of clients within the given channel is requested.

  • channelID

    ID of the channel whose client list is requested.

  • result

    Address of a variable that receives a NULL-termianted array of client IDs. Unless an error occurs, the array must be released using ts3client_freeMemory.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h. If an error has occured, the result array is uninitialized and must not be released.


-

To query the channel ID the specified client has currently joined: -

unsigned int ts3client_getChannelOfClient(serverConnectionHandlerID,  
 clientID,  
 result); 
uint64 serverConnectionHandlerID;
anyID clientID;
uint64* result;
 

-

  • serverConnectionHandlerID

    ID of the server connection handler for which the channel ID is requested.

  • clientID

    ID of the client whose channel ID is requested.

  • result

    Address of a variable that receives the ID of the channel the specified client has currently joined.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h.


-

To get the parent channel of a given channel: -

unsigned int ts3client_getParentChannelOfChannel(serverConnectionHandlerID,  
 channelID,  
 result); 
uint64 serverConnectionHandlerID;
uint64 channelID;
uint64* result;
 

-

  • serverConnectionHandlerID

    ID of the server connection handler for which the parent channel of the specified channel is requested.

  • channelID

    ID of the channel whose parent channel ID is requested.

  • result

    Address of a variable that receives the ID of the parent channel of the specified channel.

    If the specified channel has no parent channel, result will be set to the reserved channel ID 0.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h.


-

Example code to print a list of all channels on a virtual server:

uint64* channels;
-
-if(ts3client_getChannelList(serverID, &channels) == ERROR_ok) {
-    for(int i=0; channels[i] != NULL; i++) {
-        printf("Channel ID: %u\n", channels[i]);
-    }
-    ts3client_freeMemory(channels);
-}

To print all visible clients:

anyID* clients;
-
-if(ts3client_getClientList(scHandlerID, &clients) == ERROR_ok) {
-    for(int i=0; clients[i] != NULL; i++) {
-        printf("Client ID: %u\n", clients[i]);
-    }
-    ts3client_freeMemory(clients);
-}

Example to print all clients who are member of channel with ID 123:

uint64 channelID = 123;  /* Channel ID in this example */
-anyID *clients;
-
-if(ts3client_getChannelClientList(scHandlerID, channelID) == ERROR_ok) {
-    for(int i=0; clients[i] != NULL; i++) {
-        printf("Client ID: %u\n", clients[i]);
-    }
-    ts3client_freeMemory(clients);
-}
diff --git a/docs/client_html/ar01s22.html b/docs/client_html/ar01s22.html deleted file mode 100644 index ac7dcef..0000000 --- a/docs/client_html/ar01s22.html +++ /dev/null @@ -1,143 +0,0 @@ -Retrieve and store information

Retrieve and store information

The Client Lib remembers a lot of information which have been passed through previously. The data is available to be queried by a client for convinience, so the interface code doesn't need to store the same information as well. The client can in many cases also modify the stored information for further processing by the server.

All strings passed to and from the Client Lib need to be encoded in UTF-8 format.

Client information

Information related to own client

Once connection to a TeamSpeak 3 server has been established, a unique client ID is assigned by the server. This ID can be queried with -

unsigned int ts3client_getClientID(serverConnectionHandlerID,  
 result); 
uint64 serverConnectionHandlerID;
anyID* result;
 

-

  • serverConnectionHandlerID

    ID of the server connection handler on which we are querying the own client ID.

  • result

    Address of a variable that receives the client ID. Client IDs start with the value 1.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h.


-

Various information related about the own client can be checked with:

- -

unsigned int ts3client_getClientSelfVariableAsInt(serverConnectionHandlerID,  
 flag,  
 result); 
uint64 serverConnectionHandlerID;
ClientProperties flag;
int* result;
 

- -

-

unsigned int ts3client_getClientSelfVariableAsString(serverConnectionHandlerID,  
 flag,  
 result); 
uint64 serverConnectionHandlerID;
ClientProperties flag;
char** result;
 

- -

  • serverConnectionHandlerID

    ID of the server connection handler on which the information for the own client is requested.

  • flag

    Client propery to query, see below.

  • result

    Address of a variable which receives the result value as int or string, depending on which function is used. In case of a string, memory must be released using ts3client_freeMemory, unless an error occured.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h. For the string version: If an error has occured, the result string is uninitialized and must not be released.

The parameter flag specifies the type of queried information. It is defined by the enum ClientProperties:

enum ClientProperties {
-  CLIENT_UNIQUE_IDENTIFIER = 0,   //automatically up-to-date for any client "in view", can be used
-                                  //to identify this particular client installation
-  CLIENT_NICKNAME,                //automatically up-to-date for any client "in view"
-  CLIENT_VERSION,                 //for other clients than ourself, this needs to be requested
-                                  //(=> requestClientVariables)
-  CLIENT_PLATFORM,                //for other clients than ourself, this needs to be requested
-                                  //(=> requestClientVariables)
-  CLIENT_FLAG_TALKING,            //automatically up-to-date for any client that can be heard
-                                  //(in room / whisper)
-  CLIENT_INPUT_MUTED,             //automatically up-to-date for any client "in view", this clients
-                                  //microphone mute status
-  CLIENT_OUTPUT_MUTED,            //automatically up-to-date for any client "in view", this clients
-                                  //headphones/speakers mute status
-  CLIENT_OUTPUTONLY_MUTED         //automatically up-to-date for any client "in view", this clients
-                                  //headphones/speakers only mute status
-  CLIENT_INPUT_HARDWARE,          //automatically up-to-date for any client "in view", this clients
-                                  //microphone hardware status (is the capture device opened?)
-  CLIENT_OUTPUT_HARDWARE,         //automatically up-to-date for any client "in view", this clients
-                                  //headphone/speakers hardware status (is the playback device opened?)
-  CLIENT_INPUT_DEACTIVATED,       //only usable for ourself, not propagated to the network
-  CLIENT_IDLE_TIME,               //internal use
-  CLIENT_DEFAULT_CHANNEL,         //only usable for ourself, the default channel we used to connect
-                                  //on our last connection attempt
-  CLIENT_DEFAULT_CHANNEL_PASSWORD,//internal use
-  CLIENT_SERVER_PASSWORD,         //internal use
-  CLIENT_META_DATA,               //automatically up-to-date for any client "in view", not used by
-                                  //TeamSpeak, free storage for sdk users
-  CLIENT_IS_MUTED,                //only make sense on the client side locally, "1" if this client is
-                                  //currently muted by us, "0" if he is not
-  CLIENT_IS_RECORDING,            //automatically up-to-date for any client "in view"
-  CLIENT_VOLUME_MODIFICATOR,      //internal use
-  CLIENT_VERSION_SIGN,			  //internal use
-  CLIENT_SECURITY_HASH,           //SDK only: Hash is provided by an outside source. A channel will
-                                  //use the security salt + other client data to calculate a hash,
-								  //which must be the same as the one provided here.
-  CLIENT_ENCRYPTION_CIPHERS,      //SDK only: list of available ciphers send to the server 
-  CLIENT_ENDMARKER,
-};
  • CLIENT_UNIQUE_IDENTIFIER

    String: Unique ID for this client. Stays the same after restarting the application, so you can use this to identify individual users.

  • CLIENT_NICKNAME

    Nickname used by the client. This value is always automatically updated for visible clients.

  • CLIENT_VERSION

    Application version used by this client. Needs to be requested with ts3client_requestClientVariables unless called on own client.

  • CLIENT_PLATFORM

    Operating system used by this client. Needs to be requested with ts3client_requestClientVariables unless called on own client.

  • CLIENT_FLAG_TALKING

    Set when the client is currently sending voice data to the server. Always available for visible clients.

    Note: You should query this flag for the own client using ts3client_getClientSelfVariableAsInt.

  • CLIENT_INPUT_MUTED

    Indicates the mute status of the clients capture device. Possible values are defined by the enum MuteInputStatus. Always available for visible clients.

  • CLIENT_OUTPUT_MUTED

    Indicates the combined mute status of the clients playback and capture devices. Possible values are defined by the enum MuteOutputStatus. Always available for visible clients.

  • CLIENT_OUTPUTONLY_MUTED

    Indicates the mute status of the clients playback device. Possible values are defined by the enum MuteOutputStatus. Always available for visible clients.

  • CLIENT_INPUT_HARDWARE

    Set if the clients capture device is not available. Possible values are defined by the enum HardwareInputStatus. Always available for visible clients.

  • CLIENT_OUTPUT_HARDWARE

    Set if the clients playback device is not available. Possible values are defined by the enum HardwareOutputStatus. Always available for visible clients.

  • CLIENT_INPUT_DEACTIVATED

    Set when the capture device has been deactivated as used in Push-To-Talk. Possible values are defined by the enum InputDeactivationStatus. Only used for the own clients and not available for other clients as it doesn't get propagated to the server.

  • CLIENT_IDLE_TIME

    Time the client has been idle. Needs to be requested with ts3client_requestClientVariables.

  • CLIENT_DEFAULT_CHANNEL

    CLIENT_DEFAULT_CHANNEL_PASSWORD

    Default channel name and password used in the last ts3client_startConnection call. Only available for own client.

  • CLIENT_META_DATA

    Not used by TeamSpeak 3, offers free storage for SDK users. Always available for visible clients.

  • CLIENT_IS_MUTED

    Indicates a client has been locally muted with ts3client_requestMuteClients. Client-side only.

  • CLIENT_IS_RECORDING

    Indicates a client is currently recording all voice data in his channel.

  • CLIENT_VOLUME_MODIFICATOR

    The client volume modifier set by ts3client_setClientVolumeModifier.

  • CLIENT_SECURITY_HASH

    Contains client security hash (optional feature). This hash is used to check if this client is allowed to enter specified channels with a matching CHANNEL_SECURITY_SALT. Motivation is to enforce clients joining a server with the specific identity, nickname and metadata.

    Please see the chapter “Security salts and hashes” in the Server SDK documentation for details.

  • CLIENT_ENCRYPTION_CIPHERS

    Comma-separated list of ciphers offered to the server to pick one from.

    Possible values are: -

    -           "AES-128"
    -           "AES-256"
    -       

    -

    Defaults to "AES-256,AES-128".


-

Generally all types of information can be retrieved as both string or integer. However, in most cases the expected data type is obvious, like querying CLIENT_NICKNAME will clearly require to store the result as string.

Example 1: Query client nickname

char* nickname;
-
-if(ts3client_getClientSelfVariableAsString(scHandlerID, CLIENT_NICKNAME, &nickname) == ERROR_ok) {
-    printf("My nickname is: %s\n", s);
-    ts3client_freeMemory(s);
-}

Example 2: Check if own client is currently talking (to be exact: sending voice data)

int talking;
-
-if(ts3client_getClientSelfVariableAsInt(scHandlerID, CLIENT_FLAG_TALKING, &talking) == ERROR_ok) {
-    switch(talking) {
-        case STATUS_TALKING:
-            // I am currently talking
-        break;
-        case STATUS_NOT_TALKING:
-            // I am currently not talking
-            break;
-        case STATUS_TALKING_WHILE_DISABLED:
-            // I am talking while microphone is disabled
-            break;
-        default:
-            printf("Invalid value for CLIENT_FLAG_TALKING\n");
-    }
-}


-

Information related to the own client can be modified with - -

unsigned int ts3client_setClientSelfVariableAsInt(serverConnectionHandlerID,  
 flag,  
 value); 
uint64 serverConnectionHandlerID;
ClientProperties flag;
int value;
 

- -

unsigned int ts3client_setClientSelfVariableAsString(serverConnectionHandlerID,  
 flag,  
 value); 
uint64 serverConnectionHandlerID;
ClientProperties flag;
const char* value;
 

-

  • serverConnectionHandlerID

    ID of the server connection handler on which the information for the own client is changed.

  • flag

    Client propery to query, see above.

  • value

    Value the client property should be changed to.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h.

[Important]Important

After modifying one or more client variables, you must flush the changes. Flushing ensures the changes are sent to the TeamSpeak 3 server.

unsigned int ts3client_flushClientSelfUpdates(serverConnectionHandlerID,  
 returnCode); 
uint64 serverConnectionHandlerID;
const char* returnCode;
 

The idea behind flushing is, one can modify multiple values by calling ts3client_setClientVariableAsString and ts3client_setClientVariableAsInt and then apply all changes in one step.

For example, to change the own nickname:

/* Modify data */
-if(ts3client_setClientSelfVariableAsString(scHandlerID, CLIENT_NICKNAME, "Joe") != ERROR_ok) {
-    printf("Error setting client variable\n");
-    return;
-}
-
-/* Flush changes */
-if(ts3client_flushClientSelfUpdates(scHandlerID, NULL) != ERROR_ok) {
-    printf("Error flushing client updates");
-}

Example for doing two changes:

/* Modify data 1 */
-if(ts3client_setClientSelfVariableAsInt(scHandlerID, CLIENT_AWAY, AWAY_ZZZ) != ERROR_ok) {
-    printf("Error setting away mode\n");
-    return;
-}
-
-/* Modify data 2 */
-if(ts3client_setClientSelfVariableAsString(scHandlerID, CLIENT_AWAY_MESSAGE, "Lunch") != ERROR_ok) {
-    printf("Error setting away message\n");
-    return;
-}
-
-/* Flush changes */
-if(ts3client_flushClientSelfUpdates(scHandlerID, NULL) != ERROR_ok) {
-    printf("Error flushing client updates");
-}

Example to mute and unmute the microphone:

unsigned int error;
-bool shouldTalk;
-
-shouldTalk = isPushToTalkButtonPressed();  // Your key detection implementation
-if((error = ts3client_setClientSelfVariableAsInt(scHandlerID, CLIENT_INPUT_DEACTIVATED,
-                                                 shouldTalk ? INPUT_ACTIVE : INPUT_DEACTIVATED)) != ERROR_ok) {
-    char* errorMsg;
-    if(ts3client_getErrorMessage(error, &errorMsg) != ERROR_ok) {
-        printf("Error toggling push-to-talk: %s\n", errorMsg);
-	ts3client_freeMemory(errorMsg);
-    }
-    return;
-}
-
-if(ts3client_flushClientSelfUpdates(scHandlerID, NULL) != ERROR_ok) {
-    char* errorMsg;
-    if(ts3client_getErrorMessage(error, &errorMsg) != ERROR_ok) {
-        printf("Error flushing after toggling push-to-talk: %s\n", errorMsg);
-	ts3client_freeMemory(errorMsg);
-    }
-}

See the FAQ section for further details on implementing Push-To-Talk with ts3client_setClientSelfVariableAsInt.

Information related to other clients

Information related to other clients can be retrieved in a similar way. Unlike own clients however, information cannot be modified.

To query client related information, use one of the following functions. The parameter flag is defined by the enum ClientProperties as shown above.

-

unsigned int ts3client_getClientVariableAsInt(serverConnectionHandlerID,  
 clientID,  
 flag,  
 result); 
uint64 serverConnectionHandlerID;
anyID clientID;
ClientProperties flag;
int* result;
 

- -

-

unsigned int ts3client_getClientVariableAsUInt64(serverConnectionHandlerID,  
 clientID,  
 flag,  
 result); 
uint64 serverConnectionHandlerID;
anyID clientID;
ClientProperties flag;
uint64* result;
 

- -

-

unsigned int ts3client_getClientVariableAsString(serverConnectionHandlerID,  
 clientID,  
 flag,  
 result); 
uint64 serverConnectionHandlerID;
anyID clientID;
ClientProperties flag;
char** result;
 

- -

  • serverConnectionHandlerID

    ID of the server connection handler on which the information for the specified client is requested.

  • clientID

    ID of the client whose property is queried.

  • flag

    Client propery to query, see above.

  • result

    Address of a variable which receives the result value as int, uint64 or string, depending on which function is used. In case of a string, memory must be released using ts3client_freeMemory, unless an error occured.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h. For the string version: If an error has occured, the result string is uninitialized and must not be released.


-

As the Client Lib cannot have all information for all users available all the time, the latest data for a given client can be requested from the server with: -

unsigned int ts3client_requestClientVariables(serverConnectionHandlerID,  
 clientID,  
 returnCode); 
uint64 serverConnectionHandlerID;
anyID clientID;
const char* returnCode;
 

-

The function requires one second delay before calling it again on the same client ID to avoid flooding the server.

  • serverConnectionHandlerID

    ID of the server connection handler on which the client variables are requested.

  • clientID

    ID of the client whose variables are requested.

  • returnCode

    See return code documentation. Pass NULL if you do not need this feature.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h.


-

After requesting the information, the following event is called. This event is also called everytime a client variable has been changed: -

void onUpdateClientEvent(serverConnectionHandlerID,  
 clientID,  
 invokerID,  
 invokerName,  
 invokerUniqueIdentifier); 
uint64 serverConnectionHandlerID;
anyID clientID;
anyID invokerID;
const char* invokerName;
const char* invokerUniqueIdentifier;
 

-

  • serverConnectionHandlerID

    ID of the server connection handler on which the client variables are now available or have changed.

  • clientID

    ID of the client whose variables are now available or have changed.

  • invokerID

    ID of the client who edited this clients variables.

  • invokerName

    Nickname of the client who edited this clients variables.

  • invokerUniqueIdentifier

    Unique ID of the client who edited this clients variables.

The event does not carry the information per se, but now the Client Lib guarantees to have the clients information available, which can be subsequently queried with ts3client_getClientVariableAsInt and ts3client_getClientVariableAsString.

Whisper lists

A client with a whisper list set can talk to the specified clients and channels bypassing the standard rule that voice is only transmitted to the current channel. Whisper lists can be defined for individual clients. A whisper list consists of an array of client IDs and/or an array of channel IDs. -

unsigned int ts3client_requestClientSetWhisperList(serverConnectionHandlerID,  
 clientID,  
 targetChannelIDArray,  
 targetClientIDArray,  
 returnCode); 
uint64 serverConnectionHandlerID;
anyID clientID;
const uint64* targetChannelIDArray;
const anyID* targetClientIDArray;
const char* returnCode;
 

-

  • serverConnectionHandlerID

    ID of the server connection handler on which the clients whisper list is modified.

  • clientID

    ID of the client whose whisper list is modified. If set to 0, the own client is modified (same as setting to own client ID).

  • targetChannelIDArray

    Array of channel IDs, terminated with 0. These channels will be added to the whisper list.

    To clear the list, pass NULL or an empty array.

  • targetClientIDArray

    Array of client IDs, terminated with 0. These clients will be added to the whisper list.

    To clear the list, pass NULL or an empty array.

  • returnCode

    See return code documentation. Pass NULL if you do not need this feature.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h.

To disable the whisperlist for the given client, pass NULL to both targetChannelIDArray and targetClientIDArray. Careful: If you pass two empty arrays, whispering is not disabled but instead one would still be whispering to nobody (empty lists).

To control which client is allowed to whisper to own client, the Client Lib implements an internal whisper whitelist mechanism. When a client recieves a whisper while the whispering client has not yet been added to the whisper allow list, the receiving client gets the following event. Note that whisper voice data is not received until the sending client is added to the receivers whisper allow list.

void onIgnoredWhisperEvent(serverConnectionHandlerID,  
 clientID); 
uint64 serverConnectionHandlerID;
anyID clientID;
 
  • serverConnectionHandlerID

    ID of the server connection handler on which the event occured.

  • clientID

    ID of the whispering client.

The receiving client can decide to allow whispering from the sender and add the sending client to the whisper allow list by calling ts3client_allowWhispersFrom. If the sender is not added by the receiving client, this event persists being called but no voice data is transmitted to the receiving client.

To add a client to the whisper allow list:

unsigned int ts3client_allowWhispersFrom(serverConnectionHandlerID,  
 clID); 
uint64 serverConnectionHandlerID;
anyID clID;
 
  • serverConnectionHandlerID

    ID of the server connection handler on which the client should be added to the whisper allow list.

  • clID

    ID of the client to be added to the whisper allow list.

To remove a client from the whisper allow list:

unsigned int ts3client_removeFromAllowedWhispersFrom(serverConnectionHandlerID,  
 clID); 
uint64 serverConnectionHandlerID;
anyID clID;
 
  • serverConnectionHandlerID

    ID of the server connection handler on which the client should be removed from the whisper allow list.

  • clID

    ID of the client to be removed from the whisper allow list.

It won't have bad sideeffects if the same client ID is added to the whisper allow list multiple times.

diff --git a/docs/client_html/ar01s22s02.html b/docs/client_html/ar01s22s02.html deleted file mode 100644 index e005173..0000000 --- a/docs/client_html/ar01s22s02.html +++ /dev/null @@ -1,75 +0,0 @@ -Channel information

Channel information

Querying and modifying information related to channels is similar to dealing with clients. The functions to query channel information are:

-

unsigned int ts3client_getChannelVariableAsInt(serverConnectionHandlerID,  
 channelID,  
 flag,  
 result); 
uint64 serverConnectionHandlerID;
uint64 channelID;
ChannelProperties flag;
int* result;
 

- -

-

unsigned int ts3client_getChannelVariableAsUInt64(serverConnectionHandlerID,  
 channelID,  
 flag,  
 result); 
uint64 serverConnectionHandlerID;
uint64 channelID;
ChannelProperties flag;
uint64* result;
 

- -

-

unsigned int ts3client_getChannelVariableAsString(serverConnectionHandlerID,  
 channelID,  
 flag,  
 result); 
uint64 serverConnectionHandlerID;
uint64 channelID;
ChannelProperties flag;
char* result;
 

- -

  • serverConnectionHandlerID

    ID of the server connection handler on which the information for the specified channel is requested.

  • channelID

    ID of the channel whose property is queried.

  • flag

    Channel propery to query, see below.

  • result

    Address of a variable which receives the result value of type int, uint64 or string, depending on which function is used. In case of a string, memory must be released using ts3client_freeMemory, unless an error occured.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h. For the string version: If an error has occured, the result string is uninitialized and must not be released.

The parameter flag specifies the type of queried information. It is defined by the enum ChannelProperties:

enum ChannelProperties {
-  CHANNEL_NAME = 0,             //Available for all channels that are "in view", always up-to-date
-  CHANNEL_TOPIC,                //Available for all channels that are "in view", always up-to-date
-  CHANNEL_DESCRIPTION,          //Must be requested (=> requestChannelDescription)
-  CHANNEL_PASSWORD,             //not available client side
-  CHANNEL_CODEC,                //Available for all channels that are "in view", always up-to-date
-  CHANNEL_CODEC_QUALITY,        //Available for all channels that are "in view", always up-to-date
-  CHANNEL_MAXCLIENTS,           //Available for all channels that are "in view", always up-to-date
-  CHANNEL_MAXFAMILYCLIENTS,     //Available for all channels that are "in view", always up-to-date
-  CHANNEL_ORDER,                //Available for all channels that are "in view", always up-to-date
-  CHANNEL_FLAG_PERMANENT,       //Available for all channels that are "in view", always up-to-date
-  CHANNEL_FLAG_SEMI_PERMANENT,  //Available for all channels that are "in view", always up-to-date
-  CHANNEL_FLAG_DEFAULT,         //Available for all channels that are "in view", always up-to-date
-  CHANNEL_FLAG_PASSWORD,        //Available for all channels that are "in view", always up-to-date
-  CHANNEL_CODEC_LATENCY_FACTOR, //Available for all channels that are "in view", always up-to-date
-  CHANNEL_CODEC_IS_UNENCRYPTED, //Available for all channels that are "in view", always up-to-date
-  CHANNEL_SECURITY_SALT,        //Sets the options+salt for security hash (SDK only)
-  CHANNEL_DELETE_DELAY,         //How many seconds to wait before deleting this channel
-  CHANNEL_ENDMARKER,
-};
  • CHANNEL_NAME

    String: Name of the channel.

  • CHANNEL_TOPIC

    String: Single-line channel topic.

  • CHANNEL_DESCRIPTION

    String: Optional channel description. Can have multiple lines. Clients need to request updating this variable for a specified channel using: -

    unsigned int ts3client_requestChannelDescription(serverConnectionHandlerID,  
     channelID,  
     returnCode); 
    uint64 serverConnectionHandlerID;
    uint64 channelID;
    const char* returnCode;
     

    - -

  • CHANNEL_PASSWORD

    String: Optional password for password-protected channels.

    [Note]Note

    Clients can only set this value, but not query it.

    If a password is set or removed by modifying this field, CHANNEL_FLAG_PASSWORD will be automatically adjusted.

  • CHANNEL_CODEC

    Int: Codec used for this channel:

    • 0 - Speex Narrowband (8 kHz)

    • 1 - Speex Wideband (16 kHz)

    • 2 - Speex Ultra-Wideband (32 kHz)

    • 3 - Celt (Mono, 48kHz)

    • 4 - Opus Voice (Mono, 48khz)

    • 5 - Opus Music (Stereo, 48khz)

    See Sound codecs.

  • CHANNEL_CODEC_QUALITY

    Int (0-10): Quality of channel codec of this channel. Valid values range from 0 to 10, default is 7. Higher values result in better speech quality but more bandwidth usage.

    See Encoder options.

  • CHANNEL_MAXCLIENTS

    Int: Number of maximum clients who can join this channel.

  • CHANNEL_MAXFAMILYCLIENTS

    Int: Number of maximum clients who can join this channel and all subchannels.

  • CHANNEL_ORDER

    Int: Defines how channels are sorted in the GUI. Channel order is the ID of the predecessor channel after which this channel is to be sorted. If 0, the channel is sorted at the top of its hirarchy.

    For more information please see the chapter Channel sorting.

  • CHANNEL_FLAG_PERMANENT / CHANNEL_FLAG_SEMI_PERMANENT

    Concerning channel durability, there are three types of channels:

    • Temporary

      Temporary channels have neither the CHANNEL_FLAG_PERMANENT nor CHANNEL_FLAG_SEMI_PERMANENT flag set. Temporary channels are automatically deleted by the server after the last user has left and the channel is empty. They will not be restored when the server restarts.

    • Semi-permanent / Permanent

      Semi-permanent and permanent channels are not automatically deleted when the last user left. As SDK servers are not persistant over restart, there is no effective difference between these two in the SDK.

  • CHANNEL_FLAG_DEFAULT

    Int (0/1): Channel is the default channel. There can only be one default channel per server. New users who did not configure a channel to join on login in ts3client_startConnection will automatically join the default channel.

  • CHANNEL_FLAG_PASSWORD

    Int (0/1): If set, channel is password protected. The password itself is stored in CHANNEL_PASSWORD.

  • CHANNEL_CODEC_LATENCY_FACTOR

    (Int: 1-10): Latency of this channel. This allows to increase the packet size resulting in less bandwidth usage at the cost of higher latency. A value of 1 (default) is the best setting for lowest latency and best quality. If bandwidth or network quality are restricted, increasing the latency factor can help stabilize the connection. Higher latency values are only possible for low-quality codec and codec quality settings.

    For best voice quality a low latency factor is recommended.

  • CHANNEL_CODEC_IS_UNENCRYPTED

    Int (0/1): If 1, this channel is not using encrypted voice data. If 0, voice data is encrypted for this channel. Note that channel voice data encryption can be globally disabled or enabled for the virtual server. Changing this flag makes only sense if global voice data encryption is set to be configured per channel as CODEC_ENCRYPTION_PER_CHANNEL (the default behaviour).

  • CHANNEL_SECURITY_SALT

    Contains the channels security salt (optional feature). When a client connects, the clients hash value in CLIENT_SECURITY_HASH is check against the channel salt to allow or deny the client to join this channel. Motivation is to enforce clients joining a server with the specific identity, nickname and metadata.

    Please see the chapter “Security salts and hashes” in the Server SDK documentation for details.

  • CHANNEL_DELETE_DELAY

    This parameter defines how many seconds the server waits until a temporary channel is deleted when empty.

    When a temporary channel is created, a timer is started. If a user joins the channel before the countdown is finished, the channel is not deleted. After the last person has left the channel, the countdown starts again. CHANNEL_DELETE_DELAY defines the length of this countdown in seconds.

    The time since the last client has left the temporary channel can be queried with ts3client_getChannelEmptySecs.


-

To modify channel data use

- -

unsigned int ts3client_setChannelVariableAsInt(serverConnectionHandlerID,  
 channelID,  
 flag,  
 value); 
uint64 serverConnectionHandlerID;
uint64 channelID;
ChannelProperties flag;
int value;
 

- -

- -

unsigned int ts3client_setChannelVariableAsUInt64(serverConnectionHandlerID,  
 channelID,  
 flag,  
 value); 
uint64 serverConnectionHandlerID;
uint64 channelID;
ChannelProperties flag;
uint64 value;
 

- -

- -

unsigned int ts3client_setChannelVariableAsString(serverConnectionHandlerID,  
 channelID,  
 flag,  
 value); 
uint64 serverConnectionHandlerID;
uint64 channelID;
ChannelProperties flag;
const char* value;
 

- -

  • serverConnectionHandlerID

    ID of the server connection handler on which the information for the specified channel should be changed.

  • channelID

    ID of the channel whoses property should be changed.

  • flag

    Channel propery to change, see above.

  • value

    Value the channel property should be changed to. Depending on which function is used, the value can be of type int, uint64 or string.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h.

[Important]Important

After modifying one or more channel variables, you have to flush the changes to the server. -

unsigned int ts3client_flushChannelUpdates(serverConnectionHandlerID,  
 channelID); 
uint64 serverConnectionHandlerID;
uint64 channelID;
 

-

As example, to change the channel name and topic:

/* Modify data 1 */
-if(ts3client_setChannelVariableAsString(scHandlerID, channelID, CHANNEL_NAME,
-                                        "Other channel name") != ERROR_ok) {
-    printf("Error setting channel name\n");
-    return;
-}
-
-/* Modify data 2 */
-if(ts3client_setChannelVariableAsString(scHandlerID, channelID, CHANNEL_TOPIC,
-                                        "Other channel topic") != ERROR_ok) {
-    printf("Error setting channel topic\n");
-    return;
-}
-
-/* Flush changes */
-if(ts3client_flushChannelUpdates(scHandlerID, channelID) != ERROR_ok) {
-    printf("Error flushing channel updates\n");
-    return;
-}


-

After a channel was edited using ts3client_setChannelVariableAsInt or ts3client_setChannelVariableAsString and the changes were flushed to the server, the edit is announced with the event:

void onUpdateChannelEditedEvent(serverConnectionHandlerID,  
 channelID,  
 invokerID,  
 invokerName,  
 invokerUniqueIdentifier); 
uint64 serverConnectionHandlerID;
uint64 channelID;
anyID invokerID;
const char* invokerName;
const char* invokerUniqueIdentifier;
 
  • serverConnectionHandlerID

    ID of the server connection handler on which the channel has been edited.

  • channelID

    ID of edited channel.

  • invokerID

    ID of the client who edited the channel.

  • invokerName

    String with the name of the client who edited the channel.

  • invokerUniqueIdentifier

    String with the unique ID of the client who edited the channel.


-

To find the channel ID from a channels path: -

unsigned int ts3client_getChannelIDFromChannelNames(serverConnectionHandlerID,  
 channelNameArray,  
 result); 
uint64 serverConnectionHandlerID;
char** channelNameArray;
uint64* result;
 

-

  • serverConnectionHandlerID

    ID of the server connection handler on which the channel ID is queried.

  • channelNameArray

    Array defining the position of the channel: "grandparent", "parent", "channel", "". The array is terminated by an empty string.

  • result

    Address of a variable which receives the queried channel ID.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h.

Channel voice data encryption

Voice data can be encrypted or unencrypted. Encryption will increase CPU load, so should be used only when required. Encryption can be configured per channel (the default) or globally enabled or disabled for the whole virtual server. By default channels are sending voice data unencrypted, newly created channels would need to be set to encrypted if required.

To configure the global virtual server encryption settings, modify the virtual server property VIRTUALSERVER_CODEC_ENCRYPTION_MODE to one of the following values: -

enum CodecEncryptionMode {
-   CODEC_ENCRYPTION_PER_CHANNEL = 0,  // Default
-   CODEC_ENCRYPTION_FORCED_OFF,
-   CODEC_ENCRYPTION_FORCED_ON,
-};

-

Voice data encryption per channel can be configured by setting the channel property CHANNEL_CODEC_IS_UNENCRYPTED to 0 (encrypted) or 1 (unencrypted) if global encryption mode is CODEC_ENCRYPTION_PER_CHANNEL. If encryption is forced on or off globally, the channel property will be automatically set by the server.

diff --git a/docs/client_html/ar01s22s02s02.html b/docs/client_html/ar01s22s02s02.html deleted file mode 100644 index 182f268..0000000 --- a/docs/client_html/ar01s22s02s02.html +++ /dev/null @@ -1,7 +0,0 @@ -Channel sorting

Channel sorting

The order how channels should be display in the GUI is defined by the channel variable CHANNEL_ORDER, which can be queried with ts3client_getChannelVariableAsUInt64 or changed with ts3client_setChannelVariableAsUInt64.

The channel order is the ID of the predecessor channel after which the given channel should be sorted. An order of 0 means the channel is sorted on the top of its hirarchy.

Channel_1  (ID = 1, order = 0)
-Channel_2  (ID = 2, order = 1)
-      Subchannel_1  (ID = 4, order = 0)
-            Subsubchannel_1  (ID = 6, order = 0)
-            Subsubchannel_2  (ID = 7, order = 6)
-      Subchannel_2  (ID = 5, order = 4)
-Channel_3  (ID = 3, order = 2)

When a new channel is created, the client is responsible to set a proper channel order. With the default value of 0 the channel will be sorted on the top of its hirarchy right after its parent channel.

When moving a channel to a new parent, the desired channel order can be passed to ts3client_requestChannelMove.

To move the channel to another position within the current hirarchy - the parent channel stays the same -, adjust the CHANNEL_ORDER variable with ts3client_setChannelVariableAsUInt64.

After connecting to a TeamSpeak 3 server, the client will be informed of all channels by the onNewChannelEvent callback. The order how channels are propagated to the client by this event is:

  • First the complete channel path to the default channel, which is either the servers default channel with the flag CHANNEL_FLAG_DEFAULT or the users default channel passed to ts3client_startConnection. This ensures the channel joined on login is visible as soon as possible.

    In above example, assuming the default channel is “Subsubchannel_2”, the channels would be announced in the following order: Channel_2, Subchannel_1, Subsubchannel_2.

    After the default channel path has completely arrived, the connection status (see enum ConnectStatus, annouced to the client by the callback onConnectStatusChangeEvent) changes to STATUS_CONNECTION_ESTABLISHING.

  • Next all other channels in the given order, where subchannels are announced right after the parent channel.

    To continue the example, the remaining channels would be announced in the order of: Channel_1, Subsubchannel_1, Subchannel_2, Channel_3 (Channel_2, Subchannel_1, Subsubchannel_2 already were announced in the previous step).

    When all channels have arrived, the connection status switches to STATUS_CONNECTION_ESTABLISHED.

diff --git a/docs/client_html/ar01s22s03.html b/docs/client_html/ar01s22s03.html deleted file mode 100644 index 9a27987..0000000 --- a/docs/client_html/ar01s22s03.html +++ /dev/null @@ -1,49 +0,0 @@ -Server information

Server information

Similar to reading client and channel data, server information can be queried with

- -

unsigned int ts3client_getServerVariableAsInt(serverConnectionHandlerID,  
 flag,  
 result); 
uint64 serverConnectionHandlerID;
VirtualServerProperties flag;
int* result;
 

- -

-

unsigned int ts3client_getServerVariableAsUInt64(serverConnectionHandlerID,  
 flag,  
 result); 
uint64 serverConnectionHandlerID;
VirtualServerProperties flag;
uint64* result;
 

- -

- -

unsigned int ts3client_getServerVariableAsString(serverConnectionHandlerID,  
 flag,  
 result); 
uint64 serverConnectionHandlerID;
VirtualServerProperties flag;
char** result;
 

- -

  • serverConnectionHandlerID

    ID of the server connection handler on which the virtual server property is queried.

  • clientID

    ID of the client whose property is queried.

  • flag

    Virtual server propery to query, see below.

  • result

    Address of a variable which receives the result value as int, uint64 or string, depending on which function is used. In case of a string, memory must be released using ts3client_freeMemory, unless an error occured.

    The returned type uint64 is defined as __int64 on Windows and uint64_t on Linux and Mac OS X. See the header public_definitions.h. This function is currently only used for the flag VIRTUALSERVER_UPTIME.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h. For the string version: If an error has occured, the result string is uninitialized and must not be released.

The parameter flag specifies the type of queried information. It is defined by the enum VirtualServerProperties:

enum VirtualServerProperties {
-  VIRTUALSERVER_UNIQUE_IDENTIFIER = 0, //available when connected, can be used to identify this particular
-                                       //server installation
-  VIRTUALSERVER_NAME,                  //available and always up-to-date when connected
-  VIRTUALSERVER_WELCOMEMESSAGE,        //available when connected, not updated while connected
-  VIRTUALSERVER_PLATFORM,              //available when connected
-  VIRTUALSERVER_VERSION,               //available when connected
-  VIRTUALSERVER_MAXCLIENTS,            //only available on request (=> requestServerVariables), stores the
-                                       //maximum number of clients that may currently join the server
-  VIRTUALSERVER_PASSWORD,              //not available to clients, the server password
-  VIRTUALSERVER_CLIENTS_ONLINE,        //only available on request (=> requestServerVariables),
-  VIRTUALSERVER_CHANNELS_ONLINE,       //only available on request (=> requestServerVariables),
-  VIRTUALSERVER_CREATED,               //available when connected, stores the time when the server was created
-  VIRTUALSERVER_UPTIME,                //only available on request (=> requestServerVariables), the time
-                                       //since the server was started
-  VIRTUALSERVER_CODEC_ENCRYPTION_MODE, //available and always up-to-date when connected
-  VIRTUALSERVER_ENCRYPTION_CIPHERS,    //SDK only: list of ciphers that can be used for encryption
-  VIRTUALSERVER_ENDMARKER,
-};
  • VIRTUALSERVER_UNIQUE_IDENTIFIER

    Unique ID for this virtual server. Stays the same after restarting the server application. Always available when connected.

  • VIRTUALSERVER_NAME

    Name of this virtual server. Always available when connected.

  • VIRTUALSERVER_WELCOMEMESSAGE

    Optional welcome message sent to the client on login. This value should be queried by the client after connection has been established, it is not updated afterwards.

  • VIRTUALSERVER_PLATFORM

    Operating system used by this server. Always available when connected.

  • VIRTUALSERVER_VERSION

    Application version of this server. Always available when connected.

  • VIRTUALSERVER_MAXCLIENTS

    Defines maximum number of clients which may connect to this server. Needs to be requested using ts3client_requestServerVariables.

  • VIRTUALSERVER_PASSWORD

    Optional password of this server. Not available to clients.

  • VIRTUALSERVER_CLIENTS_ONLINE

    VIRTUALSERVER_CHANNELS_ONLINE

    Number of clients and channels currently on this virtual server. Needs to be requested using ts3client_requestServerVariables.

  • VIRTUALSERVER_CREATED

    Time when this virtual server was created. Always available when connected.

  • VIRTUALSERVER_UPTIME

    Uptime of this virtual server. Needs to be requested using ts3client_requestServerVariables.

  • VIRTUALSERVER_CODEC_ENCRYPTION_MODE

    Defines if voice data encryption is configured per channel, globally forced on or globally forced off for this virtual server. The default behaviour is configure per channel, in this case modifying the channel property CHANNEL_CODEC_IS_UNENCRYPTED defines voice data encryption of individual channels.

    Virtual server encryption mode can be set to the following parameters: -

    enum CodecEncryptionMode {
    -   CODEC_ENCRYPTION_PER_CHANNEL = 0,
    -   CODEC_ENCRYPTION_FORCED_OFF,
    -   CODEC_ENCRYPTION_FORCED_ON,
    -};

    -

    This property is always available when connected.


-

Example code checking the number of clients online, obviously an integer value: -

int clientsOnline;
-
-if(ts3client_getServerVariableAsInt(scHandlerID, VIRTUALSERVER_CLIENTS_ONLINE, &clientsOnline) == ERROR_ok)
-    printf("There are %d clients online\n", clientsOnline);


-

A client can request refreshing the server information with: -

unsigned int ts3client_requestServerVariables(serverConnectionHandlerID); 
uint64 serverConnectionHandlerID;
 

-

The following event informs the client when the requested information is available: -

unsigned int onServerUpdatedEvent(serverConnectionHandlerID); 
uint64 serverConnectionHandlerID;
 

-


-

The following event notifies the client when virtual server information has been edited: -

void onServerEditedEvent(serverConnectionHandlerID,  
 editerID,  
 editerName,  
 editerUniqueIdentifier); 
uint64 serverConnectionHandlerID;
anyID editerID;
const char* editerName;
const char* editerUniqueIdentifier;
 

-

  • serverConnectionHandlerID

    ID of the server connection handler which virtual server information has been changed.

  • editerID

    ID of the client who edited the information. If zero, the server is the editor.

  • editerName

    Name of the client who edited the information.

  • editerUniqueIdentifier

    Unique ID of the client who edited the information.

diff --git a/docs/client_html/ar01s23.html b/docs/client_html/ar01s23.html deleted file mode 100644 index 0350c3b..0000000 --- a/docs/client_html/ar01s23.html +++ /dev/null @@ -1,27 +0,0 @@ -Interacting with the server

Interacting with the server

Interacting with the server means various actions, related to both channels and clients. Channels can be joined, created, edited, deleted and subscribed. Clients can use text chat with other clients, be kicked or poked and move between channels.

All strings passed to and from the Client Lib need to be encoded in UTF-8 format.

Joining a channel

When a client logs on to a TeamSpeak 3 server, he will automatically join the channel with the “Default” flag, unless he specified another channel in ts3client_startConnection. To have your own or another client switch to a certain channel, call -

unsigned int ts3client_requestClientMove(serverConnectionHandlerID,  
 clientID,  
 newChannelID,  
 password,  
 returnCode); 
uint64 serverConnectionHandlerID;
anyID clientID;
uint64 newChannelID;
const char* password;
const char* returnCode;
 

-

  • serverConnectionHandlerID

    ID of the server connection handler ID on which this action is requested.

  • clientID

    ID of the client to move.

  • newChannelID

    ID of the channel the client wants to join.

  • password

    An optional password, required for password-protected channels. Pass an empty string if no password is given.

  • returnCode

    See return code documentation. Pass NULL if you do not need this feature.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h.


-

If the move was successful, one the following events will be called: - -

void onClientMoveEvent(serverConnectionHandlerID,  
 clientID,  
 oldChannelID,  
 newChannelID,  
 visibility,  
 moveMessage); 
uint64 serverConnectionHandlerID;
anyID clientID;
uint64 oldChannelID;
uint64 newChannelID;
int visibility;
const char* moveMessage;
 

-

  • serverConnectionHandlerID

    ID of the server connection handler on which the action occured.

  • clientID

    ID of the moved client.

  • oldChannelID

    ID of the old channel left by the client.

  • newChannelID

    ID of the new channel joined by the client.

  • visibility

    Defined in the enum Visibility - -

    enum Visibility {
    -    ENTER_VISIBILITY = 0,
    -    RETAIN_VISIBILITY,
    -    LEAVE_VISIBILITY
    -};

    -

    • ENTER_VISIBILITY

      Client moved and entered visibility. Cannot happen on own client.

    • RETAIN_VISIBILITY

      Client moved between two known places. Can happen on own or other client.

    • LEAVE_VISIBILITY

      Client moved out of our sight. Cannot happen on own client.

  • moveMessage

    When a client disconnects from the server, this includes the optional message set by the disconnecting client in ts3client_stopConnection.

Example: Requesting to move the own client into channel ID 12 (not password-protected):

ts3client_requestClientMove(scHandlerID, ts3client_getClientID(scHandlerID), 12, "", NULL);

Now wait for the callback:

-void my_onClientMoveEvent(uint64 scHandlerID, anyID clientID,
-                          uint64 oldChannelID, uint64 newChannelID,
-                          int visibility, const char* moveMessage) {
-  // scHandlerID   ->  Server connection handler ID, same as above when requesting
-  // clientID      ->  Own client ID, same as above when requesting
-  // oldChannelID  ->  ID of the channel the client has left
-  // newChannelID  ->  12, as requested above
-  // visibility    ->  One of ENTER_VISIBILITY, RETAIN_VISIBILITY, LEAVE_VISIBILITY
-  // moveMessage   ->  Optional message set by disconnecting clients
-}


-

If the move was initiated by another client, instead of onClientMove the following event is called: -

void onClientMoveMovedEvent(serverConnectionHandlerID,  
 clientID,  
 oldChannelID,  
 newChannelID,  
 visibility,  
 moverID,  
 moverName,  
 moverUniqueIdentifier,  
 moveMessage); 
uint64 serverConnectionHandlerID;
anyID clientID;
uint64 oldChannelID;
uint64 newChannelID;
int visibility;
anyID moverID;
const char* moverName;
const char* moverUniqueIdentifier;
const char* moveMessage;
 

-

Like onClientMoveEvent but with additional information about the client, which has initiated the move: moverID defines the ID, moverName the nickname and moverUniqueIdentifier the unique ID of the client who initiated the move. moveMessage contains a string giving the reason for the move.

If oldChannelID is 0, the client has just connected to the server. If newChannelID is 0, the client disconnected. Both values cannot be 0 at the same time.

diff --git a/docs/client_html/ar01s23s02.html b/docs/client_html/ar01s23s02.html deleted file mode 100644 index c156590..0000000 --- a/docs/client_html/ar01s23s02.html +++ /dev/null @@ -1,36 +0,0 @@ -Creating a new channel

Creating a new channel

To create a channel, set the various channel variables using ts3client_setChannelVariableAsInt and ts3client_setChannelVariableAsString. Pass zero as the channel ID parameter.

Then flush the changes to the server by calling: -

unsigned int ts3client_flushChannelCreation(serverConnectionHandlerID,  
 channelParentID); 
uint64 serverConnectionHandlerID;
uint64 channelParentID;
 

-

  • serverConnectionHandlerID

    ID of the server connection handler to which the channel changes should be flushed.

  • channelParentID

    ID of the parent channel, if the new channel is to be created as subchannel. Pass zero if the channel should be created as top-level channel.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h.


-

After flushing the changes to the server, the following event will be called on successful channel creation: -

void onNewChannelCreatedEvent(serverConnectionHandlerID,  
 channelID,  
 channelParentID,  
 invokerID,  
 invokerName,  
 invokerUniqueIdentifier); 
uint64 serverConnectionHandlerID;
uint64 channelID;
uint64 channelParentID;
anyID invokerID;
const char* invokerName;
const char* invokerUniqueIdentifier;
 

-

  • serverConnectionHandlerID

    ID of the server connection handler where the channel was created.

  • channelID

    ID of the created channel. Channel IDs start with the value 1.

  • channelParentID

    ID of the parent channel.

  • invokerID

    ID of the client who requested the creation. If zero, the request was initiated by the server.

  • invokerName

    Name of the client who requested the creation. If requested by the server, the name is empty.

  • invokerUniqueIdentifier

    Unique ID of the client who requested the creation.


-

Example code to create a channel:

#define CHECK_ERROR(x) if((error = x) != ERROR_ok) { goto on_error; }
-
-int createChannel(uint64 scHandlerID, uint64 parentChannelID, const char* name, const char* topic,
-                  const char* description, const char* password, int codec, int codecQuality,
-                  int maxClients, int familyMaxClients, int order, int perm,
-                  int semiperm, int default) {
-  unsigned int error;
-
-  /* Set channel data, pass 0 as channel ID */
-  CHECK_ERROR(ts3client_setChannelVariableAsString(scHandlerID, 0, CHANNEL_NAME, name));
-  CHECK_ERROR(ts3client_setChannelVariableAsString(scHandlerID, 0, CHANNEL_TOPIC, topic));
-  CHECK_ERROR(ts3client_setChannelVariableAsString(scHandlerID, 0, CHANNEL_DESCRIPTION, desc));
-  CHECK_ERROR(ts3client_setChannelVariableAsString(scHandlerID, 0, CHANNEL_PASSWORD, password));
-  CHECK_ERROR(ts3client_setChannelVariableAsInt   (scHandlerID, 0, CHANNEL_CODEC, codec));
-  CHECK_ERROR(ts3client_setChannelVariableAsInt   (scHandlerID, 0, CHANNEL_CODEC_QUALITY, codecQuality));
-  CHECK_ERROR(ts3client_setChannelVariableAsInt   (scHandlerID, 0, CHANNEL_MAXCLIENTS, maxClients));
-  CHECK_ERROR(ts3client_setChannelVariableAsInt   (scHandlerID, 0, CHANNEL_MAXFAMILYCLIENTS, familyMaxClients));
-  CHECK_ERROR(ts3client_setChannelVariableAsUInt64(scHandlerID, 0, CHANNEL_ORDER, order));
-  CHECK_ERROR(ts3client_setChannelVariableAsInt   (scHandlerID, 0, CHANNEL_FLAG_PERMANENT, perm));
-  CHECK_ERROR(ts3client_setChannelVariableAsInt   (scHandlerID, 0, CHANNEL_FLAG_SEMI_PERMANENT, semiperm));
-  CHECK_ERROR(ts3client_setChannelVariableAsInt   (scHandlerID, 0, CHANNEL_FLAG_DEFAULT, default));
-
-  /* Flush changes to server */
-  CHECK_ERROR(ts3client_flushChannelCreation(scHandlerID, parentChannelID));
-  return 0;  /* Success */
-
-on_error:
-  printf("Error creating channel: %d\n", error);
-  return 1;  /* Failure */
-}
diff --git a/docs/client_html/ar01s23s03.html b/docs/client_html/ar01s23s03.html deleted file mode 100644 index 7ca7087..0000000 --- a/docs/client_html/ar01s23s03.html +++ /dev/null @@ -1,6 +0,0 @@ -Deleting a channel

Deleting a channel

A channel can be removed with -

unsigned int ts3client_requestChannelDelete(serverConnectionHandlerID,  
 channelID,  
 force,  
 returnCode); 
uint64 serverConnectionHandlerID;
uint64 channelID;
int force;
const char* returnCode;
 

-

  • serverConnectionHandlerID

    ID of the server connection handler on which the channel should be deleted.

  • channelID

    The ID of the channel to be deleted.

  • force

    If 1, the channel will be deleted even when it is not empty. Clients within the deleted channel are transfered to the default channel. Any contained subchannels are removed as well.

    If 0, the server will refuse to delete a channel that is not empty.

  • returnCode

    See return code documentation. Pass NULL if you do not need this feature.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h.


-

After the request has been sent to the server, the following event will be called: -

void onDelChannelEvent(serverConnectionHandlerID,  
 channelID,  
 invokerID,  
 invokerName,  
 invokerUniqueIdentifier); 
uint64 serverConnectionHandlerID;
uint64 channelID;
anyID invokerID;
const char* invokerName;
const char* invokerUniqueIdentifier;
 

-

  • serverConnectionHandlerID

    ID of the server connection handler on which the channel was deleted.

  • channelID

    The ID of the deleted channel.

  • invokerID

    The ID of the client who requested the deletion. If zero, the deletion was initiated by the server (for example automatic deletion of empty non-permanent channels).

  • invokerName

    The name of the client who requested the deletion. Empty if requested by the server.

  • invokerUniqueIdentifier

    The unique ID of the client who requested the deletion.

diff --git a/docs/client_html/ar01s23s04.html b/docs/client_html/ar01s23s04.html deleted file mode 100644 index 19c1a5c..0000000 --- a/docs/client_html/ar01s23s04.html +++ /dev/null @@ -1,6 +0,0 @@ -Moving a channel

Moving a channel

To move a channel to a new parent channel, call -

unsigned int ts3client_requestChannelMove(serverConnectionHandlerID,  
 channelID,  
 newChannelParentID,  
 newChannelOrder,  
 returnCode); 
uint64 serverConnectionHandlerID;
uint64 channelID;
uint64 newChannelParentID;
uint64 newChannelOrder;
const char* returnCode;
 

-

  • serverConnectionHandlerID

    ID of the server connection handler on which the channel should be moved.

  • channelID

    ID of the channel to be moved.

  • newChannelParentID

    ID of the parent channel where the moved channel is to be inserted as child. Use 0 to insert as top-level channel.

  • newChannelOrder

    Channel order defining where the channel should be sorted under the new parent. Pass 0 to sort the channel right after the parent. See the chapter Channel sorting for details.

  • returnCode

    See return code documentation. Pass NULL if you do not need this feature.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h.


-

After sending the request, the following event will be called if the move was successful: -

void onChannelMoveEvent(serverConnectionHandlerID,  
 channelID,  
 newChannelParentID,  
 invokerID,  
 invokerName,  
 invokerUniqueIdentifier); 
uint64 serverConnectionHandlerID;
uint64 channelID;
uint64 newChannelParentID;
anyID invokerID;
const char* invokerName;
const char* invokerUniqueIdentifier;
 

-

  • serverConnectionHandlerID

    ID of the server connection handler on which the channel was moved.

  • channelID

    The ID of the moved channel.

  • newChannelParentID

    ID of the parent channel where the moved channel is inserted as child. 0 if inserted as top-level channel.

  • invokerID

    The ID of the client who requested the move. If zero, the move was initiated by the server.

  • invokerName

    The name of the client who requested the move. Empty if requested by the server.

  • invokerUniqueIdentifier

    The unique ID of the client who requested the move.

diff --git a/docs/client_html/ar01s23s05.html b/docs/client_html/ar01s23s05.html deleted file mode 100644 index 150ee9d..0000000 --- a/docs/client_html/ar01s23s05.html +++ /dev/null @@ -1 +0,0 @@ -Text chat

Text chat

In addition to voice chat, TeamSpeak 3 allows clients to communicate with text-chat. Valid targets can be a client, channel or virtual server. Depending on the target, there are three functions to send text messages and one callback to receive them.

diff --git a/docs/client_html/ar01s23s05s01.html b/docs/client_html/ar01s23s05s01.html deleted file mode 100644 index f9f8b24..0000000 --- a/docs/client_html/ar01s23s05s01.html +++ /dev/null @@ -1,15 +0,0 @@ -Sending

Sending

To send a private text message to a client: -

unsigned int ts3client_requestSendPrivateTextMsg(serverConnectionHandlerID,  
 message,  
 targetClientID,  
 returnCode); 
uint64 serverConnectionHandlerID;
const char* message;
anyID targetClientID;
const char* returnCode;
 

-

  • serverConnectionHandlerID

    Id of the target server connection handler.

  • message

    String containing the text message

  • targetClientID

    Id of the target client.

  • returnCode

    See return code documentation. Pass NULL if you do not need this feature.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h.


-

To send a text message to a channel: -

unsigned int ts3client_requestSendChannelTextMsg(serverConnectionHandlerID,  
 message,  
 targetChannelID,  
 returnCode); 
uint64 serverConnectionHandlerID;
const char* message;
anyID targetChannelID;
const char* returnCode;
 

-

  • serverConnectionHandlerID

    Id of the target server connection handler.

  • message

    String containing the text message

  • targetChannelID

    Id of the target channel.

  • returnCode

    See return code documentation. Pass NULL if you do not need this feature.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h.


-

To send a text message to the virtual server: -

unsigned int ts3client_requestSendServerTextMsg(serverConnectionHandlerID,  
 message,  
 returnCode); 
uint64 serverConnectionHandlerID;
const char* message;
const char* returnCode;
 

-

  • serverConnectionHandlerID

    Id of the target server connection handler.

  • message

    String containing the text message

  • returnCode

    See return code documentation. Pass NULL if you do not need this feature.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h.


-

Example to send a text chat to a client with ID 123:

const char *msg = "Hello TeamSpeak!";
-anyID targetClientID = 123;
-
-if(ts3client_requestSendPrivateTextMsg(scHandlerID, msg, targetClient, NULL) != ERROR_ok) {
-  /* Handle error */
-}
diff --git a/docs/client_html/ar01s23s05s02.html b/docs/client_html/ar01s23s05s02.html deleted file mode 100644 index 22adf15..0000000 --- a/docs/client_html/ar01s23s05s02.html +++ /dev/null @@ -1,8 +0,0 @@ -Receiving

Receiving

The following event will be called when a text message is received: -

void onTextMessageEvent(serverConnectionHandlerID,  
 targetMode,  
 toID,  
 fromID,  
 fromName,  
 fromUniqueIdentifier,  
 message); 
uint64 serverConnectionHandlerID;
anyID targetMode;
anyID toID;
anyID fromID;
const char* fromName;
const char* fromUniqueIdentifier;
const char* message;
 

-

  • serverConnectionHandlerID

    ID of the server connection handler from which the text message was sent.

  • targetMode

    Target mode of this text message. The value is defined by the enum TextMessageTargetMode:

    enum TextMessageTargetMode {
    -    TextMessageTarget_CLIENT=1,
    -    TextMessageTarget_CHANNEL,
    -    TextMessageTarget_SERVER,
    -    TextMessageTarget_MAX
    -};
  • toID

    Id of the target of the text message.

  • fromID

    Id of the client who sent the text message.

  • fromName

    Name of the client who sent the text message.

  • fromUniqueIdentifier

    Unique ID of the client who sent the text message.

  • message

    String containing the text message.

diff --git a/docs/client_html/ar01s23s06.html b/docs/client_html/ar01s23s06.html deleted file mode 100644 index ed2da69..0000000 --- a/docs/client_html/ar01s23s06.html +++ /dev/null @@ -1,14 +0,0 @@ -Kicking clients

Kicking clients

Clients can be forcefully removed from a channel or the whole server. To kick a client from a channel or server call:

-

unsigned int ts3client_requestClientKickFromChannel(serverConnectionHandlerID,  
 clientID,  
 kickReason,  
 returnCode); 
uint64 serverConnectionHandlerID;
anyID clientID;
const char* kickReason;
const char* returnCode;
 

- -

-

unsigned int ts3client_requestClientKickFromServer(serverConnectionHandlerID,  
 clientID,  
 kickReason,  
 returnCode); 
uint64 serverConnectionHandlerID;
anyID clientID;
const char* kickReason;
const char* returnCode;
 

- -

  • serverConnectionHandlerID

    Id of the target server connection.

  • clientID

    The ID of the client to be kicked.

  • kickReason

    A short message explaining why the client is kicked from the channel or server.

  • returnCode

    See return code documentation. Pass NULL if you do not need this feature.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h.


-

After successfully requesting a kick, one of the following events will be called:

-

void onClientKickFromChannelEvent(serverConnectionHandlerID,  
 clientID,  
 oldChannelID,  
 newChannelID,  
 visibility,  
 kickerID,  
 kickerName,  
 kickerUniqueIdentifier,  
 kickMessage); 
uint64 serverConnectionHandlerID;
anyID clientID;
uint64 oldChannelID;
uint64 newChannelID;
int visibility;
anyID kickerID;
const char* kickerName;
const char* kickerUniqueIdentifier;
const char* kickMessage;
 

- -

-

void onClientKickFromServerEvent(serverConnectionHandlerID,  
 clientID,  
 oldChannelID,  
 newChannelID,  
 visibility,  
 kickerID,  
 kickerName,  
 kickerUniqueIdentifier,  
 kickMessage); 
uint64 serverConnectionHandlerID;
anyID clientID;
uint64 oldChannelID;
uint64 newChannelID;
int visibility;
anyID kickerID;
const char* kickerName;
const char* kickerUniqueIdentifier;
const char* kickMessage;
 

- -

  • serverConnectionHandlerID

    ID of the server connection handler on which the client was kicked

  • clientID

    ID of the kicked client.

  • oldChannelID

    ID of the channel from which the client has been kicked.

  • newChannelID

    ID of the channel where the kicked client was moved to.

  • visibility

    Describes if the moved client enters, retains or leaves visibility. See explanation of the enum Visibility for the function onClientMoveEvent.

    When kicked from a server, visibility can be only LEAVE_VISIBILITY.

  • kickerID

    ID of the client who requested the kick.

  • kickerName

    Name of the client who requested the kick.

  • kickerUniqueIdentifier

    Unique ID of the client who requested the kick.

  • kickerMessage

    Message giving the reason why the client has been kicked.

diff --git a/docs/client_html/ar01s23s07.html b/docs/client_html/ar01s23s07.html deleted file mode 100644 index da74b7c..0000000 --- a/docs/client_html/ar01s23s07.html +++ /dev/null @@ -1,28 +0,0 @@ -Channel subscriptions

Channel subscriptions

Normally a user only sees other clients who are in the same channel. Clients joining or leaving other channels or changing status are not displayed. To offer a way to get notifications about clients in other channels, a user can subscribe to other channels. It would also be possible to always subscribe to all channels to get notifications about all clients on the server.

Subscriptions are meant to have a flexible way to balance bandwidth usage. On a crowded server limiting the number of subscribed channels is a way to reduce network traffic. Also subscriptions allow to usage “private” channels, whose members cannot be seen by other users.

[Note]Note

A client is automatically subscribed to the current channel.

To subscribe to a list of channels (zero-terminated array of channel IDs) call: -

unsigned int ts3client_requestChannelSubscribe(serverConnectionHandlerID,  
 channelIDArray,  
 returnCode); 
uint64 serverConnectionHandlerID;
const uint64* channelIDArray;
const char* returnCode;
 

-

To unsubscribe from a list of channels (zero-terminated array of channel IDs) call: -

unsigned int ts3client_requestChannelUnsubscribe(serverConnectionHandlerID,  
 channelIDArray,  
 returnCode); 
uint64 serverConnectionHandlerID;
const uint64* channelIDArray;
const char* returnCode;
 

-

To subscribe to all channels on the server call: -

unsigned int ts3client_requestChannelSubscribeAll(serverConnectionHandlerID,  
 returnCode); 
uint64 serverConnectionHandlerID;
const char* returnCode;
 

-

To unsubscribe from all channels on the server call: -

unsigned int ts3client_requestChannelUnsubscribeAll(serverConnectionHandlerID,  
 returnCode); 
uint64 serverConnectionHandlerID;
const char* returnCode;
 

-

To check if a channel is currently subscribed, check the channel property CHANNEL_FLAG_ARE_SUBSCRIBED with ts3client_getChannelVariableAsInt:

int isSubscribed;
-
-if(ts3client_getChannelVariableAsInt(scHandlerID, channelID, CHANNEL_FLAG_ARE_SUBSCRIBED, &isSubscribed)
-   != ERROR_ok) {
-    /* Handle error */
-}

The following event will be sent for each successfully subscribed channel: -

void onChannelSubscribeEvent(serverConnectionHandlerID,  
 channelID); 
uint64 serverConnectionHandlerID;
uint64 channelID;
 

-

Provided for convinience, to mark the end of mulitple calls to onChannelSubscribeEvent when subscribing to several channels, this event is called: -

void onChannelSubscribeFinishedEvent(serverConnectionHandlerID); 
uint64 serverConnectionHandlerID;
 

-

The following event will be sent for each successfully unsubscribed channel: -

void onChannelUnsubscribeEvent(serverConnectionHandlerID,  
 channelID); 
uint64 serverConnectionHandlerID;
uint64 channelID;
 

-

Similar like subscribing, this event is a convinience callback to mark the end of multiple calls to onChannelUnsubscribeEvent: -

void onChannelUnsubscribeFinishedEvent(serverConnectionHandlerID); 
uint64 serverConnectionHandlerID;
 

-

Once a channel has been subscribed or unsubscribed, the event onClientMoveSubscriptionEvent is sent for each client in the subscribed channel. The event is not to be confused with onClientMoveEvent, which is called for clients actively switching channels.

void onClientMoveSubscriptionEvent(serverConnectionHandlerID,  
 clientID,  
 oldChannelID,  
 newChannelID,  
 visibility); 
uint64 serverConnectionHandlerID;
anyID clientID;
uint64 oldChannelID;
uint64 newChannelID;
int visibility;
 
  • serverConnectionHandlerID

    The server connection handler ID for the server where the action occured.

  • clientID

    The client ID.

  • oldChannelID

    ID of the subscribed channel where the client left visibility.

  • newChannelID

    ID of the subscribed channel where the client entered visibility.

  • visibility

    Defined in the enum Visibility -

    enum Visibility {
    -    ENTER_VISIBILITY = 0,
    -    RETAIN_VISIBILITY,
    -    LEAVE_VISIBILITY
    -};

    -

    • ENTER_VISIBILITY

      Client entered visibility.

    • LEAVE_VISIBILITY

      Client left visibility.

    • RETAIN_VISIBILITY

      Does not occur with onClientMoveSubscriptionEvent.

diff --git a/docs/client_html/ar01s24.html b/docs/client_html/ar01s24.html deleted file mode 100644 index 45601f9..0000000 --- a/docs/client_html/ar01s24.html +++ /dev/null @@ -1,13 +0,0 @@ -Muting clients locally

Muting clients locally

Individual clients can be locally muted. This information is handled client-side only and not visibile to other clients. It mainly serves as a sort of individual "ban" or "ignore" feature, where users can decide not to listen to certain clients anymore.

When a client becomes muted, he will no longer be heard by the muter. Also the TeamSpeak 3 server will stop sending voice packets.

The mute state is not visible to the muted client nor to other clients. It is only available to the muting client by checking the CLIENT_IS_MUTED client property.

To mute one or more clients: -

unsigned int ts3client_requestMuteClients(serverConnectionHandlerID,  
 clientIDArray,  
 returnCode); 
uint64 serverConnectionHandlerID;
const anyID* clientIDArray;
const char* returnCode;
 

-

To unmute one or more clients: -

unsigned int ts3client_requestUnmuteClients(serverConnectionHandlerID,  
 clientIDArray,  
 returnCode); 
uint64 serverConnectionHandlerID;
const anyID* clientIDArray;
const char* returnCode;
 

-

  • serverConnectionHandlerID

    ID of the server connection handle on which the client should be locally (un)muted

  • clientIDArray

    NULL-terminated array of client IDs.

  • returnCode

    See return code documentation. Pass NULL if you do not need this feature.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h.

Example to mute two clients:

anyID clientIDArray[3];  // List of two clients plus terminating zero
-clientIDArray[0] = 123;  // First client ID to mute
-clientIDArray[1] = 456;  // Second client ID to mute
-clientIDArray[2] = 0;    // Terminating zero
-
-if(ts3client_requestMuteClients(scHandlerID, clientIDArray) != ERROR_ok)  /* Mute clients */
-    printf("Error muting clients: %d\n", error);

To check if a client is currently muted, query the CLIENT_IS_MUTED client property:

int clientIsMuted;
-if(ts3client_getClientVariableAsInt(scHandlerID, clientID, CLIENT_IS_MUTED, &clientIsMuted) != ERROR_ok)
-    printf("Error querying client muted state\n);
diff --git a/docs/client_html/ar01s25.html b/docs/client_html/ar01s25.html deleted file mode 100644 index 5a960f6..0000000 --- a/docs/client_html/ar01s25.html +++ /dev/null @@ -1,24 +0,0 @@ -Custom encryption

Custom encryption

As an optional feature, the TeamSpeak 3 SDK allows users to implement custom encryption and decryption for all network traffic. Custom encryption replaces the default AES encryption implemented by the TeamSpeak 3 SDK. A possible reason to apply own encryption might be to make ones TeamSpeak 3 client/server incompatible to other SDK implementations.

Custom encryption must be implemented the same way in both the client and server.

[Note]Note

If you do not want to use this feature, just don't implement the two encryption callbacks.

- To encrypt outgoing data, implement the callback: -

void onCustomPacketEncryptEvent(dataToSend,  
 sizeOfData); 
char** dataToSend;
unsigned int* sizeOfData;
 

- -

  • dataToSend

    Pointer to an array with the outgoing data to be encrypted.

    Apply your custom encryption to the data array. If the encrypted data is smaller than sizeOfData, write your encrypted data into the existing memory of dataToSend. If your encrypted data is larger, you need to allocate memory and redirect the pointer dataToSend. You need to take care of freeing your own allocated memory yourself. The memory allocated by the SDK, to which dataToSend is originally pointing to, must not be freed.

  • sizeOfData

    Pointer to an integer value containing the size of the data array.

-


-

- To decrypt incoming data, implement the callback: -

void onCustomPacketDecryptEvent(dataReceived,  
 dataReceivedSize); 
char** dataReceived;
unsigned int* dataReceivedSize;
 

- -

  • dataReceived

    Pointer to an array with the received data to be decrypted.

    Apply your custom decryption to the data array. If the decrypted data is smaller than dataReceivedSize, write your decrypted data into the existing memory of dataReceived. If your decrypted data is larger, you need to allocate memory and redirect the pointer dataReceived. You need to take care of freeing your own allocated memory yourself. The memory allocated by the SDK, to which dataReceived is originally pointing to, must not be freed.

  • dataReceivedSize

    Pointer to an integer value containing the size of the data array.

-

Example code implementing a very simple XOR custom encryption and decryption (also see the SDK examples):

void onCustomPacketEncryptEvent(char** dataToSend, unsigned int* sizeOfData) {
-    unsigned int i;
-    for(i = 0; i < *sizeOfData; i++) {
-        (*dataToSend)[i] ^= CUSTOM_CRYPT_KEY;
-    }
-}
-
-void onCustomPacketDecryptEvent(char** dataReceived, unsigned int* dataReceivedSize) {
-    unsigned int i;
-    for(i = 0; i < *dataReceivedSize; i++) {
-        (*dataReceived)[i] ^= CUSTOM_CRYPT_KEY;
-    }
-}
diff --git a/docs/client_html/ar01s26.html b/docs/client_html/ar01s26.html deleted file mode 100644 index 8db2ed5..0000000 --- a/docs/client_html/ar01s26.html +++ /dev/null @@ -1,3 +0,0 @@ -Custom passwords

Custom passwords

The TeamSpeak SDK has the optional ability to do custom password handling. This makes it possible to allow people on the server (or channels) with passwords that are checked against outside datasources, like LDAP or other databases.

-To implement custom password, both server and client need to add custom callbacks, which will be spontaneously called whenever a password check is done in TeamSpeak. The SDK developer can implement own checks to validate the password instead of using the TeamSpeak built-in mechanism.


-

Both Server and Client Lib can implement the following callback to encrypt a user password. This function is called in the Client Lib when a channel password is set.

This can be used to hash the password in the same way it is hashed in the outside data store. Or just copy the password to send the clear text to the server.

void onClientPasswordEncrypt(serverID,  
 plaintext,  
 encryptedText,  
 encryptedTextByteSize); 
uint64 serverID;
const char* plaintext;
char* encryptedText;
int encryptedTextByteSize;
 
  • serverID

    ID of the server the password call occured

  • plaintext

    The plaintext password

  • encryptedText

    Fill with your custom encrypted password. Must be a 0-terminated string with a size not larger than encryptedTextByteSize.

  • encryptedTextByteSize

    Size of the buffer pointed to by encryptedText.

diff --git a/docs/client_html/ar01s27.html b/docs/client_html/ar01s27.html deleted file mode 100644 index 7b10c9a..0000000 --- a/docs/client_html/ar01s27.html +++ /dev/null @@ -1,19 +0,0 @@ -Other events

Other events

When a client starts or stops talking, a talk status change event is sent by the server: -

void onTalkStatusChangeEvent(serverConnectionHandlerID,  
 status,  
 isReceivedWhisper,  
 clientID); 
uint64 serverConnectionHandlerID;
int status;
int isReceivedWhisper;
anyID clientID;
 

-

  • serverConnectionHandlerID

    ID of the server connection handler on which the event occured.

  • status

    Possible return values are defined by the enum TalkStatus:

    enum TalkStatus {
    -    STATUS_NOT_TALKING = 0,
    -    STATUS_TALKING = 1,
    -    STATUS_TALKING_WHILE_DISABLED = 2,
    -};

    STATUS_TALKING and STATUS_NOT_TALKING are triggered everytime a client starts or stops talking. STATUS_TALKING_WHILE_DISABLED is triggered only if the microphone is muted. A client application might use this to implement a mechanism warning the user he is talking while not sending to the server or just ignore this value.

  • isReceivedWhisper

    1 if the talk event was caused by whispering, 0 if caused by normal talking.

  • clientID

    ID of the client who started or stopped talking.


-

If a client drops his connection, a timeout event is announced by the server: -

void onClientMoveTimeoutEvent(serverConnectionHandlerID,  
 clientID,  
 oldChannelID,  
 newChannelID,  
 visibility,  
 timeoutMessage); 
uint64 serverConnectionHandlerID;
anyID clientID;
uint64 oldChannelID;
uint64 newChannelID;
int visibility;
const char* timeoutMessage;
 

-

  • serverConnectionHandlerID

    ID of the server connection handler on which the event occured.

  • clientID

    ID of the moved client.

  • oldChannelID

    ID of the channel the leaving client was previously member of.

  • newChannelID

    0, as client is leaving.

  • visibility

    Always LEAVE_VISIBILITY.

  • timeoutMessage

    Optional message giving the reason for the timeout. UTF-8 encoded.


-

When the description of a channel was edited, the following event is called: -

void onChannelDescriptionUpdateEvent(serverConnectionHandlerID,  
 channelID); 
uint64 serverConnectionHandlerID;
uint64 channelID;
 

-

  • serverConnectionHandlerID

    ID of the server connection handler on which the event occured.

  • shutdownMessage

    ID of the channel with the edited description.

The new description can be queried with ts3client_getChannelVariableAsString(channelID, CHANNEL_DESCRIPTION).


-

The following event tells the client that the specified channel has been modified. The GUI should fetch the channel data with ts3client_getChannelVariableAsInt and ts3client_getChannelVariableAsString and update the channel display. -

void onUpdateChannelEvent(serverConnectionHandlerID,  
 channelID); 
uint64 serverConnectionHandlerID;
uint64 channelID;
 

-

  • serverConnectionHandlerID

    ID of the server connection handler on which the event occured.

  • channelID

    ID of the updated channel.


-

The following event is called when a channel password was modified. The GUI might remember previously entered channel passwords, so this callback announces the stored password might be invalid. -

void onChannelPasswordChangedEvent(serverConnectionHandlerID,  
 channelID); 
uint64 serverConnectionHandlerID;
uint64 channelID;
 

-

  • serverConnectionHandlerID

    ID of the server connection handler on which the event occured.

  • channelID

    ID of the channel with the changed password.

diff --git a/docs/client_html/ar01s28.html b/docs/client_html/ar01s28.html deleted file mode 100644 index 6c48071..0000000 --- a/docs/client_html/ar01s28.html +++ /dev/null @@ -1,14 +0,0 @@ -Miscellaneous functions

Miscellaneous functions

Memory dynamically allocated in the Client Lib needs to be released with: -

unsigned int ts3client_freeMemory(pointer); 
void* pointer;
 

-

  • pointer

    Address of the variable to be released.

Example:

char* version;
-
-if(ts3client_getClientLibVersion(&version) == ERROR_ok) {
-    printf("Version: %s\n", version);
-    ts3client_freeMemory(version);
-}
[Important]Important

Memory must not be released if the function, which dynamically allocated the memory, returned an error. In that case, the result is undefined and not initialized, so freeing the memory might crash the application.


-

Instead of sending the sound through the network, it can be routed directly through the playback device, so the user will get immediate audible feedback when for example configuring some sound settings. -

unsigned int ts3client_setLocalTestMode(serverConnectionHandlerID,  
 status); 
uint64 serverConnectionHandlerID;
intstatus;
 

-

  • serverConnectionHandlerID

    ID of the server connection handler for which the local test mode should be enabled or disabled.

  • status

    Pass 1 to enable local test mode, 0 to disable.

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h.


-

With the delayed temporary channel deletion feature, users can define after how many seconds a temporary channel will be deleted after the last client has left the channel. The delay is defined by setting the channel variable CHANNEL_DELETE_DELAY. This variable can be set and queried as described in channel information.

To query the time in seconds since the last client has left a temporary channel, call: -

unsigned int ts3client_getChannelEmptySecs(serverConnectionHandlerID,  
 channelID,  
 result); 
uint64 serverConnectionHandlerID;
uint64 channelID;
int* result;
 

-

  • serverConnectionHandlerID

    ID of the server connection handler on which the time should be queried.

  • channelID

    ID of the channel to query.

  • result

    Address of a variable that receives the time in seconds.

diff --git a/docs/client_html/ar01s29.html b/docs/client_html/ar01s29.html deleted file mode 100644 index 7f05441..0000000 --- a/docs/client_html/ar01s29.html +++ /dev/null @@ -1,95 +0,0 @@ -Filetransfer

Filetransfer

The TeamSpeak SDK includes the ability to support filetransfer, like the regular TeamSpeak server and client offer. The Server can function as a file storage, which can be accessed by Clients who can up- and download files. Files are stored on the filesystem where the server is running.

In general, clients can initiate filetransfer actions like uploading or downloading a file, requesting file information (size, name, path etc.), list files in a directory and so on. The functions to call these actions are explained in detail below. In addition to the functions actively called, there are filetransfer related callbacks which are triggered when the server returned the requested information (e.g. list of files in a directory).

Each transfer is identified by a transferID, which is passed to most filetransfer functions. Transfer IDs are unique during the time of the transfer, but may be reused again some time after the previous transfer with the same ID has finished.

Files are organized on the server inside channels (identified by their channelID. The top-level directory in each channel is “/”. Subdirectories in each channel may exist and are defined with a path of the form “/dir1/dir2”. Subdirectories are optional and need to be created with ts3client_requestCreateDirectory, the channel root directory always exists by default.

Query information

The following functions allow to query information about a file transfer identified by its transferID.

Query the file name of the specified transfer: -

unsigned int ts3client_getTransferFileName(transferID,  
 result); 
anyID transferID;
char** result;
 

-

  • transferID

    ID of the filetransfer we want to query.

  • result

    Points to a C string containing the file name. Remember to call ts3client_freeMemory to release the string, which is dynamically allocated in the clientlib.


-

Query the file path of the specified transfer: -

unsigned int ts3client_getTransferFilePath(transferID,  
 result); 
anyID transferID;
char** result;
 

-

  • transferID

    ID of the filetransfer we want to query.

  • result

    Points to a C string containing the file path. Remember to call ts3client_freeMemory to release the string, which is dynamically allocated in the clientlib.


-

Query the remote path on the server of the specified transfer: -

unsigned int ts3client_getTransferFileRemotePath(transferID,  
 result); 
anyID transferID;
char** result;
 

-

  • transferID

    ID of the filetransfer we want to query.

  • result

    Points to a C string containing the remote path on the server. Remember to call ts3client_freeMemory to release the string, which is dynamically allocated in the clientlib.


-

Query the file size of the specified transfer: -

unsigned int ts3client_getTransferFileSize(transferID,  
 result); 
anyID transferID;
uint64* result;
 

-

  • transferID

    ID of the filetransfer we want to query.

  • result

    File size of the transfer.


-

Query the currently transferred file size of the queried transfer: -

unsigned int ts3client_getTransferFileSizeDone(transferID,  
 result); 
anyID transferID;
uint64* result;
 

-

  • transferID

    ID of the filetransfer we want to query.

  • result

    Already transferred size of the transfer.


-

Query if the specified transfer is an upload or download: -

unsigned int ts3client_isTransferSender(transferID,  
 result); 
anyID transferID;
int* result;
 

-

  • transferID

    ID of the filetransfer we want to query.

  • result

    1 == upload, 0 == download


-

Query the status of the specified transfer: -

unsigned int ts3client_getTransferStatus(transferID,  
 result); 
anyID transferID;
int* result;
 

-

  • transferID

    ID of the filetransfer we want to query.

  • result

    Current status of the file transfer, specified by the struct FileTransferState: -

    enum FileTransferState {
    -    FILETRANSFER_INITIALISING = 0,
    -    FILETRANSFER_ACTIVE,
    -    FILETRANSFER_FINISHED,
    -};

    -


-

Query the current speed of the specified transfer: -

unsigned int ts3client_getCurrentTransferSpeed(transferID,  
 result); 
anyID transferID;
float* result;
 

-

  • transferID

    ID of the filetransfer we want to query.

  • result

    Currently measured speed of the file transfer.


-

Query the average speed of the specified transfer: -

unsigned int ts3client_getAverageTransferSpeed(transferID,  
 result); 
anyID transferID;
float* result;
 

-

  • transferID

    ID of the filetransfer we want to query.

  • result

    Average speed of the file transfer.


-

Query the time the specified transfer has used: -

unsigned int ts3client_getTransferRunTime(transferID,  
 result); 
anyID transferID;
uint64* result;
 

-

  • transferID

    ID of the filetransfer we want to query.

  • result

    Time the transfer has used.


-

Initiate transfers

The following functions implement the core functionality of filetransfers. They initiate new up- and downloads, request file info, delete and rename files, create directories, list directories etc.

Request uploading a local file to the server: -

unsigned int ts3client_sendFile(serverConnectionHandlerID,  
 channelID,  
 channelPW,  
 file,  
 overwrite,  
 resume,  
 sourceDirectory,  
 result,  
 returnCode); 
uint64 serverConnectionHandlerID;
uint64 channelID;
const char* channelPW;
const char* file;
int overwrite;
int resume;
const char* sourceDirectory;
anyID* result;
const char* returnCode;
 

-

  • serverConnectionHandlerID

    ID of the virtual server the file transfer operation will be requested.

  • channelID

    Target channel ID in which the file should be uploaded.

  • channelPW

    Optional channel password. Pass empty string if unused.

  • file

    Filename of the local file, which is to be uploaded.

  • overwrite

    1 == overwrite remote file if it exists, 0 = do not overwrite (operation will abort if remote file exists)

  • resume

    If we have a previously halted transfer: 1 = resume, 0 = restart transfer

  • sourceDirectory

    Local directory where the file to upload is located.

  • result

    Pointer to memory where the transferID will be stored, if the transfer has been started successfully (when this function returns ERROR_ok).

  • returnCode

    String containing the return code if it has been set by the Client Lib function call which caused this error event.

    See return code documentation.


-

Request downloading a file from the server: -

unsigned int ts3client_requestFile(serverConnectionHandlerID,  
 channelID,  
 channelPW,  
 file,  
 overwrite,  
 resume,  
 destinationDirectory,  
 result,  
 returnCode); 
uint64 serverConnectionHandlerID;
uint64 channelID;
const char* channelPW;
const char* file;
int overwrite;
int resume;
const char* destinationDirectory;
anyID* result;
const char* returnCode;
 

-

  • serverConnectionHandlerID

    ID of the virtual server the file transfer operation will be requested.

  • channelID

    Remote channel ID from which the file should be downloaded.

  • channelPW

    Optional channel password. Pass empty string if unused.

  • file

    Filename of the remote file, which is to be downloaded.

  • overwrite

    1 == overwrite local file if it exists, 0 = do not overwrite (operation will abort if local file exists)

  • resume

    If we have a previously halted transfer: 1 = resume, 0 = restart transfer

  • destinationDirectory

    Local target directory name where the download file should be saved.

  • result

    Pointer to memory where the transferID will be stored, if the transfer has been started successfully (when this function returns ERROR_ok).

  • returnCode

    String containing the return code if it has been set by the Client Lib function call which caused this error event.

    See return code documentation.


-

Pause a transfer, specified by its transferID: -

unsigned int ts3client_haltTransfer(serverConnectionHandlerID,  
 transferID,  
 deleteUnfinishedFile,  
 returnCode); 
uint64 serverConnectionHandlerID;
anyID transferID;
int deleteUnfinishedFile;
const char* returnCode;
 

-

  • serverConnectionHandlerID

    ID of the virtual server the file transfer operation will be requested.

  • transferID

    ID of the transfer that should be halted.

  • deleteUnfinishedFile

    1 = delete the halted file, 0 = do not deleted halted file

  • returnCode

    String containing the return code if it has been set by the Client Lib function call which caused this error event.

    See return code documentation.


-

Query list of files in a directory. The answer from the server will trigger the onFileListEvent and onFileListFinishedEvent callbacks with the requested information. -

unsigned int ts3client_requestFileList(serverConnectionHandlerID,  
 channelID,  
 channelPW,  
 path,  
 returnCode); 
uint64 serverConnectionHandlerID;
uint64 channelID;
const char* channelPW;
const char* path;
const char* returnCode;
 

-

  • serverConnectionHandlerID

    ID of the virtual server the file transfer operation will be requested.

  • channelID

    Remote channel ID, from which we want to query the file list.

  • channelPW

    Optional channel password. Pass empty string if unused.

  • path

    Path inside the channel, defining the subdirectory. Top level path is “/

  • returnCode

    String containing the return code if it has been set by the Client Lib function call which caused this error event.

    See return code documentation.


-

Query information of a specified file. The answer from the server will trigger the onFileInfoEvent callback with the requested information. -

unsigned int ts3client_requestFileInfo(serverConnectionHandlerID,  
 channelID,  
 channelPW,  
 file,  
 returnCode); 
uint64 serverConnectionHandlerID;
uint64 channelID;
const char* channelPW;
const char* file;
const char* returnCode;
 

-

  • serverConnectionHandlerID

    ID of the virtual server the file transfer operation will be requested.

  • channelID

    Remote channel ID, from which we want to query the file info.

  • channelPW

    Optional channel password. Pass empty string if unused.

  • file

    File name we want to request info from, needs to include the full path within the channel, e.g. “/file” for a top-level file or “/dir1/dir2/file” for a file located in a subdirectory.

  • returnCode

    String containing the return code if it has been set by the Client Lib function call which caused this error event.

    See return code documentation.


-

Request deleting one or more remote files on the server: -

unsigned int ts3client_requestDeleteFile(serverConnectionHandlerID,  
 channelID,  
 channelPW,  
 file,  
 returnCode); 
uint64 serverConnectionHandlerID;
uint64 channelID;
const char* channelPW;
const char** file;
const char* returnCode;
 

-

  • serverConnectionHandlerID

    ID of the virtual server the file transfer operation will be requested.

  • channelID

    Remote channel ID, in which we want to delete the files.

  • channelPW

    Optional channel password. Pass empty string if unused.

  • file

    List of files we request to delete. Array must be NULL-terminated. The file names need to include the full path within the channel, e.g. “/file” for a top-level file or “/dir1/dir2/file” for a file located in a subdirectory.

  • returnCode

    String containing the return code if it has been set by the Client Lib function call which caused this error event.

    See return code documentation.


-

Request creating a directory: -

unsigned int ts3client_requestCreateDirectory(serverConnectionHandlerID,  
 channelID,  
 channelPW,  
 directoryPath,  
 returnCode); 
uint64 serverConnectionHandlerID;
uint64 channelID;
const char* channelPW;
const char* directoryPath;
const char* returnCode;
 

-

  • serverConnectionHandlerID

    ID of the virtual server the file transfer operation will be requested.

  • channelID

    Remote channel ID, in which we want to create the directory.

  • channelPW

    Optional channel password. Pass empty string if unused.

  • file

    Name of the directory to create. The directory name needs to include the full path within the channel, e.g. “/file” for a top-level file or “/dir1/dir2/file” for a file located in a subdirectory.

  • returnCode

    String containing the return code if it has been set by the Client Lib function call which caused this error event.

    See return code documentation.


-

Request renaming or moving a file. If the source and target channels and paths are the same, the file will simply be renamed. -

unsigned int ts3client_requestRenameFile(serverConnectionHandlerID,  
 fromChannelID,  
 fromChannelPW,  
 toChannelID,  
 toChannelPW,  
 oldFile,  
 newFile,  
 returnCode); 
uint64 serverConnectionHandlerID;
uint64 fromChannelID;
const char* fromChannelPW;
uint64 toChannelID;
const char* toChannelPW;
const char* oldFile;
const char* newFile;
const char* returnCode;
 

-

  • serverConnectionHandlerID

    ID of the virtual server the file transfer operation will be requested.

  • fromChannelID

    Source channel ID, in which we want to rename the file.

  • fromChannelPW

    Optional source channel password. Pass empty string if unused.

  • toChannelID

    Target channel ID, to which we want to move the file. If the file should not be moved to another channel, this parameter should be equal to fromChannelID.

  • toChannelPW

    Optional target channel password. Pass empty string if unused.

  • oldFile

    Old name of the file. The file name needs to include the full path within the channel, e.g. “/file” for a top-level file or “/dir1/dir2/file” for a file located in a subdirectory.

  • newFile

    Target name of the directory to create. The directory name need to include the full path within the channel, e.g. “/file” for a top-level file or “/dir1/dir2/file” for a file located in a subdirectory.

    To move files to another subdirectory in the same channel without renaming the file, fromChannelID has to be equal to toChannelID, keep the file name itself but just change the path.

  • returnCode

    String containing the return code if it has been set by the Client Lib function call which caused this error event.

    See return code documentation.

Speed limits

The TeamSpeak SDK offers the possibility to control and finetune transfer speed limits. These limits can be applied to the complete server, specific virtual servers or for each individual transfer. By default the transfer speed is unlimited. Every file transfer should at least have a minimum speed limit of 5kb/s.

Neither the TeamSpeak client nor server will store any of those values. When used, they'll have to be set at each client start to be considered permanent.

To set the upload speed limit for all virtual servers in bytes/s: -

unsigned int ts3client_setInstanceSpeedLimitUp(newLimit); 
uint64 newLimit;
 

-

To set the download speed limit for all virtual servers in bytes/s: -

unsigned int ts3client_setInstanceSpeedLimitDown(newLimit); 
uint64 newLimit;
 

-

To get the upload speed limit for all virtual servers in bytes/s: -

unsigned int ts3client_getInstanceSpeedLimitUp(limit); 
uint64* limit;
 

-

To get the download speed limit for all virtual servers in bytes/s: -

unsigned int ts3client_getInstanceSpeedLimitDown(limit); 
uint64* limit;
 

-

To set the upload speed limit for the specified virtual server in bytes/s: -

unsigned int ts3client_setServerConnectionHandlerSpeedLimitUp(serverConnectionHandlerID,  
 newLimit); 
uint64 serverConnectionHandlerID;
uint64 newLimit;
 

-

To set the download speed limit for the specified virtual server in bytes/s: -

unsigned int ts3client_setServerConnectionHandlerSpeedLimitDown(serverConnectionHandlerID,  
 newLimit); 
uint64 serverConnectionHandlerID;
uint64 newLimit;
 

-

To get the upload speed limit for the specified virtual server in bytes/s: -

unsigned int ts3client_getServerConnectionHandlerSpeedLimitUp(serverConnectionHandlerID,  
 limit); 
uint64 serverConnectionHandlerID;
uint64* limit;
 

-

To get the download speed limit for the specified virtual server in bytes/s: -

unsigned int ts3client_getServerConnectionHandlerSpeedLimitDown(serverConnectionHandlerID,  
 limit); 
uint64 serverConnectionHandlerID;
uint64* limit;
 

-

To set the up- or download speed limit for the specified file transfer in bytes/s. Use ts3client_isTransferSender to query if the transfer is an up- or download. -

unsigned int ts3client_setTransferSpeedLimit(transferID,  
 newLimit); 
anyID transferID;
uint64 newLimit;
 

-

To get the speed limit for the specified file transfer in bytes/s: -

unsigned int ts3client_getTransferSpeedLimit(transferID,  
 limit); 
anyID transferID;
uint64* limit;
 

-


-

Callbacks

This event is called when a file transfer, triggered by ts3client_sendFile or ts3client_requestFile has finished or aborted with an error. -

void onFileTransferStatusEvent(transferID,  
 status,  
 statusMessage,  
 remotefileSize,  
 serverConnectionHandlerID); 
anyID transferID;
unsigned int status;
const char* statusMessage;
uint64 remotefileSize;
uint64 serverConnectionHandlerID;
 

-

  • transferID

    ID of the transfer. This ID was returned by the call to ts3client_sendFile or ts3client_requestFile which triggered this event.

  • status

    Indicates how and why the transfer has finished:

    • ERROR_file_transfer_complete

      Transfer completed successfully.

    • ERROR_file_transfer_canceled

      Transfer was halted by a call to ts3client_haltTransfer.

    • ERROR_file_transfer_interrupted

      An error occured, transfer was stopped for various reasons (network error etc.)

    • ERROR_file_transfer_reset

      Transfer was reset. This can happen if the remote file has changed (another user uploaded another file under the same channel ID, path and file name).

  • statusMessage

    Status text message for a verbose display of the status parameter.

  • remotefileSize

    Remote size of the file on the server.

  • serverConnectionHandlerID

    ID of the virtual server on which the file list was requested.


-

Callback containing the reply by the server on ts3client_requestFileList. There event is called for every file in the specified path. After the last file, onFileListFinished will indicate the end of the list. -

void onFileListEvent(serverConnectionHandlerID,  
 channelID,  
 path,  
 name,  
 size,  
 datetime,  
 type,  
 incompletesize,  
 returnCode); 
uint64 serverConnectionHandlerID;
uint64 channelID;
const char* path;
const char* name;
uint64 size;
uint64 datetime;
int type;
uint64 incompletesize;
const char* returnCode;
 

-

  • serverConnectionHandlerID

    ID of the virtual server on which the file list was requested.

  • channelID

    ID of the channel which file list was requested.

  • path

    Subdirectory inside the channel for which the file list was requested. “/” indicates the root directory is listed.

  • name

    File name.

  • size

    File size

  • datetime

    File date (Unix time in seconds)

  • type

    Indicates if this entry is a directory or a file. Type is specified as:

    enum {
    -    FileListType_Directory = 0,
    -    FileListType_File,
    -};
  • incompletesize

    If the file is currently still being transferred, this indicates the currently transferred file size.

  • returnCode

    String containing the return code if it has been set by ts3client_requestFileList which triggered this event.


-

Callback indicating the end of an incoming file list, see onFileList. -

void onFileListFinishedEvent(serverConnectionHandlerID,  
 channelID,  
 path); 
uint64 serverConnectionHandlerID;
uint64 channelID;
const char* path;
 

-

  • serverConnectionHandlerID

    ID of the virtual server on which the file list was requested.

  • channelID

    If of the channel which files have been listed.

  • path

    Path within the channel which files have been listed.


-

Callback containing the reply by the server for ts3client_requestFileInfo: -

void onFileInfoEvent(serverConnectionHandlerID,  
 channelID,  
 name,  
 size,  
 datetime); 
uint64 serverConnectionHandlerID;
uint64 channelID;
const char* name;
uint64 size;
uint64 datetime;
 

-

  • serverConnectionHandlerID

    ID of the virtual server on which the file info was requested.

  • channelID

    If of the channel in which the file is located.

  • name

    File name including the path within the channel in which the file is located.

  • size

    File size

  • datetime

    File date (Unix time in seconds)

diff --git a/docs/client_html/ar01s30.html b/docs/client_html/ar01s30.html deleted file mode 100644 index fcc3559..0000000 --- a/docs/client_html/ar01s30.html +++ /dev/null @@ -1,47 +0,0 @@ -FAQ

FAQ


-

How to implement Push-To-Talk?

Push-To-Talk should be implemented by toggling the client variable CLIENT_INPUT_DEACTIVATED using the function ts3client_setClientSelfVariableAsInt. The variable can be set to the following values (see the enum InputDeactivationStatus in public_definitions.h):

  • INPUT_ACTIVE

  • INPUT_DEACTIVATED

For Push-To-Talk toggle between INPUT_ACTIVE (talking) and INPUT_DEACTIVATED (not talking).

Example code:

unsigned int error;
-bool shouldTalk;
-
-shouldTalk = isPushToTalkButtonPressed();  // Your key detection implementation
-if((error = ts3client_setClientSelfVariableAsInt(scHandlerID, CLIENT_INPUT_DEACTIVATED,
-                                                 shouldTalk ? INPUT_ACTIVE : INPUT_DEACTIVATED))
-    != ERROR_ok) {
-    char* errorMsg;
-    if(ts3client_getErrorMessage(error, &errorMsg) != ERROR_ok) {
-        printf("Error toggling push-to-talk: %s\n", errorMsg);
-        ts3client_freeMemory(errorMsg);
-    }
-    return;
-}
-
-if(ts3client_flushClientSelfUpdates(scHandlerID, NULL) != ERROR_ok) {
-    char* errorMsg;
-    if(ts3client_getErrorMessage(error, &errorMsg) != ERROR_ok) {
-        printf("Error flushing after toggling push-to-talk: %s\n", errorMsg);
-        ts3client_freeMemory(errorMsg);
-    }
-}

It is not necessary to close and reopen the capture device to implement Push-To-Talk.

Basically it would be possible to toggle CLIENT_INPUT_MUTED as well, but the advantage of CLIENT_INPUT_DEACTIVATED is that the change is not propagated to the server and other connected clients, thus saving network traffic. CLIENT_INPUT_MUTED should instead be used for manually muting the microphone when using Voice Activity Detection instead of Push-To-Talk.

If you need to query the current muted state, use ts3client_getClientSelfVariableAsInt:

int hardwareStatus, deactivated, muted;
-
-if(ts3client_getClientSelfVariableAsInt(scHandlerID, CLIENT_INPUT_HARDWARE,
-                                        &hardwareStatus) != ERROR_ok) {
-    /* Handle error */
-}
-if(ts3client_getClientSelfVariableAsInt(scHandlerID, CLIENT_INPUT_DEACTIVATED,
-                                        &deactivated) != ERROR_ok) {
-    /* Handle error */
-}
-if(ts3client_getClientSelfVariableAsInt(scHandlerID, CLIENT_INPUT_MUTED,
-                                        &muted) != ERROR_ok) {
-    /* Handle error */
-}
-
-if(hardwareStatus == HARDWAREINPUT_DISABLED) {
-    /* No capture device available */
-}
-if(deactivated == INPUT_DEACTIVATED) {
-    /* Input was deactivated for Push-To-Talk (not propagated to server) */
-}
-if(muted == MUTEINPUT_MUTED) {
-    /* Input was muted (propagated to server) */
-}

When using Push-To-Talk, you should deactivate Voice Activity Detection in the preprocessor or keep the VAD level very low. To deactivate VAD, use:

ts3client_setPreProcessorConfigValue(serverConnectionHandlerID, "vad", "false");

How to adjust the volume?

Output volume

The global voice output volume can be adjusted by changing the “volume_modifierplayback option using the function ts3client_setPlaybackConfigValue. The value is in decibel, so 0 is no modification, negative values make the signal quieter and positive values louder.

Example to increase the output volume by 10 decibel: -

ts3client_setPlaybackConfigValue(scHandlerID, "volume_modifier", 10);

In addition to modifying the global output volue, the volume of individual clients can be changed with ts3client_setClientVolumeModifier.

Input volume

Automatic Gain Control (AGC) takes care of the input volume during preprocessing automatically. Instead of modifying the input volume directly, you modify the AGC preprocessor settings with setProProcessorConfigValue.

How to talk across channels?

Generally clients can only talk to other clients in the same channel. However, for specific scenarios this can be overruled using whisper lists.. This feature allows specific clients to temporarily talk to other clients or channels outside of their own channel. While whispering, talking to the own channel is disabled.

An example for a scenario where whisper may be useful would be a team consisting of a number of squads. Each squad is assigned to one channel, so squad members can only talk to other members of the same squad. In addition, there is a team leader and squad leaders, who want to communicate accross the squad channels. This can be implemented with whispering, so the team leader could broadcast to all squad leaders, or a squad leader could briefly report to the team leader temporarily sending his voice data to him instead of the squad leaders channel.

This mechanism is powerful and flexible allowing the SDK developer to handle more complex scenarios overruling the standard behaviour where clients can only talk to other clients within the same channel.

diff --git a/docs/client_html/images/caution.png b/docs/client_html/images/caution.png deleted file mode 100644 index f79d8393d897776a11ca8e87feb089ad74f772bf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 887 zcmV--1Bm>IP)rfQOPo7r_eio!4f8L1m(9y|)4xJp_#6esfbnK!o4mvnn910bs zQ->B85ebT*2#TMe0TrwerB++5`M;?L^J1R*`tjsFF9ecv{^y)u?oDp)jRXMnh1w7L zV(lB~{{%WYIiX}SSr{VZ(Qa>V;q`h!L=Zw?Zf*|ww!DD)`};ved`Oanjg5`J1GKrh z2}zO|BnRd7dSMtw>47>sI~ihPVghcro3DexU}=GtmzTMCQ&SVt=`>=o7~2{e8jwsT zO9S-u^n~W-W-cBIh1low`Pe=_K3*E2nVA_b+Sb-)dR~r>j^J=OKtymj95_BcE-sL+ z>!_=%W1!X5Rf}e9Y>fTAy}iW+8XX;dx7gj?9qQ}rSr?1NiUV|dddkBgguubU0RZ6Q z;sT1IKv5K^stN!I27?Ub@p$n3{9Je-zu(VAhKGkuvvtm%12PN)?d|PspPij8EYSM; zI!}HzH8r@tzBavexx%}R$J{-|znzkgBR2R9#(-tE(#%s_D88m&?Vg%&o00i$?sq z=#R(aeE#_ONFI-;pxc~ODwW$@P&68)*49>&-vZRw*vRMEY?gFgFWMgLbuHU%P$rWx zt^A60_HBxgH_*QZ^b>e-al`u*WuE{5 N002ovPDHLkV1gvtn9l$J diff --git a/docs/client_html/images/home.png b/docs/client_html/images/home.png deleted file mode 100644 index 427c62814ceca61222848041302649635f637a20..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 879 zcmV-#1CacQP)?E(Iv0Vd4M)0{lrt zK~z}7?U+wU6k!;~pLe#{HK-XeJ;l1x2EsPjNyI}zq!)?6=rRc25@Qd0h!zwHLTEwg z(xLJocw1y|tt1^J#e*gOL3D+n!$Nv+*_PdnOqTZP;w+=Bxqn-Nec*-p=AHSz-}ip= ze(%fxbyZO$6_WQzPLkXv`G(|$S^}M>Yo+#iu0#+UfLCUFXJ-eAL;~I2-R7y!B)0)5 z0PL1q;{X-`ycCgWrJ|yed}oGYYio7BYSY2I3XJ;ptmzRs0)ZE-$MKb9+ z$uH(Kg25mg8XAgP$ioe${s(VliH zjGyE$l1!)5?CP5@Y0S;67q z;Xi$2u#^^uwc39K;PUx=Xl`!C{{B9K!5}s^Hek2g;q&<_GWgWg6k@R$bX|wn>xIkZ zLQhYR>0Y-k*%j-)Lz0GJOfToB3X@Hx%BU{R4N5c)1WBj1v8t?BAHB<1QZ9* z4T(geqA-n(jTjmlGMkGck~!;{@sNzM z`uaxlMnPY$B-;Tz25<{NQ-u>L4qySm3lWLb{~`VN`VD5ftQuuk;J*L>002ovPDHLk FV1k^Qh2H=G diff --git a/docs/client_html/images/important.png b/docs/client_html/images/important.png deleted file mode 100644 index d35f5943b83a5f9851449a141f7929d238e10e9c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 887 zcmV--1Bm>IP)?D=Zgb4a)!k0|ZG# zK~z}7?U+4C>rfQOPo7r_eio!4f8L1m(9y|)4xJp_#6esfbnK!o4mvnn910bs zQ->B85ebT*2#TMe0TrwerB++5`M;?L^J1R*`tjsFF9ecv{^y)u?oDp)jRXMnh1w7L zV(lB~{{%WYIiX}SSr{VZ(Qa>V;q`h!L=Zw?Zf*|ww!DD)`};ved`Oanjg5`J1GKrh z2}zO|BnRd7dSMtw>47>sI~ihPVghcro3DexU}=GtmzTMCQ&SVt=`>=o7~2{e8jwsT zO9S-u^n~W-W-cBIh1low`Pe=_K3*E2nVA_b+Sb-)dR~r>j^J=OKtymj95_BcE-sL+ z>!_=%W1!X5Rf}e9Y>fTAy}iW+8XX;dx7gj?9qQ}rSr?1NiUV|dddkBgguubU0RZ6Q z;sT1IKv5K^stN!I27?Ub@p$n3{9Je-zu(VAhKGkuvvtm%12PN)?d|PspPij8EYSM; zI!}HzH8r@tzBavexx%}R$J{-|znzkgBR2R9#(-tE(#%s_D88m&?Vg%&o00i$?sq z=#R(aeE#_ONFI-;pxc~ODwW$@P&68)*49>&-vZRw*vRMEY?gFgFWMgLbuHU%P$rWx zt^A60_HBxgH_*QZ^b>e-al`u*WuE{5 N002ovPDHLkV1k4gl|cXi diff --git a/docs/client_html/images/logo.png b/docs/client_html/images/logo.png deleted file mode 100644 index 075082239975b360ded97145b6bbd21ba0f3f5a0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7194 zcmV+#9OdJQP)WdJZYFEKSQFg7@+rC9&~ z8*fQOK~#90<(qkQUB#8Je^qC?_iC0b$+A2H9x=oi2myyNVMyqH=`bXaM<+DFWF%zn zkaTGJ<&kunhRh@cHzW-t*f@cX0b>lFC)t)YSh8m6>dy0Y?wLn7W&ujz+YQL03d|C;|8w!_%~L12)$UAg{vh=S|(E3 zBuZj~&*zgASpnk!;~cK*z_Kh@y3Sqj5C;OTdBsH$6DTR#V7<&^+fK@h|}4s$kh=DzgoFaF8@XO4G@ye$AvJ^T8~SStBk zIFVVI%H+}0e$Y6)Yty*^2G3A`BuLVE^|cE=P*vM_U3GoqmCXy5kjk1_AcQ3dW3O<^ z*Z=m%-`aJC^qoF{efvhe2RjbFF&Ic*(%V-W?`VIk8X9Q1SXI^ICzlUK6W7e1RX3M& zWQ#^oqg*g36$&PGQ-(K_Y9`IvY4mSZWAl<*YwG8IV$OmkiyE31KoH<6lDI*U$!53!HNk94aVDP(lJ=Y)}wshwVCTGI6_WYin~esIRH5 zU-XHZ`Z=F(n!jXO)BLj`i_{e)`jjG(@BjMYZ@l9f$T=_V0&gV+(>d3$92k}ffePcl z6Ps`V=;#_eTlSPcjMhGm+;#`!56PaQQ<9v&)nQzRUTNjw1K9f!i|16ytema+lel8v!{z~(r zm30ks=HKO7?v0=R^1uJn6OVrN*Y6a<>G}by48s9q3}cgp;Y|mst7|}iea8U=B8m6u zmb>MSFFf?Q=bw49ySuaH+SZo+-PueUoO9T=jbc$nGMPpo7{Q1?jC58d`J%blcIn3n zk)GnB&>D{Cp9zF>H*DB&i!h-N*<@t!p-9h>%LY65ZsG0!1@>^K097hTFSF z;18vcNEe_P7B~P&5&&?h1r@^~8=yJo|CZ-&9tx3caI4 zZ6Aw{bbV^D`(Qj297WM|Z*#z2zw2v{Tz19*?Ap~=?>cN*zMx{JrGgM*3xt9S0#sE+ zp-_MNboPdEq|=YqV}2YTh#;28!(|+bB7#y1 zwWuKwiXfTH!ghtV5R~7AX^BQ9b1Pa z3gDbW)l38<8FcoBaHw+xeM2#*nh9AJAqfI($3;AzKs1&FgK(AO@@?UG?gybz$Ty}p zogVFukG5SG5BB_5Brt?*UahoT_M2Nj{os9P3;^T&Ji~Ma%d}?PEyf!mZyJVeSrBE9 z&vf}OSKM-oTsv%jCl!zEC4_)d3PGTdBmtr*z%*?P2a`B*%#ZH=2z1keB8#Auz;PTz zV{zmQnnXqKH2eBfC`WP&EJ3bTW1Dr|K$5I(=gUk zDqzx9I*rJZ08O`Xv^#*Ds!xKD%jF;lQiCYU&u-hczj3TiZ*OnG)Cza1*?7XXEQq44 zc)aCLUUuWU`EMIQHmANv({0$6J)`}X00?<-oa84=q5yAM)hzgYw*Y`)Yfl!7xtu6T zrvv~1l1O1$4mx^5&NEqJ`;b0tcC zj%kRW5&#wO9<`{$=l17zI1RT0NZk4**094fpHFiqo!f5=dusnaRC5yx3zV*w;t-UOdV91fhh+R zUj?y1t_6TX!PsuwR#cW}UJOqbQ4rt{XP_3%aZ>;Q(=;%d@kYpKUzVdaq-~QQ2v%u8tUs;A8qf`JDBoHdzv*wB$XH5&> zSnu#{p>XQgso|`*w!RY8w>2VgyN13Sv(T>)arT9av8;I>e6j-5vS8V^*J13JAH3<_ z|E=qKcsOwMBdMsr)phMDQ=5Z>QW1hAFJHKD`FsFSM5&Vydh*6`N)ZJC@pJ)(VUI)L zoWpe-G|p~Xc>V<||88RWLpy&H<;>kAh$27$kGEnDYphxz=v7H~Sz2^3PdtQHbsNfs@n5203 z);7#*C{4W+qvISz5I~7g<8Wa$0RQEeERBWZ1su+%;W})RZO66l7FOish>hAJ@T z0st6esIIO?c}2x70RCfQ9R_T0UFS2DP%6q^fC{$(cpLy5*O*CW?`f`RYTQt{7vHUU z09Se%@O;_7;hDOh;w$IegTHBBiTYwU4vNoV-~8inYzG1a*tQK(@zgoY`8)s&4jvt_ z^!yj~Vs6s5NC<`N*eGOUC~8>)0BS3QvQFCPCrseUKW?wC5`1^;wtDa*{s_KP zb`u_uAAo>r3?TtW0A^J*qoJ$;Wida3^fmN0`(fubP(nb60LOLz_Pq1XD+7S`121o| z^up5<(`|$jWD)^nli?RKiQwx1VA=L1w&S3t(uWIIEx@eWa#*JUfe=8|47lt~+u^*l zlGM(stE{hTTsyJ+fdh}~vLx(R6d42r9$%#bul)XT02PvWA)(Tu$FtAkg7R|wZTamu zj9zTPYdC=I2y1=FAq%%2Kjtfx~aQ^bSm{nU2+c`A^LI`Zzh3iiBPs+1?TkAaR7G4ymZJ&q1Qc#YF{~8(1(NAg;u0HA2{ z2V5v#RV~dT*JYrDVC9k~lzA1njGcnO*wS*6+szm}9xoJ0J|CEz?-Z!e%bCk5rJz&< zC3M9&fM_&Fdy_#}ZXPi=hC}Wi^g4TyU=ifCI7aOu#Jvd=nmF{Ob#PZ!!}2khqzKC> zf=~+AwV|u(B-c)%&aWKX%#@T8%$mJ$`FqxW#S*;4*i76*hDgoSVssO1HlFR6r1gt+FhG zbB^+=2BoT|;oomubEEItt1tWUaDUHJmT6A%8*JM}eO)=~YRcfa)0+ZEDMk<|#iY}1 z4uB9amz6DDu(Wz&om#IaUGDQ{BuNAa0TsluaR7#D9Ze3U3{RmNg5N?hK8&KxVUk+p z{(Sa23MSOlzEjYUT107Ww30EU`m)FGf5In zK^RLk6KNd4vSDwZK9WAQc6&Y zT)8j~;MR?|x^^M=>+)6+mUb@UqXt;i#bsE9kKz*Cgp2TDtit(dL}0KLTSoT7-D6=E zodvn949UnKY*YV_ojZ3rC--S_!@Oai*E>)$gA)l7U!_-6Jda#)#TDXxUtG628VWq_ zSSBbL^Xvdcmf-csU~Dn~#yMnJL~WIC%0gMnDi=^x)nqW3S0_HZ1>mwII1_Y`aR30I ztS;L?dlPR|?VJPKSb?tgeK^$lM--BM5VBFkBOTb>`dj?6^Y;jEQ!%SeK;zQoNJfT` zij5v3Tz`7%s{$T;@J>ULq`^|q!%J=}bKvn+U5@f|z5oCNeM9#T4)hIBGM4({poEkX zAScZL*JY@yE`!gfOo2lQMK+y=u4#P$tclMafBbO)pz?TgoHJm;R!5QI@5;|u_Y0OHNNY`uJo4j^;t-dQxtw# zK<4L3IFFgASNt(2Km2!oZRotSF zTye!GJzu+T-DWkP|D7z$AcVkiU6|(Npvrb!G}Tw4rqTz;ojm;oL4c-d80hN(K=(`m zP=|6^6sl~;0p}c!Wtvj}06=g1&XG&5T6Lp9`Q2h~X217v)~RSSP&weh3mGQW5gP6| zmJIcOg}8-lqHi&H04OW-$Yc3D0H9O=p(1S4L?#)&E)eOs3;-4`Ui`13KnjW?L(?tj zhCQB)bzKIZSHfBI>nFLuV(5$t!5ULHmK)4ecs^$m+v)du(H4sOjkg;3nD`_`qJmypc?gAG%pn~g zMIn>04K2UZ(uzF*aN&7p9Ulp$Gma}%q%ta8#vqA8$<_(5{H!K;6lsd9JeD#))_xR) zT=w}lcDz32mWs*Dg@)~VZQBNOEV!l~m=VB)hB<)4C;r~Cc*}j|JeC0ng{iCX_Z&(U zvauiJHT6}ynC%3Ba5%g`H=S=tlGL0?r4UWzAy5j&I9$fC;_N2W&k!t0vW#drgtj9s z`D|W)V!A#sMpo;F4VN((S{{Z`?0icAXG$33vnk{@L|cathu^gvKWC%@Ksa<0idbv-9VMfn-ghm zmOmK5XgG~vG+XlP1%g#en=yY*EgWa+-~m8U6!i5R$AP^&M;*ub*Xhb^J8*18p{QSy zNM*ns8)`P0)e42b41hvGY6SS)qE=c1%B$VQ)Wz%h@uGBaq#L(FQBKp<0maGd!C=J+_7VW^YeM_&Vk_oz&Wys z0Jv@Ze!QJ`Y24#tTlU&~QHSF)hyoA`^u?30;dO;jD1uOeH@3cvEt_B1nNG*=7#J8Zrz_ht99ovjO|@UwVhaWyy37dLe~OBG4{L_N0vQyJ`Z_aPl9biJWAa z78H*HEuTg-*t>aZIe6q4m}?^z=!N4L-;6|p`owbY8i1aW$f7rP9J+mAsI;&V zP}rsc&YV90DD?I9ReCC_9(EYCpJ-O_=24JAyfB#4@QC%pgkR=J6GsxaDR8}|C zMgo1v=kr7=tCvh`>MBnNfh5Tw0!1_w#GW0mC_5J!# zd*8hN;Q+K;9LZ3BFI+P1Liw%$Xzv=hX78b%J3G7jAc`dw92}DDg`{{d0zlTRS)=xj zBr}B2@zfU;gcGoUSTu~bBP}?vcV{6S4*aZ8$o<=??0rl+jt~F%Xy?!kyZ0Z3t>qCO zK325!;y)x3qlxLtpK$>BaJYVZ=g2RPbo2?jVM3NpsNkgmT9&y2fR_-WjRX^%Q3;C2 z14=10O-29E06N=S(b0CqOvIzVH;m#V2M-?XI33+xeWMSxb`E}a^J{yd7xD-VwsE7F z{Y)Y;I^)IaGYWt)rX1}W`OUH3;F4i~5Q?IJpyaO;A|Rg%L(8W$02U90d?~NDzF;u) z_Z^3ScnJMH$KW3sisbY84X(?c+P80K+v)1=8w~yMNax_!|M1dI6vgWebu(@yFsZ4?uy`y!Er1U^J%0aL#peT-vi*p6y?fT zB)0g;_3NGE-5tY@X&rHx^O7tJTX*l?KCMeToiN5K21X)3In*}rsptRn2I8>@B17%0 zkc!-!NR0mct?HjK0K?%_#nx@FbhaGW9`#7#JV}=82oXfiT;jS`#7l(OF@LL=<} zpz6AR)AO5d-L&yPhgYv&-TUg6t#9?E$rMpl^Zf4qz+?Lk_q^}LS9T#83nDtwX=>Tn zx|9ep!&I?~wKSZ3R{P+MDzfq{V{fYUtsJw1uU(w`p+#QtT+zRue1yIPQn zjvx{2jTuJz&SW(7%IUQ6jz60EYf83Qyf~4_KhV=3{LtoY`_b9ag>-ZX*~I96W?A>d zx@ zO#2TjR-XOZd1ue*p_J;UtoZgiQyq*ZSL?d{!AwrQF`mk=>KhDV-+@EuJKlv%A_&{a z?`E#PUJ?0*U@-V+>ppD&+qZ8QH}B~BXn$|-9fE-C=gwUq*45R9nw#ewnK!SgrM9xV zqp`7eX#VW-80Wk|DV;VxKcQ3vP?67@4e4TWkzttUYDN8`OisNpoyjkb#4_mU?833m zPDH~a&gJPP@OrmFe8p%)X5Y585p?gDYz33J+2HQf)uK668z cUO4CYZ+3za-&6~TzW@LL07*qoM6N<$f}nBF?f?J) diff --git a/docs/client_html/images/next.png b/docs/client_html/images/next.png deleted file mode 100644 index 7fa9992f06c145a56aa913fb3cb403f2f8ced40c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 681 zcmV;a0#^NrP)?E;^pVOy2+i0yarR zK~z}7?buJN5>Xfi@aK3VXwf3tv=&;ox?dtCY8m2xK^zlvp|p^ah6o7>0trK}-0E`g zcZdi#E!qUS8l=UzbYX2H^=adTz1K;{bk3q)IEy(mFu(WAnRDJ5;D78fNZuv+Zqe?M zJkW`WlbrK>9Owdl=IS`rf^tS@G#W7)jdD7jE~8F-M>%)4ZJPiXi^U}Bt*DHf zAyIF9L#+YXS4C{9N6e%_a(k0?1#}=aA$rZ6F6#E|-_P?q~%mr4S4Tm%F}d1vMHC7>3~- z&HfFmhj)gl)oK#+&~=UpP!hlq01Ssi*tWekiSc-h zNF?HVzFMuqG|lC%$4aS3n{KYxNPgSZ=31##0=~NnZNw zZ!5w}B(MCTktF;5{y9vsSd^IOzLl^NWEh6ruU>4lv+o0x$z&wvrC*rK5|m1%wySw| z4H^svjK|~h^QY^%e%=A?ECPh~mcsx50=!8? zK~z}7?O4xC0znl1Rs|slZ*SKu)~@YJhdvnC-FdTo^WHb}-V8%Tgg*om{uurV{RE3r z$Mf?uPESu!uh$_-((h+(GGTLb6WMGQPN!4ZkQA`BwM77QZ_#L!z60~sD(m%nu-okb zfMha>m6erWd#Ky(qFSv20GiDvJRXmF54Bn?c}9XDkRA{OLH?&Gii&m?EwdbrM#$&$ zczb)p-rgPpfq?$1*5aW|CNralcsx$!a+zLVUv=}4re%MBe?RliaUAyd_rbC(j*gD- z@bIwMeJB(P$h(I(>GX`e(w6JrZBr_%|J<7PHXwfMLobkFvkPKScQpe9Y3OeVUyxzSHUAHlLLIF7^m z`nsm@U0hrkS5v!OF7Q0BsT@%(`t&T&+U+*^{r(?A=61WO)9Dx!vX59>TLaJY@cDe- z+7$`~uq?ZnW02eJ2G8^GdcBG^(|Ubj=Q5AS1D@wU>CBK^rWRhW7tLl9mzS4d7zVLe z49R42zFhY5@}fCkscjaEg$9Fxwp_Nfw1ng1V?#Wb$z))&*%bSk@2+F+?(QIpBJ{Yi tVHgG*8ync(-Uh=k^AY;L{rD%O0`D?bJb4whJDC6g002ovPDHLkV1k&;ciaE~ diff --git a/docs/client_html/images/prev.png b/docs/client_html/images/prev.png deleted file mode 100644 index c1c82ea9722684fe8403552eba50036521e6aa9d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 649 zcmV;40(Sk0P)?E+_rOAO-*c0v1U` zK~z}7?bxxa(?A>t@b9%wMR-2w<{uz!$LD{bPVNpNwxx6_g${v&g>LO6C|HCyq+*l` zD(KcXI66DEPK8J9AUJ91AP7yrF7NbAlcwj(%PsE*2Y2Ce_sK7iy9;m`7aSzBB#-$w zKA6UQ;&#kUVO}vJOkiHh$=B;O%jGhs)2V7YObe4C`CQKG`#!7HDgkgZnW&(vX6}o+mR; z)yy=T&3`f@%WO8IMoePRk(ehcrqybNVgPWlSWq**lf0($${qt~$%f-N7z_rHoyX%b z^7(x1gO*Aq6pKXwI0SGDz`K32^GJOZ$8jPvqgyP?Qip!959XnIN4wol45JMq*;jja zI-Nu@S|E~l)SlgLH*riHC=)Qr!t=b;QJIiyHvqgfh1voMA$$OqDOBjvA%yTrT4&9B5(NOG(I|2-&-0MW z6_7hSveiFOs+acTADQ(HcM%z+C`8 j0k}elkC#8HE-HQl`tlnt`16>H00000NkvXXu0mjfX~`7* diff --git a/docs/client_html/images/up.png b/docs/client_html/images/up.png deleted file mode 100644 index 9fd790394960e32045cc4eb3b6c0580f9b80c564..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 612 zcmV-q0-ODbP)?E*IM!5UKzG0r5#h zK~z}7?bxwv8etd)@aMe?G=G3YbqP8IN1=|LTDx@0AD|!?1QB8_f;fniLkodGp=1bc z+6GCSJ9OyKq0l8u*De)06$+*8;uTJxF1~VnJ;_DAUPyi5fjhrD@8{`#+zG7nzlCI( zveNGvNF@jt%2^9v#PFuh%nC`>|k(#UcR^06U$Ii8>%Dv0$|A zcH2ZfSve{!M%!w&Ow`krp)QNjHk(Zob+|NYQH-|HXmB!__)$j-qn5>J>-D;cdPdTU z1*5IiY9{IhNjnydwpy*4s8<)FqQYn^m5Pb#&qYOz(K?R9@p$Yz3!r{^9dkw}D|K2oU^GMP-6O;2=THbIHVDS%x7 zAE&4FU*t1@2O@H;FZj<8rUS-Y#8xzR=(x4$Cd0&s)I zEL^dyL2J;m344|O(uHg`i$bAr@h7z`B$G*99Rv8W%A0(P%V2LZTTeamSpeak 3 Client SDK Developer Manual

TeamSpeak 3 Client SDK Developer Manual

- Revision - 2019-06-11 17:55:55 - -


diff --git a/docs/client_html/ix01.html b/docs/client_html/ix01.html deleted file mode 100644 index 9ca049f..0000000 --- a/docs/client_html/ix01.html +++ /dev/null @@ -1 +0,0 @@ -Index

Index

Symbols

3D sound, 3D Sound

A

AGC, Preprocessor options
Automatic Gain Control, Preprocessor options

B

bandwidth, Sound codecs

C

callback, The callback mechanism
calling convention, System requirements
capture device, Using playback and capture modes and devices
Channel order, Channel sorting
Channel voice data encryption, Channel voice data encryption
client ID, Connecting to a server
codec, Sound codecs

E

encoder, Encoder options
enums
ChannelProperties, Channel information
ClientProperties, Information related to own client, Information related to other clients
CodecEncryptionMode, Server information
ConnectStatus, Connecting to a server, Disconnecting from a server, Channel sorting
InputDeactivationStatus, How to implement Push-To-Talk?
LogLevel, Logging
LogType, Initializing, User-defined logging
TextMessageTargetMode, Receiving
VirtualServerProperties, Server information
Visibility, Joining a channel, Kicking clients, Channel subscriptions
error codes, Overview of header files
events
onChannelDescriptionUpdateEvent, Other events
onChannelMoveEvent, Moving a channel
onChannelPasswordChangedEvent, Other events
onChannelSubscribeEvent, Channel subscriptions
onChannelSubscribeFinishedEvent, Channel subscriptions
onChannelUnsubscribeEvent, Channel subscriptions
onChannelUnsubscribeFinishedEvent, Channel subscriptions
onClientKickFromChannelEvent, Kicking clients
onClientKickFromServerEvent, Kicking clients
onClientMoveEvent, Joining a channel
onClientMoveMovedEvent, Joining a channel
onClientMoveSubscriptionEvent, Channel subscriptions
onClientMoveTimeoutEvent, Other events
onClientPasswordEncrypt, Custom passwords
onConnectStatusChangeEvent, Connecting to a server, Disconnecting from a server
onCustom3dRolloffCalculationClientEvent, 3D Sound
onCustom3dRolloffCalculationWaveEvent, 3D Sound
onCustomPacketDecryptEvent, Custom encryption
onCustomPacketEncryptEvent, Custom encryption
onDelChannelEvent, Deleting a channel
onEditCapturedVoiceDataEvent, Accessing the voice buffer
onEditMixedPlaybackVoiceDataEvent, Accessing the voice buffer
onEditPlaybackVoiceDataEvent, Accessing the voice buffer
onEditPostProcessVoiceDataEvent, Accessing the voice buffer
onIgnoredWhisperEvent, Whisper lists
onNewChannelCreatedEvent, Creating a new channel
onNewChannelEvent, Connecting to a server
onPlaybackShutdownCompleteEvent, Closing devices
onServerEditedEvent, Server information
onServerErrorEvent, Return code, Error handling
onServerStopEvent, Disconnecting from a server
onServerUpdatedEvent, Server information
onTalkStatusChangeEvent, Other events
onTextMessageEvent, Receiving
onUpdateChannelEditedEvent, Channel information
onUpdateChannelEvent, Other events
onUpdateClientEvent, Information related to other clients
onUserLoggingMessageEvent, User-defined logging

F

FAQ, FAQ
Filetransfer, Filetransfer
functions
onFileInfoEvent, Callbacks
onFileListEvent, Callbacks
onFileListFinishedEvent, Callbacks
onFileTransferStatusEvent, Callbacks
ts3client_acquireCustomPlaybackData, Using custom devices
ts3client_activateCaptureDevice, Activating the capture device
ts3client_allowWhispersFrom, Whisper lists
ts3client_channelset3DAttributes, 3D Sound
ts3client_closeCaptureDevice, Closing devices
ts3client_closePlaybackDevice, Closing devices
ts3client_closeWaveFileHandle, Playing wave files
ts3client_createIdentity, Connecting to a server
ts3client_destroyClientLib, Shutting down
ts3client_destroyServerConnectionHandler, Managing server connection handlers
ts3client_flushChannelCreation, Creating a new channel
ts3client_flushChannelUpdates, Channel information
ts3client_flushClientSelfUpdates, Information related to own client
ts3client_freeMemory, Miscellaneous functions
ts3client_getAverageTransferSpeed, Query information
ts3client_getCaptureDeviceList, Querying available modes and devices
ts3client_getCaptureModeList, Querying available modes and devices
ts3client_getChannelClientList, Query available servers, channels and clients
ts3client_getChannelEmptySecs, Miscellaneous functions
ts3client_getChannelIDFromChannelNames, Channel information
ts3client_getChannelList, Query available servers, channels and clients
ts3client_getChannelOfClient, Query available servers, channels and clients
ts3client_getChannelVariableAsInt, Channel information
ts3client_getChannelVariableAsString, Channel information
ts3client_getChannelVariableAsUInt64, Channel information
ts3client_getClientID, Connecting to a server, Information related to own client
ts3client_getClientLibVersion, Querying the library version
ts3client_getClientLibVersionNumber, Querying the library version
ts3client_getClientList, Query available servers, channels and clients
ts3client_getClientSelfVariableAsInt, Information related to own client
ts3client_getClientSelfVariableAsString, Information related to own client
ts3client_getClientVariableAsInt, Information related to other clients
ts3client_getClientVariableAsString, Information related to other clients
ts3client_getClientVariableAsUInt64, Information related to other clients
ts3client_getConnectionStatus, Connecting to a server
ts3client_getCurrentCaptureDeviceName, Checking current modes and devices
ts3client_getCurrentCaptureMode, Checking current modes and devices
ts3client_getCurrentPlaybackDeviceName, Checking current modes and devices
ts3client_getCurrentPlayBackMode, Checking current modes and devices
ts3client_getCurrentTransferSpeed, Query information
ts3client_getDefaultCaptureDevice, Querying available modes and devices
ts3client_getDefaultCaptureMode, Querying available modes and devices
ts3client_getDefaultPlaybackDevice, Querying available modes and devices
ts3client_getDefaultPlayBackMode, Querying available modes and devices
ts3client_getEncodeConfigValue, Encoder options
ts3client_getErrorMessage, Error handling
ts3client_getInstanceSpeedLimitDown, Speed limits
ts3client_getInstanceSpeedLimitUp, Speed limits
ts3client_getParentChannelOfChannel, Query available servers, channels and clients
ts3client_getPlaybackConfigValueAsFloat, Playback options
ts3client_getPlaybackDeviceList, Querying available modes and devices
ts3client_getPlaybackModeList, Querying available modes and devices
ts3client_getPreProcessorConfigValue, Preprocessor options
ts3client_getPreProcessorInfoValueFloat, Preprocessor options
ts3client_getServerConnectionHandlerList, Query available servers, channels and clients
ts3client_getServerConnectionHandlerSpeedLimitDown, Speed limits
ts3client_getServerConnectionHandlerSpeedLimitUp, Speed limits
ts3client_getServerVariableAsInt, Server information
ts3client_getServerVariableAsString, Server information
ts3client_getServerVariableAsUInt64, Server information
ts3client_getTransferFileName, Query information
ts3client_getTransferFilePath, Query information
ts3client_getTransferFileRemotePath, Query information
ts3client_getTransferFileSize, Query information
ts3client_getTransferFileSizeDone, Query information
ts3client_getTransferRunTime, Query information
ts3client_getTransferSpeedLimit, Speed limits
ts3client_getTransferStatus, Query information
ts3client_haltTransfer, Initiate transfers
ts3client_initClientLib, Initializing
ts3client_initiateGracefulPlaybackShutdown, Closing devices
ts3client_isTransferSender, Query information
ts3client_logMessage, Logging
ts3client_openCaptureDevice, Initializing modes and devices
ts3client_openPlaybackDevice, Initializing modes and devices
ts3client_pauseWaveFileHandle, Playing wave files
ts3client_playWaveFile, Playing wave files
ts3client_playWaveFileHandle, Playing wave files
ts3client_processCustomCaptureData, Using custom devices
ts3client_registerCustomDevice, Using custom devices
ts3client_removeFromAllowedWhispersFrom, Whisper lists
ts3client_requestChannelDelete, Deleting a channel
ts3client_requestChannelDescription, Channel information
ts3client_requestChannelMove, Moving a channel
ts3client_requestChannelSubscribe, Channel subscriptions
ts3client_requestChannelSubscribeAll, Channel subscriptions
ts3client_requestChannelUnsubscribe, Channel subscriptions
ts3client_requestChannelUnsubscribeAll, Channel subscriptions
ts3client_requestClientKickFromChannel, Kicking clients
ts3client_requestClientKickFromServer, Kicking clients
ts3client_requestClientMove, Joining a channel
ts3client_requestClientSetWhisperList, Whisper lists
ts3client_requestClientVariables, Information related to other clients
ts3client_requestCreateDirectory, Initiate transfers
ts3client_requestDeleteFile, Initiate transfers
ts3client_requestFile, Initiate transfers
ts3client_requestFileInfo, Initiate transfers
ts3client_requestFileList, Initiate transfers
ts3client_requestMuteClients, Muting clients locally
ts3client_requestRenameFile, Initiate transfers
ts3client_requestSendChannelTextMsg, Sending
ts3client_requestSendPrivateTextMsg, Sending
ts3client_requestSendServerTextMsg, Sending
ts3client_requestServerVariables, Server information
ts3client_requestUnmuteClients, Muting clients locally
ts3client_sendFile, Initiate transfers
ts3client_set3DWaveAttributes, 3D Sound
ts3client_setChannelVariableAsInt, Channel information
ts3client_setChannelVariableAsString, Channel information
ts3client_setChannelVariableAsUInt64, Channel information
ts3client_setClientSelfVariableAsInt, Information related to own client
ts3client_setClientSelfVariableAsString, Information related to own client
ts3client_setClientVolumeModifier, Playback options
ts3client_setInstanceSpeedLimitDown, Speed limits
ts3client_setInstanceSpeedLimitUp, Speed limits
ts3client_setLocalTestMode, Miscellaneous functions
ts3client_setLogVerbosity, User-defined logging
ts3client_setPlaybackConfigValue, Playback options, How to adjust the volume?
ts3client_setPreProcessorConfigValue, Preprocessor options
ts3client_setServerConnectionHandlerSpeedLimitDown, Speed limits
ts3client_setServerConnectionHandlerSpeedLimitUp, Speed limits
ts3client_setTransferSpeedLimit, Speed limits
ts3client_spawnNewServerConnectionHandler, Managing server connection handlers
ts3client_startConnection, Connecting to a server
ts3client_startConnectionWithChannelID, Connecting to a server
ts3client_startVoiceRecording, Voice recording
ts3client_stopConnection, Disconnecting from a server
ts3client_stopVoiceRecording, Voice recording
ts3client_systemset3DListenerAttributes, 3D Sound
ts3client_systemset3DSettings, 3D Sound
ts3client_unregisterCustomDevice, Using custom devices

N

narrowband, Sound codecs

R

return code, Return code

S

sampling rates, Sound codecs
Semi-permanent channel, Channel information
server connection handler, Managing server connection handlers
structs
TS3_VECTOR, 3D Sound
system requirements, System requirements

U

ultra-wideband, Sound codecs

V

VAD, Preprocessor options
Voice Activity Detection, Preprocessor options
volume_factor_wave, Playback options
volume_modifier, Playback options, How to adjust the volume?

W

welcome message, Connecting to a server
wideband, Sound codecs
Windows, System requirements
diff --git a/docs/client_html/ts3doc.css b/docs/client_html/ts3doc.css deleted file mode 100644 index 3ff2b6f..0000000 --- a/docs/client_html/ts3doc.css +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Stylesheet for TeamSpeak 3 SDK documentation - */ - -img { - border: 0; -} - -div.note { - border-left: solid #d5dee3 20px; - border-right: solid #d5dee3 20px; - margin-left: 5%; - margin-right: 10%; - padding: 5px; -} - -div.caution { - border-left: solid #d5dee3 20px; - border-right: solid #d5dee3 20px; - margin-left: 5%; - margin-right: 10%; - padding: 5px; -} - -div.important { - border-left: solid #d5dee3 20px; - border-right: solid #d5dee3 20px; - margin-left: 5%; - margin-right: 10%; - padding: 5px; -} - -.returnvalue { - font-family: monospace; - font-style: italic; - font-size: larger; -} - -p.legaltext { - font-size: 85%; -} - -p.larger { - font-size: 125%; -} - -#logo { - position: absolute; - left: 80%; -} diff --git a/src/curl/curl.h b/src/curl/curl.h deleted file mode 100644 index b7cb30a..0000000 --- a/src/curl/curl.h +++ /dev/null @@ -1,2889 +0,0 @@ -#ifndef CURLINC_CURL_H -#define CURLINC_CURL_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* - * If you have libcurl problems, all docs and details are found here: - * https://curl.haxx.se/libcurl/ - * - * curl-library mailing list subscription and unsubscription web interface: - * https://cool.haxx.se/mailman/listinfo/curl-library/ - */ - -#ifdef CURL_NO_OLDIES -#define CURL_STRICTER -#endif - -#include "curlver.h" /* libcurl version defines */ -#include "system.h" /* determine things run-time */ - -/* - * Define CURL_WIN32 when build target is Win32 API - */ - -#if (defined(_WIN32) || defined(__WIN32__) || defined(WIN32)) && \ - !defined(__SYMBIAN32__) -#define CURL_WIN32 -#endif - -#include -#include - -#if defined(__FreeBSD__) && (__FreeBSD__ >= 2) -/* Needed for __FreeBSD_version symbol definition */ -#include -#endif - -/* The include stuff here below is mainly for time_t! */ -#include -#include - -#if defined(CURL_WIN32) && !defined(_WIN32_WCE) && !defined(__CYGWIN__) -#if !(defined(_WINSOCKAPI_) || defined(_WINSOCK_H) || \ - defined(__LWIP_OPT_H__) || defined(LWIP_HDR_OPT_H)) -/* The check above prevents the winsock2 inclusion if winsock.h already was - included, since they can't co-exist without problems */ -#include -#include -#endif -#endif - -/* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish - libc5-based Linux systems. Only include it on systems that are known to - require it! */ -#if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \ - defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \ - defined(ANDROID) || defined(__ANDROID__) || defined(__OpenBSD__) || \ - defined(__CYGWIN__) || \ - (defined(__FreeBSD_version) && (__FreeBSD_version < 800000)) -#include -#endif - -#if !defined(CURL_WIN32) && !defined(_WIN32_WCE) -#include -#endif - -#if !defined(CURL_WIN32) && !defined(__WATCOMC__) && !defined(__VXWORKS__) -#include -#endif - -#ifdef __BEOS__ -#include -#endif - -/* Compatibility for non-Clang compilers */ -#ifndef __has_declspec_attribute -# define __has_declspec_attribute(x) 0 -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -#if defined(BUILDING_LIBCURL) || defined(CURL_STRICTER) -typedef struct Curl_easy CURL; -typedef struct Curl_share CURLSH; -#else -typedef void CURL; -typedef void CURLSH; -#endif - -/* - * libcurl external API function linkage decorations. - */ - -#ifdef CURL_STATICLIB -# define CURL_EXTERN -#elif defined(CURL_WIN32) || defined(__SYMBIAN32__) || \ - (__has_declspec_attribute(dllexport) && \ - __has_declspec_attribute(dllimport)) -# if defined(BUILDING_LIBCURL) -# define CURL_EXTERN __declspec(dllexport) -# else -# define CURL_EXTERN __declspec(dllimport) -# endif -#elif defined(BUILDING_LIBCURL) && defined(CURL_HIDDEN_SYMBOLS) -# define CURL_EXTERN CURL_EXTERN_SYMBOL -#else -# define CURL_EXTERN -#endif - -#ifndef curl_socket_typedef -/* socket typedef */ -#if defined(CURL_WIN32) && !defined(__LWIP_OPT_H__) && !defined(LWIP_HDR_OPT_H) -typedef SOCKET curl_socket_t; -#define CURL_SOCKET_BAD INVALID_SOCKET -#else -typedef int curl_socket_t; -#define CURL_SOCKET_BAD -1 -#endif -#define curl_socket_typedef -#endif /* curl_socket_typedef */ - -/* enum for the different supported SSL backends */ -typedef enum { - CURLSSLBACKEND_NONE = 0, - CURLSSLBACKEND_OPENSSL = 1, - CURLSSLBACKEND_GNUTLS = 2, - CURLSSLBACKEND_NSS = 3, - CURLSSLBACKEND_OBSOLETE4 = 4, /* Was QSOSSL. */ - CURLSSLBACKEND_GSKIT = 5, - CURLSSLBACKEND_POLARSSL = 6, - CURLSSLBACKEND_WOLFSSL = 7, - CURLSSLBACKEND_SCHANNEL = 8, - CURLSSLBACKEND_SECURETRANSPORT = 9, - CURLSSLBACKEND_AXTLS = 10, /* never used since 7.63.0 */ - CURLSSLBACKEND_MBEDTLS = 11, - CURLSSLBACKEND_MESALINK = 12, - CURLSSLBACKEND_BEARSSL = 13 -} curl_sslbackend; - -/* aliases for library clones and renames */ -#define CURLSSLBACKEND_LIBRESSL CURLSSLBACKEND_OPENSSL -#define CURLSSLBACKEND_BORINGSSL CURLSSLBACKEND_OPENSSL - -/* deprecated names: */ -#define CURLSSLBACKEND_CYASSL CURLSSLBACKEND_WOLFSSL -#define CURLSSLBACKEND_DARWINSSL CURLSSLBACKEND_SECURETRANSPORT - -struct curl_httppost { - struct curl_httppost *next; /* next entry in the list */ - char *name; /* pointer to allocated name */ - long namelength; /* length of name length */ - char *contents; /* pointer to allocated data contents */ - long contentslength; /* length of contents field, see also - CURL_HTTPPOST_LARGE */ - char *buffer; /* pointer to allocated buffer contents */ - long bufferlength; /* length of buffer field */ - char *contenttype; /* Content-Type */ - struct curl_slist *contentheader; /* list of extra headers for this form */ - struct curl_httppost *more; /* if one field name has more than one - file, this link should link to following - files */ - long flags; /* as defined below */ - -/* specified content is a file name */ -#define CURL_HTTPPOST_FILENAME (1<<0) -/* specified content is a file name */ -#define CURL_HTTPPOST_READFILE (1<<1) -/* name is only stored pointer do not free in formfree */ -#define CURL_HTTPPOST_PTRNAME (1<<2) -/* contents is only stored pointer do not free in formfree */ -#define CURL_HTTPPOST_PTRCONTENTS (1<<3) -/* upload file from buffer */ -#define CURL_HTTPPOST_BUFFER (1<<4) -/* upload file from pointer contents */ -#define CURL_HTTPPOST_PTRBUFFER (1<<5) -/* upload file contents by using the regular read callback to get the data and - pass the given pointer as custom pointer */ -#define CURL_HTTPPOST_CALLBACK (1<<6) -/* use size in 'contentlen', added in 7.46.0 */ -#define CURL_HTTPPOST_LARGE (1<<7) - - char *showfilename; /* The file name to show. If not set, the - actual file name will be used (if this - is a file part) */ - void *userp; /* custom pointer used for - HTTPPOST_CALLBACK posts */ - curl_off_t contentlen; /* alternative length of contents - field. Used if CURL_HTTPPOST_LARGE is - set. Added in 7.46.0 */ -}; - - -/* This is a return code for the progress callback that, when returned, will - signal libcurl to continue executing the default progress function */ -#define CURL_PROGRESSFUNC_CONTINUE 0x10000001 - -/* This is the CURLOPT_PROGRESSFUNCTION callback prototype. It is now - considered deprecated but was the only choice up until 7.31.0 */ -typedef int (*curl_progress_callback)(void *clientp, - double dltotal, - double dlnow, - double ultotal, - double ulnow); - -/* This is the CURLOPT_XFERINFOFUNCTION callback prototype. It was introduced - in 7.32.0, avoids the use of floating point numbers and provides more - detailed information. */ -typedef int (*curl_xferinfo_callback)(void *clientp, - curl_off_t dltotal, - curl_off_t dlnow, - curl_off_t ultotal, - curl_off_t ulnow); - -#ifndef CURL_MAX_READ_SIZE - /* The maximum receive buffer size configurable via CURLOPT_BUFFERSIZE. */ -#define CURL_MAX_READ_SIZE 524288 -#endif - -#ifndef CURL_MAX_WRITE_SIZE - /* Tests have proven that 20K is a very bad buffer size for uploads on - Windows, while 16K for some odd reason performed a lot better. - We do the ifndef check to allow this value to easier be changed at build - time for those who feel adventurous. The practical minimum is about - 400 bytes since libcurl uses a buffer of this size as a scratch area - (unrelated to network send operations). */ -#define CURL_MAX_WRITE_SIZE 16384 -#endif - -#ifndef CURL_MAX_HTTP_HEADER -/* The only reason to have a max limit for this is to avoid the risk of a bad - server feeding libcurl with a never-ending header that will cause reallocs - infinitely */ -#define CURL_MAX_HTTP_HEADER (100*1024) -#endif - -/* This is a magic return code for the write callback that, when returned, - will signal libcurl to pause receiving on the current transfer. */ -#define CURL_WRITEFUNC_PAUSE 0x10000001 - -typedef size_t (*curl_write_callback)(char *buffer, - size_t size, - size_t nitems, - void *outstream); - -/* This callback will be called when a new resolver request is made */ -typedef int (*curl_resolver_start_callback)(void *resolver_state, - void *reserved, void *userdata); - -/* enumeration of file types */ -typedef enum { - CURLFILETYPE_FILE = 0, - CURLFILETYPE_DIRECTORY, - CURLFILETYPE_SYMLINK, - CURLFILETYPE_DEVICE_BLOCK, - CURLFILETYPE_DEVICE_CHAR, - CURLFILETYPE_NAMEDPIPE, - CURLFILETYPE_SOCKET, - CURLFILETYPE_DOOR, /* is possible only on Sun Solaris now */ - - CURLFILETYPE_UNKNOWN /* should never occur */ -} curlfiletype; - -#define CURLFINFOFLAG_KNOWN_FILENAME (1<<0) -#define CURLFINFOFLAG_KNOWN_FILETYPE (1<<1) -#define CURLFINFOFLAG_KNOWN_TIME (1<<2) -#define CURLFINFOFLAG_KNOWN_PERM (1<<3) -#define CURLFINFOFLAG_KNOWN_UID (1<<4) -#define CURLFINFOFLAG_KNOWN_GID (1<<5) -#define CURLFINFOFLAG_KNOWN_SIZE (1<<6) -#define CURLFINFOFLAG_KNOWN_HLINKCOUNT (1<<7) - -/* Information about a single file, used when doing FTP wildcard matching */ -struct curl_fileinfo { - char *filename; - curlfiletype filetype; - time_t time; /* always zero! */ - unsigned int perm; - int uid; - int gid; - curl_off_t size; - long int hardlinks; - - struct { - /* If some of these fields is not NULL, it is a pointer to b_data. */ - char *time; - char *perm; - char *user; - char *group; - char *target; /* pointer to the target filename of a symlink */ - } strings; - - unsigned int flags; - - /* used internally */ - char *b_data; - size_t b_size; - size_t b_used; -}; - -/* return codes for CURLOPT_CHUNK_BGN_FUNCTION */ -#define CURL_CHUNK_BGN_FUNC_OK 0 -#define CURL_CHUNK_BGN_FUNC_FAIL 1 /* tell the lib to end the task */ -#define CURL_CHUNK_BGN_FUNC_SKIP 2 /* skip this chunk over */ - -/* if splitting of data transfer is enabled, this callback is called before - download of an individual chunk started. Note that parameter "remains" works - only for FTP wildcard downloading (for now), otherwise is not used */ -typedef long (*curl_chunk_bgn_callback)(const void *transfer_info, - void *ptr, - int remains); - -/* return codes for CURLOPT_CHUNK_END_FUNCTION */ -#define CURL_CHUNK_END_FUNC_OK 0 -#define CURL_CHUNK_END_FUNC_FAIL 1 /* tell the lib to end the task */ - -/* If splitting of data transfer is enabled this callback is called after - download of an individual chunk finished. - Note! After this callback was set then it have to be called FOR ALL chunks. - Even if downloading of this chunk was skipped in CHUNK_BGN_FUNC. - This is the reason why we don't need "transfer_info" parameter in this - callback and we are not interested in "remains" parameter too. */ -typedef long (*curl_chunk_end_callback)(void *ptr); - -/* return codes for FNMATCHFUNCTION */ -#define CURL_FNMATCHFUNC_MATCH 0 /* string corresponds to the pattern */ -#define CURL_FNMATCHFUNC_NOMATCH 1 /* pattern doesn't match the string */ -#define CURL_FNMATCHFUNC_FAIL 2 /* an error occurred */ - -/* callback type for wildcard downloading pattern matching. If the - string matches the pattern, return CURL_FNMATCHFUNC_MATCH value, etc. */ -typedef int (*curl_fnmatch_callback)(void *ptr, - const char *pattern, - const char *string); - -/* These are the return codes for the seek callbacks */ -#define CURL_SEEKFUNC_OK 0 -#define CURL_SEEKFUNC_FAIL 1 /* fail the entire transfer */ -#define CURL_SEEKFUNC_CANTSEEK 2 /* tell libcurl seeking can't be done, so - libcurl might try other means instead */ -typedef int (*curl_seek_callback)(void *instream, - curl_off_t offset, - int origin); /* 'whence' */ - -/* This is a return code for the read callback that, when returned, will - signal libcurl to immediately abort the current transfer. */ -#define CURL_READFUNC_ABORT 0x10000000 -/* This is a return code for the read callback that, when returned, will - signal libcurl to pause sending data on the current transfer. */ -#define CURL_READFUNC_PAUSE 0x10000001 - -/* Return code for when the trailing headers' callback has terminated - without any errors*/ -#define CURL_TRAILERFUNC_OK 0 -/* Return code for when was an error in the trailing header's list and we - want to abort the request */ -#define CURL_TRAILERFUNC_ABORT 1 - -typedef size_t (*curl_read_callback)(char *buffer, - size_t size, - size_t nitems, - void *instream); - -typedef int (*curl_trailer_callback)(struct curl_slist **list, - void *userdata); - -typedef enum { - CURLSOCKTYPE_IPCXN, /* socket created for a specific IP connection */ - CURLSOCKTYPE_ACCEPT, /* socket created by accept() call */ - CURLSOCKTYPE_LAST /* never use */ -} curlsocktype; - -/* The return code from the sockopt_callback can signal information back - to libcurl: */ -#define CURL_SOCKOPT_OK 0 -#define CURL_SOCKOPT_ERROR 1 /* causes libcurl to abort and return - CURLE_ABORTED_BY_CALLBACK */ -#define CURL_SOCKOPT_ALREADY_CONNECTED 2 - -typedef int (*curl_sockopt_callback)(void *clientp, - curl_socket_t curlfd, - curlsocktype purpose); - -struct curl_sockaddr { - int family; - int socktype; - int protocol; - unsigned int addrlen; /* addrlen was a socklen_t type before 7.18.0 but it - turned really ugly and painful on the systems that - lack this type */ - struct sockaddr addr; -}; - -typedef curl_socket_t -(*curl_opensocket_callback)(void *clientp, - curlsocktype purpose, - struct curl_sockaddr *address); - -typedef int -(*curl_closesocket_callback)(void *clientp, curl_socket_t item); - -typedef enum { - CURLIOE_OK, /* I/O operation successful */ - CURLIOE_UNKNOWNCMD, /* command was unknown to callback */ - CURLIOE_FAILRESTART, /* failed to restart the read */ - CURLIOE_LAST /* never use */ -} curlioerr; - -typedef enum { - CURLIOCMD_NOP, /* no operation */ - CURLIOCMD_RESTARTREAD, /* restart the read stream from start */ - CURLIOCMD_LAST /* never use */ -} curliocmd; - -typedef curlioerr (*curl_ioctl_callback)(CURL *handle, - int cmd, - void *clientp); - -#ifndef CURL_DID_MEMORY_FUNC_TYPEDEFS -/* - * The following typedef's are signatures of malloc, free, realloc, strdup and - * calloc respectively. Function pointers of these types can be passed to the - * curl_global_init_mem() function to set user defined memory management - * callback routines. - */ -typedef void *(*curl_malloc_callback)(size_t size); -typedef void (*curl_free_callback)(void *ptr); -typedef void *(*curl_realloc_callback)(void *ptr, size_t size); -typedef char *(*curl_strdup_callback)(const char *str); -typedef void *(*curl_calloc_callback)(size_t nmemb, size_t size); - -#define CURL_DID_MEMORY_FUNC_TYPEDEFS -#endif - -/* the kind of data that is passed to information_callback*/ -typedef enum { - CURLINFO_TEXT = 0, - CURLINFO_HEADER_IN, /* 1 */ - CURLINFO_HEADER_OUT, /* 2 */ - CURLINFO_DATA_IN, /* 3 */ - CURLINFO_DATA_OUT, /* 4 */ - CURLINFO_SSL_DATA_IN, /* 5 */ - CURLINFO_SSL_DATA_OUT, /* 6 */ - CURLINFO_END -} curl_infotype; - -typedef int (*curl_debug_callback) - (CURL *handle, /* the handle/transfer this concerns */ - curl_infotype type, /* what kind of data */ - char *data, /* points to the data */ - size_t size, /* size of the data pointed to */ - void *userptr); /* whatever the user please */ - -/* All possible error codes from all sorts of curl functions. Future versions - may return other values, stay prepared. - - Always add new return codes last. Never *EVER* remove any. The return - codes must remain the same! - */ - -typedef enum { - CURLE_OK = 0, - CURLE_UNSUPPORTED_PROTOCOL, /* 1 */ - CURLE_FAILED_INIT, /* 2 */ - CURLE_URL_MALFORMAT, /* 3 */ - CURLE_NOT_BUILT_IN, /* 4 - [was obsoleted in August 2007 for - 7.17.0, reused in April 2011 for 7.21.5] */ - CURLE_COULDNT_RESOLVE_PROXY, /* 5 */ - CURLE_COULDNT_RESOLVE_HOST, /* 6 */ - CURLE_COULDNT_CONNECT, /* 7 */ - CURLE_WEIRD_SERVER_REPLY, /* 8 */ - CURLE_REMOTE_ACCESS_DENIED, /* 9 a service was denied by the server - due to lack of access - when login fails - this is not returned. */ - CURLE_FTP_ACCEPT_FAILED, /* 10 - [was obsoleted in April 2006 for - 7.15.4, reused in Dec 2011 for 7.24.0]*/ - CURLE_FTP_WEIRD_PASS_REPLY, /* 11 */ - CURLE_FTP_ACCEPT_TIMEOUT, /* 12 - timeout occurred accepting server - [was obsoleted in August 2007 for 7.17.0, - reused in Dec 2011 for 7.24.0]*/ - CURLE_FTP_WEIRD_PASV_REPLY, /* 13 */ - CURLE_FTP_WEIRD_227_FORMAT, /* 14 */ - CURLE_FTP_CANT_GET_HOST, /* 15 */ - CURLE_HTTP2, /* 16 - A problem in the http2 framing layer. - [was obsoleted in August 2007 for 7.17.0, - reused in July 2014 for 7.38.0] */ - CURLE_FTP_COULDNT_SET_TYPE, /* 17 */ - CURLE_PARTIAL_FILE, /* 18 */ - CURLE_FTP_COULDNT_RETR_FILE, /* 19 */ - CURLE_OBSOLETE20, /* 20 - NOT USED */ - CURLE_QUOTE_ERROR, /* 21 - quote command failure */ - CURLE_HTTP_RETURNED_ERROR, /* 22 */ - CURLE_WRITE_ERROR, /* 23 */ - CURLE_OBSOLETE24, /* 24 - NOT USED */ - CURLE_UPLOAD_FAILED, /* 25 - failed upload "command" */ - CURLE_READ_ERROR, /* 26 - couldn't open/read from file */ - CURLE_OUT_OF_MEMORY, /* 27 */ - /* Note: CURLE_OUT_OF_MEMORY may sometimes indicate a conversion error - instead of a memory allocation error if CURL_DOES_CONVERSIONS - is defined - */ - CURLE_OPERATION_TIMEDOUT, /* 28 - the timeout time was reached */ - CURLE_OBSOLETE29, /* 29 - NOT USED */ - CURLE_FTP_PORT_FAILED, /* 30 - FTP PORT operation failed */ - CURLE_FTP_COULDNT_USE_REST, /* 31 - the REST command failed */ - CURLE_OBSOLETE32, /* 32 - NOT USED */ - CURLE_RANGE_ERROR, /* 33 - RANGE "command" didn't work */ - CURLE_HTTP_POST_ERROR, /* 34 */ - CURLE_SSL_CONNECT_ERROR, /* 35 - wrong when connecting with SSL */ - CURLE_BAD_DOWNLOAD_RESUME, /* 36 - couldn't resume download */ - CURLE_FILE_COULDNT_READ_FILE, /* 37 */ - CURLE_LDAP_CANNOT_BIND, /* 38 */ - CURLE_LDAP_SEARCH_FAILED, /* 39 */ - CURLE_OBSOLETE40, /* 40 - NOT USED */ - CURLE_FUNCTION_NOT_FOUND, /* 41 - NOT USED starting with 7.53.0 */ - CURLE_ABORTED_BY_CALLBACK, /* 42 */ - CURLE_BAD_FUNCTION_ARGUMENT, /* 43 */ - CURLE_OBSOLETE44, /* 44 - NOT USED */ - CURLE_INTERFACE_FAILED, /* 45 - CURLOPT_INTERFACE failed */ - CURLE_OBSOLETE46, /* 46 - NOT USED */ - CURLE_TOO_MANY_REDIRECTS, /* 47 - catch endless re-direct loops */ - CURLE_UNKNOWN_OPTION, /* 48 - User specified an unknown option */ - CURLE_TELNET_OPTION_SYNTAX, /* 49 - Malformed telnet option */ - CURLE_OBSOLETE50, /* 50 - NOT USED */ - CURLE_OBSOLETE51, /* 51 - NOT USED */ - CURLE_GOT_NOTHING, /* 52 - when this is a specific error */ - CURLE_SSL_ENGINE_NOTFOUND, /* 53 - SSL crypto engine not found */ - CURLE_SSL_ENGINE_SETFAILED, /* 54 - can not set SSL crypto engine as - default */ - CURLE_SEND_ERROR, /* 55 - failed sending network data */ - CURLE_RECV_ERROR, /* 56 - failure in receiving network data */ - CURLE_OBSOLETE57, /* 57 - NOT IN USE */ - CURLE_SSL_CERTPROBLEM, /* 58 - problem with the local certificate */ - CURLE_SSL_CIPHER, /* 59 - couldn't use specified cipher */ - CURLE_PEER_FAILED_VERIFICATION, /* 60 - peer's certificate or fingerprint - wasn't verified fine */ - CURLE_BAD_CONTENT_ENCODING, /* 61 - Unrecognized/bad encoding */ - CURLE_LDAP_INVALID_URL, /* 62 - Invalid LDAP URL */ - CURLE_FILESIZE_EXCEEDED, /* 63 - Maximum file size exceeded */ - CURLE_USE_SSL_FAILED, /* 64 - Requested FTP SSL level failed */ - CURLE_SEND_FAIL_REWIND, /* 65 - Sending the data requires a rewind - that failed */ - CURLE_SSL_ENGINE_INITFAILED, /* 66 - failed to initialise ENGINE */ - CURLE_LOGIN_DENIED, /* 67 - user, password or similar was not - accepted and we failed to login */ - CURLE_TFTP_NOTFOUND, /* 68 - file not found on server */ - CURLE_TFTP_PERM, /* 69 - permission problem on server */ - CURLE_REMOTE_DISK_FULL, /* 70 - out of disk space on server */ - CURLE_TFTP_ILLEGAL, /* 71 - Illegal TFTP operation */ - CURLE_TFTP_UNKNOWNID, /* 72 - Unknown transfer ID */ - CURLE_REMOTE_FILE_EXISTS, /* 73 - File already exists */ - CURLE_TFTP_NOSUCHUSER, /* 74 - No such user */ - CURLE_CONV_FAILED, /* 75 - conversion failed */ - CURLE_CONV_REQD, /* 76 - caller must register conversion - callbacks using curl_easy_setopt options - CURLOPT_CONV_FROM_NETWORK_FUNCTION, - CURLOPT_CONV_TO_NETWORK_FUNCTION, and - CURLOPT_CONV_FROM_UTF8_FUNCTION */ - CURLE_SSL_CACERT_BADFILE, /* 77 - could not load CACERT file, missing - or wrong format */ - CURLE_REMOTE_FILE_NOT_FOUND, /* 78 - remote file not found */ - CURLE_SSH, /* 79 - error from the SSH layer, somewhat - generic so the error message will be of - interest when this has happened */ - - CURLE_SSL_SHUTDOWN_FAILED, /* 80 - Failed to shut down the SSL - connection */ - CURLE_AGAIN, /* 81 - socket is not ready for send/recv, - wait till it's ready and try again (Added - in 7.18.2) */ - CURLE_SSL_CRL_BADFILE, /* 82 - could not load CRL file, missing or - wrong format (Added in 7.19.0) */ - CURLE_SSL_ISSUER_ERROR, /* 83 - Issuer check failed. (Added in - 7.19.0) */ - CURLE_FTP_PRET_FAILED, /* 84 - a PRET command failed */ - CURLE_RTSP_CSEQ_ERROR, /* 85 - mismatch of RTSP CSeq numbers */ - CURLE_RTSP_SESSION_ERROR, /* 86 - mismatch of RTSP Session Ids */ - CURLE_FTP_BAD_FILE_LIST, /* 87 - unable to parse FTP file list */ - CURLE_CHUNK_FAILED, /* 88 - chunk callback reported error */ - CURLE_NO_CONNECTION_AVAILABLE, /* 89 - No connection available, the - session will be queued */ - CURLE_SSL_PINNEDPUBKEYNOTMATCH, /* 90 - specified pinned public key did not - match */ - CURLE_SSL_INVALIDCERTSTATUS, /* 91 - invalid certificate status */ - CURLE_HTTP2_STREAM, /* 92 - stream error in HTTP/2 framing layer - */ - CURLE_RECURSIVE_API_CALL, /* 93 - an api function was called from - inside a callback */ - CURLE_AUTH_ERROR, /* 94 - an authentication function returned an - error */ - CURLE_HTTP3, /* 95 - An HTTP/3 layer problem */ - CURLE_QUIC_CONNECT_ERROR, /* 96 - QUIC connection error */ - CURL_LAST /* never use! */ -} CURLcode; - -#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all - the obsolete stuff removed! */ - -/* Previously obsolete error code re-used in 7.38.0 */ -#define CURLE_OBSOLETE16 CURLE_HTTP2 - -/* Previously obsolete error codes re-used in 7.24.0 */ -#define CURLE_OBSOLETE10 CURLE_FTP_ACCEPT_FAILED -#define CURLE_OBSOLETE12 CURLE_FTP_ACCEPT_TIMEOUT - -/* compatibility with older names */ -#define CURLOPT_ENCODING CURLOPT_ACCEPT_ENCODING -#define CURLE_FTP_WEIRD_SERVER_REPLY CURLE_WEIRD_SERVER_REPLY - -/* The following were added in 7.62.0 */ -#define CURLE_SSL_CACERT CURLE_PEER_FAILED_VERIFICATION - -/* The following were added in 7.21.5, April 2011 */ -#define CURLE_UNKNOWN_TELNET_OPTION CURLE_UNKNOWN_OPTION - -/* The following were added in 7.17.1 */ -/* These are scheduled to disappear by 2009 */ -#define CURLE_SSL_PEER_CERTIFICATE CURLE_PEER_FAILED_VERIFICATION - -/* The following were added in 7.17.0 */ -/* These are scheduled to disappear by 2009 */ -#define CURLE_OBSOLETE CURLE_OBSOLETE50 /* no one should be using this! */ -#define CURLE_BAD_PASSWORD_ENTERED CURLE_OBSOLETE46 -#define CURLE_BAD_CALLING_ORDER CURLE_OBSOLETE44 -#define CURLE_FTP_USER_PASSWORD_INCORRECT CURLE_OBSOLETE10 -#define CURLE_FTP_CANT_RECONNECT CURLE_OBSOLETE16 -#define CURLE_FTP_COULDNT_GET_SIZE CURLE_OBSOLETE32 -#define CURLE_FTP_COULDNT_SET_ASCII CURLE_OBSOLETE29 -#define CURLE_FTP_WEIRD_USER_REPLY CURLE_OBSOLETE12 -#define CURLE_FTP_WRITE_ERROR CURLE_OBSOLETE20 -#define CURLE_LIBRARY_NOT_FOUND CURLE_OBSOLETE40 -#define CURLE_MALFORMAT_USER CURLE_OBSOLETE24 -#define CURLE_SHARE_IN_USE CURLE_OBSOLETE57 -#define CURLE_URL_MALFORMAT_USER CURLE_NOT_BUILT_IN - -#define CURLE_FTP_ACCESS_DENIED CURLE_REMOTE_ACCESS_DENIED -#define CURLE_FTP_COULDNT_SET_BINARY CURLE_FTP_COULDNT_SET_TYPE -#define CURLE_FTP_QUOTE_ERROR CURLE_QUOTE_ERROR -#define CURLE_TFTP_DISKFULL CURLE_REMOTE_DISK_FULL -#define CURLE_TFTP_EXISTS CURLE_REMOTE_FILE_EXISTS -#define CURLE_HTTP_RANGE_ERROR CURLE_RANGE_ERROR -#define CURLE_FTP_SSL_FAILED CURLE_USE_SSL_FAILED - -/* The following were added earlier */ - -#define CURLE_OPERATION_TIMEOUTED CURLE_OPERATION_TIMEDOUT - -#define CURLE_HTTP_NOT_FOUND CURLE_HTTP_RETURNED_ERROR -#define CURLE_HTTP_PORT_FAILED CURLE_INTERFACE_FAILED -#define CURLE_FTP_COULDNT_STOR_FILE CURLE_UPLOAD_FAILED - -#define CURLE_FTP_PARTIAL_FILE CURLE_PARTIAL_FILE -#define CURLE_FTP_BAD_DOWNLOAD_RESUME CURLE_BAD_DOWNLOAD_RESUME - -/* This was the error code 50 in 7.7.3 and a few earlier versions, this - is no longer used by libcurl but is instead #defined here only to not - make programs break */ -#define CURLE_ALREADY_COMPLETE 99999 - -/* Provide defines for really old option names */ -#define CURLOPT_FILE CURLOPT_WRITEDATA /* name changed in 7.9.7 */ -#define CURLOPT_INFILE CURLOPT_READDATA /* name changed in 7.9.7 */ -#define CURLOPT_WRITEHEADER CURLOPT_HEADERDATA - -/* Since long deprecated options with no code in the lib that does anything - with them. */ -#define CURLOPT_WRITEINFO CURLOPT_OBSOLETE40 -#define CURLOPT_CLOSEPOLICY CURLOPT_OBSOLETE72 - -#endif /*!CURL_NO_OLDIES*/ - -/* This prototype applies to all conversion callbacks */ -typedef CURLcode (*curl_conv_callback)(char *buffer, size_t length); - -typedef CURLcode (*curl_ssl_ctx_callback)(CURL *curl, /* easy handle */ - void *ssl_ctx, /* actually an OpenSSL - or WolfSSL SSL_CTX, - or an mbedTLS - mbedtls_ssl_config */ - void *userptr); - -typedef enum { - CURLPROXY_HTTP = 0, /* added in 7.10, new in 7.19.4 default is to use - CONNECT HTTP/1.1 */ - CURLPROXY_HTTP_1_0 = 1, /* added in 7.19.4, force to use CONNECT - HTTP/1.0 */ - CURLPROXY_HTTPS = 2, /* added in 7.52.0 */ - CURLPROXY_SOCKS4 = 4, /* support added in 7.15.2, enum existed already - in 7.10 */ - CURLPROXY_SOCKS5 = 5, /* added in 7.10 */ - CURLPROXY_SOCKS4A = 6, /* added in 7.18.0 */ - CURLPROXY_SOCKS5_HOSTNAME = 7 /* Use the SOCKS5 protocol but pass along the - host name rather than the IP address. added - in 7.18.0 */ -} curl_proxytype; /* this enum was added in 7.10 */ - -/* - * Bitmasks for CURLOPT_HTTPAUTH and CURLOPT_PROXYAUTH options: - * - * CURLAUTH_NONE - No HTTP authentication - * CURLAUTH_BASIC - HTTP Basic authentication (default) - * CURLAUTH_DIGEST - HTTP Digest authentication - * CURLAUTH_NEGOTIATE - HTTP Negotiate (SPNEGO) authentication - * CURLAUTH_GSSNEGOTIATE - Alias for CURLAUTH_NEGOTIATE (deprecated) - * CURLAUTH_NTLM - HTTP NTLM authentication - * CURLAUTH_DIGEST_IE - HTTP Digest authentication with IE flavour - * CURLAUTH_NTLM_WB - HTTP NTLM authentication delegated to winbind helper - * CURLAUTH_BEARER - HTTP Bearer token authentication - * CURLAUTH_ONLY - Use together with a single other type to force no - * authentication or just that single type - * CURLAUTH_ANY - All fine types set - * CURLAUTH_ANYSAFE - All fine types except Basic - */ - -#define CURLAUTH_NONE ((unsigned long)0) -#define CURLAUTH_BASIC (((unsigned long)1)<<0) -#define CURLAUTH_DIGEST (((unsigned long)1)<<1) -#define CURLAUTH_NEGOTIATE (((unsigned long)1)<<2) -/* Deprecated since the advent of CURLAUTH_NEGOTIATE */ -#define CURLAUTH_GSSNEGOTIATE CURLAUTH_NEGOTIATE -/* Used for CURLOPT_SOCKS5_AUTH to stay terminologically correct */ -#define CURLAUTH_GSSAPI CURLAUTH_NEGOTIATE -#define CURLAUTH_NTLM (((unsigned long)1)<<3) -#define CURLAUTH_DIGEST_IE (((unsigned long)1)<<4) -#define CURLAUTH_NTLM_WB (((unsigned long)1)<<5) -#define CURLAUTH_BEARER (((unsigned long)1)<<6) -#define CURLAUTH_ONLY (((unsigned long)1)<<31) -#define CURLAUTH_ANY (~CURLAUTH_DIGEST_IE) -#define CURLAUTH_ANYSAFE (~(CURLAUTH_BASIC|CURLAUTH_DIGEST_IE)) - -#define CURLSSH_AUTH_ANY ~0 /* all types supported by the server */ -#define CURLSSH_AUTH_NONE 0 /* none allowed, silly but complete */ -#define CURLSSH_AUTH_PUBLICKEY (1<<0) /* public/private key files */ -#define CURLSSH_AUTH_PASSWORD (1<<1) /* password */ -#define CURLSSH_AUTH_HOST (1<<2) /* host key files */ -#define CURLSSH_AUTH_KEYBOARD (1<<3) /* keyboard interactive */ -#define CURLSSH_AUTH_AGENT (1<<4) /* agent (ssh-agent, pageant...) */ -#define CURLSSH_AUTH_GSSAPI (1<<5) /* gssapi (kerberos, ...) */ -#define CURLSSH_AUTH_DEFAULT CURLSSH_AUTH_ANY - -#define CURLGSSAPI_DELEGATION_NONE 0 /* no delegation (default) */ -#define CURLGSSAPI_DELEGATION_POLICY_FLAG (1<<0) /* if permitted by policy */ -#define CURLGSSAPI_DELEGATION_FLAG (1<<1) /* delegate always */ - -#define CURL_ERROR_SIZE 256 - -enum curl_khtype { - CURLKHTYPE_UNKNOWN, - CURLKHTYPE_RSA1, - CURLKHTYPE_RSA, - CURLKHTYPE_DSS, - CURLKHTYPE_ECDSA, - CURLKHTYPE_ED25519 -}; - -struct curl_khkey { - const char *key; /* points to a zero-terminated string encoded with base64 - if len is zero, otherwise to the "raw" data */ - size_t len; - enum curl_khtype keytype; -}; - -/* this is the set of return values expected from the curl_sshkeycallback - callback */ -enum curl_khstat { - CURLKHSTAT_FINE_ADD_TO_FILE, - CURLKHSTAT_FINE, - CURLKHSTAT_REJECT, /* reject the connection, return an error */ - CURLKHSTAT_DEFER, /* do not accept it, but we can't answer right now so - this causes a CURLE_DEFER error but otherwise the - connection will be left intact etc */ - CURLKHSTAT_LAST /* not for use, only a marker for last-in-list */ -}; - -/* this is the set of status codes pass in to the callback */ -enum curl_khmatch { - CURLKHMATCH_OK, /* match */ - CURLKHMATCH_MISMATCH, /* host found, key mismatch! */ - CURLKHMATCH_MISSING, /* no matching host/key found */ - CURLKHMATCH_LAST /* not for use, only a marker for last-in-list */ -}; - -typedef int - (*curl_sshkeycallback) (CURL *easy, /* easy handle */ - const struct curl_khkey *knownkey, /* known */ - const struct curl_khkey *foundkey, /* found */ - enum curl_khmatch, /* libcurl's view on the keys */ - void *clientp); /* custom pointer passed from app */ - -/* parameter for the CURLOPT_USE_SSL option */ -typedef enum { - CURLUSESSL_NONE, /* do not attempt to use SSL */ - CURLUSESSL_TRY, /* try using SSL, proceed anyway otherwise */ - CURLUSESSL_CONTROL, /* SSL for the control connection or fail */ - CURLUSESSL_ALL, /* SSL for all communication or fail */ - CURLUSESSL_LAST /* not an option, never use */ -} curl_usessl; - -/* Definition of bits for the CURLOPT_SSL_OPTIONS argument: */ - -/* - ALLOW_BEAST tells libcurl to allow the BEAST SSL vulnerability in the - name of improving interoperability with older servers. Some SSL libraries - have introduced work-arounds for this flaw but those work-arounds sometimes - make the SSL communication fail. To regain functionality with those broken - servers, a user can this way allow the vulnerability back. */ -#define CURLSSLOPT_ALLOW_BEAST (1<<0) - -/* - NO_REVOKE tells libcurl to disable certificate revocation checks for those - SSL backends where such behavior is present. */ -#define CURLSSLOPT_NO_REVOKE (1<<1) - -/* - NO_PARTIALCHAIN tells libcurl to *NOT* accept a partial certificate chain - if possible. The OpenSSL backend has this ability. */ -#define CURLSSLOPT_NO_PARTIALCHAIN (1<<2) - -/* The default connection attempt delay in milliseconds for happy eyeballs. - CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS.3 and happy-eyeballs-timeout-ms.d document - this value, keep them in sync. */ -#define CURL_HET_DEFAULT 200L - -/* The default connection upkeep interval in milliseconds. */ -#define CURL_UPKEEP_INTERVAL_DEFAULT 60000L - -#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all - the obsolete stuff removed! */ - -/* Backwards compatibility with older names */ -/* These are scheduled to disappear by 2009 */ - -#define CURLFTPSSL_NONE CURLUSESSL_NONE -#define CURLFTPSSL_TRY CURLUSESSL_TRY -#define CURLFTPSSL_CONTROL CURLUSESSL_CONTROL -#define CURLFTPSSL_ALL CURLUSESSL_ALL -#define CURLFTPSSL_LAST CURLUSESSL_LAST -#define curl_ftpssl curl_usessl -#endif /*!CURL_NO_OLDIES*/ - -/* parameter for the CURLOPT_FTP_SSL_CCC option */ -typedef enum { - CURLFTPSSL_CCC_NONE, /* do not send CCC */ - CURLFTPSSL_CCC_PASSIVE, /* Let the server initiate the shutdown */ - CURLFTPSSL_CCC_ACTIVE, /* Initiate the shutdown */ - CURLFTPSSL_CCC_LAST /* not an option, never use */ -} curl_ftpccc; - -/* parameter for the CURLOPT_FTPSSLAUTH option */ -typedef enum { - CURLFTPAUTH_DEFAULT, /* let libcurl decide */ - CURLFTPAUTH_SSL, /* use "AUTH SSL" */ - CURLFTPAUTH_TLS, /* use "AUTH TLS" */ - CURLFTPAUTH_LAST /* not an option, never use */ -} curl_ftpauth; - -/* parameter for the CURLOPT_FTP_CREATE_MISSING_DIRS option */ -typedef enum { - CURLFTP_CREATE_DIR_NONE, /* do NOT create missing dirs! */ - CURLFTP_CREATE_DIR, /* (FTP/SFTP) if CWD fails, try MKD and then CWD - again if MKD succeeded, for SFTP this does - similar magic */ - CURLFTP_CREATE_DIR_RETRY, /* (FTP only) if CWD fails, try MKD and then CWD - again even if MKD failed! */ - CURLFTP_CREATE_DIR_LAST /* not an option, never use */ -} curl_ftpcreatedir; - -/* parameter for the CURLOPT_FTP_FILEMETHOD option */ -typedef enum { - CURLFTPMETHOD_DEFAULT, /* let libcurl pick */ - CURLFTPMETHOD_MULTICWD, /* single CWD operation for each path part */ - CURLFTPMETHOD_NOCWD, /* no CWD at all */ - CURLFTPMETHOD_SINGLECWD, /* one CWD to full dir, then work on file */ - CURLFTPMETHOD_LAST /* not an option, never use */ -} curl_ftpmethod; - -/* bitmask defines for CURLOPT_HEADEROPT */ -#define CURLHEADER_UNIFIED 0 -#define CURLHEADER_SEPARATE (1<<0) - -/* CURLALTSVC_* are bits for the CURLOPT_ALTSVC_CTRL option */ -#define CURLALTSVC_IMMEDIATELY (1<<0) - -#define CURLALTSVC_READONLYFILE (1<<2) -#define CURLALTSVC_H1 (1<<3) -#define CURLALTSVC_H2 (1<<4) -#define CURLALTSVC_H3 (1<<5) - -/* CURLPROTO_ defines are for the CURLOPT_*PROTOCOLS options */ -#define CURLPROTO_HTTP (1<<0) -#define CURLPROTO_HTTPS (1<<1) -#define CURLPROTO_FTP (1<<2) -#define CURLPROTO_FTPS (1<<3) -#define CURLPROTO_SCP (1<<4) -#define CURLPROTO_SFTP (1<<5) -#define CURLPROTO_TELNET (1<<6) -#define CURLPROTO_LDAP (1<<7) -#define CURLPROTO_LDAPS (1<<8) -#define CURLPROTO_DICT (1<<9) -#define CURLPROTO_FILE (1<<10) -#define CURLPROTO_TFTP (1<<11) -#define CURLPROTO_IMAP (1<<12) -#define CURLPROTO_IMAPS (1<<13) -#define CURLPROTO_POP3 (1<<14) -#define CURLPROTO_POP3S (1<<15) -#define CURLPROTO_SMTP (1<<16) -#define CURLPROTO_SMTPS (1<<17) -#define CURLPROTO_RTSP (1<<18) -#define CURLPROTO_RTMP (1<<19) -#define CURLPROTO_RTMPT (1<<20) -#define CURLPROTO_RTMPE (1<<21) -#define CURLPROTO_RTMPTE (1<<22) -#define CURLPROTO_RTMPS (1<<23) -#define CURLPROTO_RTMPTS (1<<24) -#define CURLPROTO_GOPHER (1<<25) -#define CURLPROTO_SMB (1<<26) -#define CURLPROTO_SMBS (1<<27) -#define CURLPROTO_ALL (~0) /* enable everything */ - -/* long may be 32 or 64 bits, but we should never depend on anything else - but 32 */ -#define CURLOPTTYPE_LONG 0 -#define CURLOPTTYPE_OBJECTPOINT 10000 -#define CURLOPTTYPE_FUNCTIONPOINT 20000 -#define CURLOPTTYPE_OFF_T 30000 - -/* *STRINGPOINT is an alias for OBJECTPOINT to allow tools to extract the - string options from the header file */ - - -#define CURLOPT(na,t,nu) na = t + nu - -/* handy aliases that make no run-time difference */ -#define CURLOPTTYPE_STRINGPOINT CURLOPTTYPE_OBJECTPOINT -#define CURLOPTTYPE_SLISTPOINT CURLOPTTYPE_OBJECTPOINT - -/* - * All CURLOPT_* values. - */ - -typedef enum { - /* This is the FILE * or void * the regular output should be written to. */ - CURLOPT(CURLOPT_WRITEDATA, CURLOPTTYPE_OBJECTPOINT, 1), - - /* The full URL to get/put */ - CURLOPT(CURLOPT_URL, CURLOPTTYPE_STRINGPOINT, 2), - - /* Port number to connect to, if other than default. */ - CURLOPT(CURLOPT_PORT, CURLOPTTYPE_LONG, 3), - - /* Name of proxy to use. */ - CURLOPT(CURLOPT_PROXY, CURLOPTTYPE_STRINGPOINT, 4), - - /* "user:password;options" to use when fetching. */ - CURLOPT(CURLOPT_USERPWD, CURLOPTTYPE_STRINGPOINT, 5), - - /* "user:password" to use with proxy. */ - CURLOPT(CURLOPT_PROXYUSERPWD, CURLOPTTYPE_STRINGPOINT, 6), - - /* Range to get, specified as an ASCII string. */ - CURLOPT(CURLOPT_RANGE, CURLOPTTYPE_STRINGPOINT, 7), - - /* not used */ - - /* Specified file stream to upload from (use as input): */ - CURLOPT(CURLOPT_READDATA, CURLOPTTYPE_OBJECTPOINT, 9), - - /* Buffer to receive error messages in, must be at least CURL_ERROR_SIZE - * bytes big. */ - CURLOPT(CURLOPT_ERRORBUFFER, CURLOPTTYPE_OBJECTPOINT, 10), - - /* Function that will be called to store the output (instead of fwrite). The - * parameters will use fwrite() syntax, make sure to follow them. */ - CURLOPT(CURLOPT_WRITEFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 11), - - /* Function that will be called to read the input (instead of fread). The - * parameters will use fread() syntax, make sure to follow them. */ - CURLOPT(CURLOPT_READFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 12), - - /* Time-out the read operation after this amount of seconds */ - CURLOPT(CURLOPT_TIMEOUT, CURLOPTTYPE_LONG, 13), - - /* If the CURLOPT_INFILE is used, this can be used to inform libcurl about - * how large the file being sent really is. That allows better error - * checking and better verifies that the upload was successful. -1 means - * unknown size. - * - * For large file support, there is also a _LARGE version of the key - * which takes an off_t type, allowing platforms with larger off_t - * sizes to handle larger files. See below for INFILESIZE_LARGE. - */ - CURLOPT(CURLOPT_INFILESIZE, CURLOPTTYPE_LONG, 14), - - /* POST static input fields. */ - CURLOPT(CURLOPT_POSTFIELDS, CURLOPTTYPE_OBJECTPOINT, 15), - - /* Set the referrer page (needed by some CGIs) */ - CURLOPT(CURLOPT_REFERER, CURLOPTTYPE_STRINGPOINT, 16), - - /* Set the FTP PORT string (interface name, named or numerical IP address) - Use i.e '-' to use default address. */ - CURLOPT(CURLOPT_FTPPORT, CURLOPTTYPE_STRINGPOINT, 17), - - /* Set the User-Agent string (examined by some CGIs) */ - CURLOPT(CURLOPT_USERAGENT, CURLOPTTYPE_STRINGPOINT, 18), - - /* If the download receives less than "low speed limit" bytes/second - * during "low speed time" seconds, the operations is aborted. - * You could i.e if you have a pretty high speed connection, abort if - * it is less than 2000 bytes/sec during 20 seconds. - */ - - /* Set the "low speed limit" */ - CURLOPT(CURLOPT_LOW_SPEED_LIMIT, CURLOPTTYPE_LONG, 19), - - /* Set the "low speed time" */ - CURLOPT(CURLOPT_LOW_SPEED_TIME, CURLOPTTYPE_LONG, 20), - - /* Set the continuation offset. - * - * Note there is also a _LARGE version of this key which uses - * off_t types, allowing for large file offsets on platforms which - * use larger-than-32-bit off_t's. Look below for RESUME_FROM_LARGE. - */ - CURLOPT(CURLOPT_RESUME_FROM, CURLOPTTYPE_LONG, 21), - - /* Set cookie in request: */ - CURLOPT(CURLOPT_COOKIE, CURLOPTTYPE_STRINGPOINT, 22), - - /* This points to a linked list of headers, struct curl_slist kind. This - list is also used for RTSP (in spite of its name) */ - CURLOPT(CURLOPT_HTTPHEADER, CURLOPTTYPE_SLISTPOINT, 23), - - /* This points to a linked list of post entries, struct curl_httppost */ - CURLOPT(CURLOPT_HTTPPOST, CURLOPTTYPE_OBJECTPOINT, 24), - - /* name of the file keeping your private SSL-certificate */ - CURLOPT(CURLOPT_SSLCERT, CURLOPTTYPE_STRINGPOINT, 25), - - /* password for the SSL or SSH private key */ - CURLOPT(CURLOPT_KEYPASSWD, CURLOPTTYPE_STRINGPOINT, 26), - - /* send TYPE parameter? */ - CURLOPT(CURLOPT_CRLF, CURLOPTTYPE_LONG, 27), - - /* send linked-list of QUOTE commands */ - CURLOPT(CURLOPT_QUOTE, CURLOPTTYPE_SLISTPOINT, 28), - - /* send FILE * or void * to store headers to, if you use a callback it - is simply passed to the callback unmodified */ - CURLOPT(CURLOPT_HEADERDATA, CURLOPTTYPE_OBJECTPOINT, 29), - - /* point to a file to read the initial cookies from, also enables - "cookie awareness" */ - CURLOPT(CURLOPT_COOKIEFILE, CURLOPTTYPE_STRINGPOINT, 31), - - /* What version to specifically try to use. - See CURL_SSLVERSION defines below. */ - CURLOPT(CURLOPT_SSLVERSION, CURLOPTTYPE_LONG, 32), - - /* What kind of HTTP time condition to use, see defines */ - CURLOPT(CURLOPT_TIMECONDITION, CURLOPTTYPE_LONG, 33), - - /* Time to use with the above condition. Specified in number of seconds - since 1 Jan 1970 */ - CURLOPT(CURLOPT_TIMEVALUE, CURLOPTTYPE_LONG, 34), - - /* 35 = OBSOLETE */ - - /* Custom request, for customizing the get command like - HTTP: DELETE, TRACE and others - FTP: to use a different list command - */ - CURLOPT(CURLOPT_CUSTOMREQUEST, CURLOPTTYPE_STRINGPOINT, 36), - - /* FILE handle to use instead of stderr */ - CURLOPT(CURLOPT_STDERR, CURLOPTTYPE_OBJECTPOINT, 37), - - /* 38 is not used */ - - /* send linked-list of post-transfer QUOTE commands */ - CURLOPT(CURLOPT_POSTQUOTE, CURLOPTTYPE_SLISTPOINT, 39), - - /* OBSOLETE, do not use! */ - CURLOPT(CURLOPT_OBSOLETE40, CURLOPTTYPE_OBJECTPOINT, 40), - - /* talk a lot */ - CURLOPT(CURLOPT_VERBOSE, CURLOPTTYPE_LONG, 41), - - /* throw the header out too */ - CURLOPT(CURLOPT_HEADER, CURLOPTTYPE_LONG, 42), - - /* shut off the progress meter */ - CURLOPT(CURLOPT_NOPROGRESS, CURLOPTTYPE_LONG, 43), - - /* use HEAD to get http document */ - CURLOPT(CURLOPT_NOBODY, CURLOPTTYPE_LONG, 44), - - /* no output on http error codes >= 400 */ - CURLOPT(CURLOPT_FAILONERROR, CURLOPTTYPE_LONG, 45), - - /* this is an upload */ - CURLOPT(CURLOPT_UPLOAD, CURLOPTTYPE_LONG, 46), - - /* HTTP POST method */ - CURLOPT(CURLOPT_POST, CURLOPTTYPE_LONG, 47), - - /* bare names when listing directories */ - CURLOPT(CURLOPT_DIRLISTONLY, CURLOPTTYPE_LONG, 48), - - /* Append instead of overwrite on upload! */ - CURLOPT(CURLOPT_APPEND, CURLOPTTYPE_LONG, 50), - - /* Specify whether to read the user+password from the .netrc or the URL. - * This must be one of the CURL_NETRC_* enums below. */ - CURLOPT(CURLOPT_NETRC, CURLOPTTYPE_LONG, 51), - - /* use Location: Luke! */ - CURLOPT(CURLOPT_FOLLOWLOCATION, CURLOPTTYPE_LONG, 52), - - /* transfer data in text/ASCII format */ - CURLOPT(CURLOPT_TRANSFERTEXT, CURLOPTTYPE_LONG, 53), - - /* HTTP PUT */ - CURLOPT(CURLOPT_PUT, CURLOPTTYPE_LONG, 54), - - /* 55 = OBSOLETE */ - - /* DEPRECATED - * Function that will be called instead of the internal progress display - * function. This function should be defined as the curl_progress_callback - * prototype defines. */ - CURLOPT(CURLOPT_PROGRESSFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 56), - - /* Data passed to the CURLOPT_PROGRESSFUNCTION and CURLOPT_XFERINFOFUNCTION - callbacks */ - CURLOPT(CURLOPT_PROGRESSDATA, CURLOPTTYPE_OBJECTPOINT, 57), -#define CURLOPT_XFERINFODATA CURLOPT_PROGRESSDATA - - /* We want the referrer field set automatically when following locations */ - CURLOPT(CURLOPT_AUTOREFERER, CURLOPTTYPE_LONG, 58), - - /* Port of the proxy, can be set in the proxy string as well with: - "[host]:[port]" */ - CURLOPT(CURLOPT_PROXYPORT, CURLOPTTYPE_LONG, 59), - - /* size of the POST input data, if strlen() is not good to use */ - CURLOPT(CURLOPT_POSTFIELDSIZE, CURLOPTTYPE_LONG, 60), - - /* tunnel non-http operations through a HTTP proxy */ - CURLOPT(CURLOPT_HTTPPROXYTUNNEL, CURLOPTTYPE_LONG, 61), - - /* Set the interface string to use as outgoing network interface */ - CURLOPT(CURLOPT_INTERFACE, CURLOPTTYPE_STRINGPOINT, 62), - - /* Set the krb4/5 security level, this also enables krb4/5 awareness. This - * is a string, 'clear', 'safe', 'confidential' or 'private'. If the string - * is set but doesn't match one of these, 'private' will be used. */ - CURLOPT(CURLOPT_KRBLEVEL, CURLOPTTYPE_STRINGPOINT, 63), - - /* Set if we should verify the peer in ssl handshake, set 1 to verify. */ - CURLOPT(CURLOPT_SSL_VERIFYPEER, CURLOPTTYPE_LONG, 64), - - /* The CApath or CAfile used to validate the peer certificate - this option is used only if SSL_VERIFYPEER is true */ - CURLOPT(CURLOPT_CAINFO, CURLOPTTYPE_STRINGPOINT, 65), - - /* 66 = OBSOLETE */ - /* 67 = OBSOLETE */ - - /* Maximum number of http redirects to follow */ - CURLOPT(CURLOPT_MAXREDIRS, CURLOPTTYPE_LONG, 68), - - /* Pass a long set to 1 to get the date of the requested document (if - possible)! Pass a zero to shut it off. */ - CURLOPT(CURLOPT_FILETIME, CURLOPTTYPE_LONG, 69), - - /* This points to a linked list of telnet options */ - CURLOPT(CURLOPT_TELNETOPTIONS, CURLOPTTYPE_SLISTPOINT, 70), - - /* Max amount of cached alive connections */ - CURLOPT(CURLOPT_MAXCONNECTS, CURLOPTTYPE_LONG, 71), - - /* OBSOLETE, do not use! */ - CURLOPT(CURLOPT_OBSOLETE72, CURLOPTTYPE_LONG, 72), - - /* 73 = OBSOLETE */ - - /* Set to explicitly use a new connection for the upcoming transfer. - Do not use this unless you're absolutely sure of this, as it makes the - operation slower and is less friendly for the network. */ - CURLOPT(CURLOPT_FRESH_CONNECT, CURLOPTTYPE_LONG, 74), - - /* Set to explicitly forbid the upcoming transfer's connection to be re-used - when done. Do not use this unless you're absolutely sure of this, as it - makes the operation slower and is less friendly for the network. */ - CURLOPT(CURLOPT_FORBID_REUSE, CURLOPTTYPE_LONG, 75), - - /* Set to a file name that contains random data for libcurl to use to - seed the random engine when doing SSL connects. */ - CURLOPT(CURLOPT_RANDOM_FILE, CURLOPTTYPE_STRINGPOINT, 76), - - /* Set to the Entropy Gathering Daemon socket pathname */ - CURLOPT(CURLOPT_EGDSOCKET, CURLOPTTYPE_STRINGPOINT, 77), - - /* Time-out connect operations after this amount of seconds, if connects are - OK within this time, then fine... This only aborts the connect phase. */ - CURLOPT(CURLOPT_CONNECTTIMEOUT, CURLOPTTYPE_LONG, 78), - - /* Function that will be called to store headers (instead of fwrite). The - * parameters will use fwrite() syntax, make sure to follow them. */ - CURLOPT(CURLOPT_HEADERFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 79), - - /* Set this to force the HTTP request to get back to GET. Only really usable - if POST, PUT or a custom request have been used first. - */ - CURLOPT(CURLOPT_HTTPGET, CURLOPTTYPE_LONG, 80), - - /* Set if we should verify the Common name from the peer certificate in ssl - * handshake, set 1 to check existence, 2 to ensure that it matches the - * provided hostname. */ - CURLOPT(CURLOPT_SSL_VERIFYHOST, CURLOPTTYPE_LONG, 81), - - /* Specify which file name to write all known cookies in after completed - operation. Set file name to "-" (dash) to make it go to stdout. */ - CURLOPT(CURLOPT_COOKIEJAR, CURLOPTTYPE_STRINGPOINT, 82), - - /* Specify which SSL ciphers to use */ - CURLOPT(CURLOPT_SSL_CIPHER_LIST, CURLOPTTYPE_STRINGPOINT, 83), - - /* Specify which HTTP version to use! This must be set to one of the - CURL_HTTP_VERSION* enums set below. */ - CURLOPT(CURLOPT_HTTP_VERSION, CURLOPTTYPE_LONG, 84), - - /* Specifically switch on or off the FTP engine's use of the EPSV command. By - default, that one will always be attempted before the more traditional - PASV command. */ - CURLOPT(CURLOPT_FTP_USE_EPSV, CURLOPTTYPE_LONG, 85), - - /* type of the file keeping your SSL-certificate ("DER", "PEM", "ENG") */ - CURLOPT(CURLOPT_SSLCERTTYPE, CURLOPTTYPE_STRINGPOINT, 86), - - /* name of the file keeping your private SSL-key */ - CURLOPT(CURLOPT_SSLKEY, CURLOPTTYPE_STRINGPOINT, 87), - - /* type of the file keeping your private SSL-key ("DER", "PEM", "ENG") */ - CURLOPT(CURLOPT_SSLKEYTYPE, CURLOPTTYPE_STRINGPOINT, 88), - - /* crypto engine for the SSL-sub system */ - CURLOPT(CURLOPT_SSLENGINE, CURLOPTTYPE_STRINGPOINT, 89), - - /* set the crypto engine for the SSL-sub system as default - the param has no meaning... - */ - CURLOPT(CURLOPT_SSLENGINE_DEFAULT, CURLOPTTYPE_LONG, 90), - - /* Non-zero value means to use the global dns cache */ - /* DEPRECATED, do not use! */ - CURLOPT(CURLOPT_DNS_USE_GLOBAL_CACHE, CURLOPTTYPE_LONG, 91), - - /* DNS cache timeout */ - CURLOPT(CURLOPT_DNS_CACHE_TIMEOUT, CURLOPTTYPE_LONG, 92), - - /* send linked-list of pre-transfer QUOTE commands */ - CURLOPT(CURLOPT_PREQUOTE, CURLOPTTYPE_SLISTPOINT, 93), - - /* set the debug function */ - CURLOPT(CURLOPT_DEBUGFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 94), - - /* set the data for the debug function */ - CURLOPT(CURLOPT_DEBUGDATA, CURLOPTTYPE_OBJECTPOINT, 95), - - /* mark this as start of a cookie session */ - CURLOPT(CURLOPT_COOKIESESSION, CURLOPTTYPE_LONG, 96), - - /* The CApath directory used to validate the peer certificate - this option is used only if SSL_VERIFYPEER is true */ - CURLOPT(CURLOPT_CAPATH, CURLOPTTYPE_STRINGPOINT, 97), - - /* Instruct libcurl to use a smaller receive buffer */ - CURLOPT(CURLOPT_BUFFERSIZE, CURLOPTTYPE_LONG, 98), - - /* Instruct libcurl to not use any signal/alarm handlers, even when using - timeouts. This option is useful for multi-threaded applications. - See libcurl-the-guide for more background information. */ - CURLOPT(CURLOPT_NOSIGNAL, CURLOPTTYPE_LONG, 99), - - /* Provide a CURLShare for mutexing non-ts data */ - CURLOPT(CURLOPT_SHARE, CURLOPTTYPE_OBJECTPOINT, 100), - - /* indicates type of proxy. accepted values are CURLPROXY_HTTP (default), - CURLPROXY_HTTPS, CURLPROXY_SOCKS4, CURLPROXY_SOCKS4A and - CURLPROXY_SOCKS5. */ - CURLOPT(CURLOPT_PROXYTYPE, CURLOPTTYPE_LONG, 101), - - /* Set the Accept-Encoding string. Use this to tell a server you would like - the response to be compressed. Before 7.21.6, this was known as - CURLOPT_ENCODING */ - CURLOPT(CURLOPT_ACCEPT_ENCODING, CURLOPTTYPE_STRINGPOINT, 102), - - /* Set pointer to private data */ - CURLOPT(CURLOPT_PRIVATE, CURLOPTTYPE_OBJECTPOINT, 103), - - /* Set aliases for HTTP 200 in the HTTP Response header */ - CURLOPT(CURLOPT_HTTP200ALIASES, CURLOPTTYPE_SLISTPOINT, 104), - - /* Continue to send authentication (user+password) when following locations, - even when hostname changed. This can potentially send off the name - and password to whatever host the server decides. */ - CURLOPT(CURLOPT_UNRESTRICTED_AUTH, CURLOPTTYPE_LONG, 105), - - /* Specifically switch on or off the FTP engine's use of the EPRT command ( - it also disables the LPRT attempt). By default, those ones will always be - attempted before the good old traditional PORT command. */ - CURLOPT(CURLOPT_FTP_USE_EPRT, CURLOPTTYPE_LONG, 106), - - /* Set this to a bitmask value to enable the particular authentications - methods you like. Use this in combination with CURLOPT_USERPWD. - Note that setting multiple bits may cause extra network round-trips. */ - CURLOPT(CURLOPT_HTTPAUTH, CURLOPTTYPE_LONG, 107), - - /* Set the ssl context callback function, currently only for OpenSSL or - WolfSSL ssl_ctx, or mbedTLS mbedtls_ssl_config in the second argument. - The function must match the curl_ssl_ctx_callback prototype. */ - CURLOPT(CURLOPT_SSL_CTX_FUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 108), - - /* Set the userdata for the ssl context callback function's third - argument */ - CURLOPT(CURLOPT_SSL_CTX_DATA, CURLOPTTYPE_OBJECTPOINT, 109), - - /* FTP Option that causes missing dirs to be created on the remote server. - In 7.19.4 we introduced the convenience enums for this option using the - CURLFTP_CREATE_DIR prefix. - */ - CURLOPT(CURLOPT_FTP_CREATE_MISSING_DIRS, CURLOPTTYPE_LONG, 110), - - /* Set this to a bitmask value to enable the particular authentications - methods you like. Use this in combination with CURLOPT_PROXYUSERPWD. - Note that setting multiple bits may cause extra network round-trips. */ - CURLOPT(CURLOPT_PROXYAUTH, CURLOPTTYPE_LONG, 111), - - /* FTP option that changes the timeout, in seconds, associated with - getting a response. This is different from transfer timeout time and - essentially places a demand on the FTP server to acknowledge commands - in a timely manner. */ - CURLOPT(CURLOPT_FTP_RESPONSE_TIMEOUT, CURLOPTTYPE_LONG, 112), -#define CURLOPT_SERVER_RESPONSE_TIMEOUT CURLOPT_FTP_RESPONSE_TIMEOUT - - /* Set this option to one of the CURL_IPRESOLVE_* defines (see below) to - tell libcurl to resolve names to those IP versions only. This only has - affect on systems with support for more than one, i.e IPv4 _and_ IPv6. */ - CURLOPT(CURLOPT_IPRESOLVE, CURLOPTTYPE_LONG, 113), - - /* Set this option to limit the size of a file that will be downloaded from - an HTTP or FTP server. - - Note there is also _LARGE version which adds large file support for - platforms which have larger off_t sizes. See MAXFILESIZE_LARGE below. */ - CURLOPT(CURLOPT_MAXFILESIZE, CURLOPTTYPE_LONG, 114), - - /* See the comment for INFILESIZE above, but in short, specifies - * the size of the file being uploaded. -1 means unknown. - */ - CURLOPT(CURLOPT_INFILESIZE_LARGE, CURLOPTTYPE_OFF_T, 115), - - /* Sets the continuation offset. There is also a CURLOPTTYPE_LONG version - * of this; look above for RESUME_FROM. - */ - CURLOPT(CURLOPT_RESUME_FROM_LARGE, CURLOPTTYPE_OFF_T, 116), - - /* Sets the maximum size of data that will be downloaded from - * an HTTP or FTP server. See MAXFILESIZE above for the LONG version. - */ - CURLOPT(CURLOPT_MAXFILESIZE_LARGE, CURLOPTTYPE_OFF_T, 117), - - /* Set this option to the file name of your .netrc file you want libcurl - to parse (using the CURLOPT_NETRC option). If not set, libcurl will do - a poor attempt to find the user's home directory and check for a .netrc - file in there. */ - CURLOPT(CURLOPT_NETRC_FILE, CURLOPTTYPE_STRINGPOINT, 118), - - /* Enable SSL/TLS for FTP, pick one of: - CURLUSESSL_TRY - try using SSL, proceed anyway otherwise - CURLUSESSL_CONTROL - SSL for the control connection or fail - CURLUSESSL_ALL - SSL for all communication or fail - */ - CURLOPT(CURLOPT_USE_SSL, CURLOPTTYPE_LONG, 119), - - /* The _LARGE version of the standard POSTFIELDSIZE option */ - CURLOPT(CURLOPT_POSTFIELDSIZE_LARGE, CURLOPTTYPE_OFF_T, 120), - - /* Enable/disable the TCP Nagle algorithm */ - CURLOPT(CURLOPT_TCP_NODELAY, CURLOPTTYPE_LONG, 121), - - /* 122 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */ - /* 123 OBSOLETE. Gone in 7.16.0 */ - /* 124 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */ - /* 125 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */ - /* 126 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */ - /* 127 OBSOLETE. Gone in 7.16.0 */ - /* 128 OBSOLETE. Gone in 7.16.0 */ - - /* When FTP over SSL/TLS is selected (with CURLOPT_USE_SSL), this option - can be used to change libcurl's default action which is to first try - "AUTH SSL" and then "AUTH TLS" in this order, and proceed when a OK - response has been received. - - Available parameters are: - CURLFTPAUTH_DEFAULT - let libcurl decide - CURLFTPAUTH_SSL - try "AUTH SSL" first, then TLS - CURLFTPAUTH_TLS - try "AUTH TLS" first, then SSL - */ - CURLOPT(CURLOPT_FTPSSLAUTH, CURLOPTTYPE_LONG, 129), - - CURLOPT(CURLOPT_IOCTLFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 130), - CURLOPT(CURLOPT_IOCTLDATA, CURLOPTTYPE_OBJECTPOINT, 131), - - /* 132 OBSOLETE. Gone in 7.16.0 */ - /* 133 OBSOLETE. Gone in 7.16.0 */ - - /* zero terminated string for pass on to the FTP server when asked for - "account" info */ - CURLOPT(CURLOPT_FTP_ACCOUNT, CURLOPTTYPE_STRINGPOINT, 134), - - /* feed cookie into cookie engine */ - CURLOPT(CURLOPT_COOKIELIST, CURLOPTTYPE_STRINGPOINT, 135), - - /* ignore Content-Length */ - CURLOPT(CURLOPT_IGNORE_CONTENT_LENGTH, CURLOPTTYPE_LONG, 136), - - /* Set to non-zero to skip the IP address received in a 227 PASV FTP server - response. Typically used for FTP-SSL purposes but is not restricted to - that. libcurl will then instead use the same IP address it used for the - control connection. */ - CURLOPT(CURLOPT_FTP_SKIP_PASV_IP, CURLOPTTYPE_LONG, 137), - - /* Select "file method" to use when doing FTP, see the curl_ftpmethod - above. */ - CURLOPT(CURLOPT_FTP_FILEMETHOD, CURLOPTTYPE_LONG, 138), - - /* Local port number to bind the socket to */ - CURLOPT(CURLOPT_LOCALPORT, CURLOPTTYPE_LONG, 139), - - /* Number of ports to try, including the first one set with LOCALPORT. - Thus, setting it to 1 will make no additional attempts but the first. - */ - CURLOPT(CURLOPT_LOCALPORTRANGE, CURLOPTTYPE_LONG, 140), - - /* no transfer, set up connection and let application use the socket by - extracting it with CURLINFO_LASTSOCKET */ - CURLOPT(CURLOPT_CONNECT_ONLY, CURLOPTTYPE_LONG, 141), - - /* Function that will be called to convert from the - network encoding (instead of using the iconv calls in libcurl) */ - CURLOPT(CURLOPT_CONV_FROM_NETWORK_FUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 142), - - /* Function that will be called to convert to the - network encoding (instead of using the iconv calls in libcurl) */ - CURLOPT(CURLOPT_CONV_TO_NETWORK_FUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 143), - - /* Function that will be called to convert from UTF8 - (instead of using the iconv calls in libcurl) - Note that this is used only for SSL certificate processing */ - CURLOPT(CURLOPT_CONV_FROM_UTF8_FUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 144), - - /* if the connection proceeds too quickly then need to slow it down */ - /* limit-rate: maximum number of bytes per second to send or receive */ - CURLOPT(CURLOPT_MAX_SEND_SPEED_LARGE, CURLOPTTYPE_OFF_T, 145), - CURLOPT(CURLOPT_MAX_RECV_SPEED_LARGE, CURLOPTTYPE_OFF_T, 146), - - /* Pointer to command string to send if USER/PASS fails. */ - CURLOPT(CURLOPT_FTP_ALTERNATIVE_TO_USER, CURLOPTTYPE_STRINGPOINT, 147), - - /* callback function for setting socket options */ - CURLOPT(CURLOPT_SOCKOPTFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 148), - CURLOPT(CURLOPT_SOCKOPTDATA, CURLOPTTYPE_OBJECTPOINT, 149), - - /* set to 0 to disable session ID re-use for this transfer, default is - enabled (== 1) */ - CURLOPT(CURLOPT_SSL_SESSIONID_CACHE, CURLOPTTYPE_LONG, 150), - - /* allowed SSH authentication methods */ - CURLOPT(CURLOPT_SSH_AUTH_TYPES, CURLOPTTYPE_LONG, 151), - - /* Used by scp/sftp to do public/private key authentication */ - CURLOPT(CURLOPT_SSH_PUBLIC_KEYFILE, CURLOPTTYPE_STRINGPOINT, 152), - CURLOPT(CURLOPT_SSH_PRIVATE_KEYFILE, CURLOPTTYPE_STRINGPOINT, 153), - - /* Send CCC (Clear Command Channel) after authentication */ - CURLOPT(CURLOPT_FTP_SSL_CCC, CURLOPTTYPE_LONG, 154), - - /* Same as TIMEOUT and CONNECTTIMEOUT, but with ms resolution */ - CURLOPT(CURLOPT_TIMEOUT_MS, CURLOPTTYPE_LONG, 155), - CURLOPT(CURLOPT_CONNECTTIMEOUT_MS, CURLOPTTYPE_LONG, 156), - - /* set to zero to disable the libcurl's decoding and thus pass the raw body - data to the application even when it is encoded/compressed */ - CURLOPT(CURLOPT_HTTP_TRANSFER_DECODING, CURLOPTTYPE_LONG, 157), - CURLOPT(CURLOPT_HTTP_CONTENT_DECODING, CURLOPTTYPE_LONG, 158), - - /* Permission used when creating new files and directories on the remote - server for protocols that support it, SFTP/SCP/FILE */ - CURLOPT(CURLOPT_NEW_FILE_PERMS, CURLOPTTYPE_LONG, 159), - CURLOPT(CURLOPT_NEW_DIRECTORY_PERMS, CURLOPTTYPE_LONG, 160), - - /* Set the behaviour of POST when redirecting. Values must be set to one - of CURL_REDIR* defines below. This used to be called CURLOPT_POST301 */ - CURLOPT(CURLOPT_POSTREDIR, CURLOPTTYPE_LONG, 161), - - /* used by scp/sftp to verify the host's public key */ - CURLOPT(CURLOPT_SSH_HOST_PUBLIC_KEY_MD5, CURLOPTTYPE_STRINGPOINT, 162), - - /* Callback function for opening socket (instead of socket(2)). Optionally, - callback is able change the address or refuse to connect returning - CURL_SOCKET_BAD. The callback should have type - curl_opensocket_callback */ - CURLOPT(CURLOPT_OPENSOCKETFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 163), - CURLOPT(CURLOPT_OPENSOCKETDATA, CURLOPTTYPE_OBJECTPOINT, 164), - - /* POST volatile input fields. */ - CURLOPT(CURLOPT_COPYPOSTFIELDS, CURLOPTTYPE_OBJECTPOINT, 165), - - /* set transfer mode (;type=) when doing FTP via an HTTP proxy */ - CURLOPT(CURLOPT_PROXY_TRANSFER_MODE, CURLOPTTYPE_LONG, 166), - - /* Callback function for seeking in the input stream */ - CURLOPT(CURLOPT_SEEKFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 167), - CURLOPT(CURLOPT_SEEKDATA, CURLOPTTYPE_OBJECTPOINT, 168), - - /* CRL file */ - CURLOPT(CURLOPT_CRLFILE, CURLOPTTYPE_STRINGPOINT, 169), - - /* Issuer certificate */ - CURLOPT(CURLOPT_ISSUERCERT, CURLOPTTYPE_STRINGPOINT, 170), - - /* (IPv6) Address scope */ - CURLOPT(CURLOPT_ADDRESS_SCOPE, CURLOPTTYPE_LONG, 171), - - /* Collect certificate chain info and allow it to get retrievable with - CURLINFO_CERTINFO after the transfer is complete. */ - CURLOPT(CURLOPT_CERTINFO, CURLOPTTYPE_LONG, 172), - - /* "name" and "pwd" to use when fetching. */ - CURLOPT(CURLOPT_USERNAME, CURLOPTTYPE_STRINGPOINT, 173), - CURLOPT(CURLOPT_PASSWORD, CURLOPTTYPE_STRINGPOINT, 174), - - /* "name" and "pwd" to use with Proxy when fetching. */ - CURLOPT(CURLOPT_PROXYUSERNAME, CURLOPTTYPE_STRINGPOINT, 175), - CURLOPT(CURLOPT_PROXYPASSWORD, CURLOPTTYPE_STRINGPOINT, 176), - - /* Comma separated list of hostnames defining no-proxy zones. These should - match both hostnames directly, and hostnames within a domain. For - example, local.com will match local.com and www.local.com, but NOT - notlocal.com or www.notlocal.com. For compatibility with other - implementations of this, .local.com will be considered to be the same as - local.com. A single * is the only valid wildcard, and effectively - disables the use of proxy. */ - CURLOPT(CURLOPT_NOPROXY, CURLOPTTYPE_STRINGPOINT, 177), - - /* block size for TFTP transfers */ - CURLOPT(CURLOPT_TFTP_BLKSIZE, CURLOPTTYPE_LONG, 178), - - /* Socks Service */ - /* DEPRECATED, do not use! */ - CURLOPT(CURLOPT_SOCKS5_GSSAPI_SERVICE, CURLOPTTYPE_STRINGPOINT, 179), - - /* Socks Service */ - CURLOPT(CURLOPT_SOCKS5_GSSAPI_NEC, CURLOPTTYPE_LONG, 180), - - /* set the bitmask for the protocols that are allowed to be used for the - transfer, which thus helps the app which takes URLs from users or other - external inputs and want to restrict what protocol(s) to deal - with. Defaults to CURLPROTO_ALL. */ - CURLOPT(CURLOPT_PROTOCOLS, CURLOPTTYPE_LONG, 181), - - /* set the bitmask for the protocols that libcurl is allowed to follow to, - as a subset of the CURLOPT_PROTOCOLS ones. That means the protocol needs - to be set in both bitmasks to be allowed to get redirected to. */ - CURLOPT(CURLOPT_REDIR_PROTOCOLS, CURLOPTTYPE_LONG, 182), - - /* set the SSH knownhost file name to use */ - CURLOPT(CURLOPT_SSH_KNOWNHOSTS, CURLOPTTYPE_STRINGPOINT, 183), - - /* set the SSH host key callback, must point to a curl_sshkeycallback - function */ - CURLOPT(CURLOPT_SSH_KEYFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 184), - - /* set the SSH host key callback custom pointer */ - CURLOPT(CURLOPT_SSH_KEYDATA, CURLOPTTYPE_OBJECTPOINT, 185), - - /* set the SMTP mail originator */ - CURLOPT(CURLOPT_MAIL_FROM, CURLOPTTYPE_STRINGPOINT, 186), - - /* set the list of SMTP mail receiver(s) */ - CURLOPT(CURLOPT_MAIL_RCPT, CURLOPTTYPE_SLISTPOINT, 187), - - /* FTP: send PRET before PASV */ - CURLOPT(CURLOPT_FTP_USE_PRET, CURLOPTTYPE_LONG, 188), - - /* RTSP request method (OPTIONS, SETUP, PLAY, etc...) */ - CURLOPT(CURLOPT_RTSP_REQUEST, CURLOPTTYPE_LONG, 189), - - /* The RTSP session identifier */ - CURLOPT(CURLOPT_RTSP_SESSION_ID, CURLOPTTYPE_STRINGPOINT, 190), - - /* The RTSP stream URI */ - CURLOPT(CURLOPT_RTSP_STREAM_URI, CURLOPTTYPE_STRINGPOINT, 191), - - /* The Transport: header to use in RTSP requests */ - CURLOPT(CURLOPT_RTSP_TRANSPORT, CURLOPTTYPE_STRINGPOINT, 192), - - /* Manually initialize the client RTSP CSeq for this handle */ - CURLOPT(CURLOPT_RTSP_CLIENT_CSEQ, CURLOPTTYPE_LONG, 193), - - /* Manually initialize the server RTSP CSeq for this handle */ - CURLOPT(CURLOPT_RTSP_SERVER_CSEQ, CURLOPTTYPE_LONG, 194), - - /* The stream to pass to INTERLEAVEFUNCTION. */ - CURLOPT(CURLOPT_INTERLEAVEDATA, CURLOPTTYPE_OBJECTPOINT, 195), - - /* Let the application define a custom write method for RTP data */ - CURLOPT(CURLOPT_INTERLEAVEFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 196), - - /* Turn on wildcard matching */ - CURLOPT(CURLOPT_WILDCARDMATCH, CURLOPTTYPE_LONG, 197), - - /* Directory matching callback called before downloading of an - individual file (chunk) started */ - CURLOPT(CURLOPT_CHUNK_BGN_FUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 198), - - /* Directory matching callback called after the file (chunk) - was downloaded, or skipped */ - CURLOPT(CURLOPT_CHUNK_END_FUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 199), - - /* Change match (fnmatch-like) callback for wildcard matching */ - CURLOPT(CURLOPT_FNMATCH_FUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 200), - - /* Let the application define custom chunk data pointer */ - CURLOPT(CURLOPT_CHUNK_DATA, CURLOPTTYPE_OBJECTPOINT, 201), - - /* FNMATCH_FUNCTION user pointer */ - CURLOPT(CURLOPT_FNMATCH_DATA, CURLOPTTYPE_OBJECTPOINT, 202), - - /* send linked-list of name:port:address sets */ - CURLOPT(CURLOPT_RESOLVE, CURLOPTTYPE_SLISTPOINT, 203), - - /* Set a username for authenticated TLS */ - CURLOPT(CURLOPT_TLSAUTH_USERNAME, CURLOPTTYPE_STRINGPOINT, 204), - - /* Set a password for authenticated TLS */ - CURLOPT(CURLOPT_TLSAUTH_PASSWORD, CURLOPTTYPE_STRINGPOINT, 205), - - /* Set authentication type for authenticated TLS */ - CURLOPT(CURLOPT_TLSAUTH_TYPE, CURLOPTTYPE_STRINGPOINT, 206), - - /* Set to 1 to enable the "TE:" header in HTTP requests to ask for - compressed transfer-encoded responses. Set to 0 to disable the use of TE: - in outgoing requests. The current default is 0, but it might change in a - future libcurl release. - - libcurl will ask for the compressed methods it knows of, and if that - isn't any, it will not ask for transfer-encoding at all even if this - option is set to 1. - - */ - CURLOPT(CURLOPT_TRANSFER_ENCODING, CURLOPTTYPE_LONG, 207), - - /* Callback function for closing socket (instead of close(2)). The callback - should have type curl_closesocket_callback */ - CURLOPT(CURLOPT_CLOSESOCKETFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 208), - CURLOPT(CURLOPT_CLOSESOCKETDATA, CURLOPTTYPE_OBJECTPOINT, 209), - - /* allow GSSAPI credential delegation */ - CURLOPT(CURLOPT_GSSAPI_DELEGATION, CURLOPTTYPE_LONG, 210), - - /* Set the name servers to use for DNS resolution */ - CURLOPT(CURLOPT_DNS_SERVERS, CURLOPTTYPE_STRINGPOINT, 211), - - /* Time-out accept operations (currently for FTP only) after this amount - of milliseconds. */ - CURLOPT(CURLOPT_ACCEPTTIMEOUT_MS, CURLOPTTYPE_LONG, 212), - - /* Set TCP keepalive */ - CURLOPT(CURLOPT_TCP_KEEPALIVE, CURLOPTTYPE_LONG, 213), - - /* non-universal keepalive knobs (Linux, AIX, HP-UX, more) */ - CURLOPT(CURLOPT_TCP_KEEPIDLE, CURLOPTTYPE_LONG, 214), - CURLOPT(CURLOPT_TCP_KEEPINTVL, CURLOPTTYPE_LONG, 215), - - /* Enable/disable specific SSL features with a bitmask, see CURLSSLOPT_* */ - CURLOPT(CURLOPT_SSL_OPTIONS, CURLOPTTYPE_LONG, 216), - - /* Set the SMTP auth originator */ - CURLOPT(CURLOPT_MAIL_AUTH, CURLOPTTYPE_STRINGPOINT, 217), - - /* Enable/disable SASL initial response */ - CURLOPT(CURLOPT_SASL_IR, CURLOPTTYPE_LONG, 218), - - /* Function that will be called instead of the internal progress display - * function. This function should be defined as the curl_xferinfo_callback - * prototype defines. (Deprecates CURLOPT_PROGRESSFUNCTION) */ - CURLOPT(CURLOPT_XFERINFOFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 219), - - /* The XOAUTH2 bearer token */ - CURLOPT(CURLOPT_XOAUTH2_BEARER, CURLOPTTYPE_STRINGPOINT, 220), - - /* Set the interface string to use as outgoing network - * interface for DNS requests. - * Only supported by the c-ares DNS backend */ - CURLOPT(CURLOPT_DNS_INTERFACE, CURLOPTTYPE_STRINGPOINT, 221), - - /* Set the local IPv4 address to use for outgoing DNS requests. - * Only supported by the c-ares DNS backend */ - CURLOPT(CURLOPT_DNS_LOCAL_IP4, CURLOPTTYPE_STRINGPOINT, 222), - - /* Set the local IPv6 address to use for outgoing DNS requests. - * Only supported by the c-ares DNS backend */ - CURLOPT(CURLOPT_DNS_LOCAL_IP6, CURLOPTTYPE_STRINGPOINT, 223), - - /* Set authentication options directly */ - CURLOPT(CURLOPT_LOGIN_OPTIONS, CURLOPTTYPE_STRINGPOINT, 224), - - /* Enable/disable TLS NPN extension (http2 over ssl might fail without) */ - CURLOPT(CURLOPT_SSL_ENABLE_NPN, CURLOPTTYPE_LONG, 225), - - /* Enable/disable TLS ALPN extension (http2 over ssl might fail without) */ - CURLOPT(CURLOPT_SSL_ENABLE_ALPN, CURLOPTTYPE_LONG, 226), - - /* Time to wait for a response to a HTTP request containing an - * Expect: 100-continue header before sending the data anyway. */ - CURLOPT(CURLOPT_EXPECT_100_TIMEOUT_MS, CURLOPTTYPE_LONG, 227), - - /* This points to a linked list of headers used for proxy requests only, - struct curl_slist kind */ - CURLOPT(CURLOPT_PROXYHEADER, CURLOPTTYPE_SLISTPOINT, 228), - - /* Pass in a bitmask of "header options" */ - CURLOPT(CURLOPT_HEADEROPT, CURLOPTTYPE_LONG, 229), - - /* The public key in DER form used to validate the peer public key - this option is used only if SSL_VERIFYPEER is true */ - CURLOPT(CURLOPT_PINNEDPUBLICKEY, CURLOPTTYPE_STRINGPOINT, 230), - - /* Path to Unix domain socket */ - CURLOPT(CURLOPT_UNIX_SOCKET_PATH, CURLOPTTYPE_STRINGPOINT, 231), - - /* Set if we should verify the certificate status. */ - CURLOPT(CURLOPT_SSL_VERIFYSTATUS, CURLOPTTYPE_LONG, 232), - - /* Set if we should enable TLS false start. */ - CURLOPT(CURLOPT_SSL_FALSESTART, CURLOPTTYPE_LONG, 233), - - /* Do not squash dot-dot sequences */ - CURLOPT(CURLOPT_PATH_AS_IS, CURLOPTTYPE_LONG, 234), - - /* Proxy Service Name */ - CURLOPT(CURLOPT_PROXY_SERVICE_NAME, CURLOPTTYPE_STRINGPOINT, 235), - - /* Service Name */ - CURLOPT(CURLOPT_SERVICE_NAME, CURLOPTTYPE_STRINGPOINT, 236), - - /* Wait/don't wait for pipe/mutex to clarify */ - CURLOPT(CURLOPT_PIPEWAIT, CURLOPTTYPE_LONG, 237), - - /* Set the protocol used when curl is given a URL without a protocol */ - CURLOPT(CURLOPT_DEFAULT_PROTOCOL, CURLOPTTYPE_STRINGPOINT, 238), - - /* Set stream weight, 1 - 256 (default is 16) */ - CURLOPT(CURLOPT_STREAM_WEIGHT, CURLOPTTYPE_LONG, 239), - - /* Set stream dependency on another CURL handle */ - CURLOPT(CURLOPT_STREAM_DEPENDS, CURLOPTTYPE_OBJECTPOINT, 240), - - /* Set E-xclusive stream dependency on another CURL handle */ - CURLOPT(CURLOPT_STREAM_DEPENDS_E, CURLOPTTYPE_OBJECTPOINT, 241), - - /* Do not send any tftp option requests to the server */ - CURLOPT(CURLOPT_TFTP_NO_OPTIONS, CURLOPTTYPE_LONG, 242), - - /* Linked-list of host:port:connect-to-host:connect-to-port, - overrides the URL's host:port (only for the network layer) */ - CURLOPT(CURLOPT_CONNECT_TO, CURLOPTTYPE_SLISTPOINT, 243), - - /* Set TCP Fast Open */ - CURLOPT(CURLOPT_TCP_FASTOPEN, CURLOPTTYPE_LONG, 244), - - /* Continue to send data if the server responds early with an - * HTTP status code >= 300 */ - CURLOPT(CURLOPT_KEEP_SENDING_ON_ERROR, CURLOPTTYPE_LONG, 245), - - /* The CApath or CAfile used to validate the proxy certificate - this option is used only if PROXY_SSL_VERIFYPEER is true */ - CURLOPT(CURLOPT_PROXY_CAINFO, CURLOPTTYPE_STRINGPOINT, 246), - - /* The CApath directory used to validate the proxy certificate - this option is used only if PROXY_SSL_VERIFYPEER is true */ - CURLOPT(CURLOPT_PROXY_CAPATH, CURLOPTTYPE_STRINGPOINT, 247), - - /* Set if we should verify the proxy in ssl handshake, - set 1 to verify. */ - CURLOPT(CURLOPT_PROXY_SSL_VERIFYPEER, CURLOPTTYPE_LONG, 248), - - /* Set if we should verify the Common name from the proxy certificate in ssl - * handshake, set 1 to check existence, 2 to ensure that it matches - * the provided hostname. */ - CURLOPT(CURLOPT_PROXY_SSL_VERIFYHOST, CURLOPTTYPE_LONG, 249), - - /* What version to specifically try to use for proxy. - See CURL_SSLVERSION defines below. */ - CURLOPT(CURLOPT_PROXY_SSLVERSION, CURLOPTTYPE_LONG, 250), - - /* Set a username for authenticated TLS for proxy */ - CURLOPT(CURLOPT_PROXY_TLSAUTH_USERNAME, CURLOPTTYPE_STRINGPOINT, 251), - - /* Set a password for authenticated TLS for proxy */ - CURLOPT(CURLOPT_PROXY_TLSAUTH_PASSWORD, CURLOPTTYPE_STRINGPOINT, 252), - - /* Set authentication type for authenticated TLS for proxy */ - CURLOPT(CURLOPT_PROXY_TLSAUTH_TYPE, CURLOPTTYPE_STRINGPOINT, 253), - - /* name of the file keeping your private SSL-certificate for proxy */ - CURLOPT(CURLOPT_PROXY_SSLCERT, CURLOPTTYPE_STRINGPOINT, 254), - - /* type of the file keeping your SSL-certificate ("DER", "PEM", "ENG") for - proxy */ - CURLOPT(CURLOPT_PROXY_SSLCERTTYPE, CURLOPTTYPE_STRINGPOINT, 255), - - /* name of the file keeping your private SSL-key for proxy */ - CURLOPT(CURLOPT_PROXY_SSLKEY, CURLOPTTYPE_STRINGPOINT, 256), - - /* type of the file keeping your private SSL-key ("DER", "PEM", "ENG") for - proxy */ - CURLOPT(CURLOPT_PROXY_SSLKEYTYPE, CURLOPTTYPE_STRINGPOINT, 257), - - /* password for the SSL private key for proxy */ - CURLOPT(CURLOPT_PROXY_KEYPASSWD, CURLOPTTYPE_STRINGPOINT, 258), - - /* Specify which SSL ciphers to use for proxy */ - CURLOPT(CURLOPT_PROXY_SSL_CIPHER_LIST, CURLOPTTYPE_STRINGPOINT, 259), - - /* CRL file for proxy */ - CURLOPT(CURLOPT_PROXY_CRLFILE, CURLOPTTYPE_STRINGPOINT, 260), - - /* Enable/disable specific SSL features with a bitmask for proxy, see - CURLSSLOPT_* */ - CURLOPT(CURLOPT_PROXY_SSL_OPTIONS, CURLOPTTYPE_LONG, 261), - - /* Name of pre proxy to use. */ - CURLOPT(CURLOPT_PRE_PROXY, CURLOPTTYPE_STRINGPOINT, 262), - - /* The public key in DER form used to validate the proxy public key - this option is used only if PROXY_SSL_VERIFYPEER is true */ - CURLOPT(CURLOPT_PROXY_PINNEDPUBLICKEY, CURLOPTTYPE_STRINGPOINT, 263), - - /* Path to an abstract Unix domain socket */ - CURLOPT(CURLOPT_ABSTRACT_UNIX_SOCKET, CURLOPTTYPE_STRINGPOINT, 264), - - /* Suppress proxy CONNECT response headers from user callbacks */ - CURLOPT(CURLOPT_SUPPRESS_CONNECT_HEADERS, CURLOPTTYPE_LONG, 265), - - /* The request target, instead of extracted from the URL */ - CURLOPT(CURLOPT_REQUEST_TARGET, CURLOPTTYPE_STRINGPOINT, 266), - - /* bitmask of allowed auth methods for connections to SOCKS5 proxies */ - CURLOPT(CURLOPT_SOCKS5_AUTH, CURLOPTTYPE_LONG, 267), - - /* Enable/disable SSH compression */ - CURLOPT(CURLOPT_SSH_COMPRESSION, CURLOPTTYPE_LONG, 268), - - /* Post MIME data. */ - CURLOPT(CURLOPT_MIMEPOST, CURLOPTTYPE_OBJECTPOINT, 269), - - /* Time to use with the CURLOPT_TIMECONDITION. Specified in number of - seconds since 1 Jan 1970. */ - CURLOPT(CURLOPT_TIMEVALUE_LARGE, CURLOPTTYPE_OFF_T, 270), - - /* Head start in milliseconds to give happy eyeballs. */ - CURLOPT(CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS, CURLOPTTYPE_LONG, 271), - - /* Function that will be called before a resolver request is made */ - CURLOPT(CURLOPT_RESOLVER_START_FUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 272), - - /* User data to pass to the resolver start callback. */ - CURLOPT(CURLOPT_RESOLVER_START_DATA, CURLOPTTYPE_OBJECTPOINT, 273), - - /* send HAProxy PROXY protocol header? */ - CURLOPT(CURLOPT_HAPROXYPROTOCOL, CURLOPTTYPE_LONG, 274), - - /* shuffle addresses before use when DNS returns multiple */ - CURLOPT(CURLOPT_DNS_SHUFFLE_ADDRESSES, CURLOPTTYPE_LONG, 275), - - /* Specify which TLS 1.3 ciphers suites to use */ - CURLOPT(CURLOPT_TLS13_CIPHERS, CURLOPTTYPE_STRINGPOINT, 276), - CURLOPT(CURLOPT_PROXY_TLS13_CIPHERS, CURLOPTTYPE_STRINGPOINT, 277), - - /* Disallow specifying username/login in URL. */ - CURLOPT(CURLOPT_DISALLOW_USERNAME_IN_URL, CURLOPTTYPE_LONG, 278), - - /* DNS-over-HTTPS URL */ - CURLOPT(CURLOPT_DOH_URL, CURLOPTTYPE_STRINGPOINT, 279), - - /* Preferred buffer size to use for uploads */ - CURLOPT(CURLOPT_UPLOAD_BUFFERSIZE, CURLOPTTYPE_LONG, 280), - - /* Time in ms between connection upkeep calls for long-lived connections. */ - CURLOPT(CURLOPT_UPKEEP_INTERVAL_MS, CURLOPTTYPE_LONG, 281), - - /* Specify URL using CURL URL API. */ - CURLOPT(CURLOPT_CURLU, CURLOPTTYPE_OBJECTPOINT, 282), - - /* add trailing data just after no more data is available */ - CURLOPT(CURLOPT_TRAILERFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 283), - - /* pointer to be passed to HTTP_TRAILER_FUNCTION */ - CURLOPT(CURLOPT_TRAILERDATA, CURLOPTTYPE_OBJECTPOINT, 284), - - /* set this to 1L to allow HTTP/0.9 responses or 0L to disallow */ - CURLOPT(CURLOPT_HTTP09_ALLOWED, CURLOPTTYPE_LONG, 285), - - /* alt-svc control bitmask */ - CURLOPT(CURLOPT_ALTSVC_CTRL, CURLOPTTYPE_LONG, 286), - - /* alt-svc cache file name to possibly read from/write to */ - CURLOPT(CURLOPT_ALTSVC, CURLOPTTYPE_STRINGPOINT, 287), - - /* maximum age of a connection to consider it for reuse (in seconds) */ - CURLOPT(CURLOPT_MAXAGE_CONN, CURLOPTTYPE_LONG, 288), - - /* SASL authorisation identity */ - CURLOPT(CURLOPT_SASL_AUTHZID, CURLOPTTYPE_STRINGPOINT, 289), - - /* allow RCPT TO command to fail for some recipients */ - CURLOPT(CURLOPT_MAIL_RCPT_ALLLOWFAILS, CURLOPTTYPE_LONG, 290), - - CURLOPT_LASTENTRY /* the last unused */ -} CURLoption; - -#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all - the obsolete stuff removed! */ - -/* Backwards compatibility with older names */ -/* These are scheduled to disappear by 2011 */ - -/* This was added in version 7.19.1 */ -#define CURLOPT_POST301 CURLOPT_POSTREDIR - -/* These are scheduled to disappear by 2009 */ - -/* The following were added in 7.17.0 */ -#define CURLOPT_SSLKEYPASSWD CURLOPT_KEYPASSWD -#define CURLOPT_FTPAPPEND CURLOPT_APPEND -#define CURLOPT_FTPLISTONLY CURLOPT_DIRLISTONLY -#define CURLOPT_FTP_SSL CURLOPT_USE_SSL - -/* The following were added earlier */ - -#define CURLOPT_SSLCERTPASSWD CURLOPT_KEYPASSWD -#define CURLOPT_KRB4LEVEL CURLOPT_KRBLEVEL - -#else -/* This is set if CURL_NO_OLDIES is defined at compile-time */ -#undef CURLOPT_DNS_USE_GLOBAL_CACHE /* soon obsolete */ -#endif - - - /* Below here follows defines for the CURLOPT_IPRESOLVE option. If a host - name resolves addresses using more than one IP protocol version, this - option might be handy to force libcurl to use a specific IP version. */ -#define CURL_IPRESOLVE_WHATEVER 0 /* default, resolves addresses to all IP - versions that your system allows */ -#define CURL_IPRESOLVE_V4 1 /* resolve to IPv4 addresses */ -#define CURL_IPRESOLVE_V6 2 /* resolve to IPv6 addresses */ - - /* three convenient "aliases" that follow the name scheme better */ -#define CURLOPT_RTSPHEADER CURLOPT_HTTPHEADER - - /* These enums are for use with the CURLOPT_HTTP_VERSION option. */ -enum { - CURL_HTTP_VERSION_NONE, /* setting this means we don't care, and that we'd - like the library to choose the best possible - for us! */ - CURL_HTTP_VERSION_1_0, /* please use HTTP 1.0 in the request */ - CURL_HTTP_VERSION_1_1, /* please use HTTP 1.1 in the request */ - CURL_HTTP_VERSION_2_0, /* please use HTTP 2 in the request */ - CURL_HTTP_VERSION_2TLS, /* use version 2 for HTTPS, version 1.1 for HTTP */ - CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE, /* please use HTTP 2 without HTTP/1.1 - Upgrade */ - CURL_HTTP_VERSION_3 = 30, /* Makes use of explicit HTTP/3 without fallback. - Use CURLOPT_ALTSVC to enable HTTP/3 upgrade */ - CURL_HTTP_VERSION_LAST /* *ILLEGAL* http version */ -}; - -/* Convenience definition simple because the name of the version is HTTP/2 and - not 2.0. The 2_0 version of the enum name was set while the version was - still planned to be 2.0 and we stick to it for compatibility. */ -#define CURL_HTTP_VERSION_2 CURL_HTTP_VERSION_2_0 - -/* - * Public API enums for RTSP requests - */ -enum { - CURL_RTSPREQ_NONE, /* first in list */ - CURL_RTSPREQ_OPTIONS, - CURL_RTSPREQ_DESCRIBE, - CURL_RTSPREQ_ANNOUNCE, - CURL_RTSPREQ_SETUP, - CURL_RTSPREQ_PLAY, - CURL_RTSPREQ_PAUSE, - CURL_RTSPREQ_TEARDOWN, - CURL_RTSPREQ_GET_PARAMETER, - CURL_RTSPREQ_SET_PARAMETER, - CURL_RTSPREQ_RECORD, - CURL_RTSPREQ_RECEIVE, - CURL_RTSPREQ_LAST /* last in list */ -}; - - /* These enums are for use with the CURLOPT_NETRC option. */ -enum CURL_NETRC_OPTION { - CURL_NETRC_IGNORED, /* The .netrc will never be read. - * This is the default. */ - CURL_NETRC_OPTIONAL, /* A user:password in the URL will be preferred - * to one in the .netrc. */ - CURL_NETRC_REQUIRED, /* A user:password in the URL will be ignored. - * Unless one is set programmatically, the .netrc - * will be queried. */ - CURL_NETRC_LAST -}; - -enum { - CURL_SSLVERSION_DEFAULT, - CURL_SSLVERSION_TLSv1, /* TLS 1.x */ - CURL_SSLVERSION_SSLv2, - CURL_SSLVERSION_SSLv3, - CURL_SSLVERSION_TLSv1_0, - CURL_SSLVERSION_TLSv1_1, - CURL_SSLVERSION_TLSv1_2, - CURL_SSLVERSION_TLSv1_3, - - CURL_SSLVERSION_LAST /* never use, keep last */ -}; - -enum { - CURL_SSLVERSION_MAX_NONE = 0, - CURL_SSLVERSION_MAX_DEFAULT = (CURL_SSLVERSION_TLSv1 << 16), - CURL_SSLVERSION_MAX_TLSv1_0 = (CURL_SSLVERSION_TLSv1_0 << 16), - CURL_SSLVERSION_MAX_TLSv1_1 = (CURL_SSLVERSION_TLSv1_1 << 16), - CURL_SSLVERSION_MAX_TLSv1_2 = (CURL_SSLVERSION_TLSv1_2 << 16), - CURL_SSLVERSION_MAX_TLSv1_3 = (CURL_SSLVERSION_TLSv1_3 << 16), - - /* never use, keep last */ - CURL_SSLVERSION_MAX_LAST = (CURL_SSLVERSION_LAST << 16) -}; - -enum CURL_TLSAUTH { - CURL_TLSAUTH_NONE, - CURL_TLSAUTH_SRP, - CURL_TLSAUTH_LAST /* never use, keep last */ -}; - -/* symbols to use with CURLOPT_POSTREDIR. - CURL_REDIR_POST_301, CURL_REDIR_POST_302 and CURL_REDIR_POST_303 - can be bitwise ORed so that CURL_REDIR_POST_301 | CURL_REDIR_POST_302 - | CURL_REDIR_POST_303 == CURL_REDIR_POST_ALL */ - -#define CURL_REDIR_GET_ALL 0 -#define CURL_REDIR_POST_301 1 -#define CURL_REDIR_POST_302 2 -#define CURL_REDIR_POST_303 4 -#define CURL_REDIR_POST_ALL \ - (CURL_REDIR_POST_301|CURL_REDIR_POST_302|CURL_REDIR_POST_303) - -typedef enum { - CURL_TIMECOND_NONE, - - CURL_TIMECOND_IFMODSINCE, - CURL_TIMECOND_IFUNMODSINCE, - CURL_TIMECOND_LASTMOD, - - CURL_TIMECOND_LAST -} curl_TimeCond; - -/* Special size_t value signaling a zero-terminated string. */ -#define CURL_ZERO_TERMINATED ((size_t) -1) - -/* curl_strequal() and curl_strnequal() are subject for removal in a future - release */ -CURL_EXTERN int curl_strequal(const char *s1, const char *s2); -CURL_EXTERN int curl_strnequal(const char *s1, const char *s2, size_t n); - -/* Mime/form handling support. */ -typedef struct curl_mime_s curl_mime; /* Mime context. */ -typedef struct curl_mimepart_s curl_mimepart; /* Mime part context. */ - -/* - * NAME curl_mime_init() - * - * DESCRIPTION - * - * Create a mime context and return its handle. The easy parameter is the - * target handle. - */ -CURL_EXTERN curl_mime *curl_mime_init(CURL *easy); - -/* - * NAME curl_mime_free() - * - * DESCRIPTION - * - * release a mime handle and its substructures. - */ -CURL_EXTERN void curl_mime_free(curl_mime *mime); - -/* - * NAME curl_mime_addpart() - * - * DESCRIPTION - * - * Append a new empty part to the given mime context and return a handle to - * the created part. - */ -CURL_EXTERN curl_mimepart *curl_mime_addpart(curl_mime *mime); - -/* - * NAME curl_mime_name() - * - * DESCRIPTION - * - * Set mime/form part name. - */ -CURL_EXTERN CURLcode curl_mime_name(curl_mimepart *part, const char *name); - -/* - * NAME curl_mime_filename() - * - * DESCRIPTION - * - * Set mime part remote file name. - */ -CURL_EXTERN CURLcode curl_mime_filename(curl_mimepart *part, - const char *filename); - -/* - * NAME curl_mime_type() - * - * DESCRIPTION - * - * Set mime part type. - */ -CURL_EXTERN CURLcode curl_mime_type(curl_mimepart *part, const char *mimetype); - -/* - * NAME curl_mime_encoder() - * - * DESCRIPTION - * - * Set mime data transfer encoder. - */ -CURL_EXTERN CURLcode curl_mime_encoder(curl_mimepart *part, - const char *encoding); - -/* - * NAME curl_mime_data() - * - * DESCRIPTION - * - * Set mime part data source from memory data, - */ -CURL_EXTERN CURLcode curl_mime_data(curl_mimepart *part, - const char *data, size_t datasize); - -/* - * NAME curl_mime_filedata() - * - * DESCRIPTION - * - * Set mime part data source from named file. - */ -CURL_EXTERN CURLcode curl_mime_filedata(curl_mimepart *part, - const char *filename); - -/* - * NAME curl_mime_data_cb() - * - * DESCRIPTION - * - * Set mime part data source from callback function. - */ -CURL_EXTERN CURLcode curl_mime_data_cb(curl_mimepart *part, - curl_off_t datasize, - curl_read_callback readfunc, - curl_seek_callback seekfunc, - curl_free_callback freefunc, - void *arg); - -/* - * NAME curl_mime_subparts() - * - * DESCRIPTION - * - * Set mime part data source from subparts. - */ -CURL_EXTERN CURLcode curl_mime_subparts(curl_mimepart *part, - curl_mime *subparts); -/* - * NAME curl_mime_headers() - * - * DESCRIPTION - * - * Set mime part headers. - */ -CURL_EXTERN CURLcode curl_mime_headers(curl_mimepart *part, - struct curl_slist *headers, - int take_ownership); - -typedef enum { - CURLFORM_NOTHING, /********* the first one is unused ************/ - CURLFORM_COPYNAME, - CURLFORM_PTRNAME, - CURLFORM_NAMELENGTH, - CURLFORM_COPYCONTENTS, - CURLFORM_PTRCONTENTS, - CURLFORM_CONTENTSLENGTH, - CURLFORM_FILECONTENT, - CURLFORM_ARRAY, - CURLFORM_OBSOLETE, - CURLFORM_FILE, - - CURLFORM_BUFFER, - CURLFORM_BUFFERPTR, - CURLFORM_BUFFERLENGTH, - - CURLFORM_CONTENTTYPE, - CURLFORM_CONTENTHEADER, - CURLFORM_FILENAME, - CURLFORM_END, - CURLFORM_OBSOLETE2, - - CURLFORM_STREAM, - CURLFORM_CONTENTLEN, /* added in 7.46.0, provide a curl_off_t length */ - - CURLFORM_LASTENTRY /* the last unused */ -} CURLformoption; - -/* structure to be used as parameter for CURLFORM_ARRAY */ -struct curl_forms { - CURLformoption option; - const char *value; -}; - -/* use this for multipart formpost building */ -/* Returns code for curl_formadd() - * - * Returns: - * CURL_FORMADD_OK on success - * CURL_FORMADD_MEMORY if the FormInfo allocation fails - * CURL_FORMADD_OPTION_TWICE if one option is given twice for one Form - * CURL_FORMADD_NULL if a null pointer was given for a char - * CURL_FORMADD_MEMORY if the allocation of a FormInfo struct failed - * CURL_FORMADD_UNKNOWN_OPTION if an unknown option was used - * CURL_FORMADD_INCOMPLETE if the some FormInfo is not complete (or error) - * CURL_FORMADD_MEMORY if a curl_httppost struct cannot be allocated - * CURL_FORMADD_MEMORY if some allocation for string copying failed. - * CURL_FORMADD_ILLEGAL_ARRAY if an illegal option is used in an array - * - ***************************************************************************/ -typedef enum { - CURL_FORMADD_OK, /* first, no error */ - - CURL_FORMADD_MEMORY, - CURL_FORMADD_OPTION_TWICE, - CURL_FORMADD_NULL, - CURL_FORMADD_UNKNOWN_OPTION, - CURL_FORMADD_INCOMPLETE, - CURL_FORMADD_ILLEGAL_ARRAY, - CURL_FORMADD_DISABLED, /* libcurl was built with this disabled */ - - CURL_FORMADD_LAST /* last */ -} CURLFORMcode; - -/* - * NAME curl_formadd() - * - * DESCRIPTION - * - * Pretty advanced function for building multi-part formposts. Each invoke - * adds one part that together construct a full post. Then use - * CURLOPT_HTTPPOST to send it off to libcurl. - */ -CURL_EXTERN CURLFORMcode curl_formadd(struct curl_httppost **httppost, - struct curl_httppost **last_post, - ...); - -/* - * callback function for curl_formget() - * The void *arg pointer will be the one passed as second argument to - * curl_formget(). - * The character buffer passed to it must not be freed. - * Should return the buffer length passed to it as the argument "len" on - * success. - */ -typedef size_t (*curl_formget_callback)(void *arg, const char *buf, - size_t len); - -/* - * NAME curl_formget() - * - * DESCRIPTION - * - * Serialize a curl_httppost struct built with curl_formadd(). - * Accepts a void pointer as second argument which will be passed to - * the curl_formget_callback function. - * Returns 0 on success. - */ -CURL_EXTERN int curl_formget(struct curl_httppost *form, void *arg, - curl_formget_callback append); -/* - * NAME curl_formfree() - * - * DESCRIPTION - * - * Free a multipart formpost previously built with curl_formadd(). - */ -CURL_EXTERN void curl_formfree(struct curl_httppost *form); - -/* - * NAME curl_getenv() - * - * DESCRIPTION - * - * Returns a malloc()'ed string that MUST be curl_free()ed after usage is - * complete. DEPRECATED - see lib/README.curlx - */ -CURL_EXTERN char *curl_getenv(const char *variable); - -/* - * NAME curl_version() - * - * DESCRIPTION - * - * Returns a static ascii string of the libcurl version. - */ -CURL_EXTERN char *curl_version(void); - -/* - * NAME curl_easy_escape() - * - * DESCRIPTION - * - * Escapes URL strings (converts all letters consider illegal in URLs to their - * %XX versions). This function returns a new allocated string or NULL if an - * error occurred. - */ -CURL_EXTERN char *curl_easy_escape(CURL *handle, - const char *string, - int length); - -/* the previous version: */ -CURL_EXTERN char *curl_escape(const char *string, - int length); - - -/* - * NAME curl_easy_unescape() - * - * DESCRIPTION - * - * Unescapes URL encoding in strings (converts all %XX codes to their 8bit - * versions). This function returns a new allocated string or NULL if an error - * occurred. - * Conversion Note: On non-ASCII platforms the ASCII %XX codes are - * converted into the host encoding. - */ -CURL_EXTERN char *curl_easy_unescape(CURL *handle, - const char *string, - int length, - int *outlength); - -/* the previous version */ -CURL_EXTERN char *curl_unescape(const char *string, - int length); - -/* - * NAME curl_free() - * - * DESCRIPTION - * - * Provided for de-allocation in the same translation unit that did the - * allocation. Added in libcurl 7.10 - */ -CURL_EXTERN void curl_free(void *p); - -/* - * NAME curl_global_init() - * - * DESCRIPTION - * - * curl_global_init() should be invoked exactly once for each application that - * uses libcurl and before any call of other libcurl functions. - * - * This function is not thread-safe! - */ -CURL_EXTERN CURLcode curl_global_init(long flags); - -/* - * NAME curl_global_init_mem() - * - * DESCRIPTION - * - * curl_global_init() or curl_global_init_mem() should be invoked exactly once - * for each application that uses libcurl. This function can be used to - * initialize libcurl and set user defined memory management callback - * functions. Users can implement memory management routines to check for - * memory leaks, check for mis-use of the curl library etc. User registered - * callback routines with be invoked by this library instead of the system - * memory management routines like malloc, free etc. - */ -CURL_EXTERN CURLcode curl_global_init_mem(long flags, - curl_malloc_callback m, - curl_free_callback f, - curl_realloc_callback r, - curl_strdup_callback s, - curl_calloc_callback c); - -/* - * NAME curl_global_cleanup() - * - * DESCRIPTION - * - * curl_global_cleanup() should be invoked exactly once for each application - * that uses libcurl - */ -CURL_EXTERN void curl_global_cleanup(void); - -/* linked-list structure for the CURLOPT_QUOTE option (and other) */ -struct curl_slist { - char *data; - struct curl_slist *next; -}; - -/* - * NAME curl_global_sslset() - * - * DESCRIPTION - * - * When built with multiple SSL backends, curl_global_sslset() allows to - * choose one. This function can only be called once, and it must be called - * *before* curl_global_init(). - * - * The backend can be identified by the id (e.g. CURLSSLBACKEND_OPENSSL). The - * backend can also be specified via the name parameter (passing -1 as id). - * If both id and name are specified, the name will be ignored. If neither id - * nor name are specified, the function will fail with - * CURLSSLSET_UNKNOWN_BACKEND and set the "avail" pointer to the - * NULL-terminated list of available backends. - * - * Upon success, the function returns CURLSSLSET_OK. - * - * If the specified SSL backend is not available, the function returns - * CURLSSLSET_UNKNOWN_BACKEND and sets the "avail" pointer to a NULL-terminated - * list of available SSL backends. - * - * The SSL backend can be set only once. If it has already been set, a - * subsequent attempt to change it will result in a CURLSSLSET_TOO_LATE. - */ - -typedef struct { - curl_sslbackend id; - const char *name; -} curl_ssl_backend; - -typedef enum { - CURLSSLSET_OK = 0, - CURLSSLSET_UNKNOWN_BACKEND, - CURLSSLSET_TOO_LATE, - CURLSSLSET_NO_BACKENDS /* libcurl was built without any SSL support */ -} CURLsslset; - -CURL_EXTERN CURLsslset curl_global_sslset(curl_sslbackend id, const char *name, - const curl_ssl_backend ***avail); - -/* - * NAME curl_slist_append() - * - * DESCRIPTION - * - * Appends a string to a linked list. If no list exists, it will be created - * first. Returns the new list, after appending. - */ -CURL_EXTERN struct curl_slist *curl_slist_append(struct curl_slist *, - const char *); - -/* - * NAME curl_slist_free_all() - * - * DESCRIPTION - * - * free a previously built curl_slist. - */ -CURL_EXTERN void curl_slist_free_all(struct curl_slist *); - -/* - * NAME curl_getdate() - * - * DESCRIPTION - * - * Returns the time, in seconds since 1 Jan 1970 of the time string given in - * the first argument. The time argument in the second parameter is unused - * and should be set to NULL. - */ -CURL_EXTERN time_t curl_getdate(const char *p, const time_t *unused); - -/* info about the certificate chain, only for OpenSSL, GnuTLS, Schannel, NSS - and GSKit builds. Asked for with CURLOPT_CERTINFO / CURLINFO_CERTINFO */ -struct curl_certinfo { - int num_of_certs; /* number of certificates with information */ - struct curl_slist **certinfo; /* for each index in this array, there's a - linked list with textual information in the - format "name: value" */ -}; - -/* Information about the SSL library used and the respective internal SSL - handle, which can be used to obtain further information regarding the - connection. Asked for with CURLINFO_TLS_SSL_PTR or CURLINFO_TLS_SESSION. */ -struct curl_tlssessioninfo { - curl_sslbackend backend; - void *internals; -}; - -#define CURLINFO_STRING 0x100000 -#define CURLINFO_LONG 0x200000 -#define CURLINFO_DOUBLE 0x300000 -#define CURLINFO_SLIST 0x400000 -#define CURLINFO_PTR 0x400000 /* same as SLIST */ -#define CURLINFO_SOCKET 0x500000 -#define CURLINFO_OFF_T 0x600000 -#define CURLINFO_MASK 0x0fffff -#define CURLINFO_TYPEMASK 0xf00000 - -typedef enum { - CURLINFO_NONE, /* first, never use this */ - CURLINFO_EFFECTIVE_URL = CURLINFO_STRING + 1, - CURLINFO_RESPONSE_CODE = CURLINFO_LONG + 2, - CURLINFO_TOTAL_TIME = CURLINFO_DOUBLE + 3, - CURLINFO_NAMELOOKUP_TIME = CURLINFO_DOUBLE + 4, - CURLINFO_CONNECT_TIME = CURLINFO_DOUBLE + 5, - CURLINFO_PRETRANSFER_TIME = CURLINFO_DOUBLE + 6, - CURLINFO_SIZE_UPLOAD = CURLINFO_DOUBLE + 7, - CURLINFO_SIZE_UPLOAD_T = CURLINFO_OFF_T + 7, - CURLINFO_SIZE_DOWNLOAD = CURLINFO_DOUBLE + 8, - CURLINFO_SIZE_DOWNLOAD_T = CURLINFO_OFF_T + 8, - CURLINFO_SPEED_DOWNLOAD = CURLINFO_DOUBLE + 9, - CURLINFO_SPEED_DOWNLOAD_T = CURLINFO_OFF_T + 9, - CURLINFO_SPEED_UPLOAD = CURLINFO_DOUBLE + 10, - CURLINFO_SPEED_UPLOAD_T = CURLINFO_OFF_T + 10, - CURLINFO_HEADER_SIZE = CURLINFO_LONG + 11, - CURLINFO_REQUEST_SIZE = CURLINFO_LONG + 12, - CURLINFO_SSL_VERIFYRESULT = CURLINFO_LONG + 13, - CURLINFO_FILETIME = CURLINFO_LONG + 14, - CURLINFO_FILETIME_T = CURLINFO_OFF_T + 14, - CURLINFO_CONTENT_LENGTH_DOWNLOAD = CURLINFO_DOUBLE + 15, - CURLINFO_CONTENT_LENGTH_DOWNLOAD_T = CURLINFO_OFF_T + 15, - CURLINFO_CONTENT_LENGTH_UPLOAD = CURLINFO_DOUBLE + 16, - CURLINFO_CONTENT_LENGTH_UPLOAD_T = CURLINFO_OFF_T + 16, - CURLINFO_STARTTRANSFER_TIME = CURLINFO_DOUBLE + 17, - CURLINFO_CONTENT_TYPE = CURLINFO_STRING + 18, - CURLINFO_REDIRECT_TIME = CURLINFO_DOUBLE + 19, - CURLINFO_REDIRECT_COUNT = CURLINFO_LONG + 20, - CURLINFO_PRIVATE = CURLINFO_STRING + 21, - CURLINFO_HTTP_CONNECTCODE = CURLINFO_LONG + 22, - CURLINFO_HTTPAUTH_AVAIL = CURLINFO_LONG + 23, - CURLINFO_PROXYAUTH_AVAIL = CURLINFO_LONG + 24, - CURLINFO_OS_ERRNO = CURLINFO_LONG + 25, - CURLINFO_NUM_CONNECTS = CURLINFO_LONG + 26, - CURLINFO_SSL_ENGINES = CURLINFO_SLIST + 27, - CURLINFO_COOKIELIST = CURLINFO_SLIST + 28, - CURLINFO_LASTSOCKET = CURLINFO_LONG + 29, - CURLINFO_FTP_ENTRY_PATH = CURLINFO_STRING + 30, - CURLINFO_REDIRECT_URL = CURLINFO_STRING + 31, - CURLINFO_PRIMARY_IP = CURLINFO_STRING + 32, - CURLINFO_APPCONNECT_TIME = CURLINFO_DOUBLE + 33, - CURLINFO_CERTINFO = CURLINFO_PTR + 34, - CURLINFO_CONDITION_UNMET = CURLINFO_LONG + 35, - CURLINFO_RTSP_SESSION_ID = CURLINFO_STRING + 36, - CURLINFO_RTSP_CLIENT_CSEQ = CURLINFO_LONG + 37, - CURLINFO_RTSP_SERVER_CSEQ = CURLINFO_LONG + 38, - CURLINFO_RTSP_CSEQ_RECV = CURLINFO_LONG + 39, - CURLINFO_PRIMARY_PORT = CURLINFO_LONG + 40, - CURLINFO_LOCAL_IP = CURLINFO_STRING + 41, - CURLINFO_LOCAL_PORT = CURLINFO_LONG + 42, - CURLINFO_TLS_SESSION = CURLINFO_PTR + 43, - CURLINFO_ACTIVESOCKET = CURLINFO_SOCKET + 44, - CURLINFO_TLS_SSL_PTR = CURLINFO_PTR + 45, - CURLINFO_HTTP_VERSION = CURLINFO_LONG + 46, - CURLINFO_PROXY_SSL_VERIFYRESULT = CURLINFO_LONG + 47, - CURLINFO_PROTOCOL = CURLINFO_LONG + 48, - CURLINFO_SCHEME = CURLINFO_STRING + 49, - /* Fill in new entries below here! */ - - /* Preferably these would be defined conditionally based on the - sizeof curl_off_t being 64-bits */ - CURLINFO_TOTAL_TIME_T = CURLINFO_OFF_T + 50, - CURLINFO_NAMELOOKUP_TIME_T = CURLINFO_OFF_T + 51, - CURLINFO_CONNECT_TIME_T = CURLINFO_OFF_T + 52, - CURLINFO_PRETRANSFER_TIME_T = CURLINFO_OFF_T + 53, - CURLINFO_STARTTRANSFER_TIME_T = CURLINFO_OFF_T + 54, - CURLINFO_REDIRECT_TIME_T = CURLINFO_OFF_T + 55, - CURLINFO_APPCONNECT_TIME_T = CURLINFO_OFF_T + 56, - CURLINFO_RETRY_AFTER = CURLINFO_OFF_T + 57, - - CURLINFO_LASTONE = 57 -} CURLINFO; - -/* CURLINFO_RESPONSE_CODE is the new name for the option previously known as - CURLINFO_HTTP_CODE */ -#define CURLINFO_HTTP_CODE CURLINFO_RESPONSE_CODE - -typedef enum { - CURLCLOSEPOLICY_NONE, /* first, never use this */ - - CURLCLOSEPOLICY_OLDEST, - CURLCLOSEPOLICY_LEAST_RECENTLY_USED, - CURLCLOSEPOLICY_LEAST_TRAFFIC, - CURLCLOSEPOLICY_SLOWEST, - CURLCLOSEPOLICY_CALLBACK, - - CURLCLOSEPOLICY_LAST /* last, never use this */ -} curl_closepolicy; - -#define CURL_GLOBAL_SSL (1<<0) /* no purpose since since 7.57.0 */ -#define CURL_GLOBAL_WIN32 (1<<1) -#define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL|CURL_GLOBAL_WIN32) -#define CURL_GLOBAL_NOTHING 0 -#define CURL_GLOBAL_DEFAULT CURL_GLOBAL_ALL -#define CURL_GLOBAL_ACK_EINTR (1<<2) - - -/***************************************************************************** - * Setup defines, protos etc for the sharing stuff. - */ - -/* Different data locks for a single share */ -typedef enum { - CURL_LOCK_DATA_NONE = 0, - /* CURL_LOCK_DATA_SHARE is used internally to say that - * the locking is just made to change the internal state of the share - * itself. - */ - CURL_LOCK_DATA_SHARE, - CURL_LOCK_DATA_COOKIE, - CURL_LOCK_DATA_DNS, - CURL_LOCK_DATA_SSL_SESSION, - CURL_LOCK_DATA_CONNECT, - CURL_LOCK_DATA_PSL, - CURL_LOCK_DATA_LAST -} curl_lock_data; - -/* Different lock access types */ -typedef enum { - CURL_LOCK_ACCESS_NONE = 0, /* unspecified action */ - CURL_LOCK_ACCESS_SHARED = 1, /* for read perhaps */ - CURL_LOCK_ACCESS_SINGLE = 2, /* for write perhaps */ - CURL_LOCK_ACCESS_LAST /* never use */ -} curl_lock_access; - -typedef void (*curl_lock_function)(CURL *handle, - curl_lock_data data, - curl_lock_access locktype, - void *userptr); -typedef void (*curl_unlock_function)(CURL *handle, - curl_lock_data data, - void *userptr); - - -typedef enum { - CURLSHE_OK, /* all is fine */ - CURLSHE_BAD_OPTION, /* 1 */ - CURLSHE_IN_USE, /* 2 */ - CURLSHE_INVALID, /* 3 */ - CURLSHE_NOMEM, /* 4 out of memory */ - CURLSHE_NOT_BUILT_IN, /* 5 feature not present in lib */ - CURLSHE_LAST /* never use */ -} CURLSHcode; - -typedef enum { - CURLSHOPT_NONE, /* don't use */ - CURLSHOPT_SHARE, /* specify a data type to share */ - CURLSHOPT_UNSHARE, /* specify which data type to stop sharing */ - CURLSHOPT_LOCKFUNC, /* pass in a 'curl_lock_function' pointer */ - CURLSHOPT_UNLOCKFUNC, /* pass in a 'curl_unlock_function' pointer */ - CURLSHOPT_USERDATA, /* pass in a user data pointer used in the lock/unlock - callback functions */ - CURLSHOPT_LAST /* never use */ -} CURLSHoption; - -CURL_EXTERN CURLSH *curl_share_init(void); -CURL_EXTERN CURLSHcode curl_share_setopt(CURLSH *, CURLSHoption option, ...); -CURL_EXTERN CURLSHcode curl_share_cleanup(CURLSH *); - -/**************************************************************************** - * Structures for querying information about the curl library at runtime. - */ - -typedef enum { - CURLVERSION_FIRST, - CURLVERSION_SECOND, - CURLVERSION_THIRD, - CURLVERSION_FOURTH, - CURLVERSION_FIFTH, - CURLVERSION_SIXTH, - CURLVERSION_LAST /* never actually use this */ -} CURLversion; - -/* The 'CURLVERSION_NOW' is the symbolic name meant to be used by - basically all programs ever that want to get version information. It is - meant to be a built-in version number for what kind of struct the caller - expects. If the struct ever changes, we redefine the NOW to another enum - from above. */ -#define CURLVERSION_NOW CURLVERSION_SIXTH - -typedef struct { - CURLversion age; /* age of the returned struct */ - const char *version; /* LIBCURL_VERSION */ - unsigned int version_num; /* LIBCURL_VERSION_NUM */ - const char *host; /* OS/host/cpu/machine when configured */ - int features; /* bitmask, see defines below */ - const char *ssl_version; /* human readable string */ - long ssl_version_num; /* not used anymore, always 0 */ - const char *libz_version; /* human readable string */ - /* protocols is terminated by an entry with a NULL protoname */ - const char * const *protocols; - - /* The fields below this were added in CURLVERSION_SECOND */ - const char *ares; - int ares_num; - - /* This field was added in CURLVERSION_THIRD */ - const char *libidn; - - /* These field were added in CURLVERSION_FOURTH */ - - /* Same as '_libiconv_version' if built with HAVE_ICONV */ - int iconv_ver_num; - - const char *libssh_version; /* human readable string */ - - /* These fields were added in CURLVERSION_FIFTH */ - unsigned int brotli_ver_num; /* Numeric Brotli version - (MAJOR << 24) | (MINOR << 12) | PATCH */ - const char *brotli_version; /* human readable string. */ - - /* These fields were added in CURLVERSION_SIXTH */ - unsigned int nghttp2_ver_num; /* Numeric nghttp2 version - (MAJOR << 16) | (MINOR << 8) | PATCH */ - const char *nghttp2_version; /* human readable string. */ - const char *quic_version; /* human readable quic (+ HTTP/3) library + - version or NULL */ -} curl_version_info_data; - -#define CURL_VERSION_IPV6 (1<<0) /* IPv6-enabled */ -#define CURL_VERSION_KERBEROS4 (1<<1) /* Kerberos V4 auth is supported - (deprecated) */ -#define CURL_VERSION_SSL (1<<2) /* SSL options are present */ -#define CURL_VERSION_LIBZ (1<<3) /* libz features are present */ -#define CURL_VERSION_NTLM (1<<4) /* NTLM auth is supported */ -#define CURL_VERSION_GSSNEGOTIATE (1<<5) /* Negotiate auth is supported - (deprecated) */ -#define CURL_VERSION_DEBUG (1<<6) /* Built with debug capabilities */ -#define CURL_VERSION_ASYNCHDNS (1<<7) /* Asynchronous DNS resolves */ -#define CURL_VERSION_SPNEGO (1<<8) /* SPNEGO auth is supported */ -#define CURL_VERSION_LARGEFILE (1<<9) /* Supports files larger than 2GB */ -#define CURL_VERSION_IDN (1<<10) /* Internationized Domain Names are - supported */ -#define CURL_VERSION_SSPI (1<<11) /* Built against Windows SSPI */ -#define CURL_VERSION_CONV (1<<12) /* Character conversions supported */ -#define CURL_VERSION_CURLDEBUG (1<<13) /* Debug memory tracking supported */ -#define CURL_VERSION_TLSAUTH_SRP (1<<14) /* TLS-SRP auth is supported */ -#define CURL_VERSION_NTLM_WB (1<<15) /* NTLM delegation to winbind helper - is supported */ -#define CURL_VERSION_HTTP2 (1<<16) /* HTTP2 support built-in */ -#define CURL_VERSION_GSSAPI (1<<17) /* Built against a GSS-API library */ -#define CURL_VERSION_KERBEROS5 (1<<18) /* Kerberos V5 auth is supported */ -#define CURL_VERSION_UNIX_SOCKETS (1<<19) /* Unix domain sockets support */ -#define CURL_VERSION_PSL (1<<20) /* Mozilla's Public Suffix List, used - for cookie domain verification */ -#define CURL_VERSION_HTTPS_PROXY (1<<21) /* HTTPS-proxy support built-in */ -#define CURL_VERSION_MULTI_SSL (1<<22) /* Multiple SSL backends available */ -#define CURL_VERSION_BROTLI (1<<23) /* Brotli features are present. */ -#define CURL_VERSION_ALTSVC (1<<24) /* Alt-Svc handling built-in */ -#define CURL_VERSION_HTTP3 (1<<25) /* HTTP3 support built-in */ - -#define CURL_VERSION_ESNI (1<<26) /* ESNI support */ - - /* - * NAME curl_version_info() - * - * DESCRIPTION - * - * This function returns a pointer to a static copy of the version info - * struct. See above. - */ -CURL_EXTERN curl_version_info_data *curl_version_info(CURLversion); - -/* - * NAME curl_easy_strerror() - * - * DESCRIPTION - * - * The curl_easy_strerror function may be used to turn a CURLcode value - * into the equivalent human readable error string. This is useful - * for printing meaningful error messages. - */ -CURL_EXTERN const char *curl_easy_strerror(CURLcode); - -/* - * NAME curl_share_strerror() - * - * DESCRIPTION - * - * The curl_share_strerror function may be used to turn a CURLSHcode value - * into the equivalent human readable error string. This is useful - * for printing meaningful error messages. - */ -CURL_EXTERN const char *curl_share_strerror(CURLSHcode); - -/* - * NAME curl_easy_pause() - * - * DESCRIPTION - * - * The curl_easy_pause function pauses or unpauses transfers. Select the new - * state by setting the bitmask, use the convenience defines below. - * - */ -CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask); - -#define CURLPAUSE_RECV (1<<0) -#define CURLPAUSE_RECV_CONT (0) - -#define CURLPAUSE_SEND (1<<2) -#define CURLPAUSE_SEND_CONT (0) - -#define CURLPAUSE_ALL (CURLPAUSE_RECV|CURLPAUSE_SEND) -#define CURLPAUSE_CONT (CURLPAUSE_RECV_CONT|CURLPAUSE_SEND_CONT) - -#ifdef __cplusplus -} -#endif - -/* unfortunately, the easy.h and multi.h include files need options and info - stuff before they can be included! */ -#include "easy.h" /* nothing in curl is fun without the easy stuff */ -#include "multi.h" -#include "urlapi.h" - -/* the typechecker doesn't work in C++ (yet) */ -#if defined(__GNUC__) && defined(__GNUC_MINOR__) && \ - ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) && \ - !defined(__cplusplus) && !defined(CURL_DISABLE_TYPECHECK) -#include "typecheck-gcc.h" -#else -#if defined(__STDC__) && (__STDC__ >= 1) -/* This preprocessor magic that replaces a call with the exact same call is - only done to make sure application authors pass exactly three arguments - to these functions. */ -#define curl_easy_setopt(handle,opt,param) curl_easy_setopt(handle,opt,param) -#define curl_easy_getinfo(handle,info,arg) curl_easy_getinfo(handle,info,arg) -#define curl_share_setopt(share,opt,param) curl_share_setopt(share,opt,param) -#define curl_multi_setopt(handle,opt,param) curl_multi_setopt(handle,opt,param) -#endif /* __STDC__ >= 1 */ -#endif /* gcc >= 4.3 && !__cplusplus */ - -#endif /* CURLINC_CURL_H */ diff --git a/src/curl/curlver.h b/src/curl/curlver.h deleted file mode 100644 index 5fc49d4..0000000 --- a/src/curl/curlver.h +++ /dev/null @@ -1,77 +0,0 @@ -#ifndef CURLINC_CURLVER_H -#define CURLINC_CURLVER_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* This header file contains nothing but libcurl version info, generated by - a script at release-time. This was made its own header file in 7.11.2 */ - -/* This is the global package copyright */ -#define LIBCURL_COPYRIGHT "1996 - 2020 Daniel Stenberg, ." - -/* This is the version number of the libcurl package from which this header - file origins: */ -#define LIBCURL_VERSION "7.69.1" - -/* The numeric version number is also available "in parts" by using these - defines: */ -#define LIBCURL_VERSION_MAJOR 7 -#define LIBCURL_VERSION_MINOR 69 -#define LIBCURL_VERSION_PATCH 1 - -/* This is the numeric version of the libcurl version number, meant for easier - parsing and comparions by programs. The LIBCURL_VERSION_NUM define will - always follow this syntax: - - 0xXXYYZZ - - Where XX, YY and ZZ are the main version, release and patch numbers in - hexadecimal (using 8 bits each). All three numbers are always represented - using two digits. 1.2 would appear as "0x010200" while version 9.11.7 - appears as "0x090b07". - - This 6-digit (24 bits) hexadecimal number does not show pre-release number, - and it is always a greater number in a more recent release. It makes - comparisons with greater than and less than work. - - Note: This define is the full hex number and _does not_ use the - CURL_VERSION_BITS() macro since curl's own configure script greps for it - and needs it to contain the full number. -*/ -#define LIBCURL_VERSION_NUM 0x074501 - -/* - * This is the date and time when the full source package was created. The - * timestamp is not stored in git, as the timestamp is properly set in the - * tarballs by the maketgz script. - * - * The format of the date follows this template: - * - * "2007-11-23" - */ -#define LIBCURL_TIMESTAMP "2020-03-11" - -#define CURL_VERSION_BITS(x,y,z) ((x)<<16|(y)<<8|(z)) -#define CURL_AT_LEAST_VERSION(x,y,z) \ - (LIBCURL_VERSION_NUM >= CURL_VERSION_BITS(x, y, z)) - -#endif /* CURLINC_CURLVER_H */ diff --git a/src/curl/easy.h b/src/curl/easy.h deleted file mode 100644 index 592f5d3..0000000 --- a/src/curl/easy.h +++ /dev/null @@ -1,112 +0,0 @@ -#ifndef CURLINC_EASY_H -#define CURLINC_EASY_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2019, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ -#ifdef __cplusplus -extern "C" { -#endif - -CURL_EXTERN CURL *curl_easy_init(void); -CURL_EXTERN CURLcode curl_easy_setopt(CURL *curl, CURLoption option, ...); -CURL_EXTERN CURLcode curl_easy_perform(CURL *curl); -CURL_EXTERN void curl_easy_cleanup(CURL *curl); - -/* - * NAME curl_easy_getinfo() - * - * DESCRIPTION - * - * Request internal information from the curl session with this function. The - * third argument MUST be a pointer to a long, a pointer to a char * or a - * pointer to a double (as the documentation describes elsewhere). The data - * pointed to will be filled in accordingly and can be relied upon only if the - * function returns CURLE_OK. This function is intended to get used *AFTER* a - * performed transfer, all results from this function are undefined until the - * transfer is completed. - */ -CURL_EXTERN CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...); - - -/* - * NAME curl_easy_duphandle() - * - * DESCRIPTION - * - * Creates a new curl session handle with the same options set for the handle - * passed in. Duplicating a handle could only be a matter of cloning data and - * options, internal state info and things like persistent connections cannot - * be transferred. It is useful in multithreaded applications when you can run - * curl_easy_duphandle() for each new thread to avoid a series of identical - * curl_easy_setopt() invokes in every thread. - */ -CURL_EXTERN CURL *curl_easy_duphandle(CURL *curl); - -/* - * NAME curl_easy_reset() - * - * DESCRIPTION - * - * Re-initializes a CURL handle to the default values. This puts back the - * handle to the same state as it was in when it was just created. - * - * It does keep: live connections, the Session ID cache, the DNS cache and the - * cookies. - */ -CURL_EXTERN void curl_easy_reset(CURL *curl); - -/* - * NAME curl_easy_recv() - * - * DESCRIPTION - * - * Receives data from the connected socket. Use after successful - * curl_easy_perform() with CURLOPT_CONNECT_ONLY option. - */ -CURL_EXTERN CURLcode curl_easy_recv(CURL *curl, void *buffer, size_t buflen, - size_t *n); - -/* - * NAME curl_easy_send() - * - * DESCRIPTION - * - * Sends data over the connected socket. Use after successful - * curl_easy_perform() with CURLOPT_CONNECT_ONLY option. - */ -CURL_EXTERN CURLcode curl_easy_send(CURL *curl, const void *buffer, - size_t buflen, size_t *n); - - -/* - * NAME curl_easy_upkeep() - * - * DESCRIPTION - * - * Performs connection upkeep for the given session handle. - */ -CURL_EXTERN CURLcode curl_easy_upkeep(CURL *curl); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/src/curl/mprintf.h b/src/curl/mprintf.h deleted file mode 100644 index f615ed7..0000000 --- a/src/curl/mprintf.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef CURLINC_MPRINTF_H -#define CURLINC_MPRINTF_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2019, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include -#include /* needed for FILE */ -#include "curl.h" /* for CURL_EXTERN */ - -#ifdef __cplusplus -extern "C" { -#endif - -CURL_EXTERN int curl_mprintf(const char *format, ...); -CURL_EXTERN int curl_mfprintf(FILE *fd, const char *format, ...); -CURL_EXTERN int curl_msprintf(char *buffer, const char *format, ...); -CURL_EXTERN int curl_msnprintf(char *buffer, size_t maxlength, - const char *format, ...); -CURL_EXTERN int curl_mvprintf(const char *format, va_list args); -CURL_EXTERN int curl_mvfprintf(FILE *fd, const char *format, va_list args); -CURL_EXTERN int curl_mvsprintf(char *buffer, const char *format, va_list args); -CURL_EXTERN int curl_mvsnprintf(char *buffer, size_t maxlength, - const char *format, va_list args); -CURL_EXTERN char *curl_maprintf(const char *format, ...); -CURL_EXTERN char *curl_mvaprintf(const char *format, va_list args); - -#ifdef __cplusplus -} -#endif - -#endif /* CURLINC_MPRINTF_H */ diff --git a/src/curl/multi.h b/src/curl/multi.h deleted file mode 100644 index bda9bb7..0000000 --- a/src/curl/multi.h +++ /dev/null @@ -1,456 +0,0 @@ -#ifndef CURLINC_MULTI_H -#define CURLINC_MULTI_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ -/* - This is an "external" header file. Don't give away any internals here! - - GOALS - - o Enable a "pull" interface. The application that uses libcurl decides where - and when to ask libcurl to get/send data. - - o Enable multiple simultaneous transfers in the same thread without making it - complicated for the application. - - o Enable the application to select() on its own file descriptors and curl's - file descriptors simultaneous easily. - -*/ - -/* - * This header file should not really need to include "curl.h" since curl.h - * itself includes this file and we expect user applications to do #include - * without the need for especially including multi.h. - * - * For some reason we added this include here at one point, and rather than to - * break existing (wrongly written) libcurl applications, we leave it as-is - * but with this warning attached. - */ -#include "curl.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#if defined(BUILDING_LIBCURL) || defined(CURL_STRICTER) -typedef struct Curl_multi CURLM; -#else -typedef void CURLM; -#endif - -typedef enum { - CURLM_CALL_MULTI_PERFORM = -1, /* please call curl_multi_perform() or - curl_multi_socket*() soon */ - CURLM_OK, - CURLM_BAD_HANDLE, /* the passed-in handle is not a valid CURLM handle */ - CURLM_BAD_EASY_HANDLE, /* an easy handle was not good/valid */ - CURLM_OUT_OF_MEMORY, /* if you ever get this, you're in deep sh*t */ - CURLM_INTERNAL_ERROR, /* this is a libcurl bug */ - CURLM_BAD_SOCKET, /* the passed in socket argument did not match */ - CURLM_UNKNOWN_OPTION, /* curl_multi_setopt() with unsupported option */ - CURLM_ADDED_ALREADY, /* an easy handle already added to a multi handle was - attempted to get added - again */ - CURLM_RECURSIVE_API_CALL, /* an api function was called from inside a - callback */ - CURLM_WAKEUP_FAILURE, /* wakeup is unavailable or failed */ - CURLM_BAD_FUNCTION_ARGUMENT, /* function called with a bad parameter */ - CURLM_LAST -} CURLMcode; - -/* just to make code nicer when using curl_multi_socket() you can now check - for CURLM_CALL_MULTI_SOCKET too in the same style it works for - curl_multi_perform() and CURLM_CALL_MULTI_PERFORM */ -#define CURLM_CALL_MULTI_SOCKET CURLM_CALL_MULTI_PERFORM - -/* bitmask bits for CURLMOPT_PIPELINING */ -#define CURLPIPE_NOTHING 0L -#define CURLPIPE_HTTP1 1L -#define CURLPIPE_MULTIPLEX 2L - -typedef enum { - CURLMSG_NONE, /* first, not used */ - CURLMSG_DONE, /* This easy handle has completed. 'result' contains - the CURLcode of the transfer */ - CURLMSG_LAST /* last, not used */ -} CURLMSG; - -struct CURLMsg { - CURLMSG msg; /* what this message means */ - CURL *easy_handle; /* the handle it concerns */ - union { - void *whatever; /* message-specific data */ - CURLcode result; /* return code for transfer */ - } data; -}; -typedef struct CURLMsg CURLMsg; - -/* Based on poll(2) structure and values. - * We don't use pollfd and POLL* constants explicitly - * to cover platforms without poll(). */ -#define CURL_WAIT_POLLIN 0x0001 -#define CURL_WAIT_POLLPRI 0x0002 -#define CURL_WAIT_POLLOUT 0x0004 - -struct curl_waitfd { - curl_socket_t fd; - short events; - short revents; /* not supported yet */ -}; - -/* - * Name: curl_multi_init() - * - * Desc: inititalize multi-style curl usage - * - * Returns: a new CURLM handle to use in all 'curl_multi' functions. - */ -CURL_EXTERN CURLM *curl_multi_init(void); - -/* - * Name: curl_multi_add_handle() - * - * Desc: add a standard curl handle to the multi stack - * - * Returns: CURLMcode type, general multi error code. - */ -CURL_EXTERN CURLMcode curl_multi_add_handle(CURLM *multi_handle, - CURL *curl_handle); - - /* - * Name: curl_multi_remove_handle() - * - * Desc: removes a curl handle from the multi stack again - * - * Returns: CURLMcode type, general multi error code. - */ -CURL_EXTERN CURLMcode curl_multi_remove_handle(CURLM *multi_handle, - CURL *curl_handle); - - /* - * Name: curl_multi_fdset() - * - * Desc: Ask curl for its fd_set sets. The app can use these to select() or - * poll() on. We want curl_multi_perform() called as soon as one of - * them are ready. - * - * Returns: CURLMcode type, general multi error code. - */ -CURL_EXTERN CURLMcode curl_multi_fdset(CURLM *multi_handle, - fd_set *read_fd_set, - fd_set *write_fd_set, - fd_set *exc_fd_set, - int *max_fd); - -/* - * Name: curl_multi_wait() - * - * Desc: Poll on all fds within a CURLM set as well as any - * additional fds passed to the function. - * - * Returns: CURLMcode type, general multi error code. - */ -CURL_EXTERN CURLMcode curl_multi_wait(CURLM *multi_handle, - struct curl_waitfd extra_fds[], - unsigned int extra_nfds, - int timeout_ms, - int *ret); - -/* - * Name: curl_multi_poll() - * - * Desc: Poll on all fds within a CURLM set as well as any - * additional fds passed to the function. - * - * Returns: CURLMcode type, general multi error code. - */ -CURL_EXTERN CURLMcode curl_multi_poll(CURLM *multi_handle, - struct curl_waitfd extra_fds[], - unsigned int extra_nfds, - int timeout_ms, - int *ret); - -/* - * Name: curl_multi_wakeup() - * - * Desc: wakes up a sleeping curl_multi_poll call. - * - * Returns: CURLMcode type, general multi error code. - */ -CURL_EXTERN CURLMcode curl_multi_wakeup(CURLM *multi_handle); - - /* - * Name: curl_multi_perform() - * - * Desc: When the app thinks there's data available for curl it calls this - * function to read/write whatever there is right now. This returns - * as soon as the reads and writes are done. This function does not - * require that there actually is data available for reading or that - * data can be written, it can be called just in case. It returns - * the number of handles that still transfer data in the second - * argument's integer-pointer. - * - * Returns: CURLMcode type, general multi error code. *NOTE* that this only - * returns errors etc regarding the whole multi stack. There might - * still have occurred problems on individual transfers even when - * this returns OK. - */ -CURL_EXTERN CURLMcode curl_multi_perform(CURLM *multi_handle, - int *running_handles); - - /* - * Name: curl_multi_cleanup() - * - * Desc: Cleans up and removes a whole multi stack. It does not free or - * touch any individual easy handles in any way. We need to define - * in what state those handles will be if this function is called - * in the middle of a transfer. - * - * Returns: CURLMcode type, general multi error code. - */ -CURL_EXTERN CURLMcode curl_multi_cleanup(CURLM *multi_handle); - -/* - * Name: curl_multi_info_read() - * - * Desc: Ask the multi handle if there's any messages/informationals from - * the individual transfers. Messages include informationals such as - * error code from the transfer or just the fact that a transfer is - * completed. More details on these should be written down as well. - * - * Repeated calls to this function will return a new struct each - * time, until a special "end of msgs" struct is returned as a signal - * that there is no more to get at this point. - * - * The data the returned pointer points to will not survive calling - * curl_multi_cleanup(). - * - * The 'CURLMsg' struct is meant to be very simple and only contain - * very basic information. If more involved information is wanted, - * we will provide the particular "transfer handle" in that struct - * and that should/could/would be used in subsequent - * curl_easy_getinfo() calls (or similar). The point being that we - * must never expose complex structs to applications, as then we'll - * undoubtably get backwards compatibility problems in the future. - * - * Returns: A pointer to a filled-in struct, or NULL if it failed or ran out - * of structs. It also writes the number of messages left in the - * queue (after this read) in the integer the second argument points - * to. - */ -CURL_EXTERN CURLMsg *curl_multi_info_read(CURLM *multi_handle, - int *msgs_in_queue); - -/* - * Name: curl_multi_strerror() - * - * Desc: The curl_multi_strerror function may be used to turn a CURLMcode - * value into the equivalent human readable error string. This is - * useful for printing meaningful error messages. - * - * Returns: A pointer to a zero-terminated error message. - */ -CURL_EXTERN const char *curl_multi_strerror(CURLMcode); - -/* - * Name: curl_multi_socket() and - * curl_multi_socket_all() - * - * Desc: An alternative version of curl_multi_perform() that allows the - * application to pass in one of the file descriptors that have been - * detected to have "action" on them and let libcurl perform. - * See man page for details. - */ -#define CURL_POLL_NONE 0 -#define CURL_POLL_IN 1 -#define CURL_POLL_OUT 2 -#define CURL_POLL_INOUT 3 -#define CURL_POLL_REMOVE 4 - -#define CURL_SOCKET_TIMEOUT CURL_SOCKET_BAD - -#define CURL_CSELECT_IN 0x01 -#define CURL_CSELECT_OUT 0x02 -#define CURL_CSELECT_ERR 0x04 - -typedef int (*curl_socket_callback)(CURL *easy, /* easy handle */ - curl_socket_t s, /* socket */ - int what, /* see above */ - void *userp, /* private callback - pointer */ - void *socketp); /* private socket - pointer */ -/* - * Name: curl_multi_timer_callback - * - * Desc: Called by libcurl whenever the library detects a change in the - * maximum number of milliseconds the app is allowed to wait before - * curl_multi_socket() or curl_multi_perform() must be called - * (to allow libcurl's timed events to take place). - * - * Returns: The callback should return zero. - */ -typedef int (*curl_multi_timer_callback)(CURLM *multi, /* multi handle */ - long timeout_ms, /* see above */ - void *userp); /* private callback - pointer */ - -CURL_EXTERN CURLMcode curl_multi_socket(CURLM *multi_handle, curl_socket_t s, - int *running_handles); - -CURL_EXTERN CURLMcode curl_multi_socket_action(CURLM *multi_handle, - curl_socket_t s, - int ev_bitmask, - int *running_handles); - -CURL_EXTERN CURLMcode curl_multi_socket_all(CURLM *multi_handle, - int *running_handles); - -#ifndef CURL_ALLOW_OLD_MULTI_SOCKET -/* This macro below was added in 7.16.3 to push users who recompile to use - the new curl_multi_socket_action() instead of the old curl_multi_socket() -*/ -#define curl_multi_socket(x,y,z) curl_multi_socket_action(x,y,0,z) -#endif - -/* - * Name: curl_multi_timeout() - * - * Desc: Returns the maximum number of milliseconds the app is allowed to - * wait before curl_multi_socket() or curl_multi_perform() must be - * called (to allow libcurl's timed events to take place). - * - * Returns: CURLM error code. - */ -CURL_EXTERN CURLMcode curl_multi_timeout(CURLM *multi_handle, - long *milliseconds); - -typedef enum { - /* This is the socket callback function pointer */ - CURLOPT(CURLMOPT_SOCKETFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 1), - - /* This is the argument passed to the socket callback */ - CURLOPT(CURLMOPT_SOCKETDATA, CURLOPTTYPE_OBJECTPOINT, 2), - - /* set to 1 to enable pipelining for this multi handle */ - CURLOPT(CURLMOPT_PIPELINING, CURLOPTTYPE_LONG, 3), - - /* This is the timer callback function pointer */ - CURLOPT(CURLMOPT_TIMERFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 4), - - /* This is the argument passed to the timer callback */ - CURLOPT(CURLMOPT_TIMERDATA, CURLOPTTYPE_OBJECTPOINT, 5), - - /* maximum number of entries in the connection cache */ - CURLOPT(CURLMOPT_MAXCONNECTS, CURLOPTTYPE_LONG, 6), - - /* maximum number of (pipelining) connections to one host */ - CURLOPT(CURLMOPT_MAX_HOST_CONNECTIONS, CURLOPTTYPE_LONG, 7), - - /* maximum number of requests in a pipeline */ - CURLOPT(CURLMOPT_MAX_PIPELINE_LENGTH, CURLOPTTYPE_LONG, 8), - - /* a connection with a content-length longer than this - will not be considered for pipelining */ - CURLOPT(CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE, CURLOPTTYPE_OFF_T, 9), - - /* a connection with a chunk length longer than this - will not be considered for pipelining */ - CURLOPT(CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE, CURLOPTTYPE_OFF_T, 10), - - /* a list of site names(+port) that are blacklisted from - pipelining */ - CURLOPT(CURLMOPT_PIPELINING_SITE_BL, CURLOPTTYPE_OBJECTPOINT, 11), - - /* a list of server types that are blacklisted from - pipelining */ - CURLOPT(CURLMOPT_PIPELINING_SERVER_BL, CURLOPTTYPE_OBJECTPOINT, 12), - - /* maximum number of open connections in total */ - CURLOPT(CURLMOPT_MAX_TOTAL_CONNECTIONS, CURLOPTTYPE_LONG, 13), - - /* This is the server push callback function pointer */ - CURLOPT(CURLMOPT_PUSHFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 14), - - /* This is the argument passed to the server push callback */ - CURLOPT(CURLMOPT_PUSHDATA, CURLOPTTYPE_OBJECTPOINT, 15), - - /* maximum number of concurrent streams to support on a connection */ - CURLOPT(CURLMOPT_MAX_CONCURRENT_STREAMS, CURLOPTTYPE_LONG, 16), - - CURLMOPT_LASTENTRY /* the last unused */ -} CURLMoption; - - -/* - * Name: curl_multi_setopt() - * - * Desc: Sets options for the multi handle. - * - * Returns: CURLM error code. - */ -CURL_EXTERN CURLMcode curl_multi_setopt(CURLM *multi_handle, - CURLMoption option, ...); - - -/* - * Name: curl_multi_assign() - * - * Desc: This function sets an association in the multi handle between the - * given socket and a private pointer of the application. This is - * (only) useful for curl_multi_socket uses. - * - * Returns: CURLM error code. - */ -CURL_EXTERN CURLMcode curl_multi_assign(CURLM *multi_handle, - curl_socket_t sockfd, void *sockp); - - -/* - * Name: curl_push_callback - * - * Desc: This callback gets called when a new stream is being pushed by the - * server. It approves or denies the new stream. - * - * Returns: CURL_PUSH_OK or CURL_PUSH_DENY. - */ -#define CURL_PUSH_OK 0 -#define CURL_PUSH_DENY 1 - -struct curl_pushheaders; /* forward declaration only */ - -CURL_EXTERN char *curl_pushheader_bynum(struct curl_pushheaders *h, - size_t num); -CURL_EXTERN char *curl_pushheader_byname(struct curl_pushheaders *h, - const char *name); - -typedef int (*curl_push_callback)(CURL *parent, - CURL *easy, - size_t num_headers, - struct curl_pushheaders *headers, - void *userp); - -#ifdef __cplusplus -} /* end of extern "C" */ -#endif - -#endif diff --git a/src/curl/stdcheaders.h b/src/curl/stdcheaders.h deleted file mode 100644 index a6bdc1a..0000000 --- a/src/curl/stdcheaders.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef CURLINC_STDCHEADERS_H -#define CURLINC_STDCHEADERS_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2019, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include - -size_t fread(void *, size_t, size_t, FILE *); -size_t fwrite(const void *, size_t, size_t, FILE *); - -int strcasecmp(const char *, const char *); -int strncasecmp(const char *, const char *, size_t); - -#endif /* CURLINC_STDCHEADERS_H */ diff --git a/src/curl/system.h b/src/curl/system.h deleted file mode 100644 index 867af61..0000000 --- a/src/curl/system.h +++ /dev/null @@ -1,504 +0,0 @@ -#ifndef CURLINC_SYSTEM_H -#define CURLINC_SYSTEM_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2019, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* - * Try to keep one section per platform, compiler and architecture, otherwise, - * if an existing section is reused for a different one and later on the - * original is adjusted, probably the piggybacking one can be adversely - * changed. - * - * In order to differentiate between platforms/compilers/architectures use - * only compiler built in predefined preprocessor symbols. - * - * curl_off_t - * ---------- - * - * For any given platform/compiler curl_off_t must be typedef'ed to a 64-bit - * wide signed integral data type. The width of this data type must remain - * constant and independent of any possible large file support settings. - * - * As an exception to the above, curl_off_t shall be typedef'ed to a 32-bit - * wide signed integral data type if there is no 64-bit type. - * - * As a general rule, curl_off_t shall not be mapped to off_t. This rule shall - * only be violated if off_t is the only 64-bit data type available and the - * size of off_t is independent of large file support settings. Keep your - * build on the safe side avoiding an off_t gating. If you have a 64-bit - * off_t then take for sure that another 64-bit data type exists, dig deeper - * and you will find it. - * - */ - -#if defined(__DJGPP__) || defined(__GO32__) -# if defined(__DJGPP__) && (__DJGPP__ > 1) -# define CURL_TYPEOF_CURL_OFF_T long long -# define CURL_FORMAT_CURL_OFF_T "lld" -# define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU ULL -# else -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL -# endif -# define CURL_TYPEOF_CURL_SOCKLEN_T int - -#elif defined(__SALFORDC__) -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL -# define CURL_TYPEOF_CURL_SOCKLEN_T int - -#elif defined(__BORLANDC__) -# if (__BORLANDC__ < 0x520) -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL -# else -# define CURL_TYPEOF_CURL_OFF_T __int64 -# define CURL_FORMAT_CURL_OFF_T "I64d" -# define CURL_FORMAT_CURL_OFF_TU "I64u" -# define CURL_SUFFIX_CURL_OFF_T i64 -# define CURL_SUFFIX_CURL_OFF_TU ui64 -# endif -# define CURL_TYPEOF_CURL_SOCKLEN_T int - -#elif defined(__TURBOC__) -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL -# define CURL_TYPEOF_CURL_SOCKLEN_T int - -#elif defined(__WATCOMC__) -# if defined(__386__) -# define CURL_TYPEOF_CURL_OFF_T __int64 -# define CURL_FORMAT_CURL_OFF_T "I64d" -# define CURL_FORMAT_CURL_OFF_TU "I64u" -# define CURL_SUFFIX_CURL_OFF_T i64 -# define CURL_SUFFIX_CURL_OFF_TU ui64 -# else -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL -# endif -# define CURL_TYPEOF_CURL_SOCKLEN_T int - -#elif defined(__POCC__) -# if (__POCC__ < 280) -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL -# elif defined(_MSC_VER) -# define CURL_TYPEOF_CURL_OFF_T __int64 -# define CURL_FORMAT_CURL_OFF_T "I64d" -# define CURL_FORMAT_CURL_OFF_TU "I64u" -# define CURL_SUFFIX_CURL_OFF_T i64 -# define CURL_SUFFIX_CURL_OFF_TU ui64 -# else -# define CURL_TYPEOF_CURL_OFF_T long long -# define CURL_FORMAT_CURL_OFF_T "lld" -# define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU ULL -# endif -# define CURL_TYPEOF_CURL_SOCKLEN_T int - -#elif defined(__LCC__) -# if defined(__e2k__) /* MCST eLbrus C Compiler */ -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL -# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t -# define CURL_PULL_SYS_TYPES_H 1 -# define CURL_PULL_SYS_SOCKET_H 1 -# else /* Local (or Little) C Compiler */ -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL -# define CURL_TYPEOF_CURL_SOCKLEN_T int -# endif - -#elif defined(__SYMBIAN32__) -# if defined(__EABI__) /* Treat all ARM compilers equally */ -# define CURL_TYPEOF_CURL_OFF_T long long -# define CURL_FORMAT_CURL_OFF_T "lld" -# define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU ULL -# elif defined(__CW32__) -# pragma longlong on -# define CURL_TYPEOF_CURL_OFF_T long long -# define CURL_FORMAT_CURL_OFF_T "lld" -# define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU ULL -# elif defined(__VC32__) -# define CURL_TYPEOF_CURL_OFF_T __int64 -# define CURL_FORMAT_CURL_OFF_T "lld" -# define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU ULL -# endif -# define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int - -#elif defined(__MWERKS__) -# define CURL_TYPEOF_CURL_OFF_T long long -# define CURL_FORMAT_CURL_OFF_T "lld" -# define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU ULL -# define CURL_TYPEOF_CURL_SOCKLEN_T int - -#elif defined(_WIN32_WCE) -# define CURL_TYPEOF_CURL_OFF_T __int64 -# define CURL_FORMAT_CURL_OFF_T "I64d" -# define CURL_FORMAT_CURL_OFF_TU "I64u" -# define CURL_SUFFIX_CURL_OFF_T i64 -# define CURL_SUFFIX_CURL_OFF_TU ui64 -# define CURL_TYPEOF_CURL_SOCKLEN_T int - -#elif defined(__MINGW32__) -# define CURL_TYPEOF_CURL_OFF_T long long -# define CURL_FORMAT_CURL_OFF_T "I64d" -# define CURL_FORMAT_CURL_OFF_TU "I64u" -# define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU ULL -# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t -# define CURL_PULL_SYS_TYPES_H 1 -# define CURL_PULL_WS2TCPIP_H 1 - -#elif defined(__VMS) -# if defined(__VAX) -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL -# else -# define CURL_TYPEOF_CURL_OFF_T long long -# define CURL_FORMAT_CURL_OFF_T "lld" -# define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU ULL -# endif -# define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int - -#elif defined(__OS400__) -# if defined(__ILEC400__) -# define CURL_TYPEOF_CURL_OFF_T long long -# define CURL_FORMAT_CURL_OFF_T "lld" -# define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU ULL -# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t -# define CURL_PULL_SYS_TYPES_H 1 -# define CURL_PULL_SYS_SOCKET_H 1 -# endif - -#elif defined(__MVS__) -# if defined(__IBMC__) || defined(__IBMCPP__) -# if defined(_ILP32) -# elif defined(_LP64) -# endif -# if defined(_LONG_LONG) -# define CURL_TYPEOF_CURL_OFF_T long long -# define CURL_FORMAT_CURL_OFF_T "lld" -# define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU ULL -# elif defined(_LP64) -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL -# else -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL -# endif -# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t -# define CURL_PULL_SYS_TYPES_H 1 -# define CURL_PULL_SYS_SOCKET_H 1 -# endif - -#elif defined(__370__) -# if defined(__IBMC__) || defined(__IBMCPP__) -# if defined(_ILP32) -# elif defined(_LP64) -# endif -# if defined(_LONG_LONG) -# define CURL_TYPEOF_CURL_OFF_T long long -# define CURL_FORMAT_CURL_OFF_T "lld" -# define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU ULL -# elif defined(_LP64) -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL -# else -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL -# endif -# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t -# define CURL_PULL_SYS_TYPES_H 1 -# define CURL_PULL_SYS_SOCKET_H 1 -# endif - -#elif defined(TPF) -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL -# define CURL_TYPEOF_CURL_SOCKLEN_T int - -#elif defined(__TINYC__) /* also known as tcc */ -# define CURL_TYPEOF_CURL_OFF_T long long -# define CURL_FORMAT_CURL_OFF_T "lld" -# define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU ULL -# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t -# define CURL_PULL_SYS_TYPES_H 1 -# define CURL_PULL_SYS_SOCKET_H 1 - -#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC) /* Oracle Solaris Studio */ -# if !defined(__LP64) && (defined(__ILP32) || \ - defined(__i386) || \ - defined(__sparcv8) || \ - defined(__sparcv8plus)) -# define CURL_TYPEOF_CURL_OFF_T long long -# define CURL_FORMAT_CURL_OFF_T "lld" -# define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU ULL -# elif defined(__LP64) || \ - defined(__amd64) || defined(__sparcv9) -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL -# endif -# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t -# define CURL_PULL_SYS_TYPES_H 1 -# define CURL_PULL_SYS_SOCKET_H 1 - -#elif defined(__xlc__) /* IBM xlc compiler */ -# if !defined(_LP64) -# define CURL_TYPEOF_CURL_OFF_T long long -# define CURL_FORMAT_CURL_OFF_T "lld" -# define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU ULL -# else -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL -# endif -# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t -# define CURL_PULL_SYS_TYPES_H 1 -# define CURL_PULL_SYS_SOCKET_H 1 - -/* ===================================== */ -/* KEEP MSVC THE PENULTIMATE ENTRY */ -/* ===================================== */ - -#elif defined(_MSC_VER) -# if (_MSC_VER >= 900) && (_INTEGRAL_MAX_BITS >= 64) -# define CURL_TYPEOF_CURL_OFF_T __int64 -# define CURL_FORMAT_CURL_OFF_T "I64d" -# define CURL_FORMAT_CURL_OFF_TU "I64u" -# define CURL_SUFFIX_CURL_OFF_T i64 -# define CURL_SUFFIX_CURL_OFF_TU ui64 -# else -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL -# endif -# define CURL_TYPEOF_CURL_SOCKLEN_T int - -/* ===================================== */ -/* KEEP GENERIC GCC THE LAST ENTRY */ -/* ===================================== */ - -#elif defined(__GNUC__) && !defined(_SCO_DS) -# if !defined(__LP64__) && \ - (defined(__ILP32__) || defined(__i386__) || defined(__hppa__) || \ - defined(__ppc__) || defined(__powerpc__) || defined(__arm__) || \ - defined(__sparc__) || defined(__mips__) || defined(__sh__) || \ - defined(__XTENSA__) || \ - (defined(__SIZEOF_LONG__) && __SIZEOF_LONG__ == 4) || \ - (defined(__LONG_MAX__) && __LONG_MAX__ == 2147483647L)) -# define CURL_TYPEOF_CURL_OFF_T long long -# define CURL_FORMAT_CURL_OFF_T "lld" -# define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU ULL -# elif defined(__LP64__) || \ - defined(__x86_64__) || defined(__ppc64__) || defined(__sparc64__) || \ - defined(__e2k__) || \ - (defined(__SIZEOF_LONG__) && __SIZEOF_LONG__ == 8) || \ - (defined(__LONG_MAX__) && __LONG_MAX__ == 9223372036854775807L) -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL -# endif -# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t -# define CURL_PULL_SYS_TYPES_H 1 -# define CURL_PULL_SYS_SOCKET_H 1 - -#else -/* generic "safe guess" on old 32 bit style */ -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL -# define CURL_TYPEOF_CURL_SOCKLEN_T int -#endif - -#ifdef _AIX -/* AIX needs */ -#define CURL_PULL_SYS_POLL_H -#endif - - -/* CURL_PULL_WS2TCPIP_H is defined above when inclusion of header file */ -/* ws2tcpip.h is required here to properly make type definitions below. */ -#ifdef CURL_PULL_WS2TCPIP_H -# include -# include -# include -#endif - -/* CURL_PULL_SYS_TYPES_H is defined above when inclusion of header file */ -/* sys/types.h is required here to properly make type definitions below. */ -#ifdef CURL_PULL_SYS_TYPES_H -# include -#endif - -/* CURL_PULL_SYS_SOCKET_H is defined above when inclusion of header file */ -/* sys/socket.h is required here to properly make type definitions below. */ -#ifdef CURL_PULL_SYS_SOCKET_H -# include -#endif - -/* CURL_PULL_SYS_POLL_H is defined above when inclusion of header file */ -/* sys/poll.h is required here to properly make type definitions below. */ -#ifdef CURL_PULL_SYS_POLL_H -# include -#endif - -/* Data type definition of curl_socklen_t. */ -#ifdef CURL_TYPEOF_CURL_SOCKLEN_T - typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t; -#endif - -/* Data type definition of curl_off_t. */ - -#ifdef CURL_TYPEOF_CURL_OFF_T - typedef CURL_TYPEOF_CURL_OFF_T curl_off_t; -#endif - -/* - * CURL_ISOCPP and CURL_OFF_T_C definitions are done here in order to allow - * these to be visible and exported by the external libcurl interface API, - * while also making them visible to the library internals, simply including - * curl_setup.h, without actually needing to include curl.h internally. - * If some day this section would grow big enough, all this should be moved - * to its own header file. - */ - -/* - * Figure out if we can use the ## preprocessor operator, which is supported - * by ISO/ANSI C and C++. Some compilers support it without setting __STDC__ - * or __cplusplus so we need to carefully check for them too. - */ - -#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) || \ - defined(__HP_aCC) || defined(__BORLANDC__) || defined(__LCC__) || \ - defined(__POCC__) || defined(__SALFORDC__) || defined(__HIGHC__) || \ - defined(__ILEC400__) - /* This compiler is believed to have an ISO compatible preprocessor */ -#define CURL_ISOCPP -#else - /* This compiler is believed NOT to have an ISO compatible preprocessor */ -#undef CURL_ISOCPP -#endif - -/* - * Macros for minimum-width signed and unsigned curl_off_t integer constants. - */ - -#if defined(__BORLANDC__) && (__BORLANDC__ == 0x0551) -# define CURLINC_OFF_T_C_HLPR2(x) x -# define CURLINC_OFF_T_C_HLPR1(x) CURLINC_OFF_T_C_HLPR2(x) -# define CURL_OFF_T_C(Val) CURLINC_OFF_T_C_HLPR1(Val) ## \ - CURLINC_OFF_T_C_HLPR1(CURL_SUFFIX_CURL_OFF_T) -# define CURL_OFF_TU_C(Val) CURLINC_OFF_T_C_HLPR1(Val) ## \ - CURLINC_OFF_T_C_HLPR1(CURL_SUFFIX_CURL_OFF_TU) -#else -# ifdef CURL_ISOCPP -# define CURLINC_OFF_T_C_HLPR2(Val,Suffix) Val ## Suffix -# else -# define CURLINC_OFF_T_C_HLPR2(Val,Suffix) Val/**/Suffix -# endif -# define CURLINC_OFF_T_C_HLPR1(Val,Suffix) CURLINC_OFF_T_C_HLPR2(Val,Suffix) -# define CURL_OFF_T_C(Val) CURLINC_OFF_T_C_HLPR1(Val,CURL_SUFFIX_CURL_OFF_T) -# define CURL_OFF_TU_C(Val) CURLINC_OFF_T_C_HLPR1(Val,CURL_SUFFIX_CURL_OFF_TU) -#endif - -#endif /* CURLINC_SYSTEM_H */ diff --git a/src/curl/typecheck-gcc.h b/src/curl/typecheck-gcc.h deleted file mode 100644 index 03c84fc..0000000 --- a/src/curl/typecheck-gcc.h +++ /dev/null @@ -1,699 +0,0 @@ -#ifndef CURLINC_TYPECHECK_GCC_H -#define CURLINC_TYPECHECK_GCC_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2019, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* wraps curl_easy_setopt() with typechecking */ - -/* To add a new kind of warning, add an - * if(curlcheck_sometype_option(_curl_opt)) - * if(!curlcheck_sometype(value)) - * _curl_easy_setopt_err_sometype(); - * block and define curlcheck_sometype_option, curlcheck_sometype and - * _curl_easy_setopt_err_sometype below - * - * NOTE: We use two nested 'if' statements here instead of the && operator, in - * order to work around gcc bug #32061. It affects only gcc 4.3.x/4.4.x - * when compiling with -Wlogical-op. - * - * To add an option that uses the same type as an existing option, you'll just - * need to extend the appropriate _curl_*_option macro - */ -#define curl_easy_setopt(handle, option, value) \ - __extension__({ \ - __typeof__(option) _curl_opt = option; \ - if(__builtin_constant_p(_curl_opt)) { \ - if(curlcheck_long_option(_curl_opt)) \ - if(!curlcheck_long(value)) \ - _curl_easy_setopt_err_long(); \ - if(curlcheck_off_t_option(_curl_opt)) \ - if(!curlcheck_off_t(value)) \ - _curl_easy_setopt_err_curl_off_t(); \ - if(curlcheck_string_option(_curl_opt)) \ - if(!curlcheck_string(value)) \ - _curl_easy_setopt_err_string(); \ - if(curlcheck_write_cb_option(_curl_opt)) \ - if(!curlcheck_write_cb(value)) \ - _curl_easy_setopt_err_write_callback(); \ - if((_curl_opt) == CURLOPT_RESOLVER_START_FUNCTION) \ - if(!curlcheck_resolver_start_callback(value)) \ - _curl_easy_setopt_err_resolver_start_callback(); \ - if((_curl_opt) == CURLOPT_READFUNCTION) \ - if(!curlcheck_read_cb(value)) \ - _curl_easy_setopt_err_read_cb(); \ - if((_curl_opt) == CURLOPT_IOCTLFUNCTION) \ - if(!curlcheck_ioctl_cb(value)) \ - _curl_easy_setopt_err_ioctl_cb(); \ - if((_curl_opt) == CURLOPT_SOCKOPTFUNCTION) \ - if(!curlcheck_sockopt_cb(value)) \ - _curl_easy_setopt_err_sockopt_cb(); \ - if((_curl_opt) == CURLOPT_OPENSOCKETFUNCTION) \ - if(!curlcheck_opensocket_cb(value)) \ - _curl_easy_setopt_err_opensocket_cb(); \ - if((_curl_opt) == CURLOPT_PROGRESSFUNCTION) \ - if(!curlcheck_progress_cb(value)) \ - _curl_easy_setopt_err_progress_cb(); \ - if((_curl_opt) == CURLOPT_DEBUGFUNCTION) \ - if(!curlcheck_debug_cb(value)) \ - _curl_easy_setopt_err_debug_cb(); \ - if((_curl_opt) == CURLOPT_SSL_CTX_FUNCTION) \ - if(!curlcheck_ssl_ctx_cb(value)) \ - _curl_easy_setopt_err_ssl_ctx_cb(); \ - if(curlcheck_conv_cb_option(_curl_opt)) \ - if(!curlcheck_conv_cb(value)) \ - _curl_easy_setopt_err_conv_cb(); \ - if((_curl_opt) == CURLOPT_SEEKFUNCTION) \ - if(!curlcheck_seek_cb(value)) \ - _curl_easy_setopt_err_seek_cb(); \ - if(curlcheck_cb_data_option(_curl_opt)) \ - if(!curlcheck_cb_data(value)) \ - _curl_easy_setopt_err_cb_data(); \ - if((_curl_opt) == CURLOPT_ERRORBUFFER) \ - if(!curlcheck_error_buffer(value)) \ - _curl_easy_setopt_err_error_buffer(); \ - if((_curl_opt) == CURLOPT_STDERR) \ - if(!curlcheck_FILE(value)) \ - _curl_easy_setopt_err_FILE(); \ - if(curlcheck_postfields_option(_curl_opt)) \ - if(!curlcheck_postfields(value)) \ - _curl_easy_setopt_err_postfields(); \ - if((_curl_opt) == CURLOPT_HTTPPOST) \ - if(!curlcheck_arr((value), struct curl_httppost)) \ - _curl_easy_setopt_err_curl_httpost(); \ - if((_curl_opt) == CURLOPT_MIMEPOST) \ - if(!curlcheck_ptr((value), curl_mime)) \ - _curl_easy_setopt_err_curl_mimepost(); \ - if(curlcheck_slist_option(_curl_opt)) \ - if(!curlcheck_arr((value), struct curl_slist)) \ - _curl_easy_setopt_err_curl_slist(); \ - if((_curl_opt) == CURLOPT_SHARE) \ - if(!curlcheck_ptr((value), CURLSH)) \ - _curl_easy_setopt_err_CURLSH(); \ - } \ - curl_easy_setopt(handle, _curl_opt, value); \ - }) - -/* wraps curl_easy_getinfo() with typechecking */ -#define curl_easy_getinfo(handle, info, arg) \ - __extension__({ \ - __typeof__(info) _curl_info = info; \ - if(__builtin_constant_p(_curl_info)) { \ - if(curlcheck_string_info(_curl_info)) \ - if(!curlcheck_arr((arg), char *)) \ - _curl_easy_getinfo_err_string(); \ - if(curlcheck_long_info(_curl_info)) \ - if(!curlcheck_arr((arg), long)) \ - _curl_easy_getinfo_err_long(); \ - if(curlcheck_double_info(_curl_info)) \ - if(!curlcheck_arr((arg), double)) \ - _curl_easy_getinfo_err_double(); \ - if(curlcheck_slist_info(_curl_info)) \ - if(!curlcheck_arr((arg), struct curl_slist *)) \ - _curl_easy_getinfo_err_curl_slist(); \ - if(curlcheck_tlssessioninfo_info(_curl_info)) \ - if(!curlcheck_arr((arg), struct curl_tlssessioninfo *)) \ - _curl_easy_getinfo_err_curl_tlssesssioninfo(); \ - if(curlcheck_certinfo_info(_curl_info)) \ - if(!curlcheck_arr((arg), struct curl_certinfo *)) \ - _curl_easy_getinfo_err_curl_certinfo(); \ - if(curlcheck_socket_info(_curl_info)) \ - if(!curlcheck_arr((arg), curl_socket_t)) \ - _curl_easy_getinfo_err_curl_socket(); \ - if(curlcheck_off_t_info(_curl_info)) \ - if(!curlcheck_arr((arg), curl_off_t)) \ - _curl_easy_getinfo_err_curl_off_t(); \ - } \ - curl_easy_getinfo(handle, _curl_info, arg); \ - }) - -/* - * For now, just make sure that the functions are called with three arguments - */ -#define curl_share_setopt(share,opt,param) curl_share_setopt(share,opt,param) -#define curl_multi_setopt(handle,opt,param) curl_multi_setopt(handle,opt,param) - - -/* the actual warnings, triggered by calling the _curl_easy_setopt_err* - * functions */ - -/* To define a new warning, use _CURL_WARNING(identifier, "message") */ -#define CURLWARNING(id, message) \ - static void __attribute__((__warning__(message))) \ - __attribute__((__unused__)) __attribute__((__noinline__)) \ - id(void) { __asm__(""); } - -CURLWARNING(_curl_easy_setopt_err_long, - "curl_easy_setopt expects a long argument for this option") -CURLWARNING(_curl_easy_setopt_err_curl_off_t, - "curl_easy_setopt expects a curl_off_t argument for this option") -CURLWARNING(_curl_easy_setopt_err_string, - "curl_easy_setopt expects a " - "string ('char *' or char[]) argument for this option" - ) -CURLWARNING(_curl_easy_setopt_err_write_callback, - "curl_easy_setopt expects a curl_write_callback argument for this option") -CURLWARNING(_curl_easy_setopt_err_resolver_start_callback, - "curl_easy_setopt expects a " - "curl_resolver_start_callback argument for this option" - ) -CURLWARNING(_curl_easy_setopt_err_read_cb, - "curl_easy_setopt expects a curl_read_callback argument for this option") -CURLWARNING(_curl_easy_setopt_err_ioctl_cb, - "curl_easy_setopt expects a curl_ioctl_callback argument for this option") -CURLWARNING(_curl_easy_setopt_err_sockopt_cb, - "curl_easy_setopt expects a curl_sockopt_callback argument for this option") -CURLWARNING(_curl_easy_setopt_err_opensocket_cb, - "curl_easy_setopt expects a " - "curl_opensocket_callback argument for this option" - ) -CURLWARNING(_curl_easy_setopt_err_progress_cb, - "curl_easy_setopt expects a curl_progress_callback argument for this option") -CURLWARNING(_curl_easy_setopt_err_debug_cb, - "curl_easy_setopt expects a curl_debug_callback argument for this option") -CURLWARNING(_curl_easy_setopt_err_ssl_ctx_cb, - "curl_easy_setopt expects a curl_ssl_ctx_callback argument for this option") -CURLWARNING(_curl_easy_setopt_err_conv_cb, - "curl_easy_setopt expects a curl_conv_callback argument for this option") -CURLWARNING(_curl_easy_setopt_err_seek_cb, - "curl_easy_setopt expects a curl_seek_callback argument for this option") -CURLWARNING(_curl_easy_setopt_err_cb_data, - "curl_easy_setopt expects a " - "private data pointer as argument for this option") -CURLWARNING(_curl_easy_setopt_err_error_buffer, - "curl_easy_setopt expects a " - "char buffer of CURL_ERROR_SIZE as argument for this option") -CURLWARNING(_curl_easy_setopt_err_FILE, - "curl_easy_setopt expects a 'FILE *' argument for this option") -CURLWARNING(_curl_easy_setopt_err_postfields, - "curl_easy_setopt expects a 'void *' or 'char *' argument for this option") -CURLWARNING(_curl_easy_setopt_err_curl_httpost, - "curl_easy_setopt expects a 'struct curl_httppost *' " - "argument for this option") -CURLWARNING(_curl_easy_setopt_err_curl_mimepost, - "curl_easy_setopt expects a 'curl_mime *' " - "argument for this option") -CURLWARNING(_curl_easy_setopt_err_curl_slist, - "curl_easy_setopt expects a 'struct curl_slist *' argument for this option") -CURLWARNING(_curl_easy_setopt_err_CURLSH, - "curl_easy_setopt expects a CURLSH* argument for this option") - -CURLWARNING(_curl_easy_getinfo_err_string, - "curl_easy_getinfo expects a pointer to 'char *' for this info") -CURLWARNING(_curl_easy_getinfo_err_long, - "curl_easy_getinfo expects a pointer to long for this info") -CURLWARNING(_curl_easy_getinfo_err_double, - "curl_easy_getinfo expects a pointer to double for this info") -CURLWARNING(_curl_easy_getinfo_err_curl_slist, - "curl_easy_getinfo expects a pointer to 'struct curl_slist *' for this info") -CURLWARNING(_curl_easy_getinfo_err_curl_tlssesssioninfo, - "curl_easy_getinfo expects a pointer to " - "'struct curl_tlssessioninfo *' for this info") -CURLWARNING(_curl_easy_getinfo_err_curl_certinfo, - "curl_easy_getinfo expects a pointer to " - "'struct curl_certinfo *' for this info") -CURLWARNING(_curl_easy_getinfo_err_curl_socket, - "curl_easy_getinfo expects a pointer to curl_socket_t for this info") -CURLWARNING(_curl_easy_getinfo_err_curl_off_t, - "curl_easy_getinfo expects a pointer to curl_off_t for this info") - -/* groups of curl_easy_setops options that take the same type of argument */ - -/* To add a new option to one of the groups, just add - * (option) == CURLOPT_SOMETHING - * to the or-expression. If the option takes a long or curl_off_t, you don't - * have to do anything - */ - -/* evaluates to true if option takes a long argument */ -#define curlcheck_long_option(option) \ - (0 < (option) && (option) < CURLOPTTYPE_OBJECTPOINT) - -#define curlcheck_off_t_option(option) \ - ((option) > CURLOPTTYPE_OFF_T) - -/* evaluates to true if option takes a char* argument */ -#define curlcheck_string_option(option) \ - ((option) == CURLOPT_ABSTRACT_UNIX_SOCKET || \ - (option) == CURLOPT_ACCEPT_ENCODING || \ - (option) == CURLOPT_ALTSVC || \ - (option) == CURLOPT_CAINFO || \ - (option) == CURLOPT_CAPATH || \ - (option) == CURLOPT_COOKIE || \ - (option) == CURLOPT_COOKIEFILE || \ - (option) == CURLOPT_COOKIEJAR || \ - (option) == CURLOPT_COOKIELIST || \ - (option) == CURLOPT_CRLFILE || \ - (option) == CURLOPT_CUSTOMREQUEST || \ - (option) == CURLOPT_DEFAULT_PROTOCOL || \ - (option) == CURLOPT_DNS_INTERFACE || \ - (option) == CURLOPT_DNS_LOCAL_IP4 || \ - (option) == CURLOPT_DNS_LOCAL_IP6 || \ - (option) == CURLOPT_DNS_SERVERS || \ - (option) == CURLOPT_DOH_URL || \ - (option) == CURLOPT_EGDSOCKET || \ - (option) == CURLOPT_FTPPORT || \ - (option) == CURLOPT_FTP_ACCOUNT || \ - (option) == CURLOPT_FTP_ALTERNATIVE_TO_USER || \ - (option) == CURLOPT_INTERFACE || \ - (option) == CURLOPT_ISSUERCERT || \ - (option) == CURLOPT_KEYPASSWD || \ - (option) == CURLOPT_KRBLEVEL || \ - (option) == CURLOPT_LOGIN_OPTIONS || \ - (option) == CURLOPT_MAIL_AUTH || \ - (option) == CURLOPT_MAIL_FROM || \ - (option) == CURLOPT_NETRC_FILE || \ - (option) == CURLOPT_NOPROXY || \ - (option) == CURLOPT_PASSWORD || \ - (option) == CURLOPT_PINNEDPUBLICKEY || \ - (option) == CURLOPT_PRE_PROXY || \ - (option) == CURLOPT_PROXY || \ - (option) == CURLOPT_PROXYPASSWORD || \ - (option) == CURLOPT_PROXYUSERNAME || \ - (option) == CURLOPT_PROXYUSERPWD || \ - (option) == CURLOPT_PROXY_CAINFO || \ - (option) == CURLOPT_PROXY_CAPATH || \ - (option) == CURLOPT_PROXY_CRLFILE || \ - (option) == CURLOPT_PROXY_KEYPASSWD || \ - (option) == CURLOPT_PROXY_PINNEDPUBLICKEY || \ - (option) == CURLOPT_PROXY_SERVICE_NAME || \ - (option) == CURLOPT_PROXY_SSLCERT || \ - (option) == CURLOPT_PROXY_SSLCERTTYPE || \ - (option) == CURLOPT_PROXY_SSLKEY || \ - (option) == CURLOPT_PROXY_SSLKEYTYPE || \ - (option) == CURLOPT_PROXY_SSL_CIPHER_LIST || \ - (option) == CURLOPT_PROXY_TLS13_CIPHERS || \ - (option) == CURLOPT_PROXY_TLSAUTH_PASSWORD || \ - (option) == CURLOPT_PROXY_TLSAUTH_TYPE || \ - (option) == CURLOPT_PROXY_TLSAUTH_USERNAME || \ - (option) == CURLOPT_RANDOM_FILE || \ - (option) == CURLOPT_RANGE || \ - (option) == CURLOPT_REFERER || \ - (option) == CURLOPT_REQUEST_TARGET || \ - (option) == CURLOPT_RTSP_SESSION_ID || \ - (option) == CURLOPT_RTSP_STREAM_URI || \ - (option) == CURLOPT_RTSP_TRANSPORT || \ - (option) == CURLOPT_SASL_AUTHZID || \ - (option) == CURLOPT_SERVICE_NAME || \ - (option) == CURLOPT_SOCKS5_GSSAPI_SERVICE || \ - (option) == CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 || \ - (option) == CURLOPT_SSH_KNOWNHOSTS || \ - (option) == CURLOPT_SSH_PRIVATE_KEYFILE || \ - (option) == CURLOPT_SSH_PUBLIC_KEYFILE || \ - (option) == CURLOPT_SSLCERT || \ - (option) == CURLOPT_SSLCERTTYPE || \ - (option) == CURLOPT_SSLENGINE || \ - (option) == CURLOPT_SSLKEY || \ - (option) == CURLOPT_SSLKEYTYPE || \ - (option) == CURLOPT_SSL_CIPHER_LIST || \ - (option) == CURLOPT_TLS13_CIPHERS || \ - (option) == CURLOPT_TLSAUTH_PASSWORD || \ - (option) == CURLOPT_TLSAUTH_TYPE || \ - (option) == CURLOPT_TLSAUTH_USERNAME || \ - (option) == CURLOPT_UNIX_SOCKET_PATH || \ - (option) == CURLOPT_URL || \ - (option) == CURLOPT_USERAGENT || \ - (option) == CURLOPT_USERNAME || \ - (option) == CURLOPT_USERPWD || \ - (option) == CURLOPT_XOAUTH2_BEARER || \ - 0) - -/* evaluates to true if option takes a curl_write_callback argument */ -#define curlcheck_write_cb_option(option) \ - ((option) == CURLOPT_HEADERFUNCTION || \ - (option) == CURLOPT_WRITEFUNCTION) - -/* evaluates to true if option takes a curl_conv_callback argument */ -#define curlcheck_conv_cb_option(option) \ - ((option) == CURLOPT_CONV_TO_NETWORK_FUNCTION || \ - (option) == CURLOPT_CONV_FROM_NETWORK_FUNCTION || \ - (option) == CURLOPT_CONV_FROM_UTF8_FUNCTION) - -/* evaluates to true if option takes a data argument to pass to a callback */ -#define curlcheck_cb_data_option(option) \ - ((option) == CURLOPT_CHUNK_DATA || \ - (option) == CURLOPT_CLOSESOCKETDATA || \ - (option) == CURLOPT_DEBUGDATA || \ - (option) == CURLOPT_FNMATCH_DATA || \ - (option) == CURLOPT_HEADERDATA || \ - (option) == CURLOPT_INTERLEAVEDATA || \ - (option) == CURLOPT_IOCTLDATA || \ - (option) == CURLOPT_OPENSOCKETDATA || \ - (option) == CURLOPT_PRIVATE || \ - (option) == CURLOPT_PROGRESSDATA || \ - (option) == CURLOPT_READDATA || \ - (option) == CURLOPT_SEEKDATA || \ - (option) == CURLOPT_SOCKOPTDATA || \ - (option) == CURLOPT_SSH_KEYDATA || \ - (option) == CURLOPT_SSL_CTX_DATA || \ - (option) == CURLOPT_WRITEDATA || \ - (option) == CURLOPT_RESOLVER_START_DATA || \ - (option) == CURLOPT_TRAILERDATA || \ - 0) - -/* evaluates to true if option takes a POST data argument (void* or char*) */ -#define curlcheck_postfields_option(option) \ - ((option) == CURLOPT_POSTFIELDS || \ - (option) == CURLOPT_COPYPOSTFIELDS || \ - 0) - -/* evaluates to true if option takes a struct curl_slist * argument */ -#define curlcheck_slist_option(option) \ - ((option) == CURLOPT_HTTP200ALIASES || \ - (option) == CURLOPT_HTTPHEADER || \ - (option) == CURLOPT_MAIL_RCPT || \ - (option) == CURLOPT_POSTQUOTE || \ - (option) == CURLOPT_PREQUOTE || \ - (option) == CURLOPT_PROXYHEADER || \ - (option) == CURLOPT_QUOTE || \ - (option) == CURLOPT_RESOLVE || \ - (option) == CURLOPT_TELNETOPTIONS || \ - (option) == CURLOPT_CONNECT_TO || \ - 0) - -/* groups of curl_easy_getinfo infos that take the same type of argument */ - -/* evaluates to true if info expects a pointer to char * argument */ -#define curlcheck_string_info(info) \ - (CURLINFO_STRING < (info) && (info) < CURLINFO_LONG) - -/* evaluates to true if info expects a pointer to long argument */ -#define curlcheck_long_info(info) \ - (CURLINFO_LONG < (info) && (info) < CURLINFO_DOUBLE) - -/* evaluates to true if info expects a pointer to double argument */ -#define curlcheck_double_info(info) \ - (CURLINFO_DOUBLE < (info) && (info) < CURLINFO_SLIST) - -/* true if info expects a pointer to struct curl_slist * argument */ -#define curlcheck_slist_info(info) \ - (((info) == CURLINFO_SSL_ENGINES) || ((info) == CURLINFO_COOKIELIST)) - -/* true if info expects a pointer to struct curl_tlssessioninfo * argument */ -#define curlcheck_tlssessioninfo_info(info) \ - (((info) == CURLINFO_TLS_SSL_PTR) || ((info) == CURLINFO_TLS_SESSION)) - -/* true if info expects a pointer to struct curl_certinfo * argument */ -#define curlcheck_certinfo_info(info) ((info) == CURLINFO_CERTINFO) - -/* true if info expects a pointer to struct curl_socket_t argument */ -#define curlcheck_socket_info(info) \ - (CURLINFO_SOCKET < (info) && (info) < CURLINFO_OFF_T) - -/* true if info expects a pointer to curl_off_t argument */ -#define curlcheck_off_t_info(info) \ - (CURLINFO_OFF_T < (info)) - - -/* typecheck helpers -- check whether given expression has requested type*/ - -/* For pointers, you can use the curlcheck_ptr/curlcheck_arr macros, - * otherwise define a new macro. Search for __builtin_types_compatible_p - * in the GCC manual. - * NOTE: these macros MUST NOT EVALUATE their arguments! The argument is - * the actual expression passed to the curl_easy_setopt macro. This - * means that you can only apply the sizeof and __typeof__ operators, no - * == or whatsoever. - */ - -/* XXX: should evaluate to true if expr is a pointer */ -#define curlcheck_any_ptr(expr) \ - (sizeof(expr) == sizeof(void *)) - -/* evaluates to true if expr is NULL */ -/* XXX: must not evaluate expr, so this check is not accurate */ -#define curlcheck_NULL(expr) \ - (__builtin_types_compatible_p(__typeof__(expr), __typeof__(NULL))) - -/* evaluates to true if expr is type*, const type* or NULL */ -#define curlcheck_ptr(expr, type) \ - (curlcheck_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), type *) || \ - __builtin_types_compatible_p(__typeof__(expr), const type *)) - -/* evaluates to true if expr is one of type[], type*, NULL or const type* */ -#define curlcheck_arr(expr, type) \ - (curlcheck_ptr((expr), type) || \ - __builtin_types_compatible_p(__typeof__(expr), type [])) - -/* evaluates to true if expr is a string */ -#define curlcheck_string(expr) \ - (curlcheck_arr((expr), char) || \ - curlcheck_arr((expr), signed char) || \ - curlcheck_arr((expr), unsigned char)) - -/* evaluates to true if expr is a long (no matter the signedness) - * XXX: for now, int is also accepted (and therefore short and char, which - * are promoted to int when passed to a variadic function) */ -#define curlcheck_long(expr) \ - (__builtin_types_compatible_p(__typeof__(expr), long) || \ - __builtin_types_compatible_p(__typeof__(expr), signed long) || \ - __builtin_types_compatible_p(__typeof__(expr), unsigned long) || \ - __builtin_types_compatible_p(__typeof__(expr), int) || \ - __builtin_types_compatible_p(__typeof__(expr), signed int) || \ - __builtin_types_compatible_p(__typeof__(expr), unsigned int) || \ - __builtin_types_compatible_p(__typeof__(expr), short) || \ - __builtin_types_compatible_p(__typeof__(expr), signed short) || \ - __builtin_types_compatible_p(__typeof__(expr), unsigned short) || \ - __builtin_types_compatible_p(__typeof__(expr), char) || \ - __builtin_types_compatible_p(__typeof__(expr), signed char) || \ - __builtin_types_compatible_p(__typeof__(expr), unsigned char)) - -/* evaluates to true if expr is of type curl_off_t */ -#define curlcheck_off_t(expr) \ - (__builtin_types_compatible_p(__typeof__(expr), curl_off_t)) - -/* evaluates to true if expr is abuffer suitable for CURLOPT_ERRORBUFFER */ -/* XXX: also check size of an char[] array? */ -#define curlcheck_error_buffer(expr) \ - (curlcheck_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), char *) || \ - __builtin_types_compatible_p(__typeof__(expr), char[])) - -/* evaluates to true if expr is of type (const) void* or (const) FILE* */ -#if 0 -#define curlcheck_cb_data(expr) \ - (curlcheck_ptr((expr), void) || \ - curlcheck_ptr((expr), FILE)) -#else /* be less strict */ -#define curlcheck_cb_data(expr) \ - curlcheck_any_ptr(expr) -#endif - -/* evaluates to true if expr is of type FILE* */ -#define curlcheck_FILE(expr) \ - (curlcheck_NULL(expr) || \ - (__builtin_types_compatible_p(__typeof__(expr), FILE *))) - -/* evaluates to true if expr can be passed as POST data (void* or char*) */ -#define curlcheck_postfields(expr) \ - (curlcheck_ptr((expr), void) || \ - curlcheck_arr((expr), char) || \ - curlcheck_arr((expr), unsigned char)) - -/* helper: __builtin_types_compatible_p distinguishes between functions and - * function pointers, hide it */ -#define curlcheck_cb_compatible(func, type) \ - (__builtin_types_compatible_p(__typeof__(func), type) || \ - __builtin_types_compatible_p(__typeof__(func) *, type)) - -/* evaluates to true if expr is of type curl_resolver_start_callback */ -#define curlcheck_resolver_start_callback(expr) \ - (curlcheck_NULL(expr) || \ - curlcheck_cb_compatible((expr), curl_resolver_start_callback)) - -/* evaluates to true if expr is of type curl_read_callback or "similar" */ -#define curlcheck_read_cb(expr) \ - (curlcheck_NULL(expr) || \ - curlcheck_cb_compatible((expr), __typeof__(fread) *) || \ - curlcheck_cb_compatible((expr), curl_read_callback) || \ - curlcheck_cb_compatible((expr), _curl_read_callback1) || \ - curlcheck_cb_compatible((expr), _curl_read_callback2) || \ - curlcheck_cb_compatible((expr), _curl_read_callback3) || \ - curlcheck_cb_compatible((expr), _curl_read_callback4) || \ - curlcheck_cb_compatible((expr), _curl_read_callback5) || \ - curlcheck_cb_compatible((expr), _curl_read_callback6)) -typedef size_t (*_curl_read_callback1)(char *, size_t, size_t, void *); -typedef size_t (*_curl_read_callback2)(char *, size_t, size_t, const void *); -typedef size_t (*_curl_read_callback3)(char *, size_t, size_t, FILE *); -typedef size_t (*_curl_read_callback4)(void *, size_t, size_t, void *); -typedef size_t (*_curl_read_callback5)(void *, size_t, size_t, const void *); -typedef size_t (*_curl_read_callback6)(void *, size_t, size_t, FILE *); - -/* evaluates to true if expr is of type curl_write_callback or "similar" */ -#define curlcheck_write_cb(expr) \ - (curlcheck_read_cb(expr) || \ - curlcheck_cb_compatible((expr), __typeof__(fwrite) *) || \ - curlcheck_cb_compatible((expr), curl_write_callback) || \ - curlcheck_cb_compatible((expr), _curl_write_callback1) || \ - curlcheck_cb_compatible((expr), _curl_write_callback2) || \ - curlcheck_cb_compatible((expr), _curl_write_callback3) || \ - curlcheck_cb_compatible((expr), _curl_write_callback4) || \ - curlcheck_cb_compatible((expr), _curl_write_callback5) || \ - curlcheck_cb_compatible((expr), _curl_write_callback6)) -typedef size_t (*_curl_write_callback1)(const char *, size_t, size_t, void *); -typedef size_t (*_curl_write_callback2)(const char *, size_t, size_t, - const void *); -typedef size_t (*_curl_write_callback3)(const char *, size_t, size_t, FILE *); -typedef size_t (*_curl_write_callback4)(const void *, size_t, size_t, void *); -typedef size_t (*_curl_write_callback5)(const void *, size_t, size_t, - const void *); -typedef size_t (*_curl_write_callback6)(const void *, size_t, size_t, FILE *); - -/* evaluates to true if expr is of type curl_ioctl_callback or "similar" */ -#define curlcheck_ioctl_cb(expr) \ - (curlcheck_NULL(expr) || \ - curlcheck_cb_compatible((expr), curl_ioctl_callback) || \ - curlcheck_cb_compatible((expr), _curl_ioctl_callback1) || \ - curlcheck_cb_compatible((expr), _curl_ioctl_callback2) || \ - curlcheck_cb_compatible((expr), _curl_ioctl_callback3) || \ - curlcheck_cb_compatible((expr), _curl_ioctl_callback4)) -typedef curlioerr (*_curl_ioctl_callback1)(CURL *, int, void *); -typedef curlioerr (*_curl_ioctl_callback2)(CURL *, int, const void *); -typedef curlioerr (*_curl_ioctl_callback3)(CURL *, curliocmd, void *); -typedef curlioerr (*_curl_ioctl_callback4)(CURL *, curliocmd, const void *); - -/* evaluates to true if expr is of type curl_sockopt_callback or "similar" */ -#define curlcheck_sockopt_cb(expr) \ - (curlcheck_NULL(expr) || \ - curlcheck_cb_compatible((expr), curl_sockopt_callback) || \ - curlcheck_cb_compatible((expr), _curl_sockopt_callback1) || \ - curlcheck_cb_compatible((expr), _curl_sockopt_callback2)) -typedef int (*_curl_sockopt_callback1)(void *, curl_socket_t, curlsocktype); -typedef int (*_curl_sockopt_callback2)(const void *, curl_socket_t, - curlsocktype); - -/* evaluates to true if expr is of type curl_opensocket_callback or - "similar" */ -#define curlcheck_opensocket_cb(expr) \ - (curlcheck_NULL(expr) || \ - curlcheck_cb_compatible((expr), curl_opensocket_callback) || \ - curlcheck_cb_compatible((expr), _curl_opensocket_callback1) || \ - curlcheck_cb_compatible((expr), _curl_opensocket_callback2) || \ - curlcheck_cb_compatible((expr), _curl_opensocket_callback3) || \ - curlcheck_cb_compatible((expr), _curl_opensocket_callback4)) -typedef curl_socket_t (*_curl_opensocket_callback1) - (void *, curlsocktype, struct curl_sockaddr *); -typedef curl_socket_t (*_curl_opensocket_callback2) - (void *, curlsocktype, const struct curl_sockaddr *); -typedef curl_socket_t (*_curl_opensocket_callback3) - (const void *, curlsocktype, struct curl_sockaddr *); -typedef curl_socket_t (*_curl_opensocket_callback4) - (const void *, curlsocktype, const struct curl_sockaddr *); - -/* evaluates to true if expr is of type curl_progress_callback or "similar" */ -#define curlcheck_progress_cb(expr) \ - (curlcheck_NULL(expr) || \ - curlcheck_cb_compatible((expr), curl_progress_callback) || \ - curlcheck_cb_compatible((expr), _curl_progress_callback1) || \ - curlcheck_cb_compatible((expr), _curl_progress_callback2)) -typedef int (*_curl_progress_callback1)(void *, - double, double, double, double); -typedef int (*_curl_progress_callback2)(const void *, - double, double, double, double); - -/* evaluates to true if expr is of type curl_debug_callback or "similar" */ -#define curlcheck_debug_cb(expr) \ - (curlcheck_NULL(expr) || \ - curlcheck_cb_compatible((expr), curl_debug_callback) || \ - curlcheck_cb_compatible((expr), _curl_debug_callback1) || \ - curlcheck_cb_compatible((expr), _curl_debug_callback2) || \ - curlcheck_cb_compatible((expr), _curl_debug_callback3) || \ - curlcheck_cb_compatible((expr), _curl_debug_callback4) || \ - curlcheck_cb_compatible((expr), _curl_debug_callback5) || \ - curlcheck_cb_compatible((expr), _curl_debug_callback6) || \ - curlcheck_cb_compatible((expr), _curl_debug_callback7) || \ - curlcheck_cb_compatible((expr), _curl_debug_callback8)) -typedef int (*_curl_debug_callback1) (CURL *, - curl_infotype, char *, size_t, void *); -typedef int (*_curl_debug_callback2) (CURL *, - curl_infotype, char *, size_t, const void *); -typedef int (*_curl_debug_callback3) (CURL *, - curl_infotype, const char *, size_t, void *); -typedef int (*_curl_debug_callback4) (CURL *, - curl_infotype, const char *, size_t, const void *); -typedef int (*_curl_debug_callback5) (CURL *, - curl_infotype, unsigned char *, size_t, void *); -typedef int (*_curl_debug_callback6) (CURL *, - curl_infotype, unsigned char *, size_t, const void *); -typedef int (*_curl_debug_callback7) (CURL *, - curl_infotype, const unsigned char *, size_t, void *); -typedef int (*_curl_debug_callback8) (CURL *, - curl_infotype, const unsigned char *, size_t, const void *); - -/* evaluates to true if expr is of type curl_ssl_ctx_callback or "similar" */ -/* this is getting even messier... */ -#define curlcheck_ssl_ctx_cb(expr) \ - (curlcheck_NULL(expr) || \ - curlcheck_cb_compatible((expr), curl_ssl_ctx_callback) || \ - curlcheck_cb_compatible((expr), _curl_ssl_ctx_callback1) || \ - curlcheck_cb_compatible((expr), _curl_ssl_ctx_callback2) || \ - curlcheck_cb_compatible((expr), _curl_ssl_ctx_callback3) || \ - curlcheck_cb_compatible((expr), _curl_ssl_ctx_callback4) || \ - curlcheck_cb_compatible((expr), _curl_ssl_ctx_callback5) || \ - curlcheck_cb_compatible((expr), _curl_ssl_ctx_callback6) || \ - curlcheck_cb_compatible((expr), _curl_ssl_ctx_callback7) || \ - curlcheck_cb_compatible((expr), _curl_ssl_ctx_callback8)) -typedef CURLcode (*_curl_ssl_ctx_callback1)(CURL *, void *, void *); -typedef CURLcode (*_curl_ssl_ctx_callback2)(CURL *, void *, const void *); -typedef CURLcode (*_curl_ssl_ctx_callback3)(CURL *, const void *, void *); -typedef CURLcode (*_curl_ssl_ctx_callback4)(CURL *, const void *, - const void *); -#ifdef HEADER_SSL_H -/* hack: if we included OpenSSL's ssl.h, we know about SSL_CTX - * this will of course break if we're included before OpenSSL headers... - */ -typedef CURLcode (*_curl_ssl_ctx_callback5)(CURL *, SSL_CTX, void *); -typedef CURLcode (*_curl_ssl_ctx_callback6)(CURL *, SSL_CTX, const void *); -typedef CURLcode (*_curl_ssl_ctx_callback7)(CURL *, const SSL_CTX, void *); -typedef CURLcode (*_curl_ssl_ctx_callback8)(CURL *, const SSL_CTX, - const void *); -#else -typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback5; -typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback6; -typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback7; -typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback8; -#endif - -/* evaluates to true if expr is of type curl_conv_callback or "similar" */ -#define curlcheck_conv_cb(expr) \ - (curlcheck_NULL(expr) || \ - curlcheck_cb_compatible((expr), curl_conv_callback) || \ - curlcheck_cb_compatible((expr), _curl_conv_callback1) || \ - curlcheck_cb_compatible((expr), _curl_conv_callback2) || \ - curlcheck_cb_compatible((expr), _curl_conv_callback3) || \ - curlcheck_cb_compatible((expr), _curl_conv_callback4)) -typedef CURLcode (*_curl_conv_callback1)(char *, size_t length); -typedef CURLcode (*_curl_conv_callback2)(const char *, size_t length); -typedef CURLcode (*_curl_conv_callback3)(void *, size_t length); -typedef CURLcode (*_curl_conv_callback4)(const void *, size_t length); - -/* evaluates to true if expr is of type curl_seek_callback or "similar" */ -#define curlcheck_seek_cb(expr) \ - (curlcheck_NULL(expr) || \ - curlcheck_cb_compatible((expr), curl_seek_callback) || \ - curlcheck_cb_compatible((expr), _curl_seek_callback1) || \ - curlcheck_cb_compatible((expr), _curl_seek_callback2)) -typedef CURLcode (*_curl_seek_callback1)(void *, curl_off_t, int); -typedef CURLcode (*_curl_seek_callback2)(const void *, curl_off_t, int); - - -#endif /* CURLINC_TYPECHECK_GCC_H */ diff --git a/src/curl/urlapi.h b/src/curl/urlapi.h deleted file mode 100644 index f2d0677..0000000 --- a/src/curl/urlapi.h +++ /dev/null @@ -1,125 +0,0 @@ -#ifndef CURLINC_URLAPI_H -#define CURLINC_URLAPI_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2018 - 2019, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* the error codes for the URL API */ -typedef enum { - CURLUE_OK, - CURLUE_BAD_HANDLE, /* 1 */ - CURLUE_BAD_PARTPOINTER, /* 2 */ - CURLUE_MALFORMED_INPUT, /* 3 */ - CURLUE_BAD_PORT_NUMBER, /* 4 */ - CURLUE_UNSUPPORTED_SCHEME, /* 5 */ - CURLUE_URLDECODE, /* 6 */ - CURLUE_OUT_OF_MEMORY, /* 7 */ - CURLUE_USER_NOT_ALLOWED, /* 8 */ - CURLUE_UNKNOWN_PART, /* 9 */ - CURLUE_NO_SCHEME, /* 10 */ - CURLUE_NO_USER, /* 11 */ - CURLUE_NO_PASSWORD, /* 12 */ - CURLUE_NO_OPTIONS, /* 13 */ - CURLUE_NO_HOST, /* 14 */ - CURLUE_NO_PORT, /* 15 */ - CURLUE_NO_QUERY, /* 16 */ - CURLUE_NO_FRAGMENT /* 17 */ -} CURLUcode; - -typedef enum { - CURLUPART_URL, - CURLUPART_SCHEME, - CURLUPART_USER, - CURLUPART_PASSWORD, - CURLUPART_OPTIONS, - CURLUPART_HOST, - CURLUPART_PORT, - CURLUPART_PATH, - CURLUPART_QUERY, - CURLUPART_FRAGMENT, - CURLUPART_ZONEID /* added in 7.65.0 */ -} CURLUPart; - -#define CURLU_DEFAULT_PORT (1<<0) /* return default port number */ -#define CURLU_NO_DEFAULT_PORT (1<<1) /* act as if no port number was set, - if the port number matches the - default for the scheme */ -#define CURLU_DEFAULT_SCHEME (1<<2) /* return default scheme if - missing */ -#define CURLU_NON_SUPPORT_SCHEME (1<<3) /* allow non-supported scheme */ -#define CURLU_PATH_AS_IS (1<<4) /* leave dot sequences */ -#define CURLU_DISALLOW_USER (1<<5) /* no user+password allowed */ -#define CURLU_URLDECODE (1<<6) /* URL decode on get */ -#define CURLU_URLENCODE (1<<7) /* URL encode on set */ -#define CURLU_APPENDQUERY (1<<8) /* append a form style part */ -#define CURLU_GUESS_SCHEME (1<<9) /* legacy curl-style guessing */ -#define CURLU_NO_AUTHORITY (1<<10) /* Allow empty authority when the - scheme is unknown. */ - -typedef struct Curl_URL CURLU; - -/* - * curl_url() creates a new CURLU handle and returns a pointer to it. - * Must be freed with curl_url_cleanup(). - */ -CURL_EXTERN CURLU *curl_url(void); - -/* - * curl_url_cleanup() frees the CURLU handle and related resources used for - * the URL parsing. It will not free strings previously returned with the URL - * API. - */ -CURL_EXTERN void curl_url_cleanup(CURLU *handle); - -/* - * curl_url_dup() duplicates a CURLU handle and returns a new copy. The new - * handle must also be freed with curl_url_cleanup(). - */ -CURL_EXTERN CURLU *curl_url_dup(CURLU *in); - -/* - * curl_url_get() extracts a specific part of the URL from a CURLU - * handle. Returns error code. The returned pointer MUST be freed with - * curl_free() afterwards. - */ -CURL_EXTERN CURLUcode curl_url_get(CURLU *handle, CURLUPart what, - char **part, unsigned int flags); - -/* - * curl_url_set() sets a specific part of the URL in a CURLU handle. Returns - * error code. The passed in string will be copied. Passing a NULL instead of - * a part string, clears that part. - */ -CURL_EXTERN CURLUcode curl_url_set(CURLU *handle, CURLUPart what, - const char *part, unsigned int flags); - - -#ifdef __cplusplus -} /* end of extern "C" */ -#endif - -#endif /* CURLINC_URLAPI_H */ diff --git a/src/icons/1.png b/src/icons/1.png deleted file mode 100644 index aa4632b227078b84715b6281b03b83a5dd407038..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 234 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPgg)9!^eC4MvuU%YZ^WnIRD+&iT2y zsd*(pE(61!b(>}asUS}m#}JFt$q5qI4m312Ch{>eA2w%WYx~c`!=tn$BP<~yA>zz| z0}uGF{+THh{wF;lVMmiUqp+Y}B2cEnAd4Z7nWK^a$&yCd0N)!M&KR6AU^vMuy5W`3 Qz9x_@p00i_>zopr0D#;@UH||9 diff --git a/src/icons/2.png b/src/icons/2.png deleted file mode 100644 index fe83f3f6ff5d25588760c97a6995b349dff5115f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 297 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPgg)9!^d%Q&0VMdw@bbnIRD+&iT2y zsd*(pE(61!b(>}asfnI0jv*GO?_Rd&V=NRn`q4k6Lqp^>lhyPCqGp9Go!uE)1X3C13uNw~t^2cm&3v-#1*eVly#qcQm?kg^9 z4R-w3%VOm{X82w6i{QG63i`@934Q5bmh@CKI0yJkh>337ctqO#%mp3idn~2hai1t{zb@#%zbRn6vcNwdyx!sq^GN&%Q~loCIG;&Y3cv~ diff --git a/src/icons/3.png b/src/icons/3.png deleted file mode 100644 index bcc6557ea9bcbc4f3fe4a6e91be8b8c7c1a1e417..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 303 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPgg)9!^d%;n_;sjzA%v%#er@=ltB< z)VvZPmw{o=x=k~I)O1f5#}JFtcP|-oA1o9&_R&9LiO5o&P13w!`3GLe&e+4cx^oZ5 zdWU-r<_TM)474RhxK7{XvH$J72^x)lX9L{9>}dSvI~q3v#NbtDnm{r-UW|Y4d2f diff --git a/src/icons/t.png b/src/icons/t.png deleted file mode 100644 index 3c825217fe4225daa307b20aa1ae4fa846e3faaa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 241 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPgg)9!^eSp@~87Cjo_cGD9Ltobz*Y zQ}arITn2_c>o&~S?1~L=d#Wzp$PyC4@~v| diff --git a/src/plugin.c b/src/plugin.c index c6098ed..887f3b0 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -21,9 +21,9 @@ #include "teamspeak/clientlib_publicdefinitions.h" #include "ts3_functions.h" #include "plugin.h" -#include "curl/curl.h" +//#include "curl/curl.h" -#pragma comment (lib, "curl/libcurl_a.lib") +//#pragma comment (lib, "curl/libcurl_a.lib") #pragma comment (lib, "Normaliz.lib") #pragma comment (lib, "Ws2_32.lib") #pragma comment (lib, "Wldap32.lib") @@ -49,8 +49,8 @@ static struct TS3Functions ts3Functions; #define RETURNCODE_BUFSIZE 128 static char* pluginID = NULL; -CURL* curl; -CURLcode res; +//CURL* curl; +//CURLcode res; const char* LED_URL_SAVE = "http://10.0.0.222/win&PS=16&NN"; const char* LED_URL_ON = "http://10.0.0.222/win&T=1&FX=0&R=0&B=255&G=0&W=0&A=255&NN"; const char* LED_URL_OFF= "http://10.0.0.222/win&PL=16&NN"; @@ -142,8 +142,8 @@ int ts3plugin_init() { printf("PLUGIN: App path: %s\nResources path: %s\nConfig path: %s\nPlugin path: %s\n", appPath, resourcesPath, configPath, pluginPath); - curl_global_init(CURL_GLOBAL_ALL); - curl = curl_easy_init(); +// curl_global_init(CURL_GLOBAL_ALL); +// curl = curl_easy_init(); return 0; /* 0 = success, 1 = failure, -2 = failure but client will not show a "failed to load" warning */ /* -2 is a very special case and should only be used if a plugin displays a dialog (e.g. overlay) asking the user to disable @@ -156,8 +156,8 @@ void ts3plugin_shutdown() { /* Your plugin cleanup code here */ printf("PLUGIN: shutdown\n"); - curl_easy_cleanup(curl); - curl_global_cleanup(); +// curl_easy_cleanup(curl); +// curl_global_cleanup(); /* * Note: @@ -493,37 +493,37 @@ const char* ts3plugin_infoTitle() { * "data" to NULL to have the client ignore the info data. */ void ts3plugin_infoData(uint64 serverConnectionHandlerID, uint64 id, enum PluginItemType type, char** data) { - char* name; +// char* name; - /* For demonstration purpose, display the name of the currently selected server, channel or client. */ - switch(type) { - case PLUGIN_SERVER: - if(ts3Functions.getServerVariableAsString(serverConnectionHandlerID, VIRTUALSERVER_NAME, &name) != ERROR_ok) { - printf("Error getting virtual server name\n"); - return; - } - break; - case PLUGIN_CHANNEL: - if(ts3Functions.getChannelVariableAsString(serverConnectionHandlerID, id, CHANNEL_NAME, &name) != ERROR_ok) { - printf("Error getting channel name\n"); - return; - } - break; - case PLUGIN_CLIENT: - if(ts3Functions.getClientVariableAsString(serverConnectionHandlerID, (anyID)id, CLIENT_NICKNAME, &name) != ERROR_ok) { - printf("Error getting client nickname\n"); - return; - } - break; - default: - printf("Invalid item type: %d\n", type); - data = NULL; /* Ignore */ - return; - } +// /* For demonstration purpose, display the name of the currently selected server, channel or client. */ +// switch(type) { +// case PLUGIN_SERVER: +// if(ts3Functions.getServerVariableAsString(serverConnectionHandlerID, VIRTUALSERVER_NAME, &name) != ERROR_ok) { +// printf("Error getting virtual server name\n"); +// return; +// } +// break; +// case PLUGIN_CHANNEL: +// if(ts3Functions.getChannelVariableAsString(serverConnectionHandlerID, id, CHANNEL_NAME, &name) != ERROR_ok) { +// printf("Error getting channel name\n"); +// return; +// } +// break; +// case PLUGIN_CLIENT: +// if(ts3Functions.getClientVariableAsString(serverConnectionHandlerID, (anyID)id, CLIENT_NICKNAME, &name) != ERROR_ok) { +// printf("Error getting client nickname\n"); +// return; +// } +// break; +// default: +// printf("Invalid item type: %d\n", type); +// data = NULL; /* Ignore */ +// return; +// } - *data = (char*)malloc(INFODATA_BUFSIZE * sizeof(char)); /* Must be allocated in the plugin! */ - snprintf(*data, INFODATA_BUFSIZE, "The nickname is [I]\"%s\"[/I]", name); /* bbCode is supported. HTML is not supported */ - ts3Functions.freeMemory(name); +// *data = (char*)malloc(INFODATA_BUFSIZE * sizeof(char)); /* Must be allocated in the plugin! */ +// snprintf(*data, INFODATA_BUFSIZE, "The nickname is [I]\"%s\"[/I]", name); /* bbCode is supported. HTML is not supported */ +// ts3Functions.freeMemory(name); } /* Required to release the memory for parameter "data" allocated in ts3plugin_infoData and ts3plugin_initMenus */ @@ -854,22 +854,20 @@ void ts3plugin_onTalkStatusChangeEvent(uint64 serverConnectionHandlerID, int sta /* Demonstrate usage of getClientDisplayName */ char name[512]; if(ts3Functions.getClientDisplayName(serverConnectionHandlerID, clientID, name, 512) == ERROR_ok) { - if (clientID == myClientID) { - //curl = curl_easy_init(); - if (curl) { - if (status == STATUS_TALKING) { - curl_easy_setopt(curl, CURLOPT_URL, LED_URL_SAVE); - res = curl_easy_perform(curl); + if (clientID == myClientID) { +// if (curl) { +// if (status == STATUS_TALKING) { +// curl_easy_setopt(curl, CURLOPT_URL, LED_URL_SAVE); +// res = curl_easy_perform(curl); - curl_easy_setopt(curl, CURLOPT_URL, LED_URL_ON); - res = curl_easy_perform(curl); - } - else { - curl_easy_setopt(curl, CURLOPT_URL, LED_URL_OFF); - res = curl_easy_perform(curl); - } - } - //curl_easy_cleanup(curl); +// curl_easy_setopt(curl, CURLOPT_URL, LED_URL_ON); +// res = curl_easy_perform(curl); +// } +// else { +// curl_easy_setopt(curl, CURLOPT_URL, LED_URL_OFF); +// res = curl_easy_perform(curl); +// } +// } } } } @@ -938,24 +936,22 @@ int ts3plugin_onClientPokeEvent(uint64 serverConnectionHandlerID, anyID fromClie /* Check if the Friend/Foe manager has already blocked this poke */ if(ffIgnored) { return 0; /* Client will block anyways, doesn't matter what we return */ - } - //curl = curl_easy_init(); + } - if (curl) { - curl_easy_setopt(curl, CURLOPT_URL, LED_URL_POKE); - res = curl_easy_perform(curl); - Sleep(500); - res = curl_easy_perform(curl); - Sleep(500); - res = curl_easy_perform(curl); - Sleep(500); - res = curl_easy_perform(curl); - Sleep(500); +// if (curl) { +// curl_easy_setopt(curl, CURLOPT_URL, LED_URL_POKE); +// res = curl_easy_perform(curl); +// Sleep(500); +// res = curl_easy_perform(curl); +// Sleep(500); +// res = curl_easy_perform(curl); +// Sleep(500); +// res = curl_easy_perform(curl); +// Sleep(500); - curl_easy_setopt(curl, CURLOPT_URL, LED_URL_OFF); - res = curl_easy_perform(curl); - //curl_easy_cleanup(curl); - } +// curl_easy_setopt(curl, CURLOPT_URL, LED_URL_OFF); +// res = curl_easy_perform(curl); +// } return 0; /* 0 = handle normally, 1 = client will ignore the poke */ } diff --git a/src/test_plugin.sln b/src/test_plugin.sln deleted file mode 100644 index efc2a54..0000000 --- a/src/test_plugin.sln +++ /dev/null @@ -1,31 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.29926.136 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_plugin", "test_plugin.vcxproj", "{192D646D-748B-450B-AF3D-BF8EDD5FC897}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {192D646D-748B-450B-AF3D-BF8EDD5FC897}.Debug|Win32.ActiveCfg = Debug|Win32 - {192D646D-748B-450B-AF3D-BF8EDD5FC897}.Debug|Win32.Build.0 = Debug|Win32 - {192D646D-748B-450B-AF3D-BF8EDD5FC897}.Debug|x64.ActiveCfg = Debug|x64 - {192D646D-748B-450B-AF3D-BF8EDD5FC897}.Debug|x64.Build.0 = Debug|x64 - {192D646D-748B-450B-AF3D-BF8EDD5FC897}.Release|Win32.ActiveCfg = Release|Win32 - {192D646D-748B-450B-AF3D-BF8EDD5FC897}.Release|Win32.Build.0 = Release|Win32 - {192D646D-748B-450B-AF3D-BF8EDD5FC897}.Release|x64.ActiveCfg = Release|x64 - {192D646D-748B-450B-AF3D-BF8EDD5FC897}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {8FD60E3B-57E6-4338-A735-E4EFD3DFB6C2} - EndGlobalSection -EndGlobal diff --git a/src/test_plugin.vcxproj b/src/test_plugin.vcxproj deleted file mode 100644 index 69136b2..0000000 --- a/src/test_plugin.vcxproj +++ /dev/null @@ -1,170 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {192D646D-748B-450B-AF3D-BF8EDD5FC897} - test_plugin - Win32Proj - 10.0 - WIFILED - - - - DynamicLibrary - v120_xp - Unicode - Static - - - DynamicLibrary - v142 - Unicode - Static - - - DynamicLibrary - v142 - Unicode - Static - - - DynamicLibrary - v142 - Unicode - Static - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>12.0.30501.0 - - - \projects\teamspeak\plugins\ - $(Configuration)\ - WIFILED - - - WIFILED - - - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - - - - Disabled - ..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;TEST_PLUGIN_EXPORTS;WINDOWS;WIN32_LEAN_AND_MEAN;NOFMOD;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - Level3 - ProgramDatabase - stdcpp14 - - - true - Windows - - MachineX86 - - - - - Disabled - ..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;TEST_PLUGIN_EXPORTS;WINDOWS;WIN32_LEAN_AND_MEAN;NOFMOD;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - stdcpp14 - - - true - Windows - - - - - - - WIN32;NDEBUG;_WINDOWS;_USRDLL;TEST_PLUGIN_EXPORTS;%(PreprocessorDefinitions) - MultiThreadedDLL - - Level3 - ProgramDatabase - ..\include;%(AdditionalIncludeDirectories) - - - Windows - - MachineX86 - - - - - WIN32;NDEBUG;_WINDOWS;_USRDLL;TEST_PLUGIN_EXPORTS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - ..\include;%(AdditionalIncludeDirectories) - stdcpp14 - - - Windows - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/test_plugin.vcxproj.filters b/src/test_plugin.vcxproj.filters deleted file mode 100644 index 79cc68b..0000000 --- a/src/test_plugin.vcxproj.filters +++ /dev/null @@ -1,53 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {424f4ce9-e47e-43e3-91bc-85bbfec2c680} - - - {d76dfa87-907d-4936-a5cf-59462dba95d7} - - - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files\teamspeak - - - Header Files\teamspeak - - - Header Files\teamspeak - - - Header Files\teamspeak - - - Header Files\teamspeak - - - Header Files\teamlog - - - Header Files - - - \ No newline at end of file