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.Ioto 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.Browseris an opaque data type. You should only access it via the public API functions.- 
classmethod new(io, comm_manager, connection)¶
- Parameters: - io (Infinity.Io) – AInfinity.Ioobject used to schedule timeouts.
- comm_manager (Infinity.CommunicationManager) – AInfinity.CommunicationManagerto register the server connection and which forwards incoming data to the browser or running sessions.
- connection (Infinity.XmlConnection) – Connection to the server.
 - Returns: - A new - Infinityc.Browser.- Return type: - Creates a new - Infinityc.Browser.
- io (
 - 
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.SessionProxyfor the chat, or- None.- Return type: - Infinityc.SessionProxyor- None- Returns the - Infinityc.SessionProxyrepresenting the running chat session if the local client is subscribed to it, or- Noneotherwise.
 - 
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.Requestor- None- Returns the - Infinity.Requestthat 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.SessionProxyfor the chat session. To initiate the request, call- Infinityc.Browser.subscribe_chat().
 - 
iter_get_sync_in(iter)¶
- Parameters: - iter ( - Infinity.BrowserIter) – A- Infinity.BrowserIterpointing to a note in self.- Returns: - A - Infinityc.SessionProxy, or- Noneif we are currently not synchronizing this node to the server.- Return type: - Infinityc.SessionProxyor- None- Returns the - Infinityc.SessionProxythat is used to synchronize the note iter points to to the server. Such a node is created by- Infinity.Browser.add_note() with non-- Nonesession 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.BrowserIterpointing to a subdirectory node in self.- Returns: - A list of - Infinity.Requests. Free with g_slist_free() when done.- Return type: - [ - Infinity.Request]- Returns a list of all - Infinity.Requests 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.BrowserIterreturned by one of the- Infinityc.Browserfunctions, it gets invalid however as soon as the node it points to is removed.
 - 
iter_save_session(iter, func, *user_data)¶
- Parameters: - iter (Infinity.BrowserIter) – AInfinity.BrowserIterpointing to a note in self.
- func (Infinity.RequestFunc) – The function to be called when the request finishes, orNone.
- user_data (objectorNone) – Additional data to pass to func.
 - Returns: - A - Infinity.Requestthat may be used to get notified when the request finishes or fails.- Return type: - 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 - Nonebeing returned. If the request does not finish within the function call, a- Infinity.Requestobject is returned, where func has been installed for the- Infinity.Request- ::finishedsignal, so that it is called as soon as the request finishes.
- iter (
 - 
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- Noneif there is no such plugin.
 - 
subscribe_chat(func, *user_data)¶
- Parameters: - func (Infinity.RequestFunc) – The function to be called when the request finishes, orNone.
- user_data (objectorNone) – Additional data to pass to func.
 - Returns: - A - Infinity.Requestthat may be used to get notified when the request finishes or fails.- Return type: - Attempts to subscribe to the server’s chat. When the operation finishes - Infinityc.Browser.get_chat_session() will return a- Infinityc.SessionProxyrepresenting 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 - Nonebeing returned. If the request does not finish within the function call, a- Infinity.Requestobject is returned, where func has been installed for the- Infinity.Request- ::finishedsignal, so that it is called as soon as the request finishes.
- func (
 
- 
classmethod 
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.Ioto schedule timeouts