Project

General

Profile

Statistics
| Revision:

root / trunk / docs / libwireless / group__queue.html @ 52

History | View | Annotate | Download (13.7 KB)

1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3
<title>libwireless: Queue</title>
4
<link href="doxygen.css" rel="stylesheet" type="text/css">
5
<link href="tabs.css" rel="stylesheet" type="text/css">
6
</head><body>
7
<!-- Generated by Doxygen 1.4.6 -->
8
<div class="tabs">
9
  <ul>
10
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
11
    <li><a href="modules.html"><span>Modules</span></a></li>
12
    <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
13
    <li><a href="files.html"><span>Files</span></a></li>
14
  </ul></div>
15
<h1>Queue</h1>A queue implementation.  
16
<a href="#_details">More...</a><table border="0" cellpadding="0" cellspacing="0">
17
<tr><td></td></tr>
18
<tr><td colspan="2"><br><h2>Data Structures</h2></td></tr>
19
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structQueue.html">Queue</a></td></tr>
20

    
21
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structQueue.html">Queue</a></td></tr>
22

    
23
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
24
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structQueue.html">Queue</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__queue.html#gd79af6a8d562cb911d93f35b8825e148">queue_create</a> (void)</td></tr>
25

    
26
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create a new queue.  <a href="#gd79af6a8d562cb911d93f35b8825e148"></a><br></td></tr>
27
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__queue.html#gd21ee75924298937673e2b8d66665466">queue_destroy</a> (<a class="el" href="structQueue.html">Queue</a> *q)</td></tr>
28

    
29
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destroy a queue.  <a href="#gd21ee75924298937673e2b8d66665466"></a><br></td></tr>
30
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__queue.html#gcdb01f4d0c861c4981829920d3973b77">queue_add</a> (<a class="el" href="structQueue.html">Queue</a> *q, void *item)</td></tr>
31

    
32
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add an element to a queue.  <a href="#gcdb01f4d0c861c4981829920d3973b77"></a><br></td></tr>
33
<tr><td class="memItemLeft" nowrap align="right" valign="top">void *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__queue.html#gef91e5f119b77101f6c2e23eb1803059">queue_remove</a> (<a class="el" href="structQueue.html">Queue</a> *q)</td></tr>
34

    
35
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Remove an element from a queue.  <a href="#gef91e5f119b77101f6c2e23eb1803059"></a><br></td></tr>
36
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__queue.html#gbfe7f6f65eaffa1ee166811f259807e4">queue_remove_all</a> (<a class="el" href="structQueue.html">Queue</a> *q, void *item)</td></tr>
37

    
38
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Remove all instances of a given element from a queue.  <a href="#gbfe7f6f65eaffa1ee166811f259807e4"></a><br></td></tr>
39
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__queue.html#g97ae0b085c41d49c8a24e1e506967f9b">queue_size</a> (<a class="el" href="structQueue.html">Queue</a> *q)</td></tr>
40

    
41
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the size of a queue.  <a href="#g97ae0b085c41d49c8a24e1e506967f9b"></a><br></td></tr>
42
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__queue.html#ga67a7f9940e9bbf21320a6f41e60998e">queue_is_empty</a> (<a class="el" href="structQueue.html">Queue</a> *q)</td></tr>
43

    
44
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Check if the queue is empty.  <a href="#ga67a7f9940e9bbf21320a6f41e60998e"></a><br></td></tr>
45
</table>
46
<hr><a name="_details"></a><h2>Detailed Description</h2>
47
A queue implementation. 
48
<p>
49
A queue implementation. <hr><h2>Function Documentation</h2>
50
<a class="anchor" name="gcdb01f4d0c861c4981829920d3973b77"></a><!-- doxytag: member="queue.h::queue_add" ref="gcdb01f4d0c861c4981829920d3973b77" args="(Queue *q, void *item)" --><p>
51
<table class="mdTable" cellpadding="2" cellspacing="0">
52
  <tr>
53
    <td class="mdRow">
54
      <table cellpadding="0" cellspacing="0" border="0">
55
        <tr>
56
          <td class="md" nowrap valign="top">void queue_add           </td>
57
          <td class="md" valign="top">(&nbsp;</td>
58
          <td class="md" nowrap valign="top"><a class="el" href="structQueue.html">Queue</a> *&nbsp;</td>
59
          <td class="mdname" nowrap> <em>q</em>, </td>
60
        </tr>
61
        <tr>
62
          <td class="md" nowrap align="right"></td>
63
          <td class="md"></td>
64
          <td class="md" nowrap>void *&nbsp;</td>
65
          <td class="mdname" nowrap> <em>item</em></td>
66
        </tr>
67
        <tr>
68
          <td class="md"></td>
69
          <td class="md">)&nbsp;</td>
70
          <td class="md" colspan="2"></td>
71
        </tr>
72
      </table>
73
    </td>
74
  </tr>
75
</table>
76
<table cellspacing="5" cellpadding="0" border="0">
77
  <tr>
78
    <td>
79
      &nbsp;
80
    </td>
81
    <td>
82

    
83
<p>
84
Add an element to a queue. 
85
<p>
86
Add an element to a queue.<p>
87
<dl compact><dt><b>Parameters:</b></dt><dd>
88
  <table border="0" cellspacing="2" cellpadding="0">
89
    <tr><td valign="top"></td><td valign="top"><em>q</em>&nbsp;</td><td>the queue to add an element to </td></tr>
90
    <tr><td valign="top"></td><td valign="top"><em>item</em>&nbsp;</td><td>the item to add to the queue </td></tr>
91
  </table>
92
</dl>
93
    </td>
94
  </tr>
95
</table>
96
<a class="anchor" name="gd79af6a8d562cb911d93f35b8825e148"></a><!-- doxytag: member="queue.h::queue_create" ref="gd79af6a8d562cb911d93f35b8825e148" args="(void)" --><p>
97
<table class="mdTable" cellpadding="2" cellspacing="0">
98
  <tr>
99
    <td class="mdRow">
100
      <table cellpadding="0" cellspacing="0" border="0">
101
        <tr>
102
          <td class="md" nowrap valign="top"><a class="el" href="structQueue.html">Queue</a>* queue_create           </td>
103
          <td class="md" valign="top">(&nbsp;</td>
104
          <td class="md" nowrap valign="top">void&nbsp;</td>
105
          <td class="mdname1" valign="top" nowrap>          </td>
106
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
107
          <td class="md" nowrap></td>
108
        </tr>
109
      </table>
110
    </td>
111
  </tr>
112
</table>
113
<table cellspacing="5" cellpadding="0" border="0">
114
  <tr>
115
    <td>
116
      &nbsp;
117
    </td>
118
    <td>
119

    
120
<p>
121
Create a new queue. 
122
<p>
123
Create a queue.<p>
124
<dl compact><dt><b>Returns:</b></dt><dd>the newly created queue. </dd></dl>
125
    </td>
126
  </tr>
127
</table>
128
<a class="anchor" name="gd21ee75924298937673e2b8d66665466"></a><!-- doxytag: member="queue.h::queue_destroy" ref="gd21ee75924298937673e2b8d66665466" args="(Queue *q)" --><p>
129
<table class="mdTable" cellpadding="2" cellspacing="0">
130
  <tr>
131
    <td class="mdRow">
132
      <table cellpadding="0" cellspacing="0" border="0">
133
        <tr>
134
          <td class="md" nowrap valign="top">void queue_destroy           </td>
135
          <td class="md" valign="top">(&nbsp;</td>
136
          <td class="md" nowrap valign="top"><a class="el" href="structQueue.html">Queue</a> *&nbsp;</td>
137
          <td class="mdname1" valign="top" nowrap> <em>q</em>          </td>
138
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
139
          <td class="md" nowrap></td>
140
        </tr>
141
      </table>
142
    </td>
143
  </tr>
144
</table>
145
<table cellspacing="5" cellpadding="0" border="0">
146
  <tr>
147
    <td>
148
      &nbsp;
149
    </td>
150
    <td>
151

    
152
<p>
153
Destroy a queue. 
154
<p>
155
Destroys a queue, freeing memory.<p>
156
<dl compact><dt><b>Parameters:</b></dt><dd>
157
  <table border="0" cellspacing="2" cellpadding="0">
158
    <tr><td valign="top"></td><td valign="top"><em>q</em>&nbsp;</td><td>the queue to destroy </td></tr>
159
  </table>
160
</dl>
161
    </td>
162
  </tr>
163
</table>
164
<a class="anchor" name="ga67a7f9940e9bbf21320a6f41e60998e"></a><!-- doxytag: member="queue.h::queue_is_empty" ref="ga67a7f9940e9bbf21320a6f41e60998e" args="(Queue *q)" --><p>
165
<table class="mdTable" cellpadding="2" cellspacing="0">
166
  <tr>
167
    <td class="mdRow">
168
      <table cellpadding="0" cellspacing="0" border="0">
169
        <tr>
170
          <td class="md" nowrap valign="top">int queue_is_empty           </td>
171
          <td class="md" valign="top">(&nbsp;</td>
172
          <td class="md" nowrap valign="top"><a class="el" href="structQueue.html">Queue</a> *&nbsp;</td>
173
          <td class="mdname1" valign="top" nowrap> <em>q</em>          </td>
174
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
175
          <td class="md" nowrap></td>
176
        </tr>
177
      </table>
178
    </td>
179
  </tr>
180
</table>
181
<table cellspacing="5" cellpadding="0" border="0">
182
  <tr>
183
    <td>
184
      &nbsp;
185
    </td>
186
    <td>
187

    
188
<p>
189
Check if the queue is empty. 
190
<p>
191
Check if the queue is empty.<p>
192
<dl compact><dt><b>Parameters:</b></dt><dd>
193
  <table border="0" cellspacing="2" cellpadding="0">
194
    <tr><td valign="top"></td><td valign="top"><em>q</em>&nbsp;</td><td>the queue to check </td></tr>
195
  </table>
196
</dl>
197
<dl compact><dt><b>Returns:</b></dt><dd>nonzero if the queue is empty, 0 otherwise </dd></dl>
198
    </td>
199
  </tr>
200
</table>
201
<a class="anchor" name="gef91e5f119b77101f6c2e23eb1803059"></a><!-- doxytag: member="queue.h::queue_remove" ref="gef91e5f119b77101f6c2e23eb1803059" args="(Queue *q)" --><p>
202
<table class="mdTable" cellpadding="2" cellspacing="0">
203
  <tr>
204
    <td class="mdRow">
205
      <table cellpadding="0" cellspacing="0" border="0">
206
        <tr>
207
          <td class="md" nowrap valign="top">void* queue_remove           </td>
208
          <td class="md" valign="top">(&nbsp;</td>
209
          <td class="md" nowrap valign="top"><a class="el" href="structQueue.html">Queue</a> *&nbsp;</td>
210
          <td class="mdname1" valign="top" nowrap> <em>q</em>          </td>
211
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
212
          <td class="md" nowrap></td>
213
        </tr>
214
      </table>
215
    </td>
216
  </tr>
217
</table>
218
<table cellspacing="5" cellpadding="0" border="0">
219
  <tr>
220
    <td>
221
      &nbsp;
222
    </td>
223
    <td>
224

    
225
<p>
226
Remove an element from a queue. 
227
<p>
228
Remove an element from the front of a queue.<p>
229
<dl compact><dt><b>Parameters:</b></dt><dd>
230
  <table border="0" cellspacing="2" cellpadding="0">
231
    <tr><td valign="top"></td><td valign="top"><em>q</em>&nbsp;</td><td>the queue to remove the element from</td></tr>
232
  </table>
233
</dl>
234
<dl compact><dt><b>Returns:</b></dt><dd>the element which was removed </dd></dl>
235
    </td>
236
  </tr>
237
</table>
238
<a class="anchor" name="gbfe7f6f65eaffa1ee166811f259807e4"></a><!-- doxytag: member="queue.h::queue_remove_all" ref="gbfe7f6f65eaffa1ee166811f259807e4" args="(Queue *q, void *item)" --><p>
239
<table class="mdTable" cellpadding="2" cellspacing="0">
240
  <tr>
241
    <td class="mdRow">
242
      <table cellpadding="0" cellspacing="0" border="0">
243
        <tr>
244
          <td class="md" nowrap valign="top">void queue_remove_all           </td>
245
          <td class="md" valign="top">(&nbsp;</td>
246
          <td class="md" nowrap valign="top"><a class="el" href="structQueue.html">Queue</a> *&nbsp;</td>
247
          <td class="mdname" nowrap> <em>q</em>, </td>
248
        </tr>
249
        <tr>
250
          <td class="md" nowrap align="right"></td>
251
          <td class="md"></td>
252
          <td class="md" nowrap>void *&nbsp;</td>
253
          <td class="mdname" nowrap> <em>item</em></td>
254
        </tr>
255
        <tr>
256
          <td class="md"></td>
257
          <td class="md">)&nbsp;</td>
258
          <td class="md" colspan="2"></td>
259
        </tr>
260
      </table>
261
    </td>
262
  </tr>
263
</table>
264
<table cellspacing="5" cellpadding="0" border="0">
265
  <tr>
266
    <td>
267
      &nbsp;
268
    </td>
269
    <td>
270

    
271
<p>
272
Remove all instances of a given element from a queue. 
273
<p>
274
Remove all instances of a given element from a queue.<p>
275
<dl compact><dt><b>Parameters:</b></dt><dd>
276
  <table border="0" cellspacing="2" cellpadding="0">
277
    <tr><td valign="top"></td><td valign="top"><em>q</em>&nbsp;</td><td>the queue to remove the elements from </td></tr>
278
    <tr><td valign="top"></td><td valign="top"><em>item</em>&nbsp;</td><td>the element to remove all instances of </td></tr>
279
  </table>
280
</dl>
281
    </td>
282
  </tr>
283
</table>
284
<a class="anchor" name="g97ae0b085c41d49c8a24e1e506967f9b"></a><!-- doxytag: member="queue.h::queue_size" ref="g97ae0b085c41d49c8a24e1e506967f9b" args="(Queue *q)" --><p>
285
<table class="mdTable" cellpadding="2" cellspacing="0">
286
  <tr>
287
    <td class="mdRow">
288
      <table cellpadding="0" cellspacing="0" border="0">
289
        <tr>
290
          <td class="md" nowrap valign="top">int queue_size           </td>
291
          <td class="md" valign="top">(&nbsp;</td>
292
          <td class="md" nowrap valign="top"><a class="el" href="structQueue.html">Queue</a> *&nbsp;</td>
293
          <td class="mdname1" valign="top" nowrap> <em>q</em>          </td>
294
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
295
          <td class="md" nowrap></td>
296
        </tr>
297
      </table>
298
    </td>
299
  </tr>
300
</table>
301
<table cellspacing="5" cellpadding="0" border="0">
302
  <tr>
303
    <td>
304
      &nbsp;
305
    </td>
306
    <td>
307

    
308
<p>
309
Get the size of a queue. 
310
<p>
311
Get the number of elements in the queue.<p>
312
<dl compact><dt><b>Parameters:</b></dt><dd>
313
  <table border="0" cellspacing="2" cellpadding="0">
314
    <tr><td valign="top"></td><td valign="top"><em>q</em>&nbsp;</td><td>the queue to get the size of </td></tr>
315
  </table>
316
</dl>
317
<dl compact><dt><b>Returns:</b></dt><dd>the size of the queue </dd></dl>
318
    </td>
319
  </tr>
320
</table>
321
<hr size="1"><address style="align: right;"><small>Generated on Fri Sep 21 12:57:06 2007 for libwireless by&nbsp;
322
<a href="http://www.doxygen.org/index.html">
323
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
324
</body>
325
</html>