-/* Copyright (C) 2009-2010, Martin Johansson <martin@fatbob.nu>
- Copyright (C) 2005-2010, Thorvald Natvig <thorvald@natvig.com>
+/* Copyright (C) 2009-2011, Martin Johansson <martin@fatbob.nu>
+ Copyright (C) 2005-2011, Thorvald Natvig <thorvald@natvig.com>
All rights reserved.
#ifndef CLIENT_H_45786678
#define CLIENT_H_45786678
+#include <config.h>
#include <stdint.h>
#include <unistd.h> /* close() */
#include <sys/types.h>
#define UDP_BUFSIZE 512
#define INACTICITY_TIMEOUT 15 /* Seconds */
#define MAX_CODECS 10
+#define MAX_TOKENSIZE 64
+#define MAX_TOKENS 32
#define IS_AUTH(_a_) ((_a_)->authenticated)
char *context;
struct dlist chan_node;
struct dlist voicetargets;
+ struct dlist tokens;
+ int tokencount;
float UDPPingAvg, UDPPingVar, TCPPingAvg, TCPPingVar;
uint32_t UDPPackets, TCPPackets;
} client_t;
struct dlist node;
} codec_t;
+typedef struct {
+ char *token;
+ struct dlist node;
+} token_t;
+
void Client_init();
int Client_getfds(struct pollfd *pollfds);
void Client_janitor();