3
|
1 #ifndef INCLUDED_MAIL_MANAGER
|
|
2 #define INCLUDED_MAIL_MANAGER
|
|
3
|
|
4 typedef struct mail_queue {
|
|
5 unsigned int data;
|
|
6 struct mail_queue *next;
|
|
7 } MailQueue, *MailQueuePtr;
|
|
8
|
|
9 class MailManager {
|
|
10 public:
|
19
|
11 /* constructor */
|
|
12 MailManager(void);
|
|
13
|
3
|
14 /* functions */
|
|
15 int init_pool_mailQueue(int num);
|
|
16 int extend_pool_mailQueue(int num);
|
|
17 MailQueuePtr create_mail(unsigned int data);
|
|
18 MailQueuePtr get_free_mailQueue(unsigned int data);
|
|
19 void free_mailQueue(MailQueuePtr q);
|
|
20
|
|
21 private:
|
|
22 /* variables */
|
|
23 MailQueuePtr mailQueuePool;
|
|
24 MailQueuePtr freeMailQueue;
|
|
25 };
|
|
26
|
|
27 extern MailQueuePtr append_mailQueue(MailQueuePtr list, MailQueuePtr q);
|
|
28
|
|
29 #endif
|