fa60e4973ea31c7236333bf3b45ba5d435236977
[oweals/gnunet.git] / src / ats / gnunet-service-ats_performance.c
1 /*
2      This file is part of GNUnet.
3      (C) 2011 Christian Grothoff (and other contributing authors)
4
5      GNUnet is free software; you can redistribute it and/or modify
6      it under the terms of the GNU General Public License as published
7      by the Free Software Foundation; either version 3, or (at your
8      option) any later version.
9
10      GNUnet is distributed in the hope that it will be useful, but
11      WITHOUT ANY WARRANTY; without even the implied warranty of
12      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13      General Public License for more details.
14
15      You should have received a copy of the GNU General Public License
16      along with GNUnet; see the file COPYING.  If not, write to the
17      Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18      Boston, MA 02111-1307, USA.
19 */
20
21 /**
22  * @file ats/gnunet-service-ats_performance.c
23  * @brief ats service, interaction with 'performance' API
24  * @author Matthias Wachs
25  */
26 #include "platform.h"
27 #include "gnunet-service-ats_performance.h"
28 #include "ats.h"
29
30
31 struct PerformanceClient
32 {
33   struct PerformanceClient * next;
34
35   struct PerformanceClient * prev;
36
37   struct GNUNET_SERVER_Client *client;
38
39 };
40
41
42 /**
43  * Head of linked list of all clients to this service.
44  */
45 static struct PerformanceClient *pc_head;
46
47 /**
48  * Tail of linked list of all clients to this service.
49  */
50 static struct PerformanceClient *pc_tail;
51
52
53 void
54 GAS_add_performance_client (struct GNUNET_SERVER_Client *client)
55 {
56   struct PerformanceClient * pc;
57
58   pc = GNUNET_malloc (sizeof (struct PerformanceClient));
59   pc->client = client;
60   GNUNET_CONTAINER_DLL_insert(pc_head, pc_tail, pc);
61 }
62
63
64 void
65 GAS_remove_performance_client (struct GNUNET_SERVER_Client *client)
66 {
67 }
68
69
70 void
71 GAS_handle_reservation_request (void *cls, struct GNUNET_SERVER_Client *client,
72                       const struct GNUNET_MessageHeader *message)
73
74 {
75   // struct AddressUpdateMessage * msg = (struct AddressUpdateMessage *) message;
76   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received `%s' message\n", "RESERVATION_REQUEST");
77 }
78
79
80 void
81 GAS_handle_preference_change (void *cls, struct GNUNET_SERVER_Client *client,
82                       const struct GNUNET_MessageHeader *message)
83
84 {
85   // struct ChangePreferenceMessage * msg = (struct ChangePreferenceMessage *) message;
86   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received `%s' message\n", "PREFERENCE_CHANGE");
87 }
88
89
90 /* end of gnunet-service-ats_performance.c */