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 Drop(int argc, char *argv[], BBWinNet & bbobj) { bbobj.SetHostName(argv[3]); cout << "hostname defined to: " << argv[3] << "\n"; cout << "Sending drop ...\n"; try { if (argc > 4) bbobj.Drop(argv[4]); else bbobj.Drop(); } catch (BBWinNetException ex) { cout << "Error : " << ex.getMessage() << "\n"; } }
void Query(int argc, char *argv[], BBWinNet & bbobj) { cout << "Sending query ...\n"; bbobj.SetHostName(argv[3]); cout << "hostname defined to: " << argv[3] << "\n"; try { string res; bbobj.Query(argv[4], res); cout << "\n" << res << "\n\n"; } catch (BBWinNetException ex) { cout << "Error : " << ex.getMessage() << "\n"; } }
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 Rename(int argc, char *argv[], BBWinNet & bbobj) { bbobj.SetHostName(argv[3]); cout << "hostname defined to: " << argv[3] << "\n"; try { if (argc > 5) { cout << "Sending test rename ...\n"; bbobj.Rename(argv[4], argv[5]); } else { cout << "Sending test rename ...\n"; bbobj.Rename(argv[4]); } } catch (BBWinNetException ex) { cout << "Error : " << ex.getMessage() << "\n"; } }
void BBWinAgentManager::PrepareBBWinNetObj(BBWinNet & hobNet) { hobNet.SetHostName(m_setting["hostname"]); if (m_setting["useproxy"] == "true") hobNet.SetProxy(m_setting["proxy"]); }