using Oculus.Platform.Models; using UnityEngine; namespace Oculus.Platform { public static class CloudStorage { public static Request Delete(string bucket, string key) { if (Core.IsInitialized()) { return new Request(CAPI.ovr_CloudStorage_Delete(bucket, key)); } return null; } public static Request Load(string bucket, string key) { if (Core.IsInitialized()) { return new Request(CAPI.ovr_CloudStorage_Load(bucket, key)); } return null; } public static Request LoadBucketMetadata(string bucket) { if (Core.IsInitialized()) { return new Request(CAPI.ovr_CloudStorage_LoadBucketMetadata(bucket)); } return null; } public static Request LoadConflictMetadata(string bucket, string key) { if (Core.IsInitialized()) { return new Request(CAPI.ovr_CloudStorage_LoadConflictMetadata(bucket, key)); } return null; } public static Request LoadHandle(string handle) { if (Core.IsInitialized()) { return new Request(CAPI.ovr_CloudStorage_LoadHandle(handle)); } return null; } public static Request LoadMetadata(string bucket, string key) { if (Core.IsInitialized()) { return new Request(CAPI.ovr_CloudStorage_LoadMetadata(bucket, key)); } return null; } public static Request ResolveKeepLocal(string bucket, string key, string remoteHandle) { if (Core.IsInitialized()) { return new Request(CAPI.ovr_CloudStorage_ResolveKeepLocal(bucket, key, remoteHandle)); } return null; } public static Request ResolveKeepRemote(string bucket, string key, string remoteHandle) { if (Core.IsInitialized()) { return new Request(CAPI.ovr_CloudStorage_ResolveKeepRemote(bucket, key, remoteHandle)); } return null; } public static Request Save(string bucket, string key, byte[] data, long counter, string extraData) { if (Core.IsInitialized()) { return new Request(CAPI.ovr_CloudStorage_Save(bucket, key, data, (data != null) ? ((uint)data.Length) : 0u, counter, extraData)); } return null; } public static Request GetNextCloudStorageMetadataListPage(CloudStorageMetadataList list) { if (!list.HasNextPage) { Debug.LogWarning("Oculus.Platform.GetNextCloudStorageMetadataListPage: List has no next page"); return null; } if (Core.IsInitialized()) { return new Request(CAPI.ovr_HTTP_GetWithMessageType(list.NextUrl, 1544004335)); } return null; } } }