| Qore GmailDataProvider Module Reference 1.0

Loading...
Searching...
No Matches
GmailMessageWatchDataProviderBase.qc.dox.h
1// -*- mode: c++; indent-tabs-mode: nil -*-
3
24
26 namespace GmailDataProvider {
28 class GmailMessageWatchDataProviderBase : public GoogleDataProvider::GoogleDataProviderBase, public DataProvider::DelayedObservable {
29
30 public:
32 const ConstructorOptions = ...;
33
34
36 const MinPollInterval = 30;
37
39 const MonthMap = ...;
40
41
42 protected:
43 // I/O lock
44 Mutex lck();
45
47 Condition cond();
48
50 int waiting;
51
53 int io_tid;
54
56 bool stop;
57
59 int poll_secs;
60
62 bool retrieve_attachments;
63
65 bool delete_messages;
66
68 date start_date;
69
71 string q;
72
73 public:
74
76 constructor(GoogleRestClient::GoogleRestClient rest, hash<string, hash<DataProviderOptionInfo>> constructor_options, *hash<auto> options)
77 ;
78
79
81 destructor();
82
83
85
87 observersReady();
88
89
91
93 stopEvents();
94
95
97 protected:
98 stopIntern();
99 public:
100
101
103 protected:
104 processOptions(*hash<auto> copts);
105 public:
106
107
109 protected:
110 pollThread();
111 public:
112
113
115 protected:
116 hash<auto> setup();
117 public:
118
119
121 protected:
122 *hash<auto> pollOnce(reference<hash<auto>> setup);
123 public:
124
125
127 protected:
128 processHeaders(*reference<hash<auto>> msg, hash<auto> fields, *hash<auto> pfields);
129 public:
130
131
133 protected:
134 processBody(*reference<hash<auto>> msg);
135 public:
136
137
139 protected:
140 static auto getHeaderValue(string val, hash<auto> f);
141 public:
142
143
145 protected:
146 static auto getHeaderValue(string val);
147 public:
148
149
151 protected:
152 hash<auto> getAttachment(hash<auto> att, *hash<auto> hdr);
153 public:
154
155
157 protected:
158 abstract messageReceived(hash<auto> msg);
159 public:
160};
161};
GmailDataProvider::GmailMessageWatchDataProviderBase
The parent class for Gmail REST APIs.
Definition GmailMessageWatchDataProviderBase.qc.dox.h:28
GmailDataProvider::GmailMessageWatchDataProviderBase::start_date
date start_date
Start date for scan.
Definition GmailMessageWatchDataProviderBase.qc.dox.h:68
GmailDataProvider::GmailMessageWatchDataProviderBase::getAttachment
hash< auto > getAttachment(hash< auto > att, *hash< auto > hdr)
Returns attachment data.
GmailDataProvider::GmailMessageWatchDataProviderBase::messageReceived
abstract messageReceived(hash< auto > msg)
Raise events.
GmailDataProvider::GmailMessageWatchDataProviderBase::processBody
processBody(*reference< hash< auto > > msg)
Process body.
GmailDataProvider::GmailMessageWatchDataProviderBase::constructor
constructor(GoogleRestClient::GoogleRestClient rest, hash< string, hash< DataProviderOptionInfo > > constructor_options, *hash< auto > options)
Creates the object from a REST connection.
GmailDataProvider::GmailMessageWatchDataProviderBase::poll_secs
int poll_secs
Poll interval in seconds.
Definition GmailMessageWatchDataProviderBase.qc.dox.h:59
GmailDataProvider::GmailMessageWatchDataProviderBase::processHeaders
processHeaders(*reference< hash< auto > > msg, hash< auto > fields, *hash< auto > pfields)
Process headers and body.
GmailDataProvider::GmailMessageWatchDataProviderBase::delete_messages
bool delete_messages
Delete emails after retreiving.
Definition GmailMessageWatchDataProviderBase.qc.dox.h:65
GmailDataProvider::GmailMessageWatchDataProviderBase::stop
bool stop
I/O stop flag.
Definition GmailMessageWatchDataProviderBase.qc.dox.h:56
GmailDataProvider::GmailMessageWatchDataProviderBase::retrieve_attachments
bool retrieve_attachments
Retrieve attachments.
Definition GmailMessageWatchDataProviderBase.qc.dox.h:62
GmailDataProvider::GmailMessageWatchDataProviderBase::q
string q
Match query.
Definition GmailMessageWatchDataProviderBase.qc.dox.h:71
GmailDataProvider::GmailMessageWatchDataProviderBase::MinPollInterval
const MinPollInterval
Minimum poll interval in seconds.
Definition GmailMessageWatchDataProviderBase.qc.dox.h:36
GmailDataProvider::GmailMessageWatchDataProviderBase::pollThread
pollThread()
I/O polling thread.
GmailDataProvider::GmailMessageWatchDataProviderBase::pollOnce
*hash< auto > pollOnce(reference< hash< auto > > setup)
Perform one poll.
GmailDataProvider::GmailMessageWatchDataProviderBase::processOptions
processOptions(*hash< auto > copts)
Process constructor options.
GmailDataProvider::GmailMessageWatchDataProviderBase::stopIntern
stopIntern()
Stops polling.
GmailDataProvider::GmailMessageWatchDataProviderBase::stopEvents
stopEvents()
Called to stop generating events.
GmailDataProvider::GmailMessageWatchDataProviderBase::observersReady
observersReady()
Called when all observers have been added to the object.
GmailDataProvider::GmailMessageWatchDataProviderBase::destructor
destructor()
Stops observing and deletes the object.
GmailDataProvider::GmailMessageWatchDataProviderBase::getHeaderValue
static auto getHeaderValue(string val)
Get header value.
GmailDataProvider::GmailMessageWatchDataProviderBase::setup
hash< auto > setup()
Setup for a poll operation.
GmailDataProvider::GmailMessageWatchDataProviderBase::MonthMap
const MonthMap
For parsing months.
Definition GmailMessageWatchDataProviderBase.qc.dox.h:39
GmailDataProvider::GmailMessageWatchDataProviderBase::getHeaderValue
static auto getHeaderValue(string val, hash< auto > f)
Get header value.
GmailDataProvider::GmailMessageWatchDataProviderBase::waiting
int waiting
Number of threads waiting on the I/O condition.
Definition GmailMessageWatchDataProviderBase.qc.dox.h:50
GmailDataProvider::GmailMessageWatchDataProviderBase::ConstructorOptions
const ConstructorOptions
Constructor options.
Definition GmailMessageWatchDataProviderBase.qc.dox.h:32
GmailDataProvider::GmailMessageWatchDataProviderBase::cond
Condition cond()
I/O Condition.
GmailDataProvider::GmailMessageWatchDataProviderBase::io_tid
int io_tid
I/O TID.
Definition GmailMessageWatchDataProviderBase.qc.dox.h:53
GmailDataProvider
Qore GmailDataProvider module definition.
Definition GmailAttachmentWatchDataProvider.qc.dox.h:26