summaryrefslogtreecommitdiffstats
path: root/src/remoteobjects/qconnectionfactories.h
Commit message (Collapse)AuthorAgeFilesLines
* Mark QtRemoteObjects as security criticalØystein Heskestad2025-07-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | The QtRemoteObjects serialization is built on top of QDataStream, but QDataStream is not secure. Mark all files parsing data as security critical. The security is dependent on the backend used. The local and QNX backends communicate only locally but are insecure on a compromised host. The TCP backend is by default insecure, but it supports TLS, and can be secure if that is used. The two files in the repparser directory are used for parsing, but only at build time, and are therefore kept at security significant. The remaining files are marked as security signifcant. QUIP: 23 Task-number: QTBUG-135570 Pick-to: 6.10 6.9 6.8 Change-Id: I11176c036d95f8c706bd05e1cab1ba499003f683 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Add a static method setLocalServerOptions to QRemoteObjectHostØystein Heskestad2023-09-111-1/+2
| | | | | | | | | | | | | | | This method must be called before a QRemoteObjectHost object using the QLocalServer backend starts listening for it to have an effect. It starts listening during construction when the address argument is non-empty, otherwise when the address is set via setHostUrl(). Also added another error code QRemoteObjectNode::SocketAccessError for when the QRemoteobjectNode is not allowed to connect to the QRemoteObjectHost. Fixes: QTBUG-72921 Change-Id: I4303b25dbc37d9f4d4eb2bdaeff1ef02089e6b5d Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
* Use SPDX license identifiersLucie Gérard2022-06-141-38/+2
| | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: I315d7ce1d6c6c3497afdfe8b61a113fdc181c935 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Document the SC and BC guarantees for APIs from qconnectionfactories.hSona Kurazyan2021-06-171-4/+7
| | | | | | | | | | | Updated the warning in qconnectionfactories.h to mention source and binary compatibility guarantees for the classes exported by that header. Added a short overview documentation for these classes. Pick-to: 6.2 Change-Id: Iabeb865908ca05ced1bfb191971806e291915e7e Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
* Rename the classes for adding a custom transport supportSona Kurazyan2021-06-171-24/+24
| | | | | | | | | | | | | Added QtRO prefix to IoDeviceBase, ServerIoDevice and ClientIoDevice classes. These classes are exported and can be used externally for supporting a custom transport by deriving from them and implementing the virtual methods. Added the prefix also to ExternalIoDevice, to keep the naming consistent. Pick-to: 6.2 Change-Id: I64845cff55687a127d2c43de03ecc65ac9bd321b Reviewed-by: Brett Stottlemyer <bstottle@ford.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Remove the IoDeviceBase::stream() methodSona Kurazyan2021-06-041-2/+1
| | | | | | | | | | | When support for multiple serialization backends is added, IoDeviceBase shouldn't be aware of the serialization method used (serialization is handled by the codec), so it should have no QDataStream-specific methods. Moved the method returning QDataStream to the private part, so that it can be easily removed later, without breaking SC. Change-Id: I511306ac520c5b745576f5db31dc22f0eadacc62 Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
* Move client-side Codec to IoDeviceBaseBrett Stottlemyer2021-05-271-0/+2
| | | | | | | | | | This is more appropriate than having a separate mapping of connection to Codec. Change-Id: I3b54bfb479de04706a3f9563e7a987af91d0282d Reviewed-by: Brett Stottlemyer <bstottle@ford.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Move classes for adding a custom transport protocol to a public headerBrett Stottlemyer2021-05-271-0/+247
| | | | | | | | | | | Although these classes weren't documented, they could be used externally to specify a custom transport via inheriting from them and registering the custom classes using qRegisterRemoteObjectsClient() and qRegisterRemoteObjectsServer() methods. Change-Id: Id4cfddf77cd5b55278b5780f4fca447f0706d464 Reviewed-by: Brett Stottlemyer <bstottle@ford.com> Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Dissolve qconnectionfactories.h, make privateKevin Funk2017-10-061-228/+0
| | | | | | | | | Make API previously exposed in qconnectionfactories.h private. It is only useful for backend implementations, and we recommend to develop backend implementations in-tree. Change-Id: I868b788ebefce9bc27f43376f619c6705b44afd5 Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
* qconnectionfactories: Const'ify where possibleKevin Funk2017-09-281-4/+4
| | | | | | Change-Id: Iddb610ccda251b20385dbde281b8cbc928e86e30 Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
* Modernize: Use override where possibleKevin Funk2017-09-211-3/+3
| | | | | Change-Id: Id67366f3eaf251b1f2c8d9a91a41dec72117cc7c Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
* Export classes needed for custom backendsv5.9.1Brett Stottlemyer2017-06-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Export ServerIoDevice, ClientIoDevice and QConnectionAbstractServer, which are needed to enable custom QIODevice backend implementations. Test code: class TestClient : public ClientIoDevice { public: TestClient(QObject *) {} void connectToServer() override {} bool isOpen() override { return false; } QIODevice *connection() override { return 0; } void doClose() override {} }; class TestServer : public ServerIoDevice { public: QIODevice *connection() const override {return 0;} void doClose() override {} }; class TestServerImpl : public QConnectionAbstractServer { public: TestServerImpl(QObject *) {} bool hasPendingConnections() const override { return true; } ServerIoDevice *configureNewConnection() override { return new TestServer; } QUrl address() const override { return QUrl(); } bool listen(const QUrl &) override { return true; } QAbstractSocket::SocketError serverError() const override { return QAbstractSocket::UnknownSocketError; } void close() override {}; }; int main(int, char**) { auto url = QUrl(QStringLiteral("test:address")); qRegisterRemoteObjectsClient<TestClient>(QStringLiteral("test")); qRegisterRemoteObjectsServer<TestServerImpl>(QStringLiteral("test")); auto server = QtROServerFactory::instance()->create(url); auto connection = QtROClientFactory::instance()->create(url); } Task-number: QTBUG-60624 Change-Id: I08899fe40bf9407dab3783cbaf8c14809d46bbdb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Michael Brasser <michael.brasser@live.com>
* QtRO{Client,Server}Factory: Make ctor privateKevin Funk2017-06-091-4/+6
| | | | | | | | Reduce exposed public API a little bit more. As suggested in a previous change-request. Change-Id: Ia64e9a2dc515969943deb2bca2c5702b4f26a52e Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
* Export instance methods of QtROServerFactory and QtROClientFactoryv5.9.0-rc2v5.9.0-rc1v5.9.0Friedemann Kleint2017-05-151-2/+2
| | | | | | | Task-number: QTBUG-60624 Change-Id: Icfb14a476572667b9617099dccfdd13a15605034 Reviewed-by: Brett Stottlemyer <bstottle@ford.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Correct QtRO license headers and added missing license filesv5.9.0-beta4Jani Heikkinen2017-05-021-13/+19
| | | | | | | | | | | | | Unify licensing as it is in other submodules - Src is licensed under Commercial, LGPLv3, GPLv2 and GPLv3 licenses - Examples are licensed under Commercial and BSD licenses - Tools and tests are licensed under commercial and GPLv3 license with some exceptions Task-number: QTBUG-58921 Change-Id: I4494bf8b705568b243340c98316bedd706145db5 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
* Replace Q_NULLPTR -> nullptrKevin Funk2017-03-291-5/+5
| | | | | | | | Skip the moc/ directory intentionally, since it contains third-party code Change-Id: I97105e475c109231e001dc4525b3096a06601868 Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
* Load backends properly in Qt static buildsKevin Funk2017-03-241-27/+58
| | | | | | | | | | | | We need a proper way to register the Client/Server backends. Registration via static initialization will not, thus turn the Client/Server factories into a global singleton and attempt to register the Client/Server backends whenever the create-function is called. Change-Id: I1c2fb5ad1e742e6480148254fe774ce2a1c6630f Task-number: QTBUG-59464 Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
* Fixes for license checkBrett Stottlemyer2017-01-141-21/+13
| | | | | | | | Change-Id: I3cf39180b08b80ea65c46e7b6a9e81f3aa79d1af Reviewed-by: Kevin Funk <kevin.funk@kdab.com> Reviewed-by: Continuous Integration (KDAB) <build@kdab.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix warnings from syncqt.plKevin Funk2016-11-301-1/+1
| | | | | | | | | - Add "we mean it" warning to private headers - Properly include module headers in public headers Change-Id: I3feded431f890fd451c07920edb102ae902a0fb9 Reviewed-by: Continuous Integration (KDAB) <build@kdab.com> Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
* Use Q_NULLPTR everywhereBogDan Vatra2016-07-221-2/+2
| | | | | Change-Id: Ide9d8a2b483654d9c2230cd5de6090857d969da4 Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
* Add QNX-specific backendBrett Stottlemyer2016-03-191-1/+1
| | | | | | | | | | | Provide a backend using QNX Native Messaging. Change-Id: Ie93ba5483573b35c0a9fe31c57a710b1163b4901 Reviewed-by: Continuous Integration (KDAB) <build@kdab.com> Reviewed-by: Brett Stottlemyer <bstottle@ford.com> Reviewed-by: James McDonnell <jmcdonnell@qnx.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* add some includes to fix the compileAllen Winter2015-12-021-1/+1
| | | | | | Change-Id: I4672f56750f69ba5c0e05802319a5ef814dc2a76 Reviewed-by: Continuous Integration (KDAB) <build@kdab.com> Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
* Make connection-factories publicBrett Stottlemyer2015-12-021-0/+197
This is a large change, but it is completely a refactoring of code, not code changes. The connectionfactory classes are now public and describe the connection backends (local and tcp/ip). Instead of putting the client code in a set of files and the server code in a set of files, we have local_backend and tcpip_backend which include both client/server code. The packet type enums were moved to the global header file to make them available to additional backends. Change-Id: I83efc9c1f2013f41f97a4350a31a708f484749e4 Reviewed-by: Continuous Integration (KDAB) <build@kdab.com> Reviewed-by: Kevin Funk <kevin.funk@kdab.com> Reviewed-by: Allen Winter <allen.winter@kdab.com> Reviewed-by: Brett Stottlemyer <bstottle@ford.com>