4c242d17d0a8f49417b6f3eaf913d073014d2e02
[oweals/gnunet.git] / src / namestore / namestore_api_monitor.c
1 /*
2      This file is part of GNUnet.
3      (C) 2013 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 namestore/namestore_api_monitor.c
23  * @brief API to monitor changes in the NAMESTORE
24  * @author Christian Grothoff
25  */
26
27 #include "platform.h"
28 #include "gnunet_util_lib.h"
29 #include "gnunet_crypto_lib.h"
30 #include "gnunet_constants.h"
31 #include "gnunet_dnsparser_lib.h"
32 #include "gnunet_arm_service.h"
33 #include "gnunet_signatures.h"
34 #include "gnunet_namestore_service.h"
35 #include "namestore.h"
36
37
38
39 /**
40  * Handle for a monitoring activity.
41  */
42 struct GNUNET_NAMESTORE_ZoneMonitor
43 {
44 };
45
46
47 /**
48  * Begin monitoring a zone for changes.  Will first call the 'monitor' function
49  * on all existing records in the selected zone(s) and then call it whenever
50  * a record changes.
51  *
52  * @param cfg configuration to use to connect to namestore
53  * @param zone zone to monitor, NULL for all zones
54  * @param monitor function to call on zone changes
55  * @param monitor_cls closure for 'monitor'
56  * @return handle to stop monitoring
57  */
58 struct GNUNET_NAMESTORE_ZoneMonitor *
59 GNUNET_NAMESTORE_zone_monitor_start (const struct GNUNET_CONFIGURATION_Handle *cfg,
60                                      const struct GNUNET_CRYPTO_ShortHashCode *zone,
61                                      GNUNET_NAMESTORE_RecordMonitor monitor,
62                                      void *monitor_cls)
63 {
64   GNUNET_break (0);
65   return NULL;
66 }
67
68
69 /**
70  * Stop monitoring a zone for changes.
71  *
72  * @param zm handle to the monitor activity to stop
73  */
74 void
75 GNUNET_NAMESTORE_zone_monitor_stop (struct GNUNET_NAMESTORE_ZoneMonitor *zm)
76 {
77 }
78
79 /* end of namestore_api_monitor.c */