private bool FilterOfflineContacts(object c) { IPresentity presentity = c as IPresentity; return((presentity.Availability != AvailabilityValues.Offline) && (presentity.Availability != AvailabilityValues.Unknown)); }
public void DettachPresentity() { if (this.attachedPresentity != null) { this.attachedPresentity.PropertyChanged -= AttachedPresentity_PropertyChanged; this.attachedPresentity = null; } }
public void AttachPresentity(IPresentity presentity) { this.attachedPresentity = presentity; this.attachedPresentity.PropertyChanged += AttachedPresentity_PropertyChanged; this.SyncPresentity(); }
public ParticipantLog(IPresentity selfPresentity, int id) { this.Uri = selfPresentity.Uri; this.Presentity = selfPresentity; this.IsLocal = true; this.Id = id; this.ResetProperties(); }
public IPresentity[] GetSelectedContacts() { lock (this.ContactList.SelectedItems.SyncRoot) { IPresentity[] presentity = new IPresentity[this.ContactList.SelectedItems.Count]; this.ContactList.SelectedItems.CopyTo(presentity, 0); return(presentity); } }
private IPresentity GetPresentity(string uri) { IPresentity presentity = this.FindPresentity(uri); if (presentity == null) { presentity = new FakePresentity(uri); } return(presentity); }
public AvInvite(IPresentity inviter, int timeout, UccIncomingSessionEvent eventData, CreateSessionDelegate createSession) { this.Created = DateTime.Now; this.state = AvInviteState.Pending; this.Accepted = false; this.timer = new Timer(); this.timer.AutoReset = false; this.timer.Elapsed += new ElapsedEventHandler(Timer_Elapsed); this.timer.Interval = 1000 * timeout; this.timer.Start(); this.inviter = inviter; this.eventData = eventData; this.createSession = createSession; }
private ISession StartConversation(SessionType sessionType, bool enableVideo) { BugTracer.Get(BugId.N01).Trace(string.Format(@"StartConversation: {0}, {1}", sessionType, enableVideo)); IPresentity presentity = this.ContactsWindow.GetSelectedContact(); BugTracer.Get(BugId.N01).Trace(string.Format(@"StartConversation: {0}", presentity.Uri)); ISession session = this.Endpoint.FindSession(sessionType, presentity.Uri); BugTracer.Get(BugId.N01).Trace(string.Format(@"StartConversation: session {0}found", (session == null) ? "not " : "")); if (session != null) { if (enableVideo) { (session as IAvSession).EnableVideo(); } this.Endpoint.RestoreSession(session); } else { session = this.Endpoint.CreateSession(sessionType); if (enableVideo) { (session as IAvSession).EnableVideo(); } BugTracer.Get(BugId.N01).EndTrace(@"StartConversation -- endtrace"); session.AddPartipant(presentity.Uri); } return(session); }
public Session(IPresentity selfPresentity) { this.PartipantLogs = new ObservableCollection <ParticipantLog>(); this.PartipantLogs.Add(new ParticipantLog(selfPresentity, this.PartipantLogs.Count)); }
void AddContact_Done(object sender, AddContact.Result e) { IPresentity presentity = this.Endpoint.CreatePresentity(e.Uri, e.Group); this.Endpoint.Presentities.Add(presentity); }
public ImSession(IPresentity selfPresentity) : base(selfPresentity) { this.sendingMessages = new Dictionary <int, OutgoingMessage>(); transfersManager = new TransfersManager(this); }
public AvSession(IPresentity selfPresentity) : base(selfPresentity) { this.isVideoEnabled = false; }