app/soc/modules/callback.py
author Augie Fackler <durin42@gmail.com>
Sun, 12 Jul 2009 11:46:36 -0500
changeset 2613 169d69967431
parent 2333 221482a54238
permissions -rw-r--r--
buildout.cfg: We require nose as well for tests.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2333
221482a54238 First step in the module design
Sverre Rabbelier <sverre@rabbelier.nl>
parents:
diff changeset
     1
# Copyright 2009 the Melange authors.
221482a54238 First step in the module design
Sverre Rabbelier <sverre@rabbelier.nl>
parents:
diff changeset
     2
#
221482a54238 First step in the module design
Sverre Rabbelier <sverre@rabbelier.nl>
parents:
diff changeset
     3
# Licensed under the Apache License, Version 2.0 (the "License");
221482a54238 First step in the module design
Sverre Rabbelier <sverre@rabbelier.nl>
parents:
diff changeset
     4
# you may not use this file except in compliance with the License.
221482a54238 First step in the module design
Sverre Rabbelier <sverre@rabbelier.nl>
parents:
diff changeset
     5
# You may obtain a copy of the License at
221482a54238 First step in the module design
Sverre Rabbelier <sverre@rabbelier.nl>
parents:
diff changeset
     6
#
221482a54238 First step in the module design
Sverre Rabbelier <sverre@rabbelier.nl>
parents:
diff changeset
     7
#     http://www.apache.org/licenses/LICENSE-2.0
221482a54238 First step in the module design
Sverre Rabbelier <sverre@rabbelier.nl>
parents:
diff changeset
     8
#
221482a54238 First step in the module design
Sverre Rabbelier <sverre@rabbelier.nl>
parents:
diff changeset
     9
# Unless required by applicable law or agreed to in writing, software
221482a54238 First step in the module design
Sverre Rabbelier <sverre@rabbelier.nl>
parents:
diff changeset
    10
# distributed under the License is distributed on an "AS IS" BASIS,
221482a54238 First step in the module design
Sverre Rabbelier <sverre@rabbelier.nl>
parents:
diff changeset
    11
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
221482a54238 First step in the module design
Sverre Rabbelier <sverre@rabbelier.nl>
parents:
diff changeset
    12
# See the License for the specific language governing permissions and
221482a54238 First step in the module design
Sverre Rabbelier <sverre@rabbelier.nl>
parents:
diff changeset
    13
# limitations under the License.
221482a54238 First step in the module design
Sverre Rabbelier <sverre@rabbelier.nl>
parents:
diff changeset
    14
221482a54238 First step in the module design
Sverre Rabbelier <sverre@rabbelier.nl>
parents:
diff changeset
    15
"""Module containing Melange callbacks.
221482a54238 First step in the module design
Sverre Rabbelier <sverre@rabbelier.nl>
parents:
diff changeset
    16
"""
221482a54238 First step in the module design
Sverre Rabbelier <sverre@rabbelier.nl>
parents:
diff changeset
    17
221482a54238 First step in the module design
Sverre Rabbelier <sverre@rabbelier.nl>
parents:
diff changeset
    18
__authors__ = [
221482a54238 First step in the module design
Sverre Rabbelier <sverre@rabbelier.nl>
parents:
diff changeset
    19
  '"Sverre Rabbelier" <sverre@rabbelier.nl>',
221482a54238 First step in the module design
Sverre Rabbelier <sverre@rabbelier.nl>
parents:
diff changeset
    20
  '"Lennard de Rijk" <ljvderijk@gmail.com>',
221482a54238 First step in the module design
Sverre Rabbelier <sverre@rabbelier.nl>
parents:
diff changeset
    21
  ]
221482a54238 First step in the module design
Sverre Rabbelier <sverre@rabbelier.nl>
parents:
diff changeset
    22
221482a54238 First step in the module design
Sverre Rabbelier <sverre@rabbelier.nl>
parents:
diff changeset
    23
221482a54238 First step in the module design
Sverre Rabbelier <sverre@rabbelier.nl>
parents:
diff changeset
    24
CORE = None
221482a54238 First step in the module design
Sverre Rabbelier <sverre@rabbelier.nl>
parents:
diff changeset
    25
221482a54238 First step in the module design
Sverre Rabbelier <sverre@rabbelier.nl>
parents:
diff changeset
    26
221482a54238 First step in the module design
Sverre Rabbelier <sverre@rabbelier.nl>
parents:
diff changeset
    27
def registerCore(core):
221482a54238 First step in the module design
Sverre Rabbelier <sverre@rabbelier.nl>
parents:
diff changeset
    28
  """Registers the specified callback as core.
221482a54238 First step in the module design
Sverre Rabbelier <sverre@rabbelier.nl>
parents:
diff changeset
    29
  """
221482a54238 First step in the module design
Sverre Rabbelier <sverre@rabbelier.nl>
parents:
diff changeset
    30
221482a54238 First step in the module design
Sverre Rabbelier <sverre@rabbelier.nl>
parents:
diff changeset
    31
  global CORE
221482a54238 First step in the module design
Sverre Rabbelier <sverre@rabbelier.nl>
parents:
diff changeset
    32
  CORE = core
221482a54238 First step in the module design
Sverre Rabbelier <sverre@rabbelier.nl>
parents:
diff changeset
    33
221482a54238 First step in the module design
Sverre Rabbelier <sverre@rabbelier.nl>
parents:
diff changeset
    34
221482a54238 First step in the module design
Sverre Rabbelier <sverre@rabbelier.nl>
parents:
diff changeset
    35
def getCore():
221482a54238 First step in the module design
Sverre Rabbelier <sverre@rabbelier.nl>
parents:
diff changeset
    36
  """Returns the Core handler.
221482a54238 First step in the module design
Sverre Rabbelier <sverre@rabbelier.nl>
parents:
diff changeset
    37
  """
221482a54238 First step in the module design
Sverre Rabbelier <sverre@rabbelier.nl>
parents:
diff changeset
    38
221482a54238 First step in the module design
Sverre Rabbelier <sverre@rabbelier.nl>
parents:
diff changeset
    39
  global CORE
221482a54238 First step in the module design
Sverre Rabbelier <sverre@rabbelier.nl>
parents:
diff changeset
    40
  return CORE