mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-09 09:09:38 +02:00
Add XEP-0191 - Blocking Command implementation
SMACK-731
This commit is contained in:
parent
0679c89813
commit
9554c7be26
17 changed files with 1058 additions and 2 deletions
63
documentation/extensions/blockingcommand.md
Normal file
63
documentation/extensions/blockingcommand.md
Normal file
|
@ -0,0 +1,63 @@
|
|||
Blocking Command
|
||||
================
|
||||
|
||||
Allows to manage communications blocking.
|
||||
|
||||
* Check push notifications support
|
||||
* Get blocking list
|
||||
* Block contact
|
||||
* Unblock contact
|
||||
* Unblock all
|
||||
|
||||
|
||||
**XEP related:** [XEP-0191](http://xmpp.org/extensions/xep-0191.html)
|
||||
|
||||
|
||||
Get an instance of Blocking Command Manager
|
||||
-------------------------------------------
|
||||
|
||||
```
|
||||
BlockingCommandManager blockingCommandManager = BlockingCommandManager.getInstanceFor(connection);
|
||||
```
|
||||
|
||||
|
||||
Check blocking command support
|
||||
------------------------------
|
||||
|
||||
```
|
||||
boolean isSupported = blockingCommandManager.isSupportedByServer();
|
||||
```
|
||||
|
||||
|
||||
Get block list
|
||||
--------------
|
||||
|
||||
```
|
||||
List<Jid> blockList = blockingCommandManager.getBlockList();
|
||||
```
|
||||
|
||||
|
||||
Block contact
|
||||
-------------
|
||||
|
||||
```
|
||||
blockingCommandManager.blockContact(jid);
|
||||
```
|
||||
*jid* is a `Jid`
|
||||
|
||||
|
||||
Unblock contact
|
||||
---------------
|
||||
|
||||
```
|
||||
blockingCommandManager.unblockContact(jid);
|
||||
```
|
||||
*jid* is a `Jid`
|
||||
|
||||
|
||||
Unblock all
|
||||
-----------
|
||||
|
||||
```
|
||||
blockingCommandManager.unblockAll();
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue