Пример #1
0
 protected virtual void OnParticipantRemoved(IUccSession eventSource, IUccSessionParticipant participant)
 {
     if (participant.IsLocal == false)
     {
         ComEvents.Unadvise <_IUccSessionParticipantEvents>(participant, this);
     }
 }
Пример #2
0
        //bool _IUccSessionDescriptionEvaluator.Evaluate(
        //                             string ContentType,
        //                             string SessionDescription)
        //{
        //    return SessionDescription.ToLower().Trim() == "xxx-session";
        //}

        #endregion _IUccSessionDescriptionEvaluator

        #region _IUccApplicationSessionParticipantEvents         // not used

        //void _IUccApplicationSessionParticipantEvents.OnIncomingInvitation(
        //    UccApplicationSessionParticipant eventSource,
        //    UccIncomingInvitationEvent eventData
        //    )
        //{
        //    System.Windows.MessageBox.Show("OnIncomingInvitation");
        //}

        //void _IUccApplicationSessionParticipantEvents.OnInvitationAccepted(
        //    UccApplicationSessionParticipant eventSource,
        //    UccInvitationAcceptedEvent eventData
        //    )
        //{
        //}

        //void _IUccApplicationSessionParticipantEvents.OnOutgoingInvitation(
        //    UccApplicationSessionParticipant eventSource,
        //    UccOutgoingInvitationEvent eventData
        //    )
        //{
        //    eventData.ContentType = "xxx-l";
        //    eventData.SessionDescription = "xxx-session";
        //}

        //void _IUccApplicationSessionParticipantEvents.OnRenegotiate(
        //    UccApplicationSessionParticipant eventSource,
        //    IUccOperationProgressEvent eventData
        //    )
        //{
        //}

        #endregion _IUccApplicationSessionParticipantEvents

        #region _IUccSignalingChannelEvents         // no used // experimental

        //void _IUccSignalingChannelEvents.OnIncomingMessage(
        //    IUccSignalingChannel eventSource,
        //    IUccIncomingSignalingMessageEvent eventData
        //    )
        //{
        //    eventData.Accept();
        //    System.Windows.MessageBox.Show(eventData.Message.Body);
        //}

        //void _IUccSignalingChannelEvents.OnSendRequest(
        //    IUccSignalingChannel eventSource,
        //    IUccOperationProgressEvent eventData
        //    )
        //{
        //    if (eventData.IsComplete && eventData.StatusCode >= 0)
        //        System.Windows.MessageBox.Show("SUBS sent!");
        //    else
        //        System.Windows.MessageBox.Show("SUBS failed!");
        //}

        #endregion _IUccSignalingChannelEvents

        #region _IUccPublicationEvent

        void _IUccPublicationEvent.OnPublish(
            IUccPublication publication,
            IUccOperationProgressEvent eventData)
        {
            if (eventData.IsComplete)
            {
                ComEvents.Unadvise <_IUccPublicationEvent>(publication, this);

                if (eventData.StatusCode >= 0)
                {
                    Debug.WriteLine("Publication - OK");
                }
                else
                {
                    if (eventData.OriginalOperationContext.Context.IsPropertySet(ContextInitialPublication))
                    {
                        Debug.WriteLine(String.Format("Initial Publication Failed: {0}", Errors.ToString(eventData.StatusCode)));
                    }
                    else
                    {
                        Debug.WriteLine(String.Format("Publication Failed: {0}", Errors.ToString(eventData.StatusCode)));
                    }
                }
            }
        }
Пример #3
0
        protected override void OnParticipantRemoved(IUccSession eventSource, IUccSessionParticipant participant)
        {
            base.OnParticipantRemoved(eventSource, participant);

            if (participant.IsLocal == false)
            {
                ComEvents.Unadvise <_IUccInstantMessagingSessionParticipantEvents>(participant, this);
            }
        }
Пример #4
0
 void _IUccCategoryContextEvents.OnCategoryInstanceRemoved(
     IUccCategoryContext categoryContext,
     UccCategoryInstanceEvent categoryEvent)
 {
     ComEvents.Unadvise <_IUccCategoryInstanceEvents>(categoryEvent.CategoryInstance, this);
 }
Пример #5
0
 void _IUccPresentityEvents.OnCategoryContextRemoved(
     UccPresentity presentity,
     UccCategoryContextEvent categoryContext)
 {
     ComEvents.Unadvise <_IUccCategoryContextEvents>(categoryContext.CategoryContext, this);
 }
Пример #6
0
 void _IUccMediaChannelCollectionEvents.OnChannelRemoved(IUccAudioVideoSessionParticipant eventSource, IUccMediaChannelCollectionEvent eventData)
 {
     ComEvents.Unadvise <_IUccMediaChannelEvents>(eventData.MediaChannel, this);
 }
Пример #7
0
        protected override void OnParticipantRemoved(IUccSession eventSource, IUccSessionParticipant participant)
        {
            base.OnParticipantRemoved(eventSource, participant);

            ComEvents.Unadvise <_IUccMediaChannelCollectionEvents>(participant, this);
        }