diff options
author | Denis Kenzior <denkenz@gmail.com> | 2009-07-29 10:55:00 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2009-07-29 12:26:06 -0500 |
commit | 54816de04d1122f6c9716bff5a0cf5d94c692c6d (patch) | |
tree | af73680ab469fec6318f713a1175ae55d43be517 | |
parent | 1d8785f8bd83d8a33502c63a9d713e1da215fccd (diff) | |
download | ofono-54816de04d1122f6c9716bff5a0cf5d94c692c6d.tar.bz2 |
Get rid of dbus-gsm.h
-rw-r--r-- | drivers/atmodem/atmodem.c | 3 | ||||
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/call-barring.c | 2 | ||||
-rw-r--r-- | src/call-forwarding.c | 2 | ||||
-rw-r--r-- | src/call-meter.c | 2 | ||||
-rw-r--r-- | src/call-settings.c | 2 | ||||
-rw-r--r-- | src/dbus-gsm.c | 3 | ||||
-rw-r--r-- | src/dbus-gsm.h | 26 | ||||
-rw-r--r-- | src/main.c | 4 | ||||
-rw-r--r-- | src/manager.c | 3 | ||||
-rw-r--r-- | src/modem.c | 6 | ||||
-rw-r--r-- | src/network.c | 11 | ||||
-rw-r--r-- | src/phonebook.c | 2 | ||||
-rw-r--r-- | src/sim.c | 2 | ||||
-rw-r--r-- | src/sms.c | 2 | ||||
-rw-r--r-- | src/ussd.c | 2 | ||||
-rw-r--r-- | src/voicecall.c | 8 |
17 files changed, 14 insertions, 68 deletions
diff --git a/drivers/atmodem/atmodem.c b/drivers/atmodem/atmodem.c index fff6cca4..944fd97a 100644 --- a/drivers/atmodem/atmodem.c +++ b/drivers/atmodem/atmodem.c @@ -30,10 +30,11 @@ #include <ofono/plugin.h> #include <ofono/log.h> +#include <ofono/dbus.h> + #include "driver.h" #include "at.h" -#include "dbus-gsm.h" #include "modem.h" #include "session.h" diff --git a/src/Makefile.am b/src/Makefile.am index 2fb3f063..7731432e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -9,7 +9,7 @@ sbin_PROGRAMS = ofonod ofonod_SOURCES = main.c ofono.h log.c plugin.c \ driver.h modem.h modem.c common.h common.c \ - manager.c dbus-gsm.h dbus-gsm.c util.h util.c \ + manager.c dbus-gsm.c util.h util.c \ network.c voicecall.c ussd.h ussd.c sms.c \ call-settings.c call-forwarding.c call-meter.c \ smsutil.h smsutil.c cssn.h cssn.c call-barring.c sim.h sim.c \ diff --git a/src/call-barring.c b/src/call-barring.c index 4ae758ae..5a98fbff 100644 --- a/src/call-barring.c +++ b/src/call-barring.c @@ -28,7 +28,6 @@ #include <stdlib.h> #include <time.h> -#include <dbus/dbus.h> #include <glib.h> #include <gdbus.h> @@ -36,7 +35,6 @@ #include "driver.h" #include "common.h" -#include "dbus-gsm.h" #include "modem.h" #include "cssn.h" #include "ussd.h" diff --git a/src/call-forwarding.c b/src/call-forwarding.c index bb310804..b329e72c 100644 --- a/src/call-forwarding.c +++ b/src/call-forwarding.c @@ -27,13 +27,11 @@ #include <stdio.h> #include <stdlib.h> -#include <dbus/dbus.h> #include <glib.h> #include <gdbus.h> #include "ofono.h" -#include "dbus-gsm.h" #include "modem.h" #include "driver.h" #include "common.h" diff --git a/src/call-meter.c b/src/call-meter.c index e160e923..1647a2f7 100644 --- a/src/call-meter.c +++ b/src/call-meter.c @@ -27,7 +27,6 @@ #include <stdio.h> #include <time.h> -#include <dbus/dbus.h> #include <glib.h> #include <gdbus.h> @@ -35,7 +34,6 @@ #include "driver.h" #include "common.h" -#include "dbus-gsm.h" #include "modem.h" #define CALL_METER_INTERFACE "org.ofono.CallMeter" diff --git a/src/call-settings.c b/src/call-settings.c index ce511d54..5c35f8f4 100644 --- a/src/call-settings.c +++ b/src/call-settings.c @@ -27,7 +27,6 @@ #include <stdio.h> #include <stdlib.h> -#include <dbus/dbus.h> #include <glib.h> #include <gdbus.h> @@ -35,7 +34,6 @@ #include "driver.h" #include "common.h" -#include "dbus-gsm.h" #include "modem.h" #include "ussd.h" diff --git a/src/dbus-gsm.c b/src/dbus-gsm.c index 10174718..b814f23a 100644 --- a/src/dbus-gsm.c +++ b/src/dbus-gsm.c @@ -24,13 +24,10 @@ #endif #include <glib.h> -#include <dbus/dbus.h> #include <gdbus.h> #include "ofono.h" -#include "dbus-gsm.h" - #define DBUS_GSM_ERROR_INTERFACE "org.ofono.Error" static DBusConnection *g_connection; diff --git a/src/dbus-gsm.h b/src/dbus-gsm.h deleted file mode 100644 index b3d03c01..00000000 --- a/src/dbus-gsm.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * - * oFono - Open Source Telephony - * - * Copyright (C) 2008-2009 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 - * - */ - -#include <ofono/dbus.h> -#include <gdbus.h> - -#define MAX_DBUS_PATH_LEN 64 - @@ -23,6 +23,8 @@ #include <config.h> #endif +#include <gdbus.h> + #include <stdio.h> #include <stdlib.h> #include <unistd.h> @@ -31,8 +33,6 @@ #include "ofono.h" -#include "dbus-gsm.h" - static GMainLoop *event_loop; static void sig_debug(int sig) diff --git a/src/manager.c b/src/manager.c index 93414658..0c8f49bc 100644 --- a/src/manager.c +++ b/src/manager.c @@ -24,14 +24,11 @@ #endif #include <string.h> -#include <dbus/dbus.h> #include <glib.h> #include <gdbus.h> #include "ofono.h" -#include "dbus-gsm.h" - #include "modem.h" #include "driver.h" diff --git a/src/modem.c b/src/modem.c index 684527f6..631a1a1e 100644 --- a/src/modem.c +++ b/src/modem.c @@ -26,13 +26,11 @@ #include <string.h> #include <stdio.h> -#include <dbus/dbus.h> #include <glib.h> #include <gdbus.h> #include "ofono.h" -#include "dbus-gsm.h" #include "modem.h" #include "driver.h" #include "common.h" @@ -386,7 +384,7 @@ static gboolean query_manufacturer(gpointer user) struct ofono_modem *modem_create(int id, struct ofono_modem_attribute_ops *ops) { - char path[MAX_DBUS_PATH_LEN]; + char path[128]; DBusConnection *conn = ofono_dbus_get_connection(); struct ofono_modem *modem; @@ -403,7 +401,7 @@ struct ofono_modem *modem_create(int id, struct ofono_modem_attribute_ops *ops) modem->id = id; modem->modem_info->ops = ops; - snprintf(path, MAX_DBUS_PATH_LEN, "/modem%d", modem->id); + snprintf(path, sizeof(path), "/modem%d", modem->id); modem->path = g_strdup(path); if (!g_dbus_register_interface(conn, path, MODEM_INTERFACE, diff --git a/src/network.c b/src/network.c index 5f0fed98..8b411676 100644 --- a/src/network.c +++ b/src/network.c @@ -26,13 +26,11 @@ #include <string.h> #include <stdio.h> -#include <dbus/dbus.h> #include <glib.h> #include <gdbus.h> #include "ofono.h" -#include "dbus-gsm.h" #include "modem.h" #include "driver.h" #include "common.h" @@ -188,13 +186,12 @@ static void network_operator_populate_registered(struct ofono_modem *modem, int prefix_len; int num_children; GSList *l; - char path[MAX_DBUS_PATH_LEN]; + char path[256]; char mnc[OFONO_MAX_MNC_LENGTH + 1]; char mcc[OFONO_MAX_MCC_LENGTH + 1]; int op_path_len; - prefix_len = snprintf(path, MAX_DBUS_PATH_LEN, "%s/operator", - modem->path); + prefix_len = snprintf(path, sizeof(path), "%s/operator", modem->path); if (!dbus_connection_list_registered(conn, path, &children)) { ofono_debug("Unable to obtain registered NetworkOperator(s)"); @@ -268,9 +265,9 @@ static gint network_operator_compare(gconstpointer a, gconstpointer b) static inline const char *network_operator_build_path(struct ofono_modem *modem, const struct ofono_network_operator *oper) { - static char path[MAX_DBUS_PATH_LEN]; + static char path[256]; - snprintf(path, MAX_DBUS_PATH_LEN, "%s/operator/%s%s", + snprintf(path, sizeof(path), "%s/operator/%s%s", modem->path, oper->mcc, oper->mnc); return path; diff --git a/src/phonebook.c b/src/phonebook.c index a1143bdd..a4a92ef9 100644 --- a/src/phonebook.c +++ b/src/phonebook.c @@ -29,13 +29,11 @@ #include <stdlib.h> #include <ctype.h> -#include <dbus/dbus.h> #include <glib.h> #include <gdbus.h> #include "ofono.h" -#include "dbus-gsm.h" #include "modem.h" #include "driver.h" #include "common.h" @@ -26,7 +26,6 @@ #include <string.h> #include <stdio.h> -#include <dbus/dbus.h> #include <glib.h> #include <gdbus.h> #include <sys/stat.h> @@ -37,7 +36,6 @@ #include "ofono.h" -#include "dbus-gsm.h" #include "modem.h" #include "driver.h" #include "common.h" @@ -26,13 +26,11 @@ #include <string.h> #include <stdio.h> -#include <dbus/dbus.h> #include <glib.h> #include <gdbus.h> #include "ofono.h" -#include "dbus-gsm.h" #include "modem.h" #include "driver.h" #include "common.h" @@ -27,13 +27,11 @@ #include <string.h> #include <stdio.h> -#include <dbus/dbus.h> #include <glib.h> #include <gdbus.h> #include "ofono.h" -#include "dbus-gsm.h" #include "modem.h" #include "driver.h" #include "common.h" diff --git a/src/voicecall.c b/src/voicecall.c index 2d8669c1..f5a969c6 100644 --- a/src/voicecall.c +++ b/src/voicecall.c @@ -27,7 +27,6 @@ #include <stdio.h> #include <time.h> -#include <dbus/dbus.h> #include <glib.h> #include <gdbus.h> @@ -35,7 +34,6 @@ #include "driver.h" #include "common.h" -#include "dbus-gsm.h" #include "modem.h" #include "cssn.h" @@ -349,9 +347,9 @@ static void voicecall_destroy(gpointer userdata) static const char *voicecall_build_path(struct ofono_modem *modem, const struct ofono_call *call) { - static char path[MAX_DBUS_PATH_LEN]; + static char path[256]; - snprintf(path, MAX_DBUS_PATH_LEN, "%s/voicecall%02d", + snprintf(path, sizeof(path), "%s/voicecall%02d", modem->path, call->id); return path; @@ -931,7 +929,7 @@ static DBusMessage *multiparty_private_chat(DBusConnection *conn, DBUS_TYPE_INVALID) == FALSE) return __ofono_error_invalid_args(msg); - if (strlen(callpath) == 0 || strlen(callpath) > MAX_DBUS_PATH_LEN) + if (strlen(callpath) == 0) return __ofono_error_invalid_format(msg); c = strrchr(callpath, '/'); |