/// <summary> /// Clear previously cached file data. This operation will be done asynchronously. All cached files except those corresponding to the transfers in progress will be removed. /// Warning: Use this with care. Cache system generally tries to clear old and unused cached files from time to time. Unnecessarily clearing cache can degrade performance as SDK will have to re-download data. /// </summary> /// <param name="options">Object containing properties related to which user is deleting cache</param> /// <param name="clientData">Optional pointer to help clients track this request, that is returned in associated callbacks</param> /// <param name="completionCallback">This function is called when the delete cache operation completes</param> /// <returns> /// <see cref="Result.Success" /> if the operation was started correctly, otherwise an error result explaining what went wrong /// </returns> public Result DeleteCache(DeleteCacheOptions options, object clientData, OnDeleteCacheCompleteCallback completionCallback) { System.IntPtr optionsAddress = new System.IntPtr(); Helper.TryMarshalSet <DeleteCacheOptionsInternal, DeleteCacheOptions>(ref optionsAddress, options); var clientDataAddress = System.IntPtr.Zero; var completionCallbackInternal = new OnDeleteCacheCompleteCallbackInternal(OnDeleteCacheCompleteCallbackInternalImplementation); Helper.AddCallback(ref clientDataAddress, clientData, completionCallback, completionCallbackInternal); var funcResult = EOS_PlayerDataStorage_DeleteCache(InnerHandle, optionsAddress, clientDataAddress, completionCallbackInternal); Helper.TryMarshalDispose(ref optionsAddress); return(funcResult); }
internal static extern Result EOS_PlayerDataStorage_DeleteCache(System.IntPtr handle, System.IntPtr options, System.IntPtr clientData, OnDeleteCacheCompleteCallbackInternal completionCallback);