X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcontrib%2Flibqxt-2007-10-24%2Ftests%2Fweb%2Fupload%2Fmain.cpp;fp=src%2Fcontrib%2Flibqxt-2007-10-24%2Ftests%2Fweb%2Fupload%2Fmain.cpp;h=36f461ec11d7c0547ec3961a27c547a3d7f99ed3;hp=0000000000000000000000000000000000000000;hb=a634acadbcf6017474f68a3eaf7cb632660e9e49;hpb=cd122ca8e0d2c0ffc5397e0a813c75d791a7e6e3 diff --git a/src/contrib/libqxt-2007-10-24/tests/web/upload/main.cpp b/src/contrib/libqxt-2007-10-24/tests/web/upload/main.cpp new file mode 100644 index 00000000..36f461ec --- /dev/null +++ b/src/contrib/libqxt-2007-10-24/tests/web/upload/main.cpp @@ -0,0 +1,53 @@ +#include +#include +#include +#include +#include +class test : public QxtWebController +{ +Q_OBJECT +public: + test():QxtWebController("root") + { + } + +public slots: + + int index() + { + echo()<< + "
" + "File to upload:
" + "Notes about the file:
" + "
" + " to upload the file!" + "
"; + return 0; + } + int upload() + { + + QByteArray d= QxtWebCore::content(100000000); + QxtWebCore::sendHeader(); + + QByteArray io; + QxtWebCore::socket()->write(d); + return 0; + } +}; + + + + + +int main(int argc, char *argv[]) +{ + QCoreApplication app(argc, argv); + QxtWebCore core(new QxtFcgiConnector()); + core.start(); + test t; + return app.exec(); +} + + +#include "main.moc"