1a85aa543STrond Norbye#include <stdio.h>
2a85aa543STrond Norbye#include <stdlib.h>
3a85aa543STrond Norbye#include <string.h>
4d0366df5STrond Norbye#include <platform/cbassert.h>
5a85aa543STrond Norbye
6a85aa543STrond Norbye#include <libconflate/conflate.h>
7a85aa543STrond Norbye#include "conflate_internal.h"
8a85aa543STrond Norbye
9a85aa543STrond Norbye/** \private */
10a85aa543STrond Norbyestruct command_def {
11a85aa543STrond Norbye    char *name;
12a85aa543STrond Norbye    char *description;
13a85aa543STrond Norbye    conflate_mgmt_cb_t cb;
14a85aa543STrond Norbye    struct command_def *next;
15a85aa543STrond Norbye};
16a85aa543STrond Norbye
17a85aa543STrond Norbyestruct command_def *commands = NULL;
18a85aa543STrond Norbye
19a85aa543STrond Norbyevoid* run_conflate(void *arg);
20a85aa543STrond Norbye
21a85aa543STrond Norbyevoid conflate_init_form(conflate_form_result *r)
22a85aa543STrond Norbye{
23a85aa543STrond Norbye    (void)r;
24a85aa543STrond Norbye}
25a85aa543STrond Norbye
26a85aa543STrond Norbyevoid conflate_next_fieldset(conflate_form_result *r) {
27a85aa543STrond Norbye    (void)r;
28d0366df5STrond Norbye    cb_assert(0);
29a85aa543STrond Norbye}
30a85aa543STrond Norbye
31a85aa543STrond Norbyevoid conflate_add_field(conflate_form_result *r, const char *k, const char *v) {
32a85aa543STrond Norbye    (void)r;
33a85aa543STrond Norbye    (void)k;
34a85aa543STrond Norbye    (void)v;
35d0366df5STrond Norbye    cb_assert(0);
36a85aa543STrond Norbye}
37a85aa543STrond Norbye
38a85aa543STrond Norbyevoid conflate_add_field_multi(conflate_form_result *r, const char *k,
39a85aa543STrond Norbye                              const char **v) {
40a85aa543STrond Norbye    (void)r;
41a85aa543STrond Norbye    (void)k;
42a85aa543STrond Norbye    (void)v;
43d0366df5STrond Norbye    cb_assert(0);
44a85aa543STrond Norbye}
45a85aa543STrond Norbye
46a85aa543STrond Norbyevoid* run_conflate(void *arg) {
47a85aa543STrond Norbye    (void)arg;
48d0366df5STrond Norbye    cb_assert(0);
49a85aa543STrond Norbye    return NULL;
50a85aa543STrond Norbye}
51a85aa543STrond Norbye
52a85aa543STrond Norbye/* ------------------------------------------------------------------------ */
53a85aa543STrond Norbye
54a85aa543STrond Norbyevoid conflate_register_mgmt_cb(const char *cmd, const char *desc,
55a85aa543STrond Norbye                               conflate_mgmt_cb_t cb)
56a85aa543STrond Norbye{
57a85aa543STrond Norbye    struct command_def *c = calloc(1, sizeof(struct command_def));
58d0366df5STrond Norbye    cb_assert(c);
59a85aa543STrond Norbye
60a85aa543STrond Norbye    c->name = safe_strdup(cmd);
61a85aa543STrond Norbye    c->description = safe_strdup(desc);
62a85aa543STrond Norbye    c->cb = cb;
63a85aa543STrond Norbye    c->next = commands;
64a85aa543STrond Norbye
65a85aa543STrond Norbye    commands = c;
66a85aa543STrond Norbye}
67