* NTLM authentication support with the ntlm library, in Unix systems.
[alpine.git] / pith / takeaddr.h
blobbebc343c8ad7dc98d39ec89e9a4f6774d7c7bbae
1 /*
2 * $Id: takeaddr.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
4 * ========================================================================
5 * Copyright 2013-2017 Eduardo Chappa
6 * Copyright 2006 University of Washington
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * ========================================================================
17 #ifndef PITH_TAKEADDR_INCLUDED
18 #define PITH_TAKEADDR_INCLUDED
21 #include "../pith/adrbklib.h"
22 #include "../pith/msgno.h"
23 #include "../pith/state.h"
24 #include "../pith/store.h"
28 * Information used to paint and maintain a line on the TakeAddr screen
30 typedef struct takeaddr_line {
31 unsigned int checked:1;/* addr is selected */
32 unsigned int skip_it:1;/* skip this one */
33 unsigned int print:1; /* for printing only */
34 unsigned int frwrded:1;/* forwarded from another pine */
35 char *strvalue; /* alloc'd value string */
36 ADDRESS *addr; /* original ADDRESS this line came from */
37 char *nickname; /* The first TA may carry this extra */
38 char *fullname; /* information, or, */
39 char *fcc; /* all vcard ta's have it. */
40 char *comment;
41 struct takeaddr_line *next, *prev;
42 } TA_S;
44 typedef struct a_list {
45 int dup;
46 adrbk_cntr_t dst_enum;
47 TA_S *ta;
48 } SWOOP_S;
50 typedef struct lines_to_take {
51 char *printval;
52 char *exportval;
53 int flags;
54 struct lines_to_take *next, *prev;
55 } LINES_TO_TAKE;
57 #define LT_NONE 0x00
58 #define LT_NOSELECT 0x01
62 * Flag definitions to control takeaddr behavior
64 #define TA_NONE 0
65 #define TA_AGG 1 /* if set, use the aggregate operation */
66 #define TA_NOPROMPT 2 /* if set, we aren't in interactive mode */
69 /* these should really be in ../pine */
70 #define RS_NONE 0x00 /* rule_setup_type flags */
71 #define RS_RULES 0x01 /* include Rules as option */
72 #define RS_INCADDR 0x02 /* include Addrbook as option */
73 #define RS_INCEXP 0x04 /* include Export as option */
74 #define RS_INCFILTNOW 0x08 /* filter now */
77 /* exported prototypes */
78 int set_up_takeaddr(int, struct pine *, MSGNO_S *, TA_S **,
79 int *, int, int (*)(TA_S *, int));
80 TA_S *pre_sel_taline(TA_S *);
81 TA_S *pre_taline(TA_S *);
82 TA_S *next_sel_taline(TA_S *);
83 TA_S *next_taline(TA_S *);
84 int ta_mark_all(TA_S *);
85 int is_talist_of_one(TA_S *);
86 int ta_unmark_all(TA_S *);
87 TA_S *new_taline(TA_S **);
88 void free_taline(TA_S **);
89 void free_talines(TA_S **);
90 void free_ltline(LINES_TO_TAKE **);
91 void free_ltlines(LINES_TO_TAKE **);
92 TA_S *first_sel_taline(TA_S *);
93 TA_S *last_sel_taline(TA_S *);
94 TA_S *first_taline(TA_S *);
95 TA_S *first_checked(TA_S *);
96 char **list_of_checked(TA_S *);
97 int convert_ta_to_lines(TA_S *, LINES_TO_TAKE **);
98 LINES_TO_TAKE *new_ltline(LINES_TO_TAKE **);
99 int add_addresses_to_talist(struct pine *, long, char *, TA_S **, ADDRESS *, int);
100 int process_vcard_atts(MAILSTREAM *, long, BODY *, BODY *, char *, TA_S **);
101 int cmp_swoop_list(const qsort_t *, const qsort_t *);
102 int vcard_to_ta(char *, char *, char *, char *, char *, char *, TA_S **);
103 char *getaltcharset(char *, char **, char **, int *);
104 void switch_to_last_comma_first(char *, char *, size_t);
105 char **detach_vcard_att(MAILSTREAM *, long, BODY *, char *);
106 int grab_addrs_from_body(MAILSTREAM *,long,BODY *,TA_S **);
107 int get_line_of_message(STORE_S *, char *, int);
108 TA_S *fill_in_ta(TA_S **, ADDRESS *, int, char *);
109 int eliminate_dups_and_us(TA_S *);
110 int eliminate_dups_but_not_us(TA_S *);
111 int eliminate_dups_and_maybe_us(TA_S *, int);
112 int dup_addrs(ADDRESS *, ADDRESS *);
115 #endif /* PITH_TAKEADDR_INCLUDED */