Exemple #1
0
        void _IUccSubscriptionEvents.OnUnsubscribe(
            UccSubscription subscription,
            UccSubscriptionEvent eventInfo)
        {
            Debug.WriteLine("OnUnsubscribe");

            if (eventInfo.IsComplete)
            {
                foreach (UccPresentity presenty in eventInfo.Presentities)
                {
                    IUccOperationProgressEvent progressEvent = eventInfo.GetOperationInfo(presenty);

                    Debug.WriteLine(String.Format("Presentity: <{0}> {1}", presenty.Uri.AddressOfRecord.ToString(), Errors.ToString(progressEvent.StatusCode)), "OnUnsubscribe");
                }
            }
        }
Exemple #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)));
                    }
                }
            }
        }