本文整理汇总了C++中Agent::getEpid方法的典型用法代码示例。如果您正苦于以下问题:C++ Agent::getEpid方法的具体用法?C++ Agent::getEpid怎么用?C++ Agent::getEpid使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Agent
的用法示例。
在下文中一共展示了Agent::getEpid方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: agentByCallId
//##ModelId=424BB6470121
Agent ACDX::agentByCallId(CString _epid, CString _callid)
{
std::list<Agent>::iterator aliasElement;
Agent agent;
for(aliasElement = aliasList.begin(); aliasElement != aliasList.end(); ++aliasElement )
{
agent = *aliasElement;
if (_epid==agent.getEpid() && _callid==agent.getCallId())
{
agent.isOK = TRUE;
return agent;
}
}
return agent;
}
示例2: dumpAgentStates
//##ModelId=424BB6470058
CString ACDX::dumpAgentStates()
{
//SimpleDateFormat formatter = new SimpleDateFormat("HH:mm:ss");
//SYSTEMTIME systemtime;
CString result = "Agent list\n";
std::list<Agent>::iterator aliasElement;
Agent ag;
for(aliasElement = aliasList.begin(); aliasElement != aliasList.end(); ++aliasElement )
{
ag = *aliasElement;
//systemtime.wMilliseconds = ag.getLastCall();//? here to h m s maybe case error
struct tm * t = (struct tm *)ag.getLastTime();
//t->tm_mon+1
t->tm_hour;
t->tm_min;
t->tm_sec;
char c_hour[sizeof(int)];
char c_min[sizeof(int)];
char c_sec[sizeof(int)];
itoa(t->tm_hour,c_hour,10);
itoa(t->tm_min,c_min,10);
itoa(t->tm_sec,c_sec,10);
// agent last call time
CString cs_time = CString(c_hour)+":"+CString(c_min)+":"+CString(c_sec);
//t->tm_mon+1;
//CTime t(systemtime);
if (ag.isAgent()) {
// agent list contains all GK registration, only list configured agents
result += ag.getAlias() + " (" + ag.getEpid() + "):\t" +
(ag.isBlocked() ? "NOT logged in" : " logged in") +
"\tstate: " + (ag.getState()==0 ? "AVAILABLE" : "TALKING " ) +
//"\tlast call: " + t.Format("%H:%M:%S") +
"\tlast call: " + cs_time +
"\n<br>";
}
}
return result;
}