Skip to content

Commit

Permalink
Make iris usable after previous merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Ri0n committed Mar 11, 2024
1 parent 426be69 commit 3e1421a
Show file tree
Hide file tree
Showing 29 changed files with 249 additions and 246 deletions.
112 changes: 3 additions & 109 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,15 @@ if(APPLE OR (MSVC OR USE_MXE))
set(IRIS_DEFAULT_BUNDLED_QCA ON)
endif()

option(IRIS_ENABLE_INSTALL "Enable installation" OFF)
option(IRIS_ENABLE_INSTALL "Enable installation" ON)
option(IRIS_ENABLE_JINGLE_SCTP "Enable SCTP over ICE Jingle transport / data channels" ON)
option(IRIS_BUNDLED_QCA "Adds: DTLS, Blake2b and other useful for XMPP crypto-stuff" ${IRIS_DEFAULT_BUNDLED_QCA})
option(IRIS_BUNDLED_USRSCTP "Compile compatible UsrSCTP lib (required for datachannel Jingle transport)" ${IRIS_DEFAULT_BUNDLED_USRSCTP})
option(IRIS_BUILD_TOOLS "Build tools and examples" OFF)
option(IRIS_ENABLE_DEBUG "Enable debugging code paths" OFF)

set(IRIS_INSTALL_INCLUDEDIR ${CMAKE_INSTALL_INCLUDEDIR}/xmpp/iris)

set(CMAKE_CXX_STANDARD 17)

if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR ("${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo"))
Expand Down Expand Up @@ -151,114 +153,6 @@ if(IRIS_ENABLE_INSTALL)
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
)

set(IRISNET_CORELIB_HEADERS
src/irisnet/corelib/addressresolver.h
src/irisnet/corelib/irisnetexport.h
src/irisnet/corelib/irisnetglobal.h
src/irisnet/corelib/irisnetplugin.h
src/irisnet/corelib/netavailability.h
src/irisnet/corelib/netinterface.h
src/irisnet/corelib/netnames.h
src/irisnet/corelib/objectsession.h
)
set(IRISNET_NONCORE_HEADERS
src/irisnet/noncore/cutestuff/bsocket.h
src/irisnet/noncore/cutestuff/bytestream.h
src/irisnet/noncore/cutestuff/httpconnect.h
src/irisnet/noncore/cutestuff/httppoll.h
src/irisnet/noncore/cutestuff/socks.h
src/irisnet/noncore/dtls.h
src/irisnet/noncore/ice176.h
src/irisnet/noncore/iceabstractstundisco.h
src/irisnet/noncore/iceagent.h
src/irisnet/noncore/legacy/ndns.h
src/irisnet/noncore/legacy/srvresolver.h
src/irisnet/noncore/processquit.h
src/irisnet/noncore/stunallocate.h
src/irisnet/noncore/stunbinding.h
src/irisnet/noncore/stunmessage.h
src/irisnet/noncore/stuntransaction.h
src/irisnet/noncore/tcpportreserver.h
src/irisnet/noncore/turnclient.h
src/irisnet/noncore/udpportreserver.h
)
set(XMPP_JID_HEADERS
src/xmpp/jid/jid.h
)
set(XMPP_CORE_HEADERS
src/xmpp/xmpp-core/xmpp.h
src/xmpp/xmpp-core/xmpp_clientstream.h
src/xmpp/xmpp-core/xmpp_stanza.h
src/xmpp/xmpp-core/xmpp_stream.h
)
set(XMPP_IM_HEADERS
src/xmpp/xmpp-im/filetransfer.h
src/xmpp/xmpp-im/httpfileupload.h
src/xmpp/xmpp-im/im.h
src/xmpp/xmpp-im/jingle-application.h
src/xmpp/xmpp-im/jingle-ft.h
src/xmpp/xmpp-im/jingle-ice.h
src/xmpp/xmpp-im/jingle-nstransportslist.h
src/xmpp/xmpp-im/jingle-s5b.h
src/xmpp/xmpp-im/jingle-session.h
src/xmpp/xmpp-im/jingle-transport.h
src/xmpp/xmpp-im/jingle.h
src/xmpp/xmpp-im/s5b.h
src/xmpp/xmpp-im/xmpp_address.h
src/xmpp/xmpp-im/xmpp_agentitem.h
src/xmpp/xmpp-im/xmpp_bitsofbinary.h
src/xmpp/xmpp-im/xmpp_caps.h
src/xmpp/xmpp-im/xmpp_captcha.h
src/xmpp/xmpp-im/xmpp_chatstate.h
src/xmpp/xmpp-im/xmpp_client.h
src/xmpp/xmpp-im/xmpp_discoinfotask.h
src/xmpp/xmpp-im/xmpp_discoitem.h
src/xmpp/xmpp-im/xmpp_encryption.h
src/xmpp/xmpp-im/xmpp_encryptionhandler.h
src/xmpp/xmpp-im/xmpp_features.h
src/xmpp/xmpp-im/xmpp_hash.h
src/xmpp/xmpp-im/xmpp_htmlelement.h
src/xmpp/xmpp-im/xmpp_httpauthrequest.h
src/xmpp/xmpp-im/xmpp_liveroster.h
src/xmpp/xmpp-im/xmpp_liverosteritem.h
src/xmpp/xmpp-im/xmpp_message.h
src/xmpp/xmpp-im/xmpp_muc.h
src/xmpp/xmpp-im/xmpp_pubsubitem.h
src/xmpp/xmpp-im/xmpp_pubsubretraction.h
src/xmpp/xmpp-im/xmpp_reference.h
src/xmpp/xmpp-im/xmpp_resource.h
src/xmpp/xmpp-im/xmpp_resourcelist.h
src/xmpp/xmpp-im/xmpp_roster.h
src/xmpp/xmpp-im/xmpp_rosteritem.h
src/xmpp/xmpp-im/xmpp_rosterx.h
src/xmpp/xmpp-im/xmpp_serverinfomanager.h
src/xmpp/xmpp-im/xmpp_status.h
src/xmpp/xmpp-im/xmpp_subsets.h
src/xmpp/xmpp-im/xmpp_task.h
src/xmpp/xmpp-im/xmpp_tasks.h
src/xmpp/xmpp-im/xmpp_thumbs.h
src/xmpp/xmpp-im/xmpp_url.h
src/xmpp/xmpp-im/xmpp_vcard.h
src/xmpp/xmpp-im/xmpp_xdata.h
src/xmpp/xmpp-im/xmpp_xmlcommon.h
)

set(IRIS_INSTALL_INCLUDEDIR ${CMAKE_INSTALL_INCLUDEDIR}/xmpp/iris)
install(FILES ${IRISNET_CORELIB_HEADERS}
DESTINATION ${IRIS_INSTALL_INCLUDEDIR}/irisnet/corelib
)
install(FILES ${IRISNET_NONCORE_HEADERS}
DESTINATION ${IRIS_INSTALL_INCLUDEDIR}/irisnet/noncore
)
install(FILES ${XMPP_JID_HEADERS}
DESTINATION ${IRIS_INSTALL_INCLUDEDIR}/xmpp/jid
)
install(FILES ${XMPP_CORE_HEADERS}
DESTINATION ${IRIS_INSTALL_INCLUDEDIR}/xmpp/xmpp-core
)
install(FILES ${XMPP_IM_HEADERS}
DESTINATION ${IRIS_INSTALL_INCLUDEDIR}/xmpp/xmpp-im
)
install(DIRECTORY include/iris
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/xmpp
FILES_MATCHING PATTERN "*.h"
Expand Down
2 changes: 2 additions & 0 deletions bundled.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
set(IRIS_ENABLE_INSTALL OFF CACHE BOOL "Install iris headers" FORCE)
add_subdirectory( ${CMAKE_CURRENT_LIST_DIR} )
1 change: 1 addition & 0 deletions include/iris/xmpp_bytestream.h
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "xmpp/xmpp-im/xmpp_bytestream.h"
1 change: 1 addition & 0 deletions include/iris/xmpp_form.h
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "xmpp/xmpp-im/xmpp_form.h"
47 changes: 45 additions & 2 deletions src/irisnet/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,41 @@ list(APPEND CMAKE_MODULE_PATH

add_library(irisnet STATIC)

set(IRISNET_CORELIB_HEADERS
corelib/addressresolver.h
corelib/irisnetexport.h
corelib/irisnetglobal.h
corelib/irisnetplugin.h
corelib/netavailability.h
corelib/netinterface.h
corelib/netnames.h
corelib/objectsession.h
)
set(IRISNET_NONCORE_HEADERS
noncore/cutestuff/bsocket.h
noncore/cutestuff/bytestream.h
noncore/cutestuff/httpconnect.h
noncore/cutestuff/httppoll.h
noncore/cutestuff/socks.h
noncore/dtls.h
noncore/ice176.h
noncore/iceabstractstundisco.h
noncore/iceagent.h
noncore/legacy/ndns.h
noncore/legacy/srvresolver.h
noncore/processquit.h
noncore/stunallocate.h
noncore/stunbinding.h
noncore/stunmessage.h
noncore/stuntransaction.h
noncore/tcpportreserver.h
noncore/turnclient.h
noncore/udpportreserver.h
)

target_sources(irisnet PRIVATE
${IRISNET_CORELIB_HEADERS}
${IRISNET_NONCORE_HEADERS}
corelib/irisnetglobal.cpp
corelib/irisnetplugin.cpp

Expand Down Expand Up @@ -72,8 +106,8 @@ endif()

target_include_directories(irisnet
PRIVATE
${CMAKE_SOURCE_DIR}/include/iris
${CMAKE_SOURCE_DIR}/src
${iris_SOURCE_DIR}/include/iris
${iris_SOURCE_DIR}/src
${Qca_INCLUDE_DIR}
PUBLIC
${USRSCTP_INCLUDES}
Expand All @@ -95,3 +129,12 @@ target_link_libraries(irisnet PUBLIC
${Qca_LIBRARY} ${USRSCTP_LIBRARY}
Qt5::Core Qt5::Network Qt5::Xml
)

if(IRIS_ENABLE_INSTALL)
install(FILES ${IRISNET_CORELIB_HEADERS}
DESTINATION ${IRIS_INSTALL_INCLUDEDIR}/irisnet/corelib
)
install(FILES ${IRISNET_NONCORE_HEADERS}
DESTINATION ${IRIS_INSTALL_INCLUDEDIR}/irisnet/noncore
)
endif()
4 changes: 4 additions & 0 deletions src/irisnet/noncore/cutestuff/bsocket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,13 @@

#include "bsocket.h"

#include "netnames.h"

#include <QHostAddress>
#include <QMetaType>
#include <QTcpSocket>
#include <QTimer>

#include <limits>

//#define BS_DEBUG
Expand Down
2 changes: 1 addition & 1 deletion src/irisnet/noncore/cutestuff/bsocket.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
#define CS_BSOCKET_H

#include "bytestream.h"
#include "netnames.h"

#include <QAbstractSocket>
#include <limits>

class QByteArray;
class QObject;
class QString;
class QTcpSocket;

// CS_NAMESPACE_BEGIN
/*!
Expand Down
8 changes: 5 additions & 3 deletions src/irisnet/noncore/cutestuff/httppoll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@
#include <QByteArray>
#include <QUrl>
#include <QtCrypto>
#include <qpointer.h>
#include <qstringlist.h>
#include <qtimer.h>
#include <QPointer>
#include <QHostAddress>
#include <QStringList>
#include <QTimer>

#ifdef PROX_DEBUG
#include <stdio.h>
#endif
Expand Down
3 changes: 3 additions & 0 deletions src/irisnet/noncore/cutestuff/socks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
#include <QSocketNotifier>
#include <QStringList>
#include <QTimer>
#include <QUdpSocket>
#include <QTcpSocket>
#include <QTcpServer>

//#define PROX_DEBUG
#ifdef PROX_DEBUG
Expand Down
1 change: 0 additions & 1 deletion src/irisnet/noncore/iceabstractstundisco.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include <QList>
#include <QObject>

#include <functional>
#include <memory>

namespace XMPP {
Expand Down
2 changes: 1 addition & 1 deletion src/irisnet/noncore/processquit.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <QtCore>
#define IRISNET_EXPORT
#else
#include "irisnetglobal.h"
#include "../corelib/irisnetglobal.h"
#endif

#ifndef NO_IRISNET
Expand Down
Loading

0 comments on commit 3e1421a

Please sign in to comment.