]> git.proxmox.com Git - mirror_ovs.git/blame - lib/ovsdb-set-op.h
ovsdb: Add/use partial set updates.
[mirror_ovs.git] / lib / ovsdb-set-op.h
CommitLineData
f1ab6e06
RM
1/* Copyright (C) 2016, IBM
2 * All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License"); you may
5 * not use this file except in compliance with the License. You may obtain
6 * a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 * License for the specific language governing permissions and limitations
14 * under the License.
15 */
16
17#ifndef OVSDB_SET_OP_H
18#define OVSDB_SET_OP_H 1
19
20#include "ovsdb-data.h"
21
22enum set_op_type {
23 SET_OP_INSERT,
24 SET_OP_DELETE
25};
26
27struct set_op; /* Set Operation: a Partial Set Update */
28struct set_op_list; /* List of Set Operations */
29
30/* Set Operation functions */
31struct set_op *set_op_create(struct ovsdb_datum *, enum set_op_type);
32void set_op_destroy(struct set_op *, const struct ovsdb_type *);
33struct ovsdb_datum *set_op_datum(const struct set_op*);
34enum set_op_type set_op_type(const struct set_op*);
35
36/* Set Operation List functions */
37struct set_op_list *set_op_list_create(void);
38void set_op_list_destroy(struct set_op_list *, const struct ovsdb_type *);
39void set_op_list_add(struct set_op_list *, struct set_op *,
40 const struct ovsdb_type *);
41struct set_op *set_op_list_first(struct set_op_list *);
42struct set_op *set_op_list_next(struct set_op_list *, struct set_op *);
43
44#endif /* ovsdb-set-op.h */