forked from libgit2/libgit2sharp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGitSmartSubtransportStream.cs
More file actions
41 lines (31 loc) · 1.1 KB
/
GitSmartSubtransportStream.cs
File metadata and controls
41 lines (31 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
using System;
using System.Runtime.InteropServices;
namespace LibGit2Sharp.Core
{
[StructLayout(LayoutKind.Sequential)]
internal class GitSmartSubtransportStream
{
static GitSmartSubtransportStream()
{
GCHandleOffset = Marshal.OffsetOf(typeof(GitSmartSubtransportStream), "GCHandle").ToInt32();
}
public IntPtr SmartTransport;
public read_callback Read;
public write_callback Write;
public free_callback Free;
/* The libgit2 structure definition ends here. Subsequent fields are for libgit2sharp bookkeeping. */
public IntPtr GCHandle;
/* The following static fields are not part of the structure definition. */
public static int GCHandleOffset;
public delegate int read_callback(
IntPtr stream,
IntPtr buffer,
UIntPtr buf_size,
out UIntPtr bytes_read);
public delegate int write_callback(
IntPtr stream,
IntPtr buffer,
UIntPtr len);
public delegate void free_callback(IntPtr stream);
}
}