libpurple/protocols/gg/purplew.h

Sat, 30 Jun 2012 19:56:46 +0200

author
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
date
Sat, 30 Jun 2012 19:56:46 +0200
branch
soc.2012.gg
changeset 33308
140aa3ad4cae
parent 33306
b1bef9a92b4c
child 33317
ceebe795b644
permissions
-rw-r--r--

Gadu-Gadu: cancellable gg_http watcher

#ifndef _GGP_PURPLEW_H
#define _GGP_PURPLEW_H

#include <internal.h>
#include <libgadu.h>

/**
 * Adds an input handler in purple event loop for http request.
 *
 * @see purple_input_add
 *
 * @param http_req  Http connection to watch.
 * @param func      The callback function for data.
 * @param user_data User-specified data.
 *
 * @return The resulting handle (will be greater than 0).
 */
guint ggp_purplew_http_input_add(struct gg_http *http_req,
	PurpleInputFunction func, gpointer user_data);

typedef void (*ggp_purplew_request_processing_cancel_cb)(PurpleConnection *gc,
	void *user_data);

typedef struct
{
	PurpleConnection *gc;
	ggp_purplew_request_processing_cancel_cb cancel_cb;
	void *request_handle;
	void *user_data;
} ggp_purplew_request_processing_handle;

ggp_purplew_request_processing_handle * ggp_purplew_request_processing(
	PurpleConnection *gc, const gchar *msg, void *user_data,
	ggp_purplew_request_processing_cancel_cb oncancel);

void ggp_purplew_request_processing_done(
	ggp_purplew_request_processing_handle *handle);

#endif /* _GGP_PURPLEW_H */

mercurial