Cisco Cisco Computer Telephony Integration Option 8.5 Guia Do Programador
9-18
CTI OS Developer’s Guide for Cisco ICM/IPCC Enterprise & Hosted Editions
Cisco CTI OS Release 7.2(1)
Chapter 9 Agent Object
Methods
hr = m_Agent->GetSkillGroups(&varSkills);
if(SUCCEDED(hr)){
if(varSkills.vt == (VT_ARRAY | VT_DISPATCH) ){
long lNumElements = 0;
SafeArrayGetUBound(varSkills.parray,1,&lNumElements);
for(long nI = 0; nI < lNumElements; nI ++){
ISkillGroup * pSkill= NULL;
hr=SafeArrayGetElement(varSkills.parray,&nI,&pSkill);
if(SUCCEDED(hr)){
int nSkillGrpNumber = 0;
VARIANT vPropKey;
VariantInit(&vPropKey);
vPropKey.vt = VT_BSTR;
vPropKey.bstr = OLESTR(“SkillGroupNumber”);
pSkill->GetValueInt(vPropKey,&nSkillGrpNumber);
pSkill->Release();
VariantClear(&vPropKey);
}
}
}
}
VB
In VB the GetSkillGroups method returns a variant array where each element is a reference to a
CTIOSClientLib.SkillGroup object.
CTIOSClientLib.SkillGroup object.
To retrieve references to skill group objects you need to do something similar to what is shown in the
following code example.
following code example.
Dim obSkill As CTIOSClientLib.SkillGroup
Dim arSkills As Variant
Dim lNumElements as Long
arSkills = m_Agent.GetSkillGroups()
lNumElements = UBound(arSkills,1)
For nI = 0 to lNumElements
Set obSkill = arSkills(nI)
Print “SkillGroup” & obSkill.GetValueString(CStr(“UniqueObjectId”)) & _
“Skill Group Number: “ &
obSkill.GetValueInt(CStr(“SkillGroupNumber”))
Next
End For
GetValue Methods
See
for descriptions of the GetValue, GetValueInt, GetValueArray, and
GetValueString methods.
IsAgent
The IsAgent method determines whether the AgentMode connection is for an agent rather than a
supervisor.
supervisor.