Bonobo API Reference Manual
<<< Previous Page | Home | Up | Next Page >>>

# bonobo-property-bag-client

## Name

bonobo-property-bag-client -- simplified property bag client wrapper code

## Synopsis

    GList*      bonobo_property_bag_client_get_properties
                                                (Bonobo_PropertyBag pb,
                                                 CORBA_Environment *ev);
    void        bonobo_property_bag_client_free_properties
                                                (GList *list);
    GList*      bonobo_property_bag_client_get_property_names
                                                (Bonobo_PropertyBag pb,
                                                 CORBA_Environment *ev);
    Bonobo_Property bonobo_property_bag_client_get_property
                                                (Bonobo_PropertyBag pb,
                                                 const char *property_name,
                                                 CORBA_Environment *ev);
    void        bonobo_property_bag_client_persist
                                                (Bonobo_PropertyBag pb,
                                                 Bonobo_Stream stream,
                                                 CORBA_Environment *ev);
    void        bonobo_property_bag_client_depersist
                                                (Bonobo_PropertyBag pb,
                                                 Bonobo_Stream stream,
                                                 CORBA_Environment *ev);
    char*       bonobo_property_bag_client_setv (Bonobo_PropertyBag pb,
                                                 CORBA_Environment *ev,
                                                 const char *first_arg,
                                                 va_list var_args);
    char*       bonobo_property_bag_client_getv (Bonobo_PropertyBag pb,
                                                 CORBA_Environment *ev,
                                                 const char *first_arg,
                                                 va_list var_args);
    CORBA_TypeCode bonobo_property_bag_client_get_property_type
                                                (Bonobo_PropertyBag pb,
                                                 const char *propname,
                                                 CORBA_Environment *ev);
    gboolean    bonobo_property_bag_client_get_value_gboolean
                                                (Bonobo_PropertyBag pb,
                                                 const char *propname,
                                                 CORBA_Environment *ev);
    gint        bonobo_property_bag_client_get_value_gint
                                                (Bonobo_PropertyBag pb,
                                                 const char *propname,
                                                 CORBA_Environment *ev);
    glong       bonobo_property_bag_client_get_value_glong
                                                (Bonobo_PropertyBag pb,
                                                 const char *propname,
                                                 CORBA_Environment *ev);
    gfloat      bonobo_property_bag_client_get_value_gfloat
                                                (Bonobo_PropertyBag pb,
                                                 const char *propname,
                                                 CORBA_Environment *ev);
    gdouble     bonobo_property_bag_client_get_value_gdouble
                                                (Bonobo_PropertyBag pb,
                                                 const char *propname,
                                                 CORBA_Environment *ev);
    char*       bonobo_property_bag_client_get_value_string
                                                (Bonobo_PropertyBag pb,
                                                 const char *propname,
                                                 CORBA_Environment *ev);
    BonoboArg*  bonobo_property_bag_client_get_value_any
                                                (Bonobo_PropertyBag pb,
                                                 const char *propname,
                                                 CORBA_Environment *ev);
    gboolean    bonobo_property_bag_client_get_default_gboolean
                                                (Bonobo_PropertyBag pb,
                                                 const char *propname,
                                                 CORBA_Environment *ev);
    gint        bonobo_property_bag_client_get_default_gint
                                                (Bonobo_PropertyBag pb,
                                                 const char *propname,
                                                 CORBA_Environment *ev);
    glong       bonobo_property_bag_client_get_default_glong
                                                (Bonobo_PropertyBag pb,
                                                 const char *propname,
                                                 CORBA_Environment *ev);
    gfloat      bonobo_property_bag_client_get_default_gfloat
                                                (Bonobo_PropertyBag pb,
                                                 const char *propname,
                                                 CORBA_Environment *ev);
    gdouble     bonobo_property_bag_client_get_default_gdouble
                                                (Bonobo_PropertyBag pb,
                                                 const char *propname,
                                                 CORBA_Environment *ev);
    char*       bonobo_property_bag_client_get_default_string
                                                (Bonobo_PropertyBag pb,
                                                 const char *propname,
                                                 CORBA_Environment *ev);
    BonoboArg*  bonobo_property_bag_client_get_default_any
                                                (Bonobo_PropertyBag pb,
                                                 const char *propname,
                                                 CORBA_Environment *ev);
    void        bonobo_property_bag_client_set_value_gboolean
                                                (Bonobo_PropertyBag pb,
                                                 const char *propname,
                                                 gboolean value,
                                                 CORBA_Environment *ev);
    void        bonobo_property_bag_client_set_value_gint
                                                (Bonobo_PropertyBag pb,
                                                 const char *propname,
                                                 gint value,
                                                 CORBA_Environment *ev);
    void        bonobo_property_bag_client_set_value_glong
                                                (Bonobo_PropertyBag pb,
                                                 const char *propname,
                                                 glong value,
                                                 CORBA_Environment *ev);
    void        bonobo_property_bag_client_set_value_gfloat
                                                (Bonobo_PropertyBag pb,
                                                 const char *propname,
                                                 gfloat value,
                                                 CORBA_Environment *ev);
    void        bonobo_property_bag_client_set_value_gdouble
                                                (Bonobo_PropertyBag pb,
                                                 const char *propname,
                                                 gdouble value,
                                                 CORBA_Environment *ev);
    void        bonobo_property_bag_client_set_value_string
                                                (Bonobo_PropertyBag pb,
                                                 const char *propname,
                                                 const char *value,
                                                 CORBA_Environment *ev);
    void        bonobo_property_bag_client_set_value_any
                                                (Bonobo_PropertyBag pb,
                                                 const char *propname,
                                                 BonoboArg *value,
                                                 CORBA_Environment *ev);
    char*       bonobo_property_bag_client_get_docstring
                                                (Bonobo_PropertyBag pb,
                                                 const char *propname,
                                                 CORBA_Environment *ev);
    BonoboPropertyFlags bonobo_property_bag_client_get_flags
                                                (Bonobo_PropertyBag pb,
                                                 const char *propname,
                                                 CORBA_Environment *ev);

## Description

This code is designed to make the property bag interface slightly easier to use, by allowing optional CORBA environments, sensible return values on exceptions, and accessors for specific types of CORBA_Any. eg. bonobo_property_bag_client_get_value_glong.

With the property bag interface, as in all current remote Bonobo method invocations, translation issues are very dodgy. Assuming that the server process was activated in the correct locale, all should be well, however there is no guarantee that ( in a rapidly changing locale environment ) the string will be correctly translated. It is difficult to know how to solve this problem.

## Details

### bonobo_property_bag_client_get_properties ()

    GList*      bonobo_property_bag_client_get_properties
                                                (Bonobo_PropertyBag pb,
                                                 CORBA_Environment *ev);

`pb` : | A Bonobo_PropertyBag which is bound to a remote Bonobo_PropertyBag.
`ev` : | optional CORBA exception environment or NULL
Returns : | A GList filled with Bonobo_Property CORBA object references for all of the properties stored in the remote BonoboPropertyBag.

### bonobo_property_bag_client_free_properties ()

    void        bonobo_property_bag_client_free_properties
                                                (GList *list);

Releases the CORBA Objrefs stored in `list` and frees the list.

`list` : | A GList containing Bonobo_Property corba objrefs (as produced by bonobo_property_bag_client_get_properties(), for example).

### bonobo_property_bag_client_get_property_names ()

    GList*      bonobo_property_bag_client_get_property_names
                                                (Bonobo_PropertyBag pb,
                                                 CORBA_Environment *ev);

This function exists as a convenience, so that you don't have to iterate through all of the Bonobo_Property objects in order to get a list of their names. It should be used in place of such an iteration, as it uses fewer resources on the remote BonoboPropertyBag.

`pb` : | A Bonobo_PropertyBag which is bound to a remote Bonobo_PropertyBag.
`ev` : | optional CORBA exception environment or NULL
Returns : | A GList filled with strings containing the names of all the properties stored in the remote BonoboPropertyBag.

### bonobo_property_bag_client_get_property ()

    Bonobo_Property bonobo_property_bag_client_get_property
                                                (Bonobo_PropertyBag pb,
                                                 const char *property_name,
                                                 CORBA_Environment *ev);

`pb` : | A Bonobo_PropertyBag which is associated with a remote BonoboPropertyBag.
`property_name` : |
`ev` : | optional CORBA exception environment or NULL
Returns : | A Bonobo_Property CORBA object reference corresponding to the requested property.

### bonobo_property_bag_client_persist ()

    void        bonobo_property_bag_client_persist
                                                (Bonobo_PropertyBag pb,
                                                 Bonobo_Stream stream,
                                                 CORBA_Environment *ev);

Reads the property data stored in the Bonobo_PropertyBag to which `pb` is bound and streams it into `stream`. The typical use for this function is to save the property data for a given Bonobo Control into a persistent store to which `stream` is attached.

`pb` : | A Bonobo_PropertyBag object which is bound to a remote Bonobo_PropertyBag server.
`stream` : | A BonoboStream into which the data in `pb` will be written.
`ev` : | optional CORBA exception environment or NULL

### bonobo_property_bag_client_depersist ()

    void        bonobo_property_bag_client_depersist
                                                (Bonobo_PropertyBag pb,
                                                 Bonobo_Stream stream,
                                                 CORBA_Environment *ev);

Serializes the property bag `pb` to the `stream`, using the PersistStream interface associated with the PropertyBag.

`pb` : | the property bag to persist
`stream` : | the stream to persist to
`ev` : | optional CORBA exception environment or NULL

### bonobo_property_bag_client_setv ()

    char*       bonobo_property_bag_client_setv (Bonobo_PropertyBag pb,
                                                 CORBA_Environment *ev,
                                                 const char *first_arg,
                                                 va_list var_args);

This function uses the TypeCode data extracted from the `pb` to determine how it walks its stack. This function provides the grunt implementation for other var-arg functions like bonobo_widget_set_property

`pb` : | the property bag
`ev` : | optional CORBA exception environment or NULL
`first_arg` : | first argument name
`var_args` : | list of subsequent name / value pairs
Returns : | an error string on error or NULL on success.

### bonobo_property_bag_client_getv ()

    char*       bonobo_property_bag_client_getv (Bonobo_PropertyBag pb,
                                                 CORBA_Environment *ev,
                                                 const char *first_arg,
                                                 va_list var_args);

This function uses the TypeCode data extracted from the `pb` to determine how it walks its stack. This function provides the grunt implementation for other var-arg functions like bonobo_widget_get_property.

`pb` : | the property bag
`ev` : | optional CORBA exception environment or NULL
`first_arg` : | first argument name
`var_args` : | list of subsequent name / value pairs
Returns : | an error string on error or NULL on success.

### bonobo_property_bag_client_get_property_type ()

    CORBA_TypeCode bonobo_property_bag_client_get_property_type
                                                (Bonobo_PropertyBag pb,
                                                 const char *propname,
                                                 CORBA_Environment *ev);

Finds the typecode associated with the property in `pb` of name `propname`

`pb` : | the property bag
`propname` : | the property name
`ev` : | optional CORBA exception environment or NULL
Returns : | the TypeCode for property `name` or CORBA_OBJECT_NIL

### bonobo_property_bag_client_get_value_gboolean ()

    gboolean    bonobo_property_bag_client_get_value_gboolean
                                                (Bonobo_PropertyBag pb,
                                                 const char *propname,
                                                 CORBA_Environment *ev);

`pb` : |
`propname` : |
`ev` : |
Returns : |

### bonobo_property_bag_client_get_value_gint ()

    gint        bonobo_property_bag_client_get_value_gint
                                                (Bonobo_PropertyBag pb,
                                                 const char *propname,
                                                 CORBA_Environment *ev);

`pb` : |
`propname` : |
`ev` : |
Returns : |

### bonobo_property_bag_client_get_value_glong ()

    glong       bonobo_property_bag_client_get_value_glong
                                                (Bonobo_PropertyBag pb,
                                                 const char *propname,
                                                 CORBA_Environment *ev);

`pb` : |
`propname` : |
`ev` : |
Returns : |

### bonobo_property_bag_client_get_value_gfloat ()

    gfloat      bonobo_property_bag_client_get_value_gfloat
                                                (Bonobo_PropertyBag pb,
                                                 const char *propname,
                                                 CORBA_Environment *ev);

`pb` : |
`propname` : |
`ev` : |
Returns : |

### bonobo_property_bag_client_get_value_gdouble ()

    gdouble     bonobo_property_bag_client_get_value_gdouble
                                                (Bonobo_PropertyBag pb,
                                                 const char *propname,
                                                 CORBA_Environment *ev);

`pb` : |
`propname` : |
`ev` : |
Returns : |

### bonobo_property_bag_client_get_value_string ()

    char*       bonobo_property_bag_client_get_value_string
                                                (Bonobo_PropertyBag pb,
                                                 const char *propname,
                                                 CORBA_Environment *ev);

`pb` : |
`propname` : |
`ev` : |
Returns : |

### bonobo_property_bag_client_get_value_any ()

    BonoboArg*  bonobo_property_bag_client_get_value_any
                                                (Bonobo_PropertyBag pb,
                                                 const char *propname,
                                                 CORBA_Environment *ev);

`pb` : |
`propname` : |
`ev` : |
Returns : |

### bonobo_property_bag_client_get_default_gboolean ()

    gboolean    bonobo_property_bag_client_get_default_gboolean
                                                (Bonobo_PropertyBag pb,
                                                 const char *propname,
                                                 CORBA_Environment *ev);

`pb` : |
`propname` : |
`ev` : |
Returns : |

### bonobo_property_bag_client_get_default_gint ()

    gint        bonobo_property_bag_client_get_default_gint
                                                (Bonobo_PropertyBag pb,
                                                 const char *propname,
                                                 CORBA_Environment *ev);

`pb` : |
`propname` : |
`ev` : |
Returns : |

### bonobo_property_bag_client_get_default_glong ()

    glong       bonobo_property_bag_client_get_default_glong
                                                (Bonobo_PropertyBag pb,
                                                 const char *propname,
                                                 CORBA_Environment *ev);

`pb` : |
`propname` : |
`ev` : |
Returns : |

### bonobo_property_bag_client_get_default_gfloat ()

    gfloat      bonobo_property_bag_client_get_default_gfloat
                                                (Bonobo_PropertyBag pb,
                                                 const char *propname,
                                                 CORBA_Environment *ev);

`pb` : |
`propname` : |
`ev` : |
Returns : |

### bonobo_property_bag_client_get_default_gdouble ()

    gdouble     bonobo_property_bag_client_get_default_gdouble
                                                (Bonobo_PropertyBag pb,
                                                 const char *propname,
                                                 CORBA_Environment *ev);

`pb` : |
`propname` : |
`ev` : |
Returns : |

### bonobo_property_bag_client_get_default_string ()

    char*       bonobo_property_bag_client_get_default_string
                                                (Bonobo_PropertyBag pb,
                                                 const char *propname,
                                                 CORBA_Environment *ev);

`pb` : |
`propname` : |
`ev` : |
Returns : |

### bonobo_property_bag_client_get_default_any ()

    BonoboArg*  bonobo_property_bag_client_get_default_any
                                                (Bonobo_PropertyBag pb,
                                                 const char *propname,
                                                 CORBA_Environment *ev);

`pb` : |
`propname` : |
`ev` : |
Returns : |

### bonobo_property_bag_client_set_value_gboolean ()

    void        bonobo_property_bag_client_set_value_gboolean
                                                (Bonobo_PropertyBag pb,
                                                 const char *propname,
                                                 gboolean value,
                                                 CORBA_Environment *ev);

`pb` : |
`propname` : |
`value` : |
`ev` : |

### bonobo_property_bag_client_set_value_gint ()

    void        bonobo_property_bag_client_set_value_gint
                                                (Bonobo_PropertyBag pb,
                                                 const char *propname,
                                                 gint value,
                                                 CORBA_Environment *ev);

`pb` : |
`propname` : |
`value` : |
`ev` : |

### bonobo_property_bag_client_set_value_glong ()

    void        bonobo_property_bag_client_set_value_glong
                                                (Bonobo_PropertyBag pb,
                                                 const char *propname,
                                                 glong value,
                                                 CORBA_Environment *ev);

`pb` : |
`propname` : |
`value` : |
`ev` : |

### bonobo_property_bag_client_set_value_gfloat ()

    void        bonobo_property_bag_client_set_value_gfloat
                                                (Bonobo_PropertyBag pb,
                                                 const char *propname,
                                                 gfloat value,
                                                 CORBA_Environment *ev);

`pb` : |
`propname` : |
`value` : |
`ev` : |

### bonobo_property_bag_client_set_value_gdouble ()

    void        bonobo_property_bag_client_set_value_gdouble
                                                (Bonobo_PropertyBag pb,
                                                 const char *propname,
                                                 gdouble value,
                                                 CORBA_Environment *ev);

`pb` : |
`propname` : |
`value` : |
`ev` : |

### bonobo_property_bag_client_set_value_string ()

    void        bonobo_property_bag_client_set_value_string
                                                (Bonobo_PropertyBag pb,
                                                 const char *propname,
                                                 const char *value,
                                                 CORBA_Environment *ev);

`pb` : |
`propname` : |
`value` : |
`ev` : |

### bonobo_property_bag_client_set_value_any ()

    void        bonobo_property_bag_client_set_value_any
                                                (Bonobo_PropertyBag pb,
                                                 const char *propname,
                                                 BonoboArg *value,
                                                 CORBA_Environment *ev);

This function sets the value of the property with name `propname` in `pb` to `value`.

`pb` : | the property bag
`propname` : | name of property to set
`value` : | value to set it to.
`ev` : | optional CORBA exception environment or NULL

### bonobo_property_bag_client_get_docstring ()

    char*       bonobo_property_bag_client_get_docstring
                                                (Bonobo_PropertyBag pb,
                                                 const char *propname,
                                                 CORBA_Environment *ev);

This function retrieves the documentation string associated with the property.

`pb` : | the property bag
`propname` : | the property name
`ev` : | optional CORBA exception environment or NULL
Returns : | the doc string.

### bonobo_property_bag_client_get_flags ()

    BonoboPropertyFlags bonobo_property_bag_client_get_flags
                                                (Bonobo_PropertyBag pb,
                                                 const char *propname,
                                                 CORBA_Environment *ev);

`pb` : | the property bag
`propname` : | the property's name
`ev` : | optional CORBA exception environment or NULL
Returns : | the flags associated with this property

## See Also

BonoboPropertyBag, BonoboProperty, BonoboPropertyControl

<<< Previous Page | Home | Up | Next Page >>>
BonoboPropertyBag | bonobo-arg