qtmobility/src/contacts/requests/qcontactlocalidfetchrequest.cpp
changeset 14 6fbed849b4f4
parent 11 06b8e2af4411
child 15 1f895d8a5b2b
equal deleted inserted replaced
11:06b8e2af4411 14:6fbed849b4f4
    52 
    52 
    53   For a QContactLocalIdFetchRequest, the resultsAvailable() signal will be emitted when the resultant
    53   For a QContactLocalIdFetchRequest, the resultsAvailable() signal will be emitted when the resultant
    54   manager-local contact ids (which may be retrieved by calling ids()), are updated, as well as if
    54   manager-local contact ids (which may be retrieved by calling ids()), are updated, as well as if
    55   the overall operation error (which may be retrieved by calling error()) is updated.
    55   the overall operation error (which may be retrieved by calling error()) is updated.
    56 
    56 
       
    57   Please see the class documentation of QContactAbstractRequest for more information about
       
    58   the usage of request classes and ownership semantics.
       
    59 
    57   \ingroup contacts-requests
    60   \ingroup contacts-requests
    58  */
    61  */
    59 
    62 
    60 /*! Constructs a new contact id fetch request whose parent is the specified \a parent */
    63 /*! Constructs a new contact id fetch request whose parent is the specified \a parent */
    61 QContactLocalIdFetchRequest::QContactLocalIdFetchRequest(QObject* parent)
    64 QContactLocalIdFetchRequest::QContactLocalIdFetchRequest(QObject* parent)
    65 
    68 
    66 /*! Sets the filter which will be used to select the contacts whose ids will be returned to \a filter */
    69 /*! Sets the filter which will be used to select the contacts whose ids will be returned to \a filter */
    67 void QContactLocalIdFetchRequest::setFilter(const QContactFilter& filter)
    70 void QContactLocalIdFetchRequest::setFilter(const QContactFilter& filter)
    68 {
    71 {
    69     Q_D(QContactLocalIdFetchRequest);
    72     Q_D(QContactLocalIdFetchRequest);
       
    73     QMutexLocker ml(&d->m_mutex);
    70     d->m_filter = filter;
    74     d->m_filter = filter;
    71 }
    75 }
    72 
    76 
    73 /*! Sets the future sort ordering of the result of the request to \a sorting.  This function only has
    77 /*! Sets the future sort ordering of the result of the request to \a sorting.  This function only has
    74     effect on the result if called prior to calling \c start() */
    78     effect on the result if called prior to calling \c start() */
    75 void QContactLocalIdFetchRequest::setSorting(const QList<QContactSortOrder>& sorting)
    79 void QContactLocalIdFetchRequest::setSorting(const QList<QContactSortOrder>& sorting)
    76 {
    80 {
    77     Q_D(QContactLocalIdFetchRequest);
    81     Q_D(QContactLocalIdFetchRequest);
       
    82     QMutexLocker ml(&d->m_mutex);
    78     d->m_sorting = sorting;
    83     d->m_sorting = sorting;
    79 }
    84 }
    80 
    85 
    81 /*! Returns the filter which will be used to select the contacts whose ids will be returned */
    86 /*! Returns the filter which will be used to select the contacts whose ids will be returned */
    82 QContactFilter QContactLocalIdFetchRequest::filter() const
    87 QContactFilter QContactLocalIdFetchRequest::filter() const
    83 {
    88 {
    84     Q_D(const QContactLocalIdFetchRequest);
    89     Q_D(const QContactLocalIdFetchRequest);
       
    90     QMutexLocker ml(&d->m_mutex);
    85     return d->m_filter;
    91     return d->m_filter;
    86 }
    92 }
    87 
    93 
    88 /*! Returns the sort ordering which will be used to sort the result */
    94 /*! Returns the sort ordering which will be used to sort the result */
    89 QList<QContactSortOrder> QContactLocalIdFetchRequest::sorting() const
    95 QList<QContactSortOrder> QContactLocalIdFetchRequest::sorting() const
    90 {
    96 {
    91     Q_D(const QContactLocalIdFetchRequest);
    97     Q_D(const QContactLocalIdFetchRequest);
       
    98     QMutexLocker ml(&d->m_mutex);
    92     return d->m_sorting;
    99     return d->m_sorting;
    93 }
   100 }
    94 
   101 
    95 /*! Returns the list of ids of contacts which matched the request */
   102 /*! Returns the list of ids of contacts which matched the request */
    96 QList<QContactLocalId> QContactLocalIdFetchRequest::ids() const
   103 QList<QContactLocalId> QContactLocalIdFetchRequest::ids() const
    97 {
   104 {
    98     Q_D(const QContactLocalIdFetchRequest);
   105     Q_D(const QContactLocalIdFetchRequest);
       
   106     QMutexLocker ml(&d->m_mutex);
    99     return d->m_ids;
   107     return d->m_ids;
   100 }
   108 }
   101 
   109 
   102 #include "moc_qcontactlocalidfetchrequest.cpp"
   110 #include "moc_qcontactlocalidfetchrequest.cpp"
   103 
   111