sms-qmi: new `MMSmsQmi' object
This commit is contained in:
@@ -222,6 +222,8 @@ endif
|
||||
# Additional QMI support in ModemManager
|
||||
if WITH_QMI
|
||||
ModemManager_SOURCES += \
|
||||
mm-sms-qmi.h \
|
||||
mm-sms-qmi.c \
|
||||
mm-sim-qmi.h \
|
||||
mm-sim-qmi.c \
|
||||
mm-bearer-qmi.h \
|
||||
|
@@ -35,6 +35,7 @@
|
||||
#include "mm-iface-modem-messaging.h"
|
||||
#include "mm-sim-qmi.h"
|
||||
#include "mm-bearer-qmi.h"
|
||||
#include "mm-sms-qmi.h"
|
||||
|
||||
static void iface_modem_init (MMIfaceModem *iface);
|
||||
static void iface_modem_3gpp_init (MMIfaceModem3gpp *iface);
|
||||
@@ -5553,6 +5554,15 @@ messaging_enable_unsolicited_events (MMIfaceModemMessaging *self,
|
||||
user_data);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Create SMS (Messaging interface) */
|
||||
|
||||
static MMSms *
|
||||
messaging_create_sms (MMIfaceModemMessaging *self)
|
||||
{
|
||||
return mm_sms_qmi_new (MM_BASE_MODEM (self));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/* First initialization step */
|
||||
|
||||
@@ -5913,6 +5923,7 @@ iface_modem_messaging_init (MMIfaceModemMessaging *iface)
|
||||
iface->enable_unsolicited_events_finish = messaging_enable_disable_unsolicited_events_finish;
|
||||
iface->disable_unsolicited_events = messaging_disable_unsolicited_events;
|
||||
iface->disable_unsolicited_events_finish = messaging_enable_disable_unsolicited_events_finish;
|
||||
iface->create_sms = messaging_create_sms;
|
||||
}
|
||||
|
||||
static void
|
||||
|
50
src/mm-sms-qmi.c
Normal file
50
src/mm-sms-qmi.c
Normal file
@@ -0,0 +1,50 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/*
|
||||
* 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:
|
||||
*
|
||||
* Copyright (C) 2012 Google, Inc.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include <ModemManager.h>
|
||||
#include <libmm-common.h>
|
||||
|
||||
#include "mm-sms-qmi.h"
|
||||
#include "mm-base-modem.h"
|
||||
#include "mm-log.h"
|
||||
|
||||
G_DEFINE_TYPE (MMSmsQmi, mm_sms_qmi, MM_TYPE_SMS);
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
MMSms *
|
||||
mm_sms_qmi_new (MMBaseModem *modem)
|
||||
{
|
||||
return MM_SMS (g_object_new (MM_TYPE_SMS_QMI,
|
||||
MM_SMS_MODEM, modem,
|
||||
NULL));
|
||||
}
|
||||
|
||||
static void
|
||||
mm_sms_qmi_init (MMSmsQmi *self)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
mm_sms_qmi_class_init (MMSmsQmiClass *klass)
|
||||
{
|
||||
}
|
50
src/mm-sms-qmi.h
Normal file
50
src/mm-sms-qmi.h
Normal file
@@ -0,0 +1,50 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/*
|
||||
* 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:
|
||||
*
|
||||
* Author: Aleksander Morgado <aleksander@lanedo.com>
|
||||
*
|
||||
* Copyright (C) 2012 Google, Inc.
|
||||
*/
|
||||
|
||||
#ifndef MM_SMS_QMI_H
|
||||
#define MM_SMS_QMI_H
|
||||
|
||||
#include <glib.h>
|
||||
#include <glib-object.h>
|
||||
|
||||
#include <libmm-common.h>
|
||||
|
||||
#include "mm-sms.h"
|
||||
|
||||
#define MM_TYPE_SMS_QMI (mm_sms_qmi_get_type ())
|
||||
#define MM_SMS_QMI(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MM_TYPE_SMS_QMI, MMSmsQmi))
|
||||
#define MM_SMS_QMI_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MM_TYPE_SMS_QMI, MMSmsQmiClass))
|
||||
#define MM_IS_SMS_QMI(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MM_TYPE_SMS_QMI))
|
||||
#define MM_IS_SMS_QMI_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MM_TYPE_SMS_QMI))
|
||||
#define MM_SMS_QMI_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MM_TYPE_SMS_QMI, MMSmsQmiClass))
|
||||
|
||||
typedef struct _MMSmsQmi MMSmsQmi;
|
||||
typedef struct _MMSmsQmiClass MMSmsQmiClass;
|
||||
|
||||
struct _MMSmsQmi {
|
||||
MMSms parent;
|
||||
};
|
||||
|
||||
struct _MMSmsQmiClass {
|
||||
MMSmsClass parent;
|
||||
};
|
||||
|
||||
GType mm_sms_qmi_get_type (void);
|
||||
|
||||
MMSms *mm_sms_qmi_new (MMBaseModem *modem);
|
||||
|
||||
#endif /* MM_SMS_QMI_H */
|
Reference in New Issue
Block a user