Pogger/src/Preferences.h

63 lines
998 B
C
Raw Normal View History

2020-12-30 22:07:54 -06:00
/*
* Copyright 2020, Jaidyn Levesque <jadedctrl@teknik.io>
* All rights reserved. Distributed under the terms of the MIT license.
*/
2021-01-24 23:20:11 -06:00
#ifndef PREFS_H
#define PREFS_H
2020-07-03 19:13:41 -05:00
2020-07-07 17:42:12 -05:00
#include <DateTime.h>
#include <String.h>
2020-07-03 19:13:41 -05:00
#include <StorageKit.h>
2020-12-30 22:07:54 -06:00
2021-01-28 00:19:36 -06:00
static const int64 HOUR_IN_MICROSECONDS = 3600000000;
enum
{
kOpenAsHtml = 1,
kOpenAsUrl = 2
};
2021-01-25 19:39:31 -06:00
2021-01-24 23:20:11 -06:00
class Preferences {
2020-07-03 19:13:41 -05:00
public:
2021-01-24 23:20:11 -06:00
Preferences();
Preferences(Preferences*);
2020-12-30 22:07:54 -06:00
void Load();
void Save();
2021-01-25 19:39:31 -06:00
int64 UpdateInterval();
int UpdateIntervalIndex();
void SetUpdateIntervalIndex(int8 index);
2021-01-28 00:19:36 -06:00
BString EntryDir();
status_t SetEntryDir(const char* path);
BString EntryOpenWith();
status_t SetEntryOpenWith(const char* binPath);
2021-01-25 19:39:31 -06:00
bool EntryOpenAsHtml();
bool SetEntryOpenAsHtml(bool asHtml);
2021-01-28 00:19:36 -06:00
bool fNewNotify;
bool fFailureNotify;
int8 fOpenAs;
2020-07-07 17:42:12 -05:00
2021-03-02 19:41:26 -06:00
BRect fMainWindowRect;
BRect fFeedEditRect;
int32 fTabSelection;
2021-01-25 19:39:31 -06:00
private:
2021-03-03 20:45:46 -06:00
void _FileError(status_t result);
2021-01-25 19:39:31 -06:00
int8 fUpdateInterval;
2020-07-07 20:17:52 -05:00
2021-01-28 00:19:36 -06:00
BString fEntryDir;
BString fOpenWith;
2020-07-03 19:13:41 -05:00
};
2020-12-30 22:07:54 -06:00
2021-01-24 23:20:11 -06:00
#endif // PREFS_H
2020-12-30 22:07:54 -06:00