| Midgard2 Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
#include <midgard/midgard.h> const GValue * midgard_object_get_parameter (MidgardObject *self,const gchar *domain,const gchar *name); gboolean midgard_object_set_parameter (MidgardObject *self,const gchar *domain,const gchar *name,GValue *value); MidgardObject ** midgard_object_list_parameters (MidgardObject *self,const gchar *domain); MidgardObject ** midgard_object_find_parameters (MidgardObject *self,guint n_params,const GParameter *parameters); gboolean midgard_object_has_parameters (MidgardObject *self); gboolean midgard_object_delete_parameters (MidgardObject *self,guint n_params,const GParameter *parameters); gboolean midgard_object_purge_parameters (MidgardObject *self,guint n_params,const GParameter *parameters);
const GValue * midgard_object_get_parameter (MidgardObject *self,const gchar *domain,const gchar *name);
gboolean midgard_object_set_parameter (MidgardObject *self,const gchar *domain,const gchar *name,GValue *value);
Creates object's parameter object if it doesn't exists, updates otherwise.
|
MidgardObject instance |
|
parameter's domain string |
|
parameter's name string |
|
a GValue value which should be set for domain&name pair |
Returns : |
TRUE on success, FALSE otherwise |
MidgardObject ** midgard_object_list_parameters (MidgardObject *self,const gchar *domain);
Returned objects are midgard_parameter class. Parameter objects are fetched from database unconditionally if domain i sexplicitly set to NULL. That is, only those which parent guid property matches object's guid.
Returned array should be freed when no longer needed.
|
a MidgardObject self instance |
|
optional paramaters' domain |
Returns : |
Newly allocated and NULL terminated array of midgard_parameter objects. [transfer full] |
MidgardObject ** midgard_object_find_parameters (MidgardObject *self,guint n_params,const GParameter *parameters);
Find object's parameter(s) with matching given properties.
parameters argument is optional. All object's parameters are
returned ( if exist ) if parameters is explicitly set to NULL.
|
MidgardObject instance |
|
number of properties |
|
properties list |
Returns : |
newly created, NULL terminated array of MidgardObject ( midgard_parameter class ) or NULL on failure. [transfer full]
|
gboolean midgard_object_has_parameters (MidgardObject *self);
|
MidgardObject instance |
Returns : |
TRUE if object has paramateres, FALSE otherwise. |
gboolean midgard_object_delete_parameters (MidgardObject *self,guint n_params,const GParameter *parameters);
Delete object's parameter(s) which match given properties' values.
Properties list in parameters is optional. All object's parameters are
deleted ( if exist ) if parameters is explicitly set to NULL.
|
MidgardObject instance |
|
number of properties |
|
properties list |
Returns : |
TRUE on success, FALSE if at least one of the parameters could not be deleted |
gboolean midgard_object_purge_parameters (MidgardObject *self,guint n_params,const GParameter *parameters);
Purge object's parameter(s) which match given properties' values.
Properties list in parameters is optional. All object's parameters are
purged ( if exist ) if parameters is explicitly set to NULL.
|
MidgardObject instance |
|
number of properties |
|
properties list |
Returns : |
TRUE on success, FALSE if at least one of the parameters could not be purged |