Example #1
0
 public void Set(QueryFileOptions other)
 {
     if (other != null)
     {
         m_ApiVersion = PlayerDataStorageInterface.QueryfileoptionsApiLatest;
         LocalUserId  = other.LocalUserId;
         Filename     = other.Filename;
     }
 }
        /// <summary>
        /// Query a specific file's metadata, such as file names, size, and a MD5 hash of the data. This is not required before a file may be opened, saved, copied, or deleted. Once a file has
        /// been queried, its metadata will be available by the <see cref="CopyFileMetadataAtIndex" /> and <see cref="CopyFileMetadataByFilename" /> functions.
        /// <seealso cref="GetFileMetadataCount" />
        /// <seealso cref="CopyFileMetadataAtIndex" />
        /// <seealso cref="CopyFileMetadataByFilename" />
        /// </summary>
        /// <param name="queryFileOptions">Object containing properties related to which user is querying files, and what file is being queried</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 query operation completes</param>
        public void QueryFile(QueryFileOptions queryFileOptions, object clientData, OnQueryFileCompleteCallback completionCallback)
        {
            System.IntPtr queryFileOptionsAddress = new System.IntPtr();
            Helper.TryMarshalSet <QueryFileOptionsInternal, QueryFileOptions>(ref queryFileOptionsAddress, queryFileOptions);

            var clientDataAddress = System.IntPtr.Zero;

            var completionCallbackInternal = new OnQueryFileCompleteCallbackInternal(OnQueryFileCompleteCallbackInternalImplementation);

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

            EOS_PlayerDataStorage_QueryFile(InnerHandle, queryFileOptionsAddress, clientDataAddress, completionCallbackInternal);

            Helper.TryMarshalDispose(ref queryFileOptionsAddress);
        }