-
Notifications
You must be signed in to change notification settings - Fork 911
/
ul_mi.h
99 lines (80 loc) · 2.92 KB
/
ul_mi.h
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
97
98
99
/*
* Copyright (C) 2006 Voice Sistem SRL
*
* This file is part of Kamailio, a free SIP server.
*
* Kamailio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version
*
* Kamailio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/*! \file
* \brief USRLOC - Usrloc MI functions
* \ingroup usrloc
*/
#ifndef _USRLOC_MI_H_
#define _USRLOC_MI_H_
#include "../../lib/kmi/mi.h"
#define MI_USRLOC_RM "ul_rm"
#define MI_USRLOC_RM_CONTACT "ul_rm_contact"
#define MI_USRLOC_DUMP "ul_dump"
#define MI_USRLOC_FLUSH "ul_flush"
#define MI_USRLOC_ADD "ul_add"
#define MI_USRLOC_SHOW_CONTACT "ul_show_contact"
/*!
* \brief Delete a address of record including its contacts
* \param cmd mi_root containing the parameter
* \param param not used
* \note expects 2 nodes: the table name and the AOR
* \return mi_root with the result
*/
struct mi_root* mi_usrloc_rm_aor(struct mi_root *cmd, void *param);
/*!
* \brief Delete a contact from an AOR record
* \param cmd mi_root containing the parameter
* \param param not used
* \note expects 3 nodes: the table name, the AOR and contact
* \return mi_root with the result or 0 on failure
*/
struct mi_root* mi_usrloc_rm_contact(struct mi_root *cmd, void *param);
/*!
* \brief Dump the content of the usrloc
* \param cmd mi_root containing the parameter
* \param param not used
* \return mi_root with the result or 0 on failure
*/
struct mi_root* mi_usrloc_dump(struct mi_root *cmd, void *param);
/*!
* \brief Flush the usrloc memory cache to DB
* \param cmd mi_root containing the parameter
* \param param not used
* \return mi_root with the result or 0 on failure
*/
struct mi_root* mi_usrloc_flush(struct mi_root *cmd, void *param);
/*!
* \brief Add a new contact for an address of record
* \param cmd mi_root containing the parameter
* \param param not used
* \note Expects 7 nodes: table name, AOR, contact, expires, Q,
* useless - backward compatible, flags, cflags, methods
* \return mi_root with the result
*/
struct mi_root* mi_usrloc_add(struct mi_root *cmd, void *param);
/*!
* \brief Dumps the contacts of an AOR
* \param cmd mi_root containing the parameter
* \param param not used
* \note expects 2 nodes: the table name and the AOR
* \return mi_root with the result or 0 on failure
*/
struct mi_root* mi_usrloc_show_contact(struct mi_root *cmd, void *param);
#endif