Initialize Tizen 2.3
[framework/connectivity/bluez.git] / mobile / src / textfile.h
1 /*
2  *
3  *  BlueZ - Bluetooth protocol stack for Linux
4  *
5  *  Copyright (C) 2004-2010  Marcel Holtmann <marcel@holtmann.org>
6  *
7  *
8  *  This program is free software; you can redistribute it and/or modify
9  *  it under the terms of the GNU General Public License as published by
10  *  the Free Software Foundation; either version 2 of the License, or
11  *  (at your option) any later version.
12  *
13  *  This program is distributed in the hope that it will be useful,
14  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  *  GNU General Public License for more details.
17  *
18  *  You should have received a copy of the GNU General Public License
19  *  along with this program; if not, write to the Free Software
20  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
21  *
22  */
23
24 #ifndef __TEXTFILE_H
25 #define __TEXTFILE_H
26
27 int create_dirs(const char *filename, const mode_t mode);
28 int create_file(const char *filename, const mode_t mode);
29 int create_name(char *buf, size_t size, const char *path,
30                                 const char *address, const char *name);
31
32 int textfile_put(const char *pathname, const char *key, const char *value);
33 int textfile_caseput(const char *pathname, const char *key, const char *value);
34 int textfile_del(const char *pathname, const char *key);
35 int textfile_casedel(const char *pathname, const char *key);
36 char *textfile_get(const char *pathname, const char *key);
37 char *textfile_caseget(const char *pathname, const char *key);
38
39 typedef void (*textfile_cb) (char *key, char *value, void *data);
40
41 int textfile_foreach(const char *pathname, textfile_cb func, void *data);
42
43 #endif /* __TEXTFILE_H */