Example #1
0
        private void HandleSessionMessage(vx_evt_base_t eventMessage)
        {
            vx_evt_message_t evt = eventMessage;

            Debug.Assert(evt != null);
            if (evt.session_handle != _sessionHandle)
            {
                return;
            }

            var message = new ChannelTextMessage()
            {
                Sender = _participants.ContainsKey(evt.participant_uri) ?
                         _participants[evt.participant_uri].Account
                    : new AccountId(evt.participant_uri),
                Message                    = evt.message_body,
                ReceivedTime               = DateTime.Now,
                Key                        = _nextTextId++.ToString("D8"),
                ApplicationStanzaBody      = evt.application_stanza_body,
                ApplicationStanzaNamespace = evt.application_stanza_namespace,
                Language                   = evt.language,
                ChannelSession             = this,
                FromSelf                   = (evt.is_current_user != 0)
            };

            _messageLog.Enqueue(message);
        }
Example #2
0
    public vx_evt_message_t as_vx_evt_message()
    {
        global::System.IntPtr cPtr = VivoxCoreInstancePINVOKE.vx_evt_base_t_as_vx_evt_message(swigCPtr);
        vx_evt_message_t      ret  = (cPtr == global::System.IntPtr.Zero) ? null : new vx_evt_message_t(cPtr, false);

        return(ret);
    }
Example #3
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(vx_evt_message_t obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }