call-list: remove unused modem property

Signed-off-by: Dan Williams <dan@ioncontrol.co>
This commit is contained in:
Dan Williams
2025-05-30 07:57:50 -05:00
parent b9c49c7b4d
commit 28b1954654
3 changed files with 4 additions and 68 deletions
+2 -63
View File
@@ -24,20 +24,12 @@
#define _LIBMM_INSIDE_MM
#include <libmm-glib.h>
#include "mm-iface-modem-messaging.h"
#include "mm-call-list.h"
#include "mm-base-call.h"
#include "mm-log.h"
G_DEFINE_TYPE (MMCallList, mm_call_list, G_TYPE_OBJECT)
enum {
PROP_0,
PROP_MODEM,
PROP_LAST
};
static GParamSpec *properties[PROP_LAST];
enum {
SIGNAL_CALL_ADDED,
SIGNAL_CALL_DELETED,
@@ -46,8 +38,6 @@ enum {
static guint signals[SIGNAL_LAST];
struct _MMCallListPrivate {
/* The owner modem */
MMBaseModem *modem;
/* List of call objects */
GList *list;
};
@@ -213,49 +203,10 @@ mm_call_list_add_call (MMCallList *self,
/*****************************************************************************/
MMCallList *
mm_call_list_new (MMBaseModem *modem)
mm_call_list_new (void)
{
/* Create the object */
return g_object_new (MM_TYPE_CALL_LIST,
MM_CALL_LIST_MODEM, modem,
NULL);
}
static void
set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
MMCallList *self = MM_CALL_LIST (object);
switch (prop_id) {
case PROP_MODEM:
g_clear_object (&self->priv->modem);
self->priv->modem = g_value_dup_object (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
MMCallList *self = MM_CALL_LIST (object);
switch (prop_id) {
case PROP_MODEM:
g_value_set_object (value, self->priv->modem);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
return g_object_new (MM_TYPE_CALL_LIST, NULL);
}
static void
@@ -272,7 +223,6 @@ dispose (GObject *object)
{
MMCallList *self = MM_CALL_LIST (object);
g_clear_object (&self->priv->modem);
g_list_free_full (self->priv->list, g_object_unref);
self->priv->list = NULL;
@@ -287,19 +237,8 @@ mm_call_list_class_init (MMCallListClass *klass)
g_type_class_add_private (object_class, sizeof (MMCallListPrivate));
/* Virtual methods */
object_class->get_property = get_property;
object_class->set_property = set_property;
object_class->dispose = dispose;
/* Properties */
properties[PROP_MODEM] =
g_param_spec_object (MM_CALL_LIST_MODEM,
"Modem",
"The Modem which owns this CALL list",
MM_TYPE_BASE_MODEM,
G_PARAM_READWRITE);
g_object_class_install_property (object_class, PROP_MODEM, properties[PROP_MODEM]);
/* Signals */
signals[SIGNAL_CALL_ADDED] =
g_signal_new (MM_CALL_ADDED,
+1 -4
View File
@@ -19,7 +19,6 @@
#include <glib.h>
#include <glib-object.h>
#include "mm-base-modem.h"
#include "mm-base-call.h"
#define MM_TYPE_CALL_LIST (mm_call_list_get_type ())
@@ -33,8 +32,6 @@ typedef struct _MMCallList MMCallList;
typedef struct _MMCallListClass MMCallListClass;
typedef struct _MMCallListPrivate MMCallListPrivate;
#define MM_CALL_LIST_MODEM "call-list-modem"
#define MM_CALL_ADDED "call-added"
#define MM_CALL_DELETED "call-deleted"
@@ -57,7 +54,7 @@ struct _MMCallListClass {
GType mm_call_list_get_type (void);
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMCallList, g_object_unref)
MMCallList *mm_call_list_new (MMBaseModem *modem);
MMCallList *mm_call_list_new (void);
GStrv mm_call_list_get_paths (MMCallList *self);
guint mm_call_list_get_count (MMCallList *self);
+1 -1
View File
@@ -3012,7 +3012,7 @@ interface_initialization_step (GTask *task)
/* Create a new call list if not already available (this initialization
* may be called multiple times) */
if (!list) {
list = mm_call_list_new (MM_BASE_MODEM (self));
list = mm_call_list_new ();
g_object_set (self,
MM_IFACE_MODEM_VOICE_CALL_LIST, list,
NULL);