diff options
author | Dan Winship <danw@src.gnome.org> | 2003-12-17 19:49:14 +0000 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2003-12-17 19:49:14 +0000 |
commit | c2720d6770639fed2bf57a972fa7c9b47919d0ac (patch) | |
tree | d00e278329a0e3f3053f556099a3eb518a6a8c02 /libsoup/soup-session-sync.h | |
parent | de3cf1fc96532d10cdd1d6e55aea3c4f81501579 (diff) | |
download | libsoup-c2720d6770639fed2bf57a972fa7c9b47919d0ac.tar.gz |
Add gthread to glib check
* configure.in: Add gthread to glib check
* libsoup/soup-session.c: Make this an abstract class.
* libsoup/soup-session-async.c: A SoupSession class for
asynchronous gmain-based operation; replaces the old SoupSession.
* libsoup/soup-session-sync.c: A SoupSession class for synchronous
blocking operation for use with threaded apps.
* libsoup/soup-types.h, libsoup/soup.h: add the new session
subclasses
* libsoup/soup-connection.c (soup_connection_connect_sync): Don't
try to unref the socket if the socket creation fails.
(soup_connection_reserve): New, to explicitly mark a connection as
being in use without queueing a message on it.
* libsoup/soup-dns.c (check_hostent): Oof. Fix the logic of the
"block" flag to not be reversed.
* libsoup/soup-message.c (finished): set status to FINISHED here.
(soup_message_cancel): Gone; needs to be done at the session
level.
* libsoup/soup-message-queue.c: Add a mutex and make all of the
operations thread-safe.
* libsoup/soup-socket.c (disconnect_internal): Make this
thread-safe.
(soup_socket_connect): Make the sync case work correctly.
* libsoup/Makefile.am: add the SoupSession subclasses
* tests/Makefile.am: libsoup depends on libgthread now, so
revserver doesn't need to explicitly.
* tests/get.c, tests/auth-test.c, tests/simple-proxy.c: Use
soup_session_async_new().
Diffstat (limited to 'libsoup/soup-session-sync.h')
-rw-r--r-- | libsoup/soup-session-sync.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/libsoup/soup-session-sync.h b/libsoup/soup-session-sync.h new file mode 100644 index 00000000..87652791 --- /dev/null +++ b/libsoup/soup-session-sync.h @@ -0,0 +1,39 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * Copyright (C) 2000-2003, Ximian, Inc. + */ + +#ifndef SOUP_SESSION_SYNC_H +#define SOUP_SESSION_SYNC_H 1 + +#include <libsoup/soup-types.h> +#include <libsoup/soup-session.h> + +#define SOUP_TYPE_SESSION_SYNC (soup_session_sync_get_type ()) +#define SOUP_SESSION_SYNC(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SOUP_TYPE_SESSION_SYNC, SoupSessionSync)) +#define SOUP_SESSION_SYNC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SOUP_TYPE_SESSION_SYNC, SoupSessionSyncClass)) +#define SOUP_IS_SESSION_SYNC(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SOUP_TYPE_SESSION_SYNC)) +#define SOUP_IS_SESSION_SYNC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), SOUP_TYPE_SESSION_SYNC)) +#define SOUP_SESSION_SYNC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SOUP_TYPE_SESSION_SYNC, SoupSessionSyncClass)) + +typedef struct SoupSessionSyncPrivate SoupSessionSyncPrivate; + +struct SoupSessionSync { + SoupSession parent; + + SoupSessionSyncPrivate *priv; +}; + +typedef struct { + SoupSessionClass parent_class; + +} SoupSessionSyncClass; + +GType soup_session_sync_get_type (void); + +SoupSession *soup_session_sync_new (void); +SoupSession *soup_session_sync_new_with_options (const char *optname1, + ...); + + +#endif /* SOUP_SESSION_SYNC_H */ |