Infinity.Browser¶
- Implementations:
None
Methods¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r |
The connectivity status of the browser |
Signals¶
Name |
Short Description |
---|---|
This signal is emitted whenever a new account is added to the browser, and the browser supports account list notification. |
|
This signal is emitted whenever an account is removed from the browser, and the browser supports account list notification. |
|
This signal is emitted whenever an ACL for the node iter points to are changed. |
|
This signal is emitted whenever the account into which the local host is logged into changes. |
|
This signal is emitted whenever a request is made with the browser. |
|
This signal is emitted whenever there was an asynchronous error with the browser itself which was not the result of a particular user request. |
|
This signal is emitted when a node is added to the browser. |
|
This signal is emitted just before a node is being removed from the browser. |
|
This signal is emitted whenever the browser is subscribed to a session. |
|
This signal is emitted whenever a session is detached from a browser node. |
Fields¶
None
Class Details¶
- class Infinity.Browser¶
- Bases:
- Structure:
Infinity.Browser
is an opaque data type. You should only access it via the public API functions.- acl_account_added(account, request)¶
- Parameters:
account (
Infinity.AclAccount
) – The newInfinity.AclAccount
.request (
Infinity.Request
) – TheInfinity.Request
that was used to add the account, orNone
.
This function emits the
Infinity.Browser
::acl-account-added
signal on self. It is meant to be used by interface implementations only.
- acl_account_removed(account, request)¶
- Parameters:
account (
Infinity.AclAccount
) – The removedInfinity.AclAccount
.request (
Infinity.Request
) – TheInfinity.Request
that was used to remove the account, orNone
.
This function emits the
Infinity.Browser
::acl-account-removed
signal on self. It is meant to be used by interface implementations only.
- acl_changed(iter, sheet_set, request)¶
- Parameters:
iter (
Infinity.BrowserIter
) – An iterator pointing to the node for which the ACL has changed.sheet_set (
Infinity.AclSheetSet
) – AInfinity.AclSheetSet
containing the changed ACL sheets.request (
Infinity.Request
) – TheInfinity.Request
that was used to change the ACL, orNone
.
This function emits the
Infinity.Browser
::acl-changed
signal on self. It is meant to be used by interface implementations only.
- acl_local_account_changed(account, request)¶
- Parameters:
account (
Infinity.AclAccount
) – The new localInfinity.AclAccount
.request (
Infinity.Request
) – TheInfinity.Request
that triggered the account change, orNone
.
This function emits the
Infinity.Browser
::acl-local-account-changed
signal on self. It is meant to be used by interface implementations only.
- add_note(iter, name, type, acl, session, initial_subscribe, func, *user_data)¶
- Parameters:
iter (
Infinity.BrowserIter
) – AInfinity.BrowserIter
pointing to a subdirectory node inside self.name (
str
) – The name of the node to add.type (
str
) – The type of the node to add.acl (
Infinity.AclSheetSet
orNone
) – AInfinity.AclSheetSet
representing the initial ACL for this node, orNone
.session (
Infinity.Session
orNone
) – AInfinity.Session
with a session of type type, orNone
.initial_subscribe (
bool
) – Whether to subscribe to the newly created session.func (
Infinity.RequestFunc
) – The function to be called when the request finishes, orNone
.user_data (
object
orNone
) – Additional data to pass to func.
- Returns:
A
Infinity.Request
which can be used to get notified when the request finishes.- Return type:
Adds a new leaf node to the browser. The new node is of type type. If session is non-
None
it will be used as the initial content of the new node, otherwise the new node will start empty. In the case of non-None
session the session must be in statusInfinity.SessionStatus.RUNNING
.The returned request finishes as soon as the creation of the node is acknowledged. It is however not guaranteed that the content of the note has been synchronized yet. In the case of a client connected to an infinote server the content is usually not transmitted when the request finishes. If an error in the process of transmission happens then the node will be removed again.
On the client side, the progress of synchronization to the server after the request has finished can be monitored with the
Infinity.Session
::synchronization-failed
,Infinity.Session
::synchronization-complete
andInfinity.Session
::synchronization-progress
signals. Note that a single session might be synchronized to multiple servers at the same time, you will have to check the connection parameter in the signal hander to find out to which server the session is synchronized.You can safely unref session after having called this function. If the request or the synchronization fails, the session will be discarded in that case. When the returned request finishes, you can use infc_browser_iter_get_sync_in() to get the session again.
If initial_subscribe is set, then, when the returned request finishes, you might call
Infinity.Browser.get_session
() on the resultingInfinity.BrowserIter
. However, that function is not guaranteed to return non-None
in this case since the node might have been created, but the subscription could have failed.The initial ACL for the new node is given by acl. If this parameter is
None
, then the default ACL is used, which inherits all permissions from the parent node. In order to apply non-None
ACL to the new node, theInfinity.AclSetting.CAN_SET_ACL
permission must be granted to the local entity for the node iter points to.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, aInfinity.Request
object is returned, where func has been installed for theInfinity.Request
::finished
signal, so that it is called as soon as the request finishes.
- add_subdirectory(iter, name, acl, func, *user_data)¶
- Parameters:
iter (
Infinity.BrowserIter
) – AInfinity.BrowserIter
pointing to a subdirectory node inside self.name (
str
) – The name of the node to add.acl (
Infinity.AclSheetSet
orNone
) – AInfinity.AclSheetSet
representing the initial ACL for this node, orNone
.func (
Infinity.RequestFunc
) – The function to be called when the request finishes, orNone
.user_data (
object
orNone
) – Additional data to pass to func.
- Returns:
A
Infinity.Request
which can be used to get notified when the request finishes.- Return type:
Adds a new subdirectory node to the browser.
The initial ACL for the new node is given by acl. If this parameter is
None
, then the default ACL is used, which inherits all permissions from the parent node. In order to apply non-None
ACL to the new node, theInfinity.AclSetting.CAN_SET_ACL
permission must be granted to the local entity for the node iter points to.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, aInfinity.Request
object is returned, where func has been installed for theInfinity.Request
::finished
signal, so that it is called as soon as the request finishes.
- begin_request(iter, request)¶
- Parameters:
iter (
Infinity.BrowserIter
) – A #infBrowserIter pointing to the node for which a request was made, orNone
.request (
Infinity.Request
) – The request which was made.
This function emits the #InfBrowser::begin_request signal on self. It is meant to be used by interface implementations only.
- check_acl(iter, account, check_mask)¶
- Parameters:
iter (
Infinity.BrowserIter
) – AInfinity.BrowserIter
pointing to a node in a browser.account (
int
) – The ID of the account whose permission to check, orNone
.check_mask (
Infinity.AclMask
) – A bitmask ofInfinity.AclSetting
s with permissions to check.
- Returns:
True
if all checked permissions are granted, orFalse
otherwise.- out_mask:
Output parameter with the granted permissions, or
None
.
- Return type:
(
bool
, out_mask:Infinity.AclMask
)
Checks whether the given account has permissions to perform the operations specified by mask on the node iter points to. The mask parameter should have all permissions enabled that are to be checked. The function will then write those permissions that are actually granted to the mask specified by the out_mask parameter.
The function returns
True
if all permissions asked for are granted, i.e. when out_mask equals mask after the function call. The out_mask parameter is allowed to beNone
which is useful if only the return value is of interest.In order for this function to work, the ACL sheet for account has to be available for the node iter points to and all of its parent nodes. If account is not the default or the local account, these need to be queried before using
Infinity.Browser.query_acl
().If account is 0, it is assumed that local access to the directory is available and the function always returns
True
.
- create_acl_account(crq, func, *user_data)¶
- Parameters:
crq (
InfGnutls.X509Crq
) – A certificate request.func (
Infinity.RequestFunc
) – The function to be called when the request finishes, orNone
.user_data (
object
orNone
) – Additional data to pass to func.
- Returns:
A
Infinity.Request
that can be used to get notified when the request finishes or fails.- Return type:
Requests creation of a new account. If the request succeeds, crq will be used by the server to create a certificate which is sent back to the client and is associated to the newly created account.
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, aInfinity.Request
object is returned, where func has been installed for theInfinity.Request
::finished
signal, so that it is called as soon as the request finishes.
- error(error)¶
- Parameters:
error (
GLib.Error
) – AGLib.Error
explaining what went wronig.
This function emits the
Infinity.Browser
::error
signal on self. It is meant to be used by interface implementations only.
- explore(iter, func, *user_data)¶
- Parameters:
iter (
Infinity.BrowserIter
) – AInfinity.BrowserIter
pointing to a subdirectory node inside self.func (
Infinity.RequestFunc
) – The function to be called when the request finishes, orNone
.user_data (
object
orNone
) – Additional data to pass to func.
- Returns:
A
Infinity.Request
, orNone
if iter points to a non-subdirectory node.- Return type:
Requests the node iter points to to be explored. Initally, subdirectory nodes are not explored, that is not known what content there is. Nodes can be explored to learn about the children nodes they contain.is a potentially lengthy process involing networking or I/O with slow devices this function returns a InfExploreRequest which can be used to monitor the progress of the operation and get notified when the exploration finishes. During exploration
Infinity.Browser
::node-added
signals are already emitted appropriately for every child explored inside iter.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, aInfinity.Request
object is returned, where func has been installed for theInfinity.Request
::finished
signal, so that it is called as soon as the request finishes.New in version exploring.
- get_acl(iter)¶
- Parameters:
iter (
Infinity.BrowserIter
) – An iterator pointing to a node for which to retrieve ACLs.- Returns:
A
Infinity.AclSheetSet
containing the requested ACL, orNone
. The returned value is owned by theInfinity.Browser
and should not be freed.- Return type:
Retrieves the ACL for the node iter points to. This function can also be called if the ACL has not been queried before using
Infinity.Browser.query_acl
(). In that case, the returned sheet set will only contain sheets for the default user and the local user. The function can returnNone
which is equivalent to an empty sheet set, i.e. no ACL.When the full ACL has been successfully queried with
Infinity.Browser.query_acl
(), the full ACL is returned by this function. The functionInfinity.Browser.has_acl
() can be used to check whether this function will return the full ACL or only the sheets for the default and local users.
- get_acl_default_account()¶
- Returns:
A
Infinity.AclAccount
. The returned value is owned by the browser and must not be freed.- Return type:
Returns the default
Infinity.AclAccount
representing unauthenticated users, and which is used to look up permissions if no permissions are explicitly specified in the ACL of a particular node for a particular account.
- get_acl_local_account()¶
- Returns:
A
Infinity.AclAccount
, orNone
. The returned value is owned by the browser and must not be freed.- Return type:
Returns the
Infinity.AclAccount
representing the local host. This can be used to check whether the local account is allowed to perform certain operations in the browser. The function can also returnNone
, in which case all operations are allowed, because the browser represents a local infinote directory.
- get_child(iter)¶
- Parameters:
iter (
Infinity.BrowserIter
) – AInfinity.BrowserIter
pointing to a subdirectory node inside self.- Returns:
True
if iter was moved orFalse
otherwise.- iter:
A
Infinity.BrowserIter
pointing to a subdirectory node inside self.
- Return type:
(
bool
, iter:Infinity.BrowserIter
)
Sets iter to point to the first child of the subdirectory node it currently points to. If the subdirectory does not contain any children or if iter does not point to a subdirectory the function returns
False
. This does not necessarily mean that there do not exist any children but it can also be that they have not yet been explored. Nodes can be explored withInfinity.Browser.explore
() and it can be checked whether a given node has been explored withInfinity.Browser.get_explored
().
- get_explored(iter)¶
- Parameters:
iter (
Infinity.BrowserIter
) – AInfinity.BrowserIter
pointing to a subdirectory node inside self.- Returns:
True
if the node iter points to has been explored orFalse
otherwise.- Return type:
Returns whether the node iter points to has already been explored or not.
- get_next(iter)¶
- Parameters:
iter (
Infinity.BrowserIter
) – AInfinity.BrowserIter
pointing to a node inside self.- Returns:
True
if iter was moved orFalse
otherwise.- iter:
A
Infinity.BrowserIter
pointing to a node inside self.
- Return type:
(
bool
, iter:Infinity.BrowserIter
)
Sets iter to point to its next sibling node. If iter points already to the last node then iter is left untouched and the function returns
False
.
- get_node_name(iter)¶
- Parameters:
iter (
Infinity.BrowserIter
) – AInfinity.BrowserIter
pointing to a node inside self.- Returns:
A string containing the node’s name.
- Return type:
Returns the name of the node iter points to.
- get_node_type(iter)¶
- Parameters:
iter (
Infinity.BrowserIter
) – AInfinity.BrowserIter
pointing to a leaf node inside self.- Returns:
The node type as a string.
- Return type:
Returns the type of the node iter points to.
- get_parent(iter)¶
- Parameters:
iter (
Infinity.BrowserIter
) – AInfinity.BrowserIter
pointing to a node inside self.- Returns:
True
if iter was moved orFalse
otherwise.- iter:
A
Infinity.BrowserIter
pointing to a node inside self.
- Return type:
(
bool
, iter:Infinity.BrowserIter
)
Sets iter to point to its parent node. If iter is already the root node then iter is left untouched and the function returns
False
.
- get_path(iter)¶
- Parameters:
iter (
Infinity.BrowserIter
) – AInfinity.BrowserIter
pointing to a node inside self.- Returns:
The path as a string. Free with
GLib.free
() when no longer needed.- Return type:
Returns the full path to the node iter points to. A path always starts with a ‘/’ and then has the name of the node and all its parents separated by ‘/’, much like a filesystem path on Unix.
- get_pending_request(iter, request_type)¶
- Parameters:
iter (
Infinity.BrowserIter
orNone
) – AInfinity.BrowserIter
pointing to a node inside self, orNone
.
- Returns:
A
Infinity.Request
, orNone
.- Return type:
Returns a pending request for the node iter points to which matches type request_type. If there is no such request the function returns
None
. This function is a shortcut for callingInfinity.Browser.list_pending_requests
() and retrieving the first item from the list.If iter is
None
the function returns a global request.For many request types, such as “subscribe-session”, “subscribe-chat”, “explore-node”, “query-user-list” or “query-acl” there can only be one request at a time, and therefore this function is more convenient to use than
Infinity.Browser.list_pending_requests
().
- get_prev(iter)¶
- Parameters:
iter (
Infinity.BrowserIter
) – AInfinity.BrowserIter
pointing to a node inside self.- Returns:
True
if iter was moved orFalse
otherwise.- iter:
A
Infinity.BrowserIter
pointing to a node inside self.
- Return type:
(
bool
, iter:Infinity.BrowserIter
)
Sets iter to point to its previous sibling node. If iter points to the first node already then iter is left untouched and the function returns
False
.
- get_root()¶
- Returns:
True
if iter was set orFalse
if there is no root node, i.e. the browser is not open.- iter:
An uninitialized
Infinity.BrowserIter
.
- Return type:
(
bool
, iter:Infinity.BrowserIter
)
Sets iter to point to the root node of self.
- get_session(iter)¶
- Parameters:
iter (
Infinity.BrowserIter
) – AInfinity.BrowserIter
pointing to a leaf node inside self.- Returns:
A InfSessionProxy which contains the session. The proxy object can be used to join a user into the session.
- Return type:
Returns the session which has the content of the node iter points to. The session needs to be subscribed to, see
Infinity.Browser.subscribe
(). If the session is not subscribed or the subscription request has not yet finished the function returnsNone
.
- has_acl(iter, account)¶
- Parameters:
iter (
Infinity.BrowserIter
) – An iterator pointing to a node for which to check full ACL availability.account (
int
) – The account to check ACL availability for, or 0.
- Returns:
True
when the ACL sheet for account is available orFalse
otherwise.- Return type:
This function returns whether the ACL sheet for the given account is available or not. If the function returns
False
thenInfinity.Browser.query_acl
() can be called in order to retrieve the full ACL. If account is 0, the function checks whether the full ACL is available, i.e. the ACL sheets for all accounts. Usually the ACL sheets for the default account and the local account are always available.
- is_ancestor(ancestor, iter)¶
- Parameters:
ancestor (
Infinity.BrowserIter
) – An iterator pointing to the ancestor node.iter (
Infinity.BrowserIter
) – An iterator pointing to the node to be checked.
- Returns:
Whether ancestor is an ancestor of iter.
- Return type:
Returns whether ancestor is an ancestor of iter, i.e. either the two iterators point to the same node or ancestor is a parent, grand-parent, grand-grand-parent, etc. of the node iter points to.
- is_subdirectory(iter)¶
- Parameters:
iter (
Infinity.BrowserIter
) – AInfinity.BrowserIter
pointing to a node inside self.- Returns:
True
if the node iter points to is a subdirectory node orFalse
otherwise.- Return type:
Returns whether the node iter points to is a subdirectory node.
- iter_from_request(request)¶
- Parameters:
request (
Infinity.Request
) – AInfinity.Request
which has not yet finished and which was issued by self.- Returns:
True
if iter was moved orFalse
otherwise.- iter:
An uninitialized
Infinity.BrowserIter
.
- Return type:
(
bool
, iter:Infinity.BrowserIter
)
Sets iter to the node for which request was made. If that node does not exist anymore or if request has already finished the function returns
False
and iter is left untouched.
- list_pending_requests(iter, request_type)¶
- Parameters:
iter (
Infinity.BrowserIter
orNone
) – AInfinity.BrowserIter
pointing to a node inside self, orNone
.request_type (
str
orNone
) – The type of request to return pending requests for, orNone
.
- Returns:
A list of
Infinity.Request
s. Free with g_slist_free() when no longer needed.- Return type:
Returns a list of all pending requests for the node iter points to which match type request_type. A pending request is a request which has been created but has not yet finished. request_type can be
None
in which case all requests for the given node are returned. If it is non-None
only requests which match the given type are included in the list of returned requests.If iter is
None
then the function returns all pending global requests.
- lookup_acl_account_by_name(name, func, *user_data)¶
- Parameters:
name (
str
) – The name of the user account to look up.func (
Infinity.RequestFunc
) – The function to be called when the request finishes, orNone
.user_data (
object
orNone
) – Additional data to pass to func.
- Returns:
A
Infinity.Request
that can be used to be notified when the request finishes, orNone
.- Return type:
Looks up the account(s) with the given name. While in principal, there can be many accounts with the same name, in practise user names are often unique.
The request result contains an array of
Infinity.AclAccount
objects, all with the same name. If there is only one entry with ID set to 0, there are no accounts with the given name.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, aInfinity.Request
object is returned, where func has been installed for theInfinity.Request
::finished
signal, so that it is called as soon as the request finishes.
- lookup_acl_accounts(ids, func, *user_data)¶
- Parameters:
ids ([
int
]) – An array of account IDs to look up.func (
Infinity.RequestFunc
) – The function to be called when the request finishes, orNone
.user_data (
object
orNone
) – Additional data to pass to func.
- Returns:
A
Infinity.Request
that can be used to be notified when the request finishes, orNone
.- Return type:
Looks up the accounts with the given IDs. If the account list has been queried with
Infinity.Browser.query_acl_account_list
() before, then it is likely that this function returns instantly, otherwise an asynchronous operation might be started.The request result contains an array of
Infinity.AclAccount
objects for the given account IDs, which contain the account names as well. If one account ID does not belong to an actual account, the Infinity.AclAccount.name field will beNone
.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, aInfinity.Request
object is returned, where func has been installed for theInfinity.Request
::finished
signal, so that it is called as soon as the request finishes.
- node_added(iter, request)¶
- Parameters:
iter (
Infinity.BrowserIter
) – AInfinity.BrowserIter
pointing to the newly added node.request (
Infinity.Request
) – TheInfinity.Request
that was used to add or explore the node, orNone
.
This function emits the
Infinity.Browser
::node-added
signal on self. It is meant to be used by interface implementations only.
- node_removed(iter, request)¶
- Parameters:
iter (
Infinity.BrowserIter
) – AInfinity.BrowserIter
pointing to the node to be removed.request (
Infinity.Request
) – TheInfinity.Request
that was used to delete the node, orNone
.
This function emits the
Infinity.Browser
::node-removed
signal on self. It is meant to be used by interface implementations only.
- query_acl(iter, func, *user_data)¶
- Parameters:
iter (
Infinity.BrowserIter
) – An iterator pointing to a node for which to query the ACLs.func (
Infinity.RequestFunc
) – The function to be called when the request finishes, orNone
.user_data (
object
orNone
) – Additional data to pass to func.
- Returns:
A
Infinity.Request
which can be used to be notified when the request finishes.- Return type:
Queries the ACLs for all users of the node iter points to. When the request has finished,
Infinity.Browser.get_acl
() can be used to retrieve the ACLs.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, aInfinity.Request
object is returned, where func has been installed for theInfinity.Request
::finished
signal, so that it is called as soon as the request finishes.
- query_acl_account_list(func, *user_data)¶
- Parameters:
func (
Infinity.RequestFunc
) – The function to be called when the request finishes, orNone
.user_data (
object
orNone
) – Additional data to pass to func.
- Returns:
A
Infinity.Request
that can be used to be notified when the request finishes, orNone
.- Return type:
Queries the list of accounts in self. When this call has finished, a list of accounts is available, and also a flag whether the browser supports notification of accounts. If it does, then the
Infinity.Browser
::acl-account-added
andInfinity.Browser
::acl-account-removed
signals are emitted when the account list changes, and the next time this function is called, it might be available to serve the account list from the cache without blocking.It can also be that the browser does not support listing of accounts at all. In this case, the request will fail with an error code of
Infinity.DirectoryError.OPERATION_UNSUPPORTED
.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, aInfinity.Request
object is returned, where func has been installed for theInfinity.Request
::finished
signal, so that it is called as soon as the request finishes.
- remove_acl_account(account, func, *user_data)¶
- Parameters:
account (
int
) – The ID of the account to remove.func (
Infinity.RequestFunc
) – The function to be called when the request finishes, orNone
.user_data (
object
orNone
) – Additional data to pass to func.
- Returns:
A
Infinity.Request
that can be used to get notified when the request finishes or fails.- Return type:
Requests deletion of the given account.
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, aInfinity.Request
object is returned, where func has been installed for theInfinity.Request
::finished
signal, so that it is called as soon as the request finishes.
- remove_node(iter, func, *user_data)¶
- Parameters:
iter (
Infinity.BrowserIter
) – AInfinity.BrowserIter
pointing to a node inside self.func (
Infinity.RequestFunc
) – The function to be called when the request finishes, orNone
.user_data (
object
orNone
) – Additional data to pass to func.
- Returns:
A
Infinity.Request
which can be used to get notified when the request finishes.- Return type:
Requests to remove the node iter points to. It may point to a subdirectory node in which case all its children are removed recursively as well.
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, aInfinity.Request
object is returned, where func has been installed for theInfinity.Request
::finished
signal, so that it is called as soon as the request finishes.
- set_acl(iter, sheet_set, func, *user_data)¶
- Parameters:
iter (
Infinity.BrowserIter
) – An iterator pointing to the node for which to change ACLs.sheet_set (
Infinity.AclSheetSet
) – AnInfinity.AclSheetSet
with the sheets to update.func (
Infinity.RequestFunc
) – The function to be called when the request finishes, orNone
.user_data (
object
orNone
) – Additional data to pass to func.
- Returns:
A
Infinity.Request
which can be used to be notified when the request finishes.- Return type:
Changes the ACLs for the node iter points to. Existing sheets that are not in sheet_set are left untouched. This operation is only allowed when the ACL for the node iter points to has been retrieved already with
Infinity.Browser.query_acl
(). UseInfinity.Browser.has_acl
() to check whether this function can be called or whether the ACL needs to be queried first.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, aInfinity.Request
object is returned, where func has been installed for theInfinity.Request
::finished
signal, so that it is called as soon as the request finishes.
- subscribe(iter, func, *user_data)¶
- Parameters:
iter (
Infinity.BrowserIter
) – AInfinity.BrowserIter
pointing to a leaf node inside self.func (
Infinity.RequestFunc
) – The function to be called when the request finishes, orNone
.user_data (
object
orNone
) – Additional data to pass to func.
- Returns:
A
Infinity.Request
which can be used to get notified when the request finishes.- Return type:
Attempts to subscribe to the node iter points to, i.e. obtain a
Infinity.Session
representing its content. This also allows to change the content of the node.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, aInfinity.Request
object is returned, where func has been installed for theInfinity.Request
::finished
signal, so that it is called as soon as the request finishes.
- subscribe_session(iter, proxy, request)¶
- Parameters:
iter (
Infinity.BrowserIter
) – AInfinity.BrowserIter
pointing to the node to whose session a subscription was made, orNone
.proxy (
Infinity.SessionProxy
) – A session proxy for the newly subscribed session.request (
Infinity.Request
) – TheInfinity.Request
that was used to initiate the subscription, orNone
.
This function emits the
Infinity.Browser
::subscribe-session
signal on self. It is meant to be used by interface implementations only.
- unsubscribe_session(iter, proxy, request)¶
- Parameters:
iter (
Infinity.BrowserIter
) – AInfinity.BrowserIter
pointing to the node to whose session the subscription was removed, orNone
.proxy (
Infinity.SessionProxy
) – A session proxy for the unsubscribed session.request (
Infinity.Request
) – TheInfinity.Request
due to which the session was unsubscribed, orNone
.
This function emits the
Infinity.Browser
::unsubscribe-session
signal on self. It is meant to be used by interface implementations only.
- do_acl_account_added(account, request) virtual¶
- Parameters:
account (
Infinity.AclAccount
) – The newInfinity.AclAccount
.request (
Infinity.Request
) – TheInfinity.Request
that was used to add the account, orNone
.
This function emits the
Infinity.Browser
::acl-account-added
signal on browser. It is meant to be used by interface implementations only.
- do_acl_account_removed(account, request) virtual¶
- Parameters:
account (
Infinity.AclAccount
) – The removedInfinity.AclAccount
.request (
Infinity.Request
) – TheInfinity.Request
that was used to remove the account, orNone
.
This function emits the
Infinity.Browser
::acl-account-removed
signal on browser. It is meant to be used by interface implementations only.
- do_acl_changed(iter, sheet_set, request) virtual¶
- Parameters:
iter (
Infinity.BrowserIter
) – An iterator pointing to the node for which the ACL has changed.sheet_set (
Infinity.AclSheetSet
) – AInfinity.AclSheetSet
containing the changed ACL sheets.request (
Infinity.Request
) – TheInfinity.Request
that was used to change the ACL, orNone
.
This function emits the
Infinity.Browser
::acl-changed
signal on browser. It is meant to be used by interface implementations only.
- do_acl_local_account_changed(account, request) virtual¶
- Parameters:
account (
Infinity.AclAccount
) – The new localInfinity.AclAccount
.request (
Infinity.Request
) – TheInfinity.Request
that triggered the account change, orNone
.
This function emits the
Infinity.Browser
::acl-local-account-changed
signal on browser. It is meant to be used by interface implementations only.
- do_add_note(iter, name, type, acl, session, initial_subscribe, func, *user_data) virtual¶
- Parameters:
iter (
Infinity.BrowserIter
) – AInfinity.BrowserIter
pointing to a subdirectory node inside browser.name (
str
) – The name of the node to add.type (
str
) – The type of the node to add.acl (
Infinity.AclSheetSet
orNone
) – AInfinity.AclSheetSet
representing the initial ACL for this node, orNone
.session (
Infinity.Session
orNone
) – AInfinity.Session
with a session of type type, orNone
.initial_subscribe (
bool
) – Whether to subscribe to the newly created session.func (
Infinity.RequestFunc
) – The function to be called when the request finishes, orNone
.user_data (
object
orNone
) – Additional data to pass to func.
- Returns:
A
Infinity.Request
which can be used to get notified when the request finishes.- Return type:
Adds a new leaf node to the browser. The new node is of type type. If session is non-
None
it will be used as the initial content of the new node, otherwise the new node will start empty. In the case of non-None
session the session must be in statusInfinity.SessionStatus.RUNNING
.The returned request finishes as soon as the creation of the node is acknowledged. It is however not guaranteed that the content of the note has been synchronized yet. In the case of a client connected to an infinote server the content is usually not transmitted when the request finishes. If an error in the process of transmission happens then the node will be removed again.
On the client side, the progress of synchronization to the server after the request has finished can be monitored with the
Infinity.Session
::synchronization-failed
,Infinity.Session
::synchronization-complete
andInfinity.Session
::synchronization-progress
signals. Note that a single session might be synchronized to multiple servers at the same time, you will have to check the connection parameter in the signal hander to find out to which server the session is synchronized.You can safely unref session after having called this function. If the request or the synchronization fails, the session will be discarded in that case. When the returned request finishes, you can use infc_browser_iter_get_sync_in() to get the session again.
If initial_subscribe is set, then, when the returned request finishes, you might call
Infinity.Browser.get_session
() on the resultingInfinity.BrowserIter
. However, that function is not guaranteed to return non-None
in this case since the node might have been created, but the subscription could have failed.The initial ACL for the new node is given by acl. If this parameter is
None
, then the default ACL is used, which inherits all permissions from the parent node. In order to apply non-None
ACL to the new node, theInfinity.AclSetting.CAN_SET_ACL
permission must be granted to the local entity for the node iter points to.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, aInfinity.Request
object is returned, where func has been installed for theInfinity.Request
::finished
signal, so that it is called as soon as the request finishes.
- do_add_subdirectory(iter, name, acl, func, *user_data) virtual¶
- Parameters:
iter (
Infinity.BrowserIter
) – AInfinity.BrowserIter
pointing to a subdirectory node inside browser.name (
str
) – The name of the node to add.acl (
Infinity.AclSheetSet
orNone
) – AInfinity.AclSheetSet
representing the initial ACL for this node, orNone
.func (
Infinity.RequestFunc
) – The function to be called when the request finishes, orNone
.user_data (
object
orNone
) – Additional data to pass to func.
- Returns:
A
Infinity.Request
which can be used to get notified when the request finishes.- Return type:
Adds a new subdirectory node to the browser.
The initial ACL for the new node is given by acl. If this parameter is
None
, then the default ACL is used, which inherits all permissions from the parent node. In order to apply non-None
ACL to the new node, theInfinity.AclSetting.CAN_SET_ACL
permission must be granted to the local entity for the node iter points to.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, aInfinity.Request
object is returned, where func has been installed for theInfinity.Request
::finished
signal, so that it is called as soon as the request finishes.
- do_begin_request(iter, request) virtual¶
- Parameters:
iter (
Infinity.BrowserIter
) – A #infBrowserIter pointing to the node for which a request was made, orNone
.request (
Infinity.Request
) – The request which was made.
This function emits the #InfBrowser::begin_request signal on browser. It is meant to be used by interface implementations only.
- do_create_acl_account(crq, func, *user_data) virtual¶
- Parameters:
crq (
InfGnutls.X509Crq
) – A certificate request.func (
Infinity.RequestFunc
) – The function to be called when the request finishes, orNone
.user_data (
object
orNone
) – Additional data to pass to func.
- Returns:
A
Infinity.Request
that can be used to get notified when the request finishes or fails.- Return type:
Requests creation of a new account. If the request succeeds, crq will be used by the server to create a certificate which is sent back to the client and is associated to the newly created account.
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, aInfinity.Request
object is returned, where func has been installed for theInfinity.Request
::finished
signal, so that it is called as soon as the request finishes.
- do_error(error) virtual¶
- Parameters:
error (
GLib.Error
) – AGLib.Error
explaining what went wronig.
This function emits the
Infinity.Browser
::error
signal on browser. It is meant to be used by interface implementations only.
- do_explore(iter, func, *user_data) virtual¶
- Parameters:
iter (
Infinity.BrowserIter
) – AInfinity.BrowserIter
pointing to a subdirectory node inside browser.func (
Infinity.RequestFunc
) – The function to be called when the request finishes, orNone
.user_data (
object
orNone
) – Additional data to pass to func.
- Returns:
A
Infinity.Request
, orNone
if iter points to a non-subdirectory node.- Return type:
Requests the node iter points to to be explored. Initally, subdirectory nodes are not explored, that is not known what content there is. Nodes can be explored to learn about the children nodes they contain.is a potentially lengthy process involing networking or I/O with slow devices this function returns a InfExploreRequest which can be used to monitor the progress of the operation and get notified when the exploration finishes. During exploration
Infinity.Browser
::node-added
signals are already emitted appropriately for every child explored inside iter.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, aInfinity.Request
object is returned, where func has been installed for theInfinity.Request
::finished
signal, so that it is called as soon as the request finishes.New in version exploring.
- do_get_acl(iter) virtual¶
- Parameters:
iter (
Infinity.BrowserIter
) – An iterator pointing to a node for which to retrieve ACLs.- Returns:
A
Infinity.AclSheetSet
containing the requested ACL, orNone
. The returned value is owned by theInfinity.Browser
and should not be freed.- Return type:
Retrieves the ACL for the node iter points to. This function can also be called if the ACL has not been queried before using
Infinity.Browser.query_acl
(). In that case, the returned sheet set will only contain sheets for the default user and the local user. The function can returnNone
which is equivalent to an empty sheet set, i.e. no ACL.When the full ACL has been successfully queried with
Infinity.Browser.query_acl
(), the full ACL is returned by this function. The functionInfinity.Browser.has_acl
() can be used to check whether this function will return the full ACL or only the sheets for the default and local users.
- do_get_acl_default_account() virtual¶
- Returns:
A
Infinity.AclAccount
. The returned value is owned by the browser and must not be freed.- Return type:
Returns the default
Infinity.AclAccount
representing unauthenticated users, and which is used to look up permissions if no permissions are explicitly specified in the ACL of a particular node for a particular account.
- do_get_acl_local_account() virtual¶
- Returns:
A
Infinity.AclAccount
, orNone
. The returned value is owned by the browser and must not be freed.- Return type:
Returns the
Infinity.AclAccount
representing the local host. This can be used to check whether the local account is allowed to perform certain operations in the browser. The function can also returnNone
, in which case all operations are allowed, because the browser represents a local infinote directory.
- do_get_child(iter) virtual¶
- Parameters:
iter (
Infinity.BrowserIter
) – AInfinity.BrowserIter
pointing to a subdirectory node inside browser.- Returns:
True
if iter was moved orFalse
otherwise.- iter:
A
Infinity.BrowserIter
pointing to a subdirectory node inside browser.
- Return type:
(
bool
, iter:Infinity.BrowserIter
)
Sets iter to point to the first child of the subdirectory node it currently points to. If the subdirectory does not contain any children or if iter does not point to a subdirectory the function returns
False
. This does not necessarily mean that there do not exist any children but it can also be that they have not yet been explored. Nodes can be explored withInfinity.Browser.explore
() and it can be checked whether a given node has been explored withInfinity.Browser.get_explored
().
- do_get_explored(iter) virtual¶
- Parameters:
iter (
Infinity.BrowserIter
) – AInfinity.BrowserIter
pointing to a subdirectory node inside browser.- Returns:
True
if the node iter points to has been explored orFalse
otherwise.- Return type:
Returns whether the node iter points to has already been explored or not.
- do_get_next(iter) virtual¶
- Parameters:
iter (
Infinity.BrowserIter
) – AInfinity.BrowserIter
pointing to a node inside browser.- Returns:
True
if iter was moved orFalse
otherwise.- iter:
A
Infinity.BrowserIter
pointing to a node inside browser.
- Return type:
(
bool
, iter:Infinity.BrowserIter
)
Sets iter to point to its next sibling node. If iter points already to the last node then iter is left untouched and the function returns
False
.
- do_get_node_name(iter) virtual¶
- Parameters:
iter (
Infinity.BrowserIter
) – AInfinity.BrowserIter
pointing to a node inside browser.- Returns:
A string containing the node’s name.
- Return type:
Returns the name of the node iter points to.
- do_get_node_type(iter) virtual¶
- Parameters:
iter (
Infinity.BrowserIter
) – AInfinity.BrowserIter
pointing to a leaf node inside browser.- Returns:
The node type as a string.
- Return type:
Returns the type of the node iter points to.
- do_get_parent(iter) virtual¶
- Parameters:
iter (
Infinity.BrowserIter
) – AInfinity.BrowserIter
pointing to a node inside browser.- Returns:
True
if iter was moved orFalse
otherwise.- iter:
A
Infinity.BrowserIter
pointing to a node inside browser.
- Return type:
(
bool
, iter:Infinity.BrowserIter
)
Sets iter to point to its parent node. If iter is already the root node then iter is left untouched and the function returns
False
.
- do_get_prev(iter) virtual¶
- Parameters:
iter (
Infinity.BrowserIter
) – AInfinity.BrowserIter
pointing to a node inside browser.- Returns:
True
if iter was moved orFalse
otherwise.- iter:
A
Infinity.BrowserIter
pointing to a node inside browser.
- Return type:
(
bool
, iter:Infinity.BrowserIter
)
Sets iter to point to its previous sibling node. If iter points to the first node already then iter is left untouched and the function returns
False
.
- do_get_root() virtual¶
- Returns:
True
if iter was set orFalse
if there is no root node, i.e. the browser is not open.- iter:
An uninitialized
Infinity.BrowserIter
.
- Return type:
(
bool
, iter:Infinity.BrowserIter
)
Sets iter to point to the root node of browser.
- do_get_session(iter) virtual¶
- Parameters:
iter (
Infinity.BrowserIter
) – AInfinity.BrowserIter
pointing to a leaf node inside browser.- Returns:
A InfSessionProxy which contains the session. The proxy object can be used to join a user into the session.
- Return type:
Returns the session which has the content of the node iter points to. The session needs to be subscribed to, see
Infinity.Browser.subscribe
(). If the session is not subscribed or the subscription request has not yet finished the function returnsNone
.
- do_has_acl(iter, account) virtual¶
- Parameters:
iter (
Infinity.BrowserIter
) – An iterator pointing to a node for which to check full ACL availability.account (
int
) – The account to check ACL availability for, or 0.
- Returns:
True
when the ACL sheet for account is available orFalse
otherwise.- Return type:
This function returns whether the ACL sheet for the given account is available or not. If the function returns
False
thenInfinity.Browser.query_acl
() can be called in order to retrieve the full ACL. If account is 0, the function checks whether the full ACL is available, i.e. the ACL sheets for all accounts. Usually the ACL sheets for the default account and the local account are always available.
- do_is_subdirectory(iter) virtual¶
- Parameters:
iter (
Infinity.BrowserIter
) – AInfinity.BrowserIter
pointing to a node inside browser.- Returns:
True
if the node iter points to is a subdirectory node orFalse
otherwise.- Return type:
Returns whether the node iter points to is a subdirectory node.
- do_iter_from_request(request) virtual¶
- Parameters:
request (
Infinity.Request
) – AInfinity.Request
which has not yet finished and which was issued by browser.- Returns:
True
if iter was moved orFalse
otherwise.- iter:
An uninitialized
Infinity.BrowserIter
.
- Return type:
(
bool
, iter:Infinity.BrowserIter
)
Sets iter to the node for which request was made. If that node does not exist anymore or if request has already finished the function returns
False
and iter is left untouched.
- do_list_pending_requests(iter, request_type) virtual¶
- Parameters:
iter (
Infinity.BrowserIter
orNone
) – AInfinity.BrowserIter
pointing to a node inside browser, orNone
.request_type (
str
orNone
) – The type of request to return pending requests for, orNone
.
- Returns:
A list of
Infinity.Request
s. Free with g_slist_free() when no longer needed.- Return type:
Returns a list of all pending requests for the node iter points to which match type request_type. A pending request is a request which has been created but has not yet finished. request_type can be
None
in which case all requests for the given node are returned. If it is non-None
only requests which match the given type are included in the list of returned requests.If iter is
None
then the function returns all pending global requests.
- do_lookup_acl_account_by_name(name, func, *user_data) virtual¶
- Parameters:
name (
str
) – The name of the user account to look up.func (
Infinity.RequestFunc
) – The function to be called when the request finishes, orNone
.user_data (
object
orNone
) – Additional data to pass to func.
- Returns:
A
Infinity.Request
that can be used to be notified when the request finishes, orNone
.- Return type:
Looks up the account(s) with the given name. While in principal, there can be many accounts with the same name, in practise user names are often unique.
The request result contains an array of
Infinity.AclAccount
objects, all with the same name. If there is only one entry with ID set to 0, there are no accounts with the given name.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, aInfinity.Request
object is returned, where func has been installed for theInfinity.Request
::finished
signal, so that it is called as soon as the request finishes.
- do_lookup_acl_accounts(ids, func, *user_data) virtual¶
- Parameters:
ids ([
int
]) – An array of account IDs to look up.func (
Infinity.RequestFunc
) – The function to be called when the request finishes, orNone
.user_data (
object
orNone
) – Additional data to pass to func.
- Returns:
A
Infinity.Request
that can be used to be notified when the request finishes, orNone
.- Return type:
Looks up the accounts with the given IDs. If the account list has been queried with
Infinity.Browser.query_acl_account_list
() before, then it is likely that this function returns instantly, otherwise an asynchronous operation might be started.The request result contains an array of
Infinity.AclAccount
objects for the given account IDs, which contain the account names as well. If one account ID does not belong to an actual account, the Infinity.AclAccount.name field will beNone
.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, aInfinity.Request
object is returned, where func has been installed for theInfinity.Request
::finished
signal, so that it is called as soon as the request finishes.
- do_node_added(iter, request) virtual¶
- Parameters:
iter (
Infinity.BrowserIter
) – AInfinity.BrowserIter
pointing to the newly added node.request (
Infinity.Request
) – TheInfinity.Request
that was used to add or explore the node, orNone
.
This function emits the
Infinity.Browser
::node-added
signal on browser. It is meant to be used by interface implementations only.
- do_node_removed(iter, request) virtual¶
- Parameters:
iter (
Infinity.BrowserIter
) – AInfinity.BrowserIter
pointing to the node to be removed.request (
Infinity.Request
) – TheInfinity.Request
that was used to delete the node, orNone
.
This function emits the
Infinity.Browser
::node-removed
signal on browser. It is meant to be used by interface implementations only.
- do_query_acl(iter, func, *user_data) virtual¶
- Parameters:
iter (
Infinity.BrowserIter
) – An iterator pointing to a node for which to query the ACLs.func (
Infinity.RequestFunc
) – The function to be called when the request finishes, orNone
.user_data (
object
orNone
) – Additional data to pass to func.
- Returns:
A
Infinity.Request
which can be used to be notified when the request finishes.- Return type:
Queries the ACLs for all users of the node iter points to. When the request has finished,
Infinity.Browser.get_acl
() can be used to retrieve the ACLs.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, aInfinity.Request
object is returned, where func has been installed for theInfinity.Request
::finished
signal, so that it is called as soon as the request finishes.
- do_query_acl_account_list(func, *user_data) virtual¶
- Parameters:
func (
Infinity.RequestFunc
) – The function to be called when the request finishes, orNone
.user_data (
object
orNone
) – Additional data to pass to func.
- Returns:
A
Infinity.Request
that can be used to be notified when the request finishes, orNone
.- Return type:
Queries the list of accounts in browser. When this call has finished, a list of accounts is available, and also a flag whether the browser supports notification of accounts. If it does, then the
Infinity.Browser
::acl-account-added
andInfinity.Browser
::acl-account-removed
signals are emitted when the account list changes, and the next time this function is called, it might be available to serve the account list from the cache without blocking.It can also be that the browser does not support listing of accounts at all. In this case, the request will fail with an error code of
Infinity.DirectoryError.OPERATION_UNSUPPORTED
.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, aInfinity.Request
object is returned, where func has been installed for theInfinity.Request
::finished
signal, so that it is called as soon as the request finishes.
- do_remove_acl_account(account, func, *user_data) virtual¶
- Parameters:
account (
int
) – The ID of the account to remove.func (
Infinity.RequestFunc
) – The function to be called when the request finishes, orNone
.user_data (
object
orNone
) – Additional data to pass to func.
- Returns:
A
Infinity.Request
that can be used to get notified when the request finishes or fails.- Return type:
Requests deletion of the given account.
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, aInfinity.Request
object is returned, where func has been installed for theInfinity.Request
::finished
signal, so that it is called as soon as the request finishes.
- do_remove_node(iter, func, *user_data) virtual¶
- Parameters:
iter (
Infinity.BrowserIter
) – AInfinity.BrowserIter
pointing to a node inside browser.func (
Infinity.RequestFunc
) – The function to be called when the request finishes, orNone
.user_data (
object
orNone
) – Additional data to pass to func.
- Returns:
A
Infinity.Request
which can be used to get notified when the request finishes.- Return type:
Requests to remove the node iter points to. It may point to a subdirectory node in which case all its children are removed recursively as well.
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, aInfinity.Request
object is returned, where func has been installed for theInfinity.Request
::finished
signal, so that it is called as soon as the request finishes.
- do_set_acl(iter, sheet_set, func, *user_data) virtual¶
- Parameters:
iter (
Infinity.BrowserIter
) – An iterator pointing to the node for which to change ACLs.sheet_set (
Infinity.AclSheetSet
) – AnInfinity.AclSheetSet
with the sheets to update.func (
Infinity.RequestFunc
) – The function to be called when the request finishes, orNone
.user_data (
object
orNone
) – Additional data to pass to func.
- Returns:
A
Infinity.Request
which can be used to be notified when the request finishes.- Return type:
Changes the ACLs for the node iter points to. Existing sheets that are not in sheet_set are left untouched. This operation is only allowed when the ACL for the node iter points to has been retrieved already with
Infinity.Browser.query_acl
(). UseInfinity.Browser.has_acl
() to check whether this function can be called or whether the ACL needs to be queried first.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, aInfinity.Request
object is returned, where func has been installed for theInfinity.Request
::finished
signal, so that it is called as soon as the request finishes.
- do_subscribe(iter, func, *user_data) virtual¶
- Parameters:
iter (
Infinity.BrowserIter
) – AInfinity.BrowserIter
pointing to a leaf node inside browser.func (
Infinity.RequestFunc
) – The function to be called when the request finishes, orNone
.user_data (
object
orNone
) – Additional data to pass to func.
- Returns:
A
Infinity.Request
which can be used to get notified when the request finishes.- Return type:
Attempts to subscribe to the node iter points to, i.e. obtain a
Infinity.Session
representing its content. This also allows to change the content of the node.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, aInfinity.Request
object is returned, where func has been installed for theInfinity.Request
::finished
signal, so that it is called as soon as the request finishes.
- do_subscribe_session(iter, proxy, request) virtual¶
- Parameters:
iter (
Infinity.BrowserIter
) – AInfinity.BrowserIter
pointing to the node to whose session a subscription was made, orNone
.proxy (
Infinity.SessionProxy
) – A session proxy for the newly subscribed session.request (
Infinity.Request
) – TheInfinity.Request
that was used to initiate the subscription, orNone
.
This function emits the
Infinity.Browser
::subscribe-session
signal on browser. It is meant to be used by interface implementations only.
- do_unsubscribe_session(iter, proxy, request) virtual¶
- Parameters:
iter (
Infinity.BrowserIter
) – AInfinity.BrowserIter
pointing to the node to whose session the subscription was removed, orNone
.proxy (
Infinity.SessionProxy
) – A session proxy for the unsubscribed session.request (
Infinity.Request
) – TheInfinity.Request
due to which the session was unsubscribed, orNone
.
This function emits the
Infinity.Browser
::unsubscribe-session
signal on browser. It is meant to be used by interface implementations only.
Signal Details¶
- Infinity.Browser.signals.acl_account_added(browser, account, request)¶
- Signal Name:
acl-account-added
- Flags:
- Parameters:
browser (
Infinity.Browser
) – The object which received the signalaccount (
Infinity.AclAccount
) – The newInfinity.AclAccount
.request (
Infinity.Request
) – The request which lead to the newly added account, orNone
.
This signal is emitted whenever a new account is added to the browser, and the browser supports account list notification.
- Infinity.Browser.signals.acl_account_removed(browser, account, request)¶
- Signal Name:
acl-account-removed
- Flags:
- Parameters:
browser (
Infinity.Browser
) – The object which received the signalaccount (
Infinity.AclAccount
) – The removedInfinity.AclAccount
.request (
Infinity.Request
) – The request which lead to the removal of the account, orNone
.
This signal is emitted whenever an account is removed from the browser, and the browser supports account list notification.
- Infinity.Browser.signals.acl_changed(browser, iter, sheet_set, request)¶
- Signal Name:
acl-changed
- Flags:
- Parameters:
browser (
Infinity.Browser
) – The object which received the signaliter (
Infinity.BrowserIter
) – An iterator pointing to the node for which the ACL has changed.sheet_set (
Infinity.AclSheetSet
) – AInfinity.AclSheetSet
containing the changed ACL sheets.request (
Infinity.Request
) – The request which lead to the ACL being changed, orNone
.
This signal is emitted whenever an ACL for the node iter points to are changed. This signal is emitted whenever the ACL change for the local user, the default user, or for a node that all ACLs have been queried with
Infinity.Browser.query_acl
().The sheet_set parameter contains only the ACL sheets that have changed. In order to get the new full sheet set, call
Infinity.Browser.get_acl
().
- Infinity.Browser.signals.acl_local_account_changed(browser, account, request)¶
- Signal Name:
acl-local-account-changed
- Flags:
- Parameters:
browser (
Infinity.Browser
) – The object which received the signalaccount (
Infinity.AclAccount
) – The new localInfinity.AclAccount
.request (
Infinity.Request
) – The request which triggered the account change, orNone
.
This signal is emitted whenever the account into which the local host is logged into changes. This can happen for example on a delayed login, or when the current account is deleted from the server in which case the host is demoted to the default account.
- Infinity.Browser.signals.begin_request(browser, iter, request)¶
- Signal Name:
begin-request
- Flags:
- Parameters:
browser (
Infinity.Browser
) – The object which received the signaliter (
Infinity.BrowserIter
) – An iterator pointing to the node for which a request is made, orNone
.request (
Infinity.Request
) – The request being made.
This signal is emitted whenever a request is made with the browser. The signal is detailed with the request type, so that it is possible to connect to e.g. “begin-request::add-subdirectory” to only get notified about subdirectory creation requests.
If iter is
None
the request is a global request and not attached to a particular node.
- Infinity.Browser.signals.error(browser, error)¶
- Signal Name:
error
- Flags:
- Parameters:
browser (
Infinity.Browser
) – The object which received the signalerror (
GLib.Error
) – AGLib.Error
describing what went wrong.
This signal is emitted whenever there was an asynchronous error with the browser itself which was not the result of a particular user request. The error may or may not be fatal. If it is fatal the browser will also be closed which can be checked with the status property.
- Infinity.Browser.signals.node_added(browser, iter, request)¶
- Signal Name:
node-added
- Flags:
- Parameters:
browser (
Infinity.Browser
) – The object which received the signaliter (
Infinity.BrowserIter
) – An iterator pointing to the newly added node.request (
Infinity.Request
) – The request that lead to the node being added, orNone
.
This signal is emitted when a node is added to the browser.
- Infinity.Browser.signals.node_removed(browser, iter, request)¶
- Signal Name:
node-removed
- Flags:
- Parameters:
browser (
Infinity.Browser
) – The object which received the signaliter (
Infinity.BrowserIter
) – An iterator pointing to the node being removed.request (
Infinity.Request
) – The request that lead to the node being removed, orNone
.
This signal is emitted just before a node is being removed from the browser. The iterator is still valid and can be used to access the node which will be removed.
- Infinity.Browser.signals.subscribe_session(browser, iter, session, request)¶
- Signal Name:
subscribe-session
- Flags:
- Parameters:
browser (
Infinity.Browser
) – The object which received the signaliter (
Infinity.BrowserIter
) – An iterator pointing to the node to which a subscription. was made, orNone
.session (
Infinity.SessionProxy
) – The subscribed session.request (
Infinity.Request
) – The request that lead to the subscription, orNone
.
This signal is emitted whenever the browser is subscribed to a session. This can happen as a result of a
Infinity.Browser.subscribe
() orInfinity.Browser.add_note
() call, but it is also possible that a subscription is initiated without user interaction.If iter is
None
the session was a global session and not attached to a particular node.
- Infinity.Browser.signals.unsubscribe_session(browser, iter, session, request)¶
- Signal Name:
unsubscribe-session
- Flags:
- Parameters:
browser (
Infinity.Browser
) – The object which received the signaliter (
Infinity.BrowserIter
) – An iterator pointing to the node from which a subscription. was removed, orNone
.session (
Infinity.SessionProxy
) – The session to which the subscription was removed.request (
Infinity.Request
) – The request that lead to the unsubscription, orNone
.
This signal is emitted whenever a session is detached from a browser node. This can happen when a subscribed session is closed, or, in the case of a server, if the session is idle for a long time it is stored on disk and removed from memory.
Note that this signal does not mean that the corresponding session can no longer be used. It only means that it is no longer associated to a browser node, for example also when the browser node is deleted. The session might still be intact, though, and can continue even when it is detached from the browser.
In order to find out whether the local host was unsubscribed from a session and the connection to the other session participants has been lost, the
Infinity.Session
:subscription-group
property should be monitored, and if that property changes andInfinity.Session.get_subscription_group
() returnsNone
afterwards, it means the session is no longer connected.If iter is
None
the session was a global session and not attached to a particular node.
Property Details¶
- Infinity.Browser.props.status¶
- Name:
status
- Type:
- Default Value:
- Flags:
The connectivity status of the browser