1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ 2 /* 3 * Copyright (C) 2007 Novell, Inc. 4 */ 5 6 #ifndef __SOUP_AUTH_DOMAIN_BASIC_H__ 7 #define __SOUP_AUTH_DOMAIN_BASIC_H__ 1 8 9 #include <libsoup/soup-auth-domain.h> 10 11 G_BEGIN_DECLS 12 13 #define SOUP_TYPE_AUTH_DOMAIN_BASIC (soup_auth_domain_basic_get_type ()) 14 #define SOUP_AUTH_DOMAIN_BASIC(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SOUP_TYPE_AUTH_DOMAIN_BASIC, SoupAuthDomainBasic)) 15 #define SOUP_AUTH_DOMAIN_BASIC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SOUP_TYPE_AUTH_DOMAIN_BASIC, SoupAuthDomainBasicClass)) 16 #define SOUP_IS_AUTH_DOMAIN_BASIC(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SOUP_TYPE_AUTH_DOMAIN_BASIC)) 17 #define SOUP_IS_AUTH_DOMAIN_BASIC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), SOUP_TYPE_AUTH_DOMAIN_BASIC)) 18 #define SOUP_AUTH_DOMAIN_BASIC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SOUP_TYPE_AUTH_DOMAIN_BASIC, SoupAuthDomainBasicClass)) 19 20 typedef struct { 21 SoupAuthDomain parent; 22 23 } SoupAuthDomainBasic; 24 25 typedef struct { 26 SoupAuthDomainClass parent_class; 27 28 /* Padding for future expansion */ 29 void (*_libsoup_reserved1) (void); 30 void (*_libsoup_reserved2) (void); 31 void (*_libsoup_reserved3) (void); 32 void (*_libsoup_reserved4) (void); 33 } SoupAuthDomainBasicClass; 34 35 #define SOUP_AUTH_DOMAIN_BASIC_AUTH_CALLBACK "auth-callback" 36 #define SOUP_AUTH_DOMAIN_BASIC_AUTH_DATA "auth-data" 37 38 SOUP_AVAILABLE_IN_2_4 39 GType soup_auth_domain_basic_get_type (void); 40 41 SOUP_AVAILABLE_IN_2_4 42 SoupAuthDomain *soup_auth_domain_basic_new (const char *optname1, 43 ...) G_GNUC_NULL_TERMINATED; 44 45 typedef gboolean (*SoupAuthDomainBasicAuthCallback) (SoupAuthDomain *domain, 46 SoupMessage *msg, 47 const char *username, 48 const char *password, 49 gpointer user_data); 50 51 SOUP_AVAILABLE_IN_2_4 52 void soup_auth_domain_basic_set_auth_callback (SoupAuthDomain *domain, 53 SoupAuthDomainBasicAuthCallback callback, 54 gpointer user_data, 55 GDestroyNotify dnotify); 56 57 G_END_DECLS 58 59 #endif /* __SOUP_AUTH_DOMAIN_BASIC_H__ */ 60