using System; using System.Collections.Generic; namespace Unity.Cloud.UserReporting.Client { /// /// Represents a user reporting platform. /// public interface IUserReportingPlatform { #region Methods /// /// Deserialized the specified JSON. /// /// The type. /// The JSON. /// The deserialized object instance. T DeserializeJson(string json); /// /// Gets device metadata. /// /// Device metadata. IDictionary GetDeviceMetadata(); /// /// Modifies a user report. /// /// The user report. void ModifyUserReport(UserReport userReport); /// /// Called at the end of a frame. /// /// The client. void OnEndOfFrame(UserReportingClient client); /// /// Posts to an endpoint. /// /// The endpoint. /// The content type. /// The content. /// The progress callback. Provides the upload and download progress. /// The callback. Provides a value indicating whether the post was successful and provides the resulting byte array. void Post(string endpoint, string contentType, byte[] content, Action progressCallback, Action callback); /// /// Runs a task asynchronously. /// /// The task. /// The callback. void RunTask(Func task, Action callback); /// /// Sends an analytics event. /// /// The event name. /// The event data. void SendAnalyticsEvent(string eventName, Dictionary eventData); /// /// Serializes the specified object instance. /// /// The object instance. /// The JSON. string SerializeJson(object instance); /// /// Takes a screenshot. /// /// The frame number. /// The maximum width. /// The maximum height. /// The source. Passing null will capture the screen. Passing a camera will capture the camera's view. Passing a render texture will capture the render texture. /// The callback. Provides the screenshot. void TakeScreenshot(int frameNumber, int maximumWidth, int maximumHeight, object source, Action callback); /// /// Called on update. /// /// The client. void Update(UserReportingClient client); #endregion } }