2 * (c) 2010 Cyrill Gorcunov, gorcunov@gmail.com
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or (at
7 * your option) any later version.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
20 #ifndef BACKEND_PROTO_H
21 #define BACKEND_PROTO_H
25 enum backend_protocols
{
29 BACKEND_PROTO_ID_UTILS
,
35 struct backend_proto_item
{
43 struct backend_proto_query_params
{
59 struct backend_proto
{
60 enum backend_protocols protocol
;
61 const char *protocol_name
;
62 struct list_head
* (*backend_proto_query
)(struct backend_proto_query_params
*params
);
63 int (*backend_proto_get
)(struct list_head
*entry
, struct backend_proto_item
*item
);
64 int (*backend_proto_lookup
)(struct list_head
*head
, struct backend_proto_item
*item
, unsigned long key
);
65 void (*backend_proto_destory
)(struct list_head
*head
);
66 void (*backend_proto_refresh
)(void);
69 struct backend_proto
*backend_proto_register(struct backend_proto
*proto
);
70 void backend_proto_unregister(struct backend_proto
*proto
);
71 struct backend_proto
*backend_proto_find(enum backend_protocols proto
);
73 #endif /* BACKEND_PROTO_H */