[go: up one dir, main page]

Menu

[97a570]: / src / types.h  Maximize  Restore  History

Download this file

68 lines (56 with data), 1.9 kB

 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
62
63
64
65
66
67
#ifndef __MAILSYNC_TYPES__
#include <stdio.h>
#include <string>
#include <map>
#include <set>
#include "c-client-header.h"
#include "msgid.h"
using namespace std;
//////////////////////////////////////////////////////////////////////////
enum operation_mode_t { mode_unknown, mode_sync, mode_list, mode_diff };
typedef struct MailboxProperties {
bool no_inferiors;
bool no_select;
bool contains_messages;
bool done; // mailbox has been treated (synced...)
MailboxProperties(): no_inferiors(false),
no_select(false),
contains_messages(false),
done(false) {};
};
// we sort our mailboxes by length. That way longer mailboxes and their
// submailboxes (!!) will be traversed first
struct longer
{
bool operator()(const string& s1, const string& s2) const
{
if (s1.length() == s2.length())
return s1 < s2; // if same length return arbitrary order
// - in this case alphabetical
else
return s1.length() > s2.length();
}
};
typedef map<string, MailboxProperties, longer> MailboxMap;
typedef set<MsgId> MsgIdSet;
typedef map<MsgId, unsigned long> MsgIdPositions; // Map message ids to
// positions within a
// mailbox
typedef map<string, MsgIdSet> MsgIdsPerMailbox; // A List of message ids
// per mailbox(-name)
//////////////////////////////////////////////////////////////////////////
//
class Passwd
//
// Structure that holds the password
//
//////////////////////////////////////////////////////////////////////////
{
public:
bool nopasswd;
string text;
void clear();
void set_passwd(string passwd);
};
#define __MAILSYNC_TYPES__
#endif