device: Remove device persistent code
[platform/upstream/connman.git] / include / storage.h
1 /*
2  *
3  *  Connection Manager
4  *
5  *  Copyright (C) 2007-2010  Intel Corporation. All rights reserved.
6  *
7  *  This program is free software; you can redistribute it and/or modify
8  *  it under the terms of the GNU General Public License version 2 as
9  *  published by the Free Software Foundation.
10  *
11  *  This program is distributed in the hope that it will be useful,
12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  *  GNU General Public License for more details.
15  *
16  *  You should have received a copy of the GNU General Public License
17  *  along with this program; if not, write to the Free Software
18  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19  *
20  */
21
22 #ifndef __CONNMAN_STORAGE_H
23 #define __CONNMAN_STORAGE_H
24
25 #include <connman/profile.h>
26 #include <connman/service.h>
27 #include <connman/device.h>
28 #include <connman/technology.h>
29
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33
34 /**
35  * SECTION:storage
36  * @title: Storage premitives
37  * @short_description: Functions for registering storage modules
38  */
39
40 #define CONNMAN_STORAGE_PRIORITY_LOW      -100
41 #define CONNMAN_STORAGE_PRIORITY_DEFAULT     0
42 #define CONNMAN_STORAGE_PRIORITY_HIGH      100
43
44 struct connman_storage {
45         const char *name;
46         int priority;
47         int (*profile_init) (void);
48         int (*profile_load) (struct connman_profile *profile);
49         int (*profile_save) (struct connman_profile *profile);
50         enum connman_service_type service_type;
51         int (*service_load) (struct connman_service *service);
52         int (*service_save) (struct connman_service *service);
53         int (*tech_load) (struct connman_technology *technology);
54         int (*tech_save) (struct connman_technology *technology);
55 };
56
57 int connman_storage_register(struct connman_storage *storage);
58 void connman_storage_unregister(struct connman_storage *storage);
59
60 #ifdef __cplusplus
61 }
62 #endif
63
64 #endif /* __CONNMAN_STORAGE_H */