Annotation of win32/gnome/gmime-x.x.x/internet-address.h, revision 1.1

1.1     ! paf         1: /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
        !             2: /*
        !             3:  *  Authors: Jeffrey Stedfast <fejj@helixcode.com>
        !             4:  *
        !             5:  *  Copyright 2000 Helix Code, Inc. (www.helixcode.com)
        !             6:  *
        !             7:  *  This program is free software; you can redistribute it and/or modify
        !             8:  *  it under the terms of the GNU General Public License as published by
        !             9:  *  the Free Software Foundation; either version 2 of the License, or
        !            10:  *  (at your option) any later version.
        !            11:  *
        !            12:  *  This program is distributed in the hope that it will be useful,
        !            13:  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
        !            14:  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
        !            15:  *  GNU General Public License for more details.
        !            16:  *
        !            17:  *  You should have received a copy of the GNU General Public License
        !            18:  *  along with this program; if not, write to the Free Software
        !            19:  *  Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
        !            20:  *
        !            21:  */
        !            22: 
        !            23: #ifndef __INTERNET_ADDRESS_H__
        !            24: #define __INTERNET_ADDRESS_H__
        !            25: 
        !            26: #ifdef __cplusplus
        !            27: extern "C" {
        !            28: //#pragma }
        !            29: #endif /* __cplusplus }*/
        !            30: 
        !            31: #include <glib.h>
        !            32: 
        !            33: typedef enum {
        !            34:        INTERNET_ADDRESS_NONE,
        !            35:        INTERNET_ADDRESS_NAME,
        !            36:        INTERNET_ADDRESS_GROUP
        !            37: } InternetAddressType;
        !            38: 
        !            39: typedef struct _InternetAddress InternetAddress;
        !            40: typedef struct _InternetAddressList InternetAddressList;
        !            41: 
        !            42: struct _InternetAddress {
        !            43:        InternetAddressType type;
        !            44:        unsigned int refcount;
        !            45:        char *name;
        !            46:        union {
        !            47:                char *addr;
        !            48:                InternetAddressList *members;
        !            49:        } value;
        !            50: };
        !            51: 
        !            52: struct _InternetAddressList {
        !            53:        struct _InternetAddressList *next;
        !            54:        InternetAddress *address;
        !            55: };
        !            56: 
        !            57: InternetAddress *internet_address_new (void);
        !            58: InternetAddress *internet_address_new_name (const char *name, const char *addr);
        !            59: InternetAddress *internet_address_new_group (const char *name);
        !            60: 
        !            61: void internet_address_ref (InternetAddress *ia);
        !            62: void internet_address_unref (InternetAddress *ia);
        !            63: 
        !            64: void internet_address_set_name (InternetAddress *ia, const char *name);
        !            65: void internet_address_set_addr (InternetAddress *ia, const char *addr);
        !            66: void internet_address_set_group (InternetAddress *ia, InternetAddressList *group);
        !            67: void internet_address_add_member (InternetAddress *ia, InternetAddress *member);
        !            68: 
        !            69: InternetAddressList *internet_address_list_prepend (InternetAddressList *list, InternetAddress *ia);
        !            70: InternetAddressList *internet_address_list_append (InternetAddressList *list, InternetAddress *ia);
        !            71: InternetAddressList *internet_address_list_concat (InternetAddressList *a, InternetAddressList *b);
        !            72: int internet_address_list_length (InternetAddressList *list);
        !            73: void internet_address_list_destroy (InternetAddressList *list);
        !            74: 
        !            75: InternetAddressList *internet_address_parse_string (const char *string);
        !            76: 
        !            77: char *internet_address_to_string (InternetAddress *ia, gboolean encode);
        !            78: char *internet_address_list_to_string (InternetAddressList *list, gboolean encode);
        !            79: 
        !            80: #ifdef __cplusplus
        !            81: }
        !            82: #endif /* __cplusplus */
        !            83: 
        !            84: #endif /* __INTERNET_ADDRESS_H__ */

E-mail: