diff options
Diffstat (limited to 'src/gnunet_chat_lib_intern.c')
-rw-r--r-- | src/gnunet_chat_lib_intern.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/gnunet_chat_lib_intern.c b/src/gnunet_chat_lib_intern.c index 584ebab..a2db98a 100644 --- a/src/gnunet_chat_lib_intern.c +++ b/src/gnunet_chat_lib_intern.c | |||
@@ -117,6 +117,28 @@ it_context_iterate_messages (void *cls, | |||
117 | return it->cb(it->cls, it->context, message); | 117 | return it->cb(it->cls, it->context, message); |
118 | } | 118 | } |
119 | 119 | ||
120 | struct GNUNET_CHAT_ContextIterateFiles | ||
121 | { | ||
122 | struct GNUNET_CHAT_Context *context; | ||
123 | GNUNET_CHAT_ContextFileCallback cb; | ||
124 | void *cls; | ||
125 | }; | ||
126 | |||
127 | int | ||
128 | it_context_iterate_files (void *cls, | ||
129 | GNUNET_UNUSED const struct GNUNET_HashCode *key, | ||
130 | void *value) | ||
131 | { | ||
132 | struct GNUNET_CHAT_ContextIterateFiles *it = cls; | ||
133 | |||
134 | if (!(it->cb)) | ||
135 | return GNUNET_YES; | ||
136 | |||
137 | struct GNUNET_CHAT_File *file = value; | ||
138 | |||
139 | return it->cb(it->cls, it->context, file); | ||
140 | } | ||
141 | |||
120 | struct GNUNET_CHAT_MessageIterateReadReceipts | 142 | struct GNUNET_CHAT_MessageIterateReadReceipts |
121 | { | 143 | { |
122 | const struct GNUNET_CHAT_Message *message; | 144 | const struct GNUNET_CHAT_Message *message; |