Mercurial > ~mikael > mcabber > hg
annotate mcabber/src/hbuf.h @ 830:80434fde7cfa
Display presence notification timestamps when they exist
These timestamps were used in the roster, but not in the buffer window
message nor in the history logfile. Reported by "ze".
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Wed, 03 May 2006 11:28:41 +0200 |
parents | b16acadd7d53 |
children | e1b7f71b0b1c |
rev | line source |
---|---|
71 | 1 #ifndef __HBUF_H__ |
2 #define __HBUF_H__ 1 | |
3 | |
184 | 4 #include <time.h> |
71 | 5 #include <glib.h> |
6 | |
106 | 7 // With current implementation a message must fit in a hbuf block, |
8 // so we shouldn't choose a too small size. | |
795
b16acadd7d53
Improve support for long messages
Mikael Berthe <mikael@lilotux.net>
parents:
728
diff
changeset
|
9 #define HBB_BLOCKSIZE 8192 // > 20 please |
71 | 10 |
11 // Flags: | |
12 // - ALLOC: the ptr data has been allocated, it can be freed | |
13 // - PERSISTENT: this is a new history line | |
14 #define HBB_FLAG_ALLOC 1 | |
15 #define HBB_FLAG_PERSISTENT 2 | |
184 | 16 |
17 #define HBB_PREFIX_IN 1 | |
18 #define HBB_PREFIX_OUT 2 | |
19 #define HBB_PREFIX_STATUS 4 | |
20 #define HBB_PREFIX_AUTH 8 | |
21 #define HBB_PREFIX_INFO 16 | |
325
ff6fb51bfd78
Handle "error" message type
Mikael Berthe <mikael@lilotux.net>
parents:
189
diff
changeset
|
22 #define HBB_PREFIX_ERR 32 |
513 | 23 #define HBB_PREFIX_NOFLAG 64 |
728
421b337dc6d2
Chat window: Highlight the flag in our messages
Mikael Berthe <mikael@lilotux.net>
parents:
580
diff
changeset
|
24 #define HBB_PREFIX_HLIGHT 128 |
71 | 25 |
184 | 26 typedef struct { |
27 time_t timestamp; | |
28 guchar flags; | |
29 char *text; | |
30 } hbb_line; | |
31 | |
32 void hbuf_add_line(GList **p_hbuf, const char *text, time_t timestamp, | |
33 guint prefix_flags, guint width); | |
71 | 34 void hbuf_free(GList **p_hbuf); |
35 void hbuf_rebuild(GList **p_hbuf, unsigned int width); | |
189 | 36 GList *hbuf_previous_persistent(GList *l_line); |
71 | 37 |
184 | 38 hbb_line **hbuf_get_lines(GList *hbuf, unsigned int n); |
370
dd9e2eb52916
Add /buffer search_{backward,forward}
Mikael Berthe <mikael@lilotux.net>
parents:
364
diff
changeset
|
39 GList *hbuf_search(GList *hbuf, int direction, const char *string); |
464 | 40 GList *hbuf_jump_date(GList *hbuf, time_t t); |
462 | 41 GList *hbuf_jump_percent(GList *hbuf, int pc); |
71 | 42 |
43 #endif /* __HBUF_H__ */ | |
576 | 44 |
580 | 45 /* vim: set expandtab cindent cinoptions=>2\:2(0: For Vim users... */ |