JanaComponent

JanaComponent — A basic store component interface

Synopsis




                    JanaComponent;
JanaComponentType   jana_component_get_component_type   (JanaComponent *self);
gboolean            jana_component_is_fully_represented (JanaComponent *self);
gchar*              jana_component_get_uid              (JanaComponent *self);
gboolean            jana_component_supports_custom_props
                                                        (JanaComponent *self);
GList*              jana_component_get_custom_props_list
                                                        (JanaComponent *self);
gchar*              jana_component_get_custom_prop      (JanaComponent *self,
                                                         const gchar *name);
gboolean            jana_component_set_custom_prop      (JanaComponent *self,
                                                         const gchar *name,
                                                         const gchar *value);
void                jana_component_props_list_free      (GList *props);

Object Hierarchy


  GInterface
   +----JanaComponent

Description

JanaComponent is the basic interface for a component in a JanaStore. A component is uniquely identifiable, has a type and optionally, can store custom properties as key-value pairs.

Details

JanaComponent

typedef struct _JanaComponent JanaComponent;

The JanaComponent struct contains only private data.


jana_component_get_component_type ()

JanaComponentType   jana_component_get_component_type   (JanaComponent *self);

Get the JanaComponentType of self. The component type will tell you if the component can be cast to a more specific type.

self : A JanaComponent
Returns : The JanaComponentType of self.

jana_component_is_fully_represented ()

gboolean            jana_component_is_fully_represented (JanaComponent *self);

Determines whether the underlying data of self is fully represented by the libjana interface. If it isn't, there may be data in the component that is not reachable via libjana and modifying the object may destroy this data.

self : A JanaComponent
Returns : TRUE if the underlying data of self is fully represented by the libjana interface.

jana_component_get_uid ()

gchar*              jana_component_get_uid              (JanaComponent *self);

Get a unique identifying string for self. This can be used as the key in a hash table and does not change when modifying the component. A JanaComponent that is not a part of a JanaStore may not have a uid.

self : A JanaComponent
Returns : The unique identifier of self.

jana_component_supports_custom_props ()

gboolean            jana_component_supports_custom_props
                                                        (JanaComponent *self);

Determines whether self supports the setting and retrieval of custom properties.

self : A JanaComponent
Returns : TRUE if self supports custom properties, FALSE otherwise.

jana_component_get_custom_props_list ()

GList*              jana_component_get_custom_props_list
                                                        (JanaComponent *self);

Get a GList of properties set on self. The data component of each list element contains an array of two strings. The first string is the property name, the second the value. This list can be freed using jana_component_props_list_free().

self : A JanaComponent
Returns : A GList containing the properties set on self.

jana_component_get_custom_prop ()

gchar*              jana_component_get_custom_prop      (JanaComponent *self,
                                                         const gchar *name);

Retrieve a custom property set on self.

self : A JanaComponent
name : The key name of the property
Returns : A string associated with the custom property, name, or NULL if the property has not been set.

jana_component_set_custom_prop ()

gboolean            jana_component_set_custom_prop      (JanaComponent *self,
                                                         const gchar *name,
                                                         const gchar *value);

Set a property on self. If the property has been set previously, the value will be overwritten. Implementations of JanaComponent may require that property names conform to a particular specification.

self : A JanaComponent
name : The key name of the property
value : The value of the property
Returns : TRUE if the property was set successfully, FALSE otherwise.

jana_component_props_list_free ()

void                jana_component_props_list_free      (GList *props);

Frees a JanaComponent property list, returned by jana_component_get_custom_props_list().

props : A property list returned by jana_component_get_custom_props_list()