root/trunk/src/requests.h

Revision 680, 1.7 kB (checked in by jajcus, 3 years ago)

- dates in the copyright header updated

Line 
1 /* $Id: requests.h,v 1.20 2004/03/16 19:30:25 mmazur Exp $ */
2
3 /*
4  *  (C) Copyright 2002-2006 Jacek Konieczny [jajcus(a)jajcus,net]
5  *
6  *  This program is free software; you can redistribute it and/or modify
7  *  it under the terms of the GNU General Public License Version 2 as
8  *  published by the Free Software Foundation.
9  *
10  *  This program is distributed in the hope that it will be useful,
11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  *  GNU General Public License for more details.
14  *
15  *  You should have received a copy of the GNU General Public License
16  *  along with this program; if not, write to the Free Software
17  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18  */
19
20 #ifndef requests_h
21 #define requests_h
22
23 #include "users.h"
24 #include "sessions.h"
25
26 struct request_s;
27
28 typedef enum request_type_e{
29         RT_NONE=0,
30         RT_SEARCH,
31         RT_VCARD,
32         RT_CHANGE
33 }RequestType;
34
35 typedef struct request_s{
36         char *from; /* jid of requesting user */
37         char *to; /* target of user request */
38         char *id;  /* ID if user request (<iq/>) */
39         xmlnode query; /* The query */
40         RequestType type;
41
42         struct gg_http* gghttp;
43         gg_pubdir50_t ggchange;
44         void *data;
45
46         GIOChannel *ioch;
47         guint io_watch;
48
49         int hash; /* When standard request interface isn't used */
50
51         struct stream_s *stream;
52 }Request;
53
54 Request * add_request(RequestType type,const char *from,const char *to,
55                         const char *id,xmlnode query, void *data,
56                         struct stream_s *stream);
57 int remove_request(Request *r);
58
59 void request_response_search(struct gg_event *data);
60 void request_response_write(struct gg_event *data);
61 int requests_init();
62 void requests_done();
63
64 #endif
Note: See TracBrowser for help on using the browser.