Chat-O-Matic/application/ChatProtocolAddOn.h

57 lines
1.1 KiB
C
Raw Permalink Normal View History

/*
2011-12-03 16:38:03 -06:00
* Copyright 2010-2011, Pier Luigi Fiorini. All rights reserved.
* Distributed under the terms of the MIT License.
*/
2021-06-20 12:44:20 -05:00
#ifndef _APP_PROTOCOL_ADDON_H
#define _APP_PROTOCOL_ADDON_H
#include <image.h>
#include <String.h>
class BBitmap;
2021-06-20 12:44:20 -05:00
class ChatProtocol;
2021-06-20 12:44:20 -05:00
class ChatProtocolAddOn {
public:
2021-06-20 12:44:20 -05:00
ChatProtocolAddOn(image_id image, const char* path,
int32 subProto=0);
~ChatProtocolAddOn();
status_t InitCheck() const;
const char* Path() const;
2021-06-20 12:44:20 -05:00
ChatProtocol* Protocol() const;
ChatProtocol* ProtocolAt(int32 i) const;
int32 CountProtocols() const;
2010-05-28 12:11:16 -05:00
const char* Signature() const;
const char* FriendlySignature() const;
BBitmap* Icon() const;
const char* ProtoSignature() const;
const char* ProtoFriendlySignature() const;
BBitmap* ProtoIcon() const;
uint32 Version() const;
private:
image_id fImage;
BString fPath;
2021-06-20 12:44:20 -05:00
ChatProtocol* (*fGetProtocol)(int32 i);
int32 (*fCountProtocols)();
int32 fProtoIndex;
uint32 fVersion;
BString fSignature;
BString fFriendlySignature;
BBitmap* fIcon;
status_t fStatus;
void _Init();
};
2021-06-20 12:44:20 -05:00
#endif // _APP_PROTOCOL_ADDON_H