File indexing completed on 2024-06-23 05:49:23
0001 /* 0002 This file is part of the Kasten Framework, made within the KDE community. 0003 0004 SPDX-FileCopyrightText: 2007-2008 Friedrich W. H. Kossebau <kossebau@kde.org> 0005 0006 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0007 */ 0008 0009 #include "testdocumentfilesynchronizerfactory.hpp" 0010 0011 // lib 0012 #include "testdocument.hpp" 0013 #include "testdocumentfilesynchronizer.hpp" 0014 // Qt 0015 #include <QString> 0016 0017 namespace Kasten { 0018 0019 TestDocumentFileSynchronizerFactory::TestDocumentFileSynchronizerFactory(const QByteArray& header) 0020 : mHeader(header) 0021 {} 0022 0023 TestDocumentFileSynchronizerFactory::~TestDocumentFileSynchronizerFactory() = default; 0024 0025 // could be set to base class as value, is only one object per factory at runtime 0026 // and settable in desktop file 0027 QString TestDocumentFileSynchronizerFactory::supportedWorkType() const { return QStringLiteral("TestDocument");} 0028 QString TestDocumentFileSynchronizerFactory::supportedRemoteType() const { return QStringLiteral("application/octet-stream");} 0029 0030 // TODO: these function seems to be always the same. Make macro or template function 0031 // or, if there is only one place which calls this, move there 0032 AbstractModelSynchronizer* TestDocumentFileSynchronizerFactory::createSynchronizer() const 0033 { 0034 return new TestDocumentFileSynchronizer(mHeader); 0035 } 0036 0037 } 0038 0039 #include "moc_testdocumentfilesynchronizerfactory.cpp"