]> git.proxmox.com Git - mirror_ovs.git/blame - ovsdb/ovsdb-util.h
dist-docs: Include manpages generated from rST.
[mirror_ovs.git] / ovsdb / ovsdb-util.h
CommitLineData
40e66ba7
LR
1/* Copyright (c) 2009, 2010, 2011, 2012, 2013 Nicira, Inc.
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at:
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16#ifndef OVSDB_UTIL_H
17#define OVSDB_UTIL_H 1
18
19/* Database access utility functions. */
1b1d2e6d 20void ovsdb_util_clear_column(struct ovsdb_row *, const char *column_name);
40e66ba7
LR
21struct ovsdb_datum *ovsdb_util_get_datum(struct ovsdb_row *row,
22 const char *column_name,
23 const enum ovsdb_atomic_type keytype,
24 const enum ovsdb_atomic_type valtype,
25 const size_t n_max);
26const char *ovsdb_util_read_map_string_column(const struct ovsdb_row *row,
27 const char *column_name,
28 const char *key);
d6db7b3c
LR
29const struct ovsdb_row *ovsdb_util_read_map_string_uuid_column(
30 const struct ovsdb_row *r,
31 const char *column_name,
32 const char *key);
40e66ba7
LR
33const union ovsdb_atom *ovsdb_util_read_column(const struct ovsdb_row *row,
34 const char *column_name,
35 enum ovsdb_atomic_type type);
36bool ovsdb_util_read_integer_column(const struct ovsdb_row *row,
37 const char *column_name,
38 long long int *integerp);
1b1d2e6d
BP
39void ovsdb_util_write_integer_column(struct ovsdb_row *row,
40 const char *column_name,
41 long long int integer);
40e66ba7
LR
42bool ovsdb_util_read_string_column(const struct ovsdb_row *row,
43 const char *column_name,
44 const char **stringp);
6bb9b060
BP
45void ovsdb_util_write_string_column(struct ovsdb_row *row,
46 const char *column_name,
47 const char *string);
40e66ba7
LR
48void ovsdb_util_write_string_string_column(struct ovsdb_row *row,
49 const char *column_name,
50 char **keys, char **values,
51 size_t n);
52bool ovsdb_util_read_bool_column(const struct ovsdb_row *row,
53 const char *column_name,
54 bool *boolp);
55void ovsdb_util_write_bool_column(struct ovsdb_row *row,
56 const char *column_name,
57 bool value);
6bb9b060
BP
58bool ovsdb_util_read_uuid_column(const struct ovsdb_row *row,
59 const char *column_name,
60 struct uuid *);
61void ovsdb_util_write_uuid_column(struct ovsdb_row *row,
62 const char *column_name,
63 const struct uuid *);
40e66ba7
LR
64
65#endif /* ovsdb/util.h */