Searching by person and by attributes are usually different use cases. Doing it together is not that useful and unsupported by some backends.
This commit is contained in:
Filippo Banno 2019-06-19 16:26:57 +01:00
Родитель 3d2db8d1d0
Коммит d350107efe
1 изменённых файлов: 12 добавлений и 23 удалений

Просмотреть файл

@ -21,9 +21,19 @@ namespace Microsoft.MixedReality.Sharing.Matchmaking
Task<IRoom> JoinRoomByIdAsync(string roomId, CancellationToken token = default);
/// <summary>
/// Get the list of all rooms matching the given query.
/// Get the list of all rooms with the specified owner.
/// </summary>
IRoomList FindRooms(FindRoomQuery query);
IRoomList FindRoomsByOwner(IParticipant owner);
/// <summary>
/// Get the list of all rooms containing any of the specified participants.
/// </summary>
IRoomList FindRoomsByParticipants(IEnumerable<IParticipant> participants);
/// <summary>
/// Get the list of all rooms containing all of these attributes with the specified value.
/// </summary>
IRoomList FindRoomsByAttributes(Dictionary<string, object> attributes);
/// <summary>
/// Create a new room and join it.
@ -39,27 +49,6 @@ namespace Microsoft.MixedReality.Sharing.Matchmaking
Task<IRoom> CreateRoomAsync(Dictionary<string, object> attributes = null, CancellationToken token = default);
}
/// <summary>
/// Collection of the possible options to query rooms for.
/// </summary>
public class FindRoomQuery
{
/// <summary>
/// Only find rooms with this owner.
/// </summary>
public IParticipant Owner;
/// <summary>
/// Only find rooms containing any of these contacts.
/// </summary>
public List<IParticipant> Members;
/// <summary>
/// Only find rooms containing all of these attributes with the specified value.
/// </summary>
public Dictionary<string, object> Attributes;
}
/// <summary>
/// Handle to the list of active matchmaking rooms that satisfy certain criteria.
/// Can be used to either get the rooms at a specific point in time, or to subscribe and get updates