EDataServerUI.WebDAVDiscoverContent¶
- Subclasses:
None
Methods¶
- Inherited:
Gtk.Grid (21), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10), Gtk.Orientable (2)
- Structs:
Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
Properties¶
- Inherited:
Gtk.Grid (5), Gtk.Container (3), Gtk.Widget (39), Gtk.Orientable (1)
Child Properties¶
- Inherited:
Style Properties¶
- Inherited:
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class EDataServerUI.WebDAVDiscoverContent(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new(credentials_prompter, source, base_url, supports_filter)¶
- Parameters:
credentials_prompter (
EDataServerUI.CredentialsPrompter) – anEDataServerUI.CredentialsPrompterto use to ask for credentialssource (
EDataServer.SourceorNone) – optionalEDataServer.Sourceto use for authentication, orNonebase_url (
strorNone) – optional base URL to use for discovery, orNonesupports_filter (
int) – a bit-or ofEDataServer.WebDAVDiscoverSupports, a filter to limit what source types will be shown in the dialog content; useEDataServer.WebDAVDiscoverSupports.NONEto show all
- Returns:
- Return type:
Creates a new WebDAV discovery content, which is a
Gtk.Gridcontaining necessary widgets to provide a UI interface for a user to search and select for available WebDAV (CalDAV or CardDAV) sources provided by the given server. Do not pack anything into this content, its content can be changed dynamically.New in version 3.18.
- get_base_url()¶
- Returns:
currently set base URL for the self.
- Return type:
Returns currently set base URL for the self. This is used to overwrite the one set on the
EDataServer.Sourcefrom the creation time. The URL can be either a full URL, a path or even aNone.New in version 3.18.
- get_multiselect()¶
- Returns:
whether multiselect is allowed for the self.
- Return type:
New in version 3.18.
- get_selected(index)¶
- Parameters:
index (
int) – an index of the selected source; counts from 0- Returns:
True, when a selected source of index index exists,Falseotherwise.- out_href:
an output location for the URL of the selected source
- out_supports:
an output location of a bit-or of
EDataServer.WebDAVDiscoverSupports, the set of source types this server source location supports- out_display_name:
an output location of the sources display name
- out_color:
an output location of the string representation of the color for the source, as set on the server
- out_order:
an output location of the preferred sorting order
- Return type:
(
bool, out_href:str, out_supports:int, out_display_name:str, out_color:str, out_order:int)
Returns information about selected source at index index. The function can be called multiple times, with the index starting at zero and as long as it doesn’t return
False. If the self doesn’t have allowed multiselection, then the only valid index is 0.All the out_href, out_display_name and out_color are newly allocated strings, which should be freed with
GLib.free(), when no longer needed.New in version 3.18.
- get_tree_selection()¶
- Returns:
inner #GtkTreeViewSelection
- Return type:
Returns inner #GtkTreeViewSelection. This is meant to be able to connect to its “changed” signal and update other parts of the parent widgets accordingly.
New in version 3.18.
- get_user_address()¶
- Returns:
currently selected user address. The returned string is newly allocated and should be freed with
GLib.free() when no longer needed. If there are none addresses provided by the server, or no calendar sources were found, thenNoneis returned instead.- Return type:
Get currently selected user address in the self, if the server returned any. This value has meaning only with calendar sources.
New in version 3.18.
- refresh(display_name, cancellable, callback, *user_data)¶
- Parameters:
display_name (
strorNone) – optional display name to use for scratch sourcescancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject, orNonecallback (
Gio.AsyncReadyCallbackorNone) – aGio.AsyncReadyCallbackto call when the request is satisfieduser_data (
objectorNone) – data to pass to the callback function
Asynchronously starts refresh of the self. This means to access the server and search it for available sources. The self shows a feedback and a Cancel button during the operation.
The display_name is used only if the self wasn’t created with an
EDataServer.Sourceand it’s shown in the password prompts, if there are required any.When the operation is finished, callback will be called. You can then call
EDataServerUI.WebDAVDiscoverContent.refresh_finish() to get the result of the operation.New in version 3.18.
- refresh_finish(result)¶
- Parameters:
result (
Gio.AsyncResult) – aGio.AsyncResult- Raises:
- Returns:
- Return type:
Finishes the operation started with
EDataServerUI.WebDAVDiscoverContent.refresh(). If an error occurred, the function will set error and returnFalse. There is availableEDataServerUI.WebDAVDiscoverContent.show_error() for convenience, which shows the error within self and takes care of it when refreshing the content.New in version 3.18.
- set_base_url(base_url)¶
- Parameters:
base_url (
str) – a base URL
Sets base URL for the self. This is used to overwrite the one set on the
EDataServer.Sourcefrom the creation time. The URL can be either a full URL, a path or even aNone.New in version 3.18.
- set_multiselect(multiselect)¶
- Parameters:
multiselect (
bool) – whether multiselect is allowed
Sets whether the WebDAV discovery content allows multiselect.
New in version 3.18.
- show_error(error)¶
- Parameters:
error (
GLib.Error) – aGLib.Errorto show in the UI, orNone
Shows the error within self, unless it’s a
Gio.IOErrorEnum.CANCELLED, orNone, which are safely ignored. The advantage of this function is that the error message is removed when the refresh operation is started.New in version 3.18.