]> git.proxmox.com Git - mirror_ovs.git/blame - ovsdb/file.h
stream: Allow timeout configuration for open_block.
[mirror_ovs.git] / ovsdb / file.h
CommitLineData
120fb2ca 1/* Copyright (c) 2009, 2010, 2011, 2016, 2017 Nicira, Inc.
bd06962a
BP
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_FILE_H
17#define OVSDB_FILE_H 1
18
19#include <stdbool.h>
20#include "compiler.h"
21
22struct ovsdb;
1e19e50e 23struct ovsdb_schema;
120fb2ca 24struct ovsdb_txn;
bd06962a 25
1b1d2e6d
BP
26struct json *ovsdb_to_txn_json(const struct ovsdb *, const char *comment);
27struct json *ovsdb_file_txn_to_json(const struct ovsdb_txn *);
28struct json *ovsdb_file_txn_annotate(struct json *, const char *comment);
29struct ovsdb_error *ovsdb_file_txn_from_json(struct ovsdb *,
30 const struct json *,
31 bool converting,
32 struct ovsdb_txn **)
cab50449 33 OVS_WARN_UNUSED_RESULT;
e1ebc8ce 34
1b1d2e6d
BP
35struct ovsdb *ovsdb_file_read(const char *filename, bool rw);
36struct ovsdb *ovsdb_file_read_as_schema(const char *filename,
37 struct ovsdb_schema *);
4d0a31b6 38
1b1d2e6d
BP
39struct ovsdb_error *ovsdb_convert(const struct ovsdb *src,
40 const struct ovsdb_schema *new_schema,
41 struct ovsdb **dstp)
53178986
BP
42 OVS_WARN_UNUSED_RESULT;
43
bd06962a 44#endif /* ovsdb/file.h */