From: Faiyaz Baxamusa <faiyaz.baxamusa@nokia.com>
To: ofono@ofono.org
Subject: Re: [PATCH 2/3] include: Introduce message
Date: Thu, 13 Jan 2011 14:40:27 -0800 [thread overview]
Message-ID: <4D2F7F5B.9050508@nokia.com> (raw)
In-Reply-To: <4D2F3FB0.1000505@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3922 bytes --]
Hi Denis:
On 01/13/2011 10:08 AM, ext Denis Kenzior wrote:
> Hi Faiyaz,
>
> On 01/06/2011 01:50 PM, Faiyaz Baxamusa wrote:
>> ---
>> Makefile.am | 2 +-
>> include/message.h | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++
>> 2 files changed, 68 insertions(+), 1 deletions(-)
>> create mode 100644 include/message.h
>
> This is not an atom, it is an implementation detail inside the core. So
> please don't put this into include/ (this is where the public API, for
> e.g. plugins and drivers goes)
>
> Moving this inside src/message.h is the way to go.
Will move the file to src/message.h
>
>>
>> diff --git a/Makefile.am b/Makefile.am
>> index 14f53ef..8b19eef 100644
>> --- a/Makefile.am
>> +++ b/Makefile.am
>> @@ -15,7 +15,7 @@ include_HEADERS = include/log.h include/plugin.h include/history.h \
>> include/radio-settings.h include/stk.h \
>> include/audio-settings.h include/nettime.h \
>> include/ctm.h include/cdma-voicecall.h \
>> - include/cdma-sms.h
>> + include/cdma-sms.h include/message.h
>>
>> nodist_include_HEADERS = include/version.h
>>
>> diff --git a/include/message.h b/include/message.h
>> new file mode 100644
>> index 0000000..7c60390
>> --- /dev/null
>> +++ b/include/message.h
>> @@ -0,0 +1,67 @@
>> +/*
>> + *
>> + * 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
>> + *
>> + */
>> +
>> +#ifndef __OFONO_MESSAGE_H
>> +#define __OFONO_MESSAGE_H
>> +
>> +#ifdef __cplusplus
>> +extern "C" {
>> +#endif
>> +
>> +#include<ofono/types.h>
>> +
>> +enum message_state {
>> + MESSAGE_STATE_PENDING,
>> + MESSAGE_STATE_SENT,
>> + MESSAGE_STATE_FAILED
>> +};
>> +
>> +struct message;
>> +
>> +struct message *ofono_message_create(const struct ofono_uuid *uuid,
>> + void *data);
>
> Please use message_set_data to be symmetrical with the rest of the codebase.
Sure will initialize "data" param using message_set_data.
>
>> +
>> +gboolean ofono_message_dbus_register(const char *atompath, struct message *m);
>> +void ofono_message_dbus_unregister(const char *atompath, struct message *m);
>> +
>> +const struct ofono_uuid *ofono_message_get_uuid(const struct message *m);
>> +
>> +void ofono_message_set_state(const char *atompath, struct message *m,
>> + enum message_state new_state);
>> +
>> +void ofono_message_append_properties(struct message *m, DBusMessageIter *dict);
>> +
>> +void ofono_emit_message_added(const char *atompath, const char *interface,
>> + struct message *m);
>> +
>> +void ofono_emit_message_removed(const char *atompath, const char *interface,
>> + struct message *m);
>> +
>> +void *ofono_message_get_data(struct message *m);
>> +
>> +const char *ofono_message_path_from_uuid(const char *atompath,
>> + const struct ofono_uuid *uuid);
>> +
>
> Since this is not public API please don't use the ofono_ prefix for
> this. Using e.g. message_emit_removed, message_append_properties, etc
> is good enough.
Will rename all the functions to message_XXX.
Thank you
Faiyaz
>
> Regards,
> -Denis
prev parent reply other threads:[~2011-01-13 22:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-06 19:50 [PATCH 2/3] include: Introduce message Faiyaz Baxamusa
2011-01-13 18:08 ` Denis Kenzior
2011-01-13 22:40 ` Faiyaz Baxamusa [this message]
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=4D2F7F5B.9050508@nokia.com \
--to=faiyaz.baxamusa@nokia.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