//--------------------------------------------------------Constructor:----------------------------------------------------------------\\ #region --Constructors-- /// <summary> /// Basic Constructor /// </summary> /// <history> /// 10/08/2018 Created [Fabian Sauter] /// </history> internal OmemoSessionBuildHelper(string chatJid, string bareAccountJid, string fullAccountJid, XMPPConnection2 connection, OmemoHelper omemoHelper) { this.CONNECTION = connection; this.CHAT_JID = chatJid; this.BARE_ACCOUNT_JID = bareAccountJid; this.FULL_ACCOUNT_JID = fullAccountJid; this.OMEMO_HELPER = omemoHelper; this.STATE = OmemoSessionBuildHelperState.NOT_STARTED; }
private void initConnection(XMPPAccount account) { connection = new XMPPConnection2(account); connection.NewRoosterMessage += Connection_ConnectionNewRoosterMessage; connection.ConnectionStateChanged += Connection_ConnectionStateChanged; connection.NewValidMessage += Connection_ConnectionNewValidMessage; connection.NewPresenceMessage += Connection_ConnectionNewPresenceMessage; connection.MessageSend += Connection_MessageSend; connection.NewBookmarksResultMessage += Connection_NewBookmarksResultMessage; }
private void init(XMPPAccount account) { connection = new XMPPConnection2(account); connection.NewRoosterMessage += Connection_ConnectionNewRoosterMessage; connection.ConnectionStateChanged += Connection_ConnectionStateChanged; connection.NewValidMessage += Connection_ConnectionNewValidMessage; connection.NewPresenceMessage += Connection_ConnectionNewPresenceMessage; connection.MessageSend += Connection_MessageSend; connection.NewBookmarksResultMessage += Connection_NewBookmarksResultMessage; connection.OmemoSessionBuildError += Connection_OmemoSessionBuildErrorEvent; }
//--------------------------------------------------------Constructor:----------------------------------------------------------------\\ #region --Constructors-- /// <summary> /// Basic Constructor /// </summary> /// <history> /// 10/08/2018 Created [Fabian Sauter] /// </history> internal OmemoSessionBuildHelper(string chatJid, string bareAccountJid, string fullAccountJid, Action <OmemoSessionBuildHelper, OmemoSessionBuildResult> onSessionResult, XMPPConnection2 connection, OmemoHelper omemoHelper) { this.CONNECTION = connection; this.ON_SESSION_RESULT = onSessionResult; this.CHAT_JID = chatJid; this.BARE_ACCOUNT_JID = bareAccountJid; this.FULL_ACCOUNT_JID = fullAccountJid; this.OMEMO_HELPER = omemoHelper; this.STATE = OmemoSessionBuildHelperState.NOT_STARTED; this.requestDeviceListHelper = null; this.requestBundleInfoHelper = null; this.SESSION = new OmemoSession(chatJid); this.curAddress = null; }
//--------------------------------------------------------Constructor:----------------------------------------------------------------\\ #region --Constructors-- /// <summary> /// Basic Constructor /// </summary> /// <history> /// 16/06/2018 Created [Fabian Sauter] /// </history> public PubSubCommandHelper(XMPPConnection2 connection) { this.CONNECTION = connection; }
//--------------------------------------------------------Constructor:----------------------------------------------------------------\\ #region --Constructors-- /// <summary> /// Basic Constructor /// </summary> /// <history> /// 17/03/2018 Created [Fabian Sauter] /// </history> public SMConnection(TCPConnection2 tcpConnection, XMPPConnection2 xMPPConnection) : base(tcpConnection, xMPPConnection) { reset(); }
//--------------------------------------------------------Constructor:----------------------------------------------------------------\\ #region --Constructors-- /// <summary> /// Basic Constructor /// </summary> /// <history> /// 02/11/2018 Created [Fabian Sauter] /// </history> public GeneralCommandHelper(XMPPConnection2 connection) { this.CONNECTION = connection; }
//--------------------------------------------------------Constructor:----------------------------------------------------------------\\ #region --Constructors-- /// <summary> /// Basic Constructor /// </summary> /// <history> /// 21/08/2017 Created [Fabian Sauter] /// </history> public AbstractMessageProcessor(TCPConnection2 tcpConnection, XMPPConnection2 xMPPConnection) { this.TCP_CONNECTION = tcpConnection; this.XMPP_CONNECTION = xMPPConnection; }
private void Connection_NewBookmarksResultMessage(XMPPConnection2 connection, NewBookmarksResultMessageEventArgs args) { NewBookmarksResultMessage?.Invoke(this, args); }
private void Connection_MessageSend(XMPPConnection2 connection, MessageSendEventArgs args) { MessageSend?.Invoke(this, args); }
//--------------------------------------------------------Constructor:----------------------------------------------------------------\\ #region --Constructors-- /// <summary> /// Basic Constructor /// </summary> /// <history> /// 24/08/2017 Created [Fabian Sauter] /// </history> public RecourceBindingConnection(TCPConnection2 tcpConnection, XMPPConnection2 xMPPConnection) : base(tcpConnection, xMPPConnection) { reset(); }
//--------------------------------------------------------Constructor:----------------------------------------------------------------\\ #region --Constructors-- /// <summary> /// Basic Constructor /// </summary> /// <history> /// 08/03/2018 Created [Fabian Sauter] /// </history> public MUCCommandHelper(XMPPConnection2 connection) { CONNECTION = connection; }
private void Connection_OmemoSessionBuildErrorEvent(XMPPConnection2 connection, OmemoSessionBuildErrorEventArgs args) { OmemoSessionBuildError?.Invoke(this, args); }
//--------------------------------------------------------Constructor:----------------------------------------------------------------\\ #region --Constructors-- /// <summary> /// Basic Constructor /// </summary> /// <history> /// 17/03/2018 Created [Fabian Sauter] /// </history> public OmemoCommandHelper(XMPPConnection2 connection) { this.CONNECTION = connection; }
//--------------------------------------------------------Constructor:----------------------------------------------------------------\\ #region --Constructors-- /// <summary> /// Basic Constructor /// </summary> /// <history> /// 21/08/2017 Created [Fabian Sauter] /// </history> protected AbstractMessageProcessor(TCPConnection2 tcpConnection, XMPPConnection2 xMPPConnection) { TCP_CONNECTION = tcpConnection; XMPP_CONNECTION = xMPPConnection; }