## SoupSessionFeature SoupSessionFeature — Interface for miscellaneous session features |

## Types and Values

| SoupSessionFeature
| SoupSessionFeatureInterface

## Object Hierarchy

        GInterface
        ╰── SoupSessionFeature

## Prerequisites

SoupSessionFeature requires GObject.

## Known Implementations

SoupSessionFeature is implemented by SoupAuthManager, SoupCache, SoupContentDecoder, SoupContentSniffer, SoupCookieJar, SoupCookieJarDB, SoupCookieJarText, SoupLogger and SoupProxyResolverDefault.

## Includes

    #include <libsoup/soup.h>

## Description

SoupSessionFeature is the interface used by classes that extend the functionality of a SoupSession. Some features like HTTP authentication handling are implemented internally via SoupSessionFeatures. Other features can be added to the session by the application. (Eg, SoupLogger, SoupCookieJar.)

See `soup_session_add_feature()`, etc, to add a feature to a session.

## Functions

## Types and Values

### SoupSessionFeature

    typedef struct _SoupSessionFeature SoupSessionFeature;

An object that implement some sort of optional feature for SoupSession.

Since 2.24

### SoupSessionFeatureInterface

    typedef struct {
    	GTypeInterface parent;

    	/* methods */
    	void     (*attach)           (SoupSessionFeature *feature,
    				      SoupSession        *session);
    	void     (*detach)           (SoupSessionFeature *feature,
    				      SoupSession        *session);

    	void     (*request_queued)   (SoupSessionFeature *feature,
    				      SoupSession        *session,
    				      SoupMessage        *msg);
    	void     (*request_started)  (SoupSessionFeature *feature,
    				      SoupSession        *session,
    				      SoupMessage        *msg,
    				      SoupSocket         *socket);
    	void     (*request_unqueued) (SoupSessionFeature *feature,
    				      SoupSession        *session,
    				      SoupMessage        *msg);

    	gboolean (*add_feature)      (SoupSessionFeature *feature,
    				      GType               type);
    	gboolean (*remove_feature)   (SoupSessionFeature *feature,
    				      GType               type);
    	gboolean (*has_feature)      (SoupSessionFeature *feature,
    				      GType               type);
    } SoupSessionFeatureInterface;

The interface implemented by SoupSessionFeatures.

#### Members

GTypeInterface `parent`; | The parent interface. |
`attach` () | Perform setup when a feature is added to a session |
`detach` () | Perform cleanup when a feature is removed from a session |
`request_queued` () | Proxies the session's “request_queued” signal |
`request_started` () | Proxies the session's “request_started” signal. Deprecated 2.50. Use “starting” instead. |
`request_unqueued` () | Proxies the session's “request_unqueued” signal |
`add_feature` () | adds a sub-feature to the main feature |
`remove_feature` () | removes a sub-feature from the main feature |
`has_feature` () | tests if the feature includes a sub-feature |

Since 2.24