Bincimap 2.0.16
Easy Imapping
Loading...
Searching...
No Matches
pendingupdates.h
Go to the documentation of this file.
1
7#include <map>
8#include <vector>
9
10#ifndef pendingupdates_h_included
11#define pendingupdates_h_included
12
13namespace Binc {
14 class Mailbox;
15
16 //------------------------------------------------------------------------
18 public:
19 enum {
20 EXPUNGE = 0x01,
21 FLAGS = 0x02,
22 EXISTS = 0x04,
23 RECENT = 0x08
24 };
25
26 //----------------------------------------------------------------------
28 private:
29 std::vector<unsigned int>::iterator internal;
30
31 public:
32 unsigned int operator * (void) const;
33 void operator ++ (void);
36
37 //--
39 expunged_const_iterator(std::vector<unsigned int>::iterator i);
40 };
41
42 //--
45
46 //----------------------------------------------------------------------
48 private:
49 std::map<unsigned int, unsigned int>::iterator internal;
50 std::map<unsigned int, unsigned int> *sqnrtouid;
51 std::map<unsigned int, std::vector<std::string> > *sqnrtocflags;
52
53 public:
54 unsigned int first(void) const;
55 unsigned int second(void) const;
56 std::vector<std::string> getCustomFlags(void) const;
57 unsigned int getUID(void) const;
58
59 void operator ++ (void);
61
62 //--
64 flagupdates_const_iterator(std::map<unsigned int, unsigned int>::iterator i,
65 std::map<unsigned int, std::vector<std::string> > *,
66 std::map<unsigned int, unsigned int> *);
67 };
68
69 //--
72
73 //--
74 void addExpunged(unsigned int uid);
75 void addFlagUpdates(unsigned int sqnr, unsigned int uid,
76 unsigned int flags,
77 const std::vector<std::string> &cflags);
78 void setExists(unsigned int n);
79 void setRecent(unsigned int n);
80 unsigned int getExists(void) const;
81 unsigned int getRecent(void) const;
82 bool newExists(void) const;
83 bool newRecent(void) const;
84
85 //--
86 PendingUpdates(void);
87 ~PendingUpdates(void);
88
89 private:
90 std::vector<unsigned int> expunges;
91 std::map<unsigned int, unsigned int> flagupdates;
92 std::map<unsigned int, unsigned int> sqnrtouid;
93 std::map<unsigned int, std::vector<std::string> > sqnrtocflags;
94
95 unsigned int exists;
96 unsigned int recent;
97 bool newexists;
98 bool newrecent;
99 };
100
101 bool pendingUpdates(Mailbox *, int type, bool rescan,
102 bool showAll = false,
103 bool forceScan = false,
104 bool uidfetchflags = false);
105}
106
107#endif
bool operator!=(expunged_const_iterator) const
bool operator==(expunged_const_iterator) const
expunged_const_iterator(std::vector< unsigned int >::iterator i)
flagupdates_const_iterator(std::map< unsigned int, unsigned int >::iterator i, std::map< unsigned int, std::vector< std::string > > *, std::map< unsigned int, unsigned int > *)
std::vector< std::string > getCustomFlags(void) const
bool operator!=(flagupdates_const_iterator) const
expunged_const_iterator beginExpunged(void)
bool newRecent(void) const
void addFlagUpdates(unsigned int sqnr, unsigned int uid, unsigned int flags, const std::vector< std::string > &cflags)
unsigned int getExists(void) const
flagupdates_const_iterator endFlagUpdates(void)
bool newExists(void) const
void setExists(unsigned int n)
void addExpunged(unsigned int uid)
unsigned int getRecent(void) const
void setRecent(unsigned int n)
flagupdates_const_iterator beginFlagUpdates(void)
expunged_const_iterator endExpunged(void)
Definition: bincimapd.cc:9
bool pendingUpdates(Mailbox *, int type, bool rescan, bool showAll=false, bool forceScan=false, bool uidfetchflags=false)