2 * $Id: remtype.h 764 2007-10-23 23:44:49Z hubert@u.washington.edu $
4 * ========================================================================
5 * Copyright 2013-2022 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
{
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 */
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 */
58 /* exported prototypes */
61 #endif /* PITH_REMTYPE_INCLUDED */