From: Christian Grothoff Date: Thu, 24 Sep 2009 12:09:17 +0000 (+0000) Subject: adding missing function X-Git-Tag: initial-import-from-subversion-38251~23467 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ef1b94cfb7d9887782fc417d1df48314da68d575;p=oweals%2Fgnunet.git adding missing function --- diff --git a/src/fs/fs_uri.c b/src/fs/fs_uri.c index 38dba8991..74d19d59f 100644 --- a/src/fs/fs_uri.c +++ b/src/fs/fs_uri.c @@ -785,6 +785,21 @@ GNUNET_FS_uri_loc_get_peer_identity (const struct GNUNET_FS_Uri *uri, } +/** + * Obtain the expiration of the LOC URI. + * + * @param uri location URI to get the expiration from + * @return expiration time of the URI + */ +struct GNUNET_TIME_Absolute +GNUNET_FS_uri_loc_get_expiration (const struct GNUNET_FS_Uri *uri) +{ + GNUNET_assert (uri->type == loc); + returnuri->data.loc.expirationTime; +} + + + /** * Obtain the URI of the content itself. * diff --git a/src/include/gnunet_fs_service.h b/src/include/gnunet_fs_service.h index f89a343b9..3f603e581 100644 --- a/src/include/gnunet_fs_service.h +++ b/src/include/gnunet_fs_service.h @@ -185,6 +185,16 @@ struct GNUNET_FS_Uri * GNUNET_FS_uri_loc_get_uri (const struct GNUNET_FS_Uri *uri); +/** + * Obtain the expiration of the LOC URI. + * + * @param uri location URI to get the expiration from + * @return expiration time of the URI + */ +struct GNUNET_TIME_Absolute +GNUNET_FS_uri_loc_get_expiration (const struct GNUNET_FS_Uri *uri); + + /** * Construct a location URI (this peer will be used for the location). *