diff options
Diffstat (limited to 'src/common.h')
-rw-r--r-- | src/common.h | 156 |
1 files changed, 0 insertions, 156 deletions
diff --git a/src/common.h b/src/common.h deleted file mode 100644 index 5a14836a..00000000 --- a/src/common.h +++ /dev/null | |||
@@ -1,156 +0,0 @@ | |||
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/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 | #ifndef HAVE_USED_CONFIG_H | ||
30 | #define HAVE_USED_CONFIG_H | ||
31 | #include "gnunet_gtk_config.h" | ||
32 | #endif | ||
33 | #include <gnunet/platform.h> | ||
34 | #include <gnunet/gnunet_util_lib.h> | ||
35 | #include <gnunet/gnunet_fs_service.h> | ||
36 | #include <extractor.h> | ||
37 | #include <gladeui/glade.h> | ||
38 | #include <gtk/gtk.h> | ||
39 | |||
40 | |||
41 | /** | ||
42 | * Get the name of the directory where all of our package | ||
43 | * data is stored ($PREFIX/share/) | ||
44 | * | ||
45 | * @return name of the data directory | ||
46 | */ | ||
47 | const char * | ||
48 | GNUNET_GTK_get_data_dir (void); | ||
49 | |||
50 | /** | ||
51 | * @brief get the path to a specific GNUnet installation directory or, | ||
52 | * with GNUNET_IPK_SELF_PREFIX, the current running apps installation directory | ||
53 | * @author Milan | ||
54 | * @return a pointer to the dir path (to be freed by the caller) | ||
55 | */ | ||
56 | char * | ||
57 | GNUNET_GTK_installation_get_path (enum GNUNET_OS_InstallationPathKind dirkind); | ||
58 | |||
59 | |||
60 | GdkPixbuf * | ||
61 | GNUNET_GTK_get_thumbnail_from_meta_data (const struct GNUNET_CONTAINER_MetaData *meta); | ||
62 | |||
63 | /** | ||
64 | * Setup the expiration year adjustment to start with the | ||
65 | * next year and default to next year plus one. | ||
66 | */ | ||
67 | void | ||
68 | GNUNET_GTK_setup_expiration_year_adjustment (GtkBuilder *builder); | ||
69 | |||
70 | /** | ||
71 | * Convert the year from the spin button to an expiration | ||
72 | * time (on midnight, January 1st of that year). | ||
73 | */ | ||
74 | struct GNUNET_TIME_Absolute | ||
75 | GNUNET_GTK_get_expiration_time (GtkSpinButton *spin); | ||
76 | |||
77 | |||
78 | /** | ||
79 | * mmap the given file and run the GNUNET_FS_directory_list_contents | ||
80 | * function on it. | ||
81 | */ | ||
82 | void | ||
83 | GNUNET_GTK_mmap_and_scan (const char *filename, | ||
84 | GNUNET_FS_DirectoryEntryProcessor dep, | ||
85 | void *dep_cls); | ||
86 | |||
87 | |||
88 | /** | ||
89 | * Create an initialize a new builder based on the | ||
90 | * GNUnet-GTK glade file. | ||
91 | * | ||
92 | * @param filename name of the resource file to load | ||
93 | * @return NULL on error | ||
94 | */ | ||
95 | GtkBuilder * | ||
96 | GNUNET_GTK_get_new_builder (const char *filename); | ||
97 | |||
98 | /** | ||
99 | * Get an object from the main window. | ||
100 | * | ||
101 | * @param name name of the object | ||
102 | * @return NULL on error | ||
103 | */ | ||
104 | GObject * | ||
105 | GNUNET_GTK_get_main_window_object (const char *name); | ||
106 | |||
107 | |||
108 | /** | ||
109 | * Get LE plugin list. | ||
110 | */ | ||
111 | struct EXTRACTOR_PluginList * | ||
112 | GNUNET_GTK_get_le_plugins (void); | ||
113 | |||
114 | |||
115 | /** | ||
116 | * Get cfg. | ||
117 | */ | ||
118 | const struct GNUNET_CONFIGURATION_Handle * | ||
119 | GNUNET_GTK_get_configuration (void); | ||
120 | |||
121 | |||
122 | /** | ||
123 | * Return handle for file-sharing operations. | ||
124 | * @return NULL on error | ||
125 | */ | ||
126 | struct GNUNET_FS_Handle * | ||
127 | GNUNET_GTK_get_fs_handle (void); | ||
128 | |||
129 | |||
130 | /** | ||
131 | * Add meta data to list store. | ||
132 | * | ||
133 | * @param cls closure (the GtkListStore) | ||
134 | * @param plugin_name name of the plugin that produced this value; | ||
135 | * special values can be used (i.e. '<zlib>' for zlib being | ||
136 | * used in the main libextractor library and yielding | ||
137 | * meta data). | ||
138 | * @param type libextractor-type describing the meta data | ||
139 | * @param format basic format information about data | ||
140 | * @param data_mime_type mime-type of data (not of the original file); | ||
141 | * can be NULL (if mime-type is not known) | ||
142 | * @param data actual meta-data found | ||
143 | * @param data_len number of bytes in data | ||
144 | * @return 0 to continue (always) | ||
145 | */ | ||
146 | int | ||
147 | GNUNET_GTK_add_meta_data_to_list_store (void *cls, | ||
148 | const char *plugin_name, | ||
149 | enum EXTRACTOR_MetaType type, | ||
150 | enum EXTRACTOR_MetaFormat format, | ||
151 | const char *data_mime_type, | ||
152 | const char *data, | ||
153 | size_t data_len); | ||
154 | |||
155 | #endif | ||
156 | /* end of common.h */ | ||