More binary-bundling removal
[pdfmod:pdfmod.git] / lib / poppler-sharp / poppler-sharp / generated / Attachment.cs
1 // This file was generated by the Gtk# code generator.
2 // Any changes made will be lost if regenerated.
3
4 namespace Poppler {
5
6         using System;
7         using System.Collections;
8         using System.Runtime.InteropServices;
9
10 #region Autogenerated code
11         public class Attachment : GLib.Object {
12
13                 [Obsolete]
14                 protected Attachment(GLib.GType gtype) : base(gtype) {}
15                 public Attachment(IntPtr raw) : base(raw) {}
16
17                 protected Attachment() : base(IntPtr.Zero)
18                 {
19                         CreateNativeObject (new string [0], new GLib.Value [0]);
20                 }
21
22                 [DllImport("poppler-glib")]
23                 static extern unsafe bool poppler_attachment_save_to_callback(IntPtr raw, PopplerSharp.AttachmentSaveFuncNative save_func, IntPtr user_data, out IntPtr error);
24
25                 public unsafe bool SaveToCallback(Poppler.AttachmentSaveFunc save_func) {
26                         PopplerSharp.AttachmentSaveFuncWrapper save_func_wrapper = new PopplerSharp.AttachmentSaveFuncWrapper (save_func);
27                         IntPtr error = IntPtr.Zero;
28                         bool raw_ret = poppler_attachment_save_to_callback(Handle, save_func_wrapper.NativeDelegate, IntPtr.Zero, out error);
29                         bool ret = raw_ret;
30                         if (error != IntPtr.Zero) throw new GLib.GException (error);
31                         return ret;
32                 }
33
34                 [DllImport("poppler-glib")]
35                 static extern IntPtr poppler_attachment_get_type();
36
37                 public static new GLib.GType GType { 
38                         get {
39                                 IntPtr raw_ret = poppler_attachment_get_type();
40                                 GLib.GType ret = new GLib.GType(raw_ret);
41                                 return ret;
42                         }
43                 }
44
45                 [DllImport("poppler-glib")]
46                 static extern unsafe bool poppler_attachment_save(IntPtr raw, IntPtr filename, out IntPtr error);
47
48                 public unsafe bool Save(string filename) {
49                         IntPtr native_filename = GLib.Marshaller.StringToPtrGStrdup (filename);
50                         IntPtr error = IntPtr.Zero;
51                         bool raw_ret = poppler_attachment_save(Handle, native_filename, out error);
52                         bool ret = raw_ret;
53                         GLib.Marshaller.Free (native_filename);
54                         if (error != IntPtr.Zero) throw new GLib.GException (error);
55                         return ret;
56                 }
57
58 #endregion
59         }
60 }