~ubuntu-branches/debian/stretch/alpine/stretch

« back to all changes in this revision

Viewing changes to pith/remtype.h

  • Committer: Bazaar Package Importer
  • Author(s): Asheesh Laroia
  • Date: 2007-02-17 13:17:42 UTC
  • Revision ID: james.westby@ubuntu.com-20070217131742-99x5c6cpg1pbkdhw
Tags: upstream-0.82+dfsg
ImportĀ upstreamĀ versionĀ 0.82+dfsg

Show diffs side-by-side

added added

removed removed

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