1 #ifndef __XMPP_QUERIES_H 2 #define __XMPP_QUERIES_H 3 4 #include "queries.h" 5 #include "xmpp-servers.h" 6 7 /* Returns XMPP_QUERY_REC if it's XMPP query, NULL if it isn't. */ 8 #define XMPP_QUERY(query) \ 9 PROTO_CHECK_CAST(QUERY(query), XMPP_QUERY_REC, chat_type, "XMPP") 10 11 #define IS_XMPP_QUERY(query) \ 12 (XMPP_QUERY(query) ? TRUE : FALSE) 13 14 #define xmpp_query_find(server, name) \ 15 XMPP_QUERY(query_find(SERVER(server), name)) 16 17 #define STRUCT_SERVER_REC XMPP_SERVER_REC 18 struct _XMPP_QUERY_REC { 19 #include "query-rec.h" 20 21 time_t composing_time; 22 gboolean composing_visible; 23 }; 24 25 __BEGIN_DECLS 26 QUERY_REC *xmpp_query_create(const char *, const char *, int); 27 __END_DECLS 28 29 #endif 30