2 * Copyright (C) 2000 Helix Code Inc.
4 * Authors: Michael Zucchi <notzed@helixcode.com>
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public License
8 * as published by the Free Software Foundation; either version 2 of
9 * the License, or (at your option) any later version.
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
14 * GNU Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public
17 * License along with this program; if not, write to the Free Software
18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 #ifndef _CAMEL_ADDRESS_H
22 #define _CAMEL_ADDRESS_H
25 #include <camel/camel-object.h>
27 #define CAMEL_ADDRESS(obj) CAMEL_CHECK_CAST (obj, camel_address_get_type (), CamelAddress)
28 #define CAMEL_ADDRESS_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_address_get_type (), CamelAddressClass)
29 #define CAMEL_IS_ADDRESS(obj) CAMEL_CHECK_TYPE (obj, camel_address_get_type ())
31 typedef struct _CamelAddressClass CamelAddressClass;
33 struct _CamelAddress {
38 struct _CamelAddressPrivate *priv;
41 struct _CamelAddressClass {
42 CamelObjectClass parent_class;
44 int (*decode) (CamelAddress *, const char *raw);
45 char *(*encode) (CamelAddress *);
47 int (*unformat) (CamelAddress *, const char *raw);
48 char *(*format) (CamelAddress *);
50 int (*cat) (CamelAddress *, const CamelAddress *);
52 void (*remove) (CamelAddress *, int index);
55 guint camel_address_get_type (void);
56 CamelAddress *camel_address_new (void);
57 CamelAddress *camel_address_new_clone (const CamelAddress *);
58 int camel_address_length (CamelAddress *);
60 int camel_address_decode (CamelAddress *, const char *);
61 char *camel_address_encode (CamelAddress *);
62 int camel_address_unformat (CamelAddress *, const char *);
63 char *camel_address_format (CamelAddress *);
65 int camel_address_cat (CamelAddress *, const CamelAddress *);
66 int camel_address_copy (CamelAddress *, const CamelAddress *);
68 void camel_address_remove (CamelAddress *, int index);
70 #endif /* ! _CAMEL_ADDRESS_H */