void Status(int argc, char *argv[], BBWinNet & bbobj) { bbobj.SetHostName(argv[3]); cout << "hostname defined to: " << argv[3] << "\n"; cout << "Sending status ...\n"; try { if (argc > 7) bbobj.Status(argv[4], argv[5], argv[6], argv[7]); else bbobj.Status(argv[4], argv[5], argv[6]); } catch (BBWinNetException ex) { cout << "Error : " << ex.getMessage() << "\n"; } }
void BBWinAgentManager::Status(LPCTSTR testName, LPCTSTR color, LPCTSTR text, LPCTSTR lifeTime) { bbdisplay_t::iterator itr; BBWinNet hobNet; assert(testName != NULL); assert(color != NULL); assert(text != NULL); assert(lifeTime != NULL); Pager(testName, color, text, lifeTime); PrepareBBWinNetObj(hobNet); for ( itr = m_bbdisplay.begin(); itr != m_bbdisplay.end(); ++itr) { hobNet.SetBBDisplay((*itr)); try { hobNet.Status(testName, color, text, lifeTime); } catch (BBWinNetException ex) { if (m_logReportFailure) { string mes; mes = "Sending report to " + (*itr) + " failed."; LPCTSTR arg[] = {m_agentName.c_str(), mes.c_str(), NULL}; m_log->reportWarnEvent(BBWIN_AGENT, EVENT_MESSAGE_AGENT, 2, arg); } continue ; } } }