Loading...
Searching...
No Matches
GmailMessageWatchDataProviderBase.qc.dox.h
// -*- mode: c++; indent-tabs-mode: nil -*-
namespace GmailDataProvider {
class GmailMessageWatchDataProviderBase : public GoogleDataProvider::GoogleDataProviderBase, public DataProvider::DelayedObservable {
public:
const ConstructorOptions = ...;
const MinPollInterval = 30;
const MonthMap = ...;
protected:
// I/O lock
Mutex lck();
Condition cond();
int waiting;
int io_tid;
bool stop;
int poll_secs;
bool retrieve_attachments;
bool delete_messages;
date start_date;
string q;
public:
constructor(GoogleRestClient::GoogleRestClient rest, hash<string, hash<DataProviderOptionInfo>> constructor_options, *hash<auto> options)
;
destructor();
observersReady();
stopEvents();
protected:
stopIntern();
public:
protected:
processOptions(*hash<auto> copts);
public:
protected:
pollThread();
public:
protected:
hash<auto> setup();
public:
protected:
*hash<auto> pollOnce(reference<hash<auto>> setup);
public:
protected:
processHeaders(*reference<hash<auto>> msg, hash<auto> fields, *hash<auto> pfields);
public:
protected:
processBody(*reference<hash<auto>> msg);
public:
protected:
static auto getHeaderValue(string val, hash<auto> f);
public:
protected:
static auto getHeaderValue(string val);
public:
protected:
hash<auto> getAttachment(hash<auto> att, *hash<auto> hdr);
public:
protected:
abstract messageReceived(hash<auto> msg);
public:
};
};
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