[thorstenp] string to comment
This commit is contained in:
parent
010be12d8c
commit
86271b6e3c
|
@ -256,12 +256,11 @@ def get_resource_from_jid(jid):
|
||||||
return jids[1] # abc@doremi.org/res/res-continued
|
return jids[1] # abc@doremi.org/res/res-continued
|
||||||
else:
|
else:
|
||||||
return ''
|
return ''
|
||||||
'''\
|
|
||||||
[15:34:28] <asterix> we should add contact.fake_jid I think
|
# [15:34:28] <asterix> we should add contact.fake_jid I think
|
||||||
[15:34:46] <asterix> so if we know real jid, it wil be in contact.jid, or we look in contact.fake_jid
|
# [15:34:46] <asterix> so if we know real jid, it wil be in contact.jid, or we look in contact.fake_jid
|
||||||
[15:32:54] <asterix> they can have resource if we know the real jid
|
# [15:32:54] <asterix> they can have resource if we know the real jid
|
||||||
[15:33:07] <asterix> and that resource is in contact.resource
|
# [15:33:07] <asterix> and that resource is in contact.resource
|
||||||
'''
|
|
||||||
|
|
||||||
def get_number_of_accounts():
|
def get_number_of_accounts():
|
||||||
'''returns the number of ALL accounts'''
|
'''returns the number of ALL accounts'''
|
||||||
|
|
|
@ -12,10 +12,7 @@
|
||||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
## GNU Lesser General Public License for more details.
|
## GNU Lesser General Public License for more details.
|
||||||
|
|
||||||
_version_ = '1.4.0'
|
"""
|
||||||
|
|
||||||
"""\
|
|
||||||
|
|
||||||
Generic debug class
|
Generic debug class
|
||||||
|
|
||||||
Other modules can always define extra debug flags for local usage, as long as
|
Other modules can always define extra debug flags for local usage, as long as
|
||||||
|
@ -34,9 +31,9 @@ by the individual classes.
|
||||||
|
|
||||||
For samples of usage, see samples subdir in distro source, and selftest
|
For samples of usage, see samples subdir in distro source, and selftest
|
||||||
in this code
|
in this code
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
_version_ = '1.4.0'
|
||||||
|
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
@ -70,36 +67,34 @@ color_bright_cyan = chr(27) + "[36;1m"
|
||||||
color_white = chr(27) + "[37;1m"
|
color_white = chr(27) + "[37;1m"
|
||||||
|
|
||||||
|
|
||||||
"""
|
# Define your flags in yor modules like this:
|
||||||
Define your flags in yor modules like this:
|
#
|
||||||
|
# from debug import *
|
||||||
from debug import *
|
#
|
||||||
|
# DBG_INIT = 'init' ; debug_flags.append( DBG_INIT )
|
||||||
DBG_INIT = 'init' ; debug_flags.append( DBG_INIT )
|
# DBG_CONNECTION = 'connection' ; debug_flags.append( DBG_CONNECTION )
|
||||||
DBG_CONNECTION = 'connection' ; debug_flags.append( DBG_CONNECTION )
|
#
|
||||||
|
# The reason for having a double statement wis so we can validate params
|
||||||
The reason for having a double statement wis so we can validate params
|
# and catch all undefined debug flags
|
||||||
and catch all undefined debug flags
|
#
|
||||||
|
# This gives us control over all used flags, and makes it easier to allow
|
||||||
This gives us control over all used flags, and makes it easier to allow
|
# global debugging in your code, just do something like
|
||||||
global debugging in your code, just do something like
|
#
|
||||||
|
# foo = Debug( debug_flags )
|
||||||
foo = Debug( debug_flags )
|
#
|
||||||
|
# group flags, that is a flag in it self containing multiple flags should be
|
||||||
group flags, that is a flag in it self containing multiple flags should be
|
# defined without the debug_flags.append() sequence, since the parts are already
|
||||||
defined without the debug_flags.append() sequence, since the parts are already
|
# in the list, also they must of course be defined after the flags they depend on ;)
|
||||||
in the list, also they must of course be defined after the flags they depend on ;)
|
# example:
|
||||||
example:
|
#
|
||||||
|
# DBG_MULTI = [ DBG_INIT, DBG_CONNECTION ]
|
||||||
DBG_MULTI = [ DBG_INIT, DBG_CONNECTION ]
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# NoDebug
|
||||||
NoDebug
|
# -------
|
||||||
-------
|
# To speed code up, typically for product releases or such
|
||||||
To speed code up, typically for product releases or such
|
# use this class instead if you globaly want to disable debugging
|
||||||
use this class instead if you globaly want to disable debugging
|
|
||||||
"""
|
|
||||||
|
|
||||||
|
|
||||||
class NoDebug:
|
class NoDebug:
|
||||||
|
|
|
@ -49,10 +49,10 @@ def _discover(disp,ns,jid,node=None,fb2b=0,fb2a=1):
|
||||||
|
|
||||||
def discoverItems(disp,jid,node=None):
|
def discoverItems(disp,jid,node=None):
|
||||||
""" Query remote object about any items that it contains. Return items list. """
|
""" Query remote object about any items that it contains. Return items list. """
|
||||||
""" According to JEP-0030:
|
# According to JEP-0030:
|
||||||
query MAY have node attribute
|
# query MAY have node attribute
|
||||||
item: MUST HAVE jid attribute and MAY HAVE name, node, action attributes.
|
# item: MUST HAVE jid attribute and MAY HAVE name, node, action attributes.
|
||||||
action attribute of item can be either of remove or update value."""
|
# action attribute of item can be either of remove or update value.
|
||||||
ret=[]
|
ret=[]
|
||||||
for i in _discover(disp,NS_DISCO_ITEMS,jid,node):
|
for i in _discover(disp,NS_DISCO_ITEMS,jid,node):
|
||||||
if i.getName()=='agent' and i.getTag('name'): i.setAttr('name',i.getTagData('name'))
|
if i.getName()=='agent' and i.getTag('name'): i.setAttr('name',i.getTagData('name'))
|
||||||
|
@ -61,10 +61,10 @@ def discoverItems(disp,jid,node=None):
|
||||||
|
|
||||||
def discoverInfo(disp,jid,node=None):
|
def discoverInfo(disp,jid,node=None):
|
||||||
""" Query remote object about info that it publishes. Returns identities and features lists."""
|
""" Query remote object about info that it publishes. Returns identities and features lists."""
|
||||||
""" According to JEP-0030:
|
# According to JEP-0030:
|
||||||
query MAY have node attribute
|
# query MAY have node attribute
|
||||||
identity: MUST HAVE category and name attributes and MAY HAVE type attribute.
|
# identity: MUST HAVE category and name attributes and MAY HAVE type attribute.
|
||||||
feature: MUST HAVE var attribute"""
|
# feature: MUST HAVE var attribute"""
|
||||||
identities , features = [] , []
|
identities , features = [] , []
|
||||||
for i in _discover(disp,NS_DISCO_INFO,jid,node):
|
for i in _discover(disp,NS_DISCO_INFO,jid,node):
|
||||||
if i.getName()=='identity': identities.append(i.attrs)
|
if i.getName()=='identity': identities.append(i.attrs)
|
||||||
|
|
|
@ -58,10 +58,10 @@ def _discover(disp, ns, jid, node = None, fb2b=0, fb2a=1, cb=None):
|
||||||
# this function is not used in gajim ???
|
# this function is not used in gajim ???
|
||||||
def discoverItems(disp,jid,node=None, cb=None):
|
def discoverItems(disp,jid,node=None, cb=None):
|
||||||
""" Query remote object about any items that it contains. Return items list. """
|
""" Query remote object about any items that it contains. Return items list. """
|
||||||
""" According to JEP-0030:
|
# According to JEP-0030:
|
||||||
query MAY have node attribute
|
# query MAY have node attribute
|
||||||
item: MUST HAVE jid attribute and MAY HAVE name, node, action attributes.
|
# item: MUST HAVE jid attribute and MAY HAVE name, node, action attributes.
|
||||||
action attribute of item can be either of remove or update value."""
|
# action attribute of item can be either of remove or update value.
|
||||||
def _on_response(result_array):
|
def _on_response(result_array):
|
||||||
ret=[]
|
ret=[]
|
||||||
for result in result_array:
|
for result in result_array:
|
||||||
|
@ -75,10 +75,10 @@ def discoverItems(disp,jid,node=None, cb=None):
|
||||||
# this one is
|
# this one is
|
||||||
def discoverInfo(disp,jid,node=None, cb=None):
|
def discoverInfo(disp,jid,node=None, cb=None):
|
||||||
""" Query remote object about info that it publishes. Returns identities and features lists."""
|
""" Query remote object about info that it publishes. Returns identities and features lists."""
|
||||||
""" According to JEP-0030:
|
# According to JEP-0030:
|
||||||
query MAY have node attribute
|
# query MAY have node attribute
|
||||||
identity: MUST HAVE category and name attributes and MAY HAVE type attribute.
|
# identity: MUST HAVE category and name attributes and MAY HAVE type attribute.
|
||||||
feature: MUST HAVE var attribute"""
|
# feature: MUST HAVE var attribute
|
||||||
def _on_response(result):
|
def _on_response(result):
|
||||||
identities , features = [] , []
|
identities , features = [] , []
|
||||||
for i in result:
|
for i in result:
|
||||||
|
@ -252,4 +252,4 @@ def delPrivacyList(disp,listname,cb=None):
|
||||||
iq = Iq('set',NS_PRIVACY,payload=[Node('list',{'name':listname})])
|
iq = Iq('set',NS_PRIVACY,payload=[Node('list',{'name':listname})])
|
||||||
_on_default_response(disp, iq, cb)
|
_on_default_response(disp, iq, cb)
|
||||||
|
|
||||||
# vim: se ts=3:
|
# vim: se ts=3:
|
||||||
|
|
|
@ -58,16 +58,14 @@ class IBB(PlugIn):
|
||||||
|
|
||||||
def StreamOpenHandler(self,conn,stanza):
|
def StreamOpenHandler(self,conn,stanza):
|
||||||
""" Handles opening of new incoming stream. Used internally. """
|
""" Handles opening of new incoming stream. Used internally. """
|
||||||
"""
|
# <iq type='set'
|
||||||
<iq type='set'
|
# from='romeo@montague.net/orchard'
|
||||||
from='romeo@montague.net/orchard'
|
# to='juliet@capulet.com/balcony'
|
||||||
to='juliet@capulet.com/balcony'
|
# id='inband_1'>
|
||||||
id='inband_1'>
|
# <open sid='mySID'
|
||||||
<open sid='mySID'
|
# block-size='4096'
|
||||||
block-size='4096'
|
# xmlns='http://jabber.org/protocol/ibb'/>
|
||||||
xmlns='http://jabber.org/protocol/ibb'/>
|
# </iq>
|
||||||
</iq>
|
|
||||||
"""
|
|
||||||
err=None
|
err=None
|
||||||
sid,blocksize=stanza.getTagAttr('open','sid'),stanza.getTagAttr('open','block-size')
|
sid,blocksize=stanza.getTagAttr('open','sid'),stanza.getTagAttr('open','block-size')
|
||||||
self.DEBUG('StreamOpenHandler called sid->%s blocksize->%s'%(sid,blocksize),'info')
|
self.DEBUG('StreamOpenHandler called sid->%s blocksize->%s'%(sid,blocksize),'info')
|
||||||
|
@ -110,29 +108,27 @@ class IBB(PlugIn):
|
||||||
if stream['seq']==65536: stream['seq']=0
|
if stream['seq']==65536: stream['seq']=0
|
||||||
conn.send(Protocol('message',stream['direction'][1:],payload=[datanode,self._ampnode]))
|
conn.send(Protocol('message',stream['direction'][1:],payload=[datanode,self._ampnode]))
|
||||||
else:
|
else:
|
||||||
""" notify the other side about stream closing
|
# notify the other side about stream closing
|
||||||
notify the local user about sucessfull send
|
# notify the local user about sucessfull send
|
||||||
delete the local stream"""
|
# delete the local stream
|
||||||
conn.send(Protocol('iq',stream['direction'][1:],'set',payload=[Node(NS_IBB+' close',{'sid':sid})]))
|
conn.send(Protocol('iq',stream['direction'][1:],'set',payload=[Node(NS_IBB+' close',{'sid':sid})]))
|
||||||
conn.Event(self.DBG_LINE,'SUCCESSFULL SEND',stream)
|
conn.Event(self.DBG_LINE,'SUCCESSFULL SEND',stream)
|
||||||
del self._streams[sid]
|
del self._streams[sid]
|
||||||
self._owner.UnregisterCycleHandler(self.SendHandler)
|
self._owner.UnregisterCycleHandler(self.SendHandler)
|
||||||
|
|
||||||
"""
|
# <message from='romeo@montague.net/orchard' to='juliet@capulet.com/balcony' id='msg1'>
|
||||||
<message from='romeo@montague.net/orchard' to='juliet@capulet.com/balcony' id='msg1'>
|
# <data xmlns='http://jabber.org/protocol/ibb' sid='mySID' seq='0'>
|
||||||
<data xmlns='http://jabber.org/protocol/ibb' sid='mySID' seq='0'>
|
# qANQR1DBwU4DX7jmYZnncmUQB/9KuKBddzQH+tZ1ZywKK0yHKnq57kWq+RFtQdCJ
|
||||||
qANQR1DBwU4DX7jmYZnncmUQB/9KuKBddzQH+tZ1ZywKK0yHKnq57kWq+RFtQdCJ
|
# WpdWpR0uQsuJe7+vh3NWn59/gTc5MDlX8dS9p0ovStmNcyLhxVgmqS8ZKhsblVeu
|
||||||
WpdWpR0uQsuJe7+vh3NWn59/gTc5MDlX8dS9p0ovStmNcyLhxVgmqS8ZKhsblVeu
|
# IpQ0JgavABqibJolc3BKrVtVV1igKiX/N7Pi8RtY1K18toaMDhdEfhBRzO/XB0+P
|
||||||
IpQ0JgavABqibJolc3BKrVtVV1igKiX/N7Pi8RtY1K18toaMDhdEfhBRzO/XB0+P
|
# AQhYlRjNacGcslkhXqNjK5Va4tuOAPy2n1Q8UUrHbUd0g+xJ9Bm0G0LZXyvCWyKH
|
||||||
AQhYlRjNacGcslkhXqNjK5Va4tuOAPy2n1Q8UUrHbUd0g+xJ9Bm0G0LZXyvCWyKH
|
# kuNEHFQiLuCY6Iv0myq6iX6tjuHehZlFSh80b5BVV9tNLwNR5Eqz1klxMhoghJOA
|
||||||
kuNEHFQiLuCY6Iv0myq6iX6tjuHehZlFSh80b5BVV9tNLwNR5Eqz1klxMhoghJOA
|
# </data>
|
||||||
</data>
|
# <amp xmlns='http://jabber.org/protocol/amp'>
|
||||||
<amp xmlns='http://jabber.org/protocol/amp'>
|
# <rule condition='deliver-at' value='stored' action='error'/>
|
||||||
<rule condition='deliver-at' value='stored' action='error'/>
|
# <rule condition='match-resource' value='exact' action='error'/>
|
||||||
<rule condition='match-resource' value='exact' action='error'/>
|
# </amp>
|
||||||
</amp>
|
# </message>
|
||||||
</message>
|
|
||||||
"""
|
|
||||||
|
|
||||||
def ReceiveHandler(self,conn,stanza):
|
def ReceiveHandler(self,conn,stanza):
|
||||||
""" Receive next portion of incoming datastream and store it write
|
""" Receive next portion of incoming datastream and store it write
|
||||||
|
@ -198,4 +194,4 @@ class IBB(PlugIn):
|
||||||
conn.Event(self.DBG_LINE,'STREAM COMMITTED',stream)
|
conn.Event(self.DBG_LINE,'STREAM COMMITTED',stream)
|
||||||
else: conn.send(Error(stanza,ERR_UNEXPECTED_REQUEST))
|
else: conn.send(Error(stanza,ERR_UNEXPECTED_REQUEST))
|
||||||
|
|
||||||
# vim: se ts=3:
|
# vim: se ts=3:
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
## GNU General Public License for more details.
|
## GNU General Public License for more details.
|
||||||
|
|
||||||
__version__="$Id"
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
When your handler is called it is getting the session instance as the first argument.
|
When your handler is called it is getting the session instance as the first argument.
|
||||||
|
@ -23,6 +22,8 @@ one client for each connection. Is is specifically important when you are
|
||||||
writing the server.
|
writing the server.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
__version__="$Id"
|
||||||
|
|
||||||
from protocol import *
|
from protocol import *
|
||||||
|
|
||||||
# Transport-level flags
|
# Transport-level flags
|
||||||
|
|
|
@ -266,7 +266,7 @@ class TLS(PlugIn):
|
||||||
|
|
||||||
def _startSSL(self):
|
def _startSSL(self):
|
||||||
""" Immidiatedly switch socket to TLS mode. Used internally."""
|
""" Immidiatedly switch socket to TLS mode. Used internally."""
|
||||||
""" Here we should switch pending_data to hint mode."""
|
# Here we should switch pending_data to hint mode.
|
||||||
tcpsock=self._owner.Connection
|
tcpsock=self._owner.Connection
|
||||||
tcpsock._sslObj = socket.ssl(tcpsock._sock, None, None)
|
tcpsock._sslObj = socket.ssl(tcpsock._sock, None, None)
|
||||||
tcpsock._sslIssuer = tcpsock._sslObj.issuer()
|
tcpsock._sslIssuer = tcpsock._sslObj.issuer()
|
||||||
|
|
|
@ -87,7 +87,7 @@ class ZeroconfListener(IdleObject):
|
||||||
def pollin(self):
|
def pollin(self):
|
||||||
''' accept a new incomming connection and notify queue'''
|
''' accept a new incomming connection and notify queue'''
|
||||||
sock = self.accept_conn()
|
sock = self.accept_conn()
|
||||||
''' loop through roster to find who has connected to us'''
|
# loop through roster to find who has connected to us
|
||||||
from_jid = None
|
from_jid = None
|
||||||
ipaddr = sock[1][0]
|
ipaddr = sock[1][0]
|
||||||
for jid in self.conn_holder.getRoster().keys():
|
for jid in self.conn_holder.getRoster().keys():
|
||||||
|
|
|
@ -91,77 +91,76 @@ element_styles['tt'] = element_styles['kbd']
|
||||||
element_styles['i'] = element_styles['em']
|
element_styles['i'] = element_styles['em']
|
||||||
element_styles['b'] = element_styles['strong']
|
element_styles['b'] = element_styles['strong']
|
||||||
|
|
||||||
'''
|
# ==========
|
||||||
==========
|
# JEP-0071
|
||||||
JEP-0071
|
# ==========
|
||||||
==========
|
|
||||||
|
|
||||||
This Integration Set includes a subset of the modules defined for
|
|
||||||
XHTML 1.0 but does not redefine any existing modules, nor
|
|
||||||
does it define any new modules. Specifically, it includes the
|
|
||||||
following modules only:
|
|
||||||
|
|
||||||
- Structure
|
|
||||||
- Text
|
|
||||||
|
|
||||||
* Block
|
|
||||||
|
|
||||||
phrasal
|
|
||||||
addr, blockquote, pre
|
|
||||||
Struc
|
|
||||||
div,p
|
|
||||||
Heading
|
|
||||||
h1, h2, h3, h4, h5, h6
|
|
||||||
|
|
||||||
* Inline
|
|
||||||
|
|
||||||
phrasal
|
|
||||||
abbr, acronym, cite, code, dfn, em, kbd, q, samp, strong, var
|
|
||||||
structural
|
|
||||||
br, span
|
|
||||||
|
|
||||||
- Hypertext (a)
|
|
||||||
- List (ul, ol, dl)
|
|
||||||
- Image (img)
|
|
||||||
- Style Attribute
|
|
||||||
|
|
||||||
Therefore XHTML-IM uses the following content models:
|
|
||||||
|
|
||||||
Block.mix
|
|
||||||
Block-like elements, e.g., paragraphs
|
|
||||||
Flow.mix
|
|
||||||
Any block or inline elements
|
|
||||||
Inline.mix
|
|
||||||
Character-level elements
|
|
||||||
InlineNoAnchor.class
|
|
||||||
Anchor element
|
|
||||||
InlinePre.mix
|
|
||||||
Pre element
|
|
||||||
|
|
||||||
XHTML-IM also uses the following Attribute Groups:
|
|
||||||
|
|
||||||
Core.extra.attrib
|
|
||||||
TBD
|
|
||||||
I18n.extra.attrib
|
|
||||||
TBD
|
|
||||||
Common.extra
|
|
||||||
style
|
|
||||||
|
|
||||||
|
|
||||||
...
|
|
||||||
#block level:
|
|
||||||
#Heading h
|
|
||||||
# ( pres = h1 | h2 | h3 | h4 | h5 | h6 )
|
|
||||||
#Block ( phrasal = address | blockquote | pre )
|
|
||||||
#NOT ( presentational = hr )
|
|
||||||
# ( structural = div | p )
|
|
||||||
#other: section
|
|
||||||
#Inline ( phrasal = abbr | acronym | cite | code | dfn | em | kbd | q | samp | strong | var )
|
|
||||||
#NOT ( presentational = b | big | i | small | sub | sup | tt )
|
|
||||||
# ( structural = br | span )
|
|
||||||
#Param/Legacy param, font, basefont, center, s, strike, u, dir, menu, isindex
|
|
||||||
#
|
#
|
||||||
'''
|
# This Integration Set includes a subset of the modules defined for
|
||||||
|
# XHTML 1.0 but does not redefine any existing modules, nor
|
||||||
|
# does it define any new modules. Specifically, it includes the
|
||||||
|
# following modules only:
|
||||||
|
#
|
||||||
|
# - Structure
|
||||||
|
# - Text
|
||||||
|
#
|
||||||
|
# * Block
|
||||||
|
#
|
||||||
|
# phrasal
|
||||||
|
# addr, blockquote, pre
|
||||||
|
# Struc
|
||||||
|
# div,p
|
||||||
|
# Heading
|
||||||
|
# h1, h2, h3, h4, h5, h6
|
||||||
|
#
|
||||||
|
# * Inline
|
||||||
|
#
|
||||||
|
# phrasal
|
||||||
|
# abbr, acronym, cite, code, dfn, em, kbd, q, samp, strong, var
|
||||||
|
# structural
|
||||||
|
# br, span
|
||||||
|
#
|
||||||
|
# - Hypertext (a)
|
||||||
|
# - List (ul, ol, dl)
|
||||||
|
# - Image (img)
|
||||||
|
# - Style Attribute
|
||||||
|
#
|
||||||
|
# Therefore XHTML-IM uses the following content models:
|
||||||
|
#
|
||||||
|
# Block.mix
|
||||||
|
# Block-like elements, e.g., paragraphs
|
||||||
|
# Flow.mix
|
||||||
|
# Any block or inline elements
|
||||||
|
# Inline.mix
|
||||||
|
# Character-level elements
|
||||||
|
# InlineNoAnchor.class
|
||||||
|
# Anchor element
|
||||||
|
# InlinePre.mix
|
||||||
|
# Pre element
|
||||||
|
#
|
||||||
|
# XHTML-IM also uses the following Attribute Groups:
|
||||||
|
#
|
||||||
|
# Core.extra.attrib
|
||||||
|
# TBD
|
||||||
|
# I18n.extra.attrib
|
||||||
|
# TBD
|
||||||
|
# Common.extra
|
||||||
|
# style
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# ...
|
||||||
|
# block level:
|
||||||
|
# Heading h
|
||||||
|
# ( pres = h1 | h2 | h3 | h4 | h5 | h6 )
|
||||||
|
# Block ( phrasal = address | blockquote | pre )
|
||||||
|
# NOT ( presentational = hr )
|
||||||
|
# ( structural = div | p )
|
||||||
|
# other: section
|
||||||
|
# Inline ( phrasal = abbr | acronym | cite | code | dfn | em |
|
||||||
|
# kbd | q | samp | strong | var )
|
||||||
|
# NOT ( presentational = b | big | i | small | sub | sup | tt )
|
||||||
|
# ( structural = br | span )
|
||||||
|
# Param/Legacy param, font, basefont, center, s, strike, u, dir, menu,
|
||||||
|
# isindex
|
||||||
|
|
||||||
BLOCK_HEAD = set(( 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', ))
|
BLOCK_HEAD = set(( 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', ))
|
||||||
BLOCK_PHRASAL = set(( 'address', 'blockquote', 'pre', ))
|
BLOCK_PHRASAL = set(( 'address', 'blockquote', 'pre', ))
|
||||||
|
|
|
@ -443,7 +443,9 @@ class DesktopNotification:
|
||||||
self.event_type = event_type
|
self.event_type = event_type
|
||||||
self.title = title
|
self.title = title
|
||||||
self.text = text
|
self.text = text
|
||||||
'''0.3.1 is the only version of notification daemon that has no way to determine which version it is. If no method exists, it means they're using that one.'''
|
# 0.3.1 is the only version of notification daemon that has no way
|
||||||
|
# to determine which version it is. If no method exists, it means
|
||||||
|
# they're using that one.
|
||||||
self.default_version = [0, 3, 1]
|
self.default_version = [0, 3, 1]
|
||||||
self.account = account
|
self.account = account
|
||||||
self.jid = jid
|
self.jid = jid
|
||||||
|
|
Loading…
Reference in New Issue