2000-08-26 11:39:44 -04:00
|
|
|
#ifndef __QUERIES_H
|
|
|
|
#define __QUERIES_H
|
|
|
|
|
2001-01-01 02:45:54 -05:00
|
|
|
#include "modules.h"
|
2000-08-26 11:39:44 -04:00
|
|
|
|
|
|
|
/* Returns QUERY_REC if it's query, NULL if it isn't. */
|
|
|
|
#define QUERY(query) \
|
2000-09-02 14:53:58 -04:00
|
|
|
MODULE_CHECK_CAST_MODULE(query, QUERY_REC, type, \
|
|
|
|
"WINDOW ITEM TYPE", "QUERY")
|
2000-08-30 18:29:55 -04:00
|
|
|
|
|
|
|
#define IS_QUERY(query) \
|
|
|
|
(QUERY(query) ? TRUE : FALSE)
|
2000-08-26 11:39:44 -04:00
|
|
|
|
|
|
|
#define STRUCT_SERVER_REC SERVER_REC
|
2001-01-01 02:45:54 -05:00
|
|
|
struct _QUERY_REC {
|
2000-08-26 11:39:44 -04:00
|
|
|
#include "query-rec.h"
|
2001-01-01 02:45:54 -05:00
|
|
|
};
|
2000-08-26 11:39:44 -04:00
|
|
|
|
|
|
|
extern GSList *queries;
|
|
|
|
|
|
|
|
void query_init(QUERY_REC *query, int automatic);
|
|
|
|
void query_destroy(QUERY_REC *query);
|
|
|
|
|
|
|
|
/* Find query by name, if `server' is NULL, search from all servers */
|
|
|
|
QUERY_REC *query_find(SERVER_REC *server, const char *nick);
|
|
|
|
|
2000-12-16 21:20:22 -05:00
|
|
|
void query_change_nick(QUERY_REC *query, const char *nick);
|
|
|
|
void query_change_address(QUERY_REC *query, const char *address);
|
2000-08-26 11:39:44 -04:00
|
|
|
void query_change_server(QUERY_REC *query, SERVER_REC *server);
|
|
|
|
|
|
|
|
void queries_init(void);
|
|
|
|
void queries_deinit(void);
|
|
|
|
|
|
|
|
#endif
|