eudora-mac/Include/imapnetlib.h

1 line
18 KiB
C
Raw Normal View History

2018-05-23 09:59:15 +00:00
/* Copyright (c) 2017, Computer History Museum All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Computer History Museum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* Copyright (c) 1997 by QUALCOMM Incorporated */ /********************************************************************** * imapnetlib.h * * This file contains declarations for the imap network functions * Eudora needs to do online IMAP. It provideslow-level IMAP fetch, * store, etc. for a single mailbox or TransStream stream. * * Note, this closely mirrors what JOK has done for Windows with * the CImapStream class. Thanks, JOK! **********************************************************************/ #ifndef IMAPNETLIB_H #define IMAPNETLIB_H /* TYPEDEFS for the exported IMAP structures. */ typedef unsigned long UIDVALIDITY; typedef unsigned long IMAPUID; #define MAXLOGINTRIALS 1 /* maximum number of login trials */ /* Primary body types */ #define TYPETEXT 0 //unformatted text #define TYPEMULTIPART 1 // multiple part #define TYPEMESSAGE 2 // encapsulated message #define TYPEAPPLICATION 3 // application data #define TYPEAUDIO 4 // audio #define TYPEIMAGE 5 // static image #define TYPEVIDEO 6 // video #define TYPEMODEL 7 // model #define TYPEOTHER 8 // unknown #define TYPEMAX 15 // maximum type code /* Body encodings */ #define ENC7BIT 0 // 7 bit SMTP semantic data #define ENC8BIT 1 // 8 bit SMTP semantic data #define ENCBINARY 2 // 8 bit binary data #define ENCBASE64 3 // base-64 encoded data #define ENCQUOTEDPRINTABLE 4 // human-readable 8-as-7 bit data #define ENCOTHER 5 // unknown #define ENCMAX 10 // maximum encoding code /* Bits for mm_list() and mm_lsub() */ #define LATT_NOINFERIORS (long) 1 #define LATT_NOSELECT (long) 2 #define LATT_MARKED (long) 4 #define LATT_UNMARKED (long) 8 #define LATT_NOT_IMAP (long) 16 #define LATT_JUNK (long) 32 #define LATT_HASNOCHILDREN (long) 64 #define LATT_TRASH (long) 512 #define LATT_ROOT (long) 1024 // to mark the topmost node in a mailbox tree /* Structures. */ #define IMAPBODY struct mail_bodystruct #define MESSAGE struct mail_body_message #define PARAMETER struct mail_body_parameter #define PART struct mail_body_part #define PARTTEXT struct mail_body_text #define SIZEDTEXT struct mail_text /* Sized text */ SIZEDTEXT { char *data; // text unsigned long size; // size of text in octets }; /* Message body text */ PARTTEXT { unsigned long offset; // offset from body origin SIZEDTEXT text; // text }; /* String list */ typedef struct string_list { SIZEDTEXT text; /