Hi Denis,

On 2 July 2010 04:28, Denis Kenzior <[email protected]> wrote:
>>>> +     GQueue *envelope_q;
>>>> +};
>>>> +
>>>> +struct envelope_op {
>>>> +     struct stk_envelope e;
>>>> +     int retries;
>>>> +     void (*cb)(struct ofono_stk *stk, gboolean ok,
>>>> +                     const unsigned char *data, int length);
>>>
>>> Is the callback really needed?  What can we intelligently do besides
>>> printing an error to the log?
>>
>> In the generic case we should inform whoever asked us to submit the
>> information to the UICC.  We don't currently have any such case (in
>> case of Cell Broadcast there's no one to inform.   In case of the
>> SimAppAgent our d-bus api doesn't let us do it.  In case of SMS-PP
>> download it's a technical difficulty).  But, for example the Timer
>> Expiration event is more complicated because it needs to be retried
>> until it succeeds, and every time we retry sending the envelope it
>> will be different because it contains current time.  So the Timer
>> Expiration retrying has to be imlemented separately.
>>
>
> So I suggest keeping it simple for now and not having the callback.  We
> can always add it if really needed.

I tried to remove it (I use the success callback in the menu patch..
but I planned to get rid of that usage anyway), but now I think it
would be conceptually wrong.  The ENVELOPEs send information both
ways, it's a request and a response.  For example the Call Control
envelopes return a response and we will definitely need to know what
the response was.  So I think it's easier to do correctly from the
beginning, instead of remove it and then in a couple of weeks come
back to it and look for what needs to be changed and what other code
may be affected.

It's just about two lines of code anyway.

Best regards
_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono

Reply via email to