Changed the mapping of the not available state on MSN
[centerim.git] / src / icqhist.h
blobe854d50cfe90a6700aae5004d47923d58b6bafd4
1 #ifndef __ICQHIST_H__
2 #define __ICQHIST_H__
4 #include "kkstrtext.h"
5 #include "cmenus.h"
7 #include "icqcommon.h"
8 #include "imcontact.h"
10 #define HIST_MSG_OUT 2
11 #define HIST_MSG_IN 4
12 #define HIST_HISTORYMODE 8
14 #define EVT_MSG 0
15 #define EVT_URL 1
16 #define EVT_CHAT 3
17 #define EVT_EMAIL 4
18 #define EVT_ONLINE 6
20 #define ICQM_REQUEST 'R'
21 #define ICQM_ADDED 'I'
23 class icqhistory {
24 protected:
25 class histentry { public:
26 string text;
27 int lastread, color;
28 }; // for fillmenu
30 class storedopen {
31 public:
32 storedopen(FILE *nf) { f = nf; rn = 0; }
33 FILE *f;
34 int rn;
35 vector<string> lastevent;
38 FILE *open(const imcontact cinfo, const char *mode);
39 vector<storedopen> opens;
41 public:
42 icqhistory();
43 ~icqhistory();
45 void putmessage(const imcontact cinfo, const string text, int dir, struct tm *timestamp);
46 void puturl(const imcontact cinfo, const string url, const string desc, int dir, struct tm *timestamp);
47 void putfile(const imcontact cinfo, unsigned long seq, const string fname, int fsize, int dir, struct tm *timestamp);
48 void putmail(const string nick, const string email, const string msg, int mailt, struct tm *timestamp);
50 bool opencontact(const imcontact cinfo, time_t lastread = 0);
51 int setpos(int n);
52 int setposlastread(time_t lr);
53 int find(const string sub, int pos = 0);
54 int readevent(int &event, time_t &lastread, struct tm &sent, int &dir);
55 void getmessage(string &text);
56 void geturl(string &url, string &text);
57 void getfile(unsigned long &seq, string &fname, int &fsize);
58 void closecontact();
60 int getpos();
62 void fillmenu(const imcontact cinfo, verticalmenu *m);
65 extern icqhistory hist;
67 #endif