summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2011-07-25 17:15:51 -0300
committerJohan Hedberg <johan.hedberg@intel.com>2011-08-03 12:20:36 +0300
commitd5466d15d3c567b738c2ced8433f6bd4faa4d179 (patch)
tree9b8ec45c94b148e4e4d0288dd7c9502fac41bfbf
parentb3ccd8541f7533ec0380433ba826247bf8647240 (diff)
Add Proximity Reporter skeleton
-rw-r--r--Makefile.am3
-rw-r--r--proximity/manager.c4
-rw-r--r--proximity/reporter.c47
-rw-r--r--proximity/reporter.h26
4 files changed, 78 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am
index 7eadf824c..0203ffacd 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -195,7 +195,8 @@ if PROXIMITYPLUGIN
builtin_modules += proximity
builtin_sources += proximity/main.c \
proximity/manager.h proximity/manager.c \
- proximity/monitor.h proximity/monitor.c
+ proximity/monitor.h proximity/monitor.c \
+ proximity/reporter.h proximity/reporter.c
endif
if SERVICEPLUGIN
diff --git a/proximity/manager.c b/proximity/manager.c
index 4b07108dc..f49d06619 100644
--- a/proximity/manager.c
+++ b/proximity/manager.c
@@ -32,6 +32,7 @@
#include "adapter.h"
#include "device.h"
#include "monitor.h"
+#include "reporter.h"
#include "manager.h"
#define LINK_LOSS_UUID "00001803-0000-1000-8000-00805f9b34fb"
@@ -73,11 +74,12 @@ int proximity_manager_init(DBusConnection *conn)
return ret;
}
- return 0;
+ return reporter_init();
}
void proximity_manager_exit(void)
{
+ reporter_exit();
monitor_unregister(connection);
btd_unregister_device_driver(&monitor_driver);
dbus_connection_unref(connection);
diff --git a/proximity/reporter.c b/proximity/reporter.c
new file mode 100644
index 000000000..e8fd36853
--- /dev/null
+++ b/proximity/reporter.c
@@ -0,0 +1,47 @@
+/*
+ *
+ * BlueZ - Bluetooth protocol stack for Linux
+ *
+ * Copyright (C) 2011 Nokia Corporation
+ * Copyright (C) 2011 Marcel Holtmann <marcel@holtmann.org>
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "log.h"
+
+#include "reporter.h"
+
+int reporter_init(void)
+{
+ /*
+ * TODO: Create/Update Proximity Reporter Characteristics
+ * for Link Loss, Path Loss and Immediate Alert Services.
+ */
+
+ DBG("Proximity Reporter");
+
+ return 0;
+}
+
+void reporter_exit(void)
+{
+}
diff --git a/proximity/reporter.h b/proximity/reporter.h
new file mode 100644
index 000000000..ea6b83d72
--- /dev/null
+++ b/proximity/reporter.h
@@ -0,0 +1,26 @@
+/*
+ *
+ * BlueZ - Bluetooth protocol stack for Linux
+ *
+ * Copyright (C) 2011 Nokia Corporation
+ * Copyright (C) 2011 Marcel Holtmann <marcel@holtmann.org>
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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
+ *
+ */
+
+int reporter_init(void);
+void reporter_exit(void);