1 | /**************************************************************************** |
2 | ** |
3 | ** Copyright (C) 2015 The Qt Company Ltd. |
4 | ** Contact: http://www.qt.io/licensing/ |
5 | ** |
6 | ** This file is part of the QtContacts module of the Qt Toolkit. |
7 | ** |
8 | ** $QT_BEGIN_LICENSE:LGPL21$ |
9 | ** Commercial License Usage |
10 | ** Licensees holding valid commercial Qt licenses may use this file in |
11 | ** accordance with the commercial license agreement provided with the |
12 | ** Software or, alternatively, in accordance with the terms contained in |
13 | ** a written agreement between you and The Qt Company. For licensing terms |
14 | ** and conditions see http://www.qt.io/terms-conditions. For further |
15 | ** information use the contact form at http://www.qt.io/contact-us. |
16 | ** |
17 | ** GNU Lesser General Public License Usage |
18 | ** Alternatively, this file may be used under the terms of the GNU Lesser |
19 | ** General Public License version 2.1 or version 3 as published by the Free |
20 | ** Software Foundation and appearing in the file LICENSE.LGPLv21 and |
21 | ** LICENSE.LGPLv3 included in the packaging of this file. Please review the |
22 | ** following information to ensure the GNU Lesser General Public License |
23 | ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and |
24 | ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. |
25 | ** |
26 | ** As a special exception, The Qt Company gives you certain additional |
27 | ** rights. These rights are described in The Qt Company LGPL Exception |
28 | ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. |
29 | ** |
30 | ** $QT_END_LICENSE$ |
31 | ** |
32 | ****************************************************************************/ |
33 | |
34 | #include "qcontactmanagerenginefactory.h" |
35 | |
36 | QT_BEGIN_NAMESPACE_CONTACTS |
37 | |
38 | /*! |
39 | \class QContactManagerEngineFactory |
40 | \brief The QContactManagerEngineFactory class provides the interface for |
41 | plugins that implement QContactManagerEngine functionality. |
42 | |
43 | \inmodule QtContacts |
44 | |
45 | \ingroup contacts-backends |
46 | |
47 | This class provides a simple interface for the creation of |
48 | manager engine instances. Each factory has a specific id |
49 | associated with it, which forms the \c managerName parameter |
50 | when creating \l QContactManager objects. |
51 | |
52 | More information on writing a contacts engine plugin is available in |
53 | the \l{Qt Contacts Manager Engines} documentation. |
54 | |
55 | \sa QContactManager, QContactManagerEngine |
56 | */ |
57 | |
58 | /*! |
59 | A default, empty destructor. |
60 | */ |
61 | QContactManagerEngineFactory::~QContactManagerEngineFactory() |
62 | { |
63 | } |
64 | |
65 | /*! |
66 | \internal |
67 | */ |
68 | QStringList QContactManagerEngineFactory::keys() const |
69 | { |
70 | return QStringList() << managerName(); |
71 | } |
72 | |
73 | /*! |
74 | \fn QContactManagerEngineFactory::engine(const QMap<QString, QString>& parameters, QContactManager::Error* error) |
75 | |
76 | This function is called by the QContactManager implementation to |
77 | create an instance of the engine provided by this factory. |
78 | |
79 | The \a parameters supplied can be ignored or interpreted as desired. |
80 | |
81 | If a supplied parameter results in an unfulfillable request, or some other error |
82 | occurs, this function may return a null pointer, and the client developer will get an |
83 | invalid QContactManager in return. Any error should be stored in the supplied \a error |
84 | reference. |
85 | */ |
86 | |
87 | /*! |
88 | \fn QContactManagerEngineFactory::managerName() const |
89 | |
90 | This function should return a unique string that identifies |
91 | the engines provided by this factory. |
92 | |
93 | Typically this would be of the form "org.qt-project.Qt.SampleContactEngine", with |
94 | the appropriate domain and engine name substituted. |
95 | */ |
96 | |
97 | /*! |
98 | \fn QContactManagerEngineFactory::supportedImplementationVersions() const |
99 | |
100 | This function should return a list of versions of the engine which this factory can instantiate. |
101 | */ |
102 | QList<int> QContactManagerEngineFactory::supportedImplementationVersions() const |
103 | { |
104 | return QList<int>(); |
105 | } |
106 | |
107 | #include "moc_qcontactmanagerenginefactory.cpp" |
108 | |
109 | QT_END_NAMESPACE_CONTACTS |
110 | |