Update copyright year.
[umurmur.git] / src / client.h
index 608c87c036f81d453f133ace43342af1ef3c3c0f..5f8f2ef4873bdac82891835595b26e19a73113d3 100644 (file)
@@ -1,5 +1,5 @@
-/* Copyright (C) 2009-2011, Martin Johansson <martin@fatbob.nu>
-   Copyright (C) 2005-2011, Thorvald Natvig <thorvald@natvig.com>
+/* Copyright (C) 2009-2012, Martin Johansson <martin@fatbob.nu>
+   Copyright (C) 2005-2012, Thorvald Natvig <thorvald@natvig.com>
 
    All rights reserved.
 
@@ -53,6 +53,8 @@
 #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)
 
@@ -85,6 +87,10 @@ typedef struct {
        char *context;
        struct dlist chan_node;
        struct dlist voicetargets;
+       struct dlist tokens;
+       int tokencount;
+       uint8_t hash[20];
+       bool_t isAdmin;
        float UDPPingAvg, UDPPingVar, TCPPingAvg, TCPPingVar;
        uint32_t UDPPackets, TCPPackets;
 } client_t;
@@ -94,6 +100,11 @@ typedef struct {
        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();