blob: 21df22cd5fc1385e5a938c1d77d7dd9544f8d467 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
/*
* $Id: remtype.h 764 2007-10-23 23:44:49Z hubert@u.washington.edu $
*
* ========================================================================
* Copyright 2013-2020 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* ========================================================================
*/
#ifndef PITH_REMTYPE_INCLUDED
#define PITH_REMTYPE_INCLUDED
#include "../pith/store.h"
typedef enum {Loc, RemImap} RemType;
typedef enum {ReadOnly, ReadWrite, MaybeRorW, NoAccess, NoExists} AccessType;
/* Remote data folder bookkeeping */
typedef struct remote_data {
RemType type;
char *rn; /* remote name (name of folder) */
char *lf; /* name of local file */
STORE_S *sonofile; /* storage object which takes place of lf */
AccessType access; /* of remote folder */
time_t last_use; /* when remote was last accessed */
time_t last_valid_chk;/* when remote valid check was done */
time_t last_local_valid_chk;
STORE_S *so; /* storage object to use */
char read_status; /* R for readonly */
unsigned long flags;
unsigned long cookie;
union type_specific_data {
struct imap_remote_data {
char *special_hdr; /* header name for this type folder */
MAILSTREAM *stream; /* stream to use for remote folder */
char *chk_date; /* Date of last message */
unsigned long chk_nmsgs; /* Number of messages in folder */
unsigned long shouldbe_nmsgs; /* Number which should be in folder */
imapuid_t uidvalidity; /* UIDVALIDITY of folder */
imapuid_t uidnext; /* UIDNEXT of folder */
imapuid_t uid; /* UID of last message in folder */
}i;
}t;
} REMDATA_S;
/* exported prototypes */
#endif /* PITH_REMTYPE_INCLUDED */
|