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