1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 * Copyright (C) 2008 Red Hat, Inc.
6 #ifndef __SOUP_SESSION_FEATURE_H__
7 #define __SOUP_SESSION_FEATURE_H__ 1
9 #include <libsoup/soup-types.h>
13 #define SOUP_TYPE_SESSION_FEATURE (soup_session_feature_get_type ())
14 #define SOUP_SESSION_FEATURE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SOUP_TYPE_SESSION_FEATURE, SoupSessionFeature))
15 #define SOUP_SESSION_FEATURE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SOUP_TYPE_SESSION_FEATURE, SoupSessionFeatureInterface))
16 #define SOUP_IS_SESSION_FEATURE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SOUP_TYPE_SESSION_FEATURE))
17 #define SOUP_IS_SESSION_FEATURE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SOUP_TYPE_SESSION_FEATURE))
18 #define SOUP_SESSION_FEATURE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SOUP_TYPE_SESSION_FEATURE, SoupSessionFeatureInterface))
21 GTypeInterface parent;
24 void (*attach) (SoupSessionFeature *feature,
25 SoupSession *session);
26 void (*detach) (SoupSessionFeature *feature,
27 SoupSession *session);
29 void (*request_queued) (SoupSessionFeature *feature,
32 void (*request_started) (SoupSessionFeature *feature,
36 void (*request_unqueued) (SoupSessionFeature *feature,
40 gboolean (*add_feature) (SoupSessionFeature *feature,
42 gboolean (*remove_feature) (SoupSessionFeature *feature,
44 gboolean (*has_feature) (SoupSessionFeature *feature,
47 } SoupSessionFeatureInterface;
49 SOUP_AVAILABLE_IN_2_24
50 GType soup_session_feature_get_type (void);
52 SOUP_AVAILABLE_IN_2_24
53 void soup_session_feature_attach (SoupSessionFeature *feature,
54 SoupSession *session);
55 SOUP_AVAILABLE_IN_2_24
56 void soup_session_feature_detach (SoupSessionFeature *feature,
57 SoupSession *session);
59 SOUP_AVAILABLE_IN_2_34
60 gboolean soup_session_feature_add_feature (SoupSessionFeature *feature,
62 SOUP_AVAILABLE_IN_2_34
63 gboolean soup_session_feature_remove_feature (SoupSessionFeature *feature,
65 SOUP_AVAILABLE_IN_2_34
66 gboolean soup_session_feature_has_feature (SoupSessionFeature *feature,
71 #endif /* __SOUP_SESSION_FEATURE_H__ */