[haiku-development] Re: ShowImageSettings

  • From: Fredrik Modèen <fredrik@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Mon, 27 Aug 2012 22:44:50 +0200 (CEST)

> On Sat, 25 Aug 2012 00:47:51 +1200, Fredrik Modèen <fredrik@xxxxxxxxx>
> wrote:
>
>> Hi
>>
>> I'm considering to use ShowImageSettings in Bluetooth.
>> http://cgit.haiku-os.org/haiku/tree/src/apps/showimage/ShowImageSettings.h
>> (if there are no class in BAPI for the same purpose)
>>
>> That would involve copy it over there. Would it be better to make it
>> part
>> of a kit, say support kit?
>>
>> I don't think I know how to make the class good enough to make it public
>> (except perhaps renaming it to BSettings)
>
> Compared to a BMessage this class is very limited, i.e. not all data types
> and no indices are supported. As Axel said, maybe it's better to add some
> more convenience method to BMessage directly.
Will that not breake things?


> I would also vote to just provide some helper methods to store a BMessage
> as an attribute or flatten it to a file, e.g.:
>
> static BSomeFittingNamespace::SaveToAttribute(const BMessage* msg, const
> char* attribute, BNode* storage);
> static BSomeFittingNamespace::SaveToApplicationFile(const BMessage* msg,
> const char* attribute);
> static BSomeFittingNamespace::SaveToFile(const BMessage* msg, BDataIO*
> storage);
>
> When it comes to locking maybe a BLockableMessage decorator for a BMessage
> would be more versatile?
LOL and I only wanted to use a easie storing class for Bluetooth.. :)

-- 
MVH
Fredrik Modèen


Other related posts: