Parent Directory | Revision Log
Make sure to close the files again or the daemon will crash on to many open files.
1 | #ifndef __SPOOLER_H__ |
2 | #define __SPOOLER_H__ |
3 | |
4 | #include <string> |
5 | |
6 | |
7 | class Spooler |
8 | { |
9 | public: |
10 | void enqueue(std::string recipient, std::string message); |
11 | std::string dequeue(); |
12 | |
13 | std::string getFilename(); |
14 | private: |
15 | std::string findSpoolFilename(); |
16 | |
17 | void lock(); |
18 | void unlock(); |
19 | |
20 | int lockfd; |
21 | |
22 | std::string filename; |
23 | }; |
24 | #endif // __SPOOLER_H__ |
ViewVC Help | |
Powered by ViewVC 1.1.20 |