Linux bluetooth development
 help / color / mirror / Atom feed
From: Slawomir Bochenski <lkslawek@gmail.com>
To: linux-bluetooth@vger.kernel.org
Cc: Slawomir Bochenski <lkslawek@gmail.com>
Subject: [PATCH 0/2] Message Access Profile, cont.
Date: Wed, 23 Mar 2011 14:56:18 +0100	[thread overview]
Message-ID: <1300888580-19317-1-git-send-email-lkslawek@gmail.com> (raw)

As Johan insisted, here is another approach.

Functions used for accessing message storage are going to be a bit more
independent from MAP architecture and so more reusable in other places.

There may be some initialization needed before storage is usable. This is
introduced in first patch. I was thinking about other ways to do it:

1) Add OBEX_PLUGIN_DEFINE to messages-*.c and so make it a plugin (this
is related to what Luiz suggested before).

This would however prevent MAP plugin from being able to refuse to load
if message storage is not functional. Also it breaks the idea of message
storage API being independent from obexd architecture.

2) Add reference counter of plugin users, so only last messages_exit
would free common resources (like it is the case with root_folder in
messages_dummy.c).

This would get harder is someone would wish to use threads at some point.

3) Get rid of static data and return pointer from messages_init() that
would be passed to all message storage functions calls.

This option still may need some reference counting and data shared
between API clients at some point (I'm thinking about implementation of
undelete behaviour, required by MAP, when actual storage does not have
that possibility).


What do you think?

             reply	other threads:[~2011-03-23 13:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-23 13:56 Slawomir Bochenski [this message]
2011-03-23 13:56 ` [PATCH 1/2] Add messages backend initialization and finalization Slawomir Bochenski
2011-03-23 13:56 ` [PATCH 2/2] Message Access Profile: SetFolder function Slawomir Bochenski

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=1300888580-19317-1-git-send-email-lkslawek@gmail.com \
    --to=lkslawek@gmail.com \
    --cc=linux-bluetooth@vger.kernel.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