JanaStore

JanaStore — A component store interface

Synopsis

                    JanaStore;
void                jana_store_open                     (JanaStore *self);
JanaComponent *     jana_store_get_component            (JanaStore *self,
                                                         const gchar *uid);
JanaStoreView *     jana_store_get_view                 (JanaStore *self);
void                jana_store_add_component            (JanaStore *self,
                                                         JanaComponent *comp);
void                jana_store_modify_component         (JanaStore *self,
                                                         JanaComponent *comp);
void                jana_store_remove_component         (JanaStore *self,
                                                         JanaComponent *comp);

Object Hierarchy

  GInterface
   +----JanaStore

Prerequisites

JanaStore requires GObject.

Signals

  "opened"                                         : Run Last

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.

Details

JanaStore

typedef struct _JanaStore JanaStore;

The JanaStore struct contains only private data.


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.

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.

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.

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.

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.

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.

self :

A JanaStore

comp :

The JanaComponent

Signal Details

The "opened" signal

void                user_function                      (JanaStore *store,
                                                        gpointer   user_data)      : Run Last

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

store :

the store that received the signal

user_data :

user data set when the signal handler was connected.

See Also

JanaComponent, JanaStoreView