public AccountAPI(BattleNetCSharp battlenet) : base(battlenet, "Account") { this.m_accountService = new RPCServices.AccountService(); this.m_accountNotify = new AccountNotify(); this.m_preferredRegion = uint.MaxValue; this.m_licenses = new List <AccountLicense>(); }
public void CancelGameCallback(RPCContext context) { BattleNetCSharp sharp = BattleNet.Get() as BattleNetCSharp; if ((sharp != null) && (sharp.Games != null)) { BattleNetErrors status = (BattleNetErrors)context.Header.Status; sharp.Games.ApiLog.LogDebug("CancelGameCallback, status=" + status); switch (status) { case BattleNetErrors.ERROR_OK: case BattleNetErrors.ERROR_GAME_MASTER_INVALID_GAME: if (sharp.Games.IsFindGamePending || ((sharp.Games.CurrentGameRequest != 0) && (sharp.Games.CurrentGameRequest != this.m_gameRequestId))) { object[] args = new object[] { this.m_gameRequestId, sharp.Games.CurrentGameRequest }; sharp.Games.ApiLog.LogDebug("CancelGameCallback received for id={0} but is not the current gameRequest={1}, ignoring it.", args); } else { sharp.Games.CurrentGameRequest = 0L; sharp.Games.AddQueueEvent(BattleNet.QueueEvent.Type.QUEUE_CANCEL, 0, 0, 0, null); } break; default: sharp.EnqueueErrorInfo(BnetFeature.Games, BnetFeatureEvent.Games_OnCancelGame, status, context.Context); break; } } }
object OnCall(string typeName, string methodName, object thisObj, params object[] args) { if (typeName != "BattleNet" || methodName != ".cctor") { return(null); } string backend = Vars.Key("Aurora.Backend").GetStr("BattleNetDll"); IBattleNet impl; if (backend == "BattleNetDll") { impl = new BattleNetDll(); } else if (backend == "BattleNetCSharp") { impl = new BattleNetCSharp(); } else { throw new NotImplementedException("Invalid Battle.net Backend (Aurora.Backend)"); } typeof(BattleNet).GetField("s_impl", BindingFlags.NonPublic | BindingFlags.Static).SetValue(null, impl); Log.BattleNet.Print("Forced BattleNet backend to {0}", backend); return(1); }
public FriendsAPI(BattleNetCSharp battlenet) : base(battlenet, "Friends") { this.m_friendsService = new RPCServices.FriendsService(); this.m_friendsNotifyService = new FriendsNotify(); this.m_initializeTimeOut = 5f; this.m_updateList = new List <BattleNet.FriendsUpdate>(); this.m_friendEntityId = new Map <BnetEntityId, Map <ulong, EntityId> >(); }
public ChallengeAPI(BattleNetCSharp battlenet) : base(battlenet, "Challenge") { this.m_challengeService = new RPCServices.ChallengeService(); this.m_challengeNotifyService = new ChallengeNotify(); this.m_challengeUpdateList = new List <BattleNet.DllChallengeInfo>(); this.m_challengePendingList = new Map <uint, BattleNet.DllChallengeInfo>(); this.s_pendingAnswers = new Map <uint, ulong>(); }
public PresenceAPI(BattleNetCSharp battlenet) : base(battlenet, "Presence") { this.m_queuedSubscriptions = new HashSet <EntityId>(); this.m_presenceSubscriptions = new Map <EntityId, PresenceRefCountObject>(); this.m_presenceUpdates = new List <BattleNet.PresenceUpdate>(); this.m_presenceService = new RPCServices.PresenceService(); this.m_stopWatch = new Stopwatch(); }
public GamesAPI(BattleNetCSharp battlenet) : base(battlenet, "Games") { this.m_utilPackets = new Queue <PegasusPacket>(); this.m_queueEvents = new Queue <BattleNet.QueueEvent>(); this.m_gameUtilitiesService = new GameUtilitiesService(); this.m_gameMasterService = new RPCServices.GameMasterService(); this.m_gameMasterSubscriberService = new RPCServices.GameMasterSubscriberService(); this.m_gameFactorySubscriberService = new GameFactorySubscriberService(); }
public ChannelAPI(BattleNetCSharp battlenet) : base(battlenet, "Channel") { this.m_activeChannels = new Map <ulong, ChannelReferenceObject>(); this.m_channelEntityObjectMap = new Map <EntityId, ulong>(); this.m_receivedInvitations = new Map <InvitationServiceType, List <ReceivedInvite> >(); this.m_channelService = new RPCServices.ChannelService(); this.m_channelSubscriberService = new RPCServices.ChannelSubscriberService(); this.m_channelOwnerService = new RPCServices.ChannelOwnerService(); }
object OnCall(string typeName, string methodName, object thisObj, params object[] args) { if (typeName != "BattleNet" || methodName != ".cctor") { return null; } string backend = Vars.Key("Aurora.Backend").GetStr("BattleNetDll"); IBattleNet impl; if (backend == "BattleNetCSharp") { impl = new BattleNetCSharp(); } else { throw new NotImplementedException("Invalid Battle.net Backend (Aurora.Backend)"); } typeof(BattleNet).GetField("s_impl", BindingFlags.NonPublic | BindingFlags.Static).SetValue(null, impl); Log.BattleNet.Print("Forced BattleNet backend to {0}", backend); return 1; }
public AuthenticationAPI(BattleNetCSharp battlenet) : base(battlenet, "Authentication") { this.m_authServerService = new RPCServices.AuthServerService(); this.m_authClientService = new RPCServices.AuthClientService(); }
public ProfanityAPI(BattleNetCSharp battlenet) : base(battlenet, "Profanity") { }
public ResourcesAPI(BattleNetCSharp battlenet) : base(battlenet, "ResourcesAPI") { this.m_resourcesService = new RPCServices.ResourcesService(); this.m_pendingLookups = new Map <uint, ResourcesAPIPendingState>(); }
public WhisperAPI(BattleNetCSharp battlenet) : base(battlenet, "Whisper") { this.m_whispers = new List <BnetWhisper>(); }
public LocalStorageAPI(BattleNetCSharp battlenet) : base(battlenet, "LocalStorage") { }
protected BattleNetAPI(BattleNetCSharp battlenet, string logSourceName) { this.m_battleNet = battlenet; this.m_logSource = new BattleNetLogSource(logSourceName); this.m_logDelegates = new LogDelegate[] { new LogDelegate(this.m_logSource.LogDebug), new LogDelegate(this.m_logSource.LogError) }; }
public NotificationAPI(BattleNetCSharp battlenet) : base(battlenet, "Notification") { this.m_notifications = new List <BnetNotification>(); }
public PresenceUnsubscribeContext(BattleNetCSharp battleNet, ulong objectId) { this.m_battleNet = battleNet; this.m_objectId = objectId; }