Chat-O-Matic/application/preferences/AppPreferences.h

55 lines
1.5 KiB
C
Raw Normal View History

/*
* Copyright 2010, Oliver Ruiz Dorantes. All rights reserved.
* Copyright 2012, Casalinuovo Dario. All rights reserved.
* Distributed under the terms of the MIT License.
*/
2021-06-20 12:44:20 -05:00
#ifndef _APP_PREFERENCES_H
#define _APP_PREFERENCES_H
#include "PreferencesContainer.h"
2021-06-20 12:44:20 -05:00
class AppPreferencesData : public BFlattenable {
public:
2021-06-20 12:44:20 -05:00
AppPreferencesData();
virtual ~AppPreferencesData();
virtual bool IsFixedSize() const;
virtual type_code TypeCode() const;
virtual bool AllowsTypeCode(type_code code) const;
virtual ssize_t FlattenedSize() const;
status_t Flatten(BPositionIO* flatData) const;
virtual status_t Flatten(void* buffer, ssize_t size) const;
virtual status_t Unflatten(type_code code, const void* buffer,
ssize_t size);
status_t Unflatten(type_code code, BPositionIO* flatData);
bool MoveToCurrentWorkspace;
bool RaiseOnMessageReceived;
bool RaiseUserIsTyping;
bool MarkUnreadWindow;
bool NotifyProtocolStatus;
bool NotifyContactStatus;
bool NotifyNewMessage;
2021-06-20 12:44:20 -05:00
bool HideDeskbar;
bool DisableReplicant;
bool DisableQuitConfirm;
bool IgnoreEmoticons;
bool HideOffline;
private:
void _AddBool(BPositionIO* data, bool value) const;
void _AddString(BPositionIO* data,
const char* value) const;
bool _ReadBool(BPositionIO* data);
const char* _ReadString(BPositionIO* data);
};
2021-06-20 12:44:20 -05:00
typedef PreferencesContainer<AppPreferencesData> AppPreferences;
2021-06-20 12:44:20 -05:00
#endif // _APP_PREFERENCES_H