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);
|
20
|
13 ~MailManager(void);
|
19
|
14
|
3
|
15 /* functions */
|
|
16 int init_pool_mailQueue(int num);
|
|
17 int extend_pool_mailQueue(int num);
|
|
18 MailQueuePtr create_mail(unsigned int data);
|
|
19 MailQueuePtr get_free_mailQueue(unsigned int data);
|
|
20 void free_mailQueue(MailQueuePtr q);
|
20
|
21 void destroy_mailQueue(void);
|
3
|
22
|
|
23 private:
|
|
24 /* variables */
|
|
25 MailQueuePtr mailQueuePool;
|
|
26 MailQueuePtr freeMailQueue;
|
|
27 };
|
|
28
|
|
29 extern MailQueuePtr append_mailQueue(MailQueuePtr list, MailQueuePtr q);
|
|
30
|
|
31 #endif
|