1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 * Copyright (C) 2000 Ximian Inc.
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., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
22 #ifndef _CAMEL_ADDRESS_H
23 #define _CAMEL_ADDRESS_H
26 #include <camel/camel-object.h>
28 #define CAMEL_ADDRESS(obj) CAMEL_CHECK_CAST (obj, camel_address_get_type (), CamelAddress)
29 #define CAMEL_ADDRESS_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_address_get_type (), CamelAddressClass)
30 #define CAMEL_IS_ADDRESS(obj) CAMEL_CHECK_TYPE (obj, camel_address_get_type ())
34 typedef struct _CamelAddressClass CamelAddressClass;
36 struct _CamelAddress {
41 struct _CamelAddressPrivate *priv;
44 struct _CamelAddressClass {
45 CamelObjectClass parent_class;
47 int (*decode) (CamelAddress *, const char *raw);
48 char *(*encode) (CamelAddress *);
50 int (*unformat) (CamelAddress *, const char *raw);
51 char *(*format) (CamelAddress *);
53 int (*cat) (CamelAddress *, const CamelAddress *);
55 void (*remove) (CamelAddress *, int index);
58 CamelType camel_address_get_type (void);
59 CamelAddress *camel_address_new (void);
60 CamelAddress *camel_address_new_clone (const CamelAddress *addr);
61 int camel_address_length (CamelAddress *addr);
63 int camel_address_decode (CamelAddress *addr, const char *raw);
64 char *camel_address_encode (CamelAddress *addr);
65 int camel_address_unformat (CamelAddress *addr, const char *raw);
66 char *camel_address_format (CamelAddress *addr);
68 int camel_address_cat (CamelAddress *dest, const CamelAddress *source);
69 int camel_address_copy (CamelAddress *dest, const CamelAddress *source);
71 void camel_address_remove (CamelAddress *addr, int index);
75 #endif /* ! _CAMEL_ADDRESS_H */