gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r27951 - gnunet/src/include


From: gnunet
Subject: [GNUnet-SVN] r27951 - gnunet/src/include
Date: Fri, 12 Jul 2013 11:43:07 +0200

Author: tg
Date: 2013-07-12 11:43:07 +0200 (Fri, 12 Jul 2013)
New Revision: 27951

Modified:
   gnunet/src/include/gnunet_psyc_lib.h
   gnunet/src/include/gnunet_psyc_service.h
   gnunet/src/include/gnunet_social_service.h
Log:
PSYC/social: header for method callbacks

Modified: gnunet/src/include/gnunet_psyc_lib.h
===================================================================
--- gnunet/src/include/gnunet_psyc_lib.h        2013-07-12 09:15:23 UTC (rev 
27950)
+++ gnunet/src/include/gnunet_psyc_lib.h        2013-07-12 09:43:07 UTC (rev 
27951)
@@ -78,6 +78,32 @@
 };
 
 
+/**
+ * PSYC state modifier.
+ */
+struct GNUNET_PSYC_Modifier {
+  /**
+   * State operation.
+   */
+  GNUNET_PSYC_Operator oper;
+
+  /**
+   * Variable name.
+   */
+  const char *name;
+
+  /**
+   * Size of @a value.
+   */
+  size_t value_size;
+
+  /**
+   * Value of variable.
+   */
+  const void *value;
+};
+
+
 /** 
  * Get the type of variable.
  *

Modified: gnunet/src/include/gnunet_psyc_service.h
===================================================================
--- gnunet/src/include/gnunet_psyc_service.h    2013-07-12 09:15:23 UTC (rev 
27950)
+++ gnunet/src/include/gnunet_psyc_service.h    2013-07-12 09:43:07 UTC (rev 
27951)
@@ -155,6 +155,8 @@
  * @param method_name Original method name from PSYC (may be more
  *        specific than the registered method name due to try-and-slice 
matching).
  *        FIXME: no try-and-slice for methods defined here.
+ * @param header_length Number of modifiers in header.
+ * @param header Modifiers present in the message.
  * @param data_off 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 
@@ -178,6 +180,8 @@
  * @param cls Closure.
  * @param sender Who transmitted the message.
  * @param method_name Method name in the join request.
+ * @param header_length Number of modifiers in header.
+ * @param header Modifiers present in the message.
  * @param data_size Number of bytes in @a data.
  * @param data Data stream given to the method (might not be zero-terminated 
  *             if data is binary).
@@ -185,6 +189,8 @@
 typedef int (*GNUNET_PSYC_JoinCallback)(void *cls,
                                         const struct GNUNET_PeerIdentity 
*sender,
                                         const char *method_name,
+                                        size_t header_length,
+                                        GNUNET_PSYC_Modifier *header,
                                         size_t data_size,
                                         const void *data,
                                         struct GNUNET_PSYC_JoinHandle *jh);
@@ -196,6 +202,8 @@
  * @param cls Closure.
  * @param sender Who transmitted the message.
  * @param method_name Method name in the part request.
+ * @param header_length Number of modifiers in header.
+ * @param header Modifiers present in the message.
  * @param data_size Number of bytes in @a data.
  * @param data Data stream given to the method (might not be zero-terminated 
  *             if data is binary).
@@ -203,6 +211,8 @@
 typedef int (*GNUNET_PSYC_PartCallback)(void *cls,
                                         const struct GNUNET_PeerIdentity 
*sender,
                                         const char *method_name,
+                                        size_t header_length,
+                                        GNUNET_PSYC_Modifier *header,
                                         size_t data_size,
                                         const void *data,
                                         struct GNUNET_PSYC_PartHandle *ph);

Modified: gnunet/src/include/gnunet_social_service.h
===================================================================
--- gnunet/src/include/gnunet_social_service.h  2013-07-12 09:15:23 UTC (rev 
27950)
+++ gnunet/src/include/gnunet_social_service.h  2013-07-12 09:43:07 UTC (rev 
27951)
@@ -84,6 +84,8 @@
  * @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.
  * @param data_off 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 
@@ -93,6 +95,8 @@
 typedef int (*GNUNET_SOCIAL_Method)(void *cls,
                                    const char *full_method_name,
                                    uint64_t message_id,
+                                    size_t header_length,
+                                    GNUNET_PSYC_Modifier *header,
                                    uint64_t data_off,
                                    size_t data_size,
                                    const void *data,
@@ -172,11 +176,15 @@
  *
  * @param cls Closure.
  * @param nym Handle for the user who wants to join.
+ * @param header_length Number of modifiers in header.
+ * @param header Modifiers present in the message.
  * @param msg_size Number of bytes in @a msg.
  * @param msg 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 msg_size,
                                                 const void *msg);
 
@@ -189,9 +197,13 @@
  *
  * @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.
  */
 typedef void (*GNUNET_SOCIAL_FarewellCallback)(void *cls,
-                                              struct GNUNET_SOCIAL_Nym *nym);
+                                              struct GNUNET_SOCIAL_Nym *nym,
+                                               size_t header_length,
+                                               GNUNET_PSYC_Modifier *header);
 
 
 /** 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]