Path: blob/next/external/cache/sources/hcitools/textfile.h
8391 views
/*1*2* BlueZ - Bluetooth protocol stack for Linux3*4* Copyright (C) 2004-2010 Marcel Holtmann <[email protected]>5*6*7* This program is free software; you can redistribute it and/or modify8* it under the terms of the GNU General Public License as published by9* the Free Software Foundation; either version 2 of the License, or10* (at your option) any later version.11*12* This program is distributed in the hope that it will be useful,13* but WITHOUT ANY WARRANTY; without even the implied warranty of14* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the15* GNU General Public License for more details.16*17* You should have received a copy of the GNU General Public License18* along with this program; if not, write to the Free Software19* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA20*21*/2223#ifndef __TEXTFILE_H24#define __TEXTFILE_H2526int create_file(const char *filename, const mode_t mode);27int create_name(char *buf, size_t size, const char *path,28const char *address, const char *name);2930int textfile_put(const char *pathname, const char *key, const char *value);31int textfile_del(const char *pathname, const char *key);32char *textfile_get(const char *pathname, const char *key);3334typedef void (*textfile_cb) (char *key, char *value, void *data);3536int textfile_foreach(const char *pathname, textfile_cb func, void *data);3738#endif /* __TEXTFILE_H */394041