summaryrefslogtreecommitdiff
path: root/src/include/gnunet_regex_service.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-05-31 14:06:52 +0000
committerChristian Grothoff <christian@grothoff.org>2013-05-31 14:06:52 +0000
commit8590cba90ab53a070d5ce3d8ec8f1a7f4fb4ee23 (patch)
treeeb71ea7a5072aef95bc83c9d3849d8c4a2e936a6 /src/include/gnunet_regex_service.h
parent254fd9d19ec754cd82e40338565790874fb82561 (diff)
downloadgnunet-8590cba90ab53a070d5ce3d8ec8f1a7f4fb4ee23.tar.gz
gnunet-8590cba90ab53a070d5ce3d8ec8f1a7f4fb4ee23.zip
-hacking up new regex client library
Diffstat (limited to 'src/include/gnunet_regex_service.h')
-rw-r--r--src/include/gnunet_regex_service.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/include/gnunet_regex_service.h b/src/include/gnunet_regex_service.h
index 57f98b19f..2a176f401 100644
--- a/src/include/gnunet_regex_service.h
+++ b/src/include/gnunet_regex_service.h
@@ -60,6 +60,7 @@ struct GNUNET_REGEX_Search;
60 * not free resources, must call GNUNET_REGEX_announce_cancel for 60 * not free resources, must call GNUNET_REGEX_announce_cancel for
61 * that. 61 * that.
62 * 62 *
63 * @param cfg configuration to use
63 * @param id ID to announce as provider of regex. Own ID in most cases. 64 * @param id ID to announce as provider of regex. Own ID in most cases.
64 * @param regex Regular expression to announce. 65 * @param regex Regular expression to announce.
65 * @param refresh_delay after what delay should the announcement be repeated? 66 * @param refresh_delay after what delay should the announcement be repeated?
@@ -68,7 +69,8 @@ struct GNUNET_REGEX_Search;
68 * Must be freed by calling GNUNET_REGEX_announce_cancel. 69 * Must be freed by calling GNUNET_REGEX_announce_cancel.
69 */ 70 */
70struct GNUNET_REGEX_Announcement * 71struct GNUNET_REGEX_Announcement *
71GNUNET_REGEX_announce (const struct GNUNET_PeerIdentity *id, 72GNUNET_REGEX_announce (const struct GNUNET_CONFIGURATION_Handle *cfg,
73 const struct GNUNET_PeerIdentity *id,
72 const char *regex, 74 const char *regex,
73 struct GNUNET_TIME_Relative refresh_delay, 75 struct GNUNET_TIME_Relative refresh_delay,
74 uint16_t compression); 76 uint16_t compression);
@@ -77,10 +79,10 @@ GNUNET_REGEX_announce (const struct GNUNET_PeerIdentity *id,
77/** 79/**
78 * Stop announcing the regex specified by the given handle. 80 * Stop announcing the regex specified by the given handle.
79 * 81 *
80 * @param h handle returned by a previous GNUNET_REGEX_announce call. 82 * @param a handle returned by a previous GNUNET_REGEX_announce call.
81 */ 83 */
82void 84void
83GNUNET_REGEX_announce_cancel (struct GNUNET_REGEX_Announcement *h); 85GNUNET_REGEX_announce_cancel (struct GNUNET_REGEX_Announcement *a);
84 86
85 87
86/** 88/**
@@ -106,6 +108,7 @@ typedef void (*GNUNET_REGEX_Found)(void *cls,
106 * The search runs until GNUNET_REGEX_search_cancel is called, even if results 108 * The search runs until GNUNET_REGEX_search_cancel is called, even if results
107 * are returned. 109 * are returned.
108 * 110 *
111 * @param cfg configuration to use
109 * @param string String to match against the regexes in the DHT. 112 * @param string String to match against the regexes in the DHT.
110 * @param callback Callback for found peers. 113 * @param callback Callback for found peers.
111 * @param callback_cls Closure for @c callback. 114 * @param callback_cls Closure for @c callback.
@@ -113,7 +116,8 @@ typedef void (*GNUNET_REGEX_Found)(void *cls,
113 * Must be freed by calling GNUNET_REGEX_search_cancel. 116 * Must be freed by calling GNUNET_REGEX_search_cancel.
114 */ 117 */
115struct GNUNET_REGEX_Search * 118struct GNUNET_REGEX_Search *
116GNUNET_REGEX_search (const char *string, 119GNUNET_REGEX_search (const struct GNUNET_CONFIGURATION_Handle *cfg,
120 const char *string,
117 GNUNET_REGEX_Found callback, 121 GNUNET_REGEX_Found callback,
118 void *callback_cls); 122 void *callback_cls);
119 123
@@ -124,7 +128,7 @@ GNUNET_REGEX_search (const char *string,
124 * @param h Handle returned by a previous GNUNET_REGEX_search call. 128 * @param h Handle returned by a previous GNUNET_REGEX_search call.
125 */ 129 */
126void 130void
127GNUNET_REGEX_search_cancel (struct GNUNET_REGEX_Search *h); 131GNUNET_REGEX_search_cancel (struct GNUNET_REGEX_Search *s);
128 132
129 133
130#if 0 /* keep Emacsens' auto-indent happy */ 134#if 0 /* keep Emacsens' auto-indent happy */