mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-02 14:55:58 +01:00
bfefbdb777
This patch provides three components required to implement XEP-0184: * DeliveryReceiptRequest is a PacketExtension to request a receipt * DeliveryReceipt is a PacketExtension that contains the receipt * DeliveryReceiptManager to handle sending/receiving of requests and receipts. Implementation: For requesting a receipt, just add a new DeliveryReceiptRequest() to your message or use the helper function: DeliveryReceiptManager.addDeliveryReceiptRequest(packet); Register a ReceiptReceivedListener to find out if your packet arrived: DeliveryReceiptManager.getInstanceFor(myConnection) .registerReceiptReceivedListener(new ReceiptReceivedListener() { @Override public void onReceiptReceived(String fromJid, String toJid, String receiptId) { // receipt received for packet id receiptId } To answer a receipt request, you can either check incoming packets manually: if (DeliveryReceiptManager.hasDeliveryReceiptRequest(packet)) { // send receipt } Or you can enable automatic receipt transmission with: DeliveryReceiptManager.getInstanceFor(myConnection) .setAutoReceiptsEnabled(true); Signed-Off-By: Georg Lukas <georg@op-co.de> git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@13431 b35dd754-fafc-0310-a699-88a17e54d16e |
||
---|---|---|
.. | ||
bookmark | ||
bytestreams | ||
carbons | ||
commands | ||
debugger | ||
filetransfer | ||
forward | ||
muc | ||
packet | ||
ping | ||
provider | ||
pubsub | ||
receipts | ||
search | ||
workgroup | ||
ChatState.java | ||
ChatStateListener.java | ||
ChatStateManager.java | ||
DefaultMessageEventRequestListener.java | ||
Form.java | ||
FormField.java | ||
GroupChatInvitation.java | ||
LastActivityManager.java | ||
MessageEventManager.java | ||
MessageEventNotificationListener.java | ||
MessageEventRequestListener.java | ||
MultipleRecipientInfo.java | ||
MultipleRecipientManager.java | ||
NodeInformationProvider.java | ||
OfflineMessageHeader.java | ||
OfflineMessageManager.java | ||
package.html | ||
PEPListener.java | ||
PEPManager.java | ||
PrivateDataManager.java | ||
RemoteRosterEntry.java | ||
ReportedData.java | ||
RosterExchangeListener.java | ||
RosterExchangeManager.java | ||
ServiceDiscoveryManager.java | ||
SharedGroupManager.java | ||
XHTMLManager.java | ||
XHTMLText.java |