void Config(int argc, char *argv[], BBWinNet & bbobj) { cout << "Sending config ...\n"; try { string res; res = argv[3]; if (argc > 4) res = argv[4]; bbobj.Config(argv[3], res); cout << "\nDownloaded file has been stored to " << res << "\n\n"; } catch (BBWinNetException ex) { cout << "Error : " << ex.getMessage() << "\n"; } }
void BBWinAgentManager::Config(LPCTSTR fileName, LPCTSTR dest) { bbdisplay_t::iterator itr; BBWinNet hobNet; assert(fileName != NULL); assert(dest != NULL); itr = m_bbdisplay.begin(); hobNet.SetBBDisplay((*itr)); PrepareBBWinNetObj(hobNet); try { hobNet.Config(fileName, dest); } catch (BBWinNetException ex) { if (m_logReportFailure) { string mes; mes = "Sending config message to " + (*itr) + " failed."; LPCTSTR arg[] = {m_agentName.c_str(), mes.c_str(), NULL}; m_log->reportWarnEvent(BBWIN_AGENT, EVENT_MESSAGE_AGENT, 2, arg); } } }