repository_infos: Enable automatic updates on the main Haiku repostiory.
[haiku.git] / src / apps / mediaplayer / support / SettingsMessage.h
blobf98121b5bbee87a6f63e203cb1b1c7cdda3b84b8
1 /*
2 * Copyright 2008 Stephan Aßmus <superstippi@gmx.de>.
3 * Copyright 1998 Eric Shepherd.
4 * All rights reserved. Distributed under the terms of the Be Sample Code
5 * license.
6 */
7 #ifndef SETTINGS_MESSAGE_H
8 #define SETTINGS_MESSAGE_H
10 #include <FindDirectory.h>
11 #include <Message.h>
12 #include <Path.h>
14 class BString;
16 class SettingsMessage : public BMessage {
17 public:
18 SettingsMessage(directory_which directory,
19 const char* filename);
20 virtual ~SettingsMessage();
23 status_t InitCheck() const;
24 status_t Load();
25 status_t Save() const;
27 status_t SetValue(const char* name, bool value);
28 status_t SetValue(const char* name, int8 value);
29 status_t SetValue(const char* name, int16 value);
30 status_t SetValue(const char* name, int32 value);
31 status_t SetValue(const char* name, uint32 value);
32 status_t SetValue(const char* name, int64 value);
33 status_t SetValue(const char* name, float value);
34 status_t SetValue(const char* name, double value);
35 status_t SetValue(const char* name,
36 const char* value);
37 status_t SetValue(const char* name,
38 const BString& value);
39 status_t SetValue(const char *name, const BPoint& value);
40 status_t SetValue(const char* name, const BRect& value);
41 status_t SetValue(const char* name, const entry_ref& value);
42 status_t SetValue(const char* name,
43 const BMessage* value);
44 status_t SetValue(const char* name,
45 const BFlattenable* value);
47 bool GetValue(const char* name,
48 bool defaultValue) const;
49 int8 GetValue(const char* name,
50 int8 defaultValue) const;
51 int16 GetValue(const char* name,
52 int16 defaultValue) const;
53 int32 GetValue(const char* name,
54 int32 defaultValue) const;
55 uint32 GetValue(const char* name,
56 uint32 defaultValue) const;
57 int64 GetValue(const char* name,
58 int64 defaultValue) const;
59 float GetValue(const char* name,
60 float defaultValue) const;
61 double GetValue(const char* name,
62 double defaultValue) const;
63 BString GetValue(const char* name,
64 const BString& defaultValue) const;
65 BPoint GetValue(const char *name,
66 BPoint defaultValue) const;
67 BRect GetValue(const char* name,
68 BRect defaultValue) const;
69 entry_ref GetValue(const char* name,
70 const entry_ref& defaultValue) const;
71 BMessage GetValue(const char* name,
72 const BMessage& defaultValue) const;
74 private:
75 BPath fPath;
76 status_t fStatus;
79 #endif // SETTINGS_MESSAGE_H