includedir = @includedir@/connman
include_HEADERS = include/types.h include/log.h include/plugin.h \
- include/notifier.h \
- include/storage.h include/service.h \
+ include/notifier.h include/service.h \
include/resolver.h include/ipconfig.h \
include/device.h include/network.h include/inet.h
+++ /dev/null
-/*
- *
- * Connection Manager
- *
- * Copyright (C) 2007-2010 Intel Corporation. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-#ifndef __CONNMAN_STORAGE_H
-#define __CONNMAN_STORAGE_H
-
-#include <connman/service.h>
-#include <connman/device.h>
-#include <connman/technology.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * SECTION:storage
- * @title: Storage premitives
- * @short_description: Functions for registering storage modules
- */
-
-#define CONNMAN_STORAGE_PRIORITY_LOW -100
-#define CONNMAN_STORAGE_PRIORITY_DEFAULT 0
-#define CONNMAN_STORAGE_PRIORITY_HIGH 100
-
-struct connman_storage {
- const char *name;
- int priority;
- enum connman_service_type service_type;
- int (*service_load) (struct connman_service *service);
- int (*service_save) (struct connman_service *service);
-};
-
-int connman_storage_register(struct connman_storage *storage);
-void connman_storage_unregister(struct connman_storage *storage);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __CONNMAN_STORAGE_H */
int __connman_resolvfile_append(const char *interface, const char *domain, const char *server);
int __connman_resolvfile_remove(const char *interface, const char *domain, const char *server);
-#include <connman/storage.h>
-
-int __connman_storage_init(void);
-void __connman_storage_cleanup(void);
-
GKeyFile *__connman_storage_open(const char *ident, const char *suffix);
void __connman_storage_close(const char *ident, const char *suffix,
GKeyFile *keyfile, gboolean save);
GKeyFile *keyfile, gboolean save);
void __connman_storage_delete_config(const char *ident);
-int __connman_storage_load_service(struct connman_service *service);
-int __connman_storage_save_service(struct connman_service *service);
-
int __connman_detect_init(void);
void __connman_detect_cleanup(void);
parse_config(config);
- __connman_storage_init();
__connman_technology_init();
__connman_notifier_init();
__connman_location_init();
__connman_location_cleanup();
__connman_notifier_cleanup();
__connman_technology_cleanup();
- __connman_storage_cleanup();
__connman_dbus_cleanup();
#define PROFILE_SUFFIX "profile"
#define CONFIG_SUFFIX "config"
-static GSList *storage_list = NULL;
-
-static gint compare_priority(gconstpointer a, gconstpointer b)
-{
- const struct connman_storage *storage1 = a;
- const struct connman_storage *storage2 = b;
-
- return storage2->priority - storage1->priority;
-}
-
-/**
- * connman_storage_register:
- * @storage: storage module
- *
- * Register a new storage module
- *
- * Returns: %0 on success
- */
-int connman_storage_register(struct connman_storage *storage)
-{
- DBG("storage %p name %s", storage, storage->name);
-
- storage_list = g_slist_insert_sorted(storage_list, storage,
- compare_priority);
-
- return 0;
-}
-
-/**
- * connman_storage_unregister:
- * @storage: storage module
- *
- * Remove a previously registered storage module
- */
-void connman_storage_unregister(struct connman_storage *storage)
-{
- DBG("storage %p name %s", storage, storage->name);
-
- storage_list = g_slist_remove(storage_list, storage);
-}
-
GKeyFile *__connman_storage_open(const char *ident, const char *suffix)
{
GKeyFile *keyfile;
{
__connman_storage_delete(ident, CONFIG_SUFFIX);
}
-
-int __connman_storage_load_service(struct connman_service *service)
-{
- GSList *list;
-
- DBG("service %p", service);
-
- for (list = storage_list; list; list = list->next) {
- struct connman_storage *storage = list->data;
-
- if (storage->service_load) {
- if (storage->service_load(service) == 0)
- return 0;
- }
- }
-
- return -ENOENT;
-}
-
-int __connman_storage_save_service(struct connman_service *service)
-{
- GSList *list;
-
- DBG("service %p", service);
-
- for (list = storage_list; list; list = list->next) {
- struct connman_storage *storage = list->data;
-
- if (storage->service_save) {
- if (storage->service_save(service) == 0)
- return 0;
- }
- }
-
- return -ENOENT;
-}
-
-int __connman_storage_init(void)
-{
- DBG("");
-
- return 0;
-}
-
-void __connman_storage_cleanup(void)
-{
- DBG("");
-}