Exemplo n.º 1
0
        public override Wybecom.TalkPortal.CTI.LineControl[] GetSnapshot()
        {
            List <Wybecom.TalkPortal.CTI.LineControl> lcs = new List <Wybecom.TalkPortal.CTI.LineControl>();

            LineControl[] jlcs = _jtapisnapshot.GetSnapshot();
            if (jlcs != null)
            {
                log.Debug(jlcs.Length + " lines retreived from snapshot");
                foreach (LineControl lc in jlcs)
                {
                    Wybecom.TalkPortal.CTI.LineControl ctilc = new Wybecom.TalkPortal.CTI.LineControl();
                    ctilc.directoryNumber       = lc.directoryNumber;
                    ctilc.doNotDisturb          = lc.doNotDisturb;
                    ctilc.forward               = lc.forward;
                    ctilc.lineControlConnection = GetLineControlConnections(lc.lineControlConnection);
                    if (lc.monitored != null)
                    {
                        ctilc.monitored = lc.monitored;
                    }
                    else
                    {
                        ctilc.monitored = "";
                    }
                    ctilc.mwiOn  = lc.mwiOn;
                    ctilc.status = (Wybecom.TalkPortal.CTI.Status)Translate(typeof(Status), lc.status, typeof(Wybecom.TalkPortal.CTI.Status));
                    lcs.Add(ctilc);
                }
            }
            return(lcs.ToArray());
        }
Exemplo n.º 2
0
        public override Wybecom.TalkPortal.CTI.LineControl[] GetSnapshot()
        {
            List <Wybecom.TalkPortal.CTI.LineControl> lcs = new List <Wybecom.TalkPortal.CTI.LineControl>();

            LineControl[] jlcs = _snapshotServer.GetSnapshot();

            if (jlcs != null)
            {
                log.Debug(jlcs.Length + " lines retreived from snapshot");
                foreach (LineControl lc in jlcs)
                {
                    Wybecom.TalkPortal.CTI.LineControl ctilc = new Wybecom.TalkPortal.CTI.LineControl();
                    ctilc.directoryNumber       = lc.directoryNumberField;
                    ctilc.doNotDisturb          = lc.doNotDisturbField;
                    ctilc.forward               = lc.forwardField;
                    ctilc.lineControlConnection = GetLineControlConnections(lc.lineControlConnectionField);
                    ctilc.monitored             = lc.monitoredField;
                    ctilc.mwiOn  = lc.mwiOnField;
                    ctilc.status = (Wybecom.TalkPortal.CTI.Status)Translate(typeof(Status), lc.statusField, typeof(Wybecom.TalkPortal.CTI.Status));
                    lcs.Add(ctilc);
                }
            }
            log.Debug("Snapshot contains " + lcs.Count + " lines");
            return(lcs.ToArray());
        }
Exemplo n.º 3
0
 public override Wybecom.TalkPortal.CTI.LineControl[] GetSnapshot()
 {
     List<Wybecom.TalkPortal.CTI.LineControl> lcs = new List<Wybecom.TalkPortal.CTI.LineControl>();
     LineControl[] jlcs = _jtapisnapshot.GetSnapshot();
     if (jlcs != null)
     {
         log.Debug(jlcs.Length + " lines retreived from snapshot");
         foreach (LineControl lc in jlcs)
         {
             Wybecom.TalkPortal.CTI.LineControl ctilc = new Wybecom.TalkPortal.CTI.LineControl();
             ctilc.directoryNumber = lc.directoryNumber;
             ctilc.doNotDisturb = lc.doNotDisturb;
             ctilc.forward = lc.forward;
             ctilc.lineControlConnection = GetLineControlConnections(lc.lineControlConnection);
             if (lc.monitored != null)
             {
                 ctilc.monitored = lc.monitored;
             }
             else
             {
                 ctilc.monitored = "";
             }
             ctilc.mwiOn = lc.mwiOn;
             ctilc.status = (Wybecom.TalkPortal.CTI.Status)Translate(typeof(Status), lc.status, typeof(Wybecom.TalkPortal.CTI.Status));
             lcs.Add(ctilc);
         }
     }
     return lcs.ToArray();
 }