comparison mcabber/src/hbuf.h @ 1602:f4a2c6f767d1

Message Receipts support (XEP-0184)
author franky
date Wed, 24 Sep 2008 11:41:29 +0200
parents 0121b6f3047c
children
comparison
equal deleted inserted replaced
1601:3efc92a48945 1602:f4a2c6f767d1
26 #define HBB_PREFIX_NONE (1U<<9) 26 #define HBB_PREFIX_NONE (1U<<9)
27 #define HBB_PREFIX_SPECIAL (1U<<10) 27 #define HBB_PREFIX_SPECIAL (1U<<10)
28 #define HBB_PREFIX_PGPCRYPT (1U<<11) 28 #define HBB_PREFIX_PGPCRYPT (1U<<11)
29 #define HBB_PREFIX_OTRCRYPT (1U<<12) 29 #define HBB_PREFIX_OTRCRYPT (1U<<12)
30 #define HBB_PREFIX_CONT (1U<<13) 30 #define HBB_PREFIX_CONT (1U<<13)
31 #define HBB_PREFIX_RECEIPT (1U<<14)
31 32
32 typedef struct { 33 typedef struct {
33 time_t timestamp; 34 time_t timestamp;
34 guint flags; 35 guint flags;
35 unsigned mucnicklen; 36 unsigned mucnicklen;
36 char *text; 37 char *text;
37 } hbb_line; 38 } hbb_line;
38 39
39 void hbuf_add_line(GList **p_hbuf, const char *text, time_t timestamp, 40 void hbuf_add_line(GList **p_hbuf, const char *text, time_t timestamp,
40 guint prefix_flags, guint width, guint maxhbufblocks, 41 guint prefix_flags, guint width, guint maxhbufblocks,
41 unsigned mucnicklen); 42 unsigned mucnicklen, gpointer xep184);
42 void hbuf_free(GList **p_hbuf); 43 void hbuf_free(GList **p_hbuf);
43 void hbuf_rebuild(GList **p_hbuf, unsigned int width); 44 void hbuf_rebuild(GList **p_hbuf, unsigned int width);
44 GList *hbuf_previous_persistent(GList *l_line); 45 GList *hbuf_previous_persistent(GList *l_line);
45 46
46 hbb_line **hbuf_get_lines(GList *hbuf, unsigned int n); 47 hbb_line **hbuf_get_lines(GList *hbuf, unsigned int n);
47 GList *hbuf_search(GList *hbuf, int direction, const char *string); 48 GList *hbuf_search(GList *hbuf, int direction, const char *string);
48 GList *hbuf_jump_date(GList *hbuf, time_t t); 49 GList *hbuf_jump_date(GList *hbuf, time_t t);
49 GList *hbuf_jump_percent(GList *hbuf, int pc); 50 GList *hbuf_jump_percent(GList *hbuf, int pc);
51 gboolean hbuf_remove_receipt(GList *hbuf, gpointer xep184);
50 52
51 void hbuf_dump_to_file(GList *hbuf, const char *filename); 53 void hbuf_dump_to_file(GList *hbuf, const char *filename);
52 54
53 guint hbuf_get_blocks_number(GList *p_hbuf); 55 guint hbuf_get_blocks_number(GList *p_hbuf);
54 56