protected override void ProcessEvent(Diacom.AltiGen.AltiLinkPlus.ALPEvent altiEvent) { switch ((ALPEvID)(altiEvent.CommandId)) { case ALPEvID.RING: CallInfo rInfo = new CallInfo(altiEvent[0]); AltiLinkPlus.ALPCommand ac = new AltiLinkPlus.ALPCommand(rInfo.lineID, (int)(ALPCmdID.GET_EXTRACALLINFO)); ac[0] = new AltiLinkPlus.ALPParameter(rInfo.SessionHandle); RingInfo.Add(ac.SequenceId, rInfo); base.SendALPCommand(ac); break; case ALPEvID.STCHG: Diacom.ExtensionManager.StateChangedEventHandler ehsc = this.StateChanged; if (ehsc != null) { SPLineState state = ((SPLineState)(altiEvent[0].ReadInt32())); Diacom.ExtensionManager.LineStateInfoEventArgs si = new Diacom.ExtensionManager.LineStateInfoEventArgs(state); ehsc(GetLine(altiEvent.LocationId), si); } break; } base.ProcessEvent(altiEvent); }
/// <summary> /// Initializes new instance of class with specified line number. /// </summary> /// <param name="line">Line number.</param> /// <param name="state">State of the line.</param> public LineStateChanged(object line, SPLineState state) : base(line, Ev.EventID.LINE_STATE_CHANGED) { this.State = state; }
public LineStateInfoEventArgs(SPLineState state) { this.state = state; }