Open Source Telephony
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH_v4 2/5] private-network: add callback typedef drivers and settings
Date: Sun, 08 May 2011 23:48:28 -0500	[thread overview]
Message-ID: <4DC7721C.5050707@gmail.com> (raw)
In-Reply-To: <1304690513-3137-3-git-send-email-guillaume.zajac@linux.intel.com>

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

Hi Guillaume,

On 05/06/2011 09:01 AM, Guillaume Zajac wrote:
> ---
>  include/private-network.h |   59 +++++++++++++++++++++++++++++++++++++++++++++
>  1 files changed, 59 insertions(+), 0 deletions(-)
>  create mode 100644 include/private-network.h
> 

You also need to include this file into the build system, so changes to
Makefile.am should be included here as well.

> diff --git a/include/private-network.h b/include/private-network.h
> new file mode 100644
> index 0000000..ba84a36
> --- /dev/null
> +++ b/include/private-network.h
> @@ -0,0 +1,59 @@
> +/*
> + *
> + *  oFono - Open Source Telephony
> + *
> + *  Copyright (C) 2008-2011  Intel Corporation. All rights reserved.
> + *
> + *  This program is free software; you can redistribute it and/or modify
> + *  it under the terms of the GNU General Public License version 2 as
> + *  published by the Free Software Foundation.
> + *
> + *  This program is distributed in the hope that it will be useful,
> + *  but WITHOUT ANY WARRANTY; without even the implied warranty of
> + *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + *  GNU General Public License for more details.
> + *
> + *  You should have received a copy of the GNU General Public License
> + *  along with this program; if not, write to the Free Software
> + *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
> + *
> + */
> +
> +

Why the double newline?

> +#ifndef __OFONO_PRIVATE_NETWORK_H
> +#define __OFONO_PRIVATE_NETWORK_H
> +
> +#ifdef __cplusplus
> +extern "C" {
> +#endif
> +
> +#include <glib.h>

One of the rules of writing oFono public APIs (e.g. files under include)
is that they should use native C types.  Do not ever use glib types here.

> +
> +struct ofono_private_network_settings {
> +	int fd;
> +	const char *server_ip;
> +	const char *peer_ip;
> +	const char *primary_dns;
> +	const char *secondary_dns;
> +};
> +
> +

Why the double newline?

> +typedef gboolean (ofono_private_network_cb_t)(
> +		void *data, struct ofono_private_network_settings *settings);

What is the purpose of the gboolean return value in this callback?

> +
> +struct ofono_private_network_driver {
> +	char *name;
> +	int (*request)(ofono_private_network_cb_t cb, void *data);
> +	void (*release)(int uid);
> +};
> +
> +int ofono_private_network_driver_register(
> +			const struct ofono_private_network_driver *d);
> +void ofono_private_network_driver_unregister(
> +			const struct ofono_private_network_driver *d);
> +
> +#ifdef __cplusplus
> +}
> +#endif
> +
> +#endif /* __OFONO_PRIVATE_NETWORK_H */

Regards,
-Denis

  reply	other threads:[~2011-05-09  4:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-06 14:01 [PATCH_v4 0/5] Private network request to ConnMan Guillaume Zajac
2011-05-06 14:01 ` [PATCH_v4 1/5] gatppp: Add new contructor to use external fd Guillaume Zajac
2011-05-09  4:44   ` Denis Kenzior
2011-05-06 14:01 ` [PATCH_v4 2/5] private-network: add callback typedef drivers and settings Guillaume Zajac
2011-05-09  4:48   ` Denis Kenzior [this message]
2011-05-06 14:01 ` [PATCH_v4 3/5] private-network: add request/release functions and new feature to Makefile.am Guillaume Zajac
2011-05-09  4:52   ` Denis Kenzior
2011-05-06 14:01 ` [PATCH_v4 4/5] emulator: add request/release private network calls Guillaume Zajac
2011-05-06 14:01 ` [PATCH_v4 5/5] connman: add plugin in oFono to request request/release private network Guillaume Zajac
2011-05-09  5:30   ` Denis Kenzior
2021-06-03 10:22 ` [PATCH_v4 0/5] Private network request to ConnMan adamsmith.87
2021-06-15 13:06   ` Jackson.com551
2021-07-21 19:49 ` Kaylee Brown

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=4DC7721C.5050707@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