2012-08-09 09:45:04 +00:00
|
|
|
#region Using Statements
|
2011-12-14 19:22:17 +00:00
|
|
|
using System;
|
|
|
|
using System.Net;
|
|
|
|
|
|
|
|
#endregion // Using Statements
|
2011-11-16 15:00:54 +00:00
|
|
|
|
2012-08-09 09:45:04 +00:00
|
|
|
// This file is part of the ANX.Framework created by the
|
|
|
|
// "ANX.Framework developer group" and released under the Ms-PL license.
|
|
|
|
// For details see: http://anxframework.codeplex.com/license
|
2011-11-18 10:41:44 +00:00
|
|
|
|
2011-11-16 15:00:54 +00:00
|
|
|
namespace ANX.Framework.Net
|
|
|
|
{
|
2011-12-14 19:22:17 +00:00
|
|
|
public sealed class AvailableNetworkSession
|
2011-11-16 15:00:54 +00:00
|
|
|
{
|
2011-12-14 19:22:17 +00:00
|
|
|
private NetworkSessionType sessionType;
|
|
|
|
private int openPublicGamerSlots;
|
|
|
|
private QualityOfService qualityOfService;
|
|
|
|
private NetworkSessionProperties sessionProperties;
|
2012-08-09 09:45:04 +00:00
|
|
|
#if !WINDOWSMETRO //TODO: search replacement for Win8
|
2011-12-14 19:22:17 +00:00
|
|
|
private IPEndPoint endPoint;
|
|
|
|
private IPEndPoint internalendPoint;
|
2012-02-21 07:52:20 +00:00
|
|
|
#endif
|
2011-12-14 19:22:17 +00:00
|
|
|
private int _currentGameCount;
|
|
|
|
private string hostGamertag;
|
|
|
|
private int openPrivateGamerSlots;
|
|
|
|
|
|
|
|
public AvailableNetworkSession()
|
|
|
|
{
|
|
|
|
qualityOfService = new QualityOfService();
|
|
|
|
}
|
|
|
|
|
|
|
|
public int CurrentGamerCount
|
|
|
|
{
|
|
|
|
get
|
|
|
|
{
|
|
|
|
return _currentGameCount;
|
|
|
|
}
|
|
|
|
internal set
|
|
|
|
{
|
|
|
|
_currentGameCount = value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public string HostGamertag
|
|
|
|
{
|
|
|
|
get
|
|
|
|
{
|
|
|
|
return hostGamertag;
|
|
|
|
}
|
|
|
|
internal set
|
|
|
|
{
|
|
|
|
hostGamertag = value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public int OpenPrivateGamerSlots
|
|
|
|
{
|
|
|
|
get
|
|
|
|
{
|
|
|
|
return openPrivateGamerSlots;
|
|
|
|
}
|
|
|
|
internal set
|
|
|
|
{
|
|
|
|
openPrivateGamerSlots = value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public int OpenPublicGamerSlots
|
|
|
|
{
|
|
|
|
get
|
|
|
|
{
|
|
|
|
return openPublicGamerSlots;
|
|
|
|
}
|
|
|
|
internal set
|
|
|
|
{
|
|
|
|
openPublicGamerSlots = value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public QualityOfService QualityOfService
|
|
|
|
{
|
|
|
|
get
|
|
|
|
{
|
|
|
|
return qualityOfService;
|
|
|
|
}
|
|
|
|
internal set
|
|
|
|
{
|
|
|
|
qualityOfService = value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public NetworkSessionProperties SessionProperties
|
|
|
|
{
|
|
|
|
get
|
|
|
|
{
|
|
|
|
return sessionProperties;
|
|
|
|
}
|
|
|
|
internal set
|
|
|
|
{
|
|
|
|
sessionProperties = value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-08-09 09:45:04 +00:00
|
|
|
#if !WINDOWSMETRO //TODO: search replacement for Win8
|
2011-12-14 19:22:17 +00:00
|
|
|
internal IPEndPoint EndPoint
|
|
|
|
{
|
|
|
|
get
|
|
|
|
{
|
|
|
|
return endPoint;
|
|
|
|
}
|
|
|
|
set
|
|
|
|
{
|
|
|
|
endPoint = value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
internal IPEndPoint InternalEndpont
|
|
|
|
{
|
|
|
|
get
|
|
|
|
{
|
|
|
|
return internalendPoint;
|
|
|
|
}
|
|
|
|
set
|
|
|
|
{
|
|
|
|
internalendPoint = value;
|
|
|
|
}
|
|
|
|
}
|
2012-02-21 07:52:20 +00:00
|
|
|
#endif
|
2011-12-14 19:22:17 +00:00
|
|
|
|
|
|
|
internal NetworkSessionType SessionType
|
|
|
|
{
|
|
|
|
get
|
|
|
|
{
|
|
|
|
return this.sessionType;
|
|
|
|
}
|
|
|
|
set
|
|
|
|
{
|
|
|
|
this.sessionType = value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2011-11-16 15:00:54 +00:00
|
|
|
}
|