Infinityc.Browser

g GObject.GInterface GObject.GInterface Infinity.Browser Infinity.Browser GObject.GInterface->Infinity.Browser Infinity.CommunicationObject Infinity.CommunicationObject GObject.GInterface->Infinity.CommunicationObject GObject.Object GObject.Object Infinityc.Browser Infinityc.Browser GObject.Object->Infinityc.Browser Infinity.Browser->Infinityc.Browser Infinity.CommunicationObject->Infinityc.Browser

Subclasses:

None

Methods

Inherited:

GObject.Object (37), Infinity.Browser (42), Infinity.CommunicationObject (3)

Structs:

GObject.ObjectClass (5)

class

new (io, comm_manager, connection)

add_plugin (plugin)

get_chat_session ()

get_communication_manager ()

get_connection ()

get_subscribe_chat_request ()

iter_get_sync_in (iter)

iter_get_sync_in_requests (iter)

iter_is_valid (iter)

iter_save_session (iter, func, *user_data)

lookup_plugin (note_type)

subscribe_chat (func, *user_data)

Virtual Methods

Inherited:

GObject.Object (7), Infinity.Browser (38), Infinity.CommunicationObject (3)

Properties

Inherited:

Infinity.Browser (1)

Name

Type

Flags

Short Description

chat-session

Infinityc.SessionProxy

r

Active chat session

communication-manager

Infinity.CommunicationManager

r/w/co

The communication manager for the browser

connection

Infinity.XmlConnection

r/w/co

Connection to the server exposing the directory to browse

io

Infinity.Io

r/w/co

The Infinity.Io to schedule timeouts

Signals

Inherited:

GObject.Object (1), Infinity.Browser (10)

Fields

Inherited:

GObject.Object (1), Infinity.Browser (10)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class Infinityc.Browser(**kwargs)
Bases:

GObject.Object, Infinity.Browser, Infinity.CommunicationObject

Abstract:

No

Structure:

Infinityc.BrowserClass

Infinityc.Browser is an opaque data type. You should only access it via the public API functions.

classmethod new(io, comm_manager, connection)
Parameters:
Returns:

A new Infinityc.Browser.

Return type:

Infinityc.Browser

Creates a new Infinityc.Browser.

add_plugin(plugin)
Parameters:

plugin (Infinityc.NotePlugin) – A Infinityc.NotePlugin.

Returns:

Whether the plugin was added successfully.

Return type:

bool

Adds plugin to self. This allows the browser to create sessions of the plugin’s type. Only one plugin of each type can be added to the directory.

get_chat_session()
Returns:

A Infinityc.SessionProxy for the chat, or None.

Return type:

Infinityc.SessionProxy or None

Returns the Infinityc.SessionProxy representing the running chat session if the local client is subscribed to it, or None otherwise.

get_communication_manager()
Returns:

A Infinity.CommunicationManager.

Return type:

Infinity.CommunicationManager

Returns the communication manager of this browser.

get_connection()
Returns:

A Infinity.XmlConnection.

Return type:

Infinity.XmlConnection

Returns the connection to the server.

get_subscribe_chat_request()
Returns:

A Infinity.Request, or None.

Return type:

Infinity.Request or None

Returns the Infinity.Request that represests the request sent to the server which attempts to subscribe to its chat. If there is no such request running, then the function returns None. After such a request finishes, call Infinityc.Browser.get_chat_session() to get the Infinityc.SessionProxy for the chat session. To initiate the request, call Infinityc.Browser.subscribe_chat().

iter_get_sync_in(iter)
Parameters:

iter (Infinity.BrowserIter) – A Infinity.BrowserIter pointing to a note in self.

Returns:

A Infinityc.SessionProxy, or None if we are currently not synchronizing this node to the server.

Return type:

Infinityc.SessionProxy or None

Returns the Infinityc.SessionProxy that is used to synchronize the note iter points to to the server. Such a node is created by Infinity.Browser.add_note() with non-None session parameter. If the client is subscribed to this note, then this returns the same session as Infinity.Browser.get_session(). However, it is possible that we synchronize this node to the server without being subscribed to it. In this case, this function returns the session that does the synchronization, while Infinity.Browser.get_session() would return None.

iter_get_sync_in_requests(iter)
Parameters:

iter (Infinity.BrowserIter) – A Infinity.BrowserIter pointing to a subdirectory node in self.

Returns:

A list of Infinity.Request s. Free with g_slist_free() when done.

Return type:

[Infinity.Request]

Returns a list of all Infinity.Request s created with Infinity.Browser.add_note() with the node iter points to as parent. Such requests begin a synchronization to the server when they have finished.

iter_is_valid(iter)
Parameters:

iter (Infinity.BrowserIter) – A Infinity.BrowserIter.

Returns:

Whether iter points to a node in self.

Return type:

bool

Returns whether iter points to a valid node in self. This is generally the case for any Infinity.BrowserIter returned by one of the Infinityc.Browser functions, it gets invalid however as soon as the node it points to is removed.

iter_save_session(iter, func, *user_data)
Parameters:
Returns:

A Infinity.Request that may be used to get notified when the request finishes or fails.

Return type:

Infinity.Request or None

Requests that the server saves the note pointed to by iter into its background storage. Normally, the server only does this when it is either shut down or when the there are no more subscriptions to the note. Note that this is merely a request and the server might decide not to save the session for whatever reason.

The request might either finish during the call to this function, in which case func will be called and None being returned. If the request does not finish within the function call, a Infinity.Request object is returned, where func has been installed for the Infinity.Request ::finished signal, so that it is called as soon as the request finishes.

lookup_plugin(note_type)
Parameters:

note_type (str) – A note type, such as “InfText”.

Returns:

A Infinityc.NotePlugin, or None.

Return type:

Infinityc.NotePlugin

Returns a previously registered plugin (see Infinityc.Browser.add_plugin()) for the given note type, or None if there is no such plugin.

subscribe_chat(func, *user_data)
Parameters:
Returns:

A Infinity.Request that may be used to get notified when the request finishes or fails.

Return type:

Infinity.Request or None

Attempts to subscribe to the server’s chat. When the operation finishes Infinityc.Browser.get_chat_session() will return a Infinityc.SessionProxy representing the chat session. It can be used to read the chat’s content. The request can fail in case the server chat is disabled.

The request might either finish during the call to this function, in which case func will be called and None being returned. If the request does not finish within the function call, a Infinity.Request object is returned, where func has been installed for the Infinity.Request ::finished signal, so that it is called as soon as the request finishes.

Property Details

Infinityc.Browser.props.chat_session
Name:

chat-session

Type:

Infinityc.SessionProxy

Default Value:

None

Flags:

READABLE

Active chat session

Infinityc.Browser.props.communication_manager
Name:

communication-manager

Type:

Infinity.CommunicationManager

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The communication manager for the browser

Infinityc.Browser.props.connection
Name:

connection

Type:

Infinity.XmlConnection

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Connection to the server exposing the directory to browse

Infinityc.Browser.props.io
Name:

io

Type:

Infinity.Io

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The Infinity.Io to schedule timeouts