qtmobility/src/contacts/requests/qcontactrelationshipfetchrequest.cpp
changeset 4 90517678cc4f
parent 1 2b40d63a9c3d
child 5 453da2cfceef
equal deleted inserted replaced
1:2b40d63a9c3d 4:90517678cc4f
    64 QContactRelationshipFetchRequest::QContactRelationshipFetchRequest()
    64 QContactRelationshipFetchRequest::QContactRelationshipFetchRequest()
    65     : QContactAbstractRequest(new QContactRelationshipFetchRequestPrivate)
    65     : QContactAbstractRequest(new QContactRelationshipFetchRequestPrivate)
    66 {
    66 {
    67 }
    67 }
    68 
    68 
    69 /*! Cleans up the memory in use by this relationship fetch request
       
    70  */
       
    71 QContactRelationshipFetchRequest::~QContactRelationshipFetchRequest()
       
    72 {
       
    73 }
       
    74 
       
    75 /*! Sets the source contact criterion of the fetch request to \a firstId.
    69 /*! Sets the source contact criterion of the fetch request to \a firstId.
    76     If \a firstId is the default-constructed id, or the first contact id is not set,
    70     If \a firstId is the default-constructed id, or the first contact id is not set,
    77     the request will fetch relationships involving any first contact.
    71     the request will fetch relationships involving any first contact.
    78 */
    72 */
    79 void QContactRelationshipFetchRequest::setFirst(const QContactId& firstId)
    73 void QContactRelationshipFetchRequest::setFirst(const QContactId& firstId)
   124 {
   118 {
   125     Q_D(const QContactRelationshipFetchRequest);
   119     Q_D(const QContactRelationshipFetchRequest);
   126     return d->m_second;
   120     return d->m_second;
   127 }
   121 }
   128 
   122 
   129 /*!
       
   130   \internal
       
   131   Sets the participant criterion of the fetch request to \a
       
   132   participantUri.  If the \a participantUri references a contact in
       
   133   the manager from which the relationships are being fetched and the
       
   134   \a role is \c QContactRelationshipFilter::Either, a relationship
       
   135   will match the criterion if the contact appears in the relationship
       
   136   as either the source or a destination contact.  If the \a
       
   137   participantUri references a contact in a different manager to the
       
   138   one from which the relationships are being fetched and the \a role
       
   139   is \c QContactRelationshipFilter::Either, a relationship will match
       
   140   the criterion only if the contact appears in the relationship as a
       
   141   destination contact.  If the \a participantUri references a contact
       
   142   in a different manager to the one from which the relationships are
       
   143   being fetched and the \a role is \c
       
   144   QContactRelationshipFilter::Source, no relationships will be
       
   145   fetched.
       
   146   
       
   147   If the \a participantUri consists of an empty manager URI and the
       
   148   zero contact id, or if the participant criterion is not set, the
       
   149   request will fetch relationships involving any participant.
       
   150  */
       
   151 void QContactRelationshipFetchRequest::setParticipant(const QContactId& participantUri, QContactRelationshipFilter::Role role)
       
   152 {
       
   153     Q_D(QContactRelationshipFetchRequest);
       
   154     d->m_participantUri = participantUri;
       
   155     d->m_role = role;
       
   156 }
       
   157 
       
   158 /*!
       
   159   \internal
       
   160   Returns the participant criterion of the fetch request
       
   161  */
       
   162 QContactId QContactRelationshipFetchRequest::participant() const
       
   163 {
       
   164     Q_D(const QContactRelationshipFetchRequest);
       
   165     return d->m_participantUri;
       
   166 }
       
   167 
       
   168 /*!
       
   169   \internal
       
   170   Returns the role of the participant criterion of the fetch request
       
   171  */
       
   172 QContactRelationshipFilter::Role QContactRelationshipFetchRequest::participantRole() const
       
   173 {
       
   174     Q_D(const QContactRelationshipFetchRequest);
       
   175     return d->m_role;
       
   176 }
       
   177 
       
   178 /*! Returns the list of relationships that was the result of the request
   123 /*! Returns the list of relationships that was the result of the request
   179  */
   124  */
   180 QList<QContactRelationship> QContactRelationshipFetchRequest::relationships() const
   125 QList<QContactRelationship> QContactRelationshipFetchRequest::relationships() const
   181 {
   126 {
   182     Q_D(const QContactRelationshipFetchRequest);
   127     Q_D(const QContactRelationshipFetchRequest);