Exemplo n.º 1
0
 public unsafe bool RemoveFavoriteGame(uint appID, uint IP, ushort connPort, ushort queryPort, FavoriteEnum flags)
 {
     // TODO [vicent] current stub implementation
     return false;
     //ISteamMatchmaking* this2 = <Module>.SteamMatchmaking();
     //return calli(System.Byte modopt(System.Runtime.CompilerServices.CompilerMarshalOverride) modopt(System.Runtime.CompilerServices.CallConvCdecl)(System.IntPtr,System.UInt32,System.UInt32,System.UInt16,System.UInt16,System.UInt32), this2, appID, IP, connPort, queryPort, flags, *(*(long*)this2 + 24L));
 }
Exemplo n.º 2
0
        // public unsafe void ServerListResponded(void* serverListRequest, int server)
        // {
        //     if (serverListRequest == this.m_dedicatedServerListRequest && this.OnDedicatedServerListResponded != null)
        //     {
        //         this.OnDedicatedServerListResponded(server);
        //     }
        //     if (serverListRequest == this.m_favoritesServerListRequest && this.OnFavoritesServerListResponded != null)
        //     {
        //         this.OnFavoritesServerListResponded(server);
        //     }
        //     if (serverListRequest == this.m_historyServerListRequest && this.OnHistoryServerListResponded != null)
        //     {
        //         this.OnHistoryServerListResponded(server);
        //     }
        //     if (serverListRequest == this.m_LANServerListRequest && this.OnLANServerListResponded != null)
        //     {
        //         this.OnLANServerListResponded(server);
        //     }
        //     if (serverListRequest == this.m_friendsServerListRequest && this.OnFriendsServerListResponded != null)
        //     {
        //         this.OnFriendsServerListResponded(server);
        //     }
        // }

        // public unsafe void ServerListFailedToRespond(void* serverListRequest, int server)
        // {
        //     if (serverListRequest == this.m_dedicatedServerListRequest && this.OnDedicatedServerListFailResponse != null)
        //     {
        //         this.OnDedicatedServerListFailResponse(server);
        //     }
        //     if (serverListRequest == this.m_favoritesServerListRequest && this.OnFavoritesServerListFailResponse != null)
        //     {
        //         this.OnFavoritesServerListFailResponse(server);
        //     }
        //     if (serverListRequest == this.m_historyServerListRequest && this.OnHistoryServerListFailResponse != null)
        //     {
        //         this.OnHistoryServerListFailResponse(server);
        //     }
        //     if (serverListRequest == this.m_LANServerListRequest && this.OnLANServerListFailResponse != null)
        //     {
        //         this.OnLANServerListFailResponse(server);
        //     }
        //     if (serverListRequest == this.m_friendsServerListRequest && this.OnFriendsServerListFailResponse != null)
        //     {
        //         this.OnFriendsServerListFailResponse(server);
        //     }
        // }

        // public unsafe void RefreshCompleteResponse(void* serverListRequest, MatchMakingServerResponseEnum response)
        // {
        //     if (serverListRequest == this.m_dedicatedServerListRequest)
        //     {
        //         this.m_dedicatedServerListRequest = null;
        //         if (this.OnDedicatedServersCompleteResponse != null)
        //         {
        //             this.OnDedicatedServersCompleteResponse(response);
        //         }
        //     }
        //     if (serverListRequest == this.m_favoritesServerListRequest)
        //     {
        //         this.m_favoritesServerListRequest = null;
        //         if (this.OnFavoritesServersCompleteResponse != null)
        //         {
        //             this.OnFavoritesServersCompleteResponse(response);
        //         }
        //     }
        //     if (serverListRequest == this.m_historyServerListRequest)
        //     {
        //         this.m_historyServerListRequest = null;
        //         if (this.OnHistoryServersCompleteResponse != null)
        //         {
        //             this.OnHistoryServersCompleteResponse(response);
        //         }
        //     }
        //     if (serverListRequest == this.m_LANServerListRequest)
        //     {
        //         this.m_LANServerListRequest = null;
        //         if (this.OnLANServersCompleteResponse != null)
        //         {
        //             this.OnLANServersCompleteResponse(response);
        //         }
        //     }
        //     if (serverListRequest == this.m_friendsServerListRequest)
        //     {
        //         this.m_friendsServerListRequest = null;
        //         if (this.OnFriendsServersCompleteResponse != null)
        //         {
        //             this.OnFriendsServersCompleteResponse(response);
        //         }
        //     }
        // }

        // public unsafe void RequestServerList(string filterOps, MatchmakingServerListResponse* response)
        // {
        //     char[] delimiters = ":;".ToCharArray();
        //     string[] ops = filterOps.Split(delimiters);
        //     int num = ops.Length;
        //     if (num % 2 != 0)
        //     {
        //         throw new ArgumentException("Filter operations and their arguments must be delimited by colons or semicolons. Odd tokens are operations, even ones are their arguments");
        //     }
        //     ulong num2 = (ulong)((long)(num / 2));
        //     MatchMakingKeyValuePair_t* ptr = <Module>.new[]((num2 > 36028797018963967uL) ? 18446744073709551615uL : (num2 * 512uL));
        //     MatchMakingKeyValuePair_t* ptr3;
        //     try
        //     {
        //         if (ptr != null)
        //         {
        //             void* ptr2 = (void*)ptr;
        //             int num3 = (int)num2 - 1;
        //             if (num3 >= 0)
        //             {
        //                 do
        //                 {
        //                     ((byte*)ptr2)[256L] = 0;
        //                     *(byte*)ptr2 = 0;
        //                     ptr2 = (void*)((byte*)ptr2 + 512L);
        //                     num3 += -1;
        //                 }
        //                 while (num3 >= 0);
        //             }
        //             ptr3 = ptr;
        //         }
        //         else
        //         {
        //             ptr3 = null;
        //         }
        //     }
        //     catch
        //     {
        //         <Module>.delete[]((void*)ptr);
        //         throw;
        //     }
        //     MatchMakingKeyValuePair_t* filters = ptr3;
        //     int i = 0;
        //     if (0 < ops.Length / 2)
        //     {
        //         long num4 = 0L;
        //         int response2 = 0;
        //         do
        //         {
        //             sbyte* filterOpStr = (sbyte*)((void*)Marshal.StringToHGlobalAnsi(ops[response2]));
        //             sbyte* filterArgStr = (sbyte*)((void*)Marshal.StringToHGlobalAnsi(ops[response2 + 1]));
        //             MatchMakingKeyValuePair_t matchMakingKeyValuePair_t;
        //             <Module>.strncpy((sbyte*)(&matchMakingKeyValuePair_t), (sbyte*)filterOpStr, 256uL);
        //             *(ref matchMakingKeyValuePair_t + 255) = 0;
        //             <Module>.strncpy(ref matchMakingKeyValuePair_t + 256, (sbyte*)filterArgStr, 256uL);
        //             *(ref matchMakingKeyValuePair_t + 511) = 0;
        //             cpblk(num4 / (long)sizeof(MatchMakingKeyValuePair_t) + filters, ref matchMakingKeyValuePair_t, 512);
        //             Marshal.FreeHGlobal((IntPtr)((void*)filterOpStr));
        //             Marshal.FreeHGlobal((IntPtr)((void*)filterArgStr));
        //             i++;
        //             response2 += 2;
        //             num4 += 512L;
        //         }
        //         while (i < ops.Length / 2);
        //     }
        //     ISteamUtils* expr_160 = <Module>.SteamUtils();
        //     uint appId = calli(System.UInt32 modopt(System.Runtime.CompilerServices.CallConvCdecl)(System.IntPtr), expr_160, *(*expr_160 + 72L));
        //     if (response == this.m_dedicatedServerListResponse)
        //     {
        //         ISteamMatchmakingServers* ptr4 = <Module>.SteamMatchmakingServers();
        //         this.m_dedicatedServerListRequest = calli(System.Void* modopt(System.Runtime.CompilerServices.CallConvCdecl)(System.IntPtr,System.UInt32,MatchMakingKeyValuePair_t**,System.UInt32,ISteamMatchmakingServerListResponse*), ptr4, appId, ref filters, ops.Length / 2, response, *(*(long*)ptr4));
        //     }
        //     if (response == this.m_favoritesServerListResponse)
        //     {
        //         ISteamMatchmakingServers* ptr5 = <Module>.SteamMatchmakingServers();
        //         this.m_favoritesServerListRequest = calli(System.Void* modopt(System.Runtime.CompilerServices.CallConvCdecl)(System.IntPtr,System.UInt32,MatchMakingKeyValuePair_t**,System.UInt32,ISteamMatchmakingServerListResponse*), ptr5, appId, ref filters, ops.Length / 2, response, *(*(long*)ptr5 + 24L));
        //     }
        //     if (response == this.m_historyServerListResponse)
        //     {
        //         ISteamMatchmakingServers* ptr6 = <Module>.SteamMatchmakingServers();
        //         this.m_historyServerListRequest = calli(System.Void* modopt(System.Runtime.CompilerServices.CallConvCdecl)(System.IntPtr,System.UInt32,MatchMakingKeyValuePair_t**,System.UInt32,ISteamMatchmakingServerListResponse*), ptr6, appId, ref filters, ops.Length / 2, response, *(*(long*)ptr6 + 32L));
        //     }
        //     if (response == this.m_friendsServerListResponse)
        //     {
        //         ISteamMatchmakingServers* ptr7 = <Module>.SteamMatchmakingServers();
        //         this.m_friendsServerListRequest = calli(System.Void* modopt(System.Runtime.CompilerServices.CallConvCdecl)(System.IntPtr,System.UInt32,MatchMakingKeyValuePair_t**,System.UInt32,ISteamMatchmakingServerListResponse*), ptr7, appId, ref filters, ops.Length / 2, response, *(*(long*)ptr7 + 16L));
        //     }
        //     <Module>.delete[]((void*)filters);
        // }

        // public unsafe int GetFavoriteGameCount()
        // {
        //     ISteamMatchmaking* expr_05 = <Module>.SteamMatchmaking();
        //     return calli(System.Int32 modopt(System.Runtime.CompilerServices.CallConvCdecl)(System.IntPtr), expr_05, *(*expr_05));
        // }

        // public unsafe bool GetFavoriteGame(uint index, out uint appID, out uint IP, out ushort connPort, out ushort queryPort, out FavoriteEnum flags, out uint timestamp)
        // {
        //     timestamp = 0;
        //     flags = 0;
        //     queryPort = 0;
        //     IP = 0;
        //     appID = 0;
        //     uint nFlags = 0u;
        //     ISteamMatchmaking* this2 = <Module>.SteamMatchmaking();
        //     bool ret = calli(System.Byte modopt(System.Runtime.CompilerServices.CompilerMarshalOverride) modopt(System.Runtime.CompilerServices.CallConvCdecl)(System.IntPtr,System.Int32,System.UInt32*,System.UInt32*,System.UInt16*,System.UInt16*,System.UInt32*,System.UInt32*), this2, index, ref appID, ref IP, ref connPort, ref queryPort, ref nFlags, ref timestamp, *(*(long*)this2 + 8L));
        //     flags = (FavoriteEnum)nFlags;
        //     return ret;
        // }

         public unsafe int AddFavoriteGame(uint appID, uint IP, ushort connPort, ushort queryPort, FavoriteEnum flags, uint timestamp)
         {
             // TODO [vicent] current stub implementation
             return 0;
        //     ISteamMatchmaking* this2 = <Module>.SteamMatchmaking();
        //     return calli(System.Int32 modopt(System.Runtime.CompilerServices.CallConvCdecl)(System.IntPtr,System.UInt32,System.UInt32,System.UInt16,System.UInt16,System.UInt32,System.UInt32), this2, appID, IP, connPort, queryPort, flags, timestamp, *(*(long*)this2 + 16L));
         }