aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_psyc_util_lib.h9
-rw-r--r--src/include/gnunet_social_service.h63
2 files changed, 58 insertions, 14 deletions
diff --git a/src/include/gnunet_psyc_util_lib.h b/src/include/gnunet_psyc_util_lib.h
index 504476573..10cfc68d9 100644
--- a/src/include/gnunet_psyc_util_lib.h
+++ b/src/include/gnunet_psyc_util_lib.h
@@ -79,7 +79,7 @@ GNUNET_PSYC_message_create (const char *method_name,
79 * #GNUNET_SYSERR on parse error. 79 * #GNUNET_SYSERR on parse error.
80 */ 80 */
81int 81int
82GNUNET_PSYC_message_parse (const struct GNUNET_PSYC_Message *msg, 82GNUNET_PSYC_message_parse (const struct GNUNET_PSYC_MessageHeader *msg,
83 const char **method_name, 83 const char **method_name,
84 struct GNUNET_ENV_Environment *env, 84 struct GNUNET_ENV_Environment *env,
85 const void **data, 85 const void **data,
@@ -247,6 +247,13 @@ GNUNET_PSYC_message_header_create (const struct GNUNET_MULTICAST_MessageHeader *
247 uint32_t flags); 247 uint32_t flags);
248 248
249 249
250/**
251 * Create a new PSYC message header from a PSYC message.
252 */
253struct GNUNET_PSYC_MessageHeader *
254GNUNET_PSYC_message_header_create_from_psyc (const struct GNUNET_PSYC_Message *msg);
255
256
250#if 0 /* keep Emacsens' auto-indent happy */ 257#if 0 /* keep Emacsens' auto-indent happy */
251{ 258{
252#endif 259#endif
diff --git a/src/include/gnunet_social_service.h b/src/include/gnunet_social_service.h
index 0af48d168..edb762a1e 100644
--- a/src/include/gnunet_social_service.h
+++ b/src/include/gnunet_social_service.h
@@ -494,6 +494,7 @@ GNUNET_SOCIAL_nym_get_key_hash (const struct GNUNET_SOCIAL_Nym *nym);
494 * Expiration time of the record, use 0 to remove the record. 494 * Expiration time of the record, use 0 to remove the record.
495 * @param password 495 * @param password
496 * Password used to encrypt the record. 496 * Password used to encrypt the record.
497 * FIXME: not implemented yet.
497 * @param result_cb 498 * @param result_cb
498 * Function called with the result of the operation. 499 * Function called with the result of the operation.
499 * @param result_cls 500 * @param result_cls
@@ -502,9 +503,9 @@ GNUNET_SOCIAL_nym_get_key_hash (const struct GNUNET_SOCIAL_Nym *nym);
502void 503void
503GNUNET_SOCIAL_host_advertise (struct GNUNET_SOCIAL_Host *host, 504GNUNET_SOCIAL_host_advertise (struct GNUNET_SOCIAL_Host *host,
504 const char *name, 505 const char *name,
505 size_t peer_count, 506 uint32_t peer_count,
506 const struct GNUNET_PeerIdentity *peers, 507 const struct GNUNET_PeerIdentity *peers,
507 struct GNUNET_TIME_Relative expiration_time, 508 struct GNUNET_TIME_Absolute expiration_time,
508 const char *password, 509 const char *password,
509 GNUNET_NAMESTORE_ContinuationWithStatus result_cb, 510 GNUNET_NAMESTORE_ContinuationWithStatus result_cb,
510 void *result_cls); 511 void *result_cls);
@@ -702,27 +703,35 @@ GNUNET_SOCIAL_guest_enter (const struct GNUNET_CONFIGURATION_Handle *cfg,
702 703
703 704
704/** 705/**
705 * Request entry to a place as a guest using a GNS name. 706 * Request entry to a place by name as a guest.
706 * 707 *
707 * @param cfg Configuration to contact the social service. 708 * @param cfg
708 * @param ego Identity of the guest. 709 * Configuration to contact the social service.
709 * @param address GNS name of the place to enter. Either in the form of 710 * @param ego
711 * Identity of the guest.
712 * @param gns_name
713 * GNS name of the place to enter. Either in the form of
710 * 'room.friend.gnu', or 'NYMPUBKEY.zkey'. This latter case refers to 714 * 'room.friend.gnu', or 'NYMPUBKEY.zkey'. This latter case refers to
711 * the 'PLACE' record of the empty label ("+") in the GNS zone with the 715 * the 'PLACE' record of the empty label ("+") in the GNS zone with the
712 * nym's public key 'NYMPUBKEY', and can be used to request entry to a 716 * nym's public key 'NYMPUBKEY', and can be used to request entry to a
713 * pseudonym's place directly. 717 * pseudonym's place directly.
714 * @param method_name Method name for the message. 718 * @param password
715 * @param env Environment containing variables for the message, or NULL. 719 * Password to decrypt the record, or NULL for cleartext records.
716 * @param data Payload for the message to give to the enter callback. 720 * @param join_msg
717 * @param data_size Number of bytes in @a data. 721 * Entry request message.
718 * @param slicer Slicer to use for processing incoming requests from guests. 722 * @param slicer
723 * Slicer to use for processing incoming requests from guests.
724 * @param local_enter_cb
725 * Called upon connection established to the social service.
726 * @param entry_decision_cb
727 * Called upon receiving entry decision.
719 * 728 *
720 * @return NULL on errors, otherwise handle for the guest. 729 * @return NULL on errors, otherwise handle for the guest.
721 */ 730 */
722struct GNUNET_SOCIAL_Guest * 731struct GNUNET_SOCIAL_Guest *
723GNUNET_SOCIAL_guest_enter_by_name (const struct GNUNET_CONFIGURATION_Handle *cfg, 732GNUNET_SOCIAL_guest_enter_by_name (const struct GNUNET_CONFIGURATION_Handle *cfg,
724 struct GNUNET_IDENTITY_Ego *ego, 733 const struct GNUNET_IDENTITY_Ego *ego,
725 char *gns_name, 734 const char *gns_name, const char *password,
726 const struct GNUNET_PSYC_Message *join_msg, 735 const struct GNUNET_PSYC_Message *join_msg,
727 struct GNUNET_SOCIAL_Slicer *slicer, 736 struct GNUNET_SOCIAL_Slicer *slicer,
728 GNUNET_SOCIAL_GuestEnterCallback local_enter_cb, 737 GNUNET_SOCIAL_GuestEnterCallback local_enter_cb,
@@ -964,6 +973,34 @@ void
964GNUNET_SOCIAL_place_look_cancel (struct GNUNET_SOCIAL_LookHandle *lh); 973GNUNET_SOCIAL_place_look_cancel (struct GNUNET_SOCIAL_LookHandle *lh);
965 974
966 975
976/**
977 * Add public key to the GNS zone of the @e ego.
978 *
979 * @param cfg
980 * Configuration.
981 * @param ego
982 * Ego.
983 * @param name
984 * The name for the PKEY record to put in the zone.
985 * @param pub_key
986 * Public key to add.
987 * @param expiration_time
988 * Expiration time of the record, use 0 to remove the record.
989 * @param result_cb
990 * Function called with the result of the operation.
991 * @param result_cls
992 * Closure for @a result_cb
993 */
994void
995GNUNET_SOCIAL_zone_add_pkey (const struct GNUNET_CONFIGURATION_Handle *cfg,
996 const struct GNUNET_IDENTITY_Ego *ego,
997 const char *name,
998 const struct GNUNET_CRYPTO_EcdsaPublicKey *pub_key,
999 struct GNUNET_TIME_Absolute expiration_time,
1000 GNUNET_NAMESTORE_ContinuationWithStatus result_cb,
1001 void *result_cls);
1002
1003
967#if 0 /* keep Emacsens' auto-indent happy */ 1004#if 0 /* keep Emacsens' auto-indent happy */
968{ 1005{
969#endif 1006#endif