summaryrefslogtreecommitdiff
path: root/src/location/places/qplacemanagerengine.h
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2011-09-30 10:59:51 +1000
committerQt by Nokia <qt-info@nokia.com>2011-10-03 01:46:40 +0200
commit84fb545d2e5ed16c61ea584b4ece91fd064cf54a (patch)
tree3fec2aa4ae58877b4cb93033e334a55e6cfdcadb /src/location/places/qplacemanagerengine.h
parentec4bc548e1d4faf218247da362c445cbd1f54c9e (diff)
downloadqtlocation-84fb545d2e5ed16c61ea584b4ece91fd064cf54a.tar.gz
Add Category Save and Removal functionality
Note that the jsondb implementation will be heavily refactored. The currrent implementation of having child id's within each category does not 'gel' very well with jsondb. (Some of the current engine functions are practically synchronous) Apparently there is an alternative approach using 'Views', but further investigation is required. For now the intention is just to have something working so we can with experiment and refine the API. Change-Id: I5c9566e94f1a712f33dc06f6ad5e041326265398 Reviewed-on: http://codereview.qt-project.org/5215 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: abcd <qt_abcd1@ovi.com>
Diffstat (limited to 'src/location/places/qplacemanagerengine.h')
-rw-r--r--src/location/places/qplacemanagerengine.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/location/places/qplacemanagerengine.h b/src/location/places/qplacemanagerengine.h
index 9dfe084a..7335b452 100644
--- a/src/location/places/qplacemanagerengine.h
+++ b/src/location/places/qplacemanagerengine.h
@@ -75,12 +75,18 @@ public:
virtual QPlaceTextPredictionReply *textPredictions(const QPlaceSearchRequest &request) = 0;
virtual QPlaceIdReply *savePlace(const QPlace &place, QPlaceManager::VisibilityScope scope) = 0;
+ virtual QPlaceIdReply *removePlace(const QPlace &place) = 0;
virtual QPlaceManager::VisibilityScopes supportedSaveVisibilityScopes() const = 0;
- virtual QPlaceIdReply *removePlace(const QPlace &place) = 0;
+ virtual QPlaceIdReply *saveCategory(const QPlaceCategory &category, const QString &parentId) = 0;
+ virtual QPlaceIdReply *removeCategory(const QString &categoryId) = 0;
virtual QPlaceReply *initializeCategories() = 0;
- virtual QList<QPlaceCategory> categories(const QPlaceCategory &parent) const = 0;
+ virtual QString parentCategoryId(const QString &categoryId) const = 0;
+ virtual QStringList childrenCategoryIds(const QString &categoryId) const = 0;
+ virtual QPlaceCategory category(const QString &categoryId) const = 0;
+
+ virtual QList<QPlaceCategory> childCategories(const QString &parentId) const = 0;
virtual QLocale locale() const = 0;
virtual void setLocale(const QLocale &locale) = 0;
@@ -94,6 +100,10 @@ Q_SIGNALS:
void placeUpdated(const QString &placeId);
void placeRemoved(const QString &placeId);
+ void categoryAdded(const QPlaceCategory &category, const QString &parentCategoryId);
+ void categoryUpdated(const QPlaceCategory &category, const QString &parentCategoryId);
+ void categoryRemoved(const QString &categoryId, const QString &parentCategoryId);
+
private:
void setManagerName(const QString &managerName);
void setManagerVersion(int managerVersion);