void Data(int argc, char *argv[], BBWinNet & bbobj) { cout << "Sending data ...\n"; bbobj.SetHostName(argv[3]); cout << "hostname defined to: " << argv[3] << "\n"; try { bbobj.Data(argv[4], argv[5]); } catch (BBWinNetException ex) { cout << "Error : " << ex.getMessage() << "\n"; } }
void BBWinAgentManager::Data(LPCTSTR dataName, LPCTSTR text) { bbdisplay_t::iterator itr; BBWinNet hobNet; assert(dataName != NULL); assert(text != NULL); PrepareBBWinNetObj(hobNet); for ( itr = m_bbdisplay.begin(); itr != m_bbdisplay.end(); ++itr) { hobNet.SetBBDisplay((*itr)); try { hobNet.Data(dataName, text); } 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 ; } } }