summaryrefslogtreecommitdiffstats
path: root/binding/identity-binding.c
blob: a0e9232b236cbbdbdbe071ecdedf356e8f762852 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#define _GNU_SOURCE
#define AFB_BINDING_PRAGMA_NO_VERBOSE_MACRO

#include <string.h>
#include <json-c/json.h>
#include <afb/afb-binding-v2.h>
#include <afb/afb-req-v2.h>
#include <afb/afb-req-itf.h>

// ---------- Verb's declaration ----------------------------------------------
static void verb_login(struct afb_req req);
static void verb_logout(struct afb_req req);
static void verb_open_session(struct afb_req req);
static void verb_close_session(struct afb_req req);
static void verb_set_data(struct afb_req req);
static void verb_get_data(struct afb_req req);

// ---------- Binding's metadata ----------------------------------------------
static const struct afb_auth _afb_auth_v2_identity[] = {};

static const struct afb_verb_v2 _afb_verbs_v2_identity[] =
{
	{
		.verb = "login",
		.callback = verb_login,
		.auth = NULL,
		.session = 0,
	},
	{
		.verb = "logout",
		.callback = verb_logout,
		.auth = NULL,
		.session = 0,
	},
	{
		.verb = "open_session",
		.callback = verb_open_session,
		.auth = NULL,
		.session = 0,
	},
	{
		.verb = "close_session",
		.callback = verb_close_session,
		.auth = NULL,
		.session = 0,
	},
	{
		.verb = "get_data",
		.callback = verb_get_data,
		.auth = NULL,
		.session = 0,
	},
	{
		.verb = "set_data",
		.callback = set_data,
		.auth = NULL,
		.session = 0,
	},
	{ .verb = NULL }
};

static const struct afb_binding_v2 _afb_binding_v2_identity =
{
	.api = "identity",
	.specification = NULL,
	.verbs = _afb_verbs_v2_identity,
	.preinit = NULL,
	.init = NULL,
	.onevent = NULL
};

// ---------- Verb's implementation -------------------------------------------

static void verb_login(struct afb_req req)
{
}

static void verb_logout(struct afb_req req)
{
}

static void verb_open_session(struct afb_req req)
{
}

static void verb_close_session(struct afb_req req)
{
}

static void verb_get_data(struct afb_req req)
{
}

static void verb_set_data(struct afb_req req)
{
}