diff options
Diffstat (limited to 'src/core/chat-protocols.h')
-rw-r--r-- | src/core/chat-protocols.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/core/chat-protocols.h b/src/core/chat-protocols.h index 1f38da50..3f614a50 100644 --- a/src/core/chat-protocols.h +++ b/src/core/chat-protocols.h @@ -2,11 +2,15 @@ #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)) @@ -18,10 +22,10 @@ void chat_protocol_register(CHAT_PROTOCOL_REC *rec); /* Unregister chat protocol. */ void chat_protocol_unregister(const char *name); -/* Return the ID for the specified chat protocol. */ +/* Find functions */ int chat_protocol_lookup(const char *name); -/* Return the record for the specified chat protocol ID. */ -CHAT_PROTOCOL_REC *chat_protocol_get_rec(int id); +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); |