Java Code Examples for org.jivesoftware.smackx.carbons.packet.CarbonExtension#Direction
The following examples show how to use
org.jivesoftware.smackx.carbons.packet.CarbonExtension#Direction .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: OmemoManager.java From Smack with Apache License 2.0 | 6 votes |
/** * CarbonCopyListener that listens for incoming carbon copies which contain OMEMO elements. */ private void internalOmemoCarbonCopyListener(final CarbonExtension.Direction direction, final Message carbonCopy, final Message wrappingMessage) { Async.go(new Runnable() { @Override public void run() { if (isOmemoMessage(carbonCopy)) { try { getOmemoService().onOmemoCarbonCopyReceived(direction, carbonCopy, wrappingMessage, new LoggedInOmemoManager(OmemoManager.this)); } catch (SmackException.NotLoggedInException | IOException e) { LOGGER.log(Level.SEVERE, "Exception while processing OMEMO stanza", e); } } } }); }
Example 2
Source File: OmemoMessageListener.java From Smack with Apache License 2.0 | 4 votes |
void onOmemoCarbonCopyReceived(CarbonExtension.Direction direction, Message carbonCopy, Message wrappingMessage, OmemoMessage.Received decryptedCarbonCopy);
Example 3
Source File: OmemoCarbonCopyStanzaReceivedListener.java From Smack with Apache License 2.0 | 4 votes |
void onOmemoCarbonCopyReceived(CarbonExtension.Direction direction, Message carbonCopy, Message wrappingMessage, OmemoManager.LoggedInOmemoManager omemoManager) throws IOException;
Example 4
Source File: AbstractOmemoMessageListener.java From Smack with Apache License 2.0 | 4 votes |
@Override public void onOmemoCarbonCopyReceived(CarbonExtension.Direction direction, Message carbonCopy, Message wrappingMessage, OmemoMessage.Received decryptedCarbonCopy) { // Override me }
Example 5
Source File: OmemoManager.java From Smack with Apache License 2.0 | 3 votes |
/** * Notify all registered OmemoMessageListeners of an incoming OMEMO encrypted Carbon Copy. * Remember: If you want to receive OMEMO encrypted carbon copies, you have to enable carbons using * {@link CarbonManager#enableCarbons()}. * * @param direction direction of the carbon copy * @param carbonCopy carbon copy itself * @param wrappingMessage wrapping message * @param decryptedCarbonCopy decrypted carbon copy OMEMO element */ void notifyOmemoCarbonCopyReceived(CarbonExtension.Direction direction, Message carbonCopy, Message wrappingMessage, OmemoMessage.Received decryptedCarbonCopy) { for (OmemoMessageListener l : omemoMessageListeners) { l.onOmemoCarbonCopyReceived(direction, carbonCopy, wrappingMessage, decryptedCarbonCopy); } }