psyc/social: slave transmit & guest talk flags
authorGabor X Toth <*@tg-x.net>
Mon, 12 Aug 2013 21:04:24 +0000 (21:04 +0000)
committerGabor X Toth <*@tg-x.net>
Mon, 12 Aug 2013 21:04:24 +0000 (21:04 +0000)
src/include/gnunet_psyc_service.h
src/include/gnunet_social_service.h

index ceb8290c27f0d31d73f35df3bf48c91398562fb5..5f48f7f3422a760f6e99f01092a7a1c56727d3d3 100644 (file)
@@ -437,6 +437,11 @@ typedef int
                                  char *data);
 
 
+/**
+ * Flags for transmitting messages to the channel master by a slave.
+ */
+enum GNUNET_PSYC_SlaveTransmitFlags;
+
 /** 
  * Handle for a pending PSYC transmission operation.
  */
@@ -451,6 +456,7 @@ struct GNUNET_PSYC_SlaveTransmitHandle;
  * @param env Environment containing transient variables for the message, or NULL.
  * @param notify Function to call when we are allowed to transmit (to get data).
  * @param notify_cls Closure for @a notify.
+ * @param flags Flags for the message being transmitted.
  * @return Transmission handle, NULL on error (i.e. more than one request queued).
  */
 struct GNUNET_PSYC_SlaveTransmitHandle *
@@ -458,7 +464,8 @@ GNUNET_PSYC_slave_transmit (struct GNUNET_PSYC_Slave *slave,
                             const char *method_name,
                             const struct GNUNET_ENV_Environment *env,
                             GNUNET_PSYC_SlaveReadyNotify notify,
-                            void *notify_cls);
+                            void *notify_cls,
+                            enum GNUNET_PSYC_SlaveTransmitFlags flags);
 
 
 /** 
index 8a7e1362d1f418772206e2cd670e6353b7d8ae8e..4ac1965d61da237d30790bf4506c8ce0f3f15c07 100644 (file)
@@ -84,8 +84,8 @@ struct GNUNET_SOCIAL_Slicer;
  * @param message_id Unique message counter for this message
  *                   (unique only in combination with the given sender for
  *                    this channel).
- * @param header_length Number of modifiers in header.
- * @param header Modifiers present in the message. FIXME: use environment instead?
+ * @param modifier_count Number of elements in the @a modifiers array.
+ * @param modifiers Modifiers present in the message. FIXME: use environment instead?
  * @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 (might not be zero-terminated
@@ -95,8 +95,8 @@ struct GNUNET_SOCIAL_Slicer;
 typedef int (*GNUNET_SOCIAL_Method)(void *cls,
                                     const char *full_method_name,
                                     uint64_t message_id,
-                                    size_t header_length,
-                                    GNUNET_PSYC_Modifier *header,
+                                    size_t modifier_count,
+                                    GNUNET_PSYC_Modifier *modifiers,
                                     uint64_t data_offset,
                                     size_t data_size,
                                     const void *data,
@@ -187,15 +187,15 @@ GNUNET_SOCIAL_ego_destroy (struct GNUNET_SOCIAL_Ego *ego);
  *
  * @param cls Closure.
  * @param nym Handle for the user who wants to enter.
- * @param header_length Number of modifiers in header.
- * @param header Modifiers present in the message.
+ * @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).
  */
 typedef void (*GNUNET_SOCIAL_AnswerDoorCallback)(void *cls,
                                                  struct GNUNET_SOCIAL_Nym *nym,
-                                                 size_t header_length,
-                                                 GNUNET_PSYC_Modifier *header,
+                                                 size_t variable_count,
+                                                 GNUNET_PSYC_Modifier *variables,
                                                  size_t data_size,
                                                  const void *data);
 
@@ -208,13 +208,13 @@ typedef void (*GNUNET_SOCIAL_AnswerDoorCallback)(void *cls,
  *
  * @param cls Closure.
  * @param nym Handle for the user who left.
- * @param header_length Number of modifiers in header.
- * @param header Modifiers present in the message.
+ * @param variable_count Number of elements in the @a variables array.
+ * @param variables Variables present in the message.
  */
 typedef void (*GNUNET_SOCIAL_FarewellCallback)(void *cls,
                                                struct GNUNET_SOCIAL_Nym *nym,
-                                               size_t header_length,
-                                               GNUNET_PSYC_Modifier *header);
+                                               size_t variable_count,
+                                               GNUNET_PSYC_Modifier *variables);
 
 
 /** 
@@ -554,6 +554,12 @@ GNUNET_SOCIAL_place_look_at (struct GNUNET_SOCIAL_Place *place,
                              size_t *value_size);
 
 
+/**
+ * Flags for talking to the host of a place.
+ */
+enum GNUNET_SOCIAL_TalkFlags;
+
+
 /** 
  * A talk request.
  */
@@ -567,6 +573,7 @@ struct GNUNET_SOCIAL_TalkRequest;
  * @param env Environment containing variables for the message, or NULL.
  * @param notify Function to use to get the payload for the method.
  * @param notify_cls Closure for @a notify.
+ * @param flags Flags for the message being sent.
  * @return NULL if we are already trying to talk to the host,
  *         otherwise handle to cancel the request.
  */
@@ -575,7 +582,8 @@ GNUNET_SOCIAL_place_talk (struct GNUNET_SOCIAL_Place *place,
                           const char *method_name,
                           const struct GNUNET_ENV_Environment *env,
                           GNUNET_CONNECTION_TransmitReadyNotify notify,
-                          void *notify_cls);
+                          void *notify_cls,
+                          GNUNET_SOCIAL_TalkFlags flags);
 
 
 /**