aboutsummaryrefslogtreecommitdiff
path: root/src/client/QXmppInternalClientExtension.cpp
diff options
context:
space:
mode:
authorLinus Jahn <lnj@kaidan.im>2020-01-28 17:54:49 +0100
committerLNJ <lnj@kaidan.im>2020-01-29 11:25:43 +0100
commitc7b6ebd872339c4225ed9ddbe4d875def17b7dd6 (patch)
tree6a49594750e7bb0db53d2f4e266362b25a1ea37f /src/client/QXmppInternalClientExtension.cpp
parent2c98c242f4b9bea1bd20863be590f122300de2a2 (diff)
downloadqxmpp-c7b6ebd872339c4225ed9ddbe4d875def17b7dd6.tar.gz
Introduce QXmppInternalClientExtensions
The new internal client extensions can be used to access private parts of the QXmppClient since QXmppInternalClientExtensions are a friend of the QXmppClient. The internal client extensions are not part of the public API, so you can't access them in an application using QXmpp. However, this was also the case before. If there is the need to access the internal extensions in the future, we'll still have all options open to change everything, because the classes are not part of the public API.
Diffstat (limited to 'src/client/QXmppInternalClientExtension.cpp')
-rw-r--r--src/client/QXmppInternalClientExtension.cpp39
1 files changed, 39 insertions, 0 deletions
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