![]() |
![]() |
![]() |
Rhythmbox Development Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
RBStringValueMap; RBStringValueMapClass; RBStringValueMap * rb_string_value_map_new (void
); void rb_string_value_map_set (RBStringValueMap *map
,const char *key
,const GValue *value
); gboolean rb_string_value_map_get (RBStringValueMap *map
,const char *key
,GValue *out
); const GValue* rb_string_value_map_peek (RBStringValueMap *map
,const char *key
); gboolean rb_string_value_map_remove (RBStringValueMap *map
,const char *key
); guint rb_string_value_map_size (RBStringValueMap *map
); GHashTable* rb_string_value_map_steal_hashtable (RBStringValueMap *map
);
Simplifies the use of string:GValue maps with respect to copying of the values inserted into the map. Except for rb_string_value_map_peek, the caller retains ownership of values passed in, and assumes ownership of all values returned.
RBStringValueMap * rb_string_value_map_new (void
);
Creates a new RBStringValueMap
Returns : |
new empty RBStringValueMap |
void rb_string_value_map_set (RBStringValueMap *map
,const char *key
,const GValue *value
);
Inserts a value into the map. The value is copied.
|
a RBStringValueMap |
|
key to set |
|
value to store |
gboolean rb_string_value_map_get (RBStringValueMap *map
,const char *key
,GValue *out
);
Locates and copies the value associated with the key.
|
a RBStringValueMap |
|
key to retrieve |
|
returns a copy of the value in the map |
Returns : |
TRUE if the value was found
|
const GValue* rb_string_value_map_peek (RBStringValueMap *map
,const char *key
);
Locates the value associated with the key. This returns the GValue stored in the map, so it cannot be modified.
|
a RBStringValueMap |
|
key to retrieve |
Returns : |
the GValue associated with the key |
gboolean rb_string_value_map_remove (RBStringValueMap *map
,const char *key
);
Removes a value from the map.
|
a RBStringValueMap |
|
key to remove |
Returns : |
TRUE if the value was found and removed
|
guint rb_string_value_map_size (RBStringValueMap *map
);
Returns the number of entries in the map.
|
a RBStringValueMap |
Returns : |
number of entries |
GHashTable* rb_string_value_map_steal_hashtable (RBStringValueMap *map
);
Extracts and returns the underlying hash table from the map, and creates a new empty map.
|
a RBStringValueMap |
Returns : |
GHashTable from the map |