diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-06-30 19:21:05 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-06-30 19:21:05 +0000 |
commit | 17de5c9d798109f55059190c886609ba377e4eb6 (patch) | |
tree | 07f2b4241f433b18baf02d5bf189307ad2308166 /src/namestore/namestore_api_monitor.c | |
parent | fd87b25438487e1215c68bdb9f1bcac2d7012bc2 (diff) | |
download | gnunet-17de5c9d798109f55059190c886609ba377e4eb6.tar.gz gnunet-17de5c9d798109f55059190c886609ba377e4eb6.zip |
-towards implementing improved namestore API
Diffstat (limited to 'src/namestore/namestore_api_monitor.c')
-rw-r--r-- | src/namestore/namestore_api_monitor.c | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/src/namestore/namestore_api_monitor.c b/src/namestore/namestore_api_monitor.c new file mode 100644 index 000000000..4c242d17d --- /dev/null +++ b/src/namestore/namestore_api_monitor.c | |||
@@ -0,0 +1,79 @@ | |||
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 */ | ||