1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
5 * Authors: Michael Zucchi <notzed@ximian.com>
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of version 2 of the GNU Lesser General Public
9 * License as published by the Free Software Foundation.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this program; if not, write to the
18 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
22 #if !defined (__CAMEL_H_INSIDE__) && !defined (CAMEL_COMPILATION)
23 #error "Only <camel/camel.h> can be included directly."
26 #ifndef CAMEL_INTERNET_ADDRESS_H
27 #define CAMEL_INTERNET_ADDRESS_H
29 #include <camel/camel-address.h>
31 /* Standard GObject macros */
32 #define CAMEL_TYPE_INTERNET_ADDRESS \
33 (camel_internet_address_get_type ())
34 #define CAMEL_INTERNET_ADDRESS(obj) \
35 (G_TYPE_CHECK_INSTANCE_CAST \
36 ((obj), CAMEL_TYPE_INTERNET_ADDRESS, CamelInternetAddress))
37 #define CAMEL_INTERNET_ADDRESS_CLASS(cls) \
38 (G_TYPE_CHECK_CLASS_CAST \
39 ((cls), CAMEL_TYPE_INTERNET_ADDRESS, CamelInternetAddressClass))
40 #define CAMEL_IS_INTERNET_ADDRESS(obj) \
41 (G_TYPE_CHECK_INSTANCE_TYPE \
42 ((obj), CAMEL_TYPE_INTERNET_ADDRESS))
43 #define CAMEL_IS_INTERNET_ADDRESS_CLASS(cls) \
44 (G_TYPE_CHECK_CLASS_TYPE \
45 ((cls), CAMEL_TYPE_INTERNET_ADDRESS))
46 #define CAMEL_INTERNET_ADDRESS_GET_CLASS(obj) \
47 (G_TYPE_INSTANCE_GET_CLASS \
48 ((obj), CAMEL_TYPE_INTERNET_ADDRESS, CamelInternetAddressClass))
52 typedef struct _CamelInternetAddress CamelInternetAddress;
53 typedef struct _CamelInternetAddressClass CamelInternetAddressClass;
54 typedef struct _CamelInternetAddressPrivate CamelInternetAddressPrivate;
56 struct _CamelInternetAddress {
58 CamelInternetAddressPrivate *priv;
61 struct _CamelInternetAddressClass {
62 CamelAddressClass parent_class;
65 GType camel_internet_address_get_type (void);
66 CamelInternetAddress *
67 camel_internet_address_new (void);
68 gint camel_internet_address_add (CamelInternetAddress *addr,
70 const gchar *address);
71 gboolean camel_internet_address_get (CamelInternetAddress *addr,
74 const gchar **addressp);
75 gint camel_internet_address_find_name (CamelInternetAddress *addr,
77 const gchar **addressp);
78 gint camel_internet_address_find_address
79 (CamelInternetAddress *addr,
83 /* utility functions, for network/display formatting */
84 gchar * camel_internet_address_encode_address
88 gchar * camel_internet_address_format_address
94 #endif /* CAMEL_INTERNET_ADDRESS_H */