Mercurial > libervia-backend
comparison src/plugins/plugin_xep_0300.py @ 2145:33c8c4973743
core (plugins): added missing contants + use of new constants in PLUGIN_INFO
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 12 Feb 2017 18:59:10 +0100 |
parents | 1d3f73e065e1 |
children | a543eda2c923 |
comparison
equal
deleted
inserted
replaced
2144:1d3f73e065e1 | 2145:33c8c4973743 |
---|---|
16 | 16 |
17 # You should have received a copy of the GNU Affero General Public License | 17 # You should have received a copy of the GNU Affero General Public License |
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
19 | 19 |
20 from sat.core.i18n import _ | 20 from sat.core.i18n import _ |
21 from sat.core.constants import Const as C | |
21 from sat.core.log import getLogger | 22 from sat.core.log import getLogger |
22 log = getLogger(__name__) | 23 log = getLogger(__name__) |
23 from sat.core import exceptions | 24 from sat.core import exceptions |
24 from twisted.words.xish import domish | 25 from twisted.words.xish import domish |
25 from twisted.words.protocols.jabber.xmlstream import XMPPHandler | 26 from twisted.words.protocols.jabber.xmlstream import XMPPHandler |
30 from collections import OrderedDict | 31 from collections import OrderedDict |
31 import hashlib | 32 import hashlib |
32 | 33 |
33 | 34 |
34 PLUGIN_INFO = { | 35 PLUGIN_INFO = { |
35 "name": "Cryptographic Hash Functions", | 36 C.PI_NAME: "Cryptographic Hash Functions", |
36 "import_name": "XEP-0300", | 37 C.PI_IMPORT_NAME: "XEP-0300", |
37 "type": "XEP", | 38 C.PI_TYPE: "XEP", |
38 "protocols": ["XEP-0300"], | 39 C.PI_PROTOCOLS: ["XEP-0300"], |
39 "main": "XEP_0300", | 40 C.PI_MAIN: "XEP_0300", |
40 "handler": "yes", | 41 C.PI_HANDLER: "yes", |
41 "description": _("""Management of cryptographic hashes""") | 42 C.PI_DESCRIPTION: _("""Management of cryptographic hashes""") |
42 } | 43 } |
43 | 44 |
44 NS_HASHES = "urn:xmpp:hashes:1" | 45 NS_HASHES = "urn:xmpp:hashes:1" |
45 NS_HASHES_FUNCTIONS = u"urn:xmpp:hash-function-text-names:{}" | 46 NS_HASHES_FUNCTIONS = u"urn:xmpp:hash-function-text-names:{}" |
46 BUFFER_SIZE = 2**12 | 47 BUFFER_SIZE = 2**12 |