-
Notifications
You must be signed in to change notification settings - Fork 65
Expand file tree
/
Copy pathAndroid.Gms.Games.SnapshotContentsClass.cs
More file actions
68 lines (61 loc) · 2.41 KB
/
Android.Gms.Games.SnapshotContentsClass.cs
File metadata and controls
68 lines (61 loc) · 2.41 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
using System;
using Android.Runtime;
using Java.IO;
using Java.Interop;
namespace Android.Gms.Games.Snapshot
{
[Register("com/google/android/gms/games/snapshot/SnapshotContents", DoNotGenerateAcw = true)]
public sealed partial class SnapshotContents : Java.Lang.Object
{
static readonly JniPeerMembers _members =
new XAPeerMembers("com/google/android/gms/games/snapshot/SnapshotContents", typeof(SnapshotContents));
internal SnapshotContents(IntPtr handle, JniHandleOwnership transfer) : base(handle, transfer) { }
public override JniPeerMembers JniPeerMembers => _members;
protected override IntPtr ThresholdClass => _members.JniPeerType.PeerReference.Handle;
protected override Type ThresholdType => _members.ManagedPeerType;
[Register("readFully", "()[B", "")]
public unsafe byte[] ReadFully()
{
const string __id = "readFully.()[B";
var __rm = _members.InstanceMethods.InvokeVirtualObjectMethod(__id, this, null);
return (byte[])JNIEnv.GetArray(__rm.Handle, JniHandleOwnership.TransferLocalRef, typeof(byte));
}
[Register("writeBytes", "([B)Z", "")]
public unsafe bool WriteBytes(byte[] data)
{
const string __id = "writeBytes.([B)Z";
IntPtr native_data = JNIEnv.NewArray(data);
try
{
JniArgumentValue* __args = stackalloc JniArgumentValue[1];
__args[0] = new JniArgumentValue(native_data);
var __rm = _members.InstanceMethods.InvokeVirtualBooleanMethod(__id, this, __args);
return __rm;
}
finally
{
if (data != null)
{
JNIEnv.CopyArray(native_data, data);
JNIEnv.DeleteLocalRef(native_data);
}
}
}
[Register("close", "()V", "")]
public unsafe void Close()
{
const string __id = "close.()V";
_members.InstanceMethods.InvokeVirtualVoidMethod(__id, this, null);
}
[Register("isClosed", "()Z", "")]
public unsafe bool IsClosed
{
get
{
const string __id = "isClosed.()Z";
var __rm = _members.InstanceMethods.InvokeVirtualBooleanMethod(__id, this, null);
return __rm;
}
}
}
}