aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt1
-rw-r--r--src/client/QXmppClient.h3
-rw-r--r--src/client/QXmppInternalClientExtension.cpp39
-rw-r--r--src/client/QXmppInternalClientExtension_p.h61
4 files changed, 104 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index a2582154..11d7f535 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -157,6 +157,7 @@ set(SOURCE_FILES
client/QXmppClientExtension.cpp
client/QXmppConfiguration.cpp
client/QXmppEntityTimeManager.cpp
+ client/QXmppInternalClientExtension.cpp
client/QXmppInvokable.cpp
client/QXmppMamManager.cpp
client/QXmppMessageReceiptManager.cpp
diff --git a/src/client/QXmppClient.h b/src/client/QXmppClient.h
index 7d2dd61b..95baf680 100644
--- a/src/client/QXmppClient.h
+++ b/src/client/QXmppClient.h
@@ -39,6 +39,7 @@ class QXmppPresence;
class QXmppMessage;
class QXmppIq;
class QXmppStream;
+class QXmppInternalClientExtension;
// managers
class QXmppDiscoveryIq;
@@ -276,6 +277,8 @@ private slots:
private:
QXmppClientPrivate *const d;
+
+ friend class QXmppInternalClientExtension;
};
#endif // QXMPPCLIENT_H
diff --git a/src/client/QXmppInternalClientExtension.cpp b/src/client/QXmppInternalClientExtension.cpp
new file mode 100644
index 00000000..c36666fb
--- /dev/null
+++ b/src/client/QXmppInternalClientExtension.cpp
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2008-2020 The QXmpp developers
+ *
+ * Author:
+ * Linus Jahn
+ *
+ * Source:
+ * https://github.com/qxmpp-project/qxmpp
+ *
+ * This file is a part of QXmpp library.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ */
+
+#include "QXmppInternalClientExtension_p.h"
+
+#include "QXmppClient.h"
+#include "QXmppClient_p.h"
+
+/// \cond
+QXmppInternalClientExtension::QXmppInternalClientExtension()
+ : QXmppClientExtension()
+{
+}
+
+QXmppOutgoingClient *QXmppInternalClientExtension::clientStream()
+{
+ return client()->d->stream;
+}
+/// \endcond
diff --git a/src/client/QXmppInternalClientExtension_p.h b/src/client/QXmppInternalClientExtension_p.h
new file mode 100644
index 00000000..5692a21a
--- /dev/null
+++ b/src/client/QXmppInternalClientExtension_p.h
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2008-2020 The QXmpp developers
+ *
+ * Author:
+ * Linus Jahn
+ *
+ * Source:
+ * https://github.com/qxmpp-project/qxmpp
+ *
+ * This file is a part of QXmpp library.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ */
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the QXmpp API.
+//
+// This header file may change from version to version without notice,
+// or even be removed.
+//
+// We mean it.
+//
+
+#ifndef QXMPPINTERNALCLIENTEXTENSION_H
+#define QXMPPINTERNALCLIENTEXTENSION_H
+
+#include "QXmppClientExtension.h"
+
+class QXmppOutgoingClient;
+
+///
+/// \brief The QXmppInternalClientExtension class is used to access private
+/// components of the QXmppClient.
+///
+/// It is not exposed to the public API and is only used to split up internal
+/// parts of the QXmppClient, like TLS negotiation.
+///
+class QXmppInternalClientExtension : public QXmppClientExtension
+{
+ Q_OBJECT
+
+public:
+ QXmppInternalClientExtension();
+
+protected:
+ QXmppOutgoingClient *clientStream();
+};
+
+#endif // QXMPPINTERNALCLIENTEXTENSION_H