gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r36876 - in gnunet/src: include social


From: gnunet
Subject: [GNUnet-SVN] r36876 - in gnunet/src: include social
Date: Wed, 27 Jan 2016 21:45:38 +0100

Author: tg
Date: 2016-01-27 21:45:38 +0100 (Wed, 27 Jan 2016)
New Revision: 36876

Modified:
   gnunet/src/include/gnunet_social_service.h
   gnunet/src/social/social_api.c
   gnunet/src/social/test_social.c
Log:
social api: some missing bits

Modified: gnunet/src/include/gnunet_social_service.h
===================================================================
--- gnunet/src/include/gnunet_social_service.h  2016-01-27 20:45:36 UTC (rev 
36875)
+++ gnunet/src/include/gnunet_social_service.h  2016-01-27 20:45:38 UTC (rev 
36876)
@@ -814,6 +814,8 @@
  *        #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.
@@ -820,6 +822,7 @@
  */
 typedef void
 (*GNUNET_SOCIAL_GuestEnterCallback) (void *cls, int result,
+                                     const struct GNUNET_CRYPTO_EddsaPublicKey 
*place_pub_key,
                                      uint64_t max_message_id);
 
 
@@ -1069,6 +1072,18 @@
 
 
 /**
+ * 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

Modified: gnunet/src/social/social_api.c
===================================================================
--- gnunet/src/social/social_api.c      2016-01-27 20:45:36 UTC (rev 36875)
+++ gnunet/src/social/social_api.c      2016-01-27 20:45:38 UTC (rev 36876)
@@ -871,7 +871,8 @@
     cres = (struct GNUNET_PSYC_CountersResultMessage *) msg;
   int32_t result = ntohl (cres->result_code);
   if (NULL != gst->enter_cb)
-    gst->enter_cb (gst->cb_cls, result, GNUNET_ntohll (cres->max_message_id));
+    gst->enter_cb (gst->cb_cls, result, &gst->plc.pub_key,
+                   GNUNET_ntohll (cres->max_message_id));
 }
 
 
@@ -1962,7 +1963,7 @@
  * @return Public key of the place.
  */
 const struct GNUNET_CRYPTO_EddsaPublicKey *
-GNUNET_SOCIAL_place_get_key (struct GNUNET_SOCIAL_Place *plc)
+GNUNET_SOCIAL_place_get_pub_key (const struct GNUNET_SOCIAL_Place *plc)
 {
   return &plc->pub_key;
 }

Modified: gnunet/src/social/test_social.c
===================================================================
--- gnunet/src/social/test_social.c     2016-01-27 20:45:36 UTC (rev 36875)
+++ gnunet/src/social/test_social.c     2016-01-27 20:45:38 UTC (rev 36876)
@@ -382,7 +382,9 @@
 
 
 static void
-guest_reconnected (void *cls, int result, uint64_t max_message_id)
+guest_reconnected (void *cls, int result,
+                   const struct GNUNET_CRYPTO_EddsaPublicKey *place_pub_key,
+                   uint64_t max_message_id)
 {
   GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
               "Test #%u: Guest reconnected to place: %d\n",
@@ -1098,7 +1100,9 @@
 
 
 static void
-guest_recv_local_enter (void *cls, int result, uint64_t max_message_id)
+guest_recv_local_enter (void *cls, int result,
+                        const struct GNUNET_CRYPTO_EddsaPublicKey 
*place_pub_key,
+                        uint64_t max_message_id)
 {
   GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
               "Test #%u: Guest entered to local place: %d\n",




reply via email to

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