view include/TaskManager/MailManager.h @ 354:cfd20d609ace draft

add example/get_segment and change spe/DrawSpan.cpp
author koba
date Wed, 15 Jul 2009 17:39:51 +0900
parents 7927e00fb8e2
children
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);
    ~MailManager(void);

    /* functions */
    int init(int num);
    MailQueuePtr create(unsigned int data);
    void free(MailQueuePtr q);
    static MailQueuePtr append_mailQueue(MailQueuePtr list, MailQueuePtr q);

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

    /* functions */
    int extend_pool(int num);
    void destroy(void);
};

#endif