annotate src/core/constants.py @ 923:e77948faaef3

core: removed default_config: - constants in core.default_config moved to core.constants - removed unused host.getConst and host.setConst - APP_NAME* used where it make sense
author Goffi <goffi@goffi.org>
date Sat, 22 Mar 2014 17:48:10 +0100
parents ed9841e6d84a
children d609581bf74a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
914
1a3ba959f0ab core (memory): moved Params in its own module + introduced a new core/constants module, and moved some constants there
Goffi <goffi@goffi.org>
parents:
diff changeset
1 #!/usr/bin/python
1a3ba959f0ab core (memory): moved Params in its own module + introduced a new core/constants module, and moved some constants there
Goffi <goffi@goffi.org>
parents:
diff changeset
2 # -*- coding: utf-8 -*-
1a3ba959f0ab core (memory): moved Params in its own module + introduced a new core/constants module, and moved some constants there
Goffi <goffi@goffi.org>
parents:
diff changeset
3
1a3ba959f0ab core (memory): moved Params in its own module + introduced a new core/constants module, and moved some constants there
Goffi <goffi@goffi.org>
parents:
diff changeset
4 # SàT: a XMPP client
1a3ba959f0ab core (memory): moved Params in its own module + introduced a new core/constants module, and moved some constants there
Goffi <goffi@goffi.org>
parents:
diff changeset
5 # Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014 Jérôme Poisson (goffi@goffi.org)
1a3ba959f0ab core (memory): moved Params in its own module + introduced a new core/constants module, and moved some constants there
Goffi <goffi@goffi.org>
parents:
diff changeset
6
1a3ba959f0ab core (memory): moved Params in its own module + introduced a new core/constants module, and moved some constants there
Goffi <goffi@goffi.org>
parents:
diff changeset
7 # This program is free software: you can redistribute it and/or modify
1a3ba959f0ab core (memory): moved Params in its own module + introduced a new core/constants module, and moved some constants there
Goffi <goffi@goffi.org>
parents:
diff changeset
8 # it under the terms of the GNU Affero General Public License as published by
1a3ba959f0ab core (memory): moved Params in its own module + introduced a new core/constants module, and moved some constants there
Goffi <goffi@goffi.org>
parents:
diff changeset
9 # the Free Software Foundation, either version 3 of the License, or
1a3ba959f0ab core (memory): moved Params in its own module + introduced a new core/constants module, and moved some constants there
Goffi <goffi@goffi.org>
parents:
diff changeset
10 # (at your option) any later version.
1a3ba959f0ab core (memory): moved Params in its own module + introduced a new core/constants module, and moved some constants there
Goffi <goffi@goffi.org>
parents:
diff changeset
11
1a3ba959f0ab core (memory): moved Params in its own module + introduced a new core/constants module, and moved some constants there
Goffi <goffi@goffi.org>
parents:
diff changeset
12 # This program is distributed in the hope that it will be useful,
1a3ba959f0ab core (memory): moved Params in its own module + introduced a new core/constants module, and moved some constants there
Goffi <goffi@goffi.org>
parents:
diff changeset
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1a3ba959f0ab core (memory): moved Params in its own module + introduced a new core/constants module, and moved some constants there
Goffi <goffi@goffi.org>
parents:
diff changeset
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1a3ba959f0ab core (memory): moved Params in its own module + introduced a new core/constants module, and moved some constants there
Goffi <goffi@goffi.org>
parents:
diff changeset
15 # GNU Affero General Public License for more details.
1a3ba959f0ab core (memory): moved Params in its own module + introduced a new core/constants module, and moved some constants there
Goffi <goffi@goffi.org>
parents:
diff changeset
16
1a3ba959f0ab core (memory): moved Params in its own module + introduced a new core/constants module, and moved some constants there
Goffi <goffi@goffi.org>
parents:
diff changeset
17 # You should have received a copy of the GNU Affero General Public License
1a3ba959f0ab core (memory): moved Params in its own module + introduced a new core/constants module, and moved some constants there
Goffi <goffi@goffi.org>
parents:
diff changeset
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
1a3ba959f0ab core (memory): moved Params in its own module + introduced a new core/constants module, and moved some constants there
Goffi <goffi@goffi.org>
parents:
diff changeset
19
1a3ba959f0ab core (memory): moved Params in its own module + introduced a new core/constants module, and moved some constants there
Goffi <goffi@goffi.org>
parents:
diff changeset
20
1a3ba959f0ab core (memory): moved Params in its own module + introduced a new core/constants module, and moved some constants there
Goffi <goffi@goffi.org>
parents:
diff changeset
21 class Const(object):
923
e77948faaef3 core: removed default_config:
Goffi <goffi@goffi.org>
parents: 919
diff changeset
22 APP_NAME = u'Salut à Toi'
e77948faaef3 core: removed default_config:
Goffi <goffi@goffi.org>
parents: 919
diff changeset
23 APP_NAME_SHORT = u'SàT'
e77948faaef3 core: removed default_config:
Goffi <goffi@goffi.org>
parents: 919
diff changeset
24 APP_NAME_FULL = u'%s (%s)' % (APP_NAME_SHORT, APP_NAME)
e77948faaef3 core: removed default_config:
Goffi <goffi@goffi.org>
parents: 919
diff changeset
25 APP_VERSION = u'0.4.1D' # Please add 'D' at the end for dev versions
e77948faaef3 core: removed default_config:
Goffi <goffi@goffi.org>
parents: 919
diff changeset
26
e77948faaef3 core: removed default_config:
Goffi <goffi@goffi.org>
parents: 919
diff changeset
27 DEFAULT_CONFIG = {
e77948faaef3 core: removed default_config:
Goffi <goffi@goffi.org>
parents: 919
diff changeset
28 'local_dir': '~/.sat',
e77948faaef3 core: removed default_config:
Goffi <goffi@goffi.org>
parents: 919
diff changeset
29 'media_dir': '/usr/share/sat/media',
e77948faaef3 core: removed default_config:
Goffi <goffi@goffi.org>
parents: 919
diff changeset
30 }
e77948faaef3 core: removed default_config:
Goffi <goffi@goffi.org>
parents: 919
diff changeset
31
914
1a3ba959f0ab core (memory): moved Params in its own module + introduced a new core/constants module, and moved some constants there
Goffi <goffi@goffi.org>
parents:
diff changeset
32 NO_SECURITY_LIMIT = -1
1a3ba959f0ab core (memory): moved Params in its own module + introduced a new core/constants module, and moved some constants there
Goffi <goffi@goffi.org>
parents:
diff changeset
33 INDIVIDUAL = "individual"
1a3ba959f0ab core (memory): moved Params in its own module + introduced a new core/constants module, and moved some constants there
Goffi <goffi@goffi.org>
parents:
diff changeset
34 GENERAL = "general"
923
e77948faaef3 core: removed default_config:
Goffi <goffi@goffi.org>
parents: 919
diff changeset
35 SAVEFILE_DATABASE = "sat.db"
916
1a759096ccbd core: use of Const for profile_key + replaced '@DEFAULT@' default profile_key by '@NONE@'
Goffi <goffi@goffi.org>
parents: 914
diff changeset
36 PROF_KEY_NONE = '@NONE@'
1a759096ccbd core: use of Const for profile_key + replaced '@DEFAULT@' default profile_key by '@NONE@'
Goffi <goffi@goffi.org>
parents: 914
diff changeset
37 PROF_KEY_DEFAULT = '@DEFAULT@'
919
ed9841e6d84a core: added IQ_SET to core.constants + getLastResource now manage correctly jid.JID
Goffi <goffi@goffi.org>
parents: 916
diff changeset
38 IQ_SET = '/iq[@type="set"]'