Ejemplo n.º 1
0
Archivo: dict.c Proyecto: 42p/linphone
LinphoneDictionary* lp_config_section_to_dict(const LpConfig* lpconfig, const char* section)
{
	LinphoneDictionary* dict = NULL;
	struct lp_config_to_dict fd;
	fd.config = lpconfig;
	fd.section = section;

	dict = linphone_dictionary_new();
	fd.dict = dict;

	lp_config_for_each_entry(lpconfig, section,
							 (void (*)(const char*, void*))lp_config_section_to_dict_cb,
							 &fd);

	return dict;
}
Ejemplo n.º 2
0
static void dump_section(const char *section, void *data) {
	struct _entry_data *d = (struct _entry_data *) data;
	d->section = section;
	*d->buffer = ms_strcat_printf(*d->buffer, "[%s]\n", section);
	lp_config_for_each_entry(d->conf, section, dump_entry, d);
}
Ejemplo n.º 3
0
static int processSection(const char *section, xmlNode *node, lpc2xml_context *ctx) {
	struct __processSectionCtx pc_ctx = {0, section, node, ctx};
	lp_config_for_each_entry(ctx->lpc, section, (void (*)(const char *, void *))processSection_cb, (void*)&pc_ctx);
	return pc_ctx.ret;
}