#!/usr/bin/env python # coding: utf-8 """ Defines an interface class for all gui classes. """ class Gui(object): """ Interface class for all GUIs """ default_port = 55555 default_ip = "localhost" name = "META" def __init__(self, factory): """ Register at factory as gui and save a reference to factory """ factory.gui = self self.factory = factory self.factory.parser.get_cmds_from_obj(self) def cmd_error(self, err): """ Received an error :param err: An error from the server :type err: string """ def cmd_plugin_list(self, plugins): """ update the list of on the server installed plugins :param groups: Names of installed plugins on the server :tpye groups: list """ def cmd_group_list(self, groups): """ update group list :param groups: Names of groups on the server :tpye groups: list """ def new_group(self, plugin_class): """ create a new plugin group :Parameters: plugin_class : PluginClient plugin class (should be a child class of PluginClient for this GUI Toolkit) """ def add_group(self, group_name, plugin_class): """ create a new plugin obj. and connect to a group :Parameters: group_name : string name of the group to connect to plugin_class : PluginClient plugin class (should be a child class of PluginClient for this GUI Toolkit) """