diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-08-07 21:45:14 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-08-07 21:45:14 +0000 |
commit | b69c7b8a5f0504a344475aa75071e2687d66cebf (patch) | |
tree | 1739a91343ac4af627d00b12e4d93a5d96ccfdd8 | |
parent | 5ec6299eef59ba41fdb2a39fc1fdd82728beeede (diff) | |
download | gnunet-b69c7b8a5f0504a344475aa75071e2687d66cebf.tar.gz gnunet-b69c7b8a5f0504a344475aa75071e2687d66cebf.zip |
adding missing API call
-rw-r--r-- | src/fs/fs_uri.c | 22 | ||||
-rw-r--r-- | src/include/gnunet_fs_service.h | 12 | ||||
-rw-r--r-- | src/include/gnunet_pseudonym_lib.h | 3 |
3 files changed, 37 insertions, 0 deletions
diff --git a/src/fs/fs_uri.c b/src/fs/fs_uri.c index c844bdd31..7d0321464 100644 --- a/src/fs/fs_uri.c +++ b/src/fs/fs_uri.c | |||
@@ -910,6 +910,27 @@ GNUNET_FS_uri_sks_create (struct GNUNET_FS_Namespace *ns, | |||
910 | 910 | ||
911 | 911 | ||
912 | /** | 912 | /** |
913 | * Create an SKS URI from a namespace ID and an identifier. | ||
914 | * | ||
915 | * @param nsid namespace ID | ||
916 | * @param id identifier | ||
917 | * @return an FS URI for the given namespace and identifier | ||
918 | */ | ||
919 | struct GNUNET_FS_Uri * | ||
920 | GNUNET_FS_uri_sks_create_from_nsid (GNUNET_HashCode *nsid, | ||
921 | const char *id) | ||
922 | { | ||
923 | struct GNUNET_FS_Uri *ns_uri; | ||
924 | |||
925 | ns_uri = GNUNET_malloc (sizeof (struct GNUNET_FS_Uri)); | ||
926 | ns_uri->type = sks; | ||
927 | ns_uri->data.sks.namespace = *nsid; | ||
928 | ns_uri->data.sks.identifier = GNUNET_strdup (id); | ||
929 | return ns_uri; | ||
930 | } | ||
931 | |||
932 | |||
933 | /** | ||
913 | * Canonicalize a keyword. | 934 | * Canonicalize a keyword. |
914 | * | 935 | * |
915 | * @param in input string (the keyword) | 936 | * @param in input string (the keyword) |
@@ -1151,6 +1172,7 @@ GNUNET_FS_uri_ksk_create (const char *keywords, | |||
1151 | 1172 | ||
1152 | if (keywords == NULL) | 1173 | if (keywords == NULL) |
1153 | { | 1174 | { |
1175 | *emsg = GNUNET_strdup (_("No keywords specified!\n")); | ||
1154 | GNUNET_break (0); | 1176 | GNUNET_break (0); |
1155 | return NULL; | 1177 | return NULL; |
1156 | } | 1178 | } |
diff --git a/src/include/gnunet_fs_service.h b/src/include/gnunet_fs_service.h index 758a4895c..8e71308ba 100644 --- a/src/include/gnunet_fs_service.h +++ b/src/include/gnunet_fs_service.h | |||
@@ -328,6 +328,18 @@ GNUNET_FS_uri_sks_create (struct GNUNET_FS_Namespace *ns, | |||
328 | 328 | ||
329 | 329 | ||
330 | /** | 330 | /** |
331 | * Create an SKS URI from a namespace ID and an identifier. | ||
332 | * | ||
333 | * @param nsid namespace ID | ||
334 | * @param id identifier | ||
335 | * @return an FS URI for the given namespace and identifier | ||
336 | */ | ||
337 | struct GNUNET_FS_Uri * | ||
338 | GNUNET_FS_uri_sks_create_from_nsid (GNUNET_HashCode *nsid, | ||
339 | const char *id); | ||
340 | |||
341 | |||
342 | /** | ||
331 | * Get the ID of a namespace from the given | 343 | * Get the ID of a namespace from the given |
332 | * namespace URI. | 344 | * namespace URI. |
333 | * | 345 | * |
diff --git a/src/include/gnunet_pseudonym_lib.h b/src/include/gnunet_pseudonym_lib.h index ba240941b..124de04f9 100644 --- a/src/include/gnunet_pseudonym_lib.h +++ b/src/include/gnunet_pseudonym_lib.h | |||
@@ -42,6 +42,9 @@ extern "C" | |||
42 | /** | 42 | /** |
43 | * Iterator over all known pseudonyms. | 43 | * Iterator over all known pseudonyms. |
44 | * | 44 | * |
45 | * @param cls closure | ||
46 | * @param pseudonym hash code of public key of pseudonym | ||
47 | * @param md meta data known about the pseudonym | ||
45 | * @param rating the local rating of the pseudonym | 48 | * @param rating the local rating of the pseudonym |
46 | * @return GNUNET_OK to continue iteration, GNUNET_SYSERR to abort | 49 | * @return GNUNET_OK to continue iteration, GNUNET_SYSERR to abort |
47 | */ | 50 | */ |