comparison src/protocols/msn/history.c @ 9198:ab6636c5a136

[gaim-migrate @ 9993] Updated all the copyright headers for all the *.[ch] files -- all 63. No fun, but I receive great satisfaction in knowing that you all have to recompile this, again. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sun, 06 Jun 2004 03:42:55 +0000
parents a7affa2e2986
children a7b2fd5efcf2
comparison
equal deleted inserted replaced
9197:ec417d2f9666 9198:ab6636c5a136
1 /** 1 /**
2 * @file history.c MSN history functions 2 * @file history.c MSN history functions
3 * 3 *
4 * gaim 4 * gaim
5 * 5 *
6 * Copyright (C) 2003, Christian Hammond <chipx86@gnupdate.org> 6 * Gaim is the legal property of its developers, whose names are too numerous
7 * to list here. Please refer to the COPYRIGHT file distributed with this
8 * source distribution.
7 * 9 *
8 * This program is free software; you can redistribute it and/or modify 10 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by 11 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or 12 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version. 13 * (at your option) any later version.
24 26
25 MsnHistory * 27 MsnHistory *
26 msn_history_new(void) 28 msn_history_new(void)
27 { 29 {
28 MsnHistory *history = g_new0(MsnHistory, 1); 30 MsnHistory *history = g_new0(MsnHistory, 1);
29 31
30 history->trId = 1; 32 history->trId = 1;
31 33
32 history->queue = g_queue_new(); 34 history->queue = g_queue_new();
33 35
34 return history; 36 return history;
35 } 37 }
36 38
66 msn_history_add(MsnHistory *history, MsnTransaction *trans) 68 msn_history_add(MsnHistory *history, MsnTransaction *trans)
67 { 69 {
68 GQueue *queue = history->queue; 70 GQueue *queue = history->queue;
69 71
70 trans->trId = history->trId++; 72 trans->trId = history->trId++;
71 73
72 g_queue_push_tail(queue, trans); 74 g_queue_push_tail(queue, trans);
73 75
74 if (queue->length > MSN_HIST_ELEMS) 76 if (queue->length > MSN_HIST_ELEMS)
75 { 77 {
76 trans = g_queue_pop_head(queue); 78 trans = g_queue_pop_head(queue);
77 msn_transaction_destroy(trans); 79 msn_transaction_destroy(trans);
78 } 80 }