ProtocolSettings.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * Copyright 2009-2011, Pier Luigi Fiorini. All rights reserved.
  3. * Copyright 2003-2009, IM Kit Team. All rights reserved.
  4. * Copyright 2021, Jaidyn Levesque. All rights reserved.
  5. * Distributed under the terms of the MIT License.
  6. */
  7. #ifndef _PROTOCOL_SETTINGS_H
  8. #define _PROTOCOL_SETTINGS_H
  9. #include <ObjectList.h>
  10. #include <String.h>
  11. #include "ProtocolTemplate.h"
  12. class BMessage;
  13. class ChatProtocolAddOn;
  14. class ProtocolSettings {
  15. public:
  16. ProtocolSettings(ChatProtocolAddOn* addOn);
  17. status_t InitCheck() const;
  18. ChatProtocolAddOn* AddOn() const;
  19. BObjectList<BString> Accounts() const;
  20. status_t Load(const char* account, BView* parent);
  21. status_t Load(const char* account, BMessage** settings);
  22. status_t Save(const char* account, BView* parent,
  23. BString* errorText = NULL);
  24. status_t Save(const char* account, BMessage settings);
  25. status_t Rename(const char* from, const char* to);
  26. status_t Delete(const char* account);
  27. private:
  28. ChatProtocolAddOn* fAddOn;
  29. ProtocolTemplate fTemplate;
  30. status_t fStatus;
  31. };
  32. #endif // _PROTOCOL_SETTINGS_H