aboutsummaryrefslogtreecommitdiff
path: root/src/fs/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs/common.h')
-rw-r--r--src/fs/common.h89
1 files changed, 89 insertions, 0 deletions
diff --git a/src/fs/common.h b/src/fs/common.h
new file mode 100644
index 00000000..e316768b
--- /dev/null
+++ b/src/fs/common.h
@@ -0,0 +1,89 @@
1/*
2 This file is part of GNUnet.
3 (C) 2010 Christian Grothoff (and other contributing authors)
4
5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 2, or (at your
8 option) any later version.
9
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
19*/
20
21/**
22 * @file src/fs/common.h
23 * @brief Common includes for all gnunet-gtk source files
24 * @author Christian Grothoff
25 */
26#ifndef COMMON_H
27#define COMMON_H
28
29#include "gnunet_gtk.h"
30#include <gnunet/gnunet_fs_service.h>
31#include <extractor.h>
32
33
34
35GdkPixbuf *
36GNUNET_FS_GTK_get_thumbnail_from_meta_data (const struct GNUNET_CONTAINER_MetaData *meta);
37
38/**
39 * Setup the expiration year adjustment to start with the
40 * next year and default to next year plus one.
41 */
42void
43GNUNET_FS_GTK_setup_expiration_year_adjustment (GtkBuilder *builder);
44
45/**
46 * Convert the year from the spin button to an expiration
47 * time (on midnight, January 1st of that year).
48 */
49struct GNUNET_TIME_Absolute
50GNUNET_FS_GTK_get_expiration_time (GtkSpinButton *spin);
51
52
53/**
54 * mmap the given file and run the GNUNET_FS_directory_list_contents
55 * function on it.
56 */
57void
58GNUNET_FS_GTK_mmap_and_scan (const char *filename,
59 GNUNET_FS_DirectoryEntryProcessor dep,
60 void *dep_cls);
61
62
63/**
64 * Add meta data to list store.
65 *
66 * @param cls closure (the GtkListStore)
67 * @param plugin_name name of the plugin that produced this value;
68 * special values can be used (i.e. '<zlib>' for zlib being
69 * used in the main libextractor library and yielding
70 * meta data).
71 * @param type libextractor-type describing the meta data
72 * @param format basic format information about data
73 * @param data_mime_type mime-type of data (not of the original file);
74 * can be NULL (if mime-type is not known)
75 * @param data actual meta-data found
76 * @param data_len number of bytes in data
77 * @return 0 to continue (always)
78 */
79int
80GNUNET_FS_GTK_add_meta_data_to_list_store (void *cls,
81 const char *plugin_name,
82 enum EXTRACTOR_MetaType type,
83 enum EXTRACTOR_MetaFormat format,
84 const char *data_mime_type,
85 const char *data,
86 size_t data_len);
87
88#endif
89/* end of common.h */