1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00
irssi/src/core/chat-protocols.h
Timo Sirainen c1a191955b Chat protocol updates.
Module loading tries to load first from home dir, then the global dir.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@704 dbcabf3a-b0e7-0310-adc4-f8d773084564
2000-10-01 20:48:10 +00:00

34 lines
816 B
C

#ifndef __CHAT_PROTOCOLS_H
#define __CHAT_PROTOCOLS_H
typedef struct {
int id;
char *name;
char *fullname;
char *chatnet;
} CHAT_PROTOCOL_REC;
extern GSList *chat_protocols;
#define PROTO_CHECK_CAST(object, cast, type_field, id) \
((cast *) chat_protocol_check_cast(object, \
offsetof(cast, type_field), id))
void *chat_protocol_check_cast(void *object, int type_pos, const char *id);
/* Register new chat protocol. */
void chat_protocol_register(CHAT_PROTOCOL_REC *rec);
/* Unregister chat protocol. */
void chat_protocol_unregister(const char *name);
/* Find functions */
int chat_protocol_lookup(const char *name);
CHAT_PROTOCOL_REC *chat_protocol_find(const char *name);
CHAT_PROTOCOL_REC *chat_protocol_find_id(int id);
void chat_protocols_init(void);
void chat_protocols_deinit(void);
#endif