a76f63544533f0404f7711a10c1a621c6045df17Pavel Březina Pavel Březina <pbrezina@redhat.com>
a76f63544533f0404f7711a10c1a621c6045df17Pavel Březina Copyright (C) 2015 Red Hat
a76f63544533f0404f7711a10c1a621c6045df17Pavel Březina This program is free software; you can redistribute it and/or modify
a76f63544533f0404f7711a10c1a621c6045df17Pavel Březina it under the terms of the GNU General Public License as published by
a76f63544533f0404f7711a10c1a621c6045df17Pavel Březina the Free Software Foundation; either version 3 of the License, or
a76f63544533f0404f7711a10c1a621c6045df17Pavel Březina (at your option) any later version.
a76f63544533f0404f7711a10c1a621c6045df17Pavel Březina This program is distributed in the hope that it will be useful,
a76f63544533f0404f7711a10c1a621c6045df17Pavel Březina but WITHOUT ANY WARRANTY; without even the implied warranty of
a76f63544533f0404f7711a10c1a621c6045df17Pavel Březina MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
a76f63544533f0404f7711a10c1a621c6045df17Pavel Březina GNU General Public License for more details.
a76f63544533f0404f7711a10c1a621c6045df17Pavel Březina You should have received a copy of the GNU General Public License
a76f63544533f0404f7711a10c1a621c6045df17Pavel Březina along with this program. If not, see <http://www.gnu.org/licenses/>.
cf1109e30320a994187edeb438ac7cdc36f0dd2bPetr Cech * Open colon DB and return connection.
cf1109e30320a994187edeb438ac7cdc36f0dd2bPetr Cech * @param[in|out] mem_ctx Memory context. Internal sss_colondb_close() is set
cf1109e30320a994187edeb438ac7cdc36f0dd2bPetr Cech * on destructor of this memory context.
cf1109e30320a994187edeb438ac7cdc36f0dd2bPetr Cech * @param[in] mode Open mode of db: SSS_COLONDB_READ or SSS_COLONDB_WRITE.
cf1109e30320a994187edeb438ac7cdc36f0dd2bPetr Cech * @param[in] filename Name of file.
cf1109e30320a994187edeb438ac7cdc36f0dd2bPetr Cech * @return Pointer to structure holding DB connection, or NULL if fail.
a76f63544533f0404f7711a10c1a621c6045df17Pavel Březinastruct sss_colondb *sss_colondb_open(TALLOC_CTX *mem_ctx,
cf1109e30320a994187edeb438ac7cdc36f0dd2bPetr Cech * Read line from colon DB.
cf1109e30320a994187edeb438ac7cdc36f0dd2bPetr Cech * @param[in|out] mem_ctx Memory context.
cf1109e30320a994187edeb438ac7cdc36f0dd2bPetr Cech * @param[in] db Pointer to structure holding DB connection.
cf1109e30320a994187edeb438ac7cdc36f0dd2bPetr Cech * @param[in|out] table Array of expected structure of line. It is expected
cf1109e30320a994187edeb438ac7cdc36f0dd2bPetr Cech * that last item has SSS_COLONDB_SENTINEL type.
cf1109e30320a994187edeb438ac7cdc36f0dd2bPetr Cech * @return EOK if success, else error code.
a76f63544533f0404f7711a10c1a621c6045df17Pavel Březinaerrno_t sss_colondb_readline(TALLOC_CTX *mem_ctx,
cf1109e30320a994187edeb438ac7cdc36f0dd2bPetr Cech * Write line to colon DB.
cf1109e30320a994187edeb438ac7cdc36f0dd2bPetr Cech * @param[in] db Pointer to structure holding DB connection.
cf1109e30320a994187edeb438ac7cdc36f0dd2bPetr Cech * @param[in] table Array with data. It is expected that last item has
cf1109e30320a994187edeb438ac7cdc36f0dd2bPetr Cech * SSS_COLONDB_SENTINEL type.
cf1109e30320a994187edeb438ac7cdc36f0dd2bPetr Cech * @return EOK if success, else error code.
a76f63544533f0404f7711a10c1a621c6045df17Pavel Březinaerrno_t sss_colondb_writeline(struct sss_colondb *db,
a76f63544533f0404f7711a10c1a621c6045df17Pavel Březina#endif /* _SSS_COLONDB_H_ */