All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: SMS doubt
Date: Thu, 15 Jan 2015 10:00:35 -0600	[thread overview]
Message-ID: <54B7E423.1040703@gmail.com> (raw)
In-Reply-To: <CAH4ZQwvKJZTbANZ7i-AhaSy8fJM2Z01c0koVgvQM3Ej4sgJPag@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1492 bytes --]

Hi Enrico,

On 01/15/2015 03:55 AM, Enrico Sau wrote:
> Hi all,
> I was wondering how should ofono behave on a SMS reception.
> Should the message be saved somewhere by ofono, or another application
> in needed for that?

oFono does not save anything.  One can write a history plugin to write 
this information to a database of your choice, or export this 
information via DBus/other IPC in some way.  See examples/history.c for 
a very basic example.  Search the mailing list archives for more complex 
examples of this.

Alternatively, you can write a simple application that listens to the 
MessageManager.ImmediateMessage and MessageManager.IncomingMessage 
signals to store messages.  However, this is not quite as reliable as 
the history plugin approach since if your application is not running / 
crashes, messages that are received during that time would be lost.

> I'm asking because after some SMS receptions, the script list-messages
> does not show anything.
>

The Message objects exposed by GetMessages() method, MessageAdded() and 
MessageRemoved() signals are for the outgoing path only.  If you notice, 
the states are:

"
Properties      string State

                         Contains the state of the message object.  Possible
                         values are:
                                 "pending",
                                 "sent",
                                 "failed"
"

Hope this helps.

Regards,
-Denis

      reply	other threads:[~2015-01-15 16:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-15  9:55 SMS doubt Enrico Sau
2015-01-15 16:00 ` Denis Kenzior [this message]

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=54B7E423.1040703@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.