コード例 #1
0
ファイル: Contact.cs プロジェクト: jamecook/projects
            /// <summary>
            /// Create the contact.
            /// </summary>
            /// <param name="contactConnection">The contact connection configuration.</param>
            public void Create(ContactConnection contactConnection)
            {
                _pjBuddyConfig           = new pjsua2.BuddyConfig();
                _pjBuddyConfig.subscribe = contactConnection.Subscribe;
                _pjBuddyConfig.uri       = contactConnection.Uri;

                // Create the contact.
                create(_pjAccount, _pjBuddyConfig);
            }
コード例 #2
0
ファイル: Contact.cs プロジェクト: jamecook/projects
        /// <summary>
        /// Sip account contact.
        /// </summary>
        /// <param name="account">The Sip account.</param>
        /// <param name="contactConnection">The Sip contact connection configuration.</param>
        public Contact(Account account, ContactConnection contactConnection)
        {
            if (account == null)
            {
                throw new ArgumentNullException(nameof(account));
            }
            if (contactConnection == null)
            {
                throw new ArgumentNullException(nameof(contactConnection));
            }

            _account           = account;
            _contactConnection = contactConnection;
            _pjContact         = new ContactCallback(account.PjAccount);

            // Add this contact.
            _contactUri = contactConnection.Uri;
            _account.Contacts.Add(this);
        }