Commit Graph

23 Commits

Author SHA1 Message Date
Tom Wimmenhove
bd5a82845a mmcli: added --messaging-create-sms-with-text option
Added a `--messaging-create-sms-with-text' command line option that works similar to
`--messaging-create-sms-with-data', except that it uses the content of the file as the
message text instead of data.

This allows creating mesasges containing both double and single quotes, which was not
possible with the existing `--messaging-create-sms' command line option.
2023-05-17 10:08:03 +00:00
Frederic Martinsons
766962167c cli: add formating option (json and key/value) for created SMS
Fixes #657

Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com>
2023-01-18 11:00:17 +00:00
Aleksander Morgado
ce50d9c483 mmcli,messaging: fix leak when printing supported storages 2021-06-24 15:53:50 +02:00
Aleksander Morgado
f1e77cdbe6 cli: context: add ':' to the section titles
So that --help-all print all sections in the same way as the Help and
Application option groups.
2020-03-21 15:40:13 +01:00
Aleksander Morgado
1fa7e1260d cli: fix warnings with -Wshadow
mmcli-manager.c: In function ‘context_free’:
  mmcli-manager.c:167:24: error: declaration of ‘ctx’ shadows a global declaration [-Werror=shadow]
    167 | context_free (Context *ctx)
        |               ~~~~~~~~~^~~
  mmcli-manager.c:51:17: note: shadowed declaration is here
     51 | static Context *ctx;
        |                 ^~~
  ...
2020-01-31 15:18:35 +01:00
Aleksander Morgado
c8af22ab7a cli,messaging: trivial fix in comment 2019-09-23 10:41:36 +02:00
Aleksander Morgado
b0fba14b1e cli: allow multiple output format types
In addition to the standard human-friendly output, we now allow a
machine-friendly key-value pair output, much easier to parse and use
by programs that look at the mmcli output.

This new key-value pair output should be treated as API from now on, so
third-party programs can assume the output is compatible from one
release to another.
2018-11-26 16:51:35 +00:00
Aleksander Morgado
f156ec06fb context: use G_OPTION_ARG_FILENAME when a file path is expected 2016-03-27 21:39:11 +02:00
Aleksander Morgado
ee85a463cf license: mmcli is GPLv2+, not GPLv3+
mmcli is GPLv2+; that's what --version has always said and that's what the
README in ModemManager sources specifies:
  License.
  The ModemManager and mmcli binaries are both GPLv2+.
  The libmm-glib library is LGPLv2+.
2015-12-07 13:16:24 +01:00
Ben Chan
d4177f554b cli: consistently use spaces for indentation 2014-05-20 09:32:15 +02:00
Aleksander Morgado
38501a06bf mmcli: allow passing SMS index in --messaging-delete-sms 2014-01-30 13:10:54 +01:00
Aleksander Morgado
022f5bb490 mmcli,messaging: plug memleak 2013-07-15 13:42:00 +02: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
0156279749 cli: new `--messaging-create-sms-with-data' switch
This switch can be run along with the `--messaging-create-sms' action, in order
to include in the SMS the data as given in the file specified by the new switch.

E.g.:

$> sudo mmcli -m 0 \
              --messaging-create-sms="number='1234567890'" \
              --messaging-create-sms-with-data=file.txt

In this case, the SMS properties string cannot contain a 'text' field.
2012-09-14 07:05:26 +02:00
Aleksander Morgado
54178a7959 cli: include default SMS storage info in `--messaging-status'
$> sudo mmcli -m 1 --messaging-status

/org/freedesktop/ModemManager1/Modem/1
  ----------------------------
  Messaging | supported storages: 'sm, mt, me, sr'
            |    default storage: 'me'
2012-09-14 07:05:23 +02:00
Aleksander Morgado
584fc77bb3 cli: include the `--messaging' prefix in all Messaging-related actions
Just for consistency with other interfaces, which also provide interface
specific prefixes in their mmcli actions.
2012-09-14 07:05:23 +02:00
Aleksander Morgado
47b459603a cli: new `--messaging-status' action
Currently shows the list of supported SMS storages.
2012-09-14 07:05:23 +02:00
Aleksander Morgado
8f8bcd7724 cli: allow modifying default DBus timeout with `--timeout'
By default 30s will be used for every operation.
2012-07-25 11:44:01 +02:00
Aleksander Morgado
001f35234e cli: ensure modem is enabled when performing actions
Don't rely on the lock status, as the modem may say it requires SIM PIN 2, but
we're allowed to run most operations even with that unlock required.
2012-07-25 11:43:45 +02:00
Aleksander Morgado
28f13c09ec mmcli: abort certain operations if modem is unlocked
Do not try to perform feature/capability specific actions if we're still
unlocked, as the modem didn't yet export the feature/capability specific
interface.

The only interfaces expected while modem is unlocked are the Modem and Simple
interfaces, as well as the SIM interface in the SIM object, of course.
2012-03-26 13:00:07 +02:00
Aleksander Morgado
b61c94016a api,dbus: remove the option to send the SMS in the Create() call
An SMS must be first created with the Messaging interface, and then sent using the
Send() method from the SMS-specific interface.
2012-03-15 14:15:02 +01:00
Aleksander Morgado
d528a2211b cli: ensure EOL is added at every error message 2012-03-15 14:15:01 +01:00
Aleksander Morgado
0833934f11 cli: added Messaging-specific actions 2012-03-15 14:15:01 +01:00