File: mb_util.h

package info (click to toggle)
maildir-bulletin 0.66
  • links: PTS
  • area: main
  • in suites: woody
  • size: 160 kB
  • ctags: 50
  • sloc: cpp: 734; sh: 157; makefile: 73
file content (34 lines) | stat: -rw-r--r-- 659 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef MB_UTIL_H
#define MB_UTIL_H

#include "maildir-bulletin.h"

#include <stdio.h>

struct tm;

class mb_log
{
public:
  mb_log(CPCCHAR logFile, CPCCHAR errFile, struct tm *loc);
  ~mb_log();

  void error(CPCCHAR message, CPCCHAR data = "", CPCCHAR data2 = "", bool serious = true);
  void info(CPCCHAR message, CPCCHAR data = "", CPCCHAR data2 = "");

  void interactive(bool state) { m_interactive = state; }

private:
  void reallog(FILE *fp, CPCCHAR message, CPCCHAR data = "", CPCCHAR data2 = "");

  FILE *m_log;
  FILE *m_errlog;
  struct tm *m_loc;
  bool m_interactive;

  mb_log(const mb_log&);
  mb_log & operator=(const mb_log&);
};


#endif