Classes and modules documentation completion

darcs-hash:20061004170305-86b55-b85772708e21531de456b86db1560a866f42a008.gz
This commit is contained in:
David Rousselie
2006-10-04 19:03:05 +02:00
parent 3e0cbdcfb6
commit d505e65972
8 changed files with 32 additions and 22 deletions

View File

@@ -1 +1,2 @@
__revision__ = "$Id: __init__.py dax $" """JCL module"""
__revision__ = ""

View File

@@ -0,0 +1,2 @@
"""Jabber related classes"""
__revision__ = ""

View File

@@ -24,7 +24,7 @@
"""JCL base component """JCL base component
""" """
__revision__ = "" __revision__ = "$Id: component.py,v 1.3 2005/09/18 20:24:07 dax Exp $"
import thread import thread
import threading import threading

View File

@@ -22,10 +22,9 @@
## ##
"""FeederComponent with default Feeder and Sender """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 import logging
@@ -36,8 +35,7 @@ class FeederComponent(JCLComponent):
"""Implement a feeder sender behavior based on the """Implement a feeder sender behavior based on the
regular interval behavior of JCLComponent regular interval behavior of JCLComponent
feed data from given Feeder and send it to user feed data from given Feeder and send it to user
through the given Sender. through the given Sender."""
"""
def __init__(self, def __init__(self,
jid, jid,
secret, secret,
@@ -57,34 +55,29 @@ class FeederComponent(JCLComponent):
self.__logger = logging.getLogger("jcl.jabber.JCLComponent") self.__logger = logging.getLogger("jcl.jabber.JCLComponent")
def handle_tick(self): def handle_tick(self):
"""Implement main feed/send behavior """Implement main feed/send behavior"""
""" for account in Account.select():
for account in Account.select("*"):
for data in self.feeder.feed(account): for data in self.feeder.feed(account):
self.sender.send(account, data) self.sender.send(account, data)
class Feeder(object): class Feeder(object):
"""Abstract feeder class """Abstract feeder class"""
"""
def __init__(self): def __init__(self):
pass pass
def feed(self, account): def feed(self, account):
"""Feed data for given account """Feed data for given account"""
"""
pass pass
class Sender(object): class Sender(object):
"""Abstract sender class """Abstract sender class"""
"""
def __init__(self): def __init__(self):
pass pass
def send(self, to_account, data): def send(self, to_account, data):
"""Send data to given account """Send data to given account"""
"""
pass pass

View File

@@ -23,7 +23,7 @@
"""X -- X data handling """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 from pyxmpp.stanza import common_doc

View File

@@ -24,8 +24,7 @@
"""lang -- contains translations """lang -- contains translations
""" """
# TODO get help to generate revision __revision__ = "$Id: lang.py,v 1.3 2005/09/18 20:24:07 dax Exp $"
__revision__ = "$Id: lang.py dax $"
# TODO delete JMC translation # TODO delete JMC translation
class Lang: class Lang:

View File

@@ -0,0 +1,3 @@
"""Contains data model classes"""
__revision__ = ""

View File

@@ -21,12 +21,24 @@
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ## 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): class Account(SQLObject):
"""Base Account class"""
user_jid = StringCol() user_jid = StringCol()
name = StringCol() name = StringCol()
jid = StringCol() jid = StringCol()
def get_long_name(self):
"""Return Human readable account name"""
return self.name
long_name = property(get_long_name)