Fix FSF address (Tobias Mueller, #470445)
[platform/upstream/evolution-data-server.git] / camel / camel-internet-address.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3  *  Copyright (C) 2000 Ximian Inc.
4  *
5  *  Authors: Michael Zucchi <notzed@ximian.com>
6  *
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.
10  *
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.
15  *
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.
20  */
21
22 #ifndef _CAMEL_INTERNET_ADDRESS_H
23 #define _CAMEL_INTERNET_ADDRESS_H
24
25 #include <camel/camel-address.h>
26
27 #define CAMEL_INTERNET_ADDRESS(obj)         CAMEL_CHECK_CAST (obj, camel_internet_address_get_type (), CamelInternetAddress)
28 #define CAMEL_INTERNET_ADDRESS_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_internet_address_get_type (), CamelInternetAddressClass)
29 #define CAMEL_IS_INTERNET_ADDRESS(obj)      CAMEL_CHECK_TYPE (obj, camel_internet_address_get_type ())
30
31 G_BEGIN_DECLS
32
33 typedef struct _CamelInternetAddressClass CamelInternetAddressClass;
34
35 struct _CamelInternetAddress {
36         CamelAddress parent;
37
38         struct _CamelInternetAddressPrivate *priv;
39 };
40
41 struct _CamelInternetAddressClass {
42         CamelAddressClass parent_class;
43 };
44
45 CamelType               camel_internet_address_get_type (void);
46 CamelInternetAddress   *camel_internet_address_new      (void);
47
48 int                     camel_internet_address_add      (CamelInternetAddress *addr, const char *name, const char *address);
49 gboolean                camel_internet_address_get      (const CamelInternetAddress *addr, int index, const char **namep, const char **addressp);
50
51 int                     camel_internet_address_find_name(CamelInternetAddress *addr, const char *name, const char **addressp);
52 int                     camel_internet_address_find_address(CamelInternetAddress *addr, const char *address, const char **namep);
53
54 /* utility functions, for network/display formatting */
55 char *                  camel_internet_address_encode_address(int *len, const char *name, const char *addr);
56 char *                  camel_internet_address_format_address(const char *real, const char *addr);
57
58 G_END_DECLS
59
60 #endif /* ! _CAMEL_INTERNET_ADDRESS_H */