ChatProtocolAddOn.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * Copyright 2010-2011, Pier Luigi Fiorini. All rights reserved.
  3. * Distributed under the terms of the MIT License.
  4. */
  5. #ifndef _APP_PROTOCOL_ADDON_H
  6. #define _APP_PROTOCOL_ADDON_H
  7. #include <image.h>
  8. #include <String.h>
  9. class BBitmap;
  10. class ChatProtocol;
  11. class ChatProtocolAddOn {
  12. public:
  13. ChatProtocolAddOn(image_id image, const char* path,
  14. int32 subProto=0);
  15. status_t InitCheck() const;
  16. const char* Path() const;
  17. ChatProtocol* Protocol() const;
  18. ChatProtocol* ProtocolAt(int32 i) const;
  19. int32 CountProtocols() const;
  20. const char* Signature() const;
  21. const char* FriendlySignature() const;
  22. BBitmap* Icon() const;
  23. const char* ProtoSignature() const;
  24. const char* ProtoFriendlySignature() const;
  25. BBitmap* ProtoIcon() const;
  26. uint32 Version() const;
  27. private:
  28. image_id fImage;
  29. BString fPath;
  30. ChatProtocol* (*fGetProtocol)(int32 i);
  31. int32 (*fCountProtocols)();
  32. int32 fProtoIndex;
  33. uint32 fVersion;
  34. BString fSignature;
  35. BString fFriendlySignature;
  36. BBitmap* fIcon;
  37. status_t fStatus;
  38. void _Init();
  39. };
  40. #endif // _APP_PROTOCOL_ADDON_H