conduit r1212 - in trunk: . conduit/dataproviders conduit/modules/NetworkModule test/python-tests/data
- From: jstowers svn gnome org
- To: svn-commits-list gnome org
- Subject: conduit r1212 - in trunk: . conduit/dataproviders conduit/modules/NetworkModule test/python-tests/data
- Date: Mon, 14 Jan 2008 07:17:25 +0000 (GMT)
Author: jstowers
Date: Mon Jan 14 07:17:25 2008
New Revision: 1212
URL: http://svn.gnome.org/viewvc/conduit?rev=1212&view=rev
Log:
"2008-01-14 John Stowers <john stowers gmail com>
* conduit/dataproviders/DataProvider.py: Add get_status()
* conduit/modules/NetworkModule/Server.py: Add is_configured() to return
False so that a sync cannot be initiated from the Server end
* conduit/modules/NetworkModule/XMLRPCUtils.py: Marshall some more functions
over xmlrpc so the GUI displays sensible messages on both ends
* test/python-tests/data/1.png: Add test image for photo tests"
Added:
trunk/test/python-tests/data/1.png (contents, props changed)
Modified:
trunk/ChangeLog
trunk/conduit/dataproviders/DataProvider.py
trunk/conduit/modules/NetworkModule/Server.py
trunk/conduit/modules/NetworkModule/XMLRPCUtils.py
Modified: trunk/conduit/dataproviders/DataProvider.py
==============================================================================
--- trunk/conduit/dataproviders/DataProvider.py (original)
+++ trunk/conduit/dataproviders/DataProvider.py Mon Jan 14 07:17:25 2008
@@ -142,7 +142,7 @@
@param newStatus: The new status
@type newStatus: C{int}
"""
- if newStatus != self.status:
+ if newStatus != self.get_status():
self.status = newStatus
self.__emit_status_changed()
@@ -158,7 +158,7 @@
@returns: a textual representation of the current dataprover status
@rtype: C{str}
"""
- s = self.status
+ s = self.get_status()
if s == STATUS_NONE:
return _("Ready")
elif s == STATUS_CHANGE_DETECTED:
@@ -194,7 +194,7 @@
@todo: This simple test introduces a few (many) corner cases where
the function will return the wrong result. Think about this harder
"""
- s = self.status
+ s = self.get_status()
if s == STATUS_REFRESH:
return True
elif s == STATUS_SYNC:
Modified: trunk/conduit/modules/NetworkModule/Server.py
==============================================================================
--- trunk/conduit/modules/NetworkModule/Server.py (original)
+++ trunk/conduit/modules/NetworkModule/Server.py Mon Jan 14 07:17:25 2008
@@ -85,9 +85,7 @@
if sharedDpw != None:
if sharedDpw.get_UID() not in self.shared and sharedDpw.module != None:
#Update the network enpoint to have the same input and output
- #types as the shared DP. The proper solution here is to
- #have the network endpoint also be a client to the remote dp,
- #but thats not going to happen yet
+ #types as the shared DP.
networkEndpoint.module.input_type = sharedDpw.module.get_input_type()
networkEndpoint.module.output_type = sharedDpw.module.get_output_type()
cond._parameters_changed()
@@ -146,8 +144,18 @@
self.output_type = ""
def is_busy(self):
+ #Stop right click menu
return True
-
+
+ def is_configured(self):
+ #Prevent initiating a sync on the server end by pretending we are
+ #not configured
+ return False
+
+ def get_status(self):
+ #Always show status as ready
+ return DataProvider.STATUS_NONE
+
def get_input_type(self):
return self.input_type
Modified: trunk/conduit/modules/NetworkModule/XMLRPCUtils.py
==============================================================================
--- trunk/conduit/modules/NetworkModule/XMLRPCUtils.py (original)
+++ trunk/conduit/modules/NetworkModule/XMLRPCUtils.py Mon Jan 14 07:17:25 2008
@@ -163,6 +163,18 @@
def get_UID(self):
return self.uid
+ @Utils.log_function_call(clog)
+ def set_status(self, newStatus):
+ self.server.set_status(newStatus)
+
+ @Utils.log_function_call(clog)
+ def get_status(self):
+ return self.server.get_status()
+
+ @Utils.log_function_call(clog)
+ def get_status_text(self):
+ return self.server.get_status_text()
+
class DataproviderServer(StoppableXMLRPCServer):
"""
Wraps a dataproviderwrapper in order to pickle args
@@ -186,6 +198,13 @@
self.register_function(self.put)
self.register_function(self.delete)
self.register_function(self.finish)
+
+ #These functions will never throw exceptions so register them in
+ #the module directly
+ self.register_function(self.dpw.module.set_status)
+ self.register_function(self.dpw.module.get_status)
+ self.register_function(self.dpw.module.get_status_text)
+
def get_info(self):
"""
@@ -245,3 +264,4 @@
self.dpw.module.finish(aborted, error, conflict)
except Exception, e:
return marshal_exception_to_fault(e)
+
Added: trunk/test/python-tests/data/1.png
==============================================================================
Binary file. No diff available.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]