1 module soup.SessionFeatureIF;
2 
3 private import soup.Session;
4 private import soup.c.functions;
5 public  import soup.c.types;
6 
7 
8 /**
9  * #SoupSessionFeature is the interface used by classes that extend
10  * the functionality of a #SoupSession. Some features like HTTP
11  * authentication handling are implemented internally via
12  * #SoupSessionFeature<!-- -->s. Other features can be added to the session
13  * by the application. (Eg, #SoupLogger, #SoupCookieJar.)
14  * 
15  * See soup_session_add_feature(), etc, to add a feature to a session.
16  *
17  * Since: 2.24
18  */
19 public interface SessionFeatureIF{
20 	/** Get the main Gtk struct */
21 	public SoupSessionFeature* getSessionFeatureStruct(bool transferOwnership = false);
22 
23 	/** the main Gtk struct as a void* */
24 	protected void* getStruct();
25 
26 
27 	/** */
28 	public static GType getType()
29 	{
30 		return soup_session_feature_get_type();
31 	}
32 
33 	/**
34 	 * Adds a "sub-feature" of type @type to the base feature @feature.
35 	 * This is used for features that can be extended with multiple
36 	 * different types. Eg, the authentication manager can be extended
37 	 * with subtypes of #SoupAuth.
38 	 *
39 	 * Params:
40 	 *     type = the #GType of a "sub-feature"
41 	 *
42 	 * Returns: %TRUE if @feature accepted @type as a subfeature.
43 	 *
44 	 * Since: 2.34
45 	 */
46 	public bool addFeature(GType type);
47 
48 	/** */
49 	public void attach(Session session);
50 
51 	/** */
52 	public void detach(Session session);
53 
54 	/**
55 	 * Tests if @feature has a "sub-feature" of type @type. See
56 	 * soup_session_feature_add_feature().
57 	 *
58 	 * Params:
59 	 *     type = the #GType of a "sub-feature"
60 	 *
61 	 * Returns: %TRUE if @feature has a subfeature of type @type
62 	 *
63 	 * Since: 2.34
64 	 */
65 	public bool hasFeature(GType type);
66 
67 	/**
68 	 * Removes the "sub-feature" of type @type from the base feature
69 	 * @feature. See soup_session_feature_add_feature().
70 	 *
71 	 * Params:
72 	 *     type = the #GType of a "sub-feature"
73 	 *
74 	 * Returns: %TRUE if @type was removed from @feature
75 	 *
76 	 * Since: 2.34
77 	 */
78 	public bool removeFeature(GType type);
79 }