diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2012-09-25 18:45:12 +0300 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2012-09-25 18:45:12 +0300 |
commit | e39e4ca5058d9a0aa45ace39a68705344f487c8d (patch) | |
tree | 5c51b16a37503b7be086c6a76271a69d48b6bad1 | |
parent | 5ca45764738fde7f4efb8c20e154f7c2b8f42a5e (diff) |
core: Add simple adapter probe function to external profiles
-rw-r--r-- | src/profile.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/profile.c b/src/profile.c index 0d082f89..35ba6c21 100644 --- a/src/profile.c +++ b/src/profile.c @@ -38,6 +38,7 @@ #include "error.h" #include "dbus-common.h" #include "adapter.h" +#include "manager.h" #include "device.h" #include "profile.h" @@ -106,6 +107,23 @@ static struct ext_profile *find_ext_profile(const char *owner, return NULL; } +static int ext_adapter_probe(struct btd_profile *p, + struct btd_adapter *adapter) +{ + struct ext_profile *ext; + GSList *l; + + l = g_slist_find(ext_profiles, p); + if (!l) + return -ENOENT; + + ext = l->data; + + DBG("External profile %s probed", ext->name); + + return 0; +} + static struct ext_profile *create_ext(const char *owner, const char *path, const char *uuid, DBusMessageIter *opts) @@ -123,11 +141,14 @@ static struct ext_profile *create_ext(const char *owner, const char *path, p = &ext->p; p->name = ext->name; + p->adapter_probe = ext_adapter_probe; DBG("External profile %s created", ext->name); ext_profiles = g_slist_append(ext_profiles, ext); + manager_foreach_adapter(adapter_add_profile, &ext->p); + return ext; } |