JanaStore

JanaStore — A component store interface

Functions

Signals

void opened Run Last

Types and Values

Object Hierarchy

    GInterface
    ╰── JanaStore

Prerequisites

JanaStore requires GObject.

Description

JanaStore is the interface for a component storage. A component store has functions to add, modify and remove components, as well as query the storage itself and retrieve specific components.

Functions

jana_store_open ()

void
jana_store_open (JanaStore *self);

Opens the store. Prior to opening a store, any JanaStoreView on the store will not receive any components and retrieval of components will fail. This is an asynchronous call. When the store is open and ready, the ::opened signal will be fired. Implementations of this function should return as immediately as possible and do any lengthy processing in idle time, or in a thread.

Parameters

self

A JanaStore

 

jana_store_get_component ()

JanaComponent *
jana_store_get_component (JanaStore *self,
                          const gchar *uid);

Retrieves a particular JanaComponent using its unique identifier.

Parameters

self

A JanaStore

 

uid

The UID of a JanaComponent

 

Returns

The JanaComponent requested, or NULL if it does not exist in this store.


jana_store_get_view ()

JanaStoreView *
jana_store_get_view (JanaStore *self);

Retrieves a JanaStoreView on this JanaStore.

Parameters

self

A JanaStore

 

Returns

A new JanaStoreView.


jana_store_add_component ()

void
jana_store_add_component (JanaStore *self,
                          JanaComponent *comp);

Adds a component to the store.

Parameters

self

A JanaStore

 

comp

The JanaComponent

 

jana_store_modify_component ()

void
jana_store_modify_component (JanaStore *self,
                             JanaComponent *comp);

Updates the stored component with any changes made. Does nothing if the component does not exist in the store.

Parameters

self

A JanaStore

 

comp

The JanaComponent

 

jana_store_remove_component ()

void
jana_store_remove_component (JanaStore *self,
                             JanaComponent *comp);

Removes a component from the store. Does nothing if the component does not exist in the store.

Parameters

self

A JanaStore

 

comp

The JanaComponent

 

Types and Values

JanaStore

typedef struct _JanaStore JanaStore;

The JanaStore struct contains only private data.

Signal Details

The “opened” signal

void
user_function (JanaStore *store,
               gpointer   user_data)

The ::opened signal is emitted after jana_store_open() is called and the store is ready to be queried.

Parameters

store

the store that received the signal

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

See Also

JanaComponent, JanaStoreView