mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-09-09 18:29:45 +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();
|
||||
```
|
|
@ -69,6 +69,7 @@ Smack Extensions and currently supported XEPs of smack-extensions
|
|||
| Last Message Correction | [XEP-0308](http://xmpp.org/extensions/xep-0308.html) | Provides a method for indicating that a message is a correction of the last sent message. |
|
||||
| [Group Chat Invitations](invitation.md) | n/a | Send invitations to other users to join a group chat room. |
|
||||
| [Jive Properties](properties.md) | n/a | TODO |
|
||||
| [Blocking Command](blockingcommand.md) | [XEP-0191](http://xmpp.org/extensions/xep-0191.html) | Communications blocking that is intended to be simpler than privacy lists (XEP-0016). |
|
||||
|
||||
|
||||
Experimental Smack Extensions and currently supported XEPs of smack-experimental
|
||||
|
@ -85,7 +86,7 @@ Experimental Smack Extensions and currently supported XEPs of smack-experimental
|
|||
| [Internet of Things - Discovery](iot.md) | [XEP-0347](http://xmpp.org/extensions/xep-0347.html) | Describes how Things can be installed and discovered by their owners. |
|
||||
| Google GCM JSON payload | n/a | Semantically the same as XEP-0335: JSON Containers |
|
||||
| Client State Indication | [XEP-0352](http://xmpp.org/extensions/xep-0352.html) | A way for the client to indicate its active/inactive state. |
|
||||
| [Message Archive Management](mam.md) | [XEP-0313](http://xmpp.org/extensions/xep-0313.html) | Query and control an archive of messages stored on a server. |
|
||||
| [Message Archive Management](mam.md) | [XEP-0313](http://xmpp.org/extensions/xep-0313.html) | Query and control an archive of messages stored on a server. |
|
||||
|
||||
|
||||
Legacy Smack Extensions and currently supported XEPs of smack-legacy
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue