From d734cfd6677de174aa51a07437b0e0cae4c870be Mon Sep 17 00:00:00 2001 From: Gabor X Toth <*@tg-x.net> Date: Mon, 12 Aug 2013 17:45:22 +0000 Subject: psyc/social: transmit/announcement flags; multicast: re-added sig. purpose --- src/include/gnunet_multicast_service.h | 15 +++++++++++++++ src/include/gnunet_psyc_service.h | 29 ++++++++++++++++++++++------- src/include/gnunet_social_service.h | 20 +++++++++++++++++--- 3 files changed, 54 insertions(+), 10 deletions(-) diff --git a/src/include/gnunet_multicast_service.h b/src/include/gnunet_multicast_service.h index 418afd34b..b4f9bc099 100644 --- a/src/include/gnunet_multicast_service.h +++ b/src/include/gnunet_multicast_service.h @@ -170,6 +170,11 @@ struct GNUNET_MULTICAST_MessageHeader */ struct GNUNET_CRYPTO_EccSignature signature; + /** + * Purpose for the signature and size of the signed data. + */ + struct GNUNET_CRYPTO_EccSignaturePurpose purpose; + /** * Number of the message fragment, monotonically increasing. */ @@ -243,6 +248,11 @@ struct GNUNET_MULTICAST_RequestHeader */ struct GNUNET_CRYPTO_EccSignature signature; + /** + * Purpose for the signature and size of the signed data. + */ + struct GNUNET_CRYPTO_EccSignaturePurpose purpose; + /** * Number of the request fragment, monotonically increasing. */ @@ -291,6 +301,11 @@ struct GNUNET_MULTICAST_JoinRequest { */ struct GNUNET_CRYPTO_EccSignature signature; + /** + * Purpose for the signature and size of the signed data. + */ + struct GNUNET_CRYPTO_EccSignaturePurpose purpose; + /** * Public key of the target group. */ diff --git a/src/include/gnunet_psyc_service.h b/src/include/gnunet_psyc_service.h index 3c01ab480..ceb8290c2 100644 --- a/src/include/gnunet_psyc_service.h +++ b/src/include/gnunet_psyc_service.h @@ -287,6 +287,26 @@ typedef int void *data); + +/** + * Flags for transmitting messages to a channel by the master. + */ +enum GNUNET_PSYC_MasterTransmitFlags +{ + /** + * Whether this message should reset the channel state, + * i.e. remove all previously stored state variables. + */ + GNUNET_PSYC_MASTER_TRANSMIT_RESET_STATE = 1 << 0, + + /** + * Whether we need to increment the group generation counter after + * transmitting this message. + */ + GNUNET_PSYC_MASTER_TRANSMIT_INC_GROUP_GEN = 1 << 1, +}; + + /** * Handle for a pending PSYC transmission operation. */ @@ -302,11 +322,7 @@ struct GNUNET_PSYC_MasterTransmitHandle; * for the message, or NULL. * @param notify Function to call to obtain the arguments. * @param notify_cls Closure for @a notify. - * @param reset_state #GNUNET_YES if this message should reset the channel - * state, i.e. remove all previously stored state variables. - * #GNUNET_NO to keep the state as is. - * @param increment_group_generation #GNUNET_YES if we need to increment - * the group generation counter after transmitting this message. + * @param flags Flags for the message being transmitted. * @return Transmission handle, NULL on error (i.e. more than one request queued). */ struct GNUNET_PSYC_MasterTransmitHandle * @@ -315,8 +331,7 @@ GNUNET_PSYC_master_transmit (struct GNUNET_PSYC_Master *master, const struct GNUNET_ENV_Environment *env, GNUNET_PSYC_MasterReadyNotify notify, void *notify_cls, - int reset_state, - int increment_group_generation); + enum GNUNET_PSYC_TransmitFlags flags); /** diff --git a/src/include/gnunet_social_service.h b/src/include/gnunet_social_service.h index 079290a3a..8a7e1362d 100644 --- a/src/include/gnunet_social_service.h +++ b/src/include/gnunet_social_service.h @@ -331,6 +331,21 @@ GNUNET_SOCIAL_home_advertise (struct GNUNET_SOCIAL_Home *home, GNUNET_TIME_Relative expiration_time); +/** + * Flags for announcements in a home. + */ +enum GNUNET_PSYC_AnnouncementFlags +{ + /** + * Whether this announcement removes all objects from the home. + * + * New objects can be still added to the now empty home using the @e env + * parameter of the same announcement. + */ + GNUNET_SOCIAL_ANNOUNCEMENT_CLEAR_OBJECTS = 1 << 0, +}; + + /** * Handle for an announcement request. */ @@ -349,8 +364,7 @@ struct GNUNET_SOCIAL_Announcement; * objects of the home, or NULL. * @param notify Function to call to get the payload of the announcement. * @param notify_cls Closure for @a notify. - * @param clear_objects #GNUNET_YES to remove all objects from the home, #GNUNET_NO otherwise. - * New objects can be added to the now empty home using the @a env parameter. + * @param flags Flags for this announcement. * @return NULL on error (announcement already in progress?). */ struct GNUNET_SOCIAL_Announcement * @@ -359,7 +373,7 @@ GNUNET_SOCIAL_home_announce (struct GNUNET_SOCIAL_Home *home, const struct GNUNET_ENV_Environment *env, GNUNET_CONNECTION_TransmitReadyNotify notify, void *notify_cls, - int clear_objects); + GNUNET_SOCIAL_AnnouncementFlags flags); /** -- cgit v1.2.3