]>
Commit | Line | Data |
---|---|---|
f199df26 EA |
1 | /* Copyright (C) 2016 Hewlett Packard Enterprise Development LP |
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_MAP_OP_H | |
18 | #define OVSDB_MAP_OP_H 1 | |
19 | ||
20 | #include "ovsdb-data.h" | |
21 | ||
9131abe2 YHW |
22 | #ifdef __cplusplus |
23 | extern "C" { | |
24 | #endif | |
25 | ||
f199df26 EA |
26 | enum map_op_type { |
27 | MAP_OP_UPDATE, | |
28 | MAP_OP_INSERT, | |
29 | MAP_OP_DELETE | |
30 | }; | |
31 | ||
32 | struct map_op; /* Map Operation: a Partial Map Update */ | |
33 | struct map_op_list; /* List of Map Operations */ | |
34 | ||
35 | /* Map Operation functions */ | |
36 | struct map_op *map_op_create(struct ovsdb_datum *, enum map_op_type); | |
37 | void map_op_destroy(struct map_op *, const struct ovsdb_type *); | |
38 | struct ovsdb_datum *map_op_datum(const struct map_op*); | |
39 | enum map_op_type map_op_type(const struct map_op*); | |
40 | ||
41 | /* Map Operation List functions */ | |
42 | struct map_op_list *map_op_list_create(void); | |
43 | void map_op_list_destroy(struct map_op_list *, const struct ovsdb_type *); | |
44 | void map_op_list_add(struct map_op_list *, struct map_op *, | |
45 | const struct ovsdb_type *); | |
46 | struct map_op *map_op_list_first(struct map_op_list *); | |
47 | struct map_op *map_op_list_next(struct map_op_list *, struct map_op *); | |
48 | ||
9131abe2 YHW |
49 | #ifdef __cplusplus |
50 | } | |
51 | #endif | |
52 | ||
f199df26 | 53 | #endif /* ovsdb-map-op.h */ |