|
Revision 680, 1.7 kB
(checked in by jajcus, 3 years ago)
|
- dates in the copyright header updated
|
| Line | |
|---|
| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 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; |
|---|
| 37 |
char *to; |
|---|
| 38 |
char *id; |
|---|
| 39 |
xmlnode 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; |
|---|
| 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 |
|---|