Open Source Telephony
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: ofono@ofono.org
Subject: Re: [PATCH_v3 1/4] GAtPPP: Add ACFC option support
Date: Tue, 28 Jun 2011 18:38:46 -0700	[thread overview]
Message-ID: <1309311529.2208.36.camel@aeonflux> (raw)
In-Reply-To: <4E0A63F0.8070607@gmail.com>

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

Hi Denis,

> >>> @@ -658,6 +703,11 @@ void g_at_ppp_set_server_info(GAtPPP *ppp, const char *remote,
> >>>  	ipcp_set_server_info(ppp->ipcp, r, d1, d2);
> >>>  }
> >>>  
> >>> +void g_at_ppp_set_acfc_enabled(GAtPPP *ppp)
> >>
> >> I really do want the signature to be g_at_ppp_set_acfc_enabled(GAtPPP
> >> *ppp, gboolean enabled)
> >>
> >> There are cases where we might re-use the PPP object with different
> >> parameters.
> > 
> > what is wrong with just g_at_ppp_set_acfc(GAtPPP *ppp, gboolean enabled)
> > as function name. Duplicating enabled in the function name and as
> > parameter seems to be bit odd.
> 
> For APIs I generally prefer:
> 
> _set_foo() when foo is a 'thing', e.g int/string/struct/etc
> 
> and _set_foo_enabled() when foo is on/off as that intent is clearer when
> reading the code.

fair enough.

However we have not been 100% consistent then here.

g_at_server_set_echo()
g_at_hdlc_set_no_carrier_detect()

Both look at bit fishy with this API intention. Should we fix them as
well then while at it?

Regards

Marcel



  reply	other threads:[~2011-06-29  1:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-28 10:03 [PATCH_v3 0/4] ACFC and PFC options implementation Guillaume Zajac
2011-06-28 10:03 ` [PATCH_v3 1/4] GAtPPP: Add ACFC option support Guillaume Zajac
2011-06-28 17:03   ` Denis Kenzior
2011-06-29  1:24     ` Marcel Holtmann
2011-06-28 23:29       ` Denis Kenzior
2011-06-29  1:38         ` Marcel Holtmann [this message]
2011-06-28 23:40           ` Denis Kenzior
2011-06-28 10:03 ` [PATCH_v3 2/4] GAtPPP: Add PFC " Guillaume Zajac
2011-06-28 10:03 ` [PATCH_v3 3/4] emulator: Activate ACFC and PFC options onto GAtPPP object Guillaume Zajac
2011-06-28 10:03 ` [PATCH_v3 4/4] gsmdial: Activate ACFC and PFC options on " Guillaume Zajac

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=1309311529.2208.36.camel@aeonflux \
    --to=marcel@holtmann.org \
    --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