Gjsify LogoGjsify Logo

Contains only private data that should be read and manipulated using the functions below.

Hierarchy

Index

Constructors

Properties

Methods

Constructors

Properties

cache_dir: string
connectable: SocketConnectable
g_type_instance: TypeInstance
main_context: MainContext
online: boolean
proxy_resolver: Gio.ProxyResolver
registry: SourceRegistry
user_prompter: UserPrompter
writable: boolean
name: string

Methods

  • Creates a binding between source_property on source and target_property on target.

    Whenever the source_property is changed the target_property is updated using the same value. For instance:

      g_object_bind_property (action, "active", widget, "sensitive", 0);
    

    Will result in the "sensitive" property of the widget #GObject instance to be updated with the same value of the "active" property of the action #GObject instance.

    If flags contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual: if target_property on target changes then the source_property on source will be updated as well.

    The binding will automatically be removed when either the source or the target instances are finalized. To remove the binding without affecting the source and the target you can just call g_object_unref() on the returned #GBinding instance.

    Removing the binding by calling g_object_unref() on it must only be done if the binding, source and target are only used from a single thread and it is clear that both source and target outlive the binding. Especially it is not safe to rely on this if the binding, source or target can be finalized from different threads. Keep another reference to the binding and use g_binding_unbind() instead to be on the safe side.

    A #GObject can have multiple bindings.

    Parameters

    • source_property: string

      the property on source to bind

    • target: GObject.Object

      the target #GObject

    • target_property: string

      the property on target to bind

    • flags: BindingFlags

      flags to pass to #GBinding

    Returns Binding

  • Creates a binding between source_property on source and target_property on target, allowing you to set the transformation functions to be used by the binding.

    This function is the language bindings friendly version of g_object_bind_property_full(), using #GClosures instead of function pointers.

    Parameters

    • source_property: string

      the property on source to bind

    • target: GObject.Object

      the target #GObject

    • target_property: string

      the property on target to bind

    • flags: BindingFlags

      flags to pass to #GBinding

    • transform_to: TClosure<any, any>

      a #GClosure wrapping the transformation function from the source to the target, or %NULL to use the default

    • transform_from: TClosure<any, any>

      a #GClosure wrapping the transformation function from the target to the source, or %NULL to use the default

    Returns Binding

  • configure_direct(config: string): void
  • This method is called on backend in direct read access mode. The config argument is the same configuration string which the same backend reported in the #EDataBookDirect returned by e_book_backend_get_direct_book().

    The configuration string is optional and is used to ensure that direct access backends are properly configured to interface with the same data as the running server side backend.

    Parameters

    • config: string

      The configuration string for the given backend

    Returns void

  • connect_after(sigName: "closed", callback: BookBackend_ClosedSignalCallback): number
  • connect_after(sigName: "shutdown", callback: BookBackend_ShutdownSignalCallback): number
  • connect_after(sigName: "notify::cache-dir", callback: (($obj: BookBackend, pspec: ParamSpec) => void)): number
  • connect_after(sigName: "notify::proxy-resolver", callback: (($obj: BookBackend, pspec: ParamSpec) => void)): number
  • connect_after(sigName: "notify::registry", callback: (($obj: BookBackend, pspec: ParamSpec) => void)): number
  • connect_after(sigName: "notify::writable", callback: (($obj: BookBackend, pspec: ParamSpec) => void)): number
  • connect_after(sigName: "notify::connectable", callback: (($obj: BookBackend, pspec: ParamSpec) => void)): number
  • connect_after(sigName: "notify::main-context", callback: (($obj: BookBackend, pspec: ParamSpec) => void)): number
  • connect_after(sigName: "notify::online", callback: (($obj: BookBackend, pspec: ParamSpec) => void)): number
  • connect_after(sigName: "notify::source", callback: (($obj: BookBackend, pspec: ParamSpec) => void)): number
  • connect_after(sigName: "notify::user-prompter", callback: (($obj: BookBackend, pspec: ParamSpec) => void)): number
  • connect_after(sigName: string, callback: ((...args: any[]) => void)): number
  • Asynchronously checks whether contains an email_address. When the email_address contains multiple addresses, then returns %TRUE when at least one address exists in the address book.

    When the operation is finished, callback will be called. You can then call e_book_backend_contains_email_finish() to get the result of the operation.

    Parameters

    • email_address: string

      an email address

    • Optional cancellable: Gio.Cancellable

      optional #GCancellable object, or %NULL

    • Optional callback: AsyncReadyCallback

      a #GAsyncReadyCallback to call when the request is satisfied

    Returns void

  • Finishes the operation started with e_book_backend_contains_email().

    If an error occurred, the function will set error and return %FALSE.

    Parameters

    Returns boolean

  • contains_email_sync(email_address: string, cancellable: Gio.Cancellable): boolean
  • Checks whether contains an email_address. When the email_address contains multiple addresses, then returns %TRUE when at least one address exists in the address book.

    If an error occurs, the function will set error and return %FALSE.

    Parameters

    • email_address: string

      an email address

    • cancellable: Gio.Cancellable

      optional #GCancellable object, or %NULL

    Returns boolean

  • Asynchronously creates one or more new contacts from vcards.

    When the operation is finished, callback will be called. You can then call e_book_backend_create_contacts_finish() to get the result of the operation.

    Parameters

    • vcards: string

      a %NULL-terminated array of vCard strings

    • Optional opflags: number

      bit-or of #EBookOperationFlags

    • Optional cancellable: Gio.Cancellable

      optional #GCancellable object, or %NULL

    • Optional callback: AsyncReadyCallback

      a #GAsyncReadyCallback to call when the request is satisfied

    Returns void

  • Finishes the operation started with e_book_backend_create_contacts().

    An #EContact instance for each newly-created contact is deposited in out_contacts. The returned #EContact instances are referenced for thread-safety and must be unreferenced with g_object_unref() when finished with them.

    If an error occurred, the function will set error and return %FALSE.

    Parameters

    Returns boolean

  • create_contacts_sync(vcards: string, opflags: number, out_contacts: GLib.Queue, cancellable: Gio.Cancellable): boolean
  • Creates one or more new contacts from vcards, and deposits an #EContact instance for each newly-created contact in out_contacts.

    The returned #EContact instances are referenced for thread-safety and must be unreferenced with g_object_unref() when finished with them.

    If an error occurs, the function will set error and return %FALSE.

    Parameters

    • vcards: string

      a %NULL-terminated array of vCard strings

    • opflags: number

      bit-or of #EBookOperationFlags

    • out_contacts: GLib.Queue

      a #GQueue in which to deposit results

    • cancellable: Gio.Cancellable

      optional #GCancellable object, or %NULL

    Returns boolean

  • Creates a new #EDataBookCursor for the given backend if the backend has cursor support. If the backend does not support cursors then an %E_CLIENT_ERROR_NOT_SUPPORTED error will be set in error.

    Backends can also refuse to create cursors for some values of sort_fields and report more specific errors.

    The returned cursor belongs to backend and should be destroyed with e_book_backend_delete_cursor() when no longer needed.

    Parameters

    • sort_fields: ContactField

      the #EContactFields to sort by

    • sort_types: BookCursorSortType

      the #EBookCursorSortTypes for the sorted fields

    • n_fields: number

      the number of fields in the sort_fields and sort_types

    Returns DataBookCursor

  • Asynchronously calls the e_backend_credentials_required_sync() on the backend, to inform clients that credentials are required.

    When the operation is finished, callback will be called. You can then call e_backend_credentials_required_finish() to get the result of the operation.

    Parameters

    • reason: SourceCredentialsReason

      an #ESourceCredentialsReason, why the credentials are required

    • certificate_pem: string

      PEM-encoded secure connection certificate, or an empty string

    • certificate_errors: TlsCertificateFlags

      a bit-or of #GTlsCertificateFlags for secure connection certificate

    • op_error: GLib.Error

      a #GError with a description of the previous credentials error, or %NULL

    • cancellable: Gio.Cancellable

      optional #GCancellable object, or %NULL

    • callback: AsyncReadyCallback

      a #GAsyncReadyCallback to call when the request is satisfied

    Returns void

  • credentials_required_finish(result: AsyncResult): boolean
  • Synchronously lets the clients know that the backned requires credentials to be properly opened. It's a proxy function for e_source_invoke_credentials_required_sync(), where can be found more information about actual parameters meaning.

    The provided credentials are received through #EBackendClass.authenticate_sync() method asynchronously.

    If an error occurs, the function sets error and returns %FALSE.

    Parameters

    • reason: SourceCredentialsReason

      an #ESourceCredentialsReason, why the credentials are required

    • certificate_pem: string

      PEM-encoded secure connection certificate, or an empty string

    • certificate_errors: TlsCertificateFlags

      a bit-or of #GTlsCertificateFlags for secure connection certificate

    • op_error: GLib.Error

      a #GError with a description of the previous credentials error, or %NULL

    • cancellable: Gio.Cancellable

      optional #GCancellable object, or %NULL

    Returns boolean

  • Requests backend to release and destroy cursor, this will trigger an %E_CLIENT_ERROR_INVALID_ARG error if cursor is not owned by backend.

    Parameters

    Returns boolean

  • disconnect(id: number): void
  • dup_cache_dir(): string
  • Thread-safe variation of e_book_backend_get_cache_dir(). Use this function when accessing backend from multiple threads.

    The returned string should be freed with g_free() when no longer needed.

    Returns string

  • dup_locale(): string
  • emit(sigName: "closed", sender: string, ...args: any[]): void
  • emit(sigName: "shutdown", ...args: any[]): void
  • emit(sigName: "notify::cache-dir", ...args: any[]): void
  • emit(sigName: "notify::proxy-resolver", ...args: any[]): void
  • emit(sigName: "notify::registry", ...args: any[]): void
  • emit(sigName: "notify::writable", ...args: any[]): void
  • emit(sigName: "notify::connectable", ...args: any[]): void
  • emit(sigName: "notify::main-context", ...args: any[]): void
  • emit(sigName: "notify::online", ...args: any[]): void
  • emit(sigName: "notify::source", ...args: any[]): void
  • emit(sigName: "notify::user-prompter", ...args: any[]): void
  • emit(sigName: string, ...args: any[]): void
  • ensure_source_status_connected(): void
  • Makes sure that the associated ESource::connection-status is connected. This is useful in cases when the backend can connect to the destination without invoking #EBackendClass.authenticate_sync(), possibly through e_backend_schedule_authenticate().

    Returns void

  • force_floating(): void
  • This function is intended for #GObject implementations to re-enforce a [floating][floating-ref] object reference. Doing this is seldom required: all #GInitiallyUnowneds are created with a floating reference which usually just needs to be sunken by calling g_object_ref_sink().

    Returns void

  • foreach_view(): boolean
  • Calls func for each existing view (as returned by e_book_backend_list_views()). The func can return %FALSE to stop early.

    Returns boolean

  • foreach_view_notify_progress(only_completed_views: boolean, percent: number, message: string): void
  • Notifies each view of the backend about progress. When only_completed_views is %TRUE, notifies only completed views.

    Parameters

    • only_completed_views: boolean

      whether notify in completed views only

    • percent: number

      percent complete

    • message: string

      message describing the operation in progress, or %NULL

    Returns void

  • freeze_notify(): void
  • Increases the freeze count on object. If the freeze count is non-zero, the emission of "notify" signals on object is stopped. The signals are queued until the freeze count is decreased to zero. Duplicate notifications are squashed so that at most one #GObject::notify signal is emitted for each property modified while the object is frozen.

    This is necessary for accessors that modify multiple properties to prevent premature notification while the object is still being modified.

    Returns void

  • get_backend_property(prop_name: string): string
  • Obtains the value of the backend property named prop_name. Freed the returned string with g_free() when finished with it.

    Parameters

    • prop_name: string

      a backend property name

    Returns string

  • get_cache_dir(): string
  • Asynchronously obtains an #EContact for uid.

    When the operation is finished, callback will be called. You can then call e_book_backend_get_contact_finish() to get the result of the operation.

    Parameters

    • uid: string

      a contact ID

    • Optional cancellable: Gio.Cancellable

      optional #GCancellable object, or %NULL

    • Optional callback: AsyncReadyCallback

      a #GAsyncReadyCallback to call when the request is satisfied

    Returns void

  • Finishes the operation started with e_book_backend_get_contact_finish().

    The returned #EContact is referenced for thread-safety and must be unreferenced with g_object_unref() when finished with it.

    If an error occurred, the function will set error and return %NULL.

    Parameters

    Returns EBookContacts.Contact

  • Asynchronously obtains a set of #EContact instances which satisfy the criteria specified in query.

    When the operation is finished, callback will be called. You can then call e_book_backend_get_contact_list_finish() to get the result of the operation.

    Parameters

    • query: string

      a search query in S-expression format

    • Optional cancellable: Gio.Cancellable

      optional #GCancellable object, or %NULL

    • Optional callback: AsyncReadyCallback

      a #GAsyncReadyCallback to call when the request is satisfied

    Returns void

  • Finishes the operation started with e_book_backend_get_contact_list().

    The matching #EContact instances are deposited in out_contacts. The returned #EContact instances are referenced for thread-safety and must be unreferenced with g_object_unref() when finished with them.

    If an error occurred, the function will set error and return %FALSE. Note that an empty result set does not necessarily imply an error.

    Parameters

    Returns boolean

  • Obtains a set of #EContact instances which satisfy the criteria specified in query, and deposits them in out_contacts.

    The returned #EContact instances are referenced for thread-safety and must be unreferenced with g_object_unref() when finished with them.

    If an error occurs, the function will set error and return %FALSE. Note that an empty result set does not necessarily imply an error.

    Parameters

    • query: string

      a search query in S-expression format

    • out_contacts: GLib.Queue

      a #GQueue in which to deposit results

    • cancellable: Gio.Cancellable

      optional #GCancellable object, or %NULL

    Returns boolean

  • Asynchronously obtains a set of ID strings for contacts which satisfy the criteria specified in query.

    When the operation is finished, callback will be called. You can then call e_book_backend_get_contact_list_uids_finish() to get the result of the operation.

    Parameters

    • query: string

      a search query in S-expression format

    • Optional cancellable: Gio.Cancellable

      optional #GCancellable object, or %NULL

    • Optional callback: AsyncReadyCallback

      a #GAsyncReadyCallback to call when the request is satisfied

    Returns void

  • Finishes the operation started with e_book_backend_get_contact_list_uids_finish().

    ID strings for the matching contacts are deposited in out_uids, and must be freed with g_free() when finished with them.

    If an error occurs, the function will set error and return %FALSE. Note that an empty result set does not necessarily imply an error.

    Parameters

    Returns boolean

  • Obtains a set of ID strings for contacts which satisfy the criteria specified in query, and deposits them in out_uids.

    The returned ID strings must be freed with g_free() with finished with them.

    If an error occurs, the function will set error and return %FALSE. Note that an empty result set does not necessarily imply an error.

    Parameters

    • query: string

      a search query in S-expression format

    • out_uids: GLib.Queue

      a #GQueue in which to deposit results

    • cancellable: Gio.Cancellable

      optional #GCancellable object, or %NULL

    Returns boolean

  • Obtains an #EContact for uid.

    The returned #EContact is referenced for thread-safety and must be unreferenced with g_object_unref() when finished with it.

    If an error occurs, the function will set error and return %NULL.

    Parameters

    • uid: string

      a contact ID

    • cancellable: Gio.Cancellable

      optional #GCancellable object, or %NULL

    Returns EBookContacts.Contact

  • get_data(key?: string): object
  • Gets a named field from the objects table of associations (see g_object_set_data()).

    Parameters

    • Optional key: string

      name of the key for that association

    Returns object

  • get_destination_address(): [boolean, string, number]
  • Provides destination server host name and port to which the backend connects. This is used to determine required connection point for e_backend_is_destination_reachable(). The host is a newly allocated string, which will be freed with g_free(). When backend sets both host and port, then it should return %TRUE, indicating it's a remote backend. Default implementation returns %FALSE, which is treated like the backend is local, no checking for server reachability is possible.

    Returns [boolean, string, number]

  • get_online(): boolean
  • Returns the online state of backend: %TRUE if backend is online, %FALSE if offline.

    If the #EBackend:connectable property is non-%NULL, the backend will automatically determine whether the network service should be reachable, and hence whether the backend is #EBackend:online. But subclasses may override the online state if, for example, a connection attempt fails.

    Returns boolean

  • get_property(property_name?: string, value?: any): void
  • Gets a property of an object.

    The value can be:

    • an empty #GValue initialized by %G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60)
    • a #GValue initialized with the expected type of the property
    • a #GValue initialized with a type to which the expected type of the property can be transformed

    In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling g_value_unset().

    Note that g_object_get_property() is really intended for language bindings, g_object_get() is much more convenient for C programming.

    Parameters

    • Optional property_name: string

      the name of the property to get

    • Optional value: any

      return location for the property value

    Returns void

  • get_qdata(quark: number): object
  • get_user_prompter(): object
  • get_writable(): boolean
  • getv(names: string[], values: any[]): void
  • Gets n_properties properties for an object. Obtained properties will be set to values. All properties must be valid. Warnings will be emitted and undefined behaviour may result if invalid properties are passed in.

    Parameters

    • names: string[]

      the names of each property to get

    • values: any[]

      the values of each property to get

    Returns void

  • Checks whether the backend<!-- -->'s destination server, as returned by e_backend_get_destination_address(), is reachable. If the e_backend_get_destination_address() returns %FALSE, this function returns %TRUE, meaning the destination is always reachable. This uses #GNetworkMonitor's g_network_monitor_can_reach() for reachability tests.

    Parameters

    Returns boolean

  • is_floating(): boolean
  • is_opened(): boolean
  • Checks if backend's storage has been opened (and authenticated, if necessary) and the backend itself is ready for accessing. This property is changed automatically after the backend is successfully opened.

    Returns boolean

  • is_readonly(): boolean
  • Returns a list of #EDataBookView instances added with e_book_backend_add_view().

    The views returned in the list are referenced for thread-safety. They must each be unreferenced with g_object_unref() when finished with them. Free the returned list itself with g_list_free().

    An easy way to free the list properly in one step is as follows:

    |[ g_list_free_full (list, g_object_unref);

    
    

    Returns DataBookView[]

  • Asynchronously modifies one or more contacts according to vcards.

    When the operation is finished, callback will be called. You can then call e_book_backend_modify_contacts_finish() to get the result of the operation.

    Parameters

    • vcards: string

      a %NULL-terminated array of vCard strings

    • Optional opflags: number

      bit-or of #EBookOperationFlags

    • Optional cancellable: Gio.Cancellable

      optional #GCancellable object, or %NULL

    • Optional callback: AsyncReadyCallback

      a #GAsyncReadyCallback to call when the request is satisfied

    Returns void

  • Finishes the operation started with e_book_backend_modify_contacts().

    If an error occurred, the function will set error and return %FALSE.

    Parameters

    Returns boolean

  • modify_contacts_sync(vcards: string, opflags: number, cancellable: Gio.Cancellable): boolean
  • Modifies one or more contacts according to vcards.

    If an error occurs, the function will set error and return %FALSE.

    Parameters

    • vcards: string

      a %NULL-terminated array of vCard strings

    • opflags: number

      bit-or of #EBookOperationFlags

    • cancellable: Gio.Cancellable

      optional #GCancellable object, or %NULL

    Returns boolean

  • notify(property_name: string): void
  • Emits a "notify" signal for the property property_name on object.

    When possible, eg. when signaling a property change from within the class that registered the property, you should use g_object_notify_by_pspec() instead.

    Note that emission of the notify signal may be blocked with g_object_freeze_notify(). In this case, the signal emissions are queued and will be emitted (in reverse order) when g_object_thaw_notify() is called.

    Parameters

    • property_name: string

      the name of a property installed on the class of object.

    Returns void

  • Emits a "notify" signal for the property specified by pspec on object.

    This function omits the property name lookup, hence it is faster than g_object_notify().

    One way to avoid using g_object_notify() from within the class that registered the properties, and using g_object_notify_by_pspec() instead, is to store the GParamSpec used with g_object_class_install_property() inside a static array, e.g.:

      enum
    {
    PROP_0,
    PROP_FOO,
    PROP_LAST
    };

    static GParamSpec *properties[PROP_LAST];

    static void
    my_object_class_init (MyObjectClass *klass)
    {
    properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
    0, 100,
    50,
    G_PARAM_READWRITE);
    g_object_class_install_property (gobject_class,
    PROP_FOO,
    properties[PROP_FOO]);
    }

    and then notify a change on the "foo" property with:

      g_object_notify_by_pspec (self, properties[PROP_FOO]);
    

    Parameters

    • pspec: ParamSpec

      the #GParamSpec of a property installed on the class of object.

    Returns void

  • notify_complete(): void
  • Notifies all of backend's book views that the current set of notifications is complete; use this after a series of e_book_backend_notify_update() and e_book_backend_notify_remove() calls.

    Returns void

  • notify_error(message: string): void
  • Notifies each backend listener about an error. This is meant to be used for cases where is no GError return possibility, to notify user about an issue.

    Parameters

    • message: string

      an error message

    Returns void

  • notify_property_changed(prop_name: string, prop_value: string): void
  • Notifies clients about property value change.

    Parameters

    • prop_name: string

      property name, which changed

    • prop_value: string

      new property value

    Returns void

  • notify_remove(id: string): void
  • Notifies all of backend's book views that the contact with UID id has been removed.

    e_data_book_respond_remove_contacts() calls this function for you. You only need to call this from your backend if contacts are removed by another (non-PAS-using) client.

    Parameters

    • id: string

      a contact id

    Returns void

  • Notifies all of backend's book views about the new or modified contacts contact.

    e_data_book_respond_create_contacts() and e_data_book_respond_modify_contacts() call this function for you. You only need to call this from your backend if contacts are created or modified by another (non-PAS-using) client.

    Parameters

    Returns void

  • Asynchronously "opens" the backend. Opening a backend is something of an outdated concept, but the operation is hanging around for a little while longer. This usually involves some custom initialization logic, and testing of remote authentication if applicable.

    When the operation is finished, callback will be called. You can then call e_book_backend_open_finish() to get the result of the operation.

    Parameters

    • cancellable: Gio.Cancellable

      optional #GCancellable object, or %NULL

    • Optional callback: AsyncReadyCallback

      a #GAsyncReadyCallback to call when the request is satisfied

    Returns void

  • Finishes the operation started with e_book_backend_open().

    If an error occurred, the function will set error and return %FALSE.

    Parameters

    Returns boolean

  • "Opens" the backend. Opening a backend is something of an outdated concept, but the operation is hanging around for a little while longer. This usually involves some custom initialization logic, and testing of remote authentication if applicable.

    If an error occurs, the function will set error and return %FALSE.

    Parameters

    Returns boolean

  • Obtains the #GSimpleAsyncResult for opid and sets result_queue as a place to deposit results prior to completing the #GSimpleAsyncResult.

    This is a temporary function to serve #EDataBook's "respond" functions until they can be removed. Nothing else should be calling this function.

    Parameters

    • opid: number

      an operation ID given to #EDataBook

    • result_queue: GLib.Queue

      return location for a #GQueue, or %NULL

    Returns SimpleAsyncResult

  • prepare_shutdown(): void
  • Increases the reference count of object.

    Since GLib 2.56, if GLIB_VERSION_MAX_ALLOWED is 2.56 or greater, the type of object will be propagated to the return type (using the GCC typeof() extension), so any casting the caller needs to do on the return type must be explicit.

    Returns GObject.Object

  • Returns the socket endpoint for the network service to which backend is a client, or %NULL if backend does not use network sockets.

    The initial value of the #EBackend:connectable property is derived from the #ESourceAuthentication extension of the backend's #EBackend:source property, if the extension is present.

    The returned #GSocketConnectable is referenced for thread-safety and must be unreferenced with g_object_unref() when finished with it.

    Returns SocketConnectable

  • Returns the #EDataBook for backend. The #EDataBook is essentially the glue between incoming D-Bus requests and backend's native API.

    An #EDataBook should be set only once after backend is first created. If an #EDataBook has not yet been set, the function returns %NULL.

    The returned #EDataBook is referenced for thread-safety and must be unreferenced with g_object_unref() when finished with it.

    Returns DataBook

  • Returns the #GProxyResolver for backend (if applicable), as indicated by the #ESourceAuthentication:proxy-uid of backend's #EBackend:source or one of its ancestors.

    The returned #GProxyResolver is referenced for thread-safety and must be unreferenced with g_object_unref() when finished with it.

    Returns Gio.ProxyResolver

  • Increase the reference count of object, and possibly remove the [floating][floating-ref] reference, if object has a floating reference.

    In other words, if the object is floating, then this call "assumes ownership" of the floating reference, converting it to a normal reference by clearing the floating flag while leaving the reference count unchanged. If the object is not floating, then this call adds a new normal reference increasing the reference count by one.

    Since GLib 2.56, the type of object will be propagated to the return type under the same conditions as for g_object_ref().

    Returns GObject.Object

  • Asynchronously initiates a refresh for backend, if the backend supports refreshing. The actual refresh operation completes on its own time. This function, along with e_book_backend_refresh_finish(), merely initiates the operation.

    Once the refresh is initiated, callback will be called. You can then call e_book_backend_refresh_finish() to get the result of the initiation.

    Parameters

    • cancellable: Gio.Cancellable

      optional #GCancellable object, or %NULL

    • Optional callback: AsyncReadyCallback

      a #GAsyncReadyCallback to call when the request is satisfied

    Returns void

  • Finishes the refresh initiation started with e_book_backend_refresh().

    If an error occurred while initiating the refresh, the function will set error and return %FALSE. If the backend does not support refreshing, the function will set an %E_CLIENT_ERROR_NOT_SUPPORTED error and return %FALSE.

    Parameters

    Returns boolean

  • Initiates a refresh for backend, if the backend supports refreshing. The actual refresh operation completes on its own time. This function merely initiates the operation.

    If an error occurs while initiating the refresh, the function will set error and return %FALSE. If the backend does not support refreshing, the function will set an %E_CLIENT_ERROR_NOT_SUPPORTED error and return %FALSE.

    Parameters

    Returns boolean

  • Asynchronously removes one or more contacts according to uids.

    When the operation is finished, callback will be called. You can then call e_book_backend_remove_contacts_finish() to get the result of the operation.

    Parameters

    • uids: string[]

      a %NULL-terminated array of contact ID strings

    • Optional opflags: number

      bit-or of #EBookOperationFlags

    • Optional cancellable: Gio.Cancellable

      optional #GCancellable object, or %NULL

    • Optional callback: AsyncReadyCallback

      a #GAsyncReadyCallback to call when the request is satisfied

    Returns void

  • Finishes the operation started with e_book_backend_remove_contacts().

    If an error occurred, the function will set error and return %FALSE.

    Parameters

    Returns boolean

  • remove_contacts_sync(uids: string, opflags: number, cancellable: Gio.Cancellable): boolean
  • Removes one or more contacts according to uids.

    If an error occurs, the function will set error and return %FALSE.

    Parameters

    • uids: string

      a %NULL-terminated array of contact ID strings

    • opflags: number

      bit-or of #EBookOperationFlags

    • cancellable: Gio.Cancellable

      optional #GCancellable object, or %NULL

    Returns boolean

  • run_dispose(): void
  • Schedules a new authenticate session, cancelling any previously run. This is usually done automatically, when an 'authenticate' signal is received for the associated #ESource. With %NULL credentials an attempt without it is run.

    Parameters

    • credentials: NamedParameters

      a credentials to use to authenticate, or %NULL

    Returns void

  • Asynchronously invokes e_backend_credentials_required(), but installs its own callback which only prints a runtime warning on the console when the call fails. The who_calls is a prefix of the console message. This is useful when the caller just wants to start the operation without having actual place where to show the operation result.

    Parameters

    • reason: SourceCredentialsReason

      an #ESourceCredentialsReason, why the credentials are required

    • certificate_pem: string

      PEM-encoded secure connection certificate, or an empty string

    • certificate_errors: TlsCertificateFlags

      a bit-or of #GTlsCertificateFlags for secure connection certificate

    • op_error: GLib.Error

      a #GError with a description of the previous credentials error, or %NULL

    • cancellable: Gio.Cancellable

      optional #GCancellable object, or %NULL

    • who_calls: string

      an identification who calls this

    Returns void

  • Schedules user function func to be run in a dedicated thread as a blocking operation.

    The function adds its own reference to use_cancellable, if not %NULL.

    The error returned from func is propagated to client using e_book_backend_notify_error() function. If it's not desired, then left the error unchanged and notify about errors manually.

    Parameters

    Returns void

  • set_cache_dir(cache_dir: string): void
  • Sets the cache directory path for use by backend.

    Note that #EBookBackend is initialized with a default cache directory path which should suffice for most cases. Backends should not override the default path without good reason.

    Parameters

    • cache_dir: string

      a local cache directory path

    Returns void

  • Sets the socket endpoint for the network service to which backend is a client. This can be %NULL if backend does not use network sockets.

    The initial value of the #EBackend:connectable property is derived from the #ESourceAuthentication extension of the backend's #EBackend:source property, if the extension is present.

    Parameters

    Returns void

  • set_data(key: string, data?: object): void
  • Each object carries around a table of associations from strings to pointers. This function lets you set an association.

    If the object already had an association with that name, the old association will be destroyed.

    Internally, the key is converted to a #GQuark using g_quark_from_string(). This means a copy of key is kept permanently (even after object has been finalized) — so it is recommended to only use a small, bounded set of values for key in your program, to avoid the #GQuark storage growing unbounded.

    Parameters

    • key: string

      name of the key

    • Optional data: object

      data to associate with that key

    Returns void

  • set_data_book(data_book: DataBook): void
  • Sets the #EDataBook for backend. The #EDataBook is essentially the glue between incoming D-Bus requests and backend's native API.

    An #EDataBook should be set only once after backend is first created.

    Parameters

    Returns void

  • Notify the addressbook backend that the current locale has changed, this is important for backends which support ordered result lists which are locale sensitive.

    Parameters

    • locale: string

      the new locale for the addressbook

    • cancellable: Gio.Cancellable

      optional #GCancellable object, or %NULL

    Returns boolean

  • set_online(online: boolean): void
  • Sets the online state of backend: %TRUE if backend is online, FALSE if offline.

    If the #EBackend:connectable property is non-%NULL, the backend will automatically determine whether the network service should be reachable, and hence whether the backend is #EBackend:online. But subclasses may override the online state if, for example, a connection attempt fails.

    Parameters

    • online: boolean

      the online state

    Returns void

  • set_property(property_name: string, value?: any): void
  • set_writable(writable: boolean): void
  • Sets whether backend will accept changes to its data content.

    Parameters

    • writable: boolean

      whether backend is writable

    Returns void

  • steal_data(key?: string): object
  • Remove a specified datum from the object's data associations, without invoking the association's destroy handler.

    Parameters

    • Optional key: string

      name of the key

    Returns object

  • steal_qdata(quark: number): object
  • This function gets back user data pointers stored via g_object_set_qdata() and removes the data from object without invoking its destroy() function (if any was set). Usually, calling this function is only required to update user data pointers with a destroy notifier, for example:

    void
    object_add_to_user_list (GObject *object,
    const gchar *new_string)
    {
    // the quark, naming the object data
    GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
    // retrieve the old string list
    GList *list = g_object_steal_qdata (object, quark_string_list);

    // prepend new string
    list = g_list_prepend (list, g_strdup (new_string));
    // this changed 'list', so we need to set it again
    g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
    }
    static void
    free_string_list (gpointer data)
    {
    GList *node, *list = data;

    for (node = list; node; node = node->next)
    g_free (node->data);
    g_list_free (list);
    }

    Using g_object_get_qdata() in the above example, instead of g_object_steal_qdata() would have left the destroy function set, and thus the partial string list would have been freed upon g_object_set_qdata_full().

    Parameters

    • quark: number

      A #GQuark, naming the user data pointer

    Returns object

  • sync(): void
  • thaw_notify(): void
  • Reverts the effect of a previous call to g_object_freeze_notify(). The freeze count is decreased on object and when it reaches zero, queued "notify" signals are emitted.

    Duplicate notifications for each property are squashed so that at most one #GObject::notify signal is emitted for each property, in the reverse order in which they have been queued.

    It is an error to call this function when the freeze count is zero.

    Returns void

  • Initiates a user trust prompt with given parameters.

    When the operation is finished, callback will be called. You can then call e_backend_trust_prompt_finish() to get the result of the operation.

    Parameters

    • parameters: NamedParameters

      an #ENamedParameters with values for the trust prompt

    • cancellable: Gio.Cancellable

      optional #GCancellable object, or %NULL

    • callback: AsyncReadyCallback

      a #GAsyncReadyCallback to call when the request is satisfied

    Returns void

  • unref(): void
  • Decreases the reference count of object. When its reference count drops to 0, the object is finalized (i.e. its memory is freed).

    If the pointer to the #GObject may be reused in future (for example, if it is an instance variable of another object), it is recommended to clear the pointer to %NULL rather than retain a dangling pointer to a potentially invalid #GObject instance. Use g_clear_object() for this.

    Returns void

  • vfunc_closed(sender: string): void
  • vfunc_constructed(): void
  • vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: ParamSpec): void
  • vfunc_dispose(): void
  • vfunc_finalize(): void
  • vfunc_get_destination_address(): [boolean, string, number]
  • Provides destination server host name and port to which the backend connects. This is used to determine required connection point for e_backend_is_destination_reachable(). The host is a newly allocated string, which will be freed with g_free(). When backend sets both host and port, then it should return %TRUE, indicating it's a remote backend. Default implementation returns %FALSE, which is treated like the backend is local, no checking for server reachability is possible.

    virtual

    Returns [boolean, string, number]

  • vfunc_get_property(property_id: number, value?: any, pspec?: ParamSpec): void
  • vfunc_impl_configure_direct(config: string): void
  • vfunc_impl_contains_email(book: DataBook, opid: number, cancellable: Gio.Cancellable, email_address: string): void
  • vfunc_impl_create_contacts(book: DataBook, opid: number, cancellable: Gio.Cancellable, vcards: string, opflags: number): void
  • vfunc_impl_dup_locale(): string
  • vfunc_impl_get_backend_property(prop_name: string): string
  • vfunc_impl_get_contact_list_uids(book: DataBook, opid: number, cancellable: Gio.Cancellable, query: string): void
  • vfunc_impl_modify_contacts(book: DataBook, opid: number, cancellable: Gio.Cancellable, vcards: string, opflags: number): void
  • vfunc_impl_remove_contacts(book: DataBook, opid: number, cancellable: Gio.Cancellable, uids: string, opflags: number): void
  • vfunc_impl_set_locale(locale: string, cancellable: Gio.Cancellable): boolean
  • Emits a "notify" signal for the property property_name on object.

    When possible, eg. when signaling a property change from within the class that registered the property, you should use g_object_notify_by_pspec() instead.

    Note that emission of the notify signal may be blocked with g_object_freeze_notify(). In this case, the signal emissions are queued and will be emitted (in reverse order) when g_object_thaw_notify() is called.

    virtual

    Parameters

    Returns void

  • vfunc_prepare_shutdown(): void
  • vfunc_set_property(property_id: number, value?: any, pspec?: ParamSpec): void
  • vfunc_shutdown(): void
  • watch_closure(closure: TClosure<any, any>): void
  • This function essentially limits the life time of the closure to the life time of the object. That is, when the object is finalized, the closure is invalidated by calling g_closure_invalidate() on it, in order to prevent invocations of the closure with a finalized (nonexisting) object. Also, g_object_ref() and g_object_unref() are added as marshal guards to the closure, to ensure that an extra reference count is held on object during invocation of the closure. Usually, this function will be called on closures that use this object as closure data.

    Parameters

    • closure: TClosure<any, any>

      #GClosure to watch

    Returns void

  • compat_control(what: number, data: object): number
  • Find the #GParamSpec with the given name for an interface. Generally, the interface vtable passed in as g_iface will be the default vtable from g_type_default_interface_ref(), or, if you know the interface has already been loaded, g_type_default_interface_peek().

    Parameters

    • g_iface: TypeInterface

      any interface vtable for the interface, or the default vtable for the interface

    • property_name: string

      name of a property to look up.

    Returns ParamSpec

  • Add a property to an interface; this is only useful for interfaces that are added to GObject-derived types. Adding a property to an interface forces all objects classes with that interface to have a compatible property. The compatible property could be a newly created #GParamSpec, but normally g_object_class_override_property() will be used so that the object class only needs to provide an implementation and inherits the property description, default value, bounds, and so forth from the interface property.

    This function is meant to be called from the interface's default vtable initialization function (the class_init member of #GTypeInfo.) It must not be called after after class_init has been called for any object types implementing this interface.

    If pspec is a floating reference, it will be consumed.

    Parameters

    • g_iface: TypeInterface

      any interface vtable for the interface, or the default vtable for the interface.

    • pspec: ParamSpec

      the #GParamSpec for the new property

    Returns void

  • Lists the properties of an interface.Generally, the interface vtable passed in as g_iface will be the default vtable from g_type_default_interface_ref(), or, if you know the interface has already been loaded, g_type_default_interface_peek().

    Parameters

    • g_iface: TypeInterface

      any interface vtable for the interface, or the default vtable for the interface

    Returns ParamSpec[]

  • Creates a new instance of a #GObject subtype and sets its properties.

    Construction parameters (see %G_PARAM_CONSTRUCT, %G_PARAM_CONSTRUCT_ONLY) which are not explicitly specified are set to their default values.

    Parameters

    • object_type: GType<unknown>

      the type id of the #GObject subtype to instantiate

    • parameters: GObject.Parameter[]

      an array of #GParameter

    Returns GObject.Object

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method