-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathQueueManager.h
More file actions
executable file
·56 lines (43 loc) · 1.66 KB
/
Copy pathQueueManager.h
File metadata and controls
executable file
·56 lines (43 loc) · 1.66 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
/***************************************************************************
* Copyright (C) 2003 by eddiedu *
* eddiedu@scale.com.br *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
***************************************************************************/
#ifndef _QUEUEMANAGER_HEADER
#define _QUEUEMANAGER_HEADER
#include "global.h"
#include "Pointer.h"
#include "Mutex.h"
#include "Thread.h"
#include "Mailer.h"
#include <map>
class QueueManager : public Thread {
public:
QueueManager();
~QueueManager();
vector<Address> getEmails();
void includePeca(Peca& peca);
void cancelPeca(Peca& peca);
void pause();
void resume();
private:
virtual void* Run(void* param);
static bool returnQueue(const char* email);
bool returnQueue();
void statsInsert(const char* email, int code);
static void statsInsert(const char* email, int code, const std::string& m, int peca, int campanha);
void eraseQueue(const char* email);
static void eraseQueue(const char* email, int id_peca, int id_campanha);
void* tratarErros(ResultMessage& em, int id_peca, int id_campanha);
void build_mx_servers();
Debug *debug;
Database database;
multimap<string /*domain*/, struct mx> servidoresMX;
map<string, Mailer*> mailers;
vector<Peca> pecas;
};
#endif