Exemple #1
0
        internal static void OnQueryDefinitionsComplete(IntPtr address)
        {
            OnQueryDefinitionsCompleteCallback     callback     = null;
            OnQueryDefinitionsCompleteCallbackInfo callbackInfo = null;

            if (Helper.TryGetAndRemoveCallback <OnQueryDefinitionsCompleteCallback, OnQueryDefinitionsCompleteCallbackInfoInternal, OnQueryDefinitionsCompleteCallbackInfo>(address, out callback, out callbackInfo))
            {
                callback(callbackInfo);
            }
        }
        /// <summary>
        /// Query for a list of definitions for all existing achievements, including localized text, icon IDs and whether an achievement is hidden.
        ///
        /// @note When the Social Overlay is enabled then this will be called automatically. The Social Overlay is enabled by default (see <see cref="Platform.PlatformFlags.DisableSocialOverlay" />).
        /// </summary>
        /// <param name="options">Structure containing information about the application whose achievement definitions we're retrieving.</param>
        /// <param name="clientData">Arbitrary data that is passed back to you in the CompletionDelegate</param>
        /// <param name="completionDelegate">This function is called when the query definitions operation completes.</param>
        /// <returns>
        /// <see cref="Result.Success" /> if the operation completes successfully
        /// <see cref="Result.InvalidParameters" /> if any of the options are incorrect
        /// </returns>
        public void QueryDefinitions(QueryDefinitionsOptions options, object clientData, OnQueryDefinitionsCompleteCallback completionDelegate)
        {
            System.IntPtr optionsAddress = new System.IntPtr();
            Helper.TryMarshalSet <QueryDefinitionsOptionsInternal, QueryDefinitionsOptions>(ref optionsAddress, options);

            var clientDataAddress = System.IntPtr.Zero;

            var completionDelegateInternal = new OnQueryDefinitionsCompleteCallbackInternal(OnQueryDefinitionsCompleteCallbackInternalImplementation);

            Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal);

            EOS_Achievements_QueryDefinitions(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal);

            Helper.TryMarshalDispose(ref optionsAddress);
        }
Exemple #3
0
        /// <summary>
        /// Query for a list of definitions for all existing achievements, including localized text, icon IDs and whether an achievement is hidden.
        ///
        /// @note When the Social Overlay is enabled then this will be called automatically. The Social Overlay is enabled by default (see <see cref="Platform.PlatformFlags.DisableSocialOverlay" />).
        /// </summary>
        /// <param name="options">Structure containing information about the application whose achievement definitions we're retrieving.</param>
        /// <param name="clientData">Arbitrary data that is passed back to you in the CompletionDelegate</param>
        /// <param name="completionDelegate">This function is called when the query definitions operation completes.</param>
        /// <returns>
        /// <see cref="Result.Success" /> if the operation completes successfully
        /// <see cref="Result.InvalidParameters" /> if any of the options are incorrect
        /// </returns>
        public void QueryDefinitions(QueryDefinitionsOptions options, object clientData, OnQueryDefinitionsCompleteCallback completionDelegate)
        {
            var optionsInternal = Helper.CopyProperties <QueryDefinitionsOptionsInternal>(options);

            var completionDelegateInternal = new OnQueryDefinitionsCompleteCallbackInternal(OnQueryDefinitionsComplete);
            var clientDataAddress          = IntPtr.Zero;

            Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal);

            EOS_Achievements_QueryDefinitions(InnerHandle, ref optionsInternal, clientDataAddress, completionDelegateInternal);
            Helper.TryMarshalDispose(ref optionsInternal);
        }