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