summaryrefslogtreecommitdiffstats
path: root/src/io/file.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 11:50:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 11:50:49 +0000
commitc853ffb5b2f75f5a889ed2e3ef89b818a736e87a (patch)
tree7d13a0883bb7936b84d6ecdd7bc332b41ed04bee /src/io/file.h
parentInitial commit. (diff)
downloadinkscape-c853ffb5b2f75f5a889ed2e3ef89b818a736e87a.tar.xz
inkscape-c853ffb5b2f75f5a889ed2e3ef89b818a736e87a.zip
Adding upstream version 1.3+ds.upstream/1.3+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/io/file.h')
-rw-r--r--src/io/file.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/src/io/file.h b/src/io/file.h
new file mode 100644
index 0000000..82aa747
--- /dev/null
+++ b/src/io/file.h
@@ -0,0 +1,58 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * File operations (independent of GUI)
+ *
+ * Copyright (C) 2018 Tavmjong Bah
+ *
+ * The contents of this file may be used under the GNU General Public License Version 2 or later.
+ *
+ */
+
+#ifndef INK_FILE_IO_H
+#define INK_FILE_IO_H
+
+#include <string>
+
+namespace Gio {
+class File;
+}
+
+namespace Glib {
+class ustring;
+
+template <class T>
+class RefPtr;
+}
+
+class SPDocument;
+
+SPDocument* ink_file_new(const std::string &Template = "");
+SPDocument* ink_file_open(const Glib::ustring &data);
+SPDocument* ink_file_open(const Glib::RefPtr<Gio::File>& file, bool *cancelled = nullptr);
+
+namespace Inkscape {
+namespace IO {
+
+class TempFilename {
+ public:
+ TempFilename(const std::string &pattern);
+ ~TempFilename();
+
+ std::string get_filename() const { return _filename; }
+ private:
+ std::string _filename;
+ int _tempfd;
+};
+
+Glib::ustring find_original_file(Glib::ustring filepath, Glib::ustring name);
+
+}}
+
+// To do:
+// ink_file_save()
+// ink_file_export()
+// ink_file_import()
+
+
+
+#endif // INK_FILE_IO_H