public RTCPresenceCore(IRTCPresenceUI presenceUI)
        {
            Trace.WriteLine("Entering RTCPresenceCore.RTCPresenceCore");

            this.presenceUI = presenceUI;
            this.presenceEnabled = false;
            this.registrationState = RTC_REGISTRATION_STATE.RTCRS_NOT_REGISTERED;

            try
            {
                this.client = new RTCClientClass();

                this.client.Initialize();

                // Set the event filter
                this.client.EventFilter = RTCConst.RTCEF_REGISTRATION_STATE_CHANGE |
                    RTCConst.RTCEF_CLIENT |
                    RTCConst.RTCEF_BUDDY |
                    RTCConst.RTCEF_BUDDY2 |
                    RTCConst.RTCEF_WATCHER |
                    RTCConst.RTCEF_WATCHER2 |
                    RTCConst.RTCEF_ROAMING |
                    RTCConst.RTCEF_PROFILE |
                    RTCConst.RTCEF_PRESENCE_PROPERTY |
                    RTCConst.RTCEF_PRESENCE_DATA;

                this.client.IRTCEventNotification_Event_Event += new IRTCEventNotification_EventEventHandler(OnRTCEvent);

                this.client.ClientName = "RTCPresence";
                this.client.ClientCurVer = "1.0";

                // Don't Initialize presence status -- exception if called
                // RTC_E_PRESENCE_NOT_ENABLED 0x80EE0028L
                //DoSetPresence(RTC_PRESENCE_STATUS.RTCXS_PRESENCE_ONLINE);
            }
            catch(COMException ex1COM)
            {
                Trace.WriteLine("COMException " + ex1COM.Message);

                throw;
            }
        }
Exemplo n.º 2
0
        public RTCPresenceCore(IRTCPresenceUI presenceUI)
        {
            Trace.WriteLine("Entering RTCPresenceCore.RTCPresenceCore");

            this.presenceUI        = presenceUI;
            this.presenceEnabled   = false;
            this.registrationState = RTC_REGISTRATION_STATE.RTCRS_NOT_REGISTERED;

            try
            {
                this.client = new RTCClientClass();

                this.client.Initialize();

                // Set the event filter
                this.client.EventFilter = RTCConst.RTCEF_REGISTRATION_STATE_CHANGE |
                                          RTCConst.RTCEF_CLIENT |
                                          RTCConst.RTCEF_BUDDY |
                                          RTCConst.RTCEF_BUDDY2 |
                                          RTCConst.RTCEF_WATCHER |
                                          RTCConst.RTCEF_WATCHER2 |
                                          RTCConst.RTCEF_ROAMING |
                                          RTCConst.RTCEF_PROFILE |
                                          RTCConst.RTCEF_PRESENCE_PROPERTY |
                                          RTCConst.RTCEF_PRESENCE_DATA;

                this.client.IRTCEventNotification_Event_Event += new IRTCEventNotification_EventEventHandler(OnRTCEvent);

                this.client.ClientName   = "RTCPresence";
                this.client.ClientCurVer = "1.0";

                // Don't Initialize presence status -- exception if called
                // RTC_E_PRESENCE_NOT_ENABLED 0x80EE0028L
                //DoSetPresence(RTC_PRESENCE_STATUS.RTCXS_PRESENCE_ONLINE);
            }
            catch (COMException ex1COM)
            {
                Trace.WriteLine("COMException " + ex1COM.Message);

                throw;
            }
        }