[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r28543 - gnunet/src/include
From: |
gnunet |
Subject: |
[GNUnet-SVN] r28543 - gnunet/src/include |
Date: |
Mon, 12 Aug 2013 18:57:49 +0200 |
Author: tg
Date: 2013-08-12 18:57:49 +0200 (Mon, 12 Aug 2013)
New Revision: 28543
Modified:
gnunet/src/include/gnunet_multicast_service.h
gnunet/src/include/gnunet_psyc_service.h
gnunet/src/include/gnunet_psycstore_service.h
gnunet/src/include/gnunet_social_service.h
Log:
psyc/store: added effective_since msg ID for specifying when a membership
change went into effect; psyc/social: added state_reset/clear_objects flag for
message sending functions
Modified: gnunet/src/include/gnunet_multicast_service.h
===================================================================
--- gnunet/src/include/gnunet_multicast_service.h 2013-08-12 16:18:50 UTC
(rev 28542)
+++ gnunet/src/include/gnunet_multicast_service.h 2013-08-12 16:57:49 UTC
(rev 28543)
@@ -171,15 +171,6 @@
struct GNUNET_CRYPTO_EccSignature signature;
/**
- * Signature of the multicast message fragment.
- *
- * FIXME: not strictly necessary, the size is already in the MessageHeader
- * (minus the unsigned fields), and we could implicitly associate
- * a sig. purpose with the message type in the header.
- */
- struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
-
- /**
* Number of the message fragment, monotonically increasing.
*/
uint64_t fragment_id GNUNET_PACKED;
@@ -221,32 +212,17 @@
*/
enum GNUNET_MULTICAST_MessageFlags flags GNUNET_PACKED;
- /**
- * Header for the message body.
- *
- * Three message types are specifically understood by multicast, namely "peer
- * join", "peer part", and "group terminated". Multicast will use those
- * messages to update its list of candidates for content distribution. All
- * other message types are application-specific.
- *
- * FIXME: Needed? The payload could have its own message header already,
- * multicast does not actually need it.
- * Also, we have no message type argument for origin_to_all(),
- */
- struct GNUNET_MessageHeader body;
-
/* Followed by message body. */
};
GNUNET_NETWORK_STRUCT_END
-
GNUNET_NETWORK_STRUCT_BEGIN
/**
* Header of a request from a member to the origin.
*
- * FIXME: this is going to be internal.
+ * FIXME: this struct is going to be internal.
*/
struct GNUNET_MULTICAST_RequestHeader
{
@@ -297,6 +273,11 @@
GNUNET_NETWORK_STRUCT_BEGIN
+/**
+ * Header of a join request sent to the origin or another member.
+ *
+ * FIXME: this struct is going to be internal.
+ */
struct GNUNET_MULTICAST_JoinRequest {
/**
* Header for the join request.
Modified: gnunet/src/include/gnunet_psyc_service.h
===================================================================
--- gnunet/src/include/gnunet_psyc_service.h 2013-08-12 16:18:50 UTC (rev
28542)
+++ gnunet/src/include/gnunet_psyc_service.h 2013-08-12 16:57:49 UTC (rev
28543)
@@ -297,22 +297,26 @@
* Send a message to call a method to all members in the PSYC channel.
*
* @param master Handle to the PSYC channel.
- * @param increment_group_generation #GNUNET_YES if we need to increment
- * the group generation counter after transmitting this message.
* @param method_name Which method should be invoked.
* @param env Environment containing state operations and transient variables
* 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.
* @return Transmission handle, NULL on error (i.e. more than one request
queued).
*/
struct GNUNET_PSYC_MasterTransmitHandle *
GNUNET_PSYC_master_transmit (struct GNUNET_PSYC_Master *master,
- int increment_group_generation,
const char *method_name,
const struct GNUNET_ENV_Environment *env,
GNUNET_PSYC_MasterReadyNotify notify,
- void *notify_cls);
+ void *notify_cls,
+ int reset_state,
+ int increment_group_generation);
/**
@@ -495,12 +499,14 @@
*
* @param channel Channel handle.
* @param slave_key Identity of channel slave to add.
- * @param message_id Message ID for the message that changed the membership.
+ * @param announced_at ID of the message that announced the membership change.
+ * @param effective_since Addition of slave is in effect since this message ID.
*/
void
GNUNET_PSYC_channel_slave_add (struct GNUNET_PSYC_Channel *channel,
const struct GNUNET_CRYPTO_EccPublicKey
*slave_key,
- uint64_t message_id);
+ uint64_t announced_at,
+ uint64_t effective_since);
/**
@@ -522,12 +528,14 @@
*
* @param channel Channel handle.
* @param slave_key Identity of channel slave to remove.
- * @param message_id Message ID for the message that changed the membership.
+ * @param announced_at ID of the message that announced the membership change.
+ * @param effective_since Removal of slave is in effect since this message ID.
*/
void
GNUNET_PSYC_channel_slave_remove (struct GNUNET_PSYC_Channel *channel,
const struct GNUNET_CRYPTO_EccPublicKey
*slave_key,
- uint64_t message_id);
+ uint64_t announced_at,
+ uint64_t effective_since);
/**
Modified: gnunet/src/include/gnunet_psycstore_service.h
===================================================================
--- gnunet/src/include/gnunet_psycstore_service.h 2013-08-12 16:18:50 UTC
(rev 28542)
+++ gnunet/src/include/gnunet_psycstore_service.h 2013-08-12 16:57:49 UTC
(rev 28543)
@@ -92,8 +92,9 @@
* @param h Handle for the PSYCstore.
* @param channel_key The channel where the event happened.
* @param slave_key Public key of joining/leaving slave.
- * @param message_id ID of the message in which this event was announced.
- * @param did_join #GNUNET_YES on join, #GNUNET_NO on leave.
+ * @param announced_at ID of the message that announced the membership change.
+ * @param effective_since Message ID this membership change is in effect since.
+ * @param did_join #GNUNET_YES on join, #GNUNET_NO on part.
* @param rcb Callback to call with the result of the storage operation.
* @param rcb_cls Closure for the callback.
*
@@ -103,7 +104,8 @@
GNUNET_PSYCSTORE_membership_store (struct GNUNET_PSYCSTORE_Handle *h,
const struct GNUNET_CRYPTO_EccPublicKey
*channel_key,
const struct GNUNET_CRYPTO_EccPublicKey
*slave_key,
- uint64_t message_id,
+ uint64_t announced_at,
+ uint64_t effective_since,
int did_join,
GNUNET_PSYCSTORE_ResultCallback rcb,
void *rcb_cls);
Modified: gnunet/src/include/gnunet_social_service.h
===================================================================
--- gnunet/src/include/gnunet_social_service.h 2013-08-12 16:18:50 UTC (rev
28542)
+++ gnunet/src/include/gnunet_social_service.h 2013-08-12 16:57:49 UTC (rev
28543)
@@ -345,9 +345,12 @@
*
* @param home Home to address the announcement to.
* @param method_name Method to use for the announcement.
- * @param env Environment containing variables for the message, or NULL.
+ * @param env Environment containing variables for the message and operations
on
+ * 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.
* @return NULL on error (announcement already in progress?).
*/
struct GNUNET_SOCIAL_Announcement *
@@ -355,7 +358,8 @@
const char *method_name,
const struct GNUNET_ENV_Environment *env,
GNUNET_CONNECTION_TransmitReadyNotify notify,
- void *notify_cls);
+ void *notify_cls,
+ int clear_objects);
/**
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r28543 - gnunet/src/include,
gnunet <=