Added voice target (whisper) functionality.
[umurmur.git] / src / client.h
index b7460b635fd1d9227ee8a5fc018aa8340beea0c9..081c99e3a0020837617e0fbd128c2ba02c179da5 100644 (file)
 #include "messages.h"
 #include "crypt.h"
 #include "timer.h"
+#include "pds.h"
 
 #define BUFSIZE 2048
 #define UDP_BUFSIZE 512
 #define INACTICITY_TIMEOUT 15 /* Seconds */
+#define MAX_CODECS 10
 
 #define IS_AUTH(_a_) ((_a_)->authenticated)
 
@@ -67,9 +69,12 @@ typedef struct {
        uint32_t rxcount, msgsize, drainleft, txcount, txsize;
        int sessionId;
        uint64_t key;
-       char playerName[MAX_TEXT];
-       int playerId;
+       char *playerName;
        bool_t authenticated, deaf, mute;
+       char *os, *release;
+       uint32_t version;
+       int codec_count;
+       int32_t codecs[MAX_CODECS];
        int availableBandwidth;
        etimer_t lastActivity;
        struct dlist node;
@@ -78,6 +83,7 @@ typedef struct {
        /* Channel */
        void *channel; /*Ugly... */
        struct dlist chan_node;
+       struct dlist voicetargets;
 } client_t;
 
 
@@ -94,5 +100,7 @@ client_t *Client_iterate(client_t **client);
 int Client_send_message_except(client_t *client, message_t *msg);
 int Client_read_udp(void);
 void Client_disconnect_all();
+int Client_voiceMsg(client_t *client, uint8_t *data, int len);
+void recheckCodecVersions();
 
 #endif