Open Source Telephony
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [RFC online/offline atoms PATCH 1/4] modem: add modem state watch
Date: Wed, 13 Oct 2010 15:39:25 -0500	[thread overview]
Message-ID: <4CB618FD.6050006@gmail.com> (raw)
In-Reply-To: <1286278512-3529-2-git-send-email-Pekka.Pessi@nokia.com>

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

Hi Andras & Pekka,

<snip>

> diff --git a/src/ofono.h b/src/ofono.h
> index 6c7f649..9021f51 100644
> --- a/src/ofono.h
> +++ b/src/ofono.h
> @@ -177,6 +177,21 @@ unsigned int __ofono_modemwatch_add(ofono_modemwatch_cb_t cb, void *user,
>  					ofono_destroy_func destroy);
>  gboolean __ofono_modemwatch_remove(unsigned int id);
>  
> +enum ofono_modem_state {
> +	MODEM_STATE_POWER_OFF,
> +	MODEM_STATE_PRE_SIM,
> +	MODEM_STATE_OFFLINE,
> +	MODEM_STATE_ONLINE,
> +};

Personally I don't see the need for anything besides an online/offline
watch.  Nobody will ever care about the other states.

> +
> +typedef void (*ofono_modem_state_notify_func)(enum ofono_modem_state state,
> +						void *data);

So I suggest ofono_modem_online_notify_func(gboolean online, void *data)

> +unsigned int __ofono_modem_add_state_watch(struct ofono_modem *modem,
> +				ofono_modem_state_notify_func notify,
> +				void *data, ofono_destroy_func destroy);
> +void __ofono_modem_remove_state_watch(struct ofono_modem *modem,
> +					unsigned int id);
> +

And add/remove online_watch here

>  #include <ofono/call-barring.h>
>  
>  gboolean __ofono_call_barring_is_busy(struct ofono_call_barring *cb);

Regards,
-Denis

  parent reply	other threads:[~2010-10-13 20:39 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-05 11:35 [RFC online/offline atoms PATCH 0/4] modem: add modem state watch Pekka.Pessi
2010-10-05 11:35 ` [RFC online/offline atoms PATCH 1/4] " Pekka.Pessi
2010-10-05 11:35   ` [RFC online/offline atoms PATCH 2/4] sms: watch modem state Pekka.Pessi
2010-10-05 11:35     ` [RFC online/offline atoms PATCH 3/4] gprs: " Pekka.Pessi
2010-10-05 11:35       ` [RFC online/offline atoms PATCH 4/4] isigen: create sms and gprs in post_sim Pekka.Pessi
2010-10-05 12:04         ` Marcel Holtmann
2010-10-06  0:40           ` Denis Kenzior
2010-10-06  8:55             ` Marcel Holtmann
2010-10-13 20:53       ` [RFC online/offline atoms PATCH 3/4] gprs: watch modem state Denis Kenzior
2010-10-05 11:59     ` [RFC online/offline atoms PATCH 2/4] sms: " Marcel Holtmann
2010-10-06  0:38       ` Denis Kenzior
2010-10-06  8:54         ` Marcel Holtmann
2010-10-13 20:45     ` Denis Kenzior
2010-10-05 11:56   ` [RFC online/offline atoms PATCH 1/4] modem: add modem state watch Marcel Holtmann
2010-10-13 20:39   ` Denis Kenzior [this message]
2010-10-14  7:21     ` Pekka Pessi

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=4CB618FD.6050006@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox