diff --git a/Runtime/Scripts/REST/RelocalizationInformationRequest.cs b/Runtime/Scripts/REST/RelocalizationInformationRequest.cs new file mode 100644 index 0000000000000000000000000000000000000000..87c49b770f393ac4db9380db9b2785ec22b9e455 --- /dev/null +++ b/Runtime/Scripts/REST/RelocalizationInformationRequest.cs @@ -0,0 +1,55 @@ +// +// ARF - Augmented Reality Framework (ETSI ISG ARF) +// +// Copyright 2024 ETSI +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Last change: March 2024 +// +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using UnityEngine; + +using ETSI.ARF.OpenAPI.WorldStorage; +using ETSI.ARF.OpenAPI; + +namespace ETSI.ARF.WorldStorage.REST +{ + public class RelocalizationInformationRequest : RequestBase<RelocalizationInformation> + { + + static public ResponseObject<Response> GetRelocalizationInformationAsync(WorldStorageServer ws, List<Guid> uuids, List<Mode_WorldStorage> modes, List<Capability> capabilities, Action<ResponseObject<Response>> func) + { + wsServer = ws; + var httpClient = new UnityWebRequestHttpClient(ws.URI); + apiClient = new WorldStorageClient(httpClient); + + Debug.Log("Request Reloc Information .."); + ResponseObject<Response> ro = new ResponseObject<Response>("Request Reloc Inofmration ", func); + + List<Anonymous> anonymous = new List<Anonymous>(); + for (int i = 0; i< uuids.Count; i++) + { + // Check same size or give anonymous as parameter? + Anonymous newOne = new Anonymous(); + newOne.Uuid = uuids[i]; + newOne.Mode = modes[i]; + anonymous.Add(newOne); + } + apiClient.GetRelocalizationInformationAsync(token, anonymous, capabilities).ContinueWith(OnReceiveObject<Response>, ro); + return ro; + } + } +} \ No newline at end of file diff --git a/Runtime/Scripts/REST/RelocalizationInformationRequest.cs.meta b/Runtime/Scripts/REST/RelocalizationInformationRequest.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..d4c7b4ad1ce1d16f95e4407eb27a3b69588c8a01 --- /dev/null +++ b/Runtime/Scripts/REST/RelocalizationInformationRequest.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2039ff3a64a593c41b3729ed5e4be8ee +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: