void YaPrivacyManager::listReceived(const PrivacyList& list) { QStringList previouslyBlockedContacts = blockedContacts(); if (lists_.contains(list.name())) *lists_[list.name()] = list; else lists_[list.name()] = new PrivacyList(list); if (list.name() == BLOCKED_LIST_NAME) invalidateBlockedListCache(); QStringList currentlyBlockedContacts = blockedContacts(); QStringList updatedContacts; updatedContacts += findDifferences(previouslyBlockedContacts, currentlyBlockedContacts); updatedContacts += findDifferences(currentlyBlockedContacts, previouslyBlockedContacts); foreach(QString contact, updatedContacts) { emit simulateContactOffline(contact); if (!isContactBlocked(contact)) { if (isAuthorized(contact)) { JT_Presence* p = new JT_Presence(account_->client()->rootTask()); p->pres(processJid(contact), account_->status()); p->go(true); } { JT_Presence* p = new JT_Presence(account_->client()->rootTask()); p->probe(processJid(contact)); p->go(true); } } }
// this is the main function where the files are received from PHP int main(int argc, char *argv[]) { findDifferences(argv[1], argv[2], argv[3], argv[4], argv[5]); // calling findDifferences and passing the parameters return (EXIT_SUCCESS); }