GaduRosterService::GaduRosterService(GaduListHelper *gaduListHelper, const QVector<Contact> &contacts, Protocol *protocol) : RosterService{contacts, protocol}, m_stateMachine{new GaduRosterStateMachine{this, protocol}}, m_gaduListHelper{gaduListHelper} { connect(this, SIGNAL(contactAdded(Contact)), this, SLOT(rosterChanged())); connect(this, SIGNAL(contactRemoved(Contact)), this, SLOT(rosterChanged())); connect(this, SIGNAL(contactUpdatedLocally(Contact)), this, SLOT(rosterChanged())); connect(m_stateMachine, SIGNAL(performGet()), SLOT(importContactList())); connect(m_stateMachine, SIGNAL(performPut()), SLOT(exportContactList())); }
void GaduContactListService::exportContactList() { exportContactList(ContactManager::instance()->contacts(Protocol->account())); }