From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH 6/9] Add SimToolkit and SimApplicationAgent interfaces.
Date: Fri, 02 Jul 2010 15:20:46 -0500 [thread overview]
Message-ID: <4C2E4A1E.3020004@gmail.com> (raw)
In-Reply-To: <AANLkTikkIUm1oD-ip_olA9NthV-I-ttP0_xw7J_W36WN@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3941 bytes --]
Hi Andrew,
>> So it seems to me with the exception of Setup Menu and Idle Mode Text we
>> should simply reject the Proactive Command outright if there is no Agent
>> registered.
>>
>> This will prevent weird situations where a proactive command is pending
>> for Timeout - 1 seconds, an agent is registered, we send the agent the
>> command and 1 second later the User gets booted out. It also seems to
>> make the implementation easier...
>
> As I mentioned in the other mail, I believe it's in line with the dbus
> design that clients can connect and disconnect any time, and it
> shouldn't affect the state. If we choose to do it differently, I
I have to disagree here. While what you say is true in the 'classical'
D-Bus usage, it is not true of Agents. An Agent going away should
affect state, and I really don't want to deal with the 'abrupt user
interruption' caused by doing it this way.
> think it ties the interface very much to dbus implementation and the
> single type of users like a Home Screen app on a phone. This use case
> is not affected if we allow agents to connect and disconnect, so
> absolutely there's no harm in doing it intelligently.
Actually for the most part that is exactly what we want, a nice and
optimized way for the UI to interact with oFono. As I pointed out
earlier, we're not making a fully generic stack. In the case of STK
only a single always-resident Agent is really required. So I'm against
complicating either Agents or the core unnecessarily. However, I
welcome anyone else's input here.
>
> I agree with moving members related to the agent to a separate struct,
> but I think the agent itself should be separate, so it can disconnect
> and connect when it feels like it.
<snip>
>>> + if (!strcmp(property, "Timeout")) {
>>> + if (dbus_message_iter_get_arg_type(&var) != DBUS_TYPE_UINT16)
>>> + return __ofono_error_invalid_args(msg);
>>> +
>>> + dbus_message_iter_get_basic(&var, &timeout);
>>> + if (dbus_message_iter_next(&iter))
>>> + return __ofono_error_invalid_args(msg);
>>> +
>>> + stk->timeout = timeout;
>>> +
>>> + if (stk->cmd_timeout && stk->custom_timeout == 0) {
>>> + g_source_remove(stk->cmd_timeout);
>>> + stk->cmd_timeout = g_timeout_add_seconds(stk->timeout,
>>> + app_agent_request_timeout, stk);
>>> + }
>>
>> This doesn't seem right to me, what if we have just 1 second left on our
>> timeout and the Timeout property is set? We end up resetting the
>> timeout completely. What do you think of simply using the new value for
>> all subsequent requests?
>>
>> I actually question the need for this attribute, who's going to actually
>> set it? Let us default to some reasonable value and add a SetProperty
>> for this later if required...
>
> I was thinking in particular of things like writing an e-mail.
>
> When you navigate the menus, 20 seconds seem like a good value for the
> timeout, or when you're shown a message like "SMS deliver". This is
> about what my old Nokia dumb-phone menu timeout was. But the SIM I
> tested has a "write an e-mail" application, so it sends a Get Input
> proactive command so you can type the contents of the e-mail, and 20
> seconds seems very short. So in my python test client I set the
Get Input can override the duration, is it not happening in this case?
> timeout to 2 minutes for Get Input (should actually reset the timeout
> everytime you stop typing).
Fair enough, but my view is that using this attribute is still the wrong
way to solve this. I'd simply default to an infinite timeout for Get
Input, Get Inkey unless the SIM overrides the duration. There's no need
to involve the UI here.
Regards,
-Denis
next prev parent reply other threads:[~2010-07-02 20:20 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-29 10:14 [PATCH 1/9] stk: Utilities for proactive command/envelope handling Andrzej Zaborowski
2010-06-29 10:14 ` [PATCH 2/9] mbmmodem: Cancel running command on *STKEND Andrzej Zaborowski
2010-06-29 10:14 ` [PATCH 3/9] stk: Handle the More Time command as a nop Andrzej Zaborowski
2010-06-29 10:14 ` [PATCH 4/9] Make sim operations return sim error codes to core Andrzej Zaborowski
2010-07-01 19:16 ` Denis Kenzior
2010-06-29 10:14 ` [PATCH 5/9] stk: Handle ENVELOPEs in a queue, retry on sim busy Andrzej Zaborowski
2010-07-01 19:57 ` Denis Kenzior
2010-07-02 1:32 ` Andrzej Zaborowski
2010-07-02 2:28 ` Denis Kenzior
2010-07-02 19:15 ` Andrzej Zaborowski
2010-06-29 10:14 ` [PATCH 6/9] Add SimToolkit and SimApplicationAgent interfaces Andrzej Zaborowski
2010-07-02 17:21 ` Denis Kenzior
2010-07-02 19:55 ` Andrzej Zaborowski
2010-07-02 20:20 ` Denis Kenzior [this message]
2010-07-02 23:40 ` Andrzej Zaborowski
2010-07-03 0:23 ` Andrzej Zaborowski
2010-07-03 18:24 ` Denis Kenzior
2010-06-29 10:14 ` [PATCH 7/9] stk: Add menu related utilities Andrzej Zaborowski
2010-06-29 10:14 ` [PATCH 8/9] stk: Handle Select Item and Set Up Menu commands Andrzej Zaborowski
2010-06-29 10:14 ` [PATCH 9/9] stk: Handle the Display Text command Andrzej Zaborowski
2010-07-01 19:10 ` [PATCH 1/9] stk: Utilities for proactive command/envelope handling Denis Kenzior
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=4C2E4A1E.3020004@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.