From ef1b94cfb7d9887782fc417d1df48314da68d575 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 24 Sep 2009 12:09:17 +0000 Subject: [PATCH] adding missing function --- src/fs/fs_uri.c | 15 +++++++++++++++ src/include/gnunet_fs_service.h | 10 ++++++++++ 2 files changed, 25 insertions(+) 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). * -- 2.25.1