1/* 2 * Copyright 2005, Waldemar Kornewald <wkornew@gmx.net> 3 * Distributed under the terms of the MIT License. 4 */ 5 6#ifndef _PTP_SETTINGS__H 7#define _PTP_SETTINGS__H 8 9#include <Message.h> 10#include <String.h> 11 12 13class GeneralAddon; 14 15 16class PTPSettings { 17 public: 18 PTPSettings(); 19 ~PTPSettings(); 20 21 BMessage& Addons() 22 { return fAddons; } 23 const BString& CurrentInterface() const 24 { return fCurrent; } 25 const char *SessionPassword() const; 26 27 bool LoadSettings(const char *interfaceName, bool isNew); 28 void IsModified(bool *settings); 29 bool SaveSettings(BMessage *settings); 30 bool SaveSettingsToFile(); 31 32 void LoadAddons(); 33 // must be called manually 34 35 private: 36 BMessage fAddons, fSettings; 37 BString fCurrent; 38 GeneralAddon *fGeneralAddon; 39}; 40 41 42#endif 43