Re: [RFC PATCH 2/3] ssn: add code and call id to notifications

2011-02-28 Thread Denis Kenzior
Hi Andras,

On 02/28/2011 10:28 AM, Andras Domokos wrote:
> ---
>  drivers/atmodem/ssn.c |4 ++--
>  include/ssn.h |7 ---
>  src/ofono.h   |5 +++--
>  src/ssn.c |   11 ++-
>  4 files changed, 15 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/atmodem/ssn.c b/drivers/atmodem/ssn.c
> index c927bf1..ba8f89a 100644
> --- a/drivers/atmodem/ssn.c
> +++ b/drivers/atmodem/ssn.c
> @@ -56,7 +56,7 @@ static void cssi_notify(GAtResult *result, gpointer 
> user_data)
>   if (!g_at_result_iter_next_number(&iter, &index))
>   index = 0;
>  
> - ofono_ssn_mo_notify(ssn, code1, index);
> + ofono_ssn_mo_notify(ssn, 0, code1, index);
>  }
>  
>  static void cssu_notify(GAtResult *result, gpointer user_data)
> @@ -93,7 +93,7 @@ static void cssu_notify(GAtResult *result, gpointer 
> user_data)
>   return;
>  
>  out:
> - ofono_ssn_mt_notify(ssn, code2, index, &ph);
> + ofono_ssn_mt_notify(ssn, 0, code2, index, &ph);
>  }
>  
>  static void at_ssn_initialized(gboolean ok, GAtResult *result,
> diff --git a/include/ssn.h b/include/ssn.h
> index c8f3e0b..4f41bae 100644
> --- a/include/ssn.h
> +++ b/include/ssn.h
> @@ -37,9 +37,10 @@ struct ofono_ssn_driver {
>  };
>  
>  /* SSN notifications (CSSI and CSSU).  */
> -void ofono_ssn_mo_notify(struct ofono_ssn *ssn, int code, int index);
> -void ofono_ssn_mt_notify(struct ofono_ssn *ssn, int code, int index,
> - const struct ofono_phone_number *number);
> +void ofono_ssn_mo_notify(struct ofono_ssn *ssn, unsigned int id,
> + int code1, int index);
> +void ofono_ssn_mt_notify(struct ofono_ssn *ssn, unsigned int id, int code2,
> + int index, const struct ofono_phone_number *number);
>  
>  int ofono_ssn_driver_register(const struct ofono_ssn_driver *d);
>  void ofono_ssn_driver_unregister(const struct ofono_ssn_driver *d);

Please just remove the ssn atom completely and add these functions to
the voicecall atom.  e.g.:

ofono_voicecall_cssi_notify
ofono_voicecall_cssu_notify

or

ofono_voicecall_ssn_mt_notify
ofono_voicecall_ssn_mo_notify

> diff --git a/src/ofono.h b/src/ofono.h
> index 4e298f1..4af6f86 100644
> --- a/src/ofono.h
> +++ b/src/ofono.h
> @@ -346,8 +346,9 @@ int __ofono_sms_sim_download(struct ofono_stk *stk, const 
> struct sms *msg,
>  
>  #include 
>  
> -typedef void (*ofono_ssn_mo_notify_cb)(int index, void *user);
> -typedef void (*ofono_ssn_mt_notify_cb)(int index,
> +typedef void (*ofono_ssn_mo_notify_cb)(unsigned int id, int code1, int index,
> + void *user);
> +typedef void (*ofono_ssn_mt_notify_cb)(unsigned int id, int code2, int index,
>   const struct ofono_phone_number *ph,
>   void *user);
>  
> diff --git a/src/ssn.c b/src/ssn.c
> index ee48fba..383114c 100644
> --- a/src/ssn.c
> +++ b/src/ssn.c
> @@ -111,7 +111,8 @@ gboolean __ofono_ssn_mt_watch_remove(struct ofono_ssn 
> *ssn, unsigned int id)
>   return __ofono_watchlist_remove_item(ssn->mt_handler_list, id);
>  }
>  
> -void ofono_ssn_mo_notify(struct ofono_ssn *ssn, int code1, int index)
> +void ofono_ssn_mo_notify(struct ofono_ssn *ssn, unsigned int id,
> + int code1, int index)
>  {
>   struct ssn_handler *h;
>   GSList *l;
> @@ -122,12 +123,12 @@ void ofono_ssn_mo_notify(struct ofono_ssn *ssn, int 
> code1, int index)
>   notify = h->item.notify;
>  
>   if (h->code == code1)
> - notify(index, h->item.notify_data);
> + notify(id, code1, index, h->item.notify_data);
>   }
>  }
>  
> -void ofono_ssn_mt_notify(struct ofono_ssn *ssn, int code2, int index,
> - const struct ofono_phone_number *ph)
> +void ofono_ssn_mt_notify(struct ofono_ssn *ssn, unsigned int id, int code2,
> + int index, const struct ofono_phone_number *ph)
>  {
>   struct ssn_handler *h;
>   GSList *l;
> @@ -138,7 +139,7 @@ void ofono_ssn_mt_notify(struct ofono_ssn *ssn, int 
> code2, int index,
>   notify = h->item.notify;
>  
>   if (h->code == code2)
> - notify(index, ph, h->item.notify_data);
> + notify(id, code2, index, ph, h->item.notify_data);
>   }
>  }
>  

Regards,
-Denis
___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


Re: [RFC PATCH 2/3] ssn: add code and call id to notifications

2011-02-24 Thread Andras Domokos

Hi Denis,

On 02/24/2011 06:14 PM, ext Denis Kenzior wrote:

Hi Andras,


The call SS notification handling patches hasn't been (fully) applied, I
think we need to do something about it.


I'd still like a version with the SSN atom removed.

OK, I am going to remove the SSN atom, not a big deal, but do you have
any other issues at this point?

Not right now.  Your API proposal is already upstream, I just didn't
like the ssn atom being kept around.


OK, I'll prepare the patches with the SSN atom removed.


Regards,
-Denis


Regards,
Andras

___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


Re: [RFC PATCH 2/3] ssn: add code and call id to notifications

2011-02-24 Thread Denis Kenzior
Hi Andras,

>>> The call SS notification handling patches hasn't been (fully) applied, I
>>> think we need to do something about it.
>>>
>> I'd still like a version with the SSN atom removed.
> OK, I am going to remove the SSN atom, not a big deal, but do you have
> any other issues at this point?

Not right now.  Your API proposal is already upstream, I just didn't
like the ssn atom being kept around.

Regards,
-Denis
___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


Re: [RFC PATCH 2/3] ssn: add code and call id to notifications

2011-02-24 Thread Andras Domokos

Hi,

On 02/24/2011 05:43 PM, ext Denis Kenzior wrote:

Hi Andras,

Please no top posting on this mailing list.  You should know this by now.

I am terribly sorry, I know I should have not done that.

On 02/24/2011 05:43 AM, Andras Domokos wrote:

Hi Denis and Sankar,

The call SS notification handling patches hasn't been (fully) applied, I
think we need to do something about it.


I'd still like a version with the SSN atom removed.
OK, I am going to remove the SSN atom, not a big deal, but do you have 
any other issues at this point?

Regards,
-Denis


Regards,
Andras
___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


Re: [RFC PATCH 2/3] ssn: add code and call id to notifications

2011-02-24 Thread Denis Kenzior
Hi Andras,

Please no top posting on this mailing list.  You should know this by now.

On 02/24/2011 05:43 AM, Andras Domokos wrote:
> Hi Denis and Sankar,
> 
> The call SS notification handling patches hasn't been (fully) applied, I
> think we need to do something about it.
> 

I'd still like a version with the SSN atom removed.

Regards,
-Denis
___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


Re: [RFC PATCH 2/3] ssn: add code and call id to notifications

2011-02-24 Thread Andras Domokos

Hi Denis and Sankar,

The call SS notification handling patches hasn't been (fully) applied, I 
think we need to do something about it.


Regards,
Andras


On 02/22/2011 02:07 PM, ext Sankar wrote:

Hi Denis/Andras,

Is this patch applied and available in the GIT?

Regards,
Sankar.

On Thu, Feb 10, 2011 at 2:42 PM, Andras Domokos 
mailto:andras.domo...@nokia.com>> wrote:


Hi Denis,


On 02/10/2011 05:08 AM, ext Denis Kenzior wrote:

Hi Andras,

diff --git a/include/ssn.h b/include/ssn.h
index d640cad..ba3701b 100644
--- a/include/ssn.h
+++ b/include/ssn.h
@@ -37,9 +37,10 @@ struct ofono_ssn_driver {
 };

 /* SSN notifications (CSSI and CSSU).  */
-void ofono_ssn_cssi_notify(struct ofono_ssn *ssn, int
code, int index);
-void ofono_ssn_cssu_notify(struct ofono_ssn *ssn, int
code, int index,
-   const struct
ofono_phone_number *number);
+void ofono_ssn_cssi_notify(struct ofono_ssn *ssn,
unsigned int id,
+   int code1, int index);
+void ofono_ssn_cssu_notify(struct ofono_ssn *ssn,
unsigned int id, int code2,
+   int index, const struct
ofono_phone_number *number);

 int ofono_ssn_driver_register(const struct
ofono_ssn_driver *d);
 void ofono_ssn_driver_unregister(const struct
ofono_ssn_driver *d);

Right now I'm not seeing any users (or even potential ones) of
the SSN
atom besides voicecall.  What do you think of removing the SSN
atom and
moving these to the voicecall atom?

Yes, we talked about removing the SSN atom, but I thought I would
keep it for now, it can be removed any time later, anyways, doesn't
save much removing it.


The only one I'm not sure about is  from 27.007:
6   forward check SS message received (can be received
whenever)

Any idea what this one is about?

Never encountered this message, and I am not sure what is it for.
A patch for handling this message can be submitted later, if a real
life case is found for it.

Regards,
-Denis

Regards,
Andras

___
ofono mailing list
ofono@ofono.org 
http://lists.ofono.org/listinfo/ofono




___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


Re: [RFC PATCH 2/3] ssn: add code and call id to notifications

2011-02-22 Thread Sankar
Hi Denis/Andras,

Is this patch applied and available in the GIT?

Regards,
Sankar.

On Thu, Feb 10, 2011 at 2:42 PM, Andras Domokos wrote:

> Hi Denis,
>
>
> On 02/10/2011 05:08 AM, ext Denis Kenzior wrote:
>
>> Hi Andras,
>>
>>  diff --git a/include/ssn.h b/include/ssn.h
>>> index d640cad..ba3701b 100644
>>> --- a/include/ssn.h
>>> +++ b/include/ssn.h
>>> @@ -37,9 +37,10 @@ struct ofono_ssn_driver {
>>>  };
>>>
>>>  /* SSN notifications (CSSI and CSSU).  */
>>> -void ofono_ssn_cssi_notify(struct ofono_ssn *ssn, int code, int index);
>>> -void ofono_ssn_cssu_notify(struct ofono_ssn *ssn, int code, int index,
>>> -   const struct ofono_phone_number *number);
>>> +void ofono_ssn_cssi_notify(struct ofono_ssn *ssn, unsigned int id,
>>> +   int code1, int index);
>>> +void ofono_ssn_cssu_notify(struct ofono_ssn *ssn, unsigned int id, int
>>> code2,
>>> +   int index, const struct ofono_phone_number
>>> *number);
>>>
>>>  int ofono_ssn_driver_register(const struct ofono_ssn_driver *d);
>>>  void ofono_ssn_driver_unregister(const struct ofono_ssn_driver *d);
>>>
>> Right now I'm not seeing any users (or even potential ones) of the SSN
>> atom besides voicecall.  What do you think of removing the SSN atom and
>> moving these to the voicecall atom?
>>
> Yes, we talked about removing the SSN atom, but I thought I would
> keep it for now, it can be removed any time later, anyways, doesn't
> save much removing it.
>
>
>  The only one I'm not sure about is  from 27.007:
>> 6   forward check SS message received (can be received whenever)
>>
>> Any idea what this one is about?
>>
>>  Never encountered this message, and I am not sure what is it for.
> A patch for handling this message can be submitted later, if a real
> life case is found for it.
>
>  Regards,
>> -Denis
>>
> Regards,
> Andras
>
> ___
> ofono mailing list
> ofono@ofono.org
> http://lists.ofono.org/listinfo/ofono
>
___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


Re: [RFC PATCH 2/3] ssn: add code and call id to notifications

2011-02-10 Thread Andras Domokos

Hi Denis,

On 02/10/2011 05:08 AM, ext Denis Kenzior wrote:

Hi Andras,


diff --git a/include/ssn.h b/include/ssn.h
index d640cad..ba3701b 100644
--- a/include/ssn.h
+++ b/include/ssn.h
@@ -37,9 +37,10 @@ struct ofono_ssn_driver {
  };

  /* SSN notifications (CSSI and CSSU).  */
-void ofono_ssn_cssi_notify(struct ofono_ssn *ssn, int code, int index);
-void ofono_ssn_cssu_notify(struct ofono_ssn *ssn, int code, int index,
-   const struct ofono_phone_number *number);
+void ofono_ssn_cssi_notify(struct ofono_ssn *ssn, unsigned int id,
+   int code1, int index);
+void ofono_ssn_cssu_notify(struct ofono_ssn *ssn, unsigned int id, int code2,
+   int index, const struct ofono_phone_number *number);

  int ofono_ssn_driver_register(const struct ofono_ssn_driver *d);
  void ofono_ssn_driver_unregister(const struct ofono_ssn_driver *d);

Right now I'm not seeing any users (or even potential ones) of the SSN
atom besides voicecall.  What do you think of removing the SSN atom and
moving these to the voicecall atom?

Yes, we talked about removing the SSN atom, but I thought I would
keep it for now, it can be removed any time later, anyways, doesn't
save much removing it.


The only one I'm not sure about is  from 27.007:
6   forward check SS message received (can be received whenever)

Any idea what this one is about?


Never encountered this message, and I am not sure what is it for.
A patch for handling this message can be submitted later, if a real
life case is found for it.


Regards,
-Denis

Regards,
Andras
___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


Re: [RFC PATCH 2/3] ssn: add code and call id to notifications

2011-02-09 Thread Denis Kenzior
Hi Andras,

> diff --git a/include/ssn.h b/include/ssn.h
> index d640cad..ba3701b 100644
> --- a/include/ssn.h
> +++ b/include/ssn.h
> @@ -37,9 +37,10 @@ struct ofono_ssn_driver {
>  };
>  
>  /* SSN notifications (CSSI and CSSU).  */
> -void ofono_ssn_cssi_notify(struct ofono_ssn *ssn, int code, int index);
> -void ofono_ssn_cssu_notify(struct ofono_ssn *ssn, int code, int index,
> - const struct ofono_phone_number *number);
> +void ofono_ssn_cssi_notify(struct ofono_ssn *ssn, unsigned int id,
> + int code1, int index);
> +void ofono_ssn_cssu_notify(struct ofono_ssn *ssn, unsigned int id, int code2,
> + int index, const struct ofono_phone_number *number);
>  
>  int ofono_ssn_driver_register(const struct ofono_ssn_driver *d);
>  void ofono_ssn_driver_unregister(const struct ofono_ssn_driver *d);

Right now I'm not seeing any users (or even potential ones) of the SSN
atom besides voicecall.  What do you think of removing the SSN atom and
moving these to the voicecall atom?

The only one I'm not sure about is  from 27.007:
6   forward check SS message received (can be received whenever)

Any idea what this one is about?

Regards,
-Denis
___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono