Mercurial > pidgin
annotate src/mediastreamer/msqueue.h @ 12323:fc464a0abccc
[gaim-migrate @ 14627]
Function prototypes need to be of the form foo(void); instead of foo(); for function that don't take any arguments. This allows the compiler to detect mistakes were someone passes arguments to such a function.
committer: Tailor Script <tailor@pidgin.im>
| author | Richard Laager <rlaager@wiktel.com> |
|---|---|
| date | Sun, 04 Dec 2005 18:19:56 +0000 |
| parents | e67993da8a22 |
| children |
| rev | line source |
|---|---|
| 12024 | 1 /* |
| 2 The mediastreamer library aims at providing modular media processing and I/O | |
| 3 for linphone, but also for any telephony application. | |
| 4 Copyright (C) 2001 Simon MORLAT simon.morlat@linphone.org | |
| 5 | |
| 6 This library is free software; you can redistribute it and/or | |
| 7 modify it under the terms of the GNU Lesser General Public | |
| 8 License as published by the Free Software Foundation; either | |
| 9 version 2.1 of the License, or (at your option) any later version. | |
| 10 | |
| 11 This library is distributed in the hope that it will be useful, | |
| 12 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| 14 Lesser General Public License for more details. | |
| 15 | |
| 16 You should have received a copy of the GNU Lesser General Public | |
| 17 License along with this library; if not, write to the Free Software | |
| 18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 19 */ | |
| 20 | |
| 21 #ifndef MSQUEUE_H | |
| 22 #define MSQUEUE_H | |
| 23 | |
| 24 #include "msbuffer.h" | |
| 25 | |
| 26 /* for the moment these are stupid queues limited to one element*/ | |
| 27 | |
| 28 typedef struct _MSQueue | |
| 29 { | |
| 30 MSMessage *first; | |
| 31 MSMessage *last; | |
| 32 gint size; | |
| 33 void *prev_data; /*user data, usually the writting filter*/ | |
| 34 void *next_data; /* user data, usually the reading filter*/ | |
| 35 }MSQueue; | |
| 36 | |
| 37 | |
|
12323
fc464a0abccc
[gaim-migrate @ 14627]
Richard Laager <rlaager@wiktel.com>
parents:
12024
diff
changeset
|
38 MSQueue * ms_queue_new(void); |
| 12024 | 39 |
| 40 MSMessage *ms_queue_get(MSQueue *q); | |
| 41 | |
| 42 void ms_queue_put(MSQueue *q, MSMessage *m); | |
| 43 | |
| 44 #define ms_queue_can_get(q) ( (q)->size!=0 ) | |
| 45 | |
| 46 #define ms_queue_destroy(q) g_free(q) | |
| 47 | |
| 48 | |
| 49 #endif |
