[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/gnue-common/src GComm.py commdrivers/GComm...
From: |
Jason Cater |
Subject: |
gnue/gnue-common/src GComm.py commdrivers/GComm... |
Date: |
Thu, 01 Nov 2001 22:37:50 -0500 |
CVSROOT: /home/cvs
Module name: gnue
Changes by: Jason Cater <address@hidden> 01/11/01 22:37:49
Modified files:
gnue-common/src: GComm.py
gnue-common/src/commdrivers: GCommBase.py
Log message:
minor work to gcomm
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/GComm.py.diff?cvsroot=OldCVS&tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/commdrivers/GCommBase.py.diff?cvsroot=OldCVS&tr1=1.4&tr2=1.5&r1=text&r2=text
Patches:
Index: gnue/gnue-common/src/GComm.py
diff -u gnue/gnue-common/src/GComm.py:1.3 gnue/gnue-common/src/GComm.py:1.4
--- gnue/gnue-common/src/GComm.py:1.3 Tue Oct 30 01:13:20 2001
+++ gnue/gnue-common/src/GComm.py Thu Nov 1 22:37:49 2001
@@ -27,7 +27,30 @@
# NOTES:
#
-class GComm:
+import GDebug
+
+#
+# Attach to a client driver
+#
+def attach(driver, params):
+ try:
+ imp = __import__('gnue/common/commdrivers/%s')
+ except ImportError, mesg:
+ GDebug.printMesg(1,"Unable to import GComm Adapter '%s': \n%s" %
(driver,mesg))
+ raise InvalidAdapter, mesg
+
+ if not (hasattr(imp,'CLIENT') and imp.CLIENT):
+ raise NoClientAdapter, "GComm adapter '%s' does not support clients" %
driver)
+
+ adapter = imp.Client()
+
+ return adapter
+
+
+#
+# Export our services
+#
+export(driver, schema, params):
pass
@@ -40,14 +63,26 @@
# |__ CommunicationsError
# |__ UserError (base for user-defined errors)
#
+
+class Error(StandardError):
+ pass
+
+class InvalidAdapter(Error):
+ pass
+
+class NoClientAdapter(Error):
+ pass
+
+class NoServerAdapter(Error):
+ pass
-class Error (StandardError):
+class ProgrammingError(Error):
pass
-class ProgrammingError (Error):
+class InvalidAdapter(ProgrammingError):
pass
-class InvalidService (ProgrammingError):
+class InvalidService(ProgrammingError):
pass
class CommunicationsError(Error)
Index: gnue/gnue-common/src/commdrivers/GCommBase.py
diff -u gnue/gnue-common/src/commdrivers/GCommBase.py:1.4
gnue/gnue-common/src/commdrivers/GCommBase.py:1.5
--- gnue/gnue-common/src/commdrivers/GCommBase.py:1.4 Tue Oct 30 01:13:20 2001
+++ gnue/gnue-common/src/commdrivers/GCommBase.py Thu Nov 1 22:37:49 2001
@@ -30,10 +30,19 @@
from gnue.common import GComm
class Client:
- def runService(self, method, data):
+ def requestService(self, method, data={}):
pass
+ def runMethod(self, method, params):
+ pass
+
+ def getAttribute(self, attribute
+ pass
+
+ def setAttribute(self, attribute
+ pass
+
class Server:
def runService(self, method, data):
pass
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue/gnue-common/src GComm.py commdrivers/GComm...,
Jason Cater <=