| 53 #include "servconn.h" |
53 #include "servconn.h" |
| 54 #include "pubdir-prpl.h" |
54 #include "pubdir-prpl.h" |
| 55 |
55 |
| 56 /* ---------------------------------------------------------------------- */ |
56 /* ---------------------------------------------------------------------- */ |
| 57 |
57 |
| |
58 #include <http.h> |
| |
59 |
| |
60 static void ggp_test_http_cb(PurpleHttpConnection *http_conn, |
| |
61 PurpleHttpResponse *response, gpointer user_data) |
| |
62 { |
| |
63 purple_debug_info("http-test", "Testing http done %s.\n", |
| |
64 purple_http_response_is_successfull(response) ? |
| |
65 "successfully" : "without success"); |
| |
66 purple_debug_info("http-test", "Returned http code: %d.\n", |
| |
67 purple_http_response_get_code(response)); |
| |
68 purple_debug_info("http-test", "Returned content: [%s].\n", |
| |
69 purple_http_response_get_data(response)); |
| |
70 } |
| |
71 |
| 58 static void ggp_action_test_http(PurplePluginAction *action) |
72 static void ggp_action_test_http(PurplePluginAction *action) |
| 59 { |
73 { |
| |
74 PurpleConnection *gc = (PurpleConnection *)action->context; |
| |
75 |
| 60 purple_debug_info("http-test", "Testing http...\n"); |
76 purple_debug_info("http-test", "Testing http...\n"); |
| 61 purple_debug_info("http-test", "Testing http done.\n"); |
77 purple_http_get(gc, "http://www.wasilczyk.pl/x_ip_simple.htm", |
| |
78 ggp_test_http_cb, NULL); |
| |
79 purple_debug_info("http-test", "Testing http started.\n"); |
| 62 } |
80 } |
| 63 |
81 |
| 64 /* ---------------------------------------------------------------------- */ |
82 /* ---------------------------------------------------------------------- */ |
| 65 |
83 |
| 66 ggp_buddy_data * ggp_buddy_get_data(PurpleBuddy *buddy) |
84 ggp_buddy_data * ggp_buddy_get_data(PurpleBuddy *buddy) |