X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Finclude%2Fgnunet_social_service.h;h=7faa336d6a5a7109cd1d3d15a139a21c4583ae74;hb=634aea297cc983c3d70f65a004f698f215abe590;hp=4bdad68344b4afc90d818f9758fb33a5da4c262c;hpb=219e64fe613c47eab4c143791128c2b453be3bf8;p=oweals%2Fgnunet.git diff --git a/src/include/gnunet_social_service.h b/src/include/gnunet_social_service.h index 4bdad6834..7faa336d6 100644 --- a/src/include/gnunet_social_service.h +++ b/src/include/gnunet_social_service.h @@ -1,21 +1,21 @@ /* This file is part of GNUnet. - Copyright (C) 2013 Christian Grothoff (and other contributing authors) + Copyright (C) 2013 GNUnet e.V. - GNUnet is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3, or (at your - option) any later version. + GNUnet is free software: you can redistribute it and/or modify it + under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, + or (at your option) any later version. GNUnet is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . - You should have received a copy of the GNU General Public License - along with GNUnet; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. + SPDX-License-Identifier: AGPL3.0-or-later */ /** @@ -86,7 +86,7 @@ or process it using a message handler function. A client first establishes an _application connection_ to the service using GNUNET_SOCIAL_app_connect() providing its _application ID_, then receives the -public keys of subscribed places and available egos and in response. +public keys of subscribed places and available egos in response. ## Reconnecting to places @@ -110,28 +110,31 @@ GNUNET_SOCIAL_guest_disconnect(). To permanently leave a place, see GNUNET_SOCIAL_host_leave() and GNUNET_SOCIAL_guest_leave(). When leaving a place its network connections are closed and all applications are unsubscribed from the place. -# Methods +# Message methods -## _message +## _converse -A message sent to the place. +Human conversation in a private or public place. ### Environment -#### _id_reply_to -message ID this message is in reply to. +#### _id_reply +Message ID this message is in reply to. #### _id_thread +Thread ID, the first message ID in the thread. -thread ID, the first message ID in the thread. +#### _nym_author +Nym of the author. -#### _nym_author__ -nym of the author. +FIXME: Are nyms a different data type from egos and person entities? +Do they have a different format than any other entity address? +Questions and thoughts on how to fix this in "questions.org" #### _sig_author -signature of the message body and its variables by the author. +Signature of the message body and its variables by the author. -## Data +### Data Message body. @@ -149,16 +152,23 @@ e.g. files under a given size. ##### _gns_place GNS name of the place in a globally unique .zkey zone +FIXME: A custom _gns PSYC data type should be avoidable by parsing +and interpreting PSYC uniforms appropriately. +Thoughts on this in "questions.org" + #### Without GNS ##### _key_pub_place -public key of place +Public key of place + +FIXME: _key_pub can't be the data type for GNUnet-specific cryptographic +addressing. Questions and thoughts on how to fix this in "questions.org" ##### _peer_origin -peer ID of origin +Peer ID of origin ##### _list_peer_relays -list of peer IDs of relays +List of peer IDs of relays ## _notice_place_file @@ -169,36 +179,36 @@ Notification about a place hosting a file. The environment of _notice_place above, plus the following: #### _size_file -size of file +Size of file -#### _mime_file +#### _type_file MIME type of file #### _name_file -name of file +Name of file #### _description_file -description of file +Description of file ## _file Messages with a _file method contain a file, -which is saved to disk upon receipt at the following location: -$GNUNET_DATA_HOME/social/files// +which is saved to disk upon reception at the following location: +$GNUNET_DATA_HOME/social/files// ### Environment #### _size_file -size of file +Size of file -#### _mime_file +#### _type_file MIME type of file #### _name_file -name of file +Name of file #### _description_file -description +Description of file @{ */ @@ -217,7 +227,7 @@ extern "C" #include #include "gnunet_util_lib.h" -#include "gnunet_env_lib.h" +#include "gnunet_psyc_util_lib.h" #include "gnunet_identity_service.h" #include "gnunet_namestore_service.h" #include "gnunet_psyc_service.h" @@ -233,6 +243,12 @@ extern "C" */ #define GNUNET_SOCIAL_APP_MAX_ID_SIZE 256 +enum GNUNET_SOCIAL_MsgProcFlags { + GNUNET_SOCIAL_MSG_PROC_NONE = 0, + GNUNET_SOCIAL_MSG_PROC_RELAY = 1, + GNUNET_SOCIAL_MSG_PROC_SAVE= 2, +}; + /** * Handle for an application. */ @@ -263,14 +279,6 @@ struct GNUNET_SOCIAL_Host; */ struct GNUNET_SOCIAL_Guest; -/** - * Handle to an implementation of try-and-slice. - */ -struct GNUNET_SOCIAL_Slicer; - - - - /** * Handle that can be used to reconnect to a place as host. */ @@ -299,25 +307,39 @@ typedef void /** - * Entry status of a place. + * Entry status of a place per application. */ -enum GNUNET_SOCIAL_PlaceState +enum GNUNET_SOCIAL_AppPlaceState { /** - * Place was once entered but left since. + * The place was once entered by the ego, but left since. + * It's possible to establish a local connection to the place + * without re-entering to fetch history from the PSYCstore. + * @see enum GNUNET_PSYC_SlaveJoinFlags and GNUNET_SOCIAL_guest_enter() */ GNUNET_SOCIAL_PLACE_STATE_ARCHIVED = 0, + /** - * Place is entered but not subscribed. + * The place is entered by the ego, + * but this application is not subscribed to it. */ GNUNET_SOCIAL_PLACE_STATE_ENTERED = 1, + /** - * Place is entered and subscribed. + * The place is entered by the ego and + * and this application is subscribed to it. */ GNUNET_SOCIAL_PLACE_STATE_SUBSCRIBED = 2, }; +/** + * Called after receiving initial list of egos and places. + */ +typedef void +(*GNUNET_SOCIAL_AppConnectedCallback) (void *cls); + + /** * Notification about a home. * @@ -330,14 +352,14 @@ enum GNUNET_SOCIAL_PlaceState * @param place_pub_key * Public key of the place. * @param place_state - * @see enum GNUNET_SOCIAL_PlaceState + * @see enum GNUNET_SOCIAL_AppPlaceState */ typedef void (*GNUNET_SOCIAL_AppHostPlaceCallback) (void *cls, struct GNUNET_SOCIAL_HostConnection *hconn, struct GNUNET_SOCIAL_Ego *ego, const struct GNUNET_CRYPTO_EddsaPublicKey *place_pub_key, - enum GNUNET_SOCIAL_PlaceState place_state); + enum GNUNET_SOCIAL_AppPlaceState place_state); /** * Notification about a place. @@ -351,20 +373,20 @@ typedef void * @param place_pub_key * Public key of the place. * @param place_state - * @see enum GNUNET_SOCIAL_PlaceState + * @see enum GNUNET_SOCIAL_AppPlaceState */ typedef void (*GNUNET_SOCIAL_AppGuestPlaceCallback) (void *cls, struct GNUNET_SOCIAL_GuestConnection *gconn, struct GNUNET_SOCIAL_Ego *ego, const struct GNUNET_CRYPTO_EddsaPublicKey *place_pub_key, - enum GNUNET_SOCIAL_PlaceState place_state); + enum GNUNET_SOCIAL_AppPlaceState place_state); /** * Establish application connection to the social service. * - * The @host_place_cb and @guest_place_cb functions are + * The @host_cb and @guest_cb functions are * initially called for each entered places, * then later each time a new place is entered with the current app ID. * @@ -387,17 +409,24 @@ GNUNET_SOCIAL_app_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, GNUNET_SOCIAL_AppEgoCallback ego_cb, GNUNET_SOCIAL_AppHostPlaceCallback host_cb, GNUNET_SOCIAL_AppGuestPlaceCallback guest_cb, + GNUNET_SOCIAL_AppConnectedCallback connected_cb, void *cls); /** * Disconnect app. * - * @param c - * App handle. + * @param app + * Application handle. + * @param disconnect_cb + * Disconnect callback. + * @param disconnect_cls + * Disconnect closure. */ void -GNUNET_SOCIAL_app_disconnect (struct GNUNET_SOCIAL_App *app); +GNUNET_SOCIAL_app_disconnect (struct GNUNET_SOCIAL_App *app, + GNUNET_ContinuationCallback disconnect_cb, + void *disconnect_cls); /** @@ -450,239 +479,6 @@ const struct GNUNET_HashCode * GNUNET_SOCIAL_nym_get_pub_key_hash (const struct GNUNET_SOCIAL_Nym *nym); -/** - * Function called upon receiving a message indicating a call to a @e method. - * - * This function is called one or more times for each message until all data - * fragments arrive from the network. - * - * @param cls - * Closure. - * @param msg - * Message part, as it arrived from the network. - * @param message_id - * Message counter, monotonically increasing from 1. - * @param nym - * The sender of the message. - * Can be NULL if the message is not connected to a pseudonym. - * @param flags - * OR'ed GNUNET_PSYC_MessageFlags - * @param method_name - * Original method name from PSYC. - * May be more specific than the registered method name due to - * try-and-slice matching. - */ -typedef void -(*GNUNET_SOCIAL_MethodCallback) (void *cls, - const struct GNUNET_PSYC_MessageMethod *msg, - uint64_t message_id, - uint32_t flags, - const struct GNUNET_SOCIAL_Nym *nym, - const char *method_name); - - -/** - * Function called upon receiving a modifier of a message. - * - * @param cls - * Closure. - * @param message_id - * Message ID this data fragment belongs to. - * @param msg - * Message part, as it arrived from the network. - * @param oper - * Operation to perform. - * 0 in case of a modifier continuation. - * @param name - * Name of the modifier. - * NULL in case of a modifier continuation. - * @param value - * Value of the modifier. - * @param value_size - * Size of @value. - */ -typedef void -(*GNUNET_SOCIAL_ModifierCallback) (void *cls, - const struct GNUNET_MessageHeader *msg, - uint64_t message_id, - enum GNUNET_ENV_Operator oper, - const char *name, - const void *value, - uint16_t value_size, - uint16_t full_value_size); - - -/** - * Function called upon receiving a data fragment of a message. - * - * @param cls - * Closure. - * @param message_id - * Message ID this data fragment belongs to. - * @param msg - * Message part, as it arrived from the network. - * @param data_offset - * Byte offset of @a data in the overall data of the method. - * @param data_size - * Number of bytes in @a data. - * @param data - * Data stream given to the method. - * @param end - * End of message? - * #GNUNET_NO if there are further fragments, - * #GNUNET_YES if this is the last fragment, - * #GNUNET_SYSERR indicates the message was cancelled by the sender. - */ -typedef void -(*GNUNET_SOCIAL_DataCallback) (void *cls, - const struct GNUNET_MessageHeader *msg, - uint64_t message_id, - uint64_t data_offset, - const void *data, - uint16_t data_size); - - -/** - * End of message. - * - * @param cls - * Closure. - * @param msg - * Message part, as it arrived from the network. - * @param message_id - * Message ID this data fragment belongs to. - * @param cancelled - * #GNUNET_YES if the message was cancelled, - * #GNUNET_NO if the message is complete. - */ -typedef void -(*GNUNET_SOCIAL_EndOfMessageCallback) (void *cls, - const struct GNUNET_MessageHeader *msg, - uint64_t message_id, - uint8_t cancelled); - - -/** - * Create a try-and-slice instance. - * - * A slicer processes incoming messages and notifies callbacks about matching - * methods or modifiers encountered. - * - * @return A new try-and-slice construct. - */ -struct GNUNET_SOCIAL_Slicer * -GNUNET_SOCIAL_slicer_create (void); - - -/** - * Add a method to the try-and-slice instance. - * - * The callbacks are called for messages with a matching @a method_name prefix. - * - * @param slicer - * The try-and-slice instance to extend. - * @param method_name - * Name of the given method, use empty string to match all. - * @param method_cb - * Method handler invoked upon a matching message. - * @param modifier_cb - * Modifier handler, invoked after @a method_cb - * for each modifier in the message. - * @param data_cb - * Data handler, invoked after @a modifier_cb for each data fragment. - * @param eom_cb - * Invoked upon reaching the end of a matching message. - * @param cls - * Closure for the callbacks. - */ -void -GNUNET_SOCIAL_slicer_method_add (struct GNUNET_SOCIAL_Slicer *slicer, - const char *method_name, - GNUNET_SOCIAL_MethodCallback method_cb, - GNUNET_SOCIAL_ModifierCallback modifier_cb, - GNUNET_SOCIAL_DataCallback data_cb, - GNUNET_SOCIAL_EndOfMessageCallback eom_cb, - void *cls); - -/** - * Remove a registered method from the try-and-slice instance. - * - * Removes one matching handler registered with the given - * @a method_name and callbacks. - * - * @param slicer - * The try-and-slice instance. - * @param method_name - * Name of the method to remove. - * @param method_cb - * Method handler. - * @param modifier_cb - * Modifier handler. - * @param data_cb - * Data handler. - * @param eom_cb - * End of message handler. - * - * @return #GNUNET_OK if a method handler was removed, - * #GNUNET_NO if no handler matched the given method name and callbacks. - */ -int -GNUNET_SOCIAL_slicer_method_remove (struct GNUNET_SOCIAL_Slicer *slicer, - const char *method_name, - GNUNET_SOCIAL_MethodCallback method_cb, - GNUNET_SOCIAL_ModifierCallback modifier_cb, - GNUNET_SOCIAL_DataCallback data_cb, - GNUNET_SOCIAL_EndOfMessageCallback eom_cb); - - -/** - * Watch a place for changed objects. - * - * @param slicer - * The try-and-slice instance. - * @param object_filter - * Object prefix to match. - * @param modifier_cb - * Function to call when encountering a state modifier. - * @param cls - * Closure for callback. - */ -void -GNUNET_SOCIAL_slicer_modifier_add (struct GNUNET_SOCIAL_Slicer *slicer, - const char *object_filter, - GNUNET_SOCIAL_ModifierCallback modifier_cb, - void *cls); - - -/** - * Remove a registered modifier from the try-and-slice instance. - * - * Removes one matching handler registered with the given - * @a object_filter and callback. - * - * @param slicer - * The try-and-slice instance. - * @param object_filter - * Object prefix to match. - * @param modifier_cb - * Function to call when encountering a state modifier changes. - */ -int -GNUNET_SOCIAL_slicer_modifier_remove (struct GNUNET_SOCIAL_Slicer *slicer, - const char *object_filter, - GNUNET_SOCIAL_ModifierCallback modifier_cb); - - -/** - * Destroy a given try-and-slice instance. - * - * @param slicer - * Slicer to destroy - */ -void -GNUNET_SOCIAL_slicer_destroy (struct GNUNET_SOCIAL_Slicer *slicer); - - /** * Function called asking for nym to be admitted to the place. * @@ -693,21 +489,28 @@ GNUNET_SOCIAL_slicer_destroy (struct GNUNET_SOCIAL_Slicer *slicer); * reference remains valid until the #GNUNET_SOCIAL_FarewellCallback is invoked * for it. * - * @param cls Closure. - * @param nym Handle for the user who wants to enter. - * @param method_name Method name in the entry request. - * @param variable_count Number of elements in the @a variables array. - * @param variables Variables present in the message. - * @param data_size Number of bytes in @a data. - * @param data Payload given on enter (e.g. a password). + * @param cls + * Closure. + * @param nym + * Handle for the user who wants to enter. + * @param method_name + * Method name in the entry request. + * @param variable_count + * Number of elements in the @a variables array. + * @param variables + * Variables present in the message. + * @param data + * Payload given on enter (e.g. a password). + * @param data_size + * Number of bytes in @a data. */ typedef void (*GNUNET_SOCIAL_AnswerDoorCallback) (void *cls, struct GNUNET_SOCIAL_Nym *nym, const char *method_name, - struct GNUNET_ENV_Environment *env, - size_t data_size, - const void *data); + struct GNUNET_PSYC_Environment *env, + const void *data, + size_t data_size); /** @@ -724,7 +527,7 @@ typedef void typedef void (*GNUNET_SOCIAL_FarewellCallback) (void *cls, const struct GNUNET_SOCIAL_Nym *nym, - struct GNUNET_ENV_Environment *env); + struct GNUNET_PSYC_Environment *env); /** @@ -779,7 +582,7 @@ struct GNUNET_SOCIAL_Host * GNUNET_SOCIAL_host_enter (const struct GNUNET_SOCIAL_App *app, const struct GNUNET_SOCIAL_Ego *ego, enum GNUNET_PSYC_Policy policy, - struct GNUNET_SOCIAL_Slicer *slicer, + struct GNUNET_PSYC_Slicer *slicer, GNUNET_SOCIAL_HostEnterCallback enter_cb, GNUNET_SOCIAL_AnswerDoorCallback answer_door_cb, GNUNET_SOCIAL_FarewellCallback farewell_cb, @@ -807,7 +610,7 @@ GNUNET_SOCIAL_host_enter (const struct GNUNET_SOCIAL_App *app, */ struct GNUNET_SOCIAL_Host * GNUNET_SOCIAL_host_enter_reconnect (struct GNUNET_SOCIAL_HostConnection *hconn, - struct GNUNET_SOCIAL_Slicer *slicer, + struct GNUNET_PSYC_Slicer *slicer, GNUNET_SOCIAL_HostEnterCallback enter_cb, GNUNET_SOCIAL_AnswerDoorCallback answer_door_cb, GNUNET_SOCIAL_FarewellCallback farewell_cb, @@ -825,14 +628,8 @@ GNUNET_SOCIAL_host_enter_reconnect (struct GNUNET_SOCIAL_HostConnection *hconn, * #GNUNET_YES if @a nym is admitted, * #GNUNET_NO if @a nym is refused entry, * #GNUNET_SYSERR if we cannot answer the request. - * @param method_name - * Method name for the rejection message. - * @param env - * Environment containing variables for the message, or NULL. - * @param data - * Data for the rejection message to send back. - * @param data_size - * Number of bytes in @a data for method. + * @param entry_resp + * Entry response message, or NULL. * @return #GNUNET_OK on success, * #GNUNET_SYSERR if the message is too large. */ @@ -863,7 +660,7 @@ GNUNET_SOCIAL_host_entry_decision (struct GNUNET_SOCIAL_Host *hst, void GNUNET_SOCIAL_host_eject (struct GNUNET_SOCIAL_Host *host, const struct GNUNET_SOCIAL_Nym *nym, - struct GNUNET_ENV_Environment *env); + struct GNUNET_PSYC_Environment *env); /** @@ -916,7 +713,7 @@ struct GNUNET_SOCIAL_Announcement; struct GNUNET_SOCIAL_Announcement * GNUNET_SOCIAL_host_announce (struct GNUNET_SOCIAL_Host *host, const char *method_name, - const struct GNUNET_ENV_Environment *env, + const struct GNUNET_PSYC_Environment *env, GNUNET_PSYC_TransmitNotifyData notify_data, void *notify_data_cls, enum GNUNET_SOCIAL_AnnounceFlags flags); @@ -1018,7 +815,7 @@ GNUNET_SOCIAL_host_disconnect (struct GNUNET_SOCIAL_Host *hst, /** * Stop hosting a home. * - * Sends a _notice_place_closed announcement to the home. + * Sends a _notice_place_closing announcement to the home. * Invalidates host handle. * * @param hst @@ -1033,7 +830,7 @@ GNUNET_SOCIAL_host_disconnect (struct GNUNET_SOCIAL_Host *hst, */ void GNUNET_SOCIAL_host_leave (struct GNUNET_SOCIAL_Host *hst, - const struct GNUNET_ENV_Environment *env, + const struct GNUNET_PSYC_Environment *env, GNUNET_ContinuationCallback disconnect_cb, void *cls); @@ -1050,12 +847,15 @@ GNUNET_SOCIAL_host_leave (struct GNUNET_SOCIAL_Host *hst, * #GNUNET_OK on success, or * #GNUNET_SYSERR on error, e.g. could not connect to the service, or * could not resolve GNS name. + * @param place_pub_key + * Public key of place. * @param max_message_id * Last message ID sent to the place. * Or 0 if no messages have been sent to the place yet. */ typedef void (*GNUNET_SOCIAL_GuestEnterCallback) (void *cls, int result, + const struct GNUNET_CRYPTO_EddsaPublicKey *place_pub_key, uint64_t max_message_id); @@ -1063,22 +863,12 @@ typedef void * Function called upon a guest receives a decision about entry to the place. * * @param is_admitted - * Is the guest admitted to the place? - * #GNUNET_YES if admitted, - * #GNUNET_NO if refused entry - * #GNUNET_SYSERR if the request could not be answered. - * @param method_name - * Method for the message sent along with the decision. - * NULL if no message was sent. - * @param env - * Environment with variables for the message. - * NULL if there are no variables. - * It has to be freed using GNUNET_ENV_environment_destroy() - * when it is not needed anymore. - * @param data_size - * Size of @data. + * Is the guest admitted to the place? + * #GNUNET_YES if admitted, + * #GNUNET_NO if refused entry, + * #GNUNET_SYSERR if the request could not be answered. * @param data - * Payload of the message. + * Entry response message. */ typedef void (*GNUNET_SOCIAL_EntryDecisionCallback) (void *cls, @@ -1103,14 +893,8 @@ typedef void * Number of elements in the @a relays array. * @param relays * Relays for the underlying multicast group. - * @param method_name - * Method name for the message. - * @param env - * Environment containing variables for the message, or NULL. - * @param data - * Payload for the message to give to the enter callback. - * @param data_size - * Number of bytes in @a data. + * @param entry_msg + * Entry message. * @param slicer * Slicer to use for processing incoming requests from guests. * @@ -1125,7 +909,7 @@ GNUNET_SOCIAL_guest_enter (const struct GNUNET_SOCIAL_App *app, uint32_t relay_count, const struct GNUNET_PeerIdentity *relays, const struct GNUNET_PSYC_Message *entry_msg, - struct GNUNET_SOCIAL_Slicer *slicer, + struct GNUNET_PSYC_Slicer *slicer, GNUNET_SOCIAL_GuestEnterCallback local_enter_cb, GNUNET_SOCIAL_EntryDecisionCallback entry_dcsn_cb, void *cls); @@ -1163,7 +947,7 @@ GNUNET_SOCIAL_guest_enter_by_name (const struct GNUNET_SOCIAL_App *app, const char *gns_name, const char *password, const struct GNUNET_PSYC_Message *join_msg, - struct GNUNET_SOCIAL_Slicer *slicer, + struct GNUNET_PSYC_Slicer *slicer, GNUNET_SOCIAL_GuestEnterCallback local_enter_cb, GNUNET_SOCIAL_EntryDecisionCallback entry_decision_cb, void *cls); @@ -1189,7 +973,7 @@ GNUNET_SOCIAL_guest_enter_by_name (const struct GNUNET_SOCIAL_App *app, struct GNUNET_SOCIAL_Guest * GNUNET_SOCIAL_guest_enter_reconnect (struct GNUNET_SOCIAL_GuestConnection *gconn, enum GNUNET_PSYC_SlaveJoinFlags flags, - struct GNUNET_SOCIAL_Slicer *slicer, + struct GNUNET_PSYC_Slicer *slicer, GNUNET_SOCIAL_GuestEnterCallback local_enter_cb, void *cls); @@ -1231,7 +1015,7 @@ struct GNUNET_SOCIAL_TalkRequest; struct GNUNET_SOCIAL_TalkRequest * GNUNET_SOCIAL_guest_talk (struct GNUNET_SOCIAL_Guest *guest, const char *method_name, - const struct GNUNET_ENV_Environment *env, + const struct GNUNET_PSYC_Environment *env, GNUNET_PSYC_TransmitNotifyData notify_data, void *notify_data_cls, enum GNUNET_SOCIAL_TalkFlags flags); @@ -1290,7 +1074,7 @@ GNUNET_SOCIAL_guest_disconnect (struct GNUNET_SOCIAL_Guest *gst, */ void GNUNET_SOCIAL_guest_leave (struct GNUNET_SOCIAL_Guest *gst, - struct GNUNET_ENV_Environment *env, + struct GNUNET_PSYC_Environment *env, GNUNET_ContinuationCallback disconnect_cb, void *leave_cls); @@ -1314,6 +1098,40 @@ GNUNET_SOCIAL_guest_get_place (struct GNUNET_SOCIAL_Guest *guest); struct GNUNET_SOCIAL_HistoryRequest; +/** + * Get the public key of a place. + * + * @param plc + * Place. + * + * @return Public key of the place. + */ +const struct GNUNET_CRYPTO_EddsaPublicKey * +GNUNET_SOCIAL_place_get_pub_key (const struct GNUNET_SOCIAL_Place *plc); + + +/** + * Set message processing @a flags for a @a method_prefix. + * + * @param plc + * Place. + * @param method_prefix + * Method prefix @a flags apply to. + * @param flags + * The flags that apply to a matching @a method_prefix. + */ +void +GNUNET_SOCIAL_place_msg_proc_set (struct GNUNET_SOCIAL_Place *plc, + const char *method_prefix, + enum GNUNET_SOCIAL_MsgProcFlags flags); + +/** + * Clear all message processing flags previously set for this place. + */ +void +GNUNET_SOCIAL_place_msg_proc_clear (struct GNUNET_SOCIAL_Place *plc); + + /** * Learn about the history of a place. * @@ -1344,7 +1162,7 @@ GNUNET_SOCIAL_place_history_replay (struct GNUNET_SOCIAL_Place *plc, uint64_t end_message_id, const char *method_prefix, uint32_t flags, - struct GNUNET_SOCIAL_Slicer *slicer, + struct GNUNET_PSYC_Slicer *slicer, GNUNET_ResultCallback result_cb, void *cls); @@ -1372,7 +1190,7 @@ GNUNET_SOCIAL_place_history_replay_latest (struct GNUNET_SOCIAL_Place *plc, uint64_t message_limit, const char *method_prefix, uint32_t flags, - struct GNUNET_SOCIAL_Slicer *slicer, + struct GNUNET_PSYC_Slicer *slicer, GNUNET_ResultCallback result_cb, void *cls); @@ -1399,8 +1217,6 @@ struct GNUNET_SOCIAL_LookHandle; * The place to look the object at. * @param full_name * Full name of the object. - * @param value_size - * Set to the size of the returned value. * * @return NULL if there is no such object at this place. */ @@ -1525,4 +1341,4 @@ GNUNET_SOCIAL_zone_add_nym (const struct GNUNET_SOCIAL_App *app, /* ifndef GNUNET_SOCIAL_SERVICE_H */ #endif -/** @} */ /* end of group social */ +/** @} */ /* end of group */