1 /* 2 * Copyright 2008, Haiku. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Fredrik Modéen <fredrik@modeen.se> 7 */ 8 9 #ifndef __SETTINGS_H__ 10 #define __SETTINGS_H__ 11 12 #include <Message.h> 13 #include <Path.h> 14 15 #include "TPreferences.h" 16 17 struct mpSettings { 18 int8 19 autostart, closeWhenDonePlayingMovie, closeWhenDonePlayingSound, 20 loopMovie, loopSound, fullVolume, halfVolume, mute; 21 }; 22 23 #define SETTINGSFILENAME "MediaPlayerSettings" 24 25 class Settings { 26 public: 27 Settings(const char *filename = SETTINGSFILENAME); 28 29 void LoadSettings(mpSettings &settings); 30 void SaveSettings(const mpSettings &settings); 31 32 private: 33 void _SetDefault(mpSettings &settings); 34 35 TPreferences fTPreferences; 36 }; 37 38 #endif // __SETTINGS_H__ 39