qtmobility/src/contacts/requests/qcontactfetchrequest.cpp
changeset 4 90517678cc4f
parent 1 2b40d63a9c3d
child 5 453da2cfceef
--- a/qtmobility/src/contacts/requests/qcontactfetchrequest.cpp	Fri Apr 16 15:51:22 2010 +0300
+++ b/qtmobility/src/contacts/requests/qcontactfetchrequest.cpp	Mon May 03 13:18:40 2010 +0300
@@ -63,11 +63,6 @@
 {
 }
 
-/*! Cleans up the memory in use by this contact fetch request */
-QContactFetchRequest::~QContactFetchRequest()
-{
-}
-
 /*! Sets the contact filter used to determine which contacts will be retrieved to \a filter */
 void QContactFetchRequest::setFilter(const QContactFilter& filter)
 {
@@ -82,13 +77,18 @@
     d->m_sorting = sorting;
 }
 
-/*! Sets the list of allowable detail definition names to \a definitionNames.  Any contacts retrieved
-    by the request will have any details whose definition name is not on the restricted list
-    removed prior to being returned. */
-void QContactFetchRequest::setDefinitionRestrictions(const QStringList& definitionNames)
+/*!
+  Sets the fetch hint which may be used by the backend to optimize contact retrieval
+  to \a fetchHint.  A client should not make changes to a contact which has been retrieved
+  using a fetch hint other than the default fetch hint.  Doing so will result in information
+  loss when saving the contact back to the manager (as the "new" restricted contact will
+  replace the previously saved contact in the backend).
+  \sa QContactFetchHint
+ */
+void QContactFetchRequest::setFetchHint(const QContactFetchHint &fetchHint)
 {
     Q_D(QContactFetchRequest);
-    d->m_definitionRestrictions = definitionNames;
+    d->m_fetchHint = fetchHint;
 }
 
 /*! Returns the filter that will be used to select contacts to be returned */
@@ -105,11 +105,18 @@
     return d->m_sorting;
 }
 
-/*! Returns the list of definition names which define which details contacts in the result list will be limited to */
-QStringList QContactFetchRequest::definitionRestrictions() const
+/*!
+  Returns the fetch hint which may be used by the backend to optimize contact retrieval.
+  A client should not make changes to a contact which has been retrieved
+  using a fetch hint other than the default fetch hint.  Doing so will result in information
+  loss when saving the contact back to the manager (as the "new" restricted contact will
+  replace the previously saved contact in the backend).
+  \sa QContactFetchHint
+ */
+QContactFetchHint QContactFetchRequest::fetchHint() const
 {
     Q_D(const QContactFetchRequest);
-    return d->m_definitionRestrictions;
+    return d->m_fetchHint;
 }
 
 /*! Returns the list of contacts retrieved by this request */