def make_hello(self, source): capabilities = ServerCore.make_hello(self, source) for c in SERVER_BASES: if c != ServerCore: merge_dicts(capabilities, c.get_caps(self, source)) capabilities["server_type"] = "base" if source.wants_display: capabilities.update({ "max_desktop_size": self.get_max_screen_size(), }) if source.wants_features: capabilities.update({ "client-shutdown": self.client_shutdown, "sharing": self.sharing is not False, "sharing-toggle": self.sharing is None, "lock": self.lock is not False, "lock-toggle": self.lock is None, "windows": server_features.windows, "keyboard": server_features.input_devices, "pointer": server_features.input_devices, }) capabilities.update(flatten_dict(self.get_server_features(source))) #this is a feature, but we would need the hello request #to know if it is really needed.. so always include it: capabilities["exit_server"] = True return capabilities
def make_hello(self, source): capabilities = ServerCore.make_hello(self, source) for c in ServerBase.__bases__: if c!=ServerCore: merge_dicts(capabilities, c.get_caps(self)) capabilities["server_type"] = "base" if source.wants_display: capabilities.update({ "max_desktop_size" : self.get_max_screen_size(), }) if source.wants_features: capabilities.update({ "bell" : self.bell, "cursors" : self.cursors, "av-sync.enabled" : self.av_sync, "client-shutdown" : self.client_shutdown, "sharing" : self.sharing is not False, "sharing-toggle" : self.sharing is None, "lock" : self.lock is not False, "lock-toggle" : self.lock is None, }) capabilities.update(flatten_dict(self.get_server_features(source))) #this is a feature, but we would need the hello request #to know if it is really needed.. so always include it: capabilities["exit_server"] = True return capabilities