Skip to content

SMS D-Bus support and misc small patches

Inaky Perez-Gonzalez ofono 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest20 patches 33 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/20bug.h: Add BUILD_BUG_ON() and friends for compile-time assert checkingsrc/bug.h src/smsutil.c+51 -03 replies
2/20write_file: make transaction-safesrc/storage.c+31 -112 replies
3/20manpage: explain debugging options to -dHACKING doc/ofonod.8+14 -11 reply
4/20SMS: introduce message ID APIMakefile.am src/smsutil.c src/smsutil.h +1 more+494 -11 reply
5/20introduce DECLARE_SMS_ADDR_STR()src/smsutil.c src/smsutil.h+8 -21 reply
6/20_assembly_encode_address: export and renamesrc/smsutil.c src/smsutil.h+5 -41 reply
7/20SMS: implement SHA256-based message IDs [incomplete]src/ofono.h src/sms.c src/stk.c+47 -294 replies
8/20sms: document the org.ofono.SMSMessage D-Bus interfacedoc/sms-api.txt+47 -24 replies
9/20SMS: document handle_sms_status_report()src/sms.c+9 -00 replies
10/20sms_text_prepare: document @use_delivery_reportssrc/smsutil.c+3 -01 reply
11/20SMS: rename create_tx_queue_entry() to tx_queue_entry_new()src/sms.c+3 -32 replies
12/20struct tx_queue_entry: add a destructorsrc/sms.c+19 -65 replies
13/20SMS: encapsulate D-Bus specific data in 'struct sms_msg_dbus_data'src/sms.c+19 -24 replies
14/20SMS: introduce bare state machine and transitionssrc/ofono.h src/sms.c+150 -40 replies
15/20SMS: introduce Wait-for-Status-Report state and infrastructuresrc/sms.c+61 -90 replies
16/20SMS: introduce a state change callback for TX messagessrc/ofono.h src/sms.c src/stk.c+45 -160 replies
17/20SMS: export outgoing messages over D-Bussrc/sms.c src/smsutil.h+145 -590 replies
18/20SMS: send D-Bus SMS-MSG::PropertyChanged signals when message changes statussrc/sms.c test/test-sms-msg-state-change+59 -10 replies
19/20SMS: introduce sms_msg_cancel and its D-Bus wrappersrc/sms.c src/smsutil.h test/test-sms-msg-cancel+251 -02 replies
20/20SMS: Implement D-Bus SMS-MSG::GetPropertiessrc/sms.c+25 -02 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [patch 00/20] SMS D-Bus support and misc small patches

From: Inaky Perez-Gonzalez <[email protected]>

This (3rd? 4th?) version of the patchset builds the D-Bus support on top of the new _txq_submit() callback mechanism.

Note there are still a couple of opens that need discussion:

- the message ID is generated based on the contents of the message -- thus, the current way doesn't work. We need the caller to _txq_submit() to generate it. It's been left out of the STK stc.c:handle_command_send_sms() because I am not sure what is the right way to do it -- need feedback on that.

- The generation of the SMS message ID based on contents still has
shortcomings: if we submit two messages with the same content and destination number, the ID is the same [sms.c:sms_msg_send()]. What other factor would make sense to add? time?

The following changes since commit 94344e967b4cd3edd65aa5254ef4b4f5dd037e69:
Denis Kenzior (1):
TODO: Major updates to STK related tasks

are available in the git repository at:

git://gitorious.org/~inakypg/ofono/ofono-inakypg.git master

Patches follow for reviewing convenience.

Inaky Perez-Gonzalez (20):
bug.h: Add BUILD_BUG_ON() and friends for compile-time assert checking
write_file: make transaction-safe
manpage: explain debugging options to -d
SMS: introduce message ID API
introduce DECLARE_SMS_ADDR_STR()
_assembly_encode_address: export and rename
SMS: implement SHA256-based message IDs [incomplete]
sms: document the org.ofono.SMSMessage D-Bus interface
SMS: document handle_sms_status_report()
sms_text_prepare: document @use_delivery_reports
SMS: rename create_tx_queue_entry() to tx_queue_entry_new() struct tx_queue_entry: add a destructor
SMS: encapsulate D-Bus specific data in 'struct sms_msg_dbus_data'
SMS: introduce bare state machine and transitions
SMS: introduce Wait-for-Status-Report state and infrastructure
SMS: introduce a state change callback for TX messages
SMS: export outgoing messages over D-Bus
SMS: send D-Bus SMS-MSG::PropertyChanged signals when message changes status
SMS: introduce sms_msg_cancel and its D-Bus wrapper
SMS: Implement D-Bus SMS-MSG::GetProperties

 HACKING                        |   10 +
 Makefile.am                    |    5 +-
 doc/ofonod.8                   |    5 +-
 doc/sms-api.txt                |   49 ++++-
 src/bug.h                      |   50 ++++
 src/ofono.h                    |   42 +++-
 src/sms.c                      |  598 ++++++++++++++++++++++++++++++++++------
 src/smsutil.c                  |  206 ++++++++++++++-
 src/smsutil.h                  |  122 ++++++++
 src/stk.c                      |   24 ++-
 src/storage.c                  |   42 ++-
 test/test-sms-msg-cancel       |  173 ++++++++++++
 test/test-sms-msg-state-change |   24 ++
 unit/test-sms-msg-id.c         |  212 ++++++++++++++
 14 files changed, 1449 insertions(+), 113 deletions(-)
 create mode 100644 src/bug.h
 create mode 100755 test/test-sms-msg-cancel
 create mode 100755 test/test-sms-msg-state-change
 create mode 100644 unit/test-sms-msg-id.c