2 This file is part of GNUnet.
3 Copyright (C) 2013 Christian Grothoff (and other contributing authors)
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.
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.
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., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
22 * @file include/gnunet_social_service.h
23 * @brief Social service; implements social interactions using the PSYC service.
24 * @author Gabor X Toth
25 * @author Christian Grothoff
27 #ifndef GNUNET_SOCIAL_SERVICE_H
28 #define GNUNET_SOCIAL_SERVICE_H
33 #if 0 /* keep Emacsens' auto-indent happy */
38 #include "gnunet_util_lib.h"
39 #include "gnunet_env_lib.h"
40 #include "gnunet_identity_service.h"
41 #include "gnunet_namestore_service.h"
42 #include "gnunet_psyc_service.h"
46 * Version number of GNUnet Social API.
48 #define GNUNET_SOCIAL_VERSION 0x00000000
52 * Handle for a pseudonym of another user in the network.
54 struct GNUNET_SOCIAL_Nym;
57 * Handle for a place where social interactions happen.
59 struct GNUNET_SOCIAL_Place;
62 * Host handle for a place that we entered.
64 struct GNUNET_SOCIAL_Host;
67 * Guest handle for place that we entered.
69 struct GNUNET_SOCIAL_Guest;
72 * Handle to an implementation of try-and-slice.
74 struct GNUNET_SOCIAL_Slicer;
78 * Function called upon receiving a message indicating a call to a @e method.
80 * This function is called one or more times for each message until all data
81 * fragments arrive from the network.
86 * Message part, as it arrived from the network.
88 * Message counter, monotonically increasing from 1.
90 * The sender of the message.
91 * Can be NULL if the message is not connected to a pseudonym.
93 * OR'ed GNUNET_PSYC_MessageFlags
95 * Original method name from PSYC.
96 * May be more specific than the registered method name due to
97 * try-and-slice matching.
100 (*GNUNET_SOCIAL_MethodCallback) (void *cls,
101 const struct GNUNET_PSYC_MessageMethod *msg,
104 const struct GNUNET_SOCIAL_Nym *nym,
105 const char *method_name);
109 * Function called upon receiving a modifier of a message.
114 * Message ID this data fragment belongs to.
116 * Message part, as it arrived from the network.
118 * Operation to perform.
119 * 0 in case of a modifier continuation.
121 * Name of the modifier.
122 * NULL in case of a modifier continuation.
124 * Value of the modifier.
129 (*GNUNET_SOCIAL_ModifierCallback) (void *cls,
130 const struct GNUNET_MessageHeader *msg,
132 enum GNUNET_ENV_Operator oper,
136 uint16_t full_value_size);
140 * Function called upon receiving a data fragment of a message.
145 * Message ID this data fragment belongs to.
147 * Message part, as it arrived from the network.
149 * Byte offset of @a data in the overall data of the method.
151 * Number of bytes in @a data.
153 * Data stream given to the method.
156 * #GNUNET_NO if there are further fragments,
157 * #GNUNET_YES if this is the last fragment,
158 * #GNUNET_SYSERR indicates the message was cancelled by the sender.
161 (*GNUNET_SOCIAL_DataCallback) (void *cls,
162 const struct GNUNET_MessageHeader *msg,
164 uint64_t data_offset,
175 * Message part, as it arrived from the network.
177 * Message ID this data fragment belongs to.
179 * #GNUNET_YES if the message was cancelled,
180 * #GNUNET_NO if the message is complete.
183 (*GNUNET_SOCIAL_EndOfMessageCallback) (void *cls,
184 const struct GNUNET_MessageHeader *msg,
190 * Create a try-and-slice instance.
192 * A slicer processes incoming messages and notifies callbacks about matching
193 * methods or modifiers encountered.
195 * @return A new try-and-slice construct.
197 struct GNUNET_SOCIAL_Slicer *
198 GNUNET_SOCIAL_slicer_create (void);
202 * Add a method to the try-and-slice instance.
204 * The callbacks are called for messages with a matching @a method_name prefix.
207 * The try-and-slice instance to extend.
209 * Name of the given method, use empty string to match all.
211 * Method handler invoked upon a matching message.
213 * Modifier handler, invoked after @a method_cb
214 * for each modifier in the message.
216 * Data handler, invoked after @a modifier_cb for each data fragment.
218 * Invoked upon reaching the end of a matching message.
220 * Closure for the callbacks.
223 GNUNET_SOCIAL_slicer_method_add (struct GNUNET_SOCIAL_Slicer *slicer,
224 const char *method_name,
225 GNUNET_SOCIAL_MethodCallback method_cb,
226 GNUNET_SOCIAL_ModifierCallback modifier_cb,
227 GNUNET_SOCIAL_DataCallback data_cb,
228 GNUNET_SOCIAL_EndOfMessageCallback eom_cb,
232 * Remove a registered method from the try-and-slice instance.
234 * Removes one matching handler registered with the given
235 * @a method_name and callbacks.
238 * The try-and-slice instance.
240 * Name of the method to remove.
248 * End of message handler.
250 * @return #GNUNET_OK if a method handler was removed,
251 * #GNUNET_NO if no handler matched the given method name and callbacks.
254 GNUNET_SOCIAL_slicer_method_remove (struct GNUNET_SOCIAL_Slicer *slicer,
255 const char *method_name,
256 GNUNET_SOCIAL_MethodCallback method_cb,
257 GNUNET_SOCIAL_ModifierCallback modifier_cb,
258 GNUNET_SOCIAL_DataCallback data_cb,
259 GNUNET_SOCIAL_EndOfMessageCallback eom_cb);
263 * Watch a place for changed objects.
266 * The try-and-slice instance.
267 * @param object_filter
268 * Object prefix to match.
270 * Function to call when encountering a state modifier.
272 * Closure for callback.
275 GNUNET_SOCIAL_slicer_modifier_add (struct GNUNET_SOCIAL_Slicer *slicer,
276 const char *object_filter,
277 GNUNET_SOCIAL_ModifierCallback modifier_cb,
282 * Remove a registered modifier from the try-and-slice instance.
284 * Removes one matching handler registered with the given
285 * @a object_filter and callback.
288 * The try-and-slice instance.
289 * @param object_filter
290 * Object prefix to match.
292 * Function to call when encountering a state modifier changes.
295 GNUNET_SOCIAL_slicer_modifier_remove (struct GNUNET_SOCIAL_Slicer *slicer,
296 const char *object_filter,
297 GNUNET_SOCIAL_ModifierCallback modifier_cb);
301 * Destroy a given try-and-slice instance.
307 GNUNET_SOCIAL_slicer_destroy (struct GNUNET_SOCIAL_Slicer *slicer);
311 * Function called asking for nym to be admitted to the place.
313 * Should call either GNUNET_SOCIAL_host_admit() or
314 * GNUNET_SOCIAL_host_reject_entry() (possibly asynchronously). If this host
315 * cannot decide, it is fine to call neither function, in which case hopefully
316 * some other host of the place exists that will make the decision. The @a nym
317 * reference remains valid until the #GNUNET_SOCIAL_FarewellCallback is invoked
320 * @param cls Closure.
321 * @param nym Handle for the user who wants to enter.
322 * @param method_name Method name in the entry request.
323 * @param variable_count Number of elements in the @a variables array.
324 * @param variables Variables present in the message.
325 * @param data_size Number of bytes in @a data.
326 * @param data Payload given on enter (e.g. a password).
329 (*GNUNET_SOCIAL_AnswerDoorCallback) (void *cls,
330 struct GNUNET_SOCIAL_Nym *nym,
331 const char *method_name,
332 struct GNUNET_ENV_Environment *env,
338 * Function called when a @a nym leaves the place.
340 * This is also called if the @a nym was never given permission to enter
341 * (i.e. the @a nym stopped asking to get in).
346 * Handle for the user who left.
349 (*GNUNET_SOCIAL_FarewellCallback) (void *cls,
350 const struct GNUNET_SOCIAL_Nym *nym,
351 struct GNUNET_ENV_Environment *env);
355 * Function called after the host entered the place.
360 * #GNUNET_OK on success, or
361 * #GNUNET_SYSERR on error.
362 * @param max_message_id
363 * Last message ID sent to the channel.
364 * Or 0 if no messages have been sent to the place yet.
367 (*GNUNET_SOCIAL_HostEnterCallback) (void *cls, int result,
368 uint64_t max_message_id);
372 * Enter a place as host.
374 * A place is created upon first entering, and it is active until permanently
375 * left using GNUNET_SOCIAL_host_leave().
378 * Configuration to contact the social service.
380 * Identity of the host.
382 * Private-public key pair of the place.
383 * NULL for ephemeral places.
385 * Policy specifying entry and history restrictions for the place.
387 * Slicer to handle incoming messages.
388 * @param answer_door_cb
389 * Function to handle new nyms that want to enter.
391 * Function to handle departing nyms.
393 * Closure for the callbacks.
395 * @return Handle for the host.
397 struct GNUNET_SOCIAL_Host *
398 GNUNET_SOCIAL_host_enter (const struct GNUNET_CONFIGURATION_Handle *cfg,
399 const struct GNUNET_IDENTITY_Ego *ego,
400 const struct GNUNET_CRYPTO_EddsaPrivateKey *place_key,
401 enum GNUNET_PSYC_Policy policy,
402 struct GNUNET_SOCIAL_Slicer *slicer,
403 GNUNET_SOCIAL_HostEnterCallback enter_cb,
404 GNUNET_SOCIAL_AnswerDoorCallback answer_door_cb,
405 GNUNET_SOCIAL_FarewellCallback farewell_cb,
410 * Decision whether to admit @a nym into the place or refuse entry.
415 * Handle for the entity that wanted to enter.
417 * #GNUNET_YES if @a nym is admitted,
418 * #GNUNET_NO if @a nym is refused entry,
419 * #GNUNET_SYSERR if we cannot answer the request.
421 * Method name for the rejection message.
423 * Environment containing variables for the message, or NULL.
425 * Data for the rejection message to send back.
427 * Number of bytes in @a data for method.
428 * @return #GNUNET_OK on success,
429 * #GNUNET_SYSERR if the message is too large.
432 GNUNET_SOCIAL_host_entry_decision (struct GNUNET_SOCIAL_Host *hst,
433 struct GNUNET_SOCIAL_Nym *nym,
435 const struct GNUNET_PSYC_Message *entry_resp);
439 * Throw @a nym out of the place.
441 * The @a nym reference will remain valid until the
442 * #GNUNET_SOCIAL_FarewellCallback is invoked,
443 * which should be very soon after this call.
448 * Handle for the entity to be ejected.
451 GNUNET_SOCIAL_host_eject (struct GNUNET_SOCIAL_Host *host,
452 const struct GNUNET_SOCIAL_Nym *nym);
456 * Get the public key of a @a nym.
458 * Suitable, for example, to be used with GNUNET_NAMESTORE_zone_to_name().
461 * Pseudonym to map to a cryptographic identifier.
463 * @return Public key of nym.
465 const struct GNUNET_CRYPTO_EcdsaPublicKey *
466 GNUNET_SOCIAL_nym_get_key (const struct GNUNET_SOCIAL_Nym *nym);
470 * Get the hash of the public key of a @a nym.
473 * Pseudonym to map to a cryptographic identifier.
475 * @return Hash of the public key of nym.
477 const struct GNUNET_HashCode *
478 GNUNET_SOCIAL_nym_get_key_hash (const struct GNUNET_SOCIAL_Nym *nym);
482 * Advertise the place in the GNS zone of the @e ego of the @a host.
487 * The name for the PLACE record to put in the zone.
489 * Number of elements in the @a peers array.
491 * List of peers to put in the PLACE record to advertise
492 * as entry points to the place in addition to the origin.
493 * @param expiration_time
494 * Expiration time of the record, use 0 to remove the record.
496 * Password used to encrypt the record.
497 * FIXME: not implemented yet.
499 * Function called with the result of the operation.
501 * Closure for @a result_cb
504 GNUNET_SOCIAL_host_advertise (struct GNUNET_SOCIAL_Host *host,
507 const struct GNUNET_PeerIdentity *peers,
508 struct GNUNET_TIME_Absolute expiration_time,
509 const char *password,
510 GNUNET_NAMESTORE_ContinuationWithStatus result_cb,
515 * Flags for announcements by a host.
517 enum GNUNET_SOCIAL_AnnounceFlags
519 GNUNET_SOCIAL_ANNOUNCE_NONE = 0,
522 * Whether this announcement removes all objects from the place.
524 * New objects can be still added to the now empty place using the @e env
525 * parameter of the same announcement.
527 GNUNET_SOCIAL_ANNOUNCE_CLEAR_OBJECTS = 1 << 0
532 * Handle for an announcement request.
534 struct GNUNET_SOCIAL_Announcement;
538 * Send a message to all nyms that are present in the place.
540 * This function is restricted to the host. Nyms can only send requests
541 * to the host who can decide to relay it to everyone in the place.
546 * Method to use for the announcement.
548 * Environment containing variables for the message and operations
549 * on objects of the place.
550 * Has to remain available until the first call to @a notify_data.
553 * Function to call to get the payload of the announcement.
554 * @param notify_data_cls
555 * Closure for @a notify.
557 * Flags for this announcement.
559 * @return NULL on error (another announcement already in progress?).
561 struct GNUNET_SOCIAL_Announcement *
562 GNUNET_SOCIAL_host_announce (struct GNUNET_SOCIAL_Host *host,
563 const char *method_name,
564 const struct GNUNET_ENV_Environment *env,
565 GNUNET_PSYC_TransmitNotifyData notify_data,
566 void *notify_data_cls,
567 enum GNUNET_SOCIAL_AnnounceFlags flags);
571 * Resume transmitting announcement.
574 * The announcement to resume.
577 GNUNET_SOCIAL_host_announce_resume (struct GNUNET_SOCIAL_Announcement *a);
581 * Cancel announcement.
584 * The announcement to cancel.
587 GNUNET_SOCIAL_host_announce_cancel (struct GNUNET_SOCIAL_Announcement *a);
591 * Obtain handle for a hosted place.
593 * The returned handle can be used to access the place API.
596 * Handle for the host.
598 * @return Handle for the hosted place, valid as long as @a host is valid.
600 struct GNUNET_SOCIAL_Place *
601 GNUNET_SOCIAL_host_get_place (struct GNUNET_SOCIAL_Host *host);
605 * Stop hosting a place.
607 * Invalidates host handle.
610 * Host leaving the place.
612 * Keep the place active after last host disconnected.
614 * Function called after the host left the place
615 * and disconnected from the social service.
617 * Closure for @a leave_cb.
620 GNUNET_SOCIAL_host_leave (struct GNUNET_SOCIAL_Host *host,
622 GNUNET_ContinuationCallback leave_cb,
627 * Function called after the guest entered the local copy of the place.
629 * History and object query functions can be used after this call,
630 * but new messages can't be sent or received.
635 * #GNUNET_OK on success, or
636 * #GNUNET_SYSERR on error, e.g. could not connect to the service, or
637 * could not resolve GNS name.
638 * @param max_message_id
639 * Last message ID sent to the place.
640 * Or 0 if no messages have been sent to the place yet.
643 (*GNUNET_SOCIAL_GuestEnterCallback) (void *cls, int result,
644 uint64_t max_message_id);
648 * Function called upon a guest receives a decision about entry to the place.
651 * Is the guest admitted to the place?
652 * #GNUNET_YES if admitted,
653 * #GNUNET_NO if refused entry
654 * #GNUNET_SYSERR if the request could not be answered.
656 * Method for the message sent along with the decision.
657 * NULL if no message was sent.
659 * Environment with variables for the message.
660 * NULL if there are no variables.
661 * It has to be freed using GNUNET_ENV_environment_destroy()
662 * when it is not needed anymore.
666 * Payload of the message.
669 (*GNUNET_SOCIAL_EntryDecisionCallback) (void *cls,
671 const struct GNUNET_PSYC_Message *entry_resp);
675 * Request entry to a place as a guest.
677 * @param cfg Configuration to contact the social service.
678 * @param ego Identity of the guest.
679 * @param crypto_address Public key of the place to enter.
680 * @param origin Peer identity of the origin of the underlying multicast group.
681 * @param relay_count Number of elements in the @a relays array.
682 * @param relays Relays for the underlying multicast group.
683 * @param method_name Method name for the message.
684 * @param env Environment containing variables for the message, or NULL.
685 * @param data Payload for the message to give to the enter callback.
686 * @param data_size Number of bytes in @a data.
687 * @param slicer Slicer to use for processing incoming requests from guests.
689 * @return NULL on errors, otherwise handle for the guest.
691 struct GNUNET_SOCIAL_Guest *
692 GNUNET_SOCIAL_guest_enter (const struct GNUNET_CONFIGURATION_Handle *cfg,
693 const struct GNUNET_IDENTITY_Ego *ego,
694 const struct GNUNET_CRYPTO_EddsaPublicKey *place_key,
695 const struct GNUNET_PeerIdentity *origin,
696 uint32_t relay_count,
697 const struct GNUNET_PeerIdentity *relays,
698 const struct GNUNET_PSYC_Message *entry_msg,
699 struct GNUNET_SOCIAL_Slicer *slicer,
700 GNUNET_SOCIAL_GuestEnterCallback local_enter_cb,
701 GNUNET_SOCIAL_EntryDecisionCallback entry_decision_cb,
706 * Request entry to a place by name as a guest.
709 * Configuration to contact the social service.
711 * Identity of the guest.
713 * GNS name of the place to enter. Either in the form of
714 * 'room.friend.gnu', or 'NYMPUBKEY.zkey'. This latter case refers to
715 * the 'PLACE' record of the empty label ("+") in the GNS zone with the
716 * nym's public key 'NYMPUBKEY', and can be used to request entry to a
717 * pseudonym's place directly.
719 * Password to decrypt the record, or NULL for cleartext records.
721 * Entry request message.
723 * Slicer to use for processing incoming requests from guests.
724 * @param local_enter_cb
725 * Called upon connection established to the social service.
726 * @param entry_decision_cb
727 * Called upon receiving entry decision.
729 * @return NULL on errors, otherwise handle for the guest.
731 struct GNUNET_SOCIAL_Guest *
732 GNUNET_SOCIAL_guest_enter_by_name (const struct GNUNET_CONFIGURATION_Handle *cfg,
733 const struct GNUNET_IDENTITY_Ego *ego,
734 const char *gns_name, const char *password,
735 const struct GNUNET_PSYC_Message *join_msg,
736 struct GNUNET_SOCIAL_Slicer *slicer,
737 GNUNET_SOCIAL_GuestEnterCallback local_enter_cb,
738 GNUNET_SOCIAL_EntryDecisionCallback entry_decision_cb,
743 * Flags for talking to the host of a place.
745 enum GNUNET_SOCIAL_TalkFlags
747 GNUNET_SOCIAL_TALK_NONE = 0
754 struct GNUNET_SOCIAL_TalkRequest;
758 * Talk to the host of the place.
761 * Place where we want to talk to the host.
763 * Method to invoke on the host.
765 * Environment containing variables for the message, or NULL.
767 * Function to use to get the payload for the method.
768 * @param notify_data_cls
769 * Closure for @a notify_data.
771 * Flags for the message being sent.
773 * @return NULL if we are already trying to talk to the host,
774 * otherwise handle to cancel the request.
776 struct GNUNET_SOCIAL_TalkRequest *
777 GNUNET_SOCIAL_guest_talk (struct GNUNET_SOCIAL_Guest *guest,
778 const char *method_name,
779 const struct GNUNET_ENV_Environment *env,
780 GNUNET_PSYC_TransmitNotifyData notify_data,
781 void *notify_data_cls,
782 enum GNUNET_SOCIAL_TalkFlags flags);
786 * Resume talking to the host of the place.
789 * Talk request to resume.
792 GNUNET_SOCIAL_guest_talk_resume (struct GNUNET_SOCIAL_TalkRequest *tr);
796 * Cancel talking to the host of the place.
799 * Talk request to cancel.
802 GNUNET_SOCIAL_guest_talk_cancel (struct GNUNET_SOCIAL_TalkRequest *tr);
806 * Leave a place temporarily or permanently.
808 * Notifies the owner of the place about leaving, and destroys the place handle.
813 * Keep place active after last application disconnected.
814 * #GNUNET_YES or #GNUNET_NO
816 * Optional environment for the leave message if @a keep_active
817 * is #GNUNET_NO. NULL if not needed.
819 * Called upon disconnecting from the social service.
822 GNUNET_SOCIAL_guest_leave (struct GNUNET_SOCIAL_Guest *gst,
824 struct GNUNET_ENV_Environment *env,
825 GNUNET_ContinuationCallback leave_cb,
830 * Obtain handle for a place entered as guest.
832 * The returned handle can be used to access the place API.
834 * @param guest Handle for the guest.
836 * @return Handle for the place, valid as long as @a guest is valid.
838 struct GNUNET_SOCIAL_Place *
839 GNUNET_SOCIAL_guest_get_place (struct GNUNET_SOCIAL_Guest *guest);
845 struct GNUNET_SOCIAL_HistoryRequest;
849 * Learn about the history of a place.
851 * Messages are returned through the @a slicer function
852 * and have the #GNUNET_PSYC_MESSAGE_HISTORIC flag set.
855 * Place we want to learn more about.
856 * @param start_message_id
857 * First historic message we are interested in.
858 * @param end_message_id
859 * Last historic message we are interested in (inclusive).
860 * @param method_prefix
861 * Only retrieve messages with this method prefix.
863 * OR'ed GNUNET_PSYC_HistoryReplayFlags
865 * Slicer to use for retrieved messages.
866 * Can be the same as the slicer of the place.
868 * Function called after all messages retrieved.
869 * NULL if not needed.
870 * @param cls Closure for @a result_cb.
872 struct GNUNET_SOCIAL_HistoryRequest *
873 GNUNET_SOCIAL_place_history_replay (struct GNUNET_SOCIAL_Place *plc,
874 uint64_t start_message_id,
875 uint64_t end_message_id,
876 const char *method_prefix,
878 struct GNUNET_SOCIAL_Slicer *slicer,
879 GNUNET_ResultCallback result_cb,
884 * Learn about the history of a place.
886 * Sends messages through the slicer function of the place where
887 * start_message_id <= message_id <= end_message_id.
888 * The messages will have the #GNUNET_PSYC_MESSAGE_HISTORIC flag set.
890 * To get the latest message, use 0 for both the start and end message ID.
893 * Place we want to learn more about.
894 * @param message_limit
895 * Maximum number of historic messages we are interested in.
897 * Function called after all messages retrieved.
898 * NULL if not needed.
899 * @param cls Closure for @a result_cb.
901 struct GNUNET_SOCIAL_HistoryRequest *
902 GNUNET_SOCIAL_place_history_replay_latest (struct GNUNET_SOCIAL_Place *plc,
903 uint64_t message_limit,
904 const char *method_prefix,
906 struct GNUNET_SOCIAL_Slicer *slicer,
907 GNUNET_ResultCallback result_cb,
911 * Cancel learning about the history of a place.
914 * History lesson to cancel.
917 GNUNET_SOCIAL_place_history_replay_cancel (struct GNUNET_SOCIAL_HistoryRequest *hist);
920 struct GNUNET_SOCIAL_LookHandle;
924 * Look at a particular object in the place.
926 * The best matching object is returned (its name might be less specific than
927 * what was requested).
930 * The place to look the object at.
932 * Full name of the object.
934 * Set to the size of the returned value.
936 * @return NULL if there is no such object at this place.
938 struct GNUNET_SOCIAL_LookHandle *
939 GNUNET_SOCIAL_place_look_at (struct GNUNET_SOCIAL_Place *plc,
940 const char *full_name,
941 GNUNET_PSYC_StateVarCallback var_cb,
942 GNUNET_ResultCallback result_cb,
946 * Look for objects in the place with a matching name prefix.
949 * The place to look its objects at.
951 * Look at objects with names beginning with this value.
953 * Function to call for each object found.
955 * Closure for callback function.
957 * @return Handle that can be used to stop looking at objects.
959 struct GNUNET_SOCIAL_LookHandle *
960 GNUNET_SOCIAL_place_look_for (struct GNUNET_SOCIAL_Place *plc,
961 const char *name_prefix,
962 GNUNET_PSYC_StateVarCallback var_cb,
963 GNUNET_ResultCallback result_cb,
968 * Stop looking at objects.
970 * @param lh Look handle to stop.
973 GNUNET_SOCIAL_place_look_cancel (struct GNUNET_SOCIAL_LookHandle *lh);
977 * Add public key to the GNS zone of the @e ego.
984 * The name for the PKEY record to put in the zone.
987 * @param expiration_time
988 * Expiration time of the record, use 0 to remove the record.
990 * Function called with the result of the operation.
992 * Closure for @a result_cb
995 GNUNET_SOCIAL_zone_add_pkey (const struct GNUNET_CONFIGURATION_Handle *cfg,
996 const struct GNUNET_IDENTITY_Ego *ego,
998 const struct GNUNET_CRYPTO_EcdsaPublicKey *pub_key,
999 struct GNUNET_TIME_Absolute expiration_time,
1000 GNUNET_NAMESTORE_ContinuationWithStatus result_cb,
1004 #if 0 /* keep Emacsens' auto-indent happy */
1011 /* ifndef GNUNET_SOCIAL_SERVICE_H */
1013 /* end of gnunet_social_service.h */