Ejemplo n.º 1
0
 public void Set(QueryPresenceOptions other)
 {
     if (other != null)
     {
         m_ApiVersion = PresenceInterface.QuerypresenceApiLatest;
         LocalUserId  = other.LocalUserId;
         TargetUserId = other.TargetUserId;
     }
 }
        /// <summary>
        /// Query a user's presence. This must complete successfully before CopyPresence will have valid results. If HasPresence returns true for a remote
        /// user, this does not need to be called.
        /// </summary>
        /// <param name="options">Object containing properties related to who is querying presence and for what user</param>
        /// <param name="clientData">Optional pointer to help track this request, that is returned in the completion callback</param>
        /// <param name="completionDelegate">Pointer to a function that handles receiving the completion information</param>
        public void QueryPresence(QueryPresenceOptions options, object clientData, OnQueryPresenceCompleteCallback completionDelegate)
        {
            System.IntPtr optionsAddress = new System.IntPtr();
            Helper.TryMarshalSet <QueryPresenceOptionsInternal, QueryPresenceOptions>(ref optionsAddress, options);

            var clientDataAddress = System.IntPtr.Zero;

            var completionDelegateInternal = new OnQueryPresenceCompleteCallbackInternal(OnQueryPresenceCompleteCallbackInternalImplementation);

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

            EOS_Presence_QueryPresence(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal);

            Helper.TryMarshalDispose(ref optionsAddress);
        }