aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJacki <jacki@thejackimonster.de>2024-01-05 00:37:18 +0100
committerJacki <jacki@thejackimonster.de>2024-01-05 00:37:18 +0100
commit2825c2b3391e1f65d58b6754ea603b83fd6959f1 (patch)
tree6190b440d417e48ce8b495c12a62882f8d30d11c /include
parentc11052c64b020d3913014b6065c9b16a8cac4547 (diff)
downloadlibgnunetchat-2825c2b3391e1f65d58b6754ea603b83fd6959f1.tar.gz
libgnunetchat-2825c2b3391e1f65d58b6754ea603b83fd6959f1.zip
Implement functions to consume tickets from contacts
Signed-off-by: Jacki <jacki@thejackimonster.de>
Diffstat (limited to 'include')
-rw-r--r--include/gnunet/gnunet_chat_lib.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/include/gnunet/gnunet_chat_lib.h b/include/gnunet/gnunet_chat_lib.h
index 12bf244..0a2fd7c 100644
--- a/include/gnunet/gnunet_chat_lib.h
+++ b/include/gnunet/gnunet_chat_lib.h
@@ -338,6 +338,20 @@ typedef void
338 uint64_t size); 338 uint64_t size);
339 339
340/** 340/**
341 * Method called during a chat ticket consumption for each of its attributes.
342 *
343 * @param[in,out] cls Closure from #GNUNET_CHAT_ticket_consume
344 * @param[in] ticket Chat ticket
345 * @param[in] name Attribute name
346 * @param[in] value Attribute value
347 */
348typedef void
349(*GNUNET_CHAT_TicketAttributeCallback) (void *cls,
350 const struct GNUNET_CHAT_Ticket *ticket,
351 const char *name,
352 const char *value);
353
354/**
341 * Start a chat handle with a certain configuration. 355 * Start a chat handle with a certain configuration.
342 * 356 *
343 * A custom callback for warnings and message events can be provided optionally 357 * A custom callback for warnings and message events can be provided optionally
@@ -1312,6 +1326,27 @@ GNUNET_CHAT_invitation_accept (struct GNUNET_CHAT_Invitation *invitation);
1312enum GNUNET_GenericReturnValue 1326enum GNUNET_GenericReturnValue
1313GNUNET_CHAT_invitation_is_accepted (const struct GNUNET_CHAT_Invitation *invitation); 1327GNUNET_CHAT_invitation_is_accepted (const struct GNUNET_CHAT_Invitation *invitation);
1314 1328
1329/**
1330 * Returns the contact of the issuer from a given chat <i>ticket</i>.
1331 *
1332 * @param[in] invitation Chat invitation
1333 * @return Chat contact
1334 */
1335const struct GNUNET_CHAT_Contact*
1336GNUNET_CHAT_ticket_get_contact (const struct GNUNET_CHAT_Ticket *ticket);
1337
1338/**
1339 * Consumes a given chat <i>ticket</i>.
1340 *
1341 * @param[in,out] ticket Chat ticket
1342 * @param[in] callback Callback for ticket consumption (optional)
1343 * @param[in,out] cls Closure for ticket consumption (optional)
1344 */
1345void
1346GNUNET_CHAT_ticket_consume (struct GNUNET_CHAT_Ticket *ticket,
1347 GNUNET_CHAT_TicketAttributeCallback callback,
1348 void *cls);
1349
1315/**@}*/ 1350/**@}*/
1316 1351
1317#endif /* GNUNET_CHAT_LIB_H_ */ 1352#endif /* GNUNET_CHAT_LIB_H_ */