Exemplo n.º 1
0
        internal static void OnQueryFriends(IntPtr address)
        {
            OnQueryFriendsCallback   callback     = null;
            QueryFriendsCallbackInfo callbackInfo = null;

            if (Helper.TryGetAndRemoveCallback <OnQueryFriendsCallback, QueryFriendsCallbackInfoInternal, QueryFriendsCallbackInfo>(address, out callback, out callbackInfo))
            {
                callback(callbackInfo);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Starts an asynchronous task that reads the user's friends list from the backend service, caching it for future use.
        ///
        /// @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 the account for which to retrieve the friends list</param>
        /// <param name="clientData">arbitrary data that is passed back to you in the CompletionDelegate</param>
        /// <param name="completionDelegate">a callback that is fired when the async operation completes, either successfully or in error</param>
        public void QueryFriends(QueryFriendsOptions options, object clientData, OnQueryFriendsCallback completionDelegate)
        {
            var optionsInternal = Helper.CopyProperties <QueryFriendsOptionsInternal>(options);

            var completionDelegateInternal = new OnQueryFriendsCallbackInternal(OnQueryFriends);
            var clientDataAddress          = IntPtr.Zero;

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

            EOS_Friends_QueryFriends(InnerHandle, ref optionsInternal, clientDataAddress, completionDelegateInternal);
            Helper.TryMarshalDispose(ref optionsInternal);
        }
        /// <summary>
        /// Starts an asynchronous task that reads the user's friends list from the backend service, caching it for future use.
        ///
        /// @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 the account for which to retrieve the friends list</param>
        /// <param name="clientData">arbitrary data that is passed back to you in the CompletionDelegate</param>
        /// <param name="completionDelegate">a callback that is fired when the async operation completes, either successfully or in error</param>
        public void QueryFriends(QueryFriendsOptions options, object clientData, OnQueryFriendsCallback completionDelegate)
        {
            System.IntPtr optionsAddress = new System.IntPtr();
            Helper.TryMarshalSet <QueryFriendsOptionsInternal, QueryFriendsOptions>(ref optionsAddress, options);

            var clientDataAddress = System.IntPtr.Zero;

            var completionDelegateInternal = new OnQueryFriendsCallbackInternal(OnQueryFriendsCallbackInternalImplementation);

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

            EOS_Friends_QueryFriends(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal);

            Helper.TryMarshalDispose(ref optionsAddress);
        }