示例#1
0
        internal static void OnDuplicateFileComplete(IntPtr address)
        {
            OnDuplicateFileCompleteCallback callback     = null;
            DuplicateFileCallbackInfo       callbackInfo = null;

            if (Helper.TryGetAndRemoveCallback <OnDuplicateFileCompleteCallback, DuplicateFileCallbackInfoInternal, DuplicateFileCallbackInfo>(address, out callback, out callbackInfo))
            {
                callback(callbackInfo);
            }
        }
        /// <summary>
        /// Copies the data of an existing file to a new filename. This action happens entirely on the server and will not upload the contents of the source destination file from the host. This
        /// function paired with a subsequent <see cref="DeleteFile" /> can be used to rename a file. If successful, the destination file's metadata will be updated in our local cache.
        /// </summary>
        /// <param name="duplicateOptions">Object containing properties related to which user is duplicating the file, and what the source and destination file names are</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 duplicate operation completes</param>
        public void DuplicateFile(DuplicateFileOptions duplicateOptions, object clientData, OnDuplicateFileCompleteCallback completionCallback)
        {
            System.IntPtr duplicateOptionsAddress = new System.IntPtr();
            Helper.TryMarshalSet <DuplicateFileOptionsInternal, DuplicateFileOptions>(ref duplicateOptionsAddress, duplicateOptions);

            var clientDataAddress = System.IntPtr.Zero;

            var completionCallbackInternal = new OnDuplicateFileCompleteCallbackInternal(OnDuplicateFileCompleteCallbackInternalImplementation);

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

            EOS_PlayerDataStorage_DuplicateFile(InnerHandle, duplicateOptionsAddress, clientDataAddress, completionCallbackInternal);

            Helper.TryMarshalDispose(ref duplicateOptionsAddress);
        }
示例#3
0
        /// <summary>
        /// Copies the data of an existing file to a new filename. This action happens entirely on the server and will not upload the contents of the source destination file from the host. This
        /// function paired with a subsequent <see cref="DeleteFile" /> can be used to rename a file. If successful, the destination file's metadata will be updated in our local cache.
        /// </summary>
        /// <param name="duplicateOptions">Object containing properties related to which user is duplicating the file, and what the source and destination file names are</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 duplicate operation completes</param>
        public void DuplicateFile(DuplicateFileOptions duplicateOptions, object clientData, OnDuplicateFileCompleteCallback completionCallback)
        {
            var duplicateOptionsInternal = Helper.CopyProperties <DuplicateFileOptionsInternal>(duplicateOptions);

            var completionCallbackInternal = new OnDuplicateFileCompleteCallbackInternal(OnDuplicateFileComplete);
            var clientDataAddress          = IntPtr.Zero;

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

            EOS_PlayerDataStorage_DuplicateFile(InnerHandle, ref duplicateOptionsInternal, clientDataAddress, completionCallbackInternal);
            Helper.TryMarshalDispose(ref duplicateOptionsInternal);
        }