diff --git a/src/core/core.pri b/src/core/core.pri index 1b6c117d..fa707375 100644 --- a/src/core/core.pri +++ b/src/core/core.pri @@ -1,4 +1,15 @@ -include(qzmq/src/src.pri) +HEADERS += \ + $$PWD/qzmqcontext.h \ + $$PWD/qzmqsocket.h \ + $$PWD/qzmqvalve.h \ + $$PWD/qzmqreqmessage.h \ + $$PWD/qzmqreprouter.h + +SOURCES += \ + $$PWD/qzmqcontext.cpp \ + $$PWD/qzmqsocket.cpp \ + $$PWD/qzmqvalve.cpp \ + $$PWD/qzmqreprouter.cpp HEADERS += $$PWD/processquit.h SOURCES += $$PWD/processquit.cpp diff --git a/src/core/qzmq/.gitignore b/src/core/qzmq/.gitignore deleted file mode 100644 index e91a0392..00000000 --- a/src/core/qzmq/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -conf.pri -Makefile -*.o -*.moc -moc_*.cpp -/examples/helloclient/helloclient -/examples/helloserver/helloserver diff --git a/src/core/qzmq/COPYING b/src/core/qzmq/COPYING deleted file mode 100644 index 15947bd1..00000000 --- a/src/core/qzmq/COPYING +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (C) 2012 Justin Karneges - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/src/core/qzmq/README b/src/core/qzmq/README deleted file mode 100644 index 0f75c175..00000000 --- a/src/core/qzmq/README +++ /dev/null @@ -1,24 +0,0 @@ -QZmq ----- - -Author: Justin Karneges - -Yet another Qt binding for ZeroMQ. It wraps the C API of libzmq. It is -compatible with libzmq versions 2.x, 3.x, and 4.x. - -Some features: - - Completely event-driven, with both read and write notifications. - - For convenience, it is not necessary to create a Context explicitly. If a - Socket is created without one, then a globally shared Context will be - created automatically. - - Some handy extra classes. For example, RepRouter makes it easy to write a - REP socket server that handles multiple requests simultaneously, and Valve - makes it easy to regulate reads. - -To build the examples: - - echo "LIBS += -lzmq" > conf.pri - qmake && make - -To include the code in your project, just use the files in src. From a qmake -project you can include src.pri. It's your responsibility to link to libzmq. diff --git a/src/core/qzmq/examples/examples.pri b/src/core/qzmq/examples/examples.pri deleted file mode 100644 index c3b535f3..00000000 --- a/src/core/qzmq/examples/examples.pri +++ /dev/null @@ -1,7 +0,0 @@ -exists($$PWD/../conf.pri):include($$PWD/../conf.pri) - -QT -= gui -QT += network - -INCLUDEPATH += $$PWD/../src -include($$PWD/../src/src.pri) diff --git a/src/core/qzmq/examples/examples.pro b/src/core/qzmq/examples/examples.pro deleted file mode 100644 index 3486346a..00000000 --- a/src/core/qzmq/examples/examples.pro +++ /dev/null @@ -1,3 +0,0 @@ -TEMPLATE = subdirs - -SUBDIRS += helloclient helloserver diff --git a/src/core/qzmq/examples/helloclient/helloclient.cpp b/src/core/qzmq/examples/helloclient/helloclient.cpp deleted file mode 100644 index 10c0ab12..00000000 --- a/src/core/qzmq/examples/helloclient/helloclient.cpp +++ /dev/null @@ -1,60 +0,0 @@ -#include -#include -#include -#include "qzmqsocket.h" -#include - -using Connection = boost::signals2::scoped_connection; - -class App : public QObject -{ - Q_OBJECT - -private: - QZmq::Socket sock; - Connection rrConnection; - Connection mwConnection; - -public: - App() : - sock(QZmq::Socket::Req) - { - } - - void sock_messagesWritten(int count) - { - printf("messages written: %d\n", count); - } - - void sock_readyRead() - { - QList resp = sock.read(); - printf("read: %s\n", resp[0].data()); - emit quit(); - } - -public slots: - void start() - { - rrConnection = sock.readyRead.connect(boost::bind(&Private::sock_readyRead, this)); - mwConnection = sock.messagesWritten.connect(boost::bind(&Private::sock_messagesWritten, this, boost::placeholders::_1)); - sock.connectToAddress("tcp://localhost:5555"); - QByteArray out = "hello"; - printf("writing: %s\n", out.data()); - sock.write(QList() << out); - } - -signals: - void quit(); -}; - -int main(int argc, char **argv) -{ - QCoreApplication qapp(argc, argv); - App app; - QObject::connect(&app, SIGNAL(quit()), &qapp, SLOT(quit())); - QTimer::singleShot(0, &app, SLOT(start())); - return qapp.exec(); -} - -#include "helloclient.moc" diff --git a/src/core/qzmq/examples/helloclient/helloclient.pro b/src/core/qzmq/examples/helloclient/helloclient.pro deleted file mode 100644 index 80b8387d..00000000 --- a/src/core/qzmq/examples/helloclient/helloclient.pro +++ /dev/null @@ -1,3 +0,0 @@ -include(../examples.pri) - -SOURCES += helloclient.cpp diff --git a/src/core/qzmq/examples/helloserver/helloserver.cpp b/src/core/qzmq/examples/helloserver/helloserver.cpp deleted file mode 100644 index b5bf59a0..00000000 --- a/src/core/qzmq/examples/helloserver/helloserver.cpp +++ /dev/null @@ -1,55 +0,0 @@ -#include -#include -#include -#include "qzmqreqmessage.h" -#include "qzmqreprouter.h" - -class App : public QObject -{ - Q_OBJECT - -private: - QZmq::RepRouter sock; - - void sock_messagesWritten(int count) - { - printf("messages written: %d\n", count); - } - - void sock_readyRead() - { - QZmq::ReqMessage msg = sock.read(); - if(msg.content().isEmpty()) - { - printf("error: received empty message\n"); - return; - } - - printf("read: %s\n", msg.content()[0].data()); - QByteArray out = "world"; - printf("writing: %s\n", out.data()); - sock.write(msg.createReply(QList() << out)); - } - -public slots: - void start() - { - rrConnection = sock.readyRead.connect(boost::bind(&Private::sock_readyRead, this)); - mwConnection = sock.messagesWritten.connect(boost::bind(&Private::sock_messagesWritten, this, boost::placeholders::_1)); - sock.bind("tcp://*:5555"); - } - -signals: - void quit(); -}; - -int main(int argc, char **argv) -{ - QCoreApplication qapp(argc, argv); - App app; - QObject::connect(&app, SIGNAL(quit()), &qapp, SLOT(quit())); - QTimer::singleShot(0, &app, SLOT(start())); - return qapp.exec(); -} - -#include "helloserver.moc" diff --git a/src/core/qzmq/examples/helloserver/helloserver.pro b/src/core/qzmq/examples/helloserver/helloserver.pro deleted file mode 100644 index 07fa1e90..00000000 --- a/src/core/qzmq/examples/helloserver/helloserver.pro +++ /dev/null @@ -1,3 +0,0 @@ -include(../examples.pri) - -SOURCES += helloserver.cpp diff --git a/src/core/qzmq/qzmq.pro b/src/core/qzmq/qzmq.pro deleted file mode 100644 index 922f8700..00000000 --- a/src/core/qzmq/qzmq.pro +++ /dev/null @@ -1,3 +0,0 @@ -TEMPLATE = subdirs - -SUBDIRS += examples diff --git a/src/core/qzmq/src/src.pri b/src/core/qzmq/src/src.pri deleted file mode 100644 index cbc8daf6..00000000 --- a/src/core/qzmq/src/src.pri +++ /dev/null @@ -1,12 +0,0 @@ -HEADERS += \ - $$PWD/qzmqcontext.h \ - $$PWD/qzmqsocket.h \ - $$PWD/qzmqvalve.h \ - $$PWD/qzmqreqmessage.h \ - $$PWD/qzmqreprouter.h - -SOURCES += \ - $$PWD/qzmqcontext.cpp \ - $$PWD/qzmqsocket.cpp \ - $$PWD/qzmqvalve.cpp \ - $$PWD/qzmqreprouter.cpp diff --git a/src/core/qzmq/src/qzmqcontext.cpp b/src/core/qzmqcontext.cpp similarity index 100% rename from src/core/qzmq/src/qzmqcontext.cpp rename to src/core/qzmqcontext.cpp diff --git a/src/core/qzmq/src/qzmqcontext.h b/src/core/qzmqcontext.h similarity index 100% rename from src/core/qzmq/src/qzmqcontext.h rename to src/core/qzmqcontext.h diff --git a/src/core/qzmq/src/qzmqreprouter.cpp b/src/core/qzmqreprouter.cpp similarity index 100% rename from src/core/qzmq/src/qzmqreprouter.cpp rename to src/core/qzmqreprouter.cpp diff --git a/src/core/qzmq/src/qzmqreprouter.h b/src/core/qzmqreprouter.h similarity index 100% rename from src/core/qzmq/src/qzmqreprouter.h rename to src/core/qzmqreprouter.h diff --git a/src/core/qzmq/src/qzmqreqmessage.h b/src/core/qzmqreqmessage.h similarity index 100% rename from src/core/qzmq/src/qzmqreqmessage.h rename to src/core/qzmqreqmessage.h diff --git a/src/core/qzmq/src/qzmqsocket.cpp b/src/core/qzmqsocket.cpp similarity index 100% rename from src/core/qzmq/src/qzmqsocket.cpp rename to src/core/qzmqsocket.cpp diff --git a/src/core/qzmq/src/qzmqsocket.h b/src/core/qzmqsocket.h similarity index 100% rename from src/core/qzmq/src/qzmqsocket.h rename to src/core/qzmqsocket.h diff --git a/src/core/qzmq/src/qzmqvalve.cpp b/src/core/qzmqvalve.cpp similarity index 100% rename from src/core/qzmq/src/qzmqvalve.cpp rename to src/core/qzmqvalve.cpp diff --git a/src/core/qzmq/src/qzmqvalve.h b/src/core/qzmqvalve.h similarity index 100% rename from src/core/qzmq/src/qzmqvalve.h rename to src/core/qzmqvalve.h diff --git a/src/cpp.pro b/src/cpp.pro index c615f98d..cb1bae10 100644 --- a/src/cpp.pro +++ b/src/cpp.pro @@ -22,7 +22,6 @@ DEFINES += NO_IRISNET INCLUDEPATH += $$SRC_DIR/../target/include INCLUDEPATH += $$SRC_DIR/core -INCLUDEPATH += $$SRC_DIR/core/qzmq/src include(core/core.pri) include(m2adapter/m2adapter.pri) diff --git a/src/cpptests.pro b/src/cpptests.pro index 4fef6286..edd35943 100644 --- a/src/cpptests.pro +++ b/src/cpptests.pro @@ -18,7 +18,6 @@ DEFINES += NO_IRISNET INCLUDEPATH += $$SRC_DIR/../target/include INCLUDEPATH += $$SRC_DIR/core -INCLUDEPATH += $$SRC_DIR/core/qzmq/src include(core/tests.pri) include(proxy/tests.pri)