ProtocolTemplate.h 876 B

1234567891011121314151617181920212223242526272829303132333435363738
  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_TEMPLATE_H
  8. #define _PROTOCOL_TEMPLATE_H
  9. #include <SupportDefs.h>
  10. class BMessage;
  11. class BString;
  12. class BView;
  13. class ChatProtocol;
  14. class ProtocolTemplate {
  15. public:
  16. ProtocolTemplate(ChatProtocol* protocol,
  17. const char* type);
  18. ProtocolTemplate(BMessage pTemplate);
  19. ~ProtocolTemplate();
  20. status_t InitCheck() const;
  21. ChatProtocol* Protocol() const;
  22. status_t Load(BView* parent, BMessage* settings = NULL);
  23. status_t Save(BView* parent, BMessage* settings,
  24. BString* errorText = NULL);
  25. private:
  26. ChatProtocol* fProtocol;
  27. BMessage* fTemplate;
  28. };
  29. #endif // _PROTOCOL_TEMPLATE_H