Classes and modules documentation completion
darcs-hash:20061004170305-86b55-b85772708e21531de456b86db1560a866f42a008.gz
This commit is contained in:
@@ -1 +1,2 @@
|
||||
__revision__ = "$Id: __init__.py dax $"
|
||||
"""JCL module"""
|
||||
__revision__ = ""
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
"""Jabber related classes"""
|
||||
__revision__ = ""
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
"""JCL base component
|
||||
"""
|
||||
|
||||
__revision__ = ""
|
||||
__revision__ = "$Id: component.py,v 1.3 2005/09/18 20:24:07 dax Exp $"
|
||||
|
||||
import thread
|
||||
import threading
|
||||
|
||||
@@ -22,10 +22,9 @@
|
||||
##
|
||||
|
||||
"""FeederComponent with default Feeder and Sender
|
||||
implementation
|
||||
"""
|
||||
implementation"""
|
||||
|
||||
__revision__ = "$Id: feeder.py dax $"
|
||||
__revision__ = "$Id: feeder.py,v 1.3 2005/09/18 20:24:07 dax Exp $"
|
||||
|
||||
import logging
|
||||
|
||||
@@ -36,8 +35,7 @@ class FeederComponent(JCLComponent):
|
||||
"""Implement a feeder sender behavior based on the
|
||||
regular interval behavior of JCLComponent
|
||||
feed data from given Feeder and send it to user
|
||||
through the given Sender.
|
||||
"""
|
||||
through the given Sender."""
|
||||
def __init__(self,
|
||||
jid,
|
||||
secret,
|
||||
@@ -57,34 +55,29 @@ class FeederComponent(JCLComponent):
|
||||
self.__logger = logging.getLogger("jcl.jabber.JCLComponent")
|
||||
|
||||
def handle_tick(self):
|
||||
"""Implement main feed/send behavior
|
||||
"""
|
||||
for account in Account.select("*"):
|
||||
"""Implement main feed/send behavior"""
|
||||
for account in Account.select():
|
||||
for data in self.feeder.feed(account):
|
||||
self.sender.send(account, data)
|
||||
|
||||
|
||||
|
||||
class Feeder(object):
|
||||
"""Abstract feeder class
|
||||
"""
|
||||
"""Abstract feeder class"""
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
def feed(self, account):
|
||||
"""Feed data for given account
|
||||
"""
|
||||
"""Feed data for given account"""
|
||||
pass
|
||||
|
||||
|
||||
class Sender(object):
|
||||
"""Abstract sender class
|
||||
"""
|
||||
"""Abstract sender class"""
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
def send(self, to_account, data):
|
||||
"""Send data to given account
|
||||
"""
|
||||
"""Send data to given account"""
|
||||
pass
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
"""X -- X data handling
|
||||
"""
|
||||
|
||||
__revision__ = ""
|
||||
__revision__ = "$Id: x.py,v 1.3 2005/09/18 20:24:07 dax Exp $"
|
||||
|
||||
from pyxmpp.stanza import common_doc
|
||||
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
"""lang -- contains translations
|
||||
"""
|
||||
|
||||
# TODO get help to generate revision
|
||||
__revision__ = "$Id: lang.py dax $"
|
||||
__revision__ = "$Id: lang.py,v 1.3 2005/09/18 20:24:07 dax Exp $"
|
||||
|
||||
# TODO delete JMC translation
|
||||
class Lang:
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
"""Contains data model classes"""
|
||||
__revision__ = ""
|
||||
|
||||
|
||||
@@ -21,12 +21,24 @@
|
||||
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##
|
||||
|
||||
from sqlobject import *
|
||||
"""Basic Account implementation
|
||||
"""
|
||||
|
||||
__revision__ = "$Id: account.py,v 1.3 2005/09/18 20:24:07 dax Exp $"
|
||||
|
||||
from sqlobject.main import SQLObject
|
||||
from sqlobject.col import StringCol
|
||||
|
||||
class Account(SQLObject):
|
||||
"""Base Account class"""
|
||||
user_jid = StringCol()
|
||||
name = StringCol()
|
||||
jid = StringCol()
|
||||
|
||||
def get_long_name(self):
|
||||
"""Return Human readable account name"""
|
||||
return self.name
|
||||
|
||||
long_name = property(get_long_name)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user