diff options
author | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2008-08-27 17:13:41 -0300 |
---|---|---|
committer | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2008-08-28 19:06:20 -0300 |
commit | 506c95298346d318304aa7e2211dfba5dbe6e3e0 (patch) | |
tree | 62af6becaa65369986bdc25a31572841f972bd26 /src/manager.c | |
parent | 5ec5ef30ffd7e743499462bd7b3bfde0e65e2bb4 (diff) |
Storage cleanup
Diffstat (limited to 'src/manager.c')
-rw-r--r-- | src/manager.c | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/src/manager.c b/src/manager.c index 0b6af1b5..2caaadf7 100644 --- a/src/manager.c +++ b/src/manager.c @@ -37,8 +37,6 @@ #include <bluetooth/bluetooth.h> #include <bluetooth/hci.h> #include <bluetooth/hci_lib.h> -#include <bluetooth/sdp.h> -#include <bluetooth/sdp_lib.h> #include <glib.h> @@ -47,7 +45,6 @@ #include <gdbus.h> #include "logging.h" -#include "textfile.h" #include "adapter.h" #include "error.h" #include "manager.h" @@ -89,43 +86,6 @@ int manager_set_adapter_class(uint16_t dev_id, uint8_t *cls) return adapter_set_class(adapter, cls); } -int get_device_alias(uint16_t dev_id, const bdaddr_t *bdaddr, char *alias, size_t size) -{ - struct adapter *adapter = manager_find_adapter_by_id(dev_id); - char filename[PATH_MAX + 1], addr[18], *tmp; - int err; - const gchar *source = adapter_get_address(adapter); - - create_name(filename, PATH_MAX, STORAGEDIR, source, "aliases"); - - ba2str(bdaddr, addr); - - tmp = textfile_get(filename, addr); - if (!tmp) - return -ENXIO; - - err = snprintf(alias, size, "%s", tmp); - - free(tmp); - - return err; -} - -int set_device_alias(uint16_t dev_id, const bdaddr_t *bdaddr, const char *alias) -{ - struct adapter *adapter = manager_find_adapter_by_id(dev_id); - const gchar *source = adapter_get_address(adapter); - char filename[PATH_MAX + 1], addr[18]; - - create_name(filename, PATH_MAX, STORAGEDIR, source, "aliases"); - - create_file(filename, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); - - ba2str(bdaddr, addr); - - return textfile_put(filename, addr, alias); -} - static inline DBusMessage *invalid_args(DBusMessage *msg) { return g_dbus_create_error(msg, |