示例#1
0
        internal static void OnDeleteFileComplete(IntPtr address)
        {
            OnDeleteFileCompleteCallback callback     = null;
            DeleteFileCallbackInfo       callbackInfo = null;

            if (Helper.TryGetAndRemoveCallback <OnDeleteFileCompleteCallback, DeleteFileCallbackInfoInternal, DeleteFileCallbackInfo>(address, out callback, out callbackInfo))
            {
                callback(callbackInfo);
            }
        }
示例#2
0
        /// <summary>
        /// Deletes an existing file in the cloud. If successful, the file's data will be removed from our local cache.
        /// </summary>
        /// <param name="delteOptions">Object containing properties related to which user is deleting the file, and what file name is</param>
        /// <param name="clientData">Optional pointer to help clients track this request, that is returned in the completion callback</param>
        /// <param name="completionCallback">This function is called when the delete operation completes</param>
        public void DeleteFile(DeleteFileOptions deleteOptions, object clientData, OnDeleteFileCompleteCallback completionCallback)
        {
            var deleteOptionsInternal = Helper.CopyProperties <DeleteFileOptionsInternal>(deleteOptions);

            var completionCallbackInternal = new OnDeleteFileCompleteCallbackInternal(OnDeleteFileComplete);
            var clientDataAddress          = IntPtr.Zero;

            Helper.AddCallback(ref clientDataAddress, clientData, completionCallback, completionCallbackInternal);

            EOS_PlayerDataStorage_DeleteFile(InnerHandle, ref deleteOptionsInternal, clientDataAddress, completionCallbackInternal);
            Helper.TryMarshalDispose(ref deleteOptionsInternal);
        }
        /// <summary>
        /// Deletes an existing file in the cloud. If successful, the file's data will be removed from our local cache.
        /// </summary>
        /// <param name="deleteOptions">Object containing properties related to which user is deleting the file, and what file name is</param>
        /// <param name="clientData">Optional pointer to help clients track this request, that is returned in the completion callback</param>
        /// <param name="completionCallback">This function is called when the delete operation completes</param>
        public void DeleteFile(DeleteFileOptions deleteOptions, object clientData, OnDeleteFileCompleteCallback completionCallback)
        {
            System.IntPtr deleteOptionsAddress = new System.IntPtr();
            Helper.TryMarshalSet <DeleteFileOptionsInternal, DeleteFileOptions>(ref deleteOptionsAddress, deleteOptions);

            var clientDataAddress = System.IntPtr.Zero;

            var completionCallbackInternal = new OnDeleteFileCompleteCallbackInternal(OnDeleteFileCompleteCallbackInternalImplementation);

            Helper.AddCallback(ref clientDataAddress, clientData, completionCallback, completionCallbackInternal);

            EOS_PlayerDataStorage_DeleteFile(InnerHandle, deleteOptionsAddress, clientDataAddress, completionCallbackInternal);

            Helper.TryMarshalDispose(ref deleteOptionsAddress);
        }