210
210
Hooks.__init__(self)
211
# Introduced in 0.16:
212
# invoked whenever the server starts serving a directory.
213
# The api signature is (backing urls, public url).
214
self['server_started'] = []
215
# Introduced in 0.16:
216
# invoked whenever the server stops serving a directory.
217
# The api signature is (backing urls, public url).
218
self['server_stopped'] = []
211
self.create_hook(HookPoint('server_started',
212
"Called by the bzr server when it starts serving a directory. "
213
"server_started is called with (backing urls, public url), "
214
"where backing_url is a list of URLs giving the "
215
"server-specific directory locations, and public_url is the "
216
"public URL for the directory being served.", (0, 16), None))
217
self.create_hook(HookPoint('server_stopped',
218
"Called by the bzr server when it stops serving a directory. "
219
"server_stopped is called with the same parameters as the "
220
"server_started hook: (backing_urls, public_url).", (0, 16), None))
220
222
SmartTCPServer.hooks = SmartServerHooks()