view include/TaskManager/MailManager.h @ 19:98bb1b2bb71e

*** empty log message ***
author gongo
date Sun, 10 Feb 2008 13:23:29 +0900
parents 2356238ebea7
children 31a7ff27ee20
line wrap: on
line source

#ifndef INCLUDED_MAIL_MANAGER
#define INCLUDED_MAIL_MANAGER

typedef struct mail_queue {
    unsigned int data;
    struct mail_queue *next;
} MailQueue, *MailQueuePtr;

class MailManager {
public:
    /* constructor */
    MailManager(void);

    /* functions */
    int init_pool_mailQueue(int num);
    int extend_pool_mailQueue(int num);
    MailQueuePtr create_mail(unsigned int data);
    MailQueuePtr get_free_mailQueue(unsigned int data);
    void free_mailQueue(MailQueuePtr q);

private:
    /* variables */
    MailQueuePtr mailQueuePool;
    MailQueuePtr freeMailQueue;
};

extern MailQueuePtr append_mailQueue(MailQueuePtr list, MailQueuePtr q);

#endif