gsf 3.0.9-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Rakefile +55 -0
- data/lib/gsf.rb +53 -0
- data/lib/gsf/input.rb +26 -0
- data/lib/gsf/loader.rb +57 -0
- data/test/gsf-test-utils.rb +22 -0
- data/test/run-test.rb +46 -0
- data/test/test-input-stdio.rb +25 -0
- data/vendor/local/bin/gsf-office-thumbnailer.exe +0 -0
- data/vendor/local/bin/gsf-vba-dump.exe +0 -0
- data/vendor/local/bin/gsf.exe +0 -0
- data/vendor/local/bin/libgsf-1-114.dll +0 -0
- data/vendor/local/bin/libgsf-win32-1-114.dll +0 -0
- data/vendor/local/include/libgsf-1/gsf-win32/gsf-input-win32.h +41 -0
- data/vendor/local/include/libgsf-1/gsf-win32/gsf-output-win32.h +41 -0
- data/vendor/local/include/libgsf-1/gsf/gsf-blob.h +39 -0
- data/vendor/local/include/libgsf-1/gsf/gsf-clip-data.h +72 -0
- data/vendor/local/include/libgsf-1/gsf/gsf-doc-meta-data.h +66 -0
- data/vendor/local/include/libgsf-1/gsf/gsf-docprop-vector.h +47 -0
- data/vendor/local/include/libgsf-1/gsf/gsf-fwd.h +121 -0
- data/vendor/local/include/libgsf-1/gsf/gsf-impl-utils.h +156 -0
- data/vendor/local/include/libgsf-1/gsf/gsf-infile-impl.h +50 -0
- data/vendor/local/include/libgsf-1/gsf/gsf-infile-msole.h +45 -0
- data/vendor/local/include/libgsf-1/gsf/gsf-infile-msvba.h +49 -0
- data/vendor/local/include/libgsf-1/gsf/gsf-infile-stdio.h +43 -0
- data/vendor/local/include/libgsf-1/gsf/gsf-infile-tar.h +40 -0
- data/vendor/local/include/libgsf-1/gsf/gsf-infile-zip.h +43 -0
- data/vendor/local/include/libgsf-1/gsf/gsf-infile.h +46 -0
- data/vendor/local/include/libgsf-1/gsf/gsf-input-bzip.h +34 -0
- data/vendor/local/include/libgsf-1/gsf/gsf-input-gio.h +44 -0
- data/vendor/local/include/libgsf-1/gsf/gsf-input-gzip.h +43 -0
- data/vendor/local/include/libgsf-1/gsf/gsf-input-http.h +45 -0
- data/vendor/local/include/libgsf-1/gsf/gsf-input-impl.h +68 -0
- data/vendor/local/include/libgsf-1/gsf/gsf-input-iochannel.h +35 -0
- data/vendor/local/include/libgsf-1/gsf/gsf-input-memory.h +46 -0
- data/vendor/local/include/libgsf-1/gsf/gsf-input-proxy.h +46 -0
- data/vendor/local/include/libgsf-1/gsf/gsf-input-stdio.h +48 -0
- data/vendor/local/include/libgsf-1/gsf/gsf-input-textline.h +46 -0
- data/vendor/local/include/libgsf-1/gsf/gsf-input.h +69 -0
- data/vendor/local/include/libgsf-1/gsf/gsf-libxml.h +225 -0
- data/vendor/local/include/libgsf-1/gsf/gsf-meta-names.h +482 -0
- data/vendor/local/include/libgsf-1/gsf/gsf-msole-utils.h +70 -0
- data/vendor/local/include/libgsf-1/gsf/gsf-open-pkg-utils.h +95 -0
- data/vendor/local/include/libgsf-1/gsf/gsf-opendoc-utils.h +162 -0
- data/vendor/local/include/libgsf-1/gsf/gsf-outfile-impl.h +46 -0
- data/vendor/local/include/libgsf-1/gsf/gsf-outfile-msole.h +47 -0
- data/vendor/local/include/libgsf-1/gsf/gsf-outfile-stdio.h +49 -0
- data/vendor/local/include/libgsf-1/gsf/gsf-outfile-zip.h +61 -0
- data/vendor/local/include/libgsf-1/gsf/gsf-outfile.h +49 -0
- data/vendor/local/include/libgsf-1/gsf/gsf-output-bzip.h +43 -0
- data/vendor/local/include/libgsf-1/gsf/gsf-output-csv.h +84 -0
- data/vendor/local/include/libgsf-1/gsf/gsf-output-gio.h +44 -0
- data/vendor/local/include/libgsf-1/gsf/gsf-output-gzip.h +43 -0
- data/vendor/local/include/libgsf-1/gsf/gsf-output-iconv.h +47 -0
- data/vendor/local/include/libgsf-1/gsf/gsf-output-impl.h +37 -0
- data/vendor/local/include/libgsf-1/gsf/gsf-output-iochannel.h +43 -0
- data/vendor/local/include/libgsf-1/gsf/gsf-output-memory.h +44 -0
- data/vendor/local/include/libgsf-1/gsf/gsf-output-stdio.h +52 -0
- data/vendor/local/include/libgsf-1/gsf/gsf-output.h +99 -0
- data/vendor/local/include/libgsf-1/gsf/gsf-shared-memory.h +51 -0
- data/vendor/local/include/libgsf-1/gsf/gsf-structured-blob.h +45 -0
- data/vendor/local/include/libgsf-1/gsf/gsf-timestamp.h +70 -0
- data/vendor/local/include/libgsf-1/gsf/gsf-utils.h +340 -0
- data/vendor/local/include/libgsf-1/gsf/gsf.h +98 -0
- data/vendor/local/lib/libgsf-1.a +0 -0
- data/vendor/local/lib/libgsf-1.dll.a +0 -0
- data/vendor/local/lib/libgsf-1.la +41 -0
- data/vendor/local/lib/libgsf-win32-1.a +0 -0
- data/vendor/local/lib/libgsf-win32-1.dll.a +0 -0
- data/vendor/local/lib/libgsf-win32-1.la +41 -0
- data/vendor/local/lib/pkgconfig/libgsf-1.pc +11 -0
- data/vendor/local/lib/pkgconfig/libgsf-win32-1.pc +11 -0
- data/vendor/local/share/gtk-doc/html/gsf/annotation-glossary.html +56 -0
- data/vendor/local/share/gtk-doc/html/gsf/api.html +107 -0
- data/vendor/local/share/gtk-doc/html/gsf/dependencies.html +109 -0
- data/vendor/local/share/gtk-doc/html/gsf/gsf-Compression.html +369 -0
- data/vendor/local/share/gtk-doc/html/gsf/gsf-GIO.html +307 -0
- data/vendor/local/share/gtk-doc/html/gsf/gsf-GIOChannel.html +119 -0
- data/vendor/local/share/gtk-doc/html/gsf/gsf-Infile-reading-structed-files.html +397 -0
- data/vendor/local/share/gtk-doc/html/gsf/gsf-Input-from-unstructured-files.html +887 -0
- data/vendor/local/share/gtk-doc/html/gsf/gsf-MS-OLE2.html +894 -0
- data/vendor/local/share/gtk-doc/html/gsf/gsf-OASIS-Open-Document.html +398 -0
- data/vendor/local/share/gtk-doc/html/gsf/gsf-Outfile-writing-structed-files.html +237 -0
- data/vendor/local/share/gtk-doc/html/gsf/gsf-Output-to-unstructured-files.html +830 -0
- data/vendor/local/share/gtk-doc/html/gsf/gsf-Reading-and-Writing-from-local-files-and-directories.html +593 -0
- data/vendor/local/share/gtk-doc/html/gsf/gsf-Text.html +523 -0
- data/vendor/local/share/gtk-doc/html/gsf/gsf-XML-and-libxml.html +2032 -0
- data/vendor/local/share/gtk-doc/html/gsf/gsf-Zip.html +338 -0
- data/vendor/local/share/gtk-doc/html/gsf/gsf-blobs.html +56 -0
- data/vendor/local/share/gtk-doc/html/gsf/gsf-clip-data.html +444 -0
- data/vendor/local/share/gtk-doc/html/gsf/gsf-index.html +875 -0
- data/vendor/local/share/gtk-doc/html/gsf/gsf-memory.html +332 -0
- data/vendor/local/share/gtk-doc/html/gsf/gsf-metadata.html +1762 -0
- data/vendor/local/share/gtk-doc/html/gsf/gsf-users.html +73 -0
- data/vendor/local/share/gtk-doc/html/gsf/gsf-utils.html +2503 -0
- data/vendor/local/share/gtk-doc/html/gsf/gsf.devhelp2 +440 -0
- data/vendor/local/share/gtk-doc/html/gsf/history.html +45 -0
- data/vendor/local/share/gtk-doc/html/gsf/home.png +0 -0
- data/vendor/local/share/gtk-doc/html/gsf/index.html +98 -0
- data/vendor/local/share/gtk-doc/html/gsf/index.sgml +572 -0
- data/vendor/local/share/gtk-doc/html/gsf/intro.html +39 -0
- data/vendor/local/share/gtk-doc/html/gsf/io.html +38 -0
- data/vendor/local/share/gtk-doc/html/gsf/left-insensitive.png +0 -0
- data/vendor/local/share/gtk-doc/html/gsf/left.png +0 -0
- data/vendor/local/share/gtk-doc/html/gsf/misc.html +33 -0
- data/vendor/local/share/gtk-doc/html/gsf/parsers.html +59 -0
- data/vendor/local/share/gtk-doc/html/gsf/right-insensitive.png +0 -0
- data/vendor/local/share/gtk-doc/html/gsf/right.png +0 -0
- data/vendor/local/share/gtk-doc/html/gsf/sources.html +50 -0
- data/vendor/local/share/gtk-doc/html/gsf/style.css +461 -0
- data/vendor/local/share/gtk-doc/html/gsf/up-insensitive.png +0 -0
- data/vendor/local/share/gtk-doc/html/gsf/up.png +0 -0
- data/vendor/local/share/license/libgsf/AUTHORS +3 -0
- data/vendor/local/share/license/libgsf/COPYING +340 -0
- data/vendor/local/share/license/libgsf/COPYING.LIB +504 -0
- data/vendor/local/share/locale/as/LC_MESSAGES/libgsf.mo +0 -0
- data/vendor/local/share/locale/bs/LC_MESSAGES/libgsf.mo +0 -0
- data/vendor/local/share/locale/ca/LC_MESSAGES/libgsf.mo +0 -0
- data/vendor/local/share/locale/ca@valencia/LC_MESSAGES/libgsf.mo +0 -0
- data/vendor/local/share/locale/cs/LC_MESSAGES/libgsf.mo +0 -0
- data/vendor/local/share/locale/da/LC_MESSAGES/libgsf.mo +0 -0
- data/vendor/local/share/locale/de/LC_MESSAGES/libgsf.mo +0 -0
- data/vendor/local/share/locale/el/LC_MESSAGES/libgsf.mo +0 -0
- data/vendor/local/share/locale/en_GB/LC_MESSAGES/libgsf.mo +0 -0
- data/vendor/local/share/locale/eo/LC_MESSAGES/libgsf.mo +0 -0
- data/vendor/local/share/locale/es/LC_MESSAGES/libgsf.mo +0 -0
- data/vendor/local/share/locale/eu/LC_MESSAGES/libgsf.mo +0 -0
- data/vendor/local/share/locale/fi/LC_MESSAGES/libgsf.mo +0 -0
- data/vendor/local/share/locale/fr/LC_MESSAGES/libgsf.mo +0 -0
- data/vendor/local/share/locale/gl/LC_MESSAGES/libgsf.mo +0 -0
- data/vendor/local/share/locale/he/LC_MESSAGES/libgsf.mo +0 -0
- data/vendor/local/share/locale/hu/LC_MESSAGES/libgsf.mo +0 -0
- data/vendor/local/share/locale/id/LC_MESSAGES/libgsf.mo +0 -0
- data/vendor/local/share/locale/it/LC_MESSAGES/libgsf.mo +0 -0
- data/vendor/local/share/locale/ja/LC_MESSAGES/libgsf.mo +0 -0
- data/vendor/local/share/locale/ko/LC_MESSAGES/libgsf.mo +0 -0
- data/vendor/local/share/locale/lt/LC_MESSAGES/libgsf.mo +0 -0
- data/vendor/local/share/locale/lv/LC_MESSAGES/libgsf.mo +0 -0
- data/vendor/local/share/locale/ml/LC_MESSAGES/libgsf.mo +0 -0
- data/vendor/local/share/locale/nb/LC_MESSAGES/libgsf.mo +0 -0
- data/vendor/local/share/locale/nn/LC_MESSAGES/libgsf.mo +0 -0
- data/vendor/local/share/locale/oc/LC_MESSAGES/libgsf.mo +0 -0
- data/vendor/local/share/locale/pa/LC_MESSAGES/libgsf.mo +0 -0
- data/vendor/local/share/locale/pl/LC_MESSAGES/libgsf.mo +0 -0
- data/vendor/local/share/locale/pt/LC_MESSAGES/libgsf.mo +0 -0
- data/vendor/local/share/locale/pt_BR/LC_MESSAGES/libgsf.mo +0 -0
- data/vendor/local/share/locale/ro/LC_MESSAGES/libgsf.mo +0 -0
- data/vendor/local/share/locale/ru/LC_MESSAGES/libgsf.mo +0 -0
- data/vendor/local/share/locale/sk/LC_MESSAGES/libgsf.mo +0 -0
- data/vendor/local/share/locale/sl/LC_MESSAGES/libgsf.mo +0 -0
- data/vendor/local/share/locale/sr/LC_MESSAGES/libgsf.mo +0 -0
- data/vendor/local/share/locale/sr@latin/LC_MESSAGES/libgsf.mo +0 -0
- data/vendor/local/share/locale/sv/LC_MESSAGES/libgsf.mo +0 -0
- data/vendor/local/share/locale/ta/LC_MESSAGES/libgsf.mo +0 -0
- data/vendor/local/share/locale/tg/LC_MESSAGES/libgsf.mo +0 -0
- data/vendor/local/share/locale/th/LC_MESSAGES/libgsf.mo +0 -0
- data/vendor/local/share/locale/tr/LC_MESSAGES/libgsf.mo +0 -0
- data/vendor/local/share/locale/uk/LC_MESSAGES/libgsf.mo +0 -0
- data/vendor/local/share/locale/zh_CN/LC_MESSAGES/libgsf.mo +0 -0
- data/vendor/local/share/locale/zh_HK/LC_MESSAGES/libgsf.mo +0 -0
- data/vendor/local/share/locale/zh_TW/LC_MESSAGES/libgsf.mo +0 -0
- data/vendor/local/share/man/man1/gsf-office-thumbnailer.1 +71 -0
- data/vendor/local/share/man/man1/gsf-vba-dump.1 +61 -0
- data/vendor/local/share/man/man1/gsf.1 +91 -0
- data/vendor/local/share/thumbnailers/gsf-office.thumbnailer +4 -0
- metadata +235 -0
@@ -0,0 +1,44 @@
|
|
1
|
+
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
|
2
|
+
/*
|
3
|
+
* gsf-output-memory.h
|
4
|
+
*
|
5
|
+
* Copyright (C) 2002-2006 Dom Lachowicz (cinamod@hotmail.com)
|
6
|
+
*
|
7
|
+
* This program is free software; you can redistribute it and/or
|
8
|
+
* modify it under the terms of version 2.1 of the GNU Lesser General Public
|
9
|
+
* License as published by the Free Software Foundation.
|
10
|
+
*
|
11
|
+
* This program is distributed in the hope that it will be useful,
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
|
+
* GNU General Public License for more details.
|
15
|
+
*
|
16
|
+
* You should have received a copy of the GNU Lesser General Public License
|
17
|
+
* along with this program; if not, write to the Free Software
|
18
|
+
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
|
19
|
+
* USA
|
20
|
+
*/
|
21
|
+
|
22
|
+
#ifndef GSF_OUTPUT_MEMORY_H
|
23
|
+
#define GSF_OUTPUT_MEMORY_H
|
24
|
+
|
25
|
+
#include <gsf/gsf-fwd.h>
|
26
|
+
#include <gsf/gsf-output.h>
|
27
|
+
|
28
|
+
G_BEGIN_DECLS
|
29
|
+
|
30
|
+
#define GSF_OUTPUT_MEMORY_TYPE (gsf_output_memory_get_type ())
|
31
|
+
#define GSF_OUTPUT_MEMORY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_OUTPUT_MEMORY_TYPE, GsfOutputMemory))
|
32
|
+
#define GSF_IS_OUTPUT_MEMORY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_OUTPUT_MEMORY_TYPE))
|
33
|
+
|
34
|
+
typedef struct _GsfOutputMemory GsfOutputMemory;
|
35
|
+
|
36
|
+
GType gsf_output_memory_get_type (void) G_GNUC_CONST;
|
37
|
+
/* void gsf_output_memory_register_type (GTypeModule *module); glib dynamic types are not thread safe */
|
38
|
+
|
39
|
+
GsfOutput *gsf_output_memory_new (void);
|
40
|
+
const guint8* gsf_output_memory_get_bytes (GsfOutputMemory * mem);
|
41
|
+
|
42
|
+
G_END_DECLS
|
43
|
+
|
44
|
+
#endif /* GSF_OUTPUT_MEMORY_H */
|
@@ -0,0 +1,52 @@
|
|
1
|
+
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
|
2
|
+
/*
|
3
|
+
* gsf-output-stdio.h: stdio based output
|
4
|
+
*
|
5
|
+
* Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org)
|
6
|
+
*
|
7
|
+
* This program is free software; you can redistribute it and/or
|
8
|
+
* modify it under the terms of version 2.1 of the GNU Lesser General Public
|
9
|
+
* License as published by the Free Software Foundation.
|
10
|
+
*
|
11
|
+
* This program is distributed in the hope that it will be useful,
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
|
+
* GNU General Public License for more details.
|
15
|
+
*
|
16
|
+
* You should have received a copy of the GNU Lesser General Public License
|
17
|
+
* along with this program; if not, write to the Free Software
|
18
|
+
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
|
19
|
+
* USA
|
20
|
+
*/
|
21
|
+
|
22
|
+
#ifndef GSF_OUTPUT_STDIO_H
|
23
|
+
#define GSF_OUTPUT_STDIO_H
|
24
|
+
|
25
|
+
#include <gsf/gsf-fwd.h>
|
26
|
+
#include <gsf/gsf-output.h>
|
27
|
+
#include <stdio.h>
|
28
|
+
|
29
|
+
G_BEGIN_DECLS
|
30
|
+
|
31
|
+
#define GSF_OUTPUT_STDIO_TYPE (gsf_output_stdio_get_type ())
|
32
|
+
#define GSF_OUTPUT_STDIO(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_OUTPUT_STDIO_TYPE, GsfOutputStdio))
|
33
|
+
#define GSF_IS_OUTPUT_STDIO(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_OUTPUT_STDIO_TYPE))
|
34
|
+
|
35
|
+
typedef struct _GsfOutputStdio GsfOutputStdio;
|
36
|
+
|
37
|
+
GType gsf_output_stdio_get_type (void) G_GNUC_CONST;
|
38
|
+
/* void gsf_output_stdio_register_type (GTypeModule *module); glib dynamic types are not thread safe */
|
39
|
+
|
40
|
+
GsfOutput *gsf_output_stdio_new (char const *filename, GError **err);
|
41
|
+
GsfOutput *gsf_output_stdio_new_full (char const *filename, GError **err,
|
42
|
+
char const *first_property_name,
|
43
|
+
...); /* G_GNUC_NULL_TERMINATED */
|
44
|
+
GsfOutput *gsf_output_stdio_new_valist (char const *filename, GError **err,
|
45
|
+
char const *first_property_name,
|
46
|
+
va_list var_args);
|
47
|
+
GsfOutput *gsf_output_stdio_new_FILE (char const *filename, FILE *file,
|
48
|
+
gboolean keep_open);
|
49
|
+
|
50
|
+
G_END_DECLS
|
51
|
+
|
52
|
+
#endif /* GSF_OUTPUT_STDIO_H */
|
@@ -0,0 +1,99 @@
|
|
1
|
+
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
|
2
|
+
/*
|
3
|
+
* gsf-output.h: interface for storing data
|
4
|
+
*
|
5
|
+
* Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org)
|
6
|
+
*
|
7
|
+
* This program is free software; you can redistribute it and/or
|
8
|
+
* modify it under the terms of version 2.1 of the GNU Lesser General Public
|
9
|
+
* License as published by the Free Software Foundation.
|
10
|
+
*
|
11
|
+
* This program is distributed in the hope that it will be useful,
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
|
+
* GNU General Public License for more details.
|
15
|
+
*
|
16
|
+
* You should have received a copy of the GNU Lesser General Public License
|
17
|
+
* along with this program; if not, write to the Free Software
|
18
|
+
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
|
19
|
+
* USA
|
20
|
+
*/
|
21
|
+
|
22
|
+
#ifndef GSF_OUTPUT_H
|
23
|
+
#define GSF_OUTPUT_H
|
24
|
+
|
25
|
+
#include <gsf/gsf-fwd.h>
|
26
|
+
#include <sys/types.h>
|
27
|
+
|
28
|
+
G_BEGIN_DECLS
|
29
|
+
|
30
|
+
typedef struct {
|
31
|
+
GObjectClass g_object_class;
|
32
|
+
|
33
|
+
gboolean (*Close) (GsfOutput *output);
|
34
|
+
gboolean (*Seek) (GsfOutput *output,
|
35
|
+
gsf_off_t offset, GSeekType whence);
|
36
|
+
gboolean (*Write) (GsfOutput *output,
|
37
|
+
size_t num_bytes, guint8 const *data);
|
38
|
+
gsf_off_t (*Vprintf) (GsfOutput *output,
|
39
|
+
char const *format, va_list args)
|
40
|
+
G_GNUC_PRINTF (2, 0);
|
41
|
+
} GsfOutputClass;
|
42
|
+
#define GSF_OUTPUT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GSF_OUTPUT_TYPE, GsfOutputClass))
|
43
|
+
#define GSF_IS_OUTPUT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSF_OUTPUT_TYPE))
|
44
|
+
|
45
|
+
struct _GsfOutput {
|
46
|
+
GObject g_object;
|
47
|
+
|
48
|
+
/*< protected >*/
|
49
|
+
gsf_off_t cur_size, cur_offset;
|
50
|
+
char *name;
|
51
|
+
GObject *wrapped_by;
|
52
|
+
GsfOutfile *container;
|
53
|
+
GError *err;
|
54
|
+
gboolean is_closed;
|
55
|
+
|
56
|
+
char *printf_buf;
|
57
|
+
int printf_buf_size;
|
58
|
+
};
|
59
|
+
#define GSF_OUTPUT_TYPE (gsf_output_get_type ())
|
60
|
+
#define GSF_OUTPUT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_OUTPUT_TYPE, GsfOutput))
|
61
|
+
#define GSF_IS_OUTPUT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_OUTPUT_TYPE))
|
62
|
+
|
63
|
+
GType gsf_output_get_type (void) G_GNUC_CONST;
|
64
|
+
/* void gsf_output_register_type (GTypeModule *module); glib dynamic types are not thread safe */
|
65
|
+
|
66
|
+
char const *gsf_output_name (GsfOutput const *output);
|
67
|
+
GsfOutfile *gsf_output_container (GsfOutput const *output);
|
68
|
+
|
69
|
+
GError const *gsf_output_error (GsfOutput const *output);
|
70
|
+
gboolean gsf_output_set_error (GsfOutput *output,
|
71
|
+
gint code,
|
72
|
+
char const *format,
|
73
|
+
...) G_GNUC_PRINTF (3, 4);
|
74
|
+
|
75
|
+
gsf_off_t gsf_output_size (GsfOutput *output);
|
76
|
+
gboolean gsf_output_close (GsfOutput *output);
|
77
|
+
gboolean gsf_output_is_closed (GsfOutput const *output);
|
78
|
+
gsf_off_t gsf_output_tell (GsfOutput *output);
|
79
|
+
gboolean gsf_output_seek (GsfOutput *output,
|
80
|
+
gsf_off_t offset, GSeekType whence);
|
81
|
+
gboolean gsf_output_write (GsfOutput *output,
|
82
|
+
size_t num_bytes, guint8 const *data);
|
83
|
+
|
84
|
+
gboolean gsf_output_wrap (GObject *wrapper, GsfOutput *wrapee);
|
85
|
+
gboolean gsf_output_unwrap (GObject *wrapper, GsfOutput *wrapee);
|
86
|
+
|
87
|
+
GDateTime * gsf_output_get_modtime (GsfOutput *output);
|
88
|
+
|
89
|
+
GQuark gsf_output_error_id (void);
|
90
|
+
|
91
|
+
gboolean gsf_output_printf (GsfOutput *output, char const *format,
|
92
|
+
...) G_GNUC_PRINTF (2, 3);
|
93
|
+
gsf_off_t gsf_output_vprintf (GsfOutput *output, char const *format,
|
94
|
+
va_list args) G_GNUC_PRINTF (2, 0);
|
95
|
+
gboolean gsf_output_puts (GsfOutput *output, char const *line);
|
96
|
+
|
97
|
+
G_END_DECLS
|
98
|
+
|
99
|
+
#endif /* GSF_OUTPUT_H */
|
@@ -0,0 +1,51 @@
|
|
1
|
+
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
|
2
|
+
/*
|
3
|
+
* gsf-shared-memory.h
|
4
|
+
*
|
5
|
+
* Copyright (C) 2002-2006 Morten Welinder (terra@diku.dk)
|
6
|
+
*
|
7
|
+
* This program is free software; you can redistribute it and/or
|
8
|
+
* modify it under the terms of version 2.1 of the GNU Lesser General Public
|
9
|
+
* License as published by the Free Software Foundation.
|
10
|
+
*
|
11
|
+
* This program is distributed in the hope that it will be useful,
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
|
+
* GNU General Public License for more details.
|
15
|
+
*
|
16
|
+
* You should have received a copy of the GNU Lesser General Public License
|
17
|
+
* along with this program; if not, write to the Free Software
|
18
|
+
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
|
19
|
+
* USA
|
20
|
+
*/
|
21
|
+
|
22
|
+
#ifndef GSF_SHARED_MEMORY_H
|
23
|
+
#define GSF_SHARED_MEMORY_H
|
24
|
+
|
25
|
+
#include <gsf/gsf-fwd.h>
|
26
|
+
|
27
|
+
G_BEGIN_DECLS
|
28
|
+
|
29
|
+
#define GSF_SHARED_MEMORY_TYPE (gsf_shared_memory_get_type ())
|
30
|
+
#define GSF_SHARED_MEMORY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_SHARED_MEMORY_TYPE, GsfSharedMemory))
|
31
|
+
#define GSF_IS_SHARED_MEMORY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_SHARED_MEMORY_TYPE))
|
32
|
+
|
33
|
+
typedef struct _GsfSharedMemory GsfSharedMemory;
|
34
|
+
struct _GsfSharedMemory {
|
35
|
+
GObject g_object;
|
36
|
+
void *buf;
|
37
|
+
gsf_off_t size;
|
38
|
+
|
39
|
+
gboolean needs_free;
|
40
|
+
gboolean needs_unmap;
|
41
|
+
};
|
42
|
+
|
43
|
+
GType gsf_shared_memory_get_type (void) G_GNUC_CONST;
|
44
|
+
/* void gsf_shared_memory_register_type (GTypeModule *module); glib dynamic types are not thread safe */
|
45
|
+
|
46
|
+
GsfSharedMemory *gsf_shared_memory_new (void *buf, gsf_off_t size, gboolean needs_free);
|
47
|
+
GsfSharedMemory *gsf_shared_memory_mmapped_new (void *buf, gsf_off_t size);
|
48
|
+
|
49
|
+
G_END_DECLS
|
50
|
+
|
51
|
+
#endif /* GSF_SHARED_MEMORY_H */
|
@@ -0,0 +1,45 @@
|
|
1
|
+
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
|
2
|
+
/*
|
3
|
+
* gsf-structured-blob.h: Utility storage to blob in/out a tree of data
|
4
|
+
*
|
5
|
+
* Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org)
|
6
|
+
*
|
7
|
+
* This program is free software; you can redistribute it and/or
|
8
|
+
* modify it under the terms of version 2.1 of the GNU Lesser General Public
|
9
|
+
* License as published by the Free Software Foundation.
|
10
|
+
*
|
11
|
+
* This program is distributed in the hope that it will be useful,
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
|
+
* GNU General Public License for more details.
|
15
|
+
*
|
16
|
+
* You should have received a copy of the GNU Lesser General Public License
|
17
|
+
* along with this program; if not, write to the Free Software
|
18
|
+
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
|
19
|
+
* USA
|
20
|
+
*/
|
21
|
+
|
22
|
+
#ifndef GSF_STRUCTURED_BLOB_H
|
23
|
+
#define GSF_STRUCTURED_BLOB_H
|
24
|
+
|
25
|
+
#include <gsf/gsf-fwd.h>
|
26
|
+
|
27
|
+
G_BEGIN_DECLS
|
28
|
+
|
29
|
+
#define GSF_STRUCTURED_BLOB_TYPE (gsf_structured_blob_get_type ())
|
30
|
+
#define GSF_STRUCTURED_BLOB(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_STRUCTURED_BLOB_TYPE, GsfStructuredBlob))
|
31
|
+
#define GSF_IS_STRUCTURED_BLOB(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_STRUCTURED_BLOB_TYPE))
|
32
|
+
|
33
|
+
typedef struct _GsfStructuredBlob GsfStructuredBlob;
|
34
|
+
|
35
|
+
/* inherits from GsfInfile */
|
36
|
+
GType gsf_structured_blob_get_type (void) G_GNUC_CONST;
|
37
|
+
/* void gsf_structured_blob_register_type (GTypeModule *module); glib dynamic types are not thread safe */
|
38
|
+
|
39
|
+
GsfStructuredBlob *gsf_structured_blob_read (GsfInput *input);
|
40
|
+
gboolean gsf_structured_blob_write (GsfStructuredBlob *blob,
|
41
|
+
GsfOutfile *container);
|
42
|
+
|
43
|
+
G_END_DECLS
|
44
|
+
|
45
|
+
#endif /* GSF_STRUCTURED_BLOB_H */
|
@@ -0,0 +1,70 @@
|
|
1
|
+
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
|
2
|
+
/*
|
3
|
+
* gsf-timestamp.h: A useful little type for metadata, contains a superset of
|
4
|
+
* all the features it would be nice to have.
|
5
|
+
*
|
6
|
+
* Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org)
|
7
|
+
*
|
8
|
+
* This program is free software; you can redistribute it and/or
|
9
|
+
* modify it under the terms of version 2.1 of the GNU Lesser General Public
|
10
|
+
* License as published by the Free Software Foundation.
|
11
|
+
*
|
12
|
+
* This program is distributed in the hope that it will be useful,
|
13
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
+
* GNU General Public License for more details.
|
16
|
+
*
|
17
|
+
* You should have received a copy of the GNU Lesser General Public License
|
18
|
+
* along with this program; if not, write to the Free Software
|
19
|
+
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
|
20
|
+
* USA
|
21
|
+
*/
|
22
|
+
|
23
|
+
#ifndef GSF_TIMESTAMP_H
|
24
|
+
#define GSF_TIMESTAMP_H
|
25
|
+
|
26
|
+
#include <gsf/gsf-fwd.h>
|
27
|
+
|
28
|
+
G_BEGIN_DECLS
|
29
|
+
|
30
|
+
#define GSF_TIMESTAMP_TYPE (gsf_timestamp_get_type ())
|
31
|
+
#define VAL_IS_GSF_TIMESTAMP(v) (G_TYPE_CHECK_VALUE_TYPE((v), GSF_TIMESTAMP_TYPE))
|
32
|
+
|
33
|
+
struct _GsfTimestamp {
|
34
|
+
GDate date; /* In local timezone */
|
35
|
+
glong seconds; /* time of day */
|
36
|
+
GString time_zone; /* possibly blank */
|
37
|
+
|
38
|
+
guint32 timet;
|
39
|
+
};
|
40
|
+
|
41
|
+
GType gsf_timestamp_get_type (void) G_GNUC_CONST;
|
42
|
+
/* void gsf_timestamp_register_type (GTypeModule *module); glib dynamic types are not thread safe */
|
43
|
+
|
44
|
+
GsfTimestamp *gsf_timestamp_new (void);
|
45
|
+
|
46
|
+
GsfTimestamp *gsf_timestamp_copy (GsfTimestamp const *stamp);
|
47
|
+
void gsf_timestamp_free (GsfTimestamp *stamp);
|
48
|
+
int gsf_timestamp_load_from_string (GsfTimestamp *stamp, char const *spec);
|
49
|
+
char *gsf_timestamp_as_string (GsfTimestamp const *stamp);
|
50
|
+
guint gsf_timestamp_hash (GsfTimestamp const *stamp);
|
51
|
+
gboolean gsf_timestamp_equal (GsfTimestamp const *a,
|
52
|
+
GsfTimestamp const *b);
|
53
|
+
|
54
|
+
void gsf_timestamp_set_time (GsfTimestamp *stamp, guint64 t);
|
55
|
+
|
56
|
+
void gsf_timestamp_to_value (GsfTimestamp const *stamp, GValue *value);
|
57
|
+
|
58
|
+
/* Deprecated */
|
59
|
+
#ifndef GSF_DISABLE_DEPRECATED
|
60
|
+
GSF_DEPRECATED_FOR(gsf_timestamp_to_value)
|
61
|
+
void gsf_value_set_timestamp (GValue *value, GsfTimestamp const *stamp);
|
62
|
+
GSF_DEPRECATED_FOR(gsf_timestamp_load_from_string)
|
63
|
+
int gsf_timestamp_from_string (char const *spec, GsfTimestamp *stamp);
|
64
|
+
GSF_DEPRECATED_FOR(gsf_timestamp_load_from_string)
|
65
|
+
int gsf_timestamp_parse (char const *spec, GsfTimestamp *stamp);
|
66
|
+
#endif
|
67
|
+
|
68
|
+
G_END_DECLS
|
69
|
+
|
70
|
+
#endif /* GSF_TIMESTAMP_H */
|
@@ -0,0 +1,340 @@
|
|
1
|
+
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
|
2
|
+
/*
|
3
|
+
* gsf-utils.h:
|
4
|
+
*
|
5
|
+
* Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org)
|
6
|
+
*
|
7
|
+
* This program is free software; you can redistribute it and/or
|
8
|
+
* modify it under the terms of version 2.1 of the GNU Lesser General Public
|
9
|
+
* License as published by the Free Software Foundation.
|
10
|
+
*
|
11
|
+
* This program is distributed in the hope that it will be useful,
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
|
+
* GNU General Public License for more details.
|
15
|
+
*
|
16
|
+
* You should have received a copy of the GNU Lesser General Public License
|
17
|
+
* along with this program; if not, write to the Free Software
|
18
|
+
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
|
19
|
+
* USA
|
20
|
+
*/
|
21
|
+
|
22
|
+
#ifndef GSF_UTILS_H
|
23
|
+
#define GSF_UTILS_H
|
24
|
+
|
25
|
+
#include <gsf/gsf-fwd.h>
|
26
|
+
|
27
|
+
G_BEGIN_DECLS
|
28
|
+
|
29
|
+
/* Do this the ugly way so that we don't have to worry about alignment */
|
30
|
+
|
31
|
+
/**
|
32
|
+
* GSF_LE_GET_GUINT8:
|
33
|
+
* @p: pointer to storage
|
34
|
+
*
|
35
|
+
* Interpret binary data as an unsigned 8-bit integer in little endian order.
|
36
|
+
*
|
37
|
+
* Returns: interpreted data
|
38
|
+
*/
|
39
|
+
#define GSF_LE_GET_GUINT8(p) (*(guint8 const *)(p))
|
40
|
+
|
41
|
+
/**
|
42
|
+
* GSF_LE_GET_GUINT16:
|
43
|
+
* @p: pointer to storage
|
44
|
+
*
|
45
|
+
* Interpret binary data as an unsigned 16-bit integer in little endian order.
|
46
|
+
*
|
47
|
+
* Returns: interpreted data
|
48
|
+
*/
|
49
|
+
#define GSF_LE_GET_GUINT16(p) \
|
50
|
+
(guint16)((((guint8 const *)(p))[0] << 0) | \
|
51
|
+
(((guint8 const *)(p))[1] << 8))
|
52
|
+
|
53
|
+
/**
|
54
|
+
* GSF_LE_GET_GUINT32:
|
55
|
+
* @p: pointer to storage
|
56
|
+
*
|
57
|
+
* Interpret binary data as an unsigned 32-bit integer in little endian order.
|
58
|
+
*
|
59
|
+
* Returns: interpreted data
|
60
|
+
*/
|
61
|
+
#define GSF_LE_GET_GUINT32(p) \
|
62
|
+
(guint32)(((guint32)((guint8 const *)(p))[0] << 0) | \
|
63
|
+
((guint32)((guint8 const *)(p))[1] << 8) | \
|
64
|
+
((guint32)((guint8 const *)(p))[2] << 16) | \
|
65
|
+
((guint32)((guint8 const *)(p))[3] << 24))
|
66
|
+
|
67
|
+
/**
|
68
|
+
* GSF_LE_GET_GUINT64:
|
69
|
+
* @p: pointer to storage
|
70
|
+
*
|
71
|
+
* Interpret binary data as an unsigned 64-bit integer in little endian order.
|
72
|
+
*
|
73
|
+
* Returns: interpreted data
|
74
|
+
*/
|
75
|
+
#define GSF_LE_GET_GUINT64(p) (gsf_le_get_guint64 (p))
|
76
|
+
|
77
|
+
/**
|
78
|
+
* GSF_LE_GET_GINT8:
|
79
|
+
* @p: pointer to storage
|
80
|
+
*
|
81
|
+
* Interpret binary data as a signed 8-bit integer in little endian order.
|
82
|
+
*
|
83
|
+
* Returns: interpreted data
|
84
|
+
*/
|
85
|
+
#define GSF_LE_GET_GINT8(p) ((gint8)GSF_LE_GET_GUINT8(p))
|
86
|
+
|
87
|
+
/**
|
88
|
+
* GSF_LE_GET_GINT16:
|
89
|
+
* @p: pointer to storage
|
90
|
+
*
|
91
|
+
* Interpret binary data as a signed 16-bit integer in little endian order.
|
92
|
+
*
|
93
|
+
* Returns: interpreted data
|
94
|
+
*/
|
95
|
+
#define GSF_LE_GET_GINT16(p) ((gint16)GSF_LE_GET_GUINT16(p))
|
96
|
+
|
97
|
+
/**
|
98
|
+
* GSF_LE_GET_GINT32:
|
99
|
+
* @p: pointer to storage
|
100
|
+
*
|
101
|
+
* Interpret binary data as a signed 32-bit integer in little endian order.
|
102
|
+
*
|
103
|
+
* Returns: interpreted data
|
104
|
+
*/
|
105
|
+
#define GSF_LE_GET_GINT32(p) ((gint32)GSF_LE_GET_GUINT32(p))
|
106
|
+
|
107
|
+
/**
|
108
|
+
* GSF_LE_GET_GINT64:
|
109
|
+
* @p: pointer to storage
|
110
|
+
*
|
111
|
+
* Interpret binary data as a signed 64-bit integer in little endian order.
|
112
|
+
*
|
113
|
+
* Returns: interpreted data
|
114
|
+
*/
|
115
|
+
#define GSF_LE_GET_GINT64(p) ((gint64)GSF_LE_GET_GUINT64(p))
|
116
|
+
|
117
|
+
/**
|
118
|
+
* GSF_LE_GET_FLOAT:
|
119
|
+
* @p: pointer to storage
|
120
|
+
*
|
121
|
+
* Interpret binary data as a float in little endian order.
|
122
|
+
*
|
123
|
+
* Returns: interpreted data
|
124
|
+
*/
|
125
|
+
#define GSF_LE_GET_FLOAT(p) (gsf_le_get_float (p))
|
126
|
+
|
127
|
+
/**
|
128
|
+
* GSF_LE_GET_DOUBLE:
|
129
|
+
* @p: pointer to storage
|
130
|
+
*
|
131
|
+
* Interpret binary data as a double in little endian order.
|
132
|
+
*
|
133
|
+
* Returns: interpreted data
|
134
|
+
*/
|
135
|
+
#define GSF_LE_GET_DOUBLE(p) (gsf_le_get_double (p))
|
136
|
+
|
137
|
+
guint64 gsf_le_get_guint64 (void const *p);
|
138
|
+
float gsf_le_get_float (void const *p);
|
139
|
+
double gsf_le_get_double (void const *p);
|
140
|
+
|
141
|
+
/**
|
142
|
+
* GSF_LE_SET_GUINT8:
|
143
|
+
* @p: pointer to storage
|
144
|
+
* @dat: 8-bit unsigned integer
|
145
|
+
*
|
146
|
+
* Store @dat in little endian order in memory pointed to by @p.
|
147
|
+
*/
|
148
|
+
#define GSF_LE_SET_GUINT8(p, dat) \
|
149
|
+
(*((guint8 *)(p)) = ((dat) & 0xff))
|
150
|
+
|
151
|
+
/**
|
152
|
+
* GSF_LE_SET_GUINT16:
|
153
|
+
* @p: pointer to storage
|
154
|
+
* @dat: 16-bit unsigned integer
|
155
|
+
*
|
156
|
+
* Store @dat in little endian order in memory pointed to by @p.
|
157
|
+
*/
|
158
|
+
#define GSF_LE_SET_GUINT16(p, dat) \
|
159
|
+
((*((guint8 *)(p) + 0) = (guint8)((guint16)(dat)) & 0xff), \
|
160
|
+
(*((guint8 *)(p) + 1) = (guint8)((guint16)(dat) >> 8) & 0xff))
|
161
|
+
|
162
|
+
/**
|
163
|
+
* GSF_LE_SET_GUINT32:
|
164
|
+
* @p: pointer to storage
|
165
|
+
* @dat: 32-bit unsigned integer
|
166
|
+
*
|
167
|
+
* Store @dat in little endian order in memory pointed to by @p.
|
168
|
+
*/
|
169
|
+
#define GSF_LE_SET_GUINT32(p, dat) \
|
170
|
+
((*((guint8 *)(p) + 0) = (guint8)((guint32)(dat)) & 0xff), \
|
171
|
+
(*((guint8 *)(p) + 1) = (guint8)((guint32)(dat) >> 8) & 0xff), \
|
172
|
+
(*((guint8 *)(p) + 2) = (guint8)((guint32)(dat) >> 16) & 0xff), \
|
173
|
+
(*((guint8 *)(p) + 3) = (guint8)((guint32)(dat) >> 24) & 0xff))
|
174
|
+
|
175
|
+
/**
|
176
|
+
* GSF_LE_SET_GUINT64:
|
177
|
+
* @p: pointer to storage
|
178
|
+
* @dat: 64-bit unsigned integer
|
179
|
+
*
|
180
|
+
* Store @dat in little endian order in memory pointed to by @p.
|
181
|
+
*/
|
182
|
+
#define GSF_LE_SET_GUINT64(p, dat) \
|
183
|
+
((*((guint8 *)(p) + 0) = (guint8)((guint64)(dat)) & 0xff), \
|
184
|
+
(*((guint8 *)(p) + 1) = (guint8)((guint64)(dat) >> 8) & 0xff), \
|
185
|
+
(*((guint8 *)(p) + 2) = (guint8)((guint64)(dat) >> 16) & 0xff), \
|
186
|
+
(*((guint8 *)(p) + 3) = (guint8)((guint64)(dat) >> 24) & 0xff), \
|
187
|
+
(*((guint8 *)(p) + 4) = (guint8)((guint64)(dat) >> 32) & 0xff), \
|
188
|
+
(*((guint8 *)(p) + 5) = (guint8)((guint64)(dat) >> 40) & 0xff), \
|
189
|
+
(*((guint8 *)(p) + 6) = (guint8)((guint64)(dat) >> 48) & 0xff), \
|
190
|
+
(*((guint8 *)(p) + 7) = (guint8)((guint64)(dat) >> 56) & 0xff))
|
191
|
+
|
192
|
+
/**
|
193
|
+
* GSF_LE_SET_GINT8:
|
194
|
+
* @p: pointer to storage
|
195
|
+
* @dat: 8-bit signed integer
|
196
|
+
*
|
197
|
+
* Store @dat in little endian order in memory pointed to by @p.
|
198
|
+
*/
|
199
|
+
#define GSF_LE_SET_GINT8(p,dat) GSF_LE_SET_GUINT8((p),(dat))
|
200
|
+
|
201
|
+
/**
|
202
|
+
* GSF_LE_SET_GINT16:
|
203
|
+
* @p: pointer to storage
|
204
|
+
* @dat: 16-bit signed integer
|
205
|
+
*
|
206
|
+
* Store @dat in little endian order in memory pointed to by @p.
|
207
|
+
*/
|
208
|
+
#define GSF_LE_SET_GINT16(p,dat) GSF_LE_SET_GUINT16((p),(dat))
|
209
|
+
|
210
|
+
/**
|
211
|
+
* GSF_LE_SET_GINT32:
|
212
|
+
* @p: pointer to storage
|
213
|
+
* @dat: 32-bit signed integer
|
214
|
+
*
|
215
|
+
* Store @dat in little endian order in memory pointed to by @p.
|
216
|
+
*/
|
217
|
+
#define GSF_LE_SET_GINT32(p,dat) GSF_LE_SET_GUINT32((p),(dat))
|
218
|
+
|
219
|
+
/**
|
220
|
+
* GSF_LE_SET_GINT64:
|
221
|
+
* @p: pointer to storage
|
222
|
+
* @dat: 64-bit signed integer
|
223
|
+
*
|
224
|
+
* Store @dat in little endian order in memory pointed to by @p.
|
225
|
+
*/
|
226
|
+
#define GSF_LE_SET_GINT64(p,dat) GSF_LE_SET_GUINT64((p),(dat))
|
227
|
+
|
228
|
+
/**
|
229
|
+
* GSF_LE_SET_FLOAT:
|
230
|
+
* @p: pointer to storage
|
231
|
+
* @dat: float to be stored
|
232
|
+
*
|
233
|
+
* Store @dat in little endian order in memory pointed to by @p.
|
234
|
+
*/
|
235
|
+
#define GSF_LE_SET_FLOAT(p,dat) gsf_le_set_float((p),(dat))
|
236
|
+
|
237
|
+
/**
|
238
|
+
* GSF_LE_SET_DOUBLE:
|
239
|
+
* @p: pointer to storage
|
240
|
+
* @dat: double to be stored
|
241
|
+
*
|
242
|
+
* Store @dat in little endian order in memory pointed to by @p.
|
243
|
+
*/
|
244
|
+
#define GSF_LE_SET_DOUBLE(p,dat) gsf_le_set_double((p),(dat))
|
245
|
+
|
246
|
+
void gsf_le_set_float (void *p, float f);
|
247
|
+
void gsf_le_set_double (void *p, double d);
|
248
|
+
|
249
|
+
void gsf_init (void);
|
250
|
+
void gsf_shutdown (void);
|
251
|
+
void gsf_init_dynamic (GTypeModule *module);
|
252
|
+
void gsf_shutdown_dynamic (GTypeModule *module);
|
253
|
+
gboolean gsf_debug_flag (const char *flag);
|
254
|
+
|
255
|
+
/* Debugging utilities */
|
256
|
+
void gsf_mem_dump (guint8 const *ptr, size_t len);
|
257
|
+
void gsf_input_dump (GsfInput *input, gboolean dump_as_hex);
|
258
|
+
|
259
|
+
/* base64 encoding utilities */
|
260
|
+
guint8 *gsf_base64_encode_simple (guint8 const *data, size_t len);
|
261
|
+
size_t gsf_base64_encode_close (guint8 const *in, size_t inlen,
|
262
|
+
gboolean break_lines, guint8 *out,
|
263
|
+
int *state, guint *save);
|
264
|
+
size_t gsf_base64_encode_step (guint8 const *in, size_t len,
|
265
|
+
gboolean break_lines, guint8 *out,
|
266
|
+
int *state, guint *save);
|
267
|
+
|
268
|
+
size_t gsf_base64_decode_simple (guint8 *data, size_t len);
|
269
|
+
size_t gsf_base64_decode_step (guint8 const *in, size_t len,
|
270
|
+
guint8 *out, int *state, guint *save);
|
271
|
+
|
272
|
+
|
273
|
+
/* For putting filenames into error messages. */
|
274
|
+
char *gsf_filename_to_utf8 (char const *filename, gboolean quoted);
|
275
|
+
|
276
|
+
/* Some version checking */
|
277
|
+
|
278
|
+
/**
|
279
|
+
* libgsf_major_version:
|
280
|
+
*
|
281
|
+
* Major version number of libgsf, indicating the ABI version.
|
282
|
+
*/
|
283
|
+
extern int libgsf_major_version;
|
284
|
+
|
285
|
+
/**
|
286
|
+
* libgsf_minor_version:
|
287
|
+
*
|
288
|
+
* Minor (secondary) version number of libgsf, indicating the API version.
|
289
|
+
*/
|
290
|
+
extern int libgsf_minor_version;
|
291
|
+
|
292
|
+
/**
|
293
|
+
* libgsf_micro_version:
|
294
|
+
*
|
295
|
+
* Micro (tertiary) version number of libgsf, indicating bug fixes.
|
296
|
+
*/
|
297
|
+
extern int libgsf_micro_version;
|
298
|
+
|
299
|
+
char const *gsf_extension_pointer (char const * path);
|
300
|
+
void gsf_iconv_close (GIConv handle);
|
301
|
+
|
302
|
+
void gsf_property_settings_collect_valist (GType object_type,
|
303
|
+
GParameter **p_params,
|
304
|
+
size_t *p_n_params,
|
305
|
+
const gchar *first_property_name,
|
306
|
+
va_list var_args);
|
307
|
+
void gsf_property_settings_collect (GType object_type,
|
308
|
+
GParameter **p_params,
|
309
|
+
size_t *p_n_params,
|
310
|
+
const gchar *first_property_name,
|
311
|
+
...);
|
312
|
+
const GParameter *gsf_property_settings_find (const char *name,
|
313
|
+
const GParameter *params,
|
314
|
+
size_t n_params);
|
315
|
+
void gsf_property_settings_free (GParameter *params,
|
316
|
+
size_t n_params);
|
317
|
+
|
318
|
+
|
319
|
+
|
320
|
+
/* Errors */
|
321
|
+
|
322
|
+
#define GSF_ERROR (gsf_error_quark ())
|
323
|
+
|
324
|
+
/**
|
325
|
+
* GsfError:
|
326
|
+
* @GSF_ERROR_OUT_OF_MEMORY: Memory allocation failed
|
327
|
+
* @GSF_ERROR_INVALID_DATA: Invalid data encountered (e.g. not enough data)
|
328
|
+
*/
|
329
|
+
|
330
|
+
typedef enum {
|
331
|
+
GSF_ERROR_OUT_OF_MEMORY,
|
332
|
+
GSF_ERROR_INVALID_DATA
|
333
|
+
} GsfError;
|
334
|
+
|
335
|
+
GQuark gsf_error_quark (void);
|
336
|
+
|
337
|
+
|
338
|
+
G_END_DECLS
|
339
|
+
|
340
|
+
#endif /* GSF_UTILS_H */
|