summaryrefslogtreecommitdiff
path: root/src/location/places/qplacemanagerengine.cpp
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2011-07-22 14:03:53 +1000
committerAaron McCarthy <aaron.mccarthy@nokia.com>2011-07-29 07:51:06 +0200
commit1d7195981caf1bf1d0bf0b0d1a047bc13b140d6f (patch)
tree5b06e91da400b7f0310db40454511951fca77679 /src/location/places/qplacemanagerengine.cpp
parentf7131b42e6b997680ed4ebcc3d19becc1ef6da0e (diff)
downloadqtlocation-1d7195981caf1bf1d0bf0b0d1a047bc13b140d6f.tar.gz
Incorporate places/nokia plugin into geoservices/nokia plugin.
This brings the usage of the Places API inline with the rest of the functional groups in QtLocation. Removes the PlaceManager element. Change-Id: I6d7259fe7ea1e55dcf97b95025e0c78748e82b9f Reviewed-on: http://codereview.qt.nokia.com/2245 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Aaron McCarthy <aaron.mccarthy@nokia.com>
Diffstat (limited to 'src/location/places/qplacemanagerengine.cpp')
-rw-r--r--src/location/places/qplacemanagerengine.cpp100
1 files changed, 98 insertions, 2 deletions
diff --git a/src/location/places/qplacemanagerengine.cpp b/src/location/places/qplacemanagerengine.cpp
index 3c28ae44..f2ae288c 100644
--- a/src/location/places/qplacemanagerengine.cpp
+++ b/src/location/places/qplacemanagerengine.cpp
@@ -40,16 +40,112 @@
****************************************************************************/
#include "qplacemanagerengine.h"
+#include "qplacemanagerengine_p.h"
#include "qplacecategory_p.h"
QT_USE_NAMESPACE
-QPlaceManagerEngine::QPlaceManagerEngine(QObject *parent)
- : QObject(parent)
+/*!
+ \class QPlaceManagerEngine
+
+ \brief The QPlaceManagerEngine class provides an interface and convenience methods to
+ implementers of QGeoServiceProvider plugins who want to provide access to place search
+ functionality.
+
+ \inmodule QtLocation
+ \since 5.0
+
+ \ingroup maps-impl
+
+ Subclasses of QPlaceManagerEngine need to provide an implementation of getPlaceDetails(),
+ getMedia(), postRating(), getReviews(), searchForPlaces(), supportedSearchVisibilityScopes(),
+ recommendations(), textPredictions(), connectivityMode(), setConnectivityMode(),
+ supportedConnectivityModes(), savePlace(), supportedSaveVisibilityScopes(), removePlace(),
+ initializeCategories() and categories().
+
+ \sa QPlaceManager
+*/
+
+/*!
+ Constructs a new engine with the specified \a parent, using \a parameters to pass any
+ implementation specific data to the engine.
+*/
+QPlaceManagerEngine::QPlaceManagerEngine(const QMap<QString, QVariant> &parameters,
+ QObject *parent)
+: QObject(parent), d_ptr(new QPlaceManagerEnginePrivate)
{
+ Q_UNUSED(parameters)
}
+/*!
+ Destroys this engine.
+*/
QPlaceManagerEngine::~QPlaceManagerEngine()
{
+ delete d_ptr;
+}
+
+/*!
+ Sets the name which this engine implementation uses to distinguish itself
+ from the implementations provided by other plugins to \a managerName.
+
+ The combination of managerName() and managerVersion() should be unique
+ amongst plugin implementations.
+*/
+void QPlaceManagerEngine::setManagerName(const QString &managerName)
+{
+ d_ptr->managerName = managerName;
+}
+
+/*!
+ Returns the name which this engine implementation uses to distinguish
+ itself from the implementations provided by other plugins.
+
+ The combination of managerName() and managerVersion() should be unique
+ amongst plugin implementations.
+*/
+QString QPlaceManagerEngine::managerName() const
+{
+ return d_ptr->managerName;
+}
+
+/*!
+ Sets the version of this engine implementation to \a managerVersion.
+
+ The combination of managerName() and managerVersion() should be unique
+ amongst plugin implementations.
+*/
+void QPlaceManagerEngine::setManagerVersion(int managerVersion)
+{
+ d_ptr->managerVersion = managerVersion;
}
+
+/*!
+ Returns the version of this engine implementation.
+
+ The combination of managerName() and managerVersion() should be unique
+ amongst plugin implementations.
+*/
+int QPlaceManagerEngine::managerVersion() const
+{
+ return d_ptr->managerVersion;
+}
+
+
+
+
+
+QPlaceManagerEnginePrivate::QPlaceManagerEnginePrivate()
+: managerVersion(-1)
+{
+}
+
+QPlaceManagerEnginePrivate::~QPlaceManagerEnginePrivate()
+{
+}
+
+#include "moc_qplacemanagerengine.cpp"
+
+QT_END_NAMESPACE
+