diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-07-18 22:15:17 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-07-18 22:39:35 +0100 |
commit | a1c6151420d86bac658c08ae714647062edd6ef2 (patch) | |
tree | 4d490dd08724e9bbf2ab596bf3c8967513a70d3d /lib/bb/server/__init__.py | |
parent | f8cf2cb58b80ce74f756a11a9773b6b0e78d51ee (diff) | |
download | bitbake-a1c6151420d86bac658c08ae714647062edd6ef2.tar.gz |
server: Remove base classes and inline code
In preparation for rewriting this code, expand the relatively useless
base classes into the code itself.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/server/__init__.py')
-rw-r--r-- | lib/bb/server/__init__.py | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/lib/bb/server/__init__.py b/lib/bb/server/__init__.py index 538a633fe..345691e40 100644 --- a/lib/bb/server/__init__.py +++ b/lib/bb/server/__init__.py @@ -25,75 +25,3 @@ approach to the interface, and minimize risks associated with code duplication. """ -""" BaseImplServer() the base class for all XXServer() implementations. - - These classes contain the actual code that runs the server side, i.e. - listens for the commands and executes them. Although these implementations - contain all the data of the original bitbake command, i.e the cooker instance, - they may well run on a different process or even machine. - -""" - -class BaseImplServer(): - def __init__(self): - self._idlefuns = {} - - def addcooker(self, cooker): - self.cooker = cooker - - def register_idle_function(self, function, data): - """Register a function to be called while the server is idle""" - assert hasattr(function, '__call__') - self._idlefuns[function] = data - - - -""" BitBakeBaseServerConnection class is the common ancestor to all - BitBakeServerConnection classes. - - These classes control the remote server. The only command currently - implemented is the terminate() command. - -""" - -class BitBakeBaseServerConnection(): - def __init__(self, serverImpl): - pass - - def terminate(self): - pass - - def setupEventQueue(self): - pass - - -""" BitBakeBaseServer class is the common ancestor to all Bitbake servers - - Derive this class in order to implement a BitBakeServer which is the - controlling stub for the actual server implementation - -""" -class BitBakeBaseServer(object): - def initServer(self): - self.serverImpl = None # we ensure a runtime crash if not overloaded - self.connection = None - return - - def addcooker(self, cooker): - self.cooker = cooker - self.serverImpl.addcooker(cooker) - - def getServerIdleCB(self): - return self.serverImpl.register_idle_function - - def saveConnectionDetails(self): - return - - def detach(self): - return - - def establishConnection(self, featureset): - raise "Must redefine the %s.establishConnection()" % self.__class__.__name__ - - def endSession(self): - self.connection.terminate() |