[haiku-development] Re: session manager

  • From: Clemens <clemens.zeidler@xxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sun, 26 Jun 2011 17:02:22 +1200

On Sat, 25 Jun 2011 20:34:11 +1200, Fredrik Holmqvist <fredrik.holmqvist@xxxxxxxxx> wrote:


2011/6/25 Clemens <clemens.zeidler@xxxxxxxxxxxxxx>:
here is short proposal for a session manager api. Had a session manager
already working some time ago but there have been some feature requests:

1) be able to report progress
2) additional storage for large data (for example to save unsaved images in
an image editor)

Would this API also cater to save state on shutdown, and have it
restored on reboot?
If yes, I'd really like to see that kind of functionality. Maybe a new
type of BApplication could provide this along with your suggestion.

Yes that's the primary goal. What do you mean by new type of BApplication? The store and restore function are integrated into the BApplication class. At the moment the session manager lives in the registar, when shutting down the session manager send a message to each BApplication and the BApplication calls the save hook. Same for restore.

A web-browser saving current URLs that are open and its position,
Styledit the files and position and location (and maybe even
modifications) and so on.


Yes exactly, the same function could be used for this purposes. This means I should make the storage class methods virtual. In this ways different implementations of BSessionAppStorage can store the session data at different positions.

Regards,
        Clemens

Other related posts: