Re: [Bluez-devel] D-Bus support

Marcel Holtmann
2004-02-08T22:04:53Z

Hi Fredrik,

> > My favourite storage is Berkeley DB.
>
> That's an interesting idea, you mentioned that before. Can you
> elaborate, please?

This is my favourite and we should make it easy to substitute is with
another storage backend. So the handheld or embedded people can use what
they thing fits better.

> Here are some advantages of using textfiles (as default) for hcid
> storage:
>
> 1. Textfiles are intuitive to use and debug because they work
> with any tool (emacs, grep, awk, perl etc.)
>
> 2. Small to medium size storage files have always been text
> files in Unix/Linux (/etc/passwd, /etc/hosts etc.)
>
> 3. Textfile routines are very lightweight and efficient.

If we have a D-Bus interface, these files (databases) should only be
modified by the hcid. It is easier to use the Berkeley DB, because you
don't have to write everything by yourself. The database code includes
locking stuff for free.

My idea is to have a plain text file for default configuration and a
database file with dynamic configuration.

/etc/bluetooth/hcid.conf
/etc/bluetooth/hcid.db

The "hcid.db" will store different databases in the same file, for
example link keys or devices names.

Regards

Marcel

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.