]> git.proxmox.com Git - mirror_ovs.git/blame - ovsdb/transaction.h
ovs-command-completion: Fix unwanted whitespace.
[mirror_ovs.git] / ovsdb / transaction.h
CommitLineData
e0edde6f 1/* Copyright (c) 2009, 2010 Nicira, Inc.
f85f8ebb
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_TRANSACTION_H
17#define OVSDB_TRANSACTION_H 1
18
19#include <stdbool.h>
20#include "compiler.h"
21
bd06962a 22struct json;
f85f8ebb
BP
23struct ovsdb;
24struct ovsdb_table;
25struct uuid;
26
27struct ovsdb_txn *ovsdb_txn_create(struct ovsdb *);
28void ovsdb_txn_abort(struct ovsdb_txn *);
5f8e3213
JP
29struct ovsdb_error *ovsdb_txn_commit(struct ovsdb_txn *, bool durable)
30 WARN_UNUSED_RESULT;
f85f8ebb
BP
31
32struct ovsdb_row *ovsdb_txn_row_modify(struct ovsdb_txn *,
33 const struct ovsdb_row *);
f85f8ebb
BP
34void ovsdb_txn_row_insert(struct ovsdb_txn *, struct ovsdb_row *);
35void ovsdb_txn_row_delete(struct ovsdb_txn *, const struct ovsdb_row *);
36
bd06962a
BP
37typedef bool ovsdb_txn_row_cb_func(const struct ovsdb_row *old,
38 const struct ovsdb_row *new,
17d18afb 39 const unsigned long int *changed,
bd06962a
BP
40 void *aux);
41void ovsdb_txn_for_each_change(const struct ovsdb_txn *,
42 ovsdb_txn_row_cb_func *, void *aux);
43
d171b584
BP
44void ovsdb_txn_add_comment(struct ovsdb_txn *, const char *);
45const char *ovsdb_txn_get_comment(const struct ovsdb_txn *);
46
f85f8ebb 47#endif /* ovsdb/transaction.h */