From: Brian Warner Date: Thu, 30 Nov 2006 22:29:52 +0000 (-0700) Subject: create a stub Storage service, start work on publishing it X-Git-Tag: tahoe_v0.1.0-0-UNSTABLE~544 X-Git-Url: https://git.rkrishnan.org/pf/content/en/statistics?a=commitdiff_plain;h=b879ad2962744a7ff077e015340b0a910fae5336;p=tahoe-lafs%2Ftahoe-lafs.git create a stub Storage service, start work on publishing it --- diff --git a/allmydata/client.py b/allmydata/client.py index ed49e96c..12eb84c6 100644 --- a/allmydata/client.py +++ b/allmydata/client.py @@ -1,9 +1,12 @@ -from foolscap import Tub +from foolscap import Tub, Referenceable from twisted.application import service from twisted.python import log import os.path +class Storage(service.MultiService, Referenceable): + pass + class Client(service.MultiService): CERTFILE = "client.pem" @@ -18,6 +21,10 @@ class Client(service.MultiService): f.write(self.tub.getCertData()) f.close() self.queen = None # self.queen is either None or a RemoteReference + self.urls = {} + s = Storage() + s.setServiceParent(self) + #self.urls["storage"] = self.tub.registerReference(s, "storage") def startService(self): service.MultiService.startService(self) @@ -34,6 +41,7 @@ class Client(service.MultiService): log.msg("connected to queen") self.queen = queen queen.notifyOnDisconnect(self._lost_queen) + queen.callRemote("hello", urls=self.urls) def _lost_queen(self): log.msg("lost connection to queen")