Module disco :: Class AgentBrowser
[hide private]
[frames] | no frames]

Class AgentBrowser

source code

Class that deals with browsing agents and appearance of the browser window. This class and subclasses should basically be treated as "part" of the ServiceDiscoveryWindow class, but had to be separated because this part is dynamic
Instance Methods [hide private]
 
__init__(self, account, jid, node) source code
 
_get_agent_address(self)
Get the agent's address for displaying in the GUI
source code
 
_set_initial_title(self)
Set the initial window title based on agent address
source code
 
_create_treemodel(self)
Create the treemodel for the services treeview.
source code
 
_clean_treemodel(self) source code
 
_add_actions(self)
Add the action buttons to the buttonbox for actions the browser can perform
source code
 
_clean_actions(self)
Remove the action buttons specific to this browser
source code
 
_set_title(self, jid, node, identities, features, data)
Set the window title based on agent info
source code
 
_clean_title(self) source code
 
prepare_window(self, window)
Prepare the service discovery window.
source code
 
cleanup(self)
Cleanup when the window intends to switch browsers
source code
 
update_theme(self)
Called when the default theme is changed
source code
 
on_browse_button_clicked(self, widget=None)
When we want to browse an agent: open a new services window with a browser for the agent type
source code
 
update_actions(self)
When we select a row: activate action buttons based on the agent's info
source code
 
_update_actions(self, jid, node, identities, features, data)
Continuation of update_actions
source code
 
default_action(self)
When we double-click a row: perform the default action on the selected item
source code
 
_default_action(self, jid, node, identities, features, data)
Continuation of default_action
source code
 
browse(self, force=False)
Fill the treeview with agents, fetching the info if necessary
source code
 
_pulse_timeout_cb(self, *args)
Simple callback to keep the progressbar pulsing
source code
 
_find_item(self, jid, node)
Check if an item is already in the treeview.
source code
 
_agent_items(self, jid, node, items, force)
Callback for when we receive a list of agent items
source code
 
_agent_info(self, jid, node, identities, features, data)
Callback for when we receive info about an agent's item
source code
 
_add_item(self, jid, node, parent_node, item, force)
Called when an item should be added to the model.
source code
 
_update_item(self, iter_, jid, node, item)
Called when an item should be updated in the model.
source code
 
_update_info(self, iter_, jid, node, identities, features, data)
Called when an item should be updated in the model with further info.
source code
 
_update_error(self, iter_, jid, node)
Called when a disco#info query failed for an item.
source code
Method Details [hide private]

__init__(self, account, jid, node)
(Constructor)

source code 

_get_agent_address(self)

source code 
Get the agent's address for displaying in the GUI

_set_initial_title(self)

source code 
Set the initial window title based on agent address

_create_treemodel(self)

source code 
Create the treemodel for the services treeview. When subclassing, note that the first two columns should ALWAYS be of type string and contain the JID and node of the item respectively

_clean_treemodel(self)

source code 

_add_actions(self)

source code 
Add the action buttons to the buttonbox for actions the browser can perform

_clean_actions(self)

source code 
Remove the action buttons specific to this browser

_set_title(self, jid, node, identities, features, data)

source code 
Set the window title based on agent info

_clean_title(self)

source code 

prepare_window(self, window)

source code 
Prepare the service discovery window. Called when a browser is hooked up with a ServiceDiscoveryWindow instance

cleanup(self)

source code 
Cleanup when the window intends to switch browsers

update_theme(self)

source code 
Called when the default theme is changed

on_browse_button_clicked(self, widget=None)

source code 
When we want to browse an agent: open a new services window with a browser for the agent type

update_actions(self)

source code 
When we select a row: activate action buttons based on the agent's info

_update_actions(self, jid, node, identities, features, data)

source code 
Continuation of update_actions

default_action(self)

source code 
When we double-click a row: perform the default action on the selected item

_default_action(self, jid, node, identities, features, data)

source code 
Continuation of default_action

browse(self, force=False)

source code 
Fill the treeview with agents, fetching the info if necessary

_pulse_timeout_cb(self, *args)

source code 
Simple callback to keep the progressbar pulsing

_find_item(self, jid, node)

source code 
Check if an item is already in the treeview. Return an iter to it if so, None otherwise

_agent_items(self, jid, node, items, force)

source code 
Callback for when we receive a list of agent items

_agent_info(self, jid, node, identities, features, data)

source code 
Callback for when we receive info about an agent's item

_add_item(self, jid, node, parent_node, item, force)

source code 
Called when an item should be added to the model. The result of a disco#items query

_update_item(self, iter_, jid, node, item)

source code 
Called when an item should be updated in the model. The result of a disco#items query

_update_info(self, iter_, jid, node, identities, features, data)

source code 
Called when an item should be updated in the model with further info. The result of a disco#info query

_update_error(self, iter_, jid, node)

source code 
Called when a disco#info query failed for an item.