Cisco Cisco Computer Telephony Integration OS 8.5 Guide Du Développeur
9-23
CTI OS Developer’s Guide for Cisco ICM/IPCC Enterprise & Hosted Editions Release 7.0(0)
Chapter 9 Agent Object
Methods
Return Value
This method returns -1 if skillgroupstats is not enabled.
C++
In C++ the GetSkillGroups method returns an arguments array containing
references to CSkillGroup objects.
references to CSkillGroup objects.
Each element in the returned arguments array consists of a key/value pair, in
which the element key is the Unique Object Id of the skill group object and the
value is a reference to a CILRefArg object instance that contains the actual
reference to a CSkillGroup object. To retrieve a reference to a skill group object,
you need to do something similar to what is shown in the following code example.
which the element key is the Unique Object Id of the skill group object and the
value is a reference to a CILRefArg object instance that contains the actual
reference to a CSkillGroup object. To retrieve a reference to a skill group object,
you need to do something similar to what is shown in the following code example.
Arguments & arSkills = m_Agent->GetSkillGroups();
if(Arguments::IsValidReference(arSkills)){
for(int nI = 1; nI <= arSkills.NumElements(); nI ++){
string strUOID = arSkills.GetElementKey(nI);
CilRefArg & pRefArg = (CilRefArg &)
arSkills.GetValue(strUOID);
if(Arg::IsValidReference(*pRefArg)){
CSkillGroup * pSkill = pRefArg->GetValue();
pRefArg->Release();
cout << “Skill Object (“ << strUOID << “) ;
cout << “ Skill Group Number: ” << ;
pSkill->GetValueInt(CTIOS_SKILLGROUPNUMBER);
}
}
COM
In COM the GetSkillGroups method returns a pointer to a variant that
encapsulates a Safearray where each element is a pointer to an ISkillGroup object.
encapsulates a Safearray where each element is a pointer to an ISkillGroup object.
To retrieve references to skill group objects you need to do something similar to
what is shown in the following code example.
what is shown in the following code example.
HRESULT hr = S_OK;
VARIANT varSkills;
VariantInit(&varSkills)