aboutsummaryrefslogtreecommitdiff
path: root/examples/GuiClient/mainDialog.cpp
diff options
context:
space:
mode:
authorManjeet Dahiya <manjeetdahiya@gmail.com>2010-09-28 16:03:43 +0000
committerManjeet Dahiya <manjeetdahiya@gmail.com>2010-09-28 16:03:43 +0000
commit97c57b6463e094e934b5fe460201dcf1b169f1be (patch)
treec69a3952627693d546d88adcd517c17ec56600f7 /examples/GuiClient/mainDialog.cpp
parentbf24668d95a652af3c0e375b105e1667b2e25ae3 (diff)
downloadqxmpp-97c57b6463e094e934b5fe460201dcf1b169f1be.tar.gz
add remove contact functionality
Diffstat (limited to 'examples/GuiClient/mainDialog.cpp')
-rw-r--r--examples/GuiClient/mainDialog.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/examples/GuiClient/mainDialog.cpp b/examples/GuiClient/mainDialog.cpp
index 75b74424..d6c8e24b 100644
--- a/examples/GuiClient/mainDialog.cpp
+++ b/examples/GuiClient/mainDialog.cpp
@@ -738,3 +738,16 @@ void mainDialog::presenceReceived(const QXmppPresence& presence)
QMessageBox::information(this, "Contact Subscription", message.arg(from),
QMessageBox::Ok);
}
+
+void mainDialog::action_removeContact(const QString& bareJid)
+{
+ // TODO: check valid bareJid
+
+ QXmppRosterIq remove;
+ remove.setType(QXmppIq::Set);
+ QXmppRosterIq::Item itemRemove;
+ itemRemove.setSubscriptionType(QXmppRosterIq::Item::Remove);
+ itemRemove.setBareJid(bareJid);
+ remove.addItem(itemRemove);
+ m_xmppClient.sendPacket(remove);
+}