Annotation of win32/gnome/gmime-x.x.x/gmime-message.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: 
        !            24: #ifndef __GMIME_MESSAGE_H__
        !            25: #define __GMIME_MESSAGE_H__
        !            26: 
        !            27: #ifdef __cplusplus
        !            28: extern "C" {
        !            29: //#pragma }
        !            30: #endif /* __cplusplus */
        !            31: 
        !            32: #include <glib.h>
        !            33: #include <stdarg.h>
        !            34: #include <time.h>
        !            35: 
        !            36: #include "gmime-part.h"
        !            37: #include "gmime-header.h"
        !            38: #include "gmime-stream.h"
        !            39: #include "internet-address.h"
        !            40: 
        !            41: 
        !            42: /**
        !            43:  * GMIME_RECIPIENT_TYPE_TO:
        !            44:  *
        !            45:  * Recipients in the To: header.
        !            46:  **/
        !            47: #define        GMIME_RECIPIENT_TYPE_TO  "To"
        !            48: 
        !            49: 
        !            50: /**
        !            51:  * GMIME_RECIPIENT_TYPE_CC:
        !            52:  *
        !            53:  * Recipients in the Cc: header.
        !            54:  **/
        !            55: #define        GMIME_RECIPIENT_TYPE_CC  "Cc"
        !            56: 
        !            57: 
        !            58: /**
        !            59:  * GMIME_RECIPIENT_TYPE_BCC:
        !            60:  *
        !            61:  * Recipients in the Bcc: header.
        !            62:  **/
        !            63: #define        GMIME_RECIPIENT_TYPE_BCC "Bcc"
        !            64: 
        !            65: 
        !            66: struct _GMimeMessageHeader {
        !            67:        char *from;
        !            68:        char *reply_to;
        !            69:        
        !            70:        GHashTable *recipients;
        !            71:        
        !            72:        char *subject;
        !            73:        
        !            74:        time_t date;
        !            75:        int gmt_offset;     /* GMT offset */
        !            76:        
        !            77:        char *message_id;
        !            78:        
        !            79:        GMimeHeader *headers;
        !            80: };
        !            81: 
        !            82: typedef struct _GMimeMessageHeader GMimeMessageHeader;
        !            83: 
        !            84: struct _GMimeMessage {
        !            85:        GMimeObject parent_object;
        !            86:        
        !            87:        GMimeMessageHeader *header;
        !            88:        
        !            89:        GMimePart *mime_part;
        !            90: };
        !            91: 
        !            92: typedef struct _GMimeMessage GMimeMessage;
        !            93: 
        !            94: #define GMIME_MESSAGE_TYPE       g_str_hash ("GMimeMessage")
        !            95: #define GMIME_IS_MESSAGE(object) (object && ((GMimeObject *) object)->type == GMIME_MESSAGE_TYPE)
        !            96: #define GMIME_MESSAGE(object)    ((GMimeMessage *) object)
        !            97: 
        !            98: GMimeMessage *g_mime_message_new (gboolean pretty_headers);
        !            99: 
        !           100: void g_mime_message_set_sender (GMimeMessage *message, const char *sender);
        !           101: const char *g_mime_message_get_sender (GMimeMessage *message);
        !           102: 
        !           103: void g_mime_message_set_reply_to (GMimeMessage *message, const char *reply_to);
        !           104: const char *g_mime_message_get_reply_to (GMimeMessage *message);
        !           105: 
        !           106: void g_mime_message_add_recipient (GMimeMessage *message, char *type, const char *name, const char *address);
        !           107: void g_mime_message_add_recipients_from_string (GMimeMessage *message, char *type, const char *string);
        !           108: InternetAddressList *g_mime_message_get_recipients (GMimeMessage *message, const char *type);
        !           109: 
        !           110: void g_mime_message_set_subject (GMimeMessage *message, const char *subject);
        !           111: const char *g_mime_message_get_subject (GMimeMessage *message);
        !           112: 
        !           113: void g_mime_message_set_date (GMimeMessage *message, time_t date, int gmt_offset);
        !           114: void g_mime_message_get_date (GMimeMessage *message, time_t *date, int *gmt_offset);
        !           115: char *g_mime_message_get_date_string (GMimeMessage *message);
        !           116: 
        !           117: void g_mime_message_set_message_id (GMimeMessage *message, const char *id);
        !           118: const char *g_mime_message_get_message_id (GMimeMessage *message);
        !           119: 
        !           120: void g_mime_message_add_header (GMimeMessage *message, const char *header, const char *value);
        !           121: void g_mime_message_set_header (GMimeMessage *message, const char *header, const char *value);
        !           122: const char *g_mime_message_get_header (GMimeMessage *message, const char *header);
        !           123: 
        !           124: void g_mime_message_set_mime_part (GMimeMessage *message, GMimePart *mime_part);
        !           125: 
        !           126: /* utility functions */
        !           127: void g_mime_message_write_to_stream (GMimeMessage *message, GMimeStream *stream);
        !           128: char *g_mime_message_to_string (GMimeMessage *message);
        !           129: 
        !           130: char *g_mime_message_get_body (const GMimeMessage *message, gboolean want_plain, gboolean *is_html);
        !           131: char *g_mime_message_get_headers (GMimeMessage *message);
        !           132: 
        !           133: void g_mime_message_foreach_part (GMimeMessage *message, GMimePartFunc callback, gpointer data);
        !           134: 
        !           135: #ifdef __cplusplus
        !           136: }
        !           137: #endif /* __cplusplus */
        !           138: 
        !           139: #endif /* __GMIME_MESSAGE_H__ */

E-mail: