### Class

# RB ExtDB

#### Description [src]

    class RB.ExtDB : GObject.Object
    {
      RBExtDBPrivate* priv
    }

This class simplifies searching for and providing external metadata such as album art or lyrics. A metadata provider connects to a signal on the database and in response provides a URI, a buffer containing the data, or an object representation of the data (such as a GdkPixbuf). A metadata requestor calls rb_ext_db_request and specifies a callback, or alternatively connects to a signal to receive all metadata as it is stored.

#### Ancestors

- GObject

#### Constructors

###### rb_ext_db_new

Provides access to a metadata store instance.

#### Instance methods

###### rb_ext_db_cancel_requests

Cancels all outstanding requests matching the specified callback and user data. In cases where the user data for a request is an object, this should be called early in object’s dispose function to ensure that the callback is not called on a partly or fully disposed object.

###### rb_ext_db_delete

Deletes the item stored in the metadata store under the specified storage key.

###### rb_ext_db_lookup

Looks up a cached metadata item.

###### rb_ext_db_request

Requests a metadata item. If the item is cached, the callback will be called synchronously. Otherwise, metadata providers will provide results asynchronously.

###### rb_ext_db_store

Stores an item in the metadata store so that lookups matching `key` will return it. `data` should contain an object that must be transformed using the RBExtDB::store signal before being stored. For example, the album art cache expects `GdkPixbuf` objects here, rather than buffers containing JPEG encoded files.

###### rb_ext_db_store_raw

Stores an item in the metadata store so that lookpus matching `key` will return it. `data` should contain the data to be written to the store, either as a string or as a `GByteArray`.

###### rb_ext_db_store_uri

Stores an item identified by `uri` in the metadata store so that lookups matching `key` will return it.

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Properties

###### RB.ExtDB:name

Name of the metadata store. Used to locate instances.

#### Signals

###### RB.ExtDB::added

Emitted when metadata is added to the store. Metadata consumers can use this to process metadata they did not specifically request, for example to update album art stored on an attached media player.

###### RB.ExtDB::load

Emitted when loading a metadata item from a local file or from a URI.

###### RB.ExtDB::request

Emitted when a metadata request cannot be satisfied from the local store. Metadata providers initiate searches in response to this signal.

###### RB.ExtDB::store

Emitted when a metadata item needs to be written to a local file. This only needs to be used for metadata that needs to be encoded or compressed, such as images.

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

#### Class structure

    struct RBExtDBClass {
      GObjectClass parent;
      void (* added) (
        RBExtDB* store,
        RBExtDBKey* key,
        const char* filename,
        GValue* data
      );
      gboolean (* request) (
        RBExtDB* store,
        RBExtDBKey* key,
        guint64 last_time
      );
      GValue* (* store) (
        RBExtDB* store,
        GValue* data
      );
      GValue* (* load) (
        RBExtDB* store,
        GValue* data
      );

    }

No description available.

###### Class members

`parent: GObjectClass`

  No description available.

`added: void (* added) ( RBExtDB* store, RBExtDBKey* key, const char* filename, GValue* data )`

  No description available.

`request: gboolean (* request) ( RBExtDB* store, RBExtDBKey* key, guint64 last_time )`

  No description available.

`store: GValue* (* store) ( RBExtDB* store, GValue* data )`

  No description available.

`load: GValue* (* load) ( RBExtDB* store, GValue* data )`

  No description available.

#### Virtual methods

###### RB.ExtDBClass.added

No description available.

###### RB.ExtDBClass.load

No description available.

###### RB.ExtDBClass.request

No description available.

###### RB.ExtDBClass.store

No description available.