1 /* search_part.h -- Prefiltering routines for SEARCH 2 * 3 * Copyright (c) 1994-2008 Carnegie Mellon University. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 9 * 1. Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. 11 * 12 * 2. Redistributions in binary form must reproduce the above copyright 13 * notice, this list of conditions and the following disclaimer in 14 * the documentation and/or other materials provided with the 15 * distribution. 16 * 17 * 3. The name "Carnegie Mellon University" must not be used to 18 * endorse or promote products derived from this software without 19 * prior written permission. For permission or any legal 20 * details, please contact 21 * Carnegie Mellon University 22 * Center for Technology Transfer and Enterprise Creation 23 * 4615 Forbes Avenue 24 * Suite 302 25 * Pittsburgh, PA 15213 26 * (412) 268-7393, fax: (412) 268-7395 27 * innovation@andrew.cmu.edu 28 * 29 * 4. Redistributions of any form whatsoever must retain the following 30 * acknowledgment: 31 * "This product includes software developed by Computing Services 32 * at Carnegie Mellon University (http://www.cmu.edu/computing/)." 33 * 34 * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO 35 * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 36 * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE 37 * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 38 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN 39 * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING 40 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 41 */ 42 43 #ifndef INCLUDED_SEARCH_PART_H 44 #define INCLUDED_SEARCH_PART_H 45 46 /* These constants are passed into the search_text_receiver_t.begin_part callback to 47 tell it which part of the message is being sent down */ 48 #define SEARCH_PART_NONE (-1) 49 #define SEARCH_PART_ANY 0 50 #define SEARCH_PART_FROM 1 51 #define SEARCH_PART_TO 2 52 #define SEARCH_PART_CC 3 53 #define SEARCH_PART_BCC 4 54 #define SEARCH_PART_SUBJECT 5 55 #define SEARCH_PART_LISTID 6 /* List-Id or Mailing-List fields */ 56 #define SEARCH_PART_TYPE 7 /* MIME Content-Type except multipart */ 57 #define SEARCH_PART_HEADERS 8 /* headers OTHER than the above headers */ 58 #define SEARCH_PART_BODY 9 59 #define SEARCH_PART_LOCATION 10 60 #define SEARCH_PART_ATTACHMENTNAME 11 61 #define SEARCH_PART_ATTACHMENTBODY 12 62 #define SEARCH_PART_DELIVEREDTO 13 63 #define SEARCH_PART_LANGUAGE 14 /* ISO 639 two or three letter code */ 64 #define SEARCH_PART_PRIORITY 15 /* String-encoded decimal integer > 0 */ 65 #define SEARCH_NUM_PARTS 16 66 67 /* Implemented in search_engines.c */ 68 extern const char *search_part_as_string(int part); 69 70 extern int search_part_is_body(int part); 71 72 #endif 73