Chat-O-Matic/application/ProtocolSettings.h

43 lines
1.0 KiB
C
Raw Normal View History

/*
2011-12-03 16:38:03 -06:00
* Copyright 2009-2011, Pier Luigi Fiorini. All rights reserved.
* Copyright 2003-2009, IM Kit Team. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _PROTOCOL_SETTINGS_H
#define _PROTOCOL_SETTINGS_H
2010-05-08 14:35:28 -05:00
#include <libsupport/List.h>
class BMessage;
class CayaProtocolAddOn;
class ProtocolSettings {
public:
ProtocolSettings(CayaProtocolAddOn* addOn);
2010-05-08 14:35:28 -05:00
~ProtocolSettings();
2010-05-08 14:35:28 -05:00
status_t InitCheck() const;
CayaProtocolAddOn* AddOn() const;
2010-05-08 14:35:28 -05:00
List<BString> Accounts() const;
2010-05-08 14:35:28 -05:00
status_t LoadTemplate(BView* parent);
status_t Load(const char* account, BView* parent);
status_t Save(const char* account, BView* parent);
status_t Rename(const char* from, const char* to);
2010-05-08 14:35:28 -05:00
status_t Delete(const char* account);
private:
2010-05-08 14:35:28 -05:00
status_t fStatus;
CayaProtocolAddOn* fAddOn;
2010-05-08 14:35:28 -05:00
BString fAccount;
BMessage* fTemplate;
void _Init();
status_t _Load(const char* account, BMessage** settings);
status_t _Save(const char* account, BMessage* settings);
};
#endif // _PROTOCOL_SETTINGS_H