예제 #1
0
 public void Set(DuplicateFileOptions other)
 {
     if (other != null)
     {
         m_ApiVersion        = PlayerDataStorageInterface.DuplicatefileoptionsApiLatest;
         LocalUserId         = other.LocalUserId;
         SourceFilename      = other.SourceFilename;
         DestinationFilename = other.DestinationFilename;
     }
 }
        /// <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);
        }