Logo Search packages:      
Sourcecode: kmess version File versions  Download package

void MsnNotificationConnection::blockContact ( QString  handle  )  [slot]

Block the given contact.

When the contact also exists in the friends list, it will remain there with a blocked status icon. When the contact only exists in the "allowed contacts" group, it moves to the "removed contacts" group with a blocked status icon.

This method can also be used when a new contact appears:

  • to add the contact to the friends list too, call addNewContact()
  • to allow the contact only, call allowContact()
  • to block the contact, call this method.

Internally, this method runs the required putAdc() calls to change the contact lists:

  • the contact is added to the block list (BL).

Parameters:
handle Email address of the contact.

Definition at line 279 of file msnnotificationconnection.cpp.

References AddressBookService::blockContact(), createAddressBookService(), and putAdl().

{
#ifdef KMESSDEBUG_NOTIFICATION_GENERAL
  kDebug() << "Blocking contact " << handle;
#endif

  putRml( handle, Contact::MSN_LIST_ALLOWED );
  putAdl( handle, Contact::MSN_LIST_BLOCKED );

  AddressBookService *addressBook = createAddressBookService();
  addressBook->blockContact( handle );
}


Generated by  Doxygen 1.6.0   Back to index