1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /* camel-service.h : Abstract class for an email service */
7 * Bertrand Guiheneuf <Bertrand.Guiheneuf@aful.org>
9 * Copyright 1999 International GNOME Support (http://www.gnome-support.com) .
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License as
13 * published by the Free Software Foundation; either version 2 of the
14 * License, or (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
28 #ifndef CAMEL_SERVICE_H
29 #define CAMEL_SERVICE_H 1
35 #endif /* __cplusplus }*/
39 #define CAMEL_SERVICE_TYPE (camel_service_get_type ())
40 #define CAMEL_SERVICE(obj) (GTK_CHECK_CAST((obj), CAMEL_SERVICE_TYPE, CamelService))
41 #define CAMEL_SERVICE_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_SERVICE_TYPE, CamelServiceClass))
42 #define CAMEL_IS_SERVICE(o) (GTK_CHECK_TYPE((o), CAMEL_SERVICE_TYPE))
47 GtkObject parent_object;
50 gchar *url; /* This may be a full object ? */
57 GtkObjectClass parent_class;
59 void (*connect) (CamelService *service);
60 void (*connect_to_with_login_passwd) (CamelService *service, gchar *host, gchar *login, gchar *passwd);
61 void (*connect_to_with_login_passwd_port) (CamelService *service, gchar *host, gchar *login, gchar *passwd, guint port);
62 gboolean (*is_connected) (CamelService *service);
63 void (*set_connected) (CamelService *service, gboolean state);
64 const gchar * (*get_url) (CamelService *service);
72 void camel_service_connect (CamelService *service);
73 gboolean camel_service_is_connected (CamelService *service);
74 void camel_service_connect_to_with_login_passwd (CamelService *service, gchar *host, gchar *login, gchar *passwd);
75 void camel_service_connect_to_with_login_passwd_port (CamelService *service, gchar *host, gchar *login, gchar *passwd, guint port);
76 const gchar *camel_service_get_url (CamelService *service);
77 /* Standard Gtk function */
78 GtkType camel_service_get_type (void);
82 #endif /* __cplusplus */
84 #endif /* CAMEL_SERVICE_H */