mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-24 06:33:04 +02:00
Move rtaudio, alsa-playback and qxt into thirdparty/.
This commit is contained in:
22
thirdparty/qxt/qxtweb-standalone/example/main.cpp
vendored
Normal file
22
thirdparty/qxt/qxtweb-standalone/example/main.cpp
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
#include <QCoreApplication>
|
||||
|
||||
#include "myservice.h"
|
||||
|
||||
|
||||
int main(int argc, char ** argv){
|
||||
|
||||
QCoreApplication app(argc,argv);
|
||||
|
||||
QxtHttpServerConnector connector;
|
||||
|
||||
QxtHttpSessionManager session;
|
||||
session.setPort(8080);
|
||||
session.setConnector(&connector);
|
||||
|
||||
MyService s1(&session);
|
||||
session.setStaticContentService ( &s1);
|
||||
|
||||
session.start();
|
||||
return app.exec();
|
||||
}
|
||||
|
23
thirdparty/qxt/qxtweb-standalone/example/myservice.h
vendored
Normal file
23
thirdparty/qxt/qxtweb-standalone/example/myservice.h
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
#ifndef MYSERVICE
|
||||
#define MYSERVICE
|
||||
|
||||
#include <QxtHttpServerConnector>
|
||||
#include <QxtHttpSessionManager>
|
||||
#include <QxtWebSlotService>
|
||||
#include <QxtWebPageEvent>
|
||||
|
||||
|
||||
class MyService : public QxtWebSlotService{
|
||||
Q_OBJECT;
|
||||
public:
|
||||
MyService(QxtAbstractWebSessionManager * sm, QObject * parent = 0 ): QxtWebSlotService(sm,parent){
|
||||
}
|
||||
public slots:
|
||||
void index(QxtWebRequestEvent* event)
|
||||
{
|
||||
postEvent(new QxtWebPageEvent(event->sessionID, event->requestID, "<h1>It Works!</h1>"));
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user