From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: CDMA SMS Handling
Date: Wed, 13 Oct 2010 16:21:35 -0500 [thread overview]
Message-ID: <4CB622DF.9030601@gmail.com> (raw)
In-Reply-To: <C681C76E0D5F1E4BB01DE79E0A80EEC702ACA2F9@usrdes03.ebgroup.elektrobit.com>
[-- Attachment #1: Type: text/plain, Size: 2871 bytes --]
Hi Rajesh,
> I did an analysis of the existing smsutils fuctionalities for the code
> reusability. If we can make the struct sms common for both GSM and CDMA
> by having them as union members, then we can re-use sms assembly
> serialization and fragmentation/de-fragmentation logic with only minor
> changes and no interface changes. Also this struct change will later
> help in multimode case as well, if we have plans for a multimode stack.
>
> Existing struct sms:
>
> struct sms {
> struct sms_address sc_addr;
> enum sms_type type;
> union {
> struct sms_deliver deliver;
> struct sms_deliver_ack_report deliver_ack_report;
> struct sms_deliver_err_report deliver_err_report;
> struct sms_submit submit;
> struct sms_submit_ack_report submit_ack_report;
> struct sms_submit_err_report submit_err_report;
> struct sms_command command;
> struct sms_status_report status_report;
> };
> };
>
> Proposed struct sms:
>
> struct sms {
> enum sms_type type;
> union {
> struct gsm_sms g_sms;
> struct cdma_sms c_sms;
> };
> };
So personally I'd just extend the current enum sms_type with CDMA
variants, e.g.:
SMS_TYPE_CDMA_DELIVER, SMS_TYPE_CDMA_SUBMIT, etc and add the cdma
structures directly to the current union, e.g:
struct sms {
struct sms_address sc_addr;
enum sms_type type;
union {
struct sms_deliver deliver;
struct sms_deliver_ack_report deliver_ack_report;
struct sms_deliver_err_report deliver_err_report;
struct sms_submit submit;
struct sms_submit_ack_report submit_ack_report;
struct sms_submit_err_report submit_err_report;
struct sms_command command;
struct sms_status_report status_report;
/* CDMA */
struct sms_cdma_deliver deliver;
struct sms_cdma_submit submit;
...
};
};
<snip>
> struct cdma_sms {
> enum cdma_sms_type type;
Does CDMA have an SMSC address?
> union {
> struct cdma_sms_deliver deliver;
> struct cdma_sms_submit submit;
> struct cdma_sms_cancel cancel;
> struct cdma_sms_delivery_ack delivery_ack;
> struct cdma_sms_user_ack user_ack;
> struct cdma_sms_read_ack read_ack;
> struct cdma_sms_deliver_report deliver_report;
> struct cdma_sms_submit_report submit_report;
> };
> };
>
> Let me know your feedback on this. If we agree on this, then one of the
> first tasks should be to do this struct change on the exising code, so
> that GSM developement can happen parallely based on this new structural
> change.
Doing it the way I suggested would keep the impact on the current code
base absolutely minimal. This way you can start submitting patches
right away for CDMA support without impacting anyone. Once the CDMA
aspects are stabilized and we're happy with them we can do the final
struct / API refactoring as needed.
Thoughts?
Regards,
-Denis
next prev parent reply other threads:[~2010-10-13 21:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-06 6:48 CDMA SMS Handling Rajesh.Nagaiah
2010-10-06 9:01 ` Marcel Holtmann
2010-10-07 0:10 ` Denis Kenzior
2010-10-09 1:19 ` Rajesh.Nagaiah
2010-10-13 21:21 ` Denis Kenzior [this message]
2010-10-14 18:26 ` Rajesh.Nagaiah
2010-10-18 22:31 ` Denis Kenzior
2012-06-15 15:13 ` asraf
2012-06-15 13:46 ` asraf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4CB622DF.9030601@gmail.com \
--to=denkenz@gmail.com \
--cc=ofono@ofono.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.