Re: [RFC PATCHv2 1/4] sim: add ofono_sim_get_mnc_length

2011-01-03 Thread Marcel Holtmann
Hi Jukka,

>  include/sim.h |1 +
>  src/sim.c |8 
>  2 files changed, 9 insertions(+), 0 deletions(-)
> 
> diff --git a/include/sim.h b/include/sim.h
> index 7860e24..3d0c6b7 100644
> --- a/include/sim.h
> +++ b/include/sim.h
> @@ -173,6 +173,7 @@ void ofono_sim_set_data(struct ofono_sim *sim, void 
> *data);
>  void *ofono_sim_get_data(struct ofono_sim *sim);
>  
>  const char *ofono_sim_get_imsi(struct ofono_sim *sim);
> +int ofono_sim_get_mnc_length(struct ofono_sim *sim);

actually that value is an unsigned char.

Regards

Marcel


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


[RFC PATCHv2 1/4] sim: add ofono_sim_get_mnc_length

2011-01-02 Thread Jukka Saunamaki
---
 include/sim.h |1 +
 src/sim.c |8 
 2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/include/sim.h b/include/sim.h
index 7860e24..3d0c6b7 100644
--- a/include/sim.h
+++ b/include/sim.h
@@ -173,6 +173,7 @@ void ofono_sim_set_data(struct ofono_sim *sim, void *data);
 void *ofono_sim_get_data(struct ofono_sim *sim);
 
 const char *ofono_sim_get_imsi(struct ofono_sim *sim);
+int ofono_sim_get_mnc_length(struct ofono_sim *sim);
 enum ofono_sim_phase ofono_sim_get_phase(struct ofono_sim *sim);
 
 enum ofono_sim_cphs_phase ofono_sim_get_cphs_phase(struct ofono_sim *sim);
diff --git a/src/sim.c b/src/sim.c
index 335f611..8210972 100644
--- a/src/sim.c
+++ b/src/sim.c
@@ -1913,6 +1913,14 @@ const char *ofono_sim_get_imsi(struct ofono_sim *sim)
return sim->imsi;
 }
 
+int ofono_sim_get_mnc_length(struct ofono_sim *sim)
+{
+   if (sim == NULL)
+   return 0;
+
+   return sim->mnc_length;
+}
+
 enum ofono_sim_phase ofono_sim_get_phase(struct ofono_sim *sim)
 {
if (sim == NULL)
-- 
1.7.1

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