BlueGit

blue-star ggj-2020

Files

ggj-2020 / Assets / Oculus / Platform / Scripts / Models / HttpTransferUpdate.cs

HttpTransferUpdate.cs

Project Import
timfa Tim Falken · pushed by timfa · 6 years ago
b77834a1 History
HttpTransferUpdate.cs 697 B Download Raw
1namespace Oculus.Platform.Models
2{
3 using System;
4 using System.Collections;
5 using System.Collections.Generic;
6 using System.Runtime.InteropServices;
7 using Oculus.Platform.Models;
8 using UnityEngine;
9
10 public class HttpTransferUpdate
11 {
12 public readonly UInt64 ID;
13 public readonly byte[] Payload;
14 public readonly bool IsCompleted;
15
16 public HttpTransferUpdate(IntPtr o)
17 {
18 ID = CAPI.ovr_HttpTransferUpdate_GetID(o);
19 IsCompleted = CAPI.ovr_HttpTransferUpdate_IsCompleted(o);
20
21 long size = (long) CAPI.ovr_HttpTransferUpdate_GetSize(o);
22
23 Payload = new byte[size];
24 Marshal.Copy(CAPI.ovr_Packet_GetBytes(o), Payload, 0, (int) size);
25 }
26 }
27
28}