2010-03-05 Rodrigo Kumpera <rkumpera@novell.com>
[mcs.git] / class / WindowsBase / ZipSharp / IOFunctions.cs
blobade29a8910bd612d11012b43d3be136fe778ef7c
1 // IOFunctions.cs created with MonoDevelop
2 // User: alan at 14:43 20/10/2008
3 //
4 // To change standard headers go to Edit->Preferences->Coding->Standard Headers
5 //
7 using System;
8 using System.Runtime.InteropServices;
10 namespace zipsharp
12 // this matches a native 'enum', don't modify
13 enum Append
15 Create = 0,
16 CreateAfter = 1,
17 AddInZip = 2
20 internal delegate IntPtr OpenFileFunc (IntPtr opaque, string filename, int mode);
22 internal delegate /* ulong */ IntPtr ReadFileFunc (IntPtr opaque, IntPtr stream, IntPtr buffer, /* ulong */ IntPtr size);
23 internal delegate /* ulong */ IntPtr WriteFileFunc (IntPtr opaque, IntPtr stream, IntPtr buffer, /* ulong */ IntPtr size);
25 internal delegate /* long */ IntPtr TellFileFunc (IntPtr opaque, IntPtr stream);
26 internal delegate /* long */ IntPtr SeekFileFunc (IntPtr opaque, IntPtr stream, /* ulong */ IntPtr offset, int origin);
28 internal delegate int CloseFileFunc (IntPtr opaque, IntPtr stream);
29 internal delegate int TestErrorFileFunc (IntPtr opaque, IntPtr stream);
31 [StructLayout (LayoutKind.Sequential)]
32 internal struct ZlibFileFuncDef
34 [MarshalAs (UnmanagedType.FunctionPtr)] public OpenFileFunc zopen_file;
35 [MarshalAs (UnmanagedType.FunctionPtr)] public ReadFileFunc zread_file;
36 [MarshalAs (UnmanagedType.FunctionPtr)] public WriteFileFunc zwrite_file;
37 [MarshalAs (UnmanagedType.FunctionPtr)] public TellFileFunc ztell_file;
38 [MarshalAs (UnmanagedType.FunctionPtr)] public SeekFileFunc zseek_file;
39 [MarshalAs (UnmanagedType.FunctionPtr)] public CloseFileFunc zclose_file;
40 [MarshalAs (UnmanagedType.FunctionPtr)] public TestErrorFileFunc zerror_file;
41 [MarshalAs (UnmanagedType.FunctionPtr)] public IntPtr opaque;