profile.h
Go to the documentation of this file.
160 * @brief returns the key value (if an int) from the profile. If no value set, returns the default value
175 int co_profile_set_str(co_obj_t *profile, const char *key, const size_t klen, const char *value, const size_t vlen);
178 * @brief returns the key value (if a string) from the profile. If no value set, returns the default value
184 size_t co_profile_get_str(co_obj_t *profile, char **output, const char *key, const size_t klen);
193 int co_profile_set_int(co_obj_t *profile, const char *key, const size_t klen, const signed long value);
196 * @brief returns the key value (if an int) from the profile. If no value set, returns the default value
210 int co_profile_set_uint(co_obj_t *profile, const char *key, const size_t klen, const unsigned long value);
213 * @brief returns the key value (if an unsigned int) from the profile. If no value set, returns the default value
227 int co_profile_set_float(co_obj_t *profile, const char *key, const size_t klen, const double value);
230 * @brief returns the key value (if a float) from the profile. If no value set, returns the default value
Commotion object model.
int co_schema_register_global(co_cb_t cb)
register a callback for populating global profile
Definition: profile.c:80
int co_profile_set_int(co_obj_t *profile, const char *key, const size_t klen, const signed long value)
sets a specified profile value (if an int)
Definition: profile.c:510
void co_profiles_shutdown(void)
removes the list of available profiles
Definition: profile.c:112
co_obj_t * co_profile_get(co_obj_t *profile, const co_obj_t *key)
returns the key value (if an int) from the profile. If no value set, returns the default value ...
Definition: profile.c:466
co_obj_t * co_profiles_process(co_iter_t iter, void *context)
processes all loaded profiles with specified iterator function
Definition: profile.c:697
int co_profile_import_files(const char *path)
imports available profiles from profiles directory
Definition: profile.c:348
int co_profile_set_float(co_obj_t *profile, const char *key, const size_t klen, const double value)
sets a specified profile value (if a float)
Definition: profile.c:570
void co_profile_delete_global(void)
deletes the global profile
Definition: profile.c:635
Definition: profile.h:57
co_obj_t * co_profile_find(co_obj_t *name)
searches the profile list for a specified profile
Definition: profile.c:624
co_obj_t * co_profile_global(void)
returns the global profile
Definition: profile.c:642
int co_profile_import_global(const char *path)
imports global profile
Definition: profile.c:358
Definition: obj.h:131
unsigned long co_profile_get_uint(co_obj_t *profile, const char *key, const size_t klen)
returns the key value (if an unsigned int) from the profile. If no value set, returns the default val...
Definition: profile.c:553
int co_profile_set_uint(co_obj_t *profile, const char *key, const size_t klen, const unsigned long value)
sets a specified profile value (if an unsigned int)
Definition: profile.c:540
int co_profiles_init(const size_t index_size)
creates a list of available profiles
Definition: profile.c:170
size_t co_profile_get_str(co_obj_t *profile, char **output, const char *key, const size_t klen)
returns the key value (if a string) from the profile. If no value set, returns the default value ...
Definition: profile.c:495
int co_profile_set_str(co_obj_t *profile, const char *key, const size_t klen, const char *value, const size_t vlen)
sets a specified profile value (if a string)
Definition: profile.c:482
double co_profile_get_float(co_obj_t *profile, const char *key, const size_t klen)
returns the key value (if a float) from the profile. If no value set, returns the default value ...
Definition: profile.c:583
int co_profile_add(const char *name, const size_t nlen)
adds a new profile
Definition: profile.c:157
int co_profile_remove(const char *name, const size_t nlen)
removes profile with given name
Definition: profile.c:142
signed long co_profile_get_int(co_obj_t *profile, const char *key, const size_t klen)
returns the key value (if an int) from the profile. If no value set, returns the default value ...
Definition: profile.c:523
int co_schema_register(co_cb_t cb)
register a callback for populating a profile schema
Definition: profile.c:70
Definition: profile.h:69
int co_profile_export_file(co_obj_t *profile, const char *path)
exports a profile in memory to a file
Definition: profile.c:678
Generated on Fri Jun 6 2014 13:22:05 for commotiond by 1.8.7