Commit Graph
35 Commits
Author SHA1 Message Date
Aleksander Morgado 0e00f04fd8 sms-list: port to use object logging 2020-04-08 16:35:09 +02:00
Aleksander Morgado 5a25776807 sms-list: improve logging of multipart related fields
We were not logging anywhere the "concat max" field for example.
2019-07-15 13:42:45 +02:00
Lubomir Rintel b39dd2ec05 all: drop unused variables
Keeps build with GCC 8 happy.

mm-base-call.c:758:18: warning: variable 'response' set but not used [-Wunused-but-set-variable]
mm-base-call.c:822:18: warning: variable 'response' set but not used [-Wunused-but-set-variable]
mm-base-sms.c:908:18: warning: variable 'response' set but not used [-Wunused-but-set-variable]
mm-sms-list.c:331:25: warning: variable 'ctx' set but not used [-Wunused-but-set-variable]
mm-iface-modem-messaging.c:1210:21: warning: variable 'storage_ctx' set but not used [-Wunused-but-set-variable]
huawei/mm-plugin-huawei.c:183:18: warning: variable 'response' set but not used [-Wunused-but-set-variable]
ublox/mm-plugin-ublox.c:161:24: warning: variable 'response' set but not used [-Wunused-but-set-variable]
ublox/mm-plugin-ublox.c:159:24: warning: variable 'ctx' set but not used [-Wunused-but-set-variable]
icera/mm-modem-helpers-icera.c:218:25: warning: variable 'first_free' set but not used [-Wunused-but-set-variable]
novatel/mm-common-novatel.c:50:18: warning: variable 'response' set but not used [-Wunused-but-set-variable]
2018-04-24 18:11:15 +02:00
Ben Chan 21195f8e54 sms-list: port mm_sms_list_delete_sms to use GTask 2017-04-07 10:41:32 +02:00
Ben Chan 27e4c74c60 core: reset GList pointers to NULL when necessary
When calling g_list_free_full() to free a GList in dispose(), it is
necessary to reset the GList pointer to NULL as dispose() may be called
more than once.
2017-03-29 10:22:37 +02:00
Ben Chan 9823d9d6f6 core: remove explicit GDestroyNotify cast on g_free / g_object_unref
g_free and g_object_unref are in form of  `void (*)(gpointer)`, which
matches the GDestroyNotify signature. An explicit GDestroyNotify cast on
g_free and g_object_unref is thus not needed.
2017-03-29 10:22:05 +02:00
Aleksander Morgado a29382be70 sms: rename 'MMSms' to 'MMBaseSms'
Just so that we don't have same header names in src/ and /libmm-glib.
2014-07-06 16:55:29 +02:00
Ben Chan 37b0402ee5 core: minor coding style fixes 2014-05-20 09:32:29 +02:00
Aleksander Morgado f7546ad824 introspection,api: new 'Messages' property in the Messaging interface
https://bugzilla.gnome.org/show_bug.cgi?id=712276
2013-11-21 11:36:21 +01:00
Aleksander Morgado 5e7fee1d11 build: use 'g_cclosure_marshal_generic' by default
Avoid custom marshalers, and just use libffi-based 'g_cclosure_marshal_generic'.
2013-11-20 15:17:09 +01:00
Aleksander Morgado c250fa3797 libmm-glib: remove the `libmm-common.h' header
Both the ModemManager daemon and the mmcli will now include `libmm-glib.h' only.

We also handle two new special `_LIBMM_INSIDE_MM' and `LIBMM_INSIDE_MMCLI'
symbols, which if included before the `libmm-glib.h' library allow us to:

 * Don't include the libmm-glib high level API in the ModemManager daemon, as
   the object names would clash with those in the core.

 * Define some of the methods of helper objects to be included only if compiling
   ModemManager daemon or the mmcli.
2012-10-04 10:17:12 +02:00
Aleksander Morgado e212f6b6ed sms: create SMS parts only when storing or sending
When a user creates an SMS object, we will expose all its properties in DBus
properly, but we will not create the internal list of SMS parts.

The list of SMS parts will be created when the SMS is stored or sent, whatever
comes first. When the message is sent and it was previously stored, the list of
parts is not re-created.

If the message requires multiple parts, the multipart reference is computed as
follows:
 * If the SMS was not stored and is being sent, we just use a random number.
 * If the SMS is being stored, we will use a multipart reference which is not
   being used already in another SMS to the same destination.
2012-09-14 07:05:26 +02:00
Aleksander Morgado a66f971a7c libmm-common: added common utils from core
Moved the utils to play with binary to hex strings into libmm-common.
2012-09-14 07:05:26 +02:00
Aleksander Morgado 815decb034 broadband-modem: properly avoid duplicate CMTI indications
We will look for the part being notified in the CMTI indication directly in the
list of processed parts; and if we have it there already we won't re-process it.

Still, we may get several CMTI indications for the same part one after the
other, so it may still happen that the second CMTI comes *before* we have parsed
and created the part in the SMS list. For that case, the SMS list will reject
taking the part if there is already a part with the same storage+index already
processed.

This fix removes the `known_sms_parts' hash table, which was being handled
incorrectly.

This should fix https://bugzilla.gnome.org/show_bug.cgi?id=675175
2012-09-14 07:05:25 +02:00
Aleksander Morgado 628f7e41a4 sms-list: don't look for duplicate parts if index is unknown 2012-09-14 07:05:25 +02:00
Aleksander Morgado 0edb58b738 sms: always export incomplete multipart SMS messages 2012-09-14 07:05:22 +02:00
Aleksander Morgado a973825eac sms: multipart sequence starts with 1; singlepart is always 0 2012-09-07 12:20:14 +02:00
Aleksander Morgado 28c22ce8db sms-list: add helper debug logs 2012-09-06 13:14:34 +02:00
Aleksander Morgado 22113859c9 messaging: part index may be repeated in different storages 2012-03-16 14:53:21 +01:00
Aleksander Morgado 978801ee7b sms: specify storage where the SMS is kept 2012-03-15 14:15:04 +01:00
Aleksander Morgado 556efdd378 sms-list: refactor SMS removal
If any of the parts couldn't be removed, an error is reported and the SMS is
left in the list.
2012-03-15 14:15:02 +01:00
Aleksander Morgado 714e4ca44b sms: export uncomplete multipart messages as well
Uncompleted multipart SMS will be exported to DBus, where only the "state"
property is valid, so that we allow completely removing those uncompleted
multipart SMS which will never get completed due to one reason or another.
2012-03-15 14:15:02 +01:00
Aleksander Morgado f9a7533ac4 sms-list: allow adding full SMS objects to the list 2012-03-15 14:15:01 +01:00
Aleksander Morgado 9fd2c3a1dc sms-list: handle NULL paths in SMS objects
They will have NULL paths when they are not exported yet
2012-03-15 14:15:01 +01:00
Aleksander Morgado 69b8742ca3 api,header: renamed MMModemSmsState' to MMSmsState' 2012-03-15 14:15:01 +01:00
Aleksander Morgado c15fbedc03 sms: pass known state when creating the MMSms object 2012-03-15 14:15:01 +01:00
Aleksander Morgado 0841f12315 iface-modem-messaging: allow subclassing SMS object creation methods 2012-03-15 14:15:00 +01:00
Aleksander Morgado 61a8452893 sms: allow sublassing the part deletion procedure 2012-03-15 14:15:00 +01:00
Aleksander Morgado 9ca03ba9f2 sms: rename method which creates MMSms from single part 2012-03-15 14:15:00 +01:00
Aleksander Morgado 1eb7f60e4c sms: assemble and export the SMS when its completed 2012-03-15 14:15:00 +01:00
Aleksander Morgado 6f103c1366 sms-list: don't signal completed messages
We will instead not export an SMS until completed and assembled
2012-03-15 14:15:00 +01:00
Aleksander Morgado a91948879c sms: set modem object, so that the SMS are exported in DBus 2012-03-15 14:15:00 +01:00
Aleksander Morgado 7956fc4e17 sms-list: allow deleting an SMS object and its parts 2012-03-15 14:14:59 +01:00
Aleksander Morgado 75b7225417 sms-list: signal messages added/completed/deleted 2012-03-15 14:14:59 +01:00
Aleksander Morgado fba16a2a2c sms-list: new object to handle SMS objects and SMS parts 2012-03-15 14:14:59 +01:00