summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/server/__init__.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2017-07-18 22:15:17 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-07-21 08:41:11 +0100
commit577b75086eaf4ae2201933f7b9ac32f6239867c6 (patch)
tree66486353161365955936a20338642c8f50dc15e8 /bitbake/lib/bb/server/__init__.py
parentdd71707d5a5a420a4406ce88164ac2a32cc04956 (diff)
downloadpoky-577b75086eaf4ae2201933f7b9ac32f6239867c6.tar.gz
bitbake: server: Remove base classes and inline code
In preparation for rewriting this code, expand the relatively useless base classes into the code itself. (Bitbake rev: a1c6151420d86bac658c08ae714647062edd6ef2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/server/__init__.py')
-rw-r--r--bitbake/lib/bb/server/__init__.py72
1 files changed, 0 insertions, 72 deletions
diff --git a/bitbake/lib/bb/server/__init__.py b/bitbake/lib/bb/server/__init__.py
index 538a633fe5..345691e40f 100644
--- a/bitbake/lib/bb/server/__init__.py
+++ b/bitbake/lib/bb/server/__init__.py
@@ -25,75 +25,3 @@ approach to the interface, and minimize risks associated with code duplication.
25 25
26""" 26"""
27 27
28""" BaseImplServer() the base class for all XXServer() implementations.
29
30 These classes contain the actual code that runs the server side, i.e.
31 listens for the commands and executes them. Although these implementations
32 contain all the data of the original bitbake command, i.e the cooker instance,
33 they may well run on a different process or even machine.
34
35"""
36
37class BaseImplServer():
38 def __init__(self):
39 self._idlefuns = {}
40
41 def addcooker(self, cooker):
42 self.cooker = cooker
43
44 def register_idle_function(self, function, data):
45 """Register a function to be called while the server is idle"""
46 assert hasattr(function, '__call__')
47 self._idlefuns[function] = data
48
49
50
51""" BitBakeBaseServerConnection class is the common ancestor to all
52 BitBakeServerConnection classes.
53
54 These classes control the remote server. The only command currently
55 implemented is the terminate() command.
56
57"""
58
59class BitBakeBaseServerConnection():
60 def __init__(self, serverImpl):
61 pass
62
63 def terminate(self):
64 pass
65
66 def setupEventQueue(self):
67 pass
68
69
70""" BitBakeBaseServer class is the common ancestor to all Bitbake servers
71
72 Derive this class in order to implement a BitBakeServer which is the
73 controlling stub for the actual server implementation
74
75"""
76class BitBakeBaseServer(object):
77 def initServer(self):
78 self.serverImpl = None # we ensure a runtime crash if not overloaded
79 self.connection = None
80 return
81
82 def addcooker(self, cooker):
83 self.cooker = cooker
84 self.serverImpl.addcooker(cooker)
85
86 def getServerIdleCB(self):
87 return self.serverImpl.register_idle_function
88
89 def saveConnectionDetails(self):
90 return
91
92 def detach(self):
93 return
94
95 def establishConnection(self, featureset):
96 raise "Must redefine the %s.establishConnection()" % self.__class__.__name__
97
98 def endSession(self):
99 self.connection.terminate()