diff options
author | deva <deva> | 2008-08-18 14:54:03 +0000 |
---|---|---|
committer | deva <deva> | 2008-08-18 14:54:03 +0000 |
commit | 3c199adf6c317ade446120db1cdb51b473edca57 (patch) | |
tree | 8b865ad2fd9208be60333bf234bf8a8d5929d8b9 /client/macrowindow.cc | |
parent | cbb2adb8f35dfc11ac58bff6fa56b99f071a76cd (diff) |
Rewrite of all network code, with a reusable socket. Still needs some error checking.
Diffstat (limited to 'client/macrowindow.cc')
-rw-r--r-- | client/macrowindow.cc | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/client/macrowindow.cc b/client/macrowindow.cc index 551c804..6837e1d 100644 --- a/client/macrowindow.cc +++ b/client/macrowindow.cc @@ -25,9 +25,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #include "macrowindow.h" -#include "sendrecieve.h" -#include "macro.h" -#include "widgets/widget.h" + #include <QVBoxLayout> #include <QMessageBox> #include <QDomDocument> @@ -35,9 +33,12 @@ #include <QDomNode> #include <QByteArray> +#include "macro.h" +#include "widgets/widget.h" #include "widgets/window.h" #include "widgetbuilder.h" #include "lua.h" +#include "netcom.h" extern QString cpr; extern QString user; @@ -129,6 +130,7 @@ bool MacroWindow::doCommit() if(faulty == 0) { printf("MacroWindow -> committing...\n"); +#if 0 // Build the XML commit QString xml_string; xml_string.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); @@ -137,7 +139,7 @@ bool MacroWindow::doCommit() version + "\">\n"); // Iterate the different entries, and append their results to the commit string - QVector< Widget* >::iterator i=widgets.begin(); + QVector< Widget* >::iterator i = widgets.begin(); while (i != widgets.end()) { Widget* w = *i; @@ -168,6 +170,11 @@ bool MacroWindow::doCommit() //QByteArray ba = macro_commit.getResult(); QString ba = macro_commit.getResult(); printf("Server returned result: %s", ba.toStdString().c_str()); +#endif/*0*/ + + NetCom netcom(host, port, user, cpr); + netcom.send(widgets, macro, version); + return true; } else { return false; |