public void AddBCMProfile(BcmProfile bp) { if (m_BcmProfiles.ContainsKey(bp.BcmID)) { m_log.Log("Warning - bcmprofile " + bp.BcmID + " already in base config"); } else { m_BcmProfiles.Add(bp.BcmID, bp); } if (m_BcmProfiles.ContainsKey(bp.Name)) { m_log.Log("Warning - bcmprofile " + bp.Name + " already in base config"); } else { m_BcmProfiles.Add(bp.Name, bp); } // add also state-based/change profiles m_BcmProfiles.Add(bp.Name + "_Talking", bp); m_BcmProfiles.Add(bp.Name + "_Idle", bp); m_BcmProfiles.Add(bp.Name + "_PaperWork", bp); m_BcmProfiles.Add(bp.Name + "_Working", bp); m_BcmProfiles.Add(bp.Name + "_WrapUp", bp); m_BcmProfiles.Add(bp.Name + "_Offline", bp); m_BcmProfiles.Add(bp.Name + "_Online", bp); }
/////////////////////////////////////// // Get configuration // (profiles from BCM, rules from cfg) protected bool GetProfileConfig() { try { PresenceProfileType[] aProf; // fetch the profiles & groups aProf = m_PSI.GetPresenceProfiles(); foreach (PresenceProfileType pt in aProf) { m_log.Log("Profile guid=" + pt.ProfileID + " name=" + pt.ProfileName); BcmProfile bp = new BcmProfile(); bp.BcmID = pt.ProfileID; bp.Name = pt.ProfileName; bp.Type = BcmStateOption.Profile; m_CFG.AddBCMProfile(bp); } if (m_CFG.readGroupConfig() == false) { m_log.Log("Profile configuration is faulty - cannot start"); return(false); } return(true); } catch (Exception e) { m_log.Log("Exception in BCM_Control::FetchProfileConfig " + e); } return(false); }
/////////////////////////////////////// // Refresh profile configuration // protected bool RefreshProfiles() { bool bret = true; try { PresenceProfileType[] aProf; m_log.Log("Refreshing BCM profiles"); m_CFG.CreateBaseProfiles(); // fetch the profiles & groups aProf = m_PSI.GetPresenceProfiles(); foreach (PresenceProfileType pt in aProf) { m_log.Log("Profile guid=" + pt.ProfileID + " name=" + pt.ProfileName); BcmProfile bp = new BcmProfile(); bp.BcmID = pt.ProfileID; bp.Name = pt.ProfileName; bp.Type = BcmStateOption.Profile; m_CFG.AddBCMProfile(bp); } m_CFG.readGroupConfig(); } catch (Exception e) { m_log.Log("Exception in BCM_Control::FetchProfileConfig " + e); bret = false; } return(bret); }
public void CreateBaseProfiles() { m_BcmProfiles = new Dictionary <string, BcmProfile>(32); BcmProfile b; b = new BcmProfile(); b.Type = BcmStateOption.Internal; b.Name = "_Talking"; b.BcmID = "_Talking"; m_BcmProfiles.Add(b.Name, b); b = new BcmProfile(); b.Type = BcmStateOption.Internal; b.Name = "_EndCall"; b.BcmID = "_EndCall"; m_BcmProfiles.Add(b.Name, b); b = new BcmProfile(); b.Type = BcmStateOption.Internal; b.Name = "_PaperWork"; b.BcmID = "_PaperWork"; m_BcmProfiles.Add(b.Name, b); b = new BcmProfile(); b.Type = BcmStateOption.Internal; b.Name = "_WrapUp"; b.BcmID = "_WrapUp"; m_BcmProfiles.Add(b.Name, b); b = new BcmProfile(); b.Type = BcmStateOption.Internal; b.Name = "_Offline"; b.BcmID = "_Offline"; m_BcmProfiles.Add(b.Name, b); b = new BcmProfile(); b.Type = BcmStateOption.Internal; b.Name = "_Online"; b.BcmID = "_Online"; m_BcmProfiles.Add(b.Name, b); b = new BcmProfile(); b.Type = BcmStateOption.Internal; b.Name = "_Previous"; b.BcmID = "_Previous"; m_BcmProfiles.Add(b.Name, b); b = new BcmProfile(); b.Type = BcmStateOption.Internal; b.Name = "_unknown_"; b.BcmID = "_unknown_"; m_BcmUnknown = b; }
public BcmState() { Profile = new BcmProfile(); ServiceState = BcmServiceState.None; CallState = LoginState = Sticky = false; }