2005-07-10 18:58:03 +04:00
|
|
|
/*
|
|
|
|
* Copyright 2005, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
|
|
|
#ifndef SETTINGS_H
|
|
|
|
#define SETTINGS_H
|
|
|
|
|
|
|
|
|
|
|
|
#include <Point.h>
|
|
|
|
#include <Volume.h>
|
|
|
|
|
|
|
|
|
|
|
|
class Settings {
|
|
|
|
public :
|
|
|
|
Settings();
|
|
|
|
virtual ~Settings();
|
|
|
|
|
|
|
|
BPoint WindowPosition() const { return fWindowPosition; }
|
|
|
|
void SetWindowPosition(BPoint position);
|
|
|
|
|
|
|
|
bool SwapEnabled() const { return fSwapEnabled; }
|
|
|
|
off_t SwapSize() const { return fSwapSize; }
|
|
|
|
BVolume& SwapVolume() { return fSwapVolume; }
|
|
|
|
void SetSwapEnabled(bool enabled);
|
|
|
|
void SetSwapSize(off_t size);
|
|
|
|
void SetSwapVolume(BVolume& volume);
|
|
|
|
|
|
|
|
void RevertSwapChanges();
|
2011-01-04 05:13:13 +03:00
|
|
|
bool IsRevertible();
|
2005-07-10 18:58:03 +04:00
|
|
|
|
|
|
|
private:
|
2011-01-04 18:46:45 +03:00
|
|
|
void _ReadWindowSettings();
|
|
|
|
void _WriteWindowSettings();
|
2005-07-10 18:58:03 +04:00
|
|
|
|
2011-01-04 18:46:45 +03:00
|
|
|
void _ReadSwapSettings();
|
|
|
|
void _WriteSwapSettings();
|
|
|
|
|
|
|
|
void _SetSwapNull();
|
2005-07-10 18:58:03 +04:00
|
|
|
|
|
|
|
BPoint fWindowPosition;
|
|
|
|
|
|
|
|
bool fSwapEnabled;
|
|
|
|
off_t fSwapSize;
|
|
|
|
BVolume fSwapVolume;
|
|
|
|
|
|
|
|
bool fInitialSwapEnabled;
|
|
|
|
off_t fInitialSwapSize;
|
|
|
|
dev_t fInitialSwapVolume;
|
|
|
|
|
2011-01-04 05:13:13 +03:00
|
|
|
bool fPositionUpdated;
|
|
|
|
const char* fBadVolName;
|
2005-07-10 18:58:03 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* SETTINGS_H */
|