# OmemoManager class

Inheritance
  - Object
  - XmppManagerBase
  - OmemoManager

## Constructors

OmemoManager (GetOmemoManagerCallback _getOmemoManager, ShouldEncryptStanzaCallback _shouldEncryptStanza)

## Properties

hashCode → int
  The hash code for this object.
  no setterinherited
id → String
  Return the Id (akin to xmlns) of this manager.
  finalinherited
initialized ↔ bool
  Flag indicating that the post registration callback has been called once.
  getter/setter pairinherited
logger → Logger
  Return the logger for this manager.
  no setterinherited
name → String
  The name of the manager.
  no setterinherited
runtimeType → Type
  A representation of the runtime type of the object.
  no setterinherited

## Methods

deleteDevice (int deviceId) → Future <Result<OmemoError, bool>>
  Attempts to delete a device with device id `deviceId` from the device bundles node and then the device list node. This allows a device that was accidentally removed to republish without any race conditions. Note that this does not delete a possibly existent ratchet session.
fetchDeviceBundle (String jid, int id) → Future <OmemoBundle?>
  For usage with omemo_dart's OmemoManager
fetchDeviceList (String jid) → Future <List <int>?>
  For usage with omemo_dart's OmemoManager
getAttributes () → XmppManagerAttributes
  Returns the attributes that are registered with the manager. Must only be called after register has been called on it.
  inherited
getDeviceList (JID jid) → Future <Result<OmemoError, List <int>>>
  Retrieves the OMEMO device list from `jid`.
getDiscoFeatures () → List <String>
  Return a list of features that should be included in a disco response.
  inherited
getDiscoIdentities () → List <Identity>
  Return a list of identities that should be included in a disco response.
  inherited
getIncomingPreStanzaHandlers () → List <StanzaHandler>
  Return the StanzaHandlers associated with this manager that deal with stanza handlers that have to run before the main ones run. This is useful, for example, for OMEMO as we have to decrypt the stanza before we do anything else. The higher the value of the handler's priority, the earlier it is run.
  override
getIncomingStanzaHandlers () → List <StanzaHandler>
  Return the StanzaHandlers associated with this manager that deal with stanzas we receive. The higher the value of the handler's priority, the earlier it is run.
  inherited
getNonzaHandlers () → List <NonzaHandler>
  Return the NonzaHandlers associated with this manager. The higher the value of the handler's priority, the earlier it is run.
  inherited
getOutgoingPostStanzaHandlers () → List <StanzaHandler>
  Return the StanzaHandlers associated with this manager that deal with stanzas we send. These are run after the stanza is sent. The higher the value of the handler's priority, the earlier it is run.
  inherited
getOutgoingPreStanzaHandlers () → List <StanzaHandler>
  Return the StanzaHandlers associated with this manager that deal with stanzas we send. These are run before the stanza is sent. The higher the value of the handler's priority, the earlier it is run.
  override
isFeatureSupported (String xmlns) → Future <bool>
  Resolves to true when the server supports the disco feature `xmlns`. Resolves to false when either the disco request fails or the server does not support `xmlns`. Note that this function requires a registered DiscoManager.
  inherited
isNewStream () → Future <bool>
  Returns true, if the current stream negotiations resulted in a new stream. Useful for plugins to reset their cache in case of a new stream. The value only makes sense after receiving a StreamNegotiationsDoneEvent.
  inherited
isSupported () → Future <bool>
  Returns true if the XEP is supported on the server. If not, returns false
  override
noSuchMethod (Invocation invocation) → dynamic
  Invoked when a nonexistent method or property is accessed.
  inherited
onData () → Future <void>
  Whenever the socket receives data, this method is called, if it is non-null.
  inherited
onXmppEvent (XmppEvent event) → Future <void>
  Called when XmppConnection triggers an event
  override
postRegisterCallback () → Future <void>
  Called after the registration of all managers against the XmppConnection is done. This method is only called once during the entire lifetime of it.
  inherited
publishBundle (OmemoBundle bundle) → Future <Result<OmemoError, bool>>
  Attempts to publish a device bundle to the device list and device bundle PubSub nodes.
publishDeviceImpl (OmemoDevice device) → Future <void>
  Implementation for publishing our device `device`.
register (XmppManagerAttributes attributes) → void
  Registers the callbacks from XmppConnection with the manager
  inherited
reply (StanzaHandlerData data, String type, List <XMLNode> children) → Future <void>
  Sends a reply of the stanza in `data` with `type`. Replaces the original stanza's children with `children`.
  inherited
retrieveDeviceBundle (JID jid, int deviceId) → Future <Result<OmemoError, OmemoBundle>>
  Retrieves a bundle from entity `jid` with the device id `deviceId`.
retrieveDeviceBundles (JID jid) → Future <Result<OmemoError, List <OmemoBundle>>>
  Retrieve all device bundles for the JID `jid`.
runNonzaHandlers (XMLNode nonza) → Future <bool>
  Runs all NonzaHandlers of this Manager which match the nonza. Resolves to true if the nonza has been handled by one of the handlers. Resolves to false otherwise.
  inherited
sendEmptyMessageImpl (EncryptionResult result, String toJid) → Future <void>
  For usage with omemo_dart's OmemoManager.
sendOmemoHeartbeat (String jid) → Future <void>
  Send a heartbeat message to `jid`.
shouldEncryptElement (XMLNode element) → bool
  Determines what child elements of a stanza should be encrypted. If shouldEncrypt returns true for `element`, then `element` will be encrypted. If shouldEncrypt returns false, then `element` won't be encrypted.
subscribeToDeviceListImpl (String jid) → Future <void>
  Subscribes to the device list PubSub node of `jid`.
supportsOmemo (JID jid) → Future <Result<OmemoError, bool>>
  Attempts to find out if `jid` supports omemo:2.
toString () → String
  A string representation of this object.
  inherited

## Operators

operator == (Object other) → bool
  The equality operator.
  inherited