Open Source Telephony
 help / color / mirror / Atom feed
* [RFC PATCH 0/4] Atom for Neighbour Cell Info
@ 2010-12-21 14:00 Antti Paila
  2010-12-21 14:00 ` [RFC PATCH 1/4] cell-info: Atom for ECID info of neighb cells Antti Paila
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Antti Paila @ 2010-12-21 14:00 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 382 bytes --]

 This series of patches implements an interface for client
 application to fetch the ECID information of neighbouring
 cells using DBUS.

 src/cell-info.c |  537 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 include/cell-info.h |   66 +++++++++++++++++++++++++++++++++++++++++++++++++++
 include/dbus.h |    1 +
 src/ofono.h    |    1 +
 Makefile.am |    4 ++--

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [RFC PATCH 1/4] cell-info: Atom for ECID info of neighb cells
  2010-12-21 14:00 [RFC PATCH 0/4] Atom for Neighbour Cell Info Antti Paila
@ 2010-12-21 14:00 ` Antti Paila
  2010-12-21 14:00 ` [RFC PATCH 2/4] cell-info: Header file for cell-info atom Antti Paila
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Antti Paila @ 2010-12-21 14:00 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 12723 bytes --]

---
 src/cell-info.c |  537 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 537 insertions(+), 0 deletions(-)
 create mode 100644 src/cell-info.c

diff --git a/src/cell-info.c b/src/cell-info.c
new file mode 100644
index 0000000..13ae03c
--- /dev/null
+++ b/src/cell-info.c
@@ -0,0 +1,537 @@
+/*
+ *
+ *  oFono - Open Source Telephony
+ *
+ *  Copyright (C) 2008-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
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+#include <stdio.h>
+#include <errno.h>
+
+#include <glib.h>
+#include <gdbus.h>
+#include <sys/time.h>
+
+#include "ofono.h"
+
+#include "common.h"
+#include "util.h"
+#include "ofono/cell-info.h"
+
+#define OFONO_MAX_NMR_COUNT 15
+#define OFONO_MAX_MEASURED_CELL_COUNT 32
+#define OFONO_MAX_MEAS_RES_LIST_COUNT 8
+
+
+enum ofono_cell_type {
+	OFONO_CELL_TYPE_GERAN,
+	OFONO_CELL_TYPE_UTRA_FDD
+};
+
+enum UTRA_MEAS_TYPE {
+	UTRA_MEAS_TYPE_INTER_FREQ,
+	UTRA_MEAS_TYPE_INTRA_FREQ,
+};
+
+struct gsm {
+	int lac;
+	int ci;
+	int ta;
+	int no_cells;
+	struct {
+		int arfcn;
+		int bsic;
+		int rxlev;
+
+	} nmr[OFONO_MAX_NMR_COUNT];
+};
+
+struct cell_measured_results {
+	int ucid;
+	int sc;
+	int ecn0;
+	int rscp;
+	int pathloss;
+};
+
+struct measured_results_list {
+	int dl_freq;
+	int ul_freq;
+	int rssi;
+	int no_cells;
+	struct cell_measured_results cmr[OFONO_MAX_MEASURED_CELL_COUNT];
+};
+
+struct wcdma {
+	int ucid;
+	int dl_freq;
+	int ul_freq;
+	int sc;
+	int no_freq;
+	struct measured_results_list mrl[OFONO_MAX_MEAS_RES_LIST_COUNT];
+
+};
+
+struct ofono_cell_info_results {
+	enum ofono_cell_type rat;
+	int mcc;
+	int mnc;
+	union {
+		struct gsm gsm;
+		struct wcdma wcdma;
+	};
+
+};
+
+struct ofono_cell_info {
+	DBusMessage *pending;
+	struct ofono_atom *atom;
+	const struct ofono_cell_info_driver *driver;
+	struct ofono_cell_info_results cir;
+	void *driver_data;
+};
+
+
+static DBusMessage *ci_get_cells(DBusConnection *, DBusMessage *, void *);
+
+static GSList *g_drivers = NULL;
+
+static GDBusMethodTable ci_methods[] = {
+	{ "GetProperties",	"",	"a{sv}aa{sv}",	ci_get_cells },
+	{ }
+};
+
+static GDBusSignalTable ci_signals[] = {
+	{ }
+};
+
+int ofono_cell_info_driver_register(struct ofono_cell_info_driver *driver)
+{
+	DBG("driver: %p, name: %s", driver, driver->name);
+
+	if (driver->probe == NULL)
+		return -EINVAL;
+
+	g_drivers = g_slist_prepend(g_drivers, (void *) driver);
+
+	return 0;
+}
+
+void ofono_cell_info_driver_unregister(struct ofono_cell_info_driver *driver)
+{
+	DBG("driver: %p, name: %s", driver, driver->name);
+
+	g_drivers = g_slist_remove(g_drivers, (void *) driver);
+}
+
+void ofono_cell_info_remove(struct ofono_cell_info *ci)
+{
+	__ofono_atom_free(ci->atom);
+}
+
+static void cell_info_unregister(struct ofono_atom *atom)
+{
+	struct ofono_cell_info *ci = __ofono_atom_get_data(atom);
+	const char *path = __ofono_atom_get_path(ci->atom);
+	DBusConnection *conn = ofono_dbus_get_connection();
+	struct ofono_modem *modem = __ofono_atom_get_modem(ci->atom);
+
+	ofono_modem_remove_interface(modem, OFONO_CELL_INFO_INTERFACE);
+
+	if(!g_dbus_unregister_interface(conn, path, OFONO_CELL_INFO_INTERFACE))
+		ofono_error("Failed to unregister interface %s",
+				OFONO_CELL_INFO_INTERFACE);
+}
+
+static void cell_info_remove(struct ofono_atom *atom)
+{
+	struct ofono_cell_info *ci = __ofono_atom_get_data(atom);
+	DBG("atom: %p", atom);
+
+	if (ci == NULL)
+		return;
+
+	if (ci->driver && ci->driver->remove)
+		ci->driver->remove(ci);
+
+	g_free(ci);
+}
+
+void ofono_cell_info_register(struct ofono_cell_info *ci)
+{
+	DBusConnection *conn = ofono_dbus_get_connection();
+	struct ofono_modem *modem = __ofono_atom_get_modem(ci->atom);
+	const char *path = __ofono_atom_get_path(ci->atom);
+
+	if (!g_dbus_register_interface(conn, path,
+					OFONO_CELL_INFO_INTERFACE,
+					ci_methods, ci_signals, NULL,
+					ci, NULL)) {
+		ofono_error("Could not create %s interface",
+					OFONO_CELL_INFO_INTERFACE);
+
+		return;
+	}
+
+	ofono_modem_add_interface(modem, OFONO_CELL_INFO_INTERFACE);
+
+	__ofono_atom_register(ci->atom, cell_info_unregister);
+}
+
+struct ofono_cell_info *ofono_cell_info_create(struct ofono_modem *modem,
+					unsigned int vendor,
+					const char *driver,
+					void *data)
+{
+	struct ofono_cell_info *ci;
+	GSList *l;
+
+	if (driver == NULL)
+		return NULL;
+
+	ci = g_try_new0(struct ofono_cell_info, 1);
+	if (ci == NULL)
+		return NULL;
+
+	ci->atom = __ofono_modem_add_atom(modem,
+					OFONO_ATOM_TYPE_CELL_INFO,
+					cell_info_remove, ci);
+
+	for (l = g_drivers; l; l = l->next) {
+		const struct ofono_cell_info_driver *drv = l->data;
+
+		if (g_strcmp0(drv->name, driver))
+			continue;
+
+		if (drv->probe(ci, vendor, data) < 0)
+			continue;
+
+		ci->driver = drv;
+		break;
+	}
+
+	return ci;
+}
+
+void *ofono_cell_info_get_data(struct ofono_cell_info *ci)
+{
+	return ci->driver_data;
+}
+
+void ofono_cell_info_set_data(struct ofono_cell_info *ci, void *cid)
+{
+	ci->driver_data = cid;
+}
+
+static int append_geran_meta_data(DBusMessageIter *iter,
+		 struct ofono_cell_info_results *ci)
+{
+	DBusMessageIter iter_array;
+	const char *type = "GERAN";
+	dbus_message_iter_open_container(iter,
+					DBUS_TYPE_ARRAY,
+					"{sv}",
+					&iter_array);
+
+	ofono_dbus_dict_append(&iter_array,
+				"Type",
+				DBUS_TYPE_STRING,
+				&type);
+	ofono_dbus_dict_append(&iter_array,
+				"MNC",
+				DBUS_TYPE_INT32,
+				&ci->mnc);
+	ofono_dbus_dict_append(&iter_array,
+				"MCC",
+				DBUS_TYPE_UINT32,
+				&ci->mcc);
+	ofono_dbus_dict_append(&iter_array,
+				"LAC",
+				DBUS_TYPE_UINT32,
+				&ci->gsm.lac);
+	ofono_dbus_dict_append(&iter_array,
+				"CI",
+				DBUS_TYPE_UINT32,
+				&ci->gsm.ci);
+
+	if (ci->gsm.ta != -1)
+		ofono_dbus_dict_append(&iter_array,
+					"TA",
+					DBUS_TYPE_UINT32,
+					&ci->gsm.ta);
+
+	dbus_message_iter_close_container(iter, &iter_array);
+
+	return 0;
+
+}
+
+static int fill_geran_cell_info(DBusMessage *msg,
+		  struct ofono_cell_info_results *ci)
+{
+	DBusMessageIter iter, iter_array, iter_array_array;
+
+	int i;
+
+	dbus_message_iter_init_append(msg, &iter);
+
+	append_geran_meta_data(&iter, ci);
+
+	dbus_message_iter_close_container(&iter, &iter_array);
+
+	dbus_message_iter_open_container(&iter,
+					DBUS_TYPE_ARRAY,
+					"a{sv}",
+					&iter_array);
+
+	for (i = 0; i < ci->gsm.no_cells; ++i) {
+		dbus_message_iter_open_container(&iter_array,
+					DBUS_TYPE_ARRAY,
+					"{sv}",
+					&iter_array_array);
+		ofono_dbus_dict_append(&iter_array_array,
+					"ARFCN",
+					DBUS_TYPE_UINT32,
+					&ci->gsm.nmr[i].arfcn);
+		ofono_dbus_dict_append(&iter_array_array,
+					"BSIC",
+					DBUS_TYPE_UINT32,
+					&ci->gsm.nmr[i].bsic);
+		ofono_dbus_dict_append(&iter_array_array,
+					"RXLEV",
+					DBUS_TYPE_UINT32,
+					&ci->gsm.nmr[i].rxlev);
+
+		dbus_message_iter_close_container(&iter_array,
+				&iter_array_array);
+	}
+
+	dbus_message_iter_close_container(&iter, &iter_array);
+
+	return 0;
+}
+
+static int append_utra_cell_list(DBusMessageIter *iter,
+		struct cell_measured_results *cmr, int no_cells)
+{
+	int j;
+
+	for (j = 0; j < no_cells; ++j) {
+
+		ofono_dbus_dict_append(iter,
+					"SC",
+					DBUS_TYPE_UINT32,
+					&cmr[j].sc);
+
+		if (cmr[j].ucid != -1)
+			ofono_dbus_dict_append(iter,
+					"UCID",
+					DBUS_TYPE_UINT32,
+					&cmr[j].ucid);
+
+		if (cmr[j].ecn0 != -1)
+			ofono_dbus_dict_append(iter,
+					"ECN0",
+					DBUS_TYPE_UINT32,
+					&cmr[j].ecn0);
+
+		if (cmr[j].rscp != -1)
+			ofono_dbus_dict_append(iter,
+					"RSCP",
+					DBUS_TYPE_UINT32,
+					&cmr[j].rscp);
+
+		if (cmr[j].pathloss != -1)
+			ofono_dbus_dict_append(iter,
+					"Pathloss",
+					DBUS_TYPE_UINT32,
+					&cmr[j].rscp);
+
+	}
+
+	return 0;
+}
+
+static int append_utra_freq_info(DBusMessageIter *iter,
+		struct measured_results_list *mrl)
+{
+	ofono_dbus_dict_append(iter,
+				"RSSI",
+				DBUS_TYPE_INT32,
+				&mrl->rssi);
+
+	ofono_dbus_dict_append(iter,
+				"UARFCN-DL",
+				DBUS_TYPE_UINT32,
+				&mrl->dl_freq);
+
+	ofono_dbus_dict_append(iter,
+				"UARFCN-UL",
+				DBUS_TYPE_INT32,
+				&mrl->ul_freq);
+	return 0;
+}
+
+static int append_utra_neigh_info(DBusMessageIter *iter,
+			struct wcdma *wcdma)
+{
+	DBusMessageIter iter_array, iter_array_array;
+	int i;
+
+	dbus_message_iter_open_container(iter,
+					DBUS_TYPE_ARRAY,
+					"a{sv}",
+					&iter_array);
+
+	for (i = 0; i < wcdma->no_freq; ++i) {
+		dbus_message_iter_open_container(&iter_array,
+					DBUS_TYPE_ARRAY,
+					"{sv}",
+					&iter_array_array);
+		append_utra_freq_info(&iter_array_array, &wcdma->mrl[i]);
+		append_utra_cell_list(&iter_array_array, wcdma->mrl[i].cmr,
+					wcdma->mrl[i].no_cells);
+
+		dbus_message_iter_close_container(&iter_array,
+				&iter_array_array);
+	}
+
+	dbus_message_iter_close_container(iter, &iter_array);
+
+	return 0;
+}
+
+static int fill_utra_cell_info(DBusMessage *msg,
+			struct ofono_cell_info_results *ci)
+{
+	DBusMessageIter iter, iter_array;
+	const char *type = "UTRA-FDD";
+
+	dbus_message_iter_init_append(msg, &iter);
+	dbus_message_iter_open_container(&iter,
+					DBUS_TYPE_ARRAY,
+					"{sv}",
+					&iter_array);
+
+	ofono_dbus_dict_append(&iter_array,
+				"Type",
+				DBUS_TYPE_STRING,
+				&type);
+	ofono_dbus_dict_append(&iter_array,
+				"MNC",
+				DBUS_TYPE_INT32,
+				&ci->mnc);
+	ofono_dbus_dict_append(&iter_array,
+				"MCC",
+				DBUS_TYPE_UINT32,
+				&ci->mcc);
+	ofono_dbus_dict_append(&iter_array,
+				"UCID",
+				DBUS_TYPE_UINT32,
+				&ci->wcdma.ucid);
+	ofono_dbus_dict_append(&iter_array,
+				"SC",
+				DBUS_TYPE_UINT32,
+				&ci->wcdma.sc);
+	ofono_dbus_dict_append(&iter_array,
+				"UARFCN-DL",
+				DBUS_TYPE_UINT32,
+				&ci->wcdma.dl_freq);
+
+	if (ci->wcdma.ul_freq != -1) {
+		ofono_dbus_dict_append(&iter_array,
+				"UARFCN-UL",
+				DBUS_TYPE_UINT32,
+				&ci->wcdma.ul_freq);
+	}
+
+	dbus_message_iter_close_container(&iter, &iter_array);
+
+	append_utra_neigh_info(&iter, &ci->wcdma);
+
+	return 0;
+}
+
+void ofono_cell_info_query_cb(const struct ofono_error *error,
+				void *data)
+{
+	struct ofono_cell_info *ci = data;
+	struct ofono_cell_info_results *ci_results = &ci->cir;
+	DBusMessage *msg = ci->pending;
+	DBusMessage *reply;
+	int status;
+
+	if (error->type != OFONO_ERROR_TYPE_NO_ERROR) {
+		ofono_error("Neighbor cell info query failed");
+		goto error;
+	}
+
+	reply = dbus_message_new_method_return(msg);
+	if (reply == NULL) {
+		ofono_error("Failed to create response");
+		goto error;
+	}
+
+	if (ci_results->rat == OFONO_CELL_TYPE_GERAN) {
+		ofono_debug("GSM CELL INFO RECEIVED");
+
+		status = fill_geran_cell_info(msg, ci_results);
+		if (status != 0) {
+			ofono_error("Failed to fill geran info");
+			goto error;
+		}
+
+	} else if (ci_results->rat == OFONO_CELL_TYPE_UTRA_FDD) {
+		ofono_debug("WCDMA CELL INFO RECEIVED");
+
+		status = fill_utra_cell_info(msg, ci_results);
+		if (status != 0) {
+			ofono_error("Failed to fill utra info");
+			goto error;
+		}
+
+	} else {
+		ofono_error("Unrecognized cell type.");
+		goto error;
+	}
+
+	__ofono_dbus_pending_reply(&msg, reply);
+	return;
+
+error:
+	reply = __ofono_error_failed(msg);
+	__ofono_dbus_pending_reply(&msg, reply);
+	return;
+
+}
+
+static DBusMessage *ci_get_cells(DBusConnection *conn, DBusMessage *msg,
+					void *data)
+{
+	struct ofono_cell_info *ci = data;
+
+	ci->pending = dbus_message_ref(msg);
+	ci->driver->query(ci, ofono_cell_info_query_cb, ci->driver_data);
+
+	return NULL;
+}
+
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [RFC PATCH 2/4] cell-info: Header file for cell-info atom
  2010-12-21 14:00 [RFC PATCH 0/4] Atom for Neighbour Cell Info Antti Paila
  2010-12-21 14:00 ` [RFC PATCH 1/4] cell-info: Atom for ECID info of neighb cells Antti Paila
@ 2010-12-21 14:00 ` Antti Paila
  2010-12-21 18:32   ` Bastian, Waldo
  2010-12-21 14:00 ` [RFC PATCH 3/4] cell-info: Interface declarations Antti Paila
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 7+ messages in thread
From: Antti Paila @ 2010-12-21 14:00 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 2474 bytes --]

---
 include/cell-info.h |   66 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 66 insertions(+), 0 deletions(-)
 create mode 100644 include/cell-info.h

diff --git a/include/cell-info.h b/include/cell-info.h
new file mode 100644
index 0000000..d9c7810
--- /dev/null
+++ b/include/cell-info.h
@@ -0,0 +1,66 @@
+/*
+ *
+ *  oFono - Open Source Telephony
+ *
+ *  Copyright (C) 2008-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 __OFONO_CELL_INFO_H
+#define __OFONO_CELL_INFO_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <ofono/types.h>
+
+struct ofono_cell_info;
+
+typedef void (*ofono_cell_info_query_cb_t)(const struct ofono_error *error,
+				void *data);
+
+struct ofono_cell_info_driver {
+	const char *name;
+	int (*probe)(struct ofono_cell_info *ci,
+			unsigned int vendor,
+			void *data);
+	void (*remove)(struct ofono_cell_info *ci);
+	void (*query)(struct ofono_cell_info *ci,
+			ofono_cell_info_query_cb_t,
+			void *data);
+};
+
+struct ofono_cell_info *ofono_cell_info_create(struct ofono_modem *modem,
+					unsigned int vendor,
+					const char *driver,
+					void *data);
+
+void ofono_cell_info_register(struct ofono_cell_info *ci);
+void ofono_cell_info_remove(struct ofono_cell_info *ci);
+int ofono_cell_info_driver_register(struct ofono_cell_info_driver *driver);
+void ofono_cell_info_driver_unregister(struct ofono_cell_info_driver *driver);
+void *ofono_cell_info_get_data(struct ofono_cell_info *ci);
+void ofono_cell_info_set_data(struct ofono_cell_info *ci, void *cid);
+void ofono_cell_info_query_cb(const struct ofono_error *error,
+				void *data);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __OFONO_CELL_INFO_H */
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [RFC PATCH 3/4] cell-info: Interface declarations
  2010-12-21 14:00 [RFC PATCH 0/4] Atom for Neighbour Cell Info Antti Paila
  2010-12-21 14:00 ` [RFC PATCH 1/4] cell-info: Atom for ECID info of neighb cells Antti Paila
  2010-12-21 14:00 ` [RFC PATCH 2/4] cell-info: Header file for cell-info atom Antti Paila
@ 2010-12-21 14:00 ` Antti Paila
  2010-12-21 14:00 ` [RFC PATCH 4/4] cell-info: New files included for compilation Antti Paila
  2010-12-21 14:04 ` [RFC PATCH 0/4] Atom for Neighbour Cell Info Marcel Holtmann
  4 siblings, 0 replies; 7+ messages in thread
From: Antti Paila @ 2010-12-21 14:00 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1068 bytes --]

---
 include/dbus.h |    1 +
 src/ofono.h    |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/dbus.h b/include/dbus.h
index c527515..98839cc 100644
--- a/include/dbus.h
+++ b/include/dbus.h
@@ -45,6 +45,7 @@ extern "C" {
 #define OFONO_MESSAGE_WAITING_INTERFACE "org.ofono.MessageWaiting"
 #define OFONO_NETWORK_REGISTRATION_INTERFACE "org.ofono.NetworkRegistration"
 #define OFONO_NETWORK_OPERATOR_INTERFACE "org.ofono.NetworkOperator"
+#define OFONO_CELL_INFO_INTERFACE "org.ofono.CellInfo"
 #define OFONO_PHONEBOOK_INTERFACE "org.ofono.Phonebook"
 #define OFONO_RADIO_SETTINGS_INTERFACE "org.ofono.RadioSettings"
 #define OFONO_AUDIO_SETTINGS_INTERFACE "org.ofono.AudioSettings"
diff --git a/src/ofono.h b/src/ofono.h
index 792134b..cd89a8f 100644
--- a/src/ofono.h
+++ b/src/ofono.h
@@ -126,6 +126,7 @@ enum ofono_atom_type {
 	OFONO_ATOM_TYPE_STK = 20,
 	OFONO_ATOM_TYPE_NETTIME = 21,
 	OFONO_ATOM_TYPE_CTM = 22,
+	OFONO_ATOM_TYPE_CELL_INFO = 23,
 };
 
 enum ofono_atom_watch_condition {
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [RFC PATCH 4/4] cell-info: New files included for compilation
  2010-12-21 14:00 [RFC PATCH 0/4] Atom for Neighbour Cell Info Antti Paila
                   ` (2 preceding siblings ...)
  2010-12-21 14:00 ` [RFC PATCH 3/4] cell-info: Interface declarations Antti Paila
@ 2010-12-21 14:00 ` Antti Paila
  2010-12-21 14:04 ` [RFC PATCH 0/4] Atom for Neighbour Cell Info Marcel Holtmann
  4 siblings, 0 replies; 7+ messages in thread
From: Antti Paila @ 2010-12-21 14:00 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 991 bytes --]

---
 Makefile.am |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 12b3c33..86f1ab5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -14,7 +14,7 @@ include_HEADERS = include/log.h include/plugin.h include/history.h \
 			include/gprs.h include/gprs-context.h \
 			include/radio-settings.h include/stk.h \
 			include/audio-settings.h include/nettime.h \
-			include/ctm.h
+			include/ctm.h include/cell-info.h
 
 nodist_include_HEADERS = include/version.h
 
@@ -319,7 +319,7 @@ src_ofonod_SOURCES = $(gdbus_sources) $(builtin_sources) src/ofono.ver \
 			src/radio-settings.c src/stkutil.h src/stkutil.c \
 			src/nettime.c src/stkagent.c src/stkagent.h \
 			src/simfs.c src/simfs.h src/audio-settings.c \
-			src/smsagent.c src/smsagent.h src/ctm.c
+			src/smsagent.c src/smsagent.h src/ctm.c src/cell-info.c
 
 src_ofonod_LDADD = $(builtin_libadd) @GLIB_LIBS@ @DBUS_LIBS@ @CAPNG_LIBS@ -ldl
 
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [RFC PATCH 0/4] Atom for Neighbour Cell Info
  2010-12-21 14:00 [RFC PATCH 0/4] Atom for Neighbour Cell Info Antti Paila
                   ` (3 preceding siblings ...)
  2010-12-21 14:00 ` [RFC PATCH 4/4] cell-info: New files included for compilation Antti Paila
@ 2010-12-21 14:04 ` Marcel Holtmann
  4 siblings, 0 replies; 7+ messages in thread
From: Marcel Holtmann @ 2010-12-21 14:04 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 602 bytes --]

Hi Antti,

> This series of patches implements an interface for client
>  application to fetch the ECID information of neighbouring
>  cells using DBUS.
> 
>  src/cell-info.c |  537 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  include/cell-info.h |   66 +++++++++++++++++++++++++++++++++++++++++++++++++++
>  include/dbus.h |    1 +
>  src/ofono.h    |    1 +
>  Makefile.am |    4 ++--

I am missing the D-Bus API documentation in this patch. I know that
proposals have been posted, but you need to pick that up and make it
part of your patchset.

Regards

Marcel



^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [RFC PATCH 2/4] cell-info: Header file for cell-info atom
  2010-12-21 14:00 ` [RFC PATCH 2/4] cell-info: Header file for cell-info atom Antti Paila
@ 2010-12-21 18:32   ` Bastian, Waldo
  0 siblings, 0 replies; 7+ messages in thread
From: Bastian, Waldo @ 2010-12-21 18:32 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 2992 bytes --]

Shouldn't ofono_cell_info_results be defined here and included as an argument for
ofono_cell_info_query_cb_t ? 

Cheers,
Waldo 

-----Original Message-----
From: ofono-bounces(a)ofono.org [mailto:ofono-bounces(a)ofono.org] On Behalf Of Antti Paila
Sent: Tuesday, December 21, 2010 6:00 AM
To: ofono(a)ofono.org
Subject: [RFC PATCH 2/4] cell-info: Header file for cell-info atom

---
 include/cell-info.h |   66 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 66 insertions(+), 0 deletions(-)
 create mode 100644 include/cell-info.h

diff --git a/include/cell-info.h b/include/cell-info.h
new file mode 100644
index 0000000..d9c7810
--- /dev/null
+++ b/include/cell-info.h
@@ -0,0 +1,66 @@
+/*
+ *
+ *  oFono - Open Source Telephony
+ *
+ *  Copyright (C) 2008-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 __OFONO_CELL_INFO_H
+#define __OFONO_CELL_INFO_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <ofono/types.h>
+
+struct ofono_cell_info;
+
+typedef void (*ofono_cell_info_query_cb_t)(const struct ofono_error *error,
+				void *data);
+
+struct ofono_cell_info_driver {
+	const char *name;
+	int (*probe)(struct ofono_cell_info *ci,
+			unsigned int vendor,
+			void *data);
+	void (*remove)(struct ofono_cell_info *ci);
+	void (*query)(struct ofono_cell_info *ci,
+			ofono_cell_info_query_cb_t,
+			void *data);
+};
+
+struct ofono_cell_info *ofono_cell_info_create(struct ofono_modem *modem,
+					unsigned int vendor,
+					const char *driver,
+					void *data);
+
+void ofono_cell_info_register(struct ofono_cell_info *ci);
+void ofono_cell_info_remove(struct ofono_cell_info *ci);
+int ofono_cell_info_driver_register(struct ofono_cell_info_driver *driver);
+void ofono_cell_info_driver_unregister(struct ofono_cell_info_driver *driver);
+void *ofono_cell_info_get_data(struct ofono_cell_info *ci);
+void ofono_cell_info_set_data(struct ofono_cell_info *ci, void *cid);
+void ofono_cell_info_query_cb(const struct ofono_error *error,
+				void *data);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __OFONO_CELL_INFO_H */
-- 
1.7.1

_______________________________________________
ofono mailing list
ofono(a)ofono.org
http://lists.ofono.org/listinfo/ofono

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-12-21 18:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-21 14:00 [RFC PATCH 0/4] Atom for Neighbour Cell Info Antti Paila
2010-12-21 14:00 ` [RFC PATCH 1/4] cell-info: Atom for ECID info of neighb cells Antti Paila
2010-12-21 14:00 ` [RFC PATCH 2/4] cell-info: Header file for cell-info atom Antti Paila
2010-12-21 18:32   ` Bastian, Waldo
2010-12-21 14:00 ` [RFC PATCH 3/4] cell-info: Interface declarations Antti Paila
2010-12-21 14:00 ` [RFC PATCH 4/4] cell-info: New files included for compilation Antti Paila
2010-12-21 14:04 ` [RFC PATCH 0/4] Atom for Neighbour Cell Info Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox