code: def register_presence_callback(self, type_, from_, cb):
          
          type_ = self._coerce_enum(type_, structs.PresenceType)
          warnings.warn(
              "register_presence_callback is deprecated; use "
              "aioxmpp.dispatcher.SimplePresenceDispatcher or "
              "aioxmpp.PresenceClient instead",
              DeprecationWarning,
              stacklevel=2
          )
          self._xxx_presence_dispatcher.register_callback(
              type_,
              from_,
              cb,
          )
docs: Register a callback to be called when a presence stanza is received.
  
          :param type_: Presence type to listen for.
          :type type_: :class:`~.PresenceType`
          :param from_: Sender JID to listen for, or :data:`None` for a wildcard
                        match.
          :type from_: :class:`~aioxmpp.JID` or :data:`None`.
          :param cb: Callback function
          :raises ValueError: if another listener with the same ``(type_,
                              from_)`` pair is already registered
          :raises ValueError: if `type_` is not a valid
                              :class:`~.PresenceType` (and cannot be cast
                              to a :class:`~.PresenceType`)
  
          `cb` will be called whenever a presence stanza matching the `type_` is
          received from the specified sender. `from_` may be :data:`None` to
          indicate a wildcard. Like with :meth:`register_message_callback`, more
          specific callbacks win over less specific callbacks. The fallback order
          is identical, except that the ``type_=None`` entries described there do
          not apply for presence stanzas and are thus omitted.
  
          See :meth:`.SimpleStanzaDispatcher.register_callback` for the exact
          wildcarding rules.
  
          .. versionchanged:: 0.7
  
             The `type_` argument is now supposed to be a
             :class:`~.PresenceType` member.
  
          .. deprecated:: 0.7
  
             Passing a :class:`str` as `type_` argument is deprecated and will
             raise a :class:`TypeError` as of the 1.0 release. See the Changelog
             for :ref:`api-changelog-0.7` for further details on how to upgrade
             your code efficiently.
  
          .. deprecated:: 0.9
  
             This method has been deprecated. It is recommended to use
             :class:`aioxmpp.PresenceClient` instead.