fs_api.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. This file is part of GNUnet.
  3. Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 GNUnet e.V.
  4. GNUnet is free software: you can redistribute it and/or modify it
  5. under the terms of the GNU Affero General Public License as published
  6. by the Free Software Foundation, either version 3 of the License,
  7. or (at your option) any later version.
  8. GNUnet is distributed in the hope that it will be useful, but
  9. WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Affero General Public License for more details.
  12. You should have received a copy of the GNU Affero General Public License
  13. along with this program. If not, see <http://www.gnu.org/licenses/>.
  14. SPDX-License-Identifier: AGPL3.0-or-later
  15. */
  16. /**
  17. * (extract)
  18. * @file fs/fs_api.h
  19. * @brief shared definitions for the FS library
  20. * @author Igor Wronsky, Christian Grothoff
  21. */
  22. #ifndef FS_API_H
  23. #define FS_API_H
  24. #include <gnunet/gnunet_constants.h>
  25. #include <gnunet/gnunet_dht_service.h>
  26. #include <gnunet/gnunet_fs_service.h>
  27. #include <gnunet/gnunet_block_lib.h>
  28. #include "fs.h"
  29. GNUNET_NETWORK_STRUCT_BEGIN
  30. /**
  31. * @brief complete information needed
  32. * to download a file.
  33. */
  34. struct FileIdentifier
  35. {
  36. /**
  37. * Total size of the file in bytes. (network byte order (!))
  38. */
  39. uint64_t file_length;
  40. /**
  41. * Query and key of the top GNUNET_EC_IBlock.
  42. */
  43. struct ContentHashKey chk;
  44. };
  45. GNUNET_NETWORK_STRUCT_END
  46. #endif
  47. /* end of fs_api.h */