mirror of git://git.sysmocom.de/ofono
Get rid of dbus-gsm.h
This commit is contained in:
parent
1d8785f8bd
commit
54816de04d
|
@ -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"
|
||||
|
||||
|
|
|
@ -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 \
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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, '/');
|
||||
|
|
Loading…
Reference in New Issue