[haiku-development] move the SettingsMessage class to a central position?

  • From: fredrik@xxxxxxxxx
  • To: Haiku Development <haiku-development@xxxxxxxxxxxxx>
  • Date: Tue, 06 Apr 2021 08:22:12 +0200

HI

I was in the works to move Bluetooth save settings to BMessage oriented rather than saving a struct.

I was thinking of using this class to make it cleaner.
https://git.haiku-os.org/haiku/tree/src/apps/mediaplayer/support/SettingsMessage.h

In stead of copying it. Why don't move it some where central?

Then I noticed that the same class exists here
https://git.haiku-os.org/haiku/tree/src/apps/webpositive/support/SettingsMessage.h
This class are the same as in mediaplayer but it has also added a Listener and Autolock.

So how about moving
https://git.haiku-os.org/haiku/tree/src/apps/webpositive/support/SettingsMessage.h
To a central position (where?), make the .h private?

Change the constructor where it has "fListeners(4)" change that to "fListeners(0)"
If you don't add any Listeners, the it will behave like the class in mediaplayer, but also you can add listeners if you like.
What do you think?

Then it can be used it in all 3 apps.

//Fredrik

Other related posts: