* Make sure that automatic closing of connections only affects
[alpine.git] / pith / remtype.h
blobbd616bc9d6c414a4e4103ee3ccbd444394e48b47
1 /*
2 * $Id: remtype.h 764 2007-10-23 23:44:49Z hubert@u.washington.edu $
4 * ========================================================================
5 * Copyright 2013-2018 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_REMTYPE_INCLUDED
18 #define PITH_REMTYPE_INCLUDED
20 #include "../pith/store.h"
23 typedef enum {Loc, RemImap} RemType;
26 typedef enum {ReadOnly, ReadWrite, MaybeRorW, NoAccess, NoExists} AccessType;
29 /* Remote data folder bookkeeping */
30 typedef struct remote_data {
31 RemType type;
32 char *rn; /* remote name (name of folder) */
33 char *lf; /* name of local file */
34 STORE_S *sonofile; /* storage object which takes place of lf */
35 AccessType access; /* of remote folder */
36 time_t last_use; /* when remote was last accessed */
37 time_t last_valid_chk;/* when remote valid check was done */
38 time_t last_local_valid_chk;
39 STORE_S *so; /* storage object to use */
40 char read_status; /* R for readonly */
41 unsigned long flags;
42 unsigned long cookie;
43 union type_specific_data {
44 struct imap_remote_data {
45 char *special_hdr; /* header name for this type folder */
46 MAILSTREAM *stream; /* stream to use for remote folder */
47 char *chk_date; /* Date of last message */
48 unsigned long chk_nmsgs; /* Number of messages in folder */
49 unsigned long shouldbe_nmsgs; /* Number which should be in folder */
50 imapuid_t uidvalidity; /* UIDVALIDITY of folder */
51 imapuid_t uidnext; /* UIDNEXT of folder */
52 imapuid_t uid; /* UID of last message in folder */
53 }i;
54 }t;
55 } REMDATA_S;
58 /* exported protoypes */
61 #endif /* PITH_REMTYPE_INCLUDED */