All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [RFC 1/4] network: __ofono_netreg_registration_status internal api
Date: Wed, 12 Jan 2011 16:20:50 -0600	[thread overview]
Message-ID: <4D2E2942.6050906@gmail.com> (raw)
In-Reply-To: <1294652623-17287-2-git-send-email-jeevaka.badrappan@elektrobit.com>

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

Hi Jeevaka,

On 01/10/2011 03:43 AM, Jeevaka Badrappan wrote:
> ---
>  src/network.c |    8 ++++++++
>  src/ofono.h   |    2 ++
>  2 files changed, 10 insertions(+), 0 deletions(-)
> 
> diff --git a/src/network.c b/src/network.c
> index eb0f797..640391d 100644
> --- a/src/network.c
> +++ b/src/network.c
> @@ -1864,3 +1864,11 @@ void *ofono_netreg_get_data(struct ofono_netreg *netreg)
>  {
>  	return netreg->driver_data;
>  }
> +
> +int __ofono_netreg_registration_status(struct ofono_netreg *netreg)
> +{
> +	if (netreg == NULL)
> +		return NETWORK_REGISTRATION_STATUS_UNKNOWN;
> +

For internal API I suggest skipping the NULL check.  I'd rather see us
crash early.

> +	return netreg->status;
> +}
> diff --git a/src/ofono.h b/src/ofono.h
> index cab70cd..91f737f 100644
> --- a/src/ofono.h
> +++ b/src/ofono.h
> @@ -375,6 +375,8 @@ gboolean __ofono_netreg_remove_status_watch(struct ofono_netreg *netreg,
>  void __ofono_netreg_set_base_station_name(struct ofono_netreg *netreg,
>  						const char *name);
>  
> +int __ofono_netreg_registration_status(struct ofono_netreg *netreg);
> +

Please name this __ofono_netreg_get_registration_status

>  #include <ofono/history.h>
>  
>  void __ofono_history_probe_drivers(struct ofono_modem *modem);

Regards,
-Denis

  reply	other threads:[~2011-01-12 22:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-10  9:43 [RFC 0/4] LaunchBrowser Proactive command Support Jeevaka Badrappan
2011-01-10  9:43 ` [RFC 1/4] network: __ofono_netreg_registration_status internal api Jeevaka Badrappan
2011-01-12 22:20   ` Denis Kenzior [this message]
2011-01-10  9:43 ` [RFC 2/4] stk: Handle Launch Browser proactive command Jeevaka Badrappan
2011-01-12 22:31   ` Denis Kenzior
2011-01-12 22:45     ` andrzej zaborowski
2011-01-13 14:56       ` Jeevaka.Badrappan
2011-01-13 16:35         ` Denis Kenzior
2011-01-10  9:43 ` [RFC 3/4] test: Add support for launch browser command Jeevaka Badrappan
2011-01-10  9:43 ` [RFC 4/4] doc: Describe LaunchBrowser method Jeevaka Badrappan
2011-01-12 22:26   ` 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=4D2E2942.6050906@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.