pyxmpp.jabber.delay

Package pyxmpp :: Package jabber :: Module delay |
[show private | hide private]
[frames | no frames]

## Module pyxmpp.jabber.delay

Delayed delivery mark (jabber:x:delay) handling.

Normative reference:
  - JEP 91

Classes
`Delay` | Delayed delivery tag.

Function Summary
`Delay` | ``get_delay`(stanza)` Get the oldest jabber:x:delay elements from the stanza.
`list` of `Delay` | ``get_delays`(stanza)` Get jabber:x:delay elements from the stanza.

Variable Summary
`str` | `__revision__` = `'$Id: delay.py 616 2005-12-26 15:28:56Z j...`
`str` | `DELAY_NS` = `'jabber:x:delay'`

Imported modules:
  `datetime`, `libxml2`, `time`
Imported classes:
  `JID`, `StanzaPayloadObject`
Imported functions:
  `datetime_local_to_utc`, `datetime_utc_to_local`, `from_utf8`, `get_node_ns_uri`, `to_utf8`

Function Details

### get_delay(stanza) Get the oldest jabber:x:delay elements from the stanza. The return value, if not `None`, contains a quite reliable timestamp of a delayed (e.g. from offline storage) message. Parameters: `stanza` - a, probably delayed, stanza. (type=`pyxmpp.stanza.Stanza`) Returns: the oldest delay tag of the stanza or `None`. (type=`Delay`)

### get_delays(stanza) Get jabber:x:delay elements from the stanza. Parameters: `stanza` - a, probably delayed, stanza. (type=`pyxmpp.stanza.Stanza`) Returns: list of delay tags sorted by the timestamp. (type=`list` of `Delay`)

Variable Details

    ### __revision__ Type: `str` Value:
        '$Id: delay.py 616 2005-12-26 15:28:56Z jajcus $'

    ### DELAY_NS Type: `str` Value:
        'jabber:x:delay'