adding missing API call
authorChristian Grothoff <christian@grothoff.org>
Sat, 7 Aug 2010 21:45:14 +0000 (21:45 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sat, 7 Aug 2010 21:45:14 +0000 (21:45 +0000)
src/fs/fs_uri.c
src/include/gnunet_fs_service.h
src/include/gnunet_pseudonym_lib.h

index c844bdd3141e25d0085eb174b50f5b5f5bfe68b6..7d03214643dddc080984e13a3a597ace9bb085f2 100644 (file)
@@ -909,6 +909,27 @@ GNUNET_FS_uri_sks_create (struct GNUNET_FS_Namespace *ns,
 }
 
 
+/**
+ * Create an SKS URI from a namespace ID and an identifier.
+ *
+ * @param nsid namespace ID
+ * @param id identifier
+ * @return an FS URI for the given namespace and identifier
+ */
+struct GNUNET_FS_Uri *
+GNUNET_FS_uri_sks_create_from_nsid (GNUNET_HashCode *nsid,
+                                   const char *id)
+{
+  struct GNUNET_FS_Uri *ns_uri;
+             
+  ns_uri = GNUNET_malloc (sizeof (struct GNUNET_FS_Uri));
+  ns_uri->type = sks;
+  ns_uri->data.sks.namespace = *nsid;
+  ns_uri->data.sks.identifier = GNUNET_strdup (id);
+  return ns_uri;
+}
+
+
 /**
  * Canonicalize a keyword.
  * 
@@ -1151,6 +1172,7 @@ GNUNET_FS_uri_ksk_create (const char *keywords,
 
   if (keywords == NULL)
     {
+      *emsg = GNUNET_strdup (_("No keywords specified!\n"));
       GNUNET_break (0);
       return NULL;
     }
index 758a4895c04e1b46f6a107e5ed5bc7796aca871a..8e71308ba3263d89a608cadf211e08ff2e73376e 100644 (file)
@@ -327,6 +327,18 @@ GNUNET_FS_uri_sks_create (struct GNUNET_FS_Namespace *ns,
                          char **emsg);
 
 
+/**
+ * Create an SKS URI from a namespace ID and an identifier.
+ *
+ * @param nsid namespace ID
+ * @param id identifier
+ * @return an FS URI for the given namespace and identifier
+ */
+struct GNUNET_FS_Uri *
+GNUNET_FS_uri_sks_create_from_nsid (GNUNET_HashCode *nsid,
+                                   const char *id);
+
+
 /**
  * Get the ID of a namespace from the given
  * namespace URI.
index ba240941b54b48ca853732a4a389d21f8edf7193..124de04f92f400769f8fc321acfe3a4248d24269 100644 (file)
@@ -42,6 +42,9 @@ extern "C"
 /**
  * Iterator over all known pseudonyms.
  *
+ * @param cls closure
+ * @param pseudonym hash code of public key of pseudonym
+ * @param md meta data known about the pseudonym
  * @param rating the local rating of the pseudonym
  * @return GNUNET_OK to continue iteration, GNUNET_SYSERR to abort
  */