public ClientConnection(INotificationQueue notificationQueue, Client client) { _client = client; _notificationQueue = notificationQueue; _rosterManager = new RosterManager(_connection); SubscribeToEvents(); SetAuthorizationProvider(); SetRosterObsererver(); SetPresenceObserver(); HandleClientChanges(); }
public XmppClientConnection() : base() { m_IqGrabber = new IqGrabber(this); m_MessageGrabber = new MessageGrabber(this); m_PresenceGrabber = new PresenceGrabber(this); m_PresenceManager = new PresenceManager(this); m_RosterManager = new RosterManager(this); }
public override void Initialize(IClientConnection connection) { base.Initialize(connection); _rosterManager = new RosterManager(Connection); }
public RiotChat() { xmpp = new XmppClientConnection { Server = "pvp.net", Port = 5223, ConnectServer = Session.Region.ChatServer, AutoResolveConnectServer = false, Resource = "xiff", UseSSL = true, KeepAliveInterval = 10, KeepAlive = true, UseCompression = true, AutoPresence = true, Status = new LeagueStatus(StatusMessage, Status).ToXML(), Show = ShowType.chat, Priority = 0 }; xmpp.OnMessage += Xmpp_OnMessage; xmpp.OnAuthError += (o, e) => Session.Log(e); xmpp.OnError += (o, e) => Session.Log(e); xmpp.OnLogin += o => Session.Log("Connected to chat server"); xmpp.Open(Session.Current.Account.LoginSession.AccountSummary.Username, "AIR_" + Session.Current.Account.LoginSession.Password); presence = new PresenceManager(xmpp); roster = new RosterManager(xmpp); lobby = new MucManager(xmpp); xmpp.OnRosterEnd += o => connected = true; xmpp.OnRosterItem += Xmpp_OnRosterItem; xmpp.OnPresence += Xmpp_OnPresence; timer = new Timer(1000) { AutoReset = true }; timer.Elapsed += UpdateProc; timer.Start(); }