File: main.cpp

package info (click to toggle)
libqxt 0.6.1-6
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 19,004 kB
  • sloc: cpp: 57,512; xml: 296; sh: 251; makefile: 56; php: 14
file content (23 lines) | stat: -rw-r--r-- 635 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <QCoreApplication>
#include <qxtwebcgiservice.h>
#include <QxtHttpSessionManager>
#include <QtDebug>

#ifdef Q_OS_WIN
#   define CLIENT_NAME "\\cgiclient.exe"
#else
#   define CLIENT_NAME "/cgiclient"
#endif

int main(int argc, char** argv) {
    QCoreApplication app(argc, argv);
    QxtHttpSessionManager m;
    m.setConnector(QxtHttpSessionManager::HttpServer);
    QxtWebCgiService* svc = new QxtWebCgiService(app.applicationDirPath() + CLIENT_NAME, &m, &m);
    qDebug() << svc->binary();
    m.setStaticContentService(svc);
    m.setAutoCreateSession(false);
    m.setPort(8192);
    m.start();
    return app.exec();
}