2010-05-07 04:47:10 -05:00
|
|
|
/*
|
2011-12-03 16:38:03 -06:00
|
|
|
* Copyright 2009-2011, Pier Luigi Fiorini. All rights reserved.
|
2010-05-07 04:47:10 -05:00
|
|
|
* Copyright 2003-2009, IM Kit Team. All rights reserved.
|
2021-06-17 16:51:37 -05:00
|
|
|
* Copyright 2021, Jaidyn Levesque. All rights reserved.
|
2010-05-07 04:47:10 -05:00
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
|
|
|
#ifndef _PROTOCOL_SETTINGS_H
|
|
|
|
#define _PROTOCOL_SETTINGS_H
|
|
|
|
|
2012-02-25 14:33:28 -06:00
|
|
|
#include <ObjectList.h>
|
2021-06-17 16:51:37 -05:00
|
|
|
#include <String.h>
|
|
|
|
|
|
|
|
#include "ProtocolTemplate.h"
|
2010-05-08 14:35:28 -05:00
|
|
|
|
2010-05-07 04:47:10 -05:00
|
|
|
class BMessage;
|
2010-05-16 16:02:50 -05:00
|
|
|
class CayaProtocolAddOn;
|
2010-05-07 04:47:10 -05:00
|
|
|
|
|
|
|
class ProtocolSettings {
|
|
|
|
public:
|
2010-05-16 16:02:50 -05:00
|
|
|
ProtocolSettings(CayaProtocolAddOn* addOn);
|
2010-05-07 04:47:10 -05:00
|
|
|
|
2010-05-08 14:35:28 -05:00
|
|
|
status_t InitCheck() const;
|
2010-05-07 04:47:10 -05:00
|
|
|
|
2010-05-16 16:02:50 -05:00
|
|
|
CayaProtocolAddOn* AddOn() const;
|
2012-02-25 14:33:28 -06:00
|
|
|
BObjectList<BString> Accounts() const;
|
2010-05-07 04:47:10 -05:00
|
|
|
|
2010-05-08 14:35:28 -05:00
|
|
|
status_t Load(const char* account, BView* parent);
|
|
|
|
status_t Save(const char* account, BView* parent);
|
2010-05-16 16:02:50 -05:00
|
|
|
|
|
|
|
status_t Rename(const char* from, const char* to);
|
2010-05-08 14:35:28 -05:00
|
|
|
status_t Delete(const char* account);
|
2010-05-07 04:47:10 -05:00
|
|
|
|
|
|
|
private:
|
2010-05-08 14:35:28 -05:00
|
|
|
status_t _Load(const char* account, BMessage** settings);
|
2021-06-17 16:51:37 -05:00
|
|
|
|
2021-06-18 01:13:02 -05:00
|
|
|
CayaProtocolAddOn* fAddOn;
|
2021-06-17 16:51:37 -05:00
|
|
|
ProtocolTemplate fTemplate;
|
|
|
|
status_t fStatus;
|
2010-05-07 04:47:10 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _PROTOCOL_SETTINGS_H
|