aboutsummaryrefslogtreecommitdiffstats
path: root/doc/api-ref/html/soundmanager_8h.html
blob: 27187c7ef48577dd4e25b6deae657f675e83327a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Sound Manager: /home/mitsunari/work/gerrit/agl-src/agl-service-soundmanager-2017/src/soundmanager.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Sound Manager
   &#160;<span id="projectnumber">0.3</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">soundmanager.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Sound Manager API.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;afb/afb-binding.h&gt;</code><br />
<code>#include &quot;dbus/audio_manager_interface.h&quot;</code><br />
</div>
<p><a href="soundmanager_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structevent.html">event</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a369266c24eacffb87046522897a570d5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a369266c24eacffb87046522897a570d5"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>_GNU_SOURCE</b></td></tr>
<tr class="separator:a369266c24eacffb87046522897a570d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad2c1fbc92ba364fcf83f15e6d0af66f0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad2c1fbc92ba364fcf83f15e6d0af66f0"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>AFB_BINDING_VERSION</b>&#160;&#160;&#160;2</td></tr>
<tr class="separator:ad2c1fbc92ba364fcf83f15e6d0af66f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a7ee1dc75adf60b3c8103eb2952e9d43a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="soundmanager_8h.html#a7ee1dc75adf60b3c8103eb2952e9d43a">connect</a> (struct afb_req request)</td></tr>
<tr class="separator:a7ee1dc75adf60b3c8103eb2952e9d43a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1163f003156022724b3b63b6ee2a22a9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="soundmanager_8h.html#a1163f003156022724b3b63b6ee2a22a9">disconnect</a> (struct afb_req request)</td></tr>
<tr class="separator:a1163f003156022724b3b63b6ee2a22a9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a46e6977f600ea8966d9564c73d5af1b8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="soundmanager_8h.html#a46e6977f600ea8966d9564c73d5af1b8">setVolume</a> (struct afb_req request)</td></tr>
<tr class="separator:a46e6977f600ea8966d9564c73d5af1b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aac0462f29094b70d2f5313ecef5f822c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="soundmanager_8h.html#aac0462f29094b70d2f5313ecef5f822c">volumeStep</a> (struct afb_req request)</td></tr>
<tr class="separator:aac0462f29094b70d2f5313ecef5f822c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2c805469264f9acca25fc743bb1d8766"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="soundmanager_8h.html#a2c805469264f9acca25fc743bb1d8766">setSinkMuteState</a> (struct afb_req request)</td></tr>
<tr class="separator:a2c805469264f9acca25fc743bb1d8766"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3ad86d9e9c674a5175592f6fc8609180"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="soundmanager_8h.html#a3ad86d9e9c674a5175592f6fc8609180">getListMainConnections</a> (struct afb_req request)</td></tr>
<tr class="separator:a3ad86d9e9c674a5175592f6fc8609180"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3ea295d5eddd5374d8e14a4b644bef2a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="soundmanager_8h.html#a3ea295d5eddd5374d8e14a4b644bef2a">getListMainSources</a> (struct afb_req request)</td></tr>
<tr class="separator:a3ea295d5eddd5374d8e14a4b644bef2a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa64808b1a049f3b51e69d28354584970"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="soundmanager_8h.html#aa64808b1a049f3b51e69d28354584970">getListMainSinks</a> (struct afb_req request)</td></tr>
<tr class="separator:aa64808b1a049f3b51e69d28354584970"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a78d54418197fb8e8eabfc38ce72b4686"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="soundmanager_8h.html#a78d54418197fb8e8eabfc38ce72b4686">ackConnect</a> (struct afb_req request)</td></tr>
<tr class="separator:a78d54418197fb8e8eabfc38ce72b4686"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a00a381a9071af396dae663d9f562864a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="soundmanager_8h.html#a00a381a9071af396dae663d9f562864a">ackDisconnect</a> (struct afb_req request)</td></tr>
<tr class="separator:a00a381a9071af396dae663d9f562864a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab2c237e1ace8880ff529cb741972a52d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="soundmanager_8h.html#ab2c237e1ace8880ff529cb741972a52d">ackSetSourceState</a> (struct afb_req request)</td></tr>
<tr class="separator:ab2c237e1ace8880ff529cb741972a52d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a42998e5cc065baf3b80177d9501ca40f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="soundmanager_8h.html#a42998e5cc065baf3b80177d9501ca40f">registerSource</a> (struct afb_req request)</td></tr>
<tr class="separator:a42998e5cc065baf3b80177d9501ca40f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7d6b772364b9ccd4b4f5c0a124f30901"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="soundmanager_8h.html#a7d6b772364b9ccd4b4f5c0a124f30901">deregisterSource</a> (struct afb_req request)</td></tr>
<tr class="separator:a7d6b772364b9ccd4b4f5c0a124f30901"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae65575dec31b2cda45bf5ad147b0f56c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="soundmanager_8h.html#ae65575dec31b2cda45bf5ad147b0f56c">subscribe</a> (struct afb_req request)</td></tr>
<tr class="separator:ae65575dec31b2cda45bf5ad147b0f56c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab7f3bbf32f0b968deca03b2f05bd6e9f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="soundmanager_8h.html#ab7f3bbf32f0b968deca03b2f05bd6e9f">unsubscribe</a> (struct afb_req request)</td></tr>
<tr class="separator:ab7f3bbf32f0b968deca03b2f05bd6e9f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2faf87479e039a21c0030f4b4108266f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="soundmanager_8h.html#a2faf87479e039a21c0030f4b4108266f">streamOpen</a> (struct afb_req req)</td></tr>
<tr class="separator:a2faf87479e039a21c0030f4b4108266f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abe001967a59ef3a10d048f570876b336"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="soundmanager_8h.html#abe001967a59ef3a10d048f570876b336">streamClose</a> (struct afb_req req)</td></tr>
<tr class="separator:abe001967a59ef3a10d048f570876b336"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af7d1de5a540b5c89edfa74a7004d8f14"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="soundmanager_8h.html#af7d1de5a540b5c89edfa74a7004d8f14">setStreamState</a> (struct afb_req req)</td></tr>
<tr class="separator:af7d1de5a540b5c89edfa74a7004d8f14"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a197d8ba38f162007786d35c136cb56d9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a197d8ba38f162007786d35c136cb56d9"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>preinit</b> ()</td></tr>
<tr class="separator:a197d8ba38f162007786d35c136cb56d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a27b95a685b0dbc959a19a1529ba4d2dc"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a27b95a685b0dbc959a19a1529ba4d2dc"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>sm_init</b> ()</td></tr>
<tr class="separator:a27b95a685b0dbc959a19a1529ba4d2dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9596666d6975a4cb05925b42067528a4"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9596666d6975a4cb05925b42067528a4"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>onevent</b> (const char *<a class="el" href="structevent.html">event</a>, struct json_object *object)</td></tr>
<tr class="separator:a9596666d6975a4cb05925b42067528a4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a35eae05a326149cb3cffbbbcfe88512c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a35eae05a326149cb3cffbbbcfe88512c"></a>
const struct afb_verb_v2&#160;</td><td class="memItemRight" valign="bottom"><b>binding_verbs</b> []</td></tr>
<tr class="separator:a35eae05a326149cb3cffbbbcfe88512c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae2a62ab481a2922cbfc788193857a12e"><td class="memItemLeft" align="right" valign="top">const struct afb_binding_v2&#160;</td><td class="memItemRight" valign="bottom"><b>afbBindingV2</b></td></tr>
<tr class="separator:ae2a62ab481a2922cbfc788193857a12e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Sound Manager API. </p>

<p>Definition in file <a class="el" href="soundmanager_8h_source.html">soundmanager.h</a>.</p>
</div><h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a78d54418197fb8e8eabfc38ce72b4686"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ackConnect </td>
          <td>(</td>
          <td class="paramtype">struct afb_req&#160;</td>
          <td class="paramname"><em>request</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call "ackConnect" function of Audio Manager. Return acknowledge of connect against asyncConnect</p>
<h4>Parameters</h4>
<ul>
<li>handle : Handle id when you get on asyncConnect</li>
<li>connectionID : connection id when you got on connect return value</li>
<li>error : Error Number you would like to send. If error is 0, it means OK. If an application has some error, send error number in function then AM release resources the application got in connect.</li>
</ul>
<h4>Return</h4>
<ul>
<li>error : Error status number. If error is 0, it means the request is accepted, otherwise error message is attached with error code in reply message. Even if there is no connection list, Sound Manager return success. So you should check the contents size of return json object</li>
</ul>
<h4>Note</h4>

</div>
</div>
<a class="anchor" id="a00a381a9071af396dae663d9f562864a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ackDisconnect </td>
          <td>(</td>
          <td class="paramtype">struct afb_req&#160;</td>
          <td class="paramname"><em>request</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call "ackDisconnect" function of Audio Manager. Return acknowledge of disconnect against asyncDisconnect</p>
<h4>Parameters</h4>
<ul>
<li>handle : Handle id when you get on asyncDisconnect</li>
<li>connectionID : connection id when you got on connect return value</li>
<li>error : Error Number you would like to send. If error is 0, it means OK. If an application has some error, send error number in function then AM</li>
</ul>
<h4>Return</h4>
<ul>
<li>error : Error status number. If error is 0, it means the request is accepted, otherwise error message is attached with error code in reply message. Even if there is no connection list, Sound Manager return success. So you should check the contents size of return json object</li>
</ul>
<h4>Note</h4>

</div>
</div>
<a class="anchor" id="ab2c237e1ace8880ff529cb741972a52d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ackSetSourceState </td>
          <td>(</td>
          <td class="paramtype">struct afb_req&#160;</td>
          <td class="paramname"><em>request</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call "ackSetSourceState" function of Audio Manager. Return acknowledge of setSourceState against asyncSetSourceState.</p>
<h4>Parameters</h4>
<ul>
<li>handle : Handle id when you get on asyncSetSourceState</li>
<li>error : Error Number you would like to send. If error is 0, it means OK. If an application has some errors, send error number in function</li>
</ul>
<h4>Return</h4>
<ul>
<li>error : Error status number. If error is 0, it means the request is accepted, otherwise error message is attached with error code in reply message.</li>
</ul>
<h4>Note</h4>
<p>This function is very important for applications to realise the sequence of Audio Management. An Application which matches with sourceID in the parameter of asyncSetSourceState has to return ack to use this function </p>

</div>
</div>
<a class="anchor" id="a7ee1dc75adf60b3c8103eb2952e9d43a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void connect </td>
          <td>(</td>
          <td class="paramtype">struct afb_req&#160;</td>
          <td class="paramname"><em>request</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call "connect" function of Audio Manager. Getting resource right to output audio stream. Please input following keys with value into json string object in argument. In case of using libsoundmanager, json_object *jobj = json_object_new_object(); json_object_object_add(jobj, "sourceID", json_object_new_int(100)); json_object_object_add(jobj, "sinkID", json_object_new_int(100)); call("connect", jobj);</p>
<p>The order of arguments is not important.</p>
<h4>Parameters</h4>
<p>Request key</p><ul>
<li>sourceID : Source ID getting in return value in registerSource or appname.</li>
<li>sinkID : Sink ID. This should be more than 0. If no request, defalut value is set by sound manager</li>
</ul>
<p>This will be changed in near future because these arguments should be aliased like sinkID:100 -&gt; sinkID:"speaker"</p>
<p>This will be modified after integrating</p>
<h4>Return</h4>
<ul>
<li>error : Error status number. If error is 0, it means the request is accepted, otherwise error message is attached with error code in reply message.</li>
</ul>
<h4>Note</h4>
<p>sourceID and sinkID should be more than 0 </p>

</div>
</div>
<a class="anchor" id="a7d6b772364b9ccd4b4f5c0a124f30901"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void deregisterSource </td>
          <td>(</td>
          <td class="paramtype">struct afb_req&#160;</td>
          <td class="paramname"><em>request</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call "deregisterSource" function of Audio Manager. Deregister source(application) to Audio Manager Policy Management</p>
<h4>Parameters</h4>
<ul>
<li>sourceID : sourceID returned in resisterSource</li>
</ul>
<h4>Return</h4>
<ul>
<li>error : Error status number. If error is 0, it means the request is accepted, otherwise error message is attached with error code in reply message.</li>
</ul>
<h4>Note</h4>

</div>
</div>
<a class="anchor" id="a1163f003156022724b3b63b6ee2a22a9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void disconnect </td>
          <td>(</td>
          <td class="paramtype">struct afb_req&#160;</td>
          <td class="paramname"><em>request</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call "disconnect" function of Audio Manager. Release resource right to output audio stream.</p>
<h4>Parameters</h4>
<p>Request key</p><ul>
<li>sourceID : Source ID getting in return value in registerSource or appname.</li>
</ul>
<h4>Return</h4>
<ul>
<li>error : Error status number. If error is 0, it means the request is accepted, otherwise error message is attached with error code in reply message.</li>
</ul>
<h4>Note</h4>
<p>sourceID should be more than 0 </p>

</div>
</div>
<a class="anchor" id="a3ad86d9e9c674a5175592f6fc8609180"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void getListMainConnections </td>
          <td>(</td>
          <td class="paramtype">struct afb_req&#160;</td>
          <td class="paramname"><em>request</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call "getListMainConnections" function of Audio Manager. Get mainc connection list</p>
<h4>Parameters</h4>
<p>Request key None</p>
<h4>Return</h4>
<ul>
<li>error : Error status number. If error is 0, it means the request is accepted, otherwise error message is attached with error code in reply message. Even if there is no connection list, Sound Manager return success.</li>
</ul>
<h4>Note</h4>

</div>
</div>
<a class="anchor" id="aa64808b1a049f3b51e69d28354584970"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void getListMainSinks </td>
          <td>(</td>
          <td class="paramtype">struct afb_req&#160;</td>
          <td class="paramname"><em>request</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call "getListMainSinks" function of Audio Manager. Get main sink list</p>
<h4>Parameters</h4>
<p>Request key None</p>
<h4>Return</h4>
<ul>
<li>error : Error status number. If error is 0, it means the request is accepted, otherwise error message is attached with error code in reply message. Even if there is no connection list, Sound Manager return success.</li>
</ul>
<h4>Note</h4>

</div>
</div>
<a class="anchor" id="a3ea295d5eddd5374d8e14a4b644bef2a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void getListMainSources </td>
          <td>(</td>
          <td class="paramtype">struct afb_req&#160;</td>
          <td class="paramname"><em>request</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call "getListMainSources" function of Audio Manager. Get main source list</p>
<h4>Parameters</h4>
<p>Request key None</p>
<h4>Return</h4>
<ul>
<li>error : Error status number. If error is 0, it means the request is accepted, otherwise error message is attached with error code in reply message. Even if there is no connection list, Sound Manager return success.</li>
</ul>
<h4>Note</h4>

</div>
</div>
<a class="anchor" id="a42998e5cc065baf3b80177d9501ca40f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void registerSource </td>
          <td>(</td>
          <td class="paramtype">struct afb_req&#160;</td>
          <td class="paramname"><em>request</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call "registerSource" function of Audio Manager. Register source(application) to Audio Manager Policy Management Application must call this function on its initialization</p>
<h4>Parameters</h4>
<ul>
<li>appname : Application unieque name [Option] It is not necessary to designate following argument, because these are default value is selected y soundmanager If you would like to set value, please input the following key and value<ul>
<li>sourceClassID :</li>
<li>sourceState :</li>
</ul>
</li>
</ul>
<h4>Return</h4>
<ul>
<li>error : Error status number. If error is 0, it means the request is accepted, otherwise error message is attached with error code in reply message.</li>
</ul>
<h4>Note</h4>

</div>
</div>
<a class="anchor" id="a2c805469264f9acca25fc743bb1d8766"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void setSinkMuteState </td>
          <td>(</td>
          <td class="paramtype">struct afb_req&#160;</td>
          <td class="paramname"><em>request</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call "volumeStep" function of Audio Manager. Change volume step of sink</p>
<h4>Parameters</h4>
<p>Request key</p><ul>
<li>sinkID : sinkID you would like to change mute state</li>
<li>muteState : muteState, 1 means mute, 2 means unmute. Or you can designate as "mute" or "unmute"</li>
</ul>
<h4>Return</h4>
<ul>
<li>error : Error status number. If error is 0, it means the request is accepted, otherwise error message is attached with error code in reply message.</li>
</ul>
<h4>Note</h4>

</div>
</div>
<a class="anchor" id="af7d1de5a540b5c89edfa74a7004d8f14"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void setStreamState </td>
          <td>(</td>
          <td class="paramtype">struct afb_req&#160;</td>
          <td class="paramname"><em>req</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Application High Level API for AGL This function set stream state. This function set the availability and calls connect function of Audio Manager and returns the result of policy check.</p>
<h4>Parameters</h4>
<ul>
<li>stream_id : Stream id which is returned in stream_open.</li>
<li>mute : Stream state as int <h4>Return</h4>
</li>
</ul>
<ul>
<li>error : Error status number. If error is 0, it means the request is accepted, otherwise error message is attached with error code in reply message. <h4>Note</h4>
</li>
</ul>
<p>TODO : write note </p>

</div>
</div>
<a class="anchor" id="a46e6977f600ea8966d9564c73d5af1b8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void setVolume </td>
          <td>(</td>
          <td class="paramtype">struct afb_req&#160;</td>
          <td class="paramname"><em>request</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call "setVolume" function of Audio Manager. Set sink volume.</p>
<h4>Parameters</h4>
<p>Request key</p><ul>
<li>volume : volume value. The range of value should be [0-100]</li>
<li>sinkID : sinkID you would like to change volume at</li>
</ul>
<h4>Return</h4>
<ul>
<li>error : Error status number. If error is 0, it means the request is accepted, otherwise error message is attached with error code in reply message.</li>
</ul>
<h4>Note</h4>

</div>
</div>
<a class="anchor" id="abe001967a59ef3a10d048f570876b336"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void streamClose </td>
          <td>(</td>
          <td class="paramtype">struct afb_req&#160;</td>
          <td class="paramname"><em>req</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Application High Level API for AGL This function closes "stream". This function calls disconnect with registered connectionID translated with requested connection_id. If the connection is not created in Sound Manager, Sound Manager just returns with error message.</p>
<h4>Parameters</h4>
<ul>
<li>stream_id : Stream id which is returned in stream_open.</li>
</ul>
<h4>Return</h4>
<ul>
<li>error : Error status number. If error is 0, it means the request is accepted, otherwise error message is attached with error code in reply message. <h4>Note</h4>
</li>
</ul>
<p>TODO : write note </p>

</div>
</div>
<a class="anchor" id="a2faf87479e039a21c0030f4b4108266f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void streamOpen </td>
          <td>(</td>
          <td class="paramtype">struct afb_req&#160;</td>
          <td class="paramname"><em>req</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Application High Level API for AGL This function opens "stream". "stream" means the routing from source to sink. This function calls registerSource and register the endpoint. If the endpoint is not registered in AudioManager, Sound Manager uses default value. audio_role will be translated to "sourceID", and "endpoint_id" will be translated to "sinkID".</p>
<h4>Parameters</h4>
<ul>
<li>audio_role : audio role such like entertainment, emergency. This name is depends on the system architect. The name will be application name or will be the group(role) of application.</li>
<li>endpoint_type: The type of endpoint which means source/sink. As default, Sound Manager uses it as source. sink is not supported for now.</li>
<li>endpoint_id : Same as sinkID in Sound Manager.</li>
</ul>
<h4>Return</h4>
<ul>
<li>error : Error status number. If error is 0, it means the request is accepted, otherwise error message is attached with error code in reply message.</li>
<li>stream_id : Same as sourceID but key is different. This is for AHL. <h4>Note</h4>
</li>
</ul>
<p>TODO : write note </p>

</div>
</div>
<a class="anchor" id="ae65575dec31b2cda45bf5ad147b0f56c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void subscribe </td>
          <td>(</td>
          <td class="paramtype">struct afb_req&#160;</td>
          <td class="paramname"><em>request</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Subscribe event</p>
<h4>Parameters</h4>
<ul>
<li>event : Event name. Event list is written in libsoundmanager.hpp</li>
</ul>
<h4>Return</h4>
<ul>
<li>error : Error status number. If error is 0, it means the request is accepted, otherwise error message is attached with error code in reply message.</li>
</ul>
<h4>Note</h4>

</div>
</div>
<a class="anchor" id="ab7f3bbf32f0b968deca03b2f05bd6e9f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void unsubscribe </td>
          <td>(</td>
          <td class="paramtype">struct afb_req&#160;</td>
          <td class="paramname"><em>request</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Unsubscribe event</p>
<h4>Parameters</h4>
<ul>
<li>event : Event name. Event list is written in libsoundmanager.hpp</li>
</ul>
<h4>Return</h4>
<ul>
<li>error : Error status number. If error is 0, it means the request is accepted, otherwise error message is attached with error code in reply message.</li>
</ul>
<h4>Note</h4>

</div>
</div>
<a class="anchor" id="aac0462f29094b70d2f5313ecef5f822c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void volumeStep </td>
          <td>(</td>
          <td class="paramtype">struct afb_req&#160;</td>
          <td class="paramname"><em>request</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call "volumeStep" function of Audio Manager. Change volume step of sink</p>
<h4>Parameters</h4>
<p>Request key</p><ul>
<li>sinkID : sinkID you would to change volume step</li>
<li>volumeStep : Step size of volume</li>
</ul>
<h4>Return</h4>
<ul>
<li>error : Error status number. If error is 0, it means the request is accepted, otherwise error message is attached with error code in reply message.</li>
</ul>
<h4>Note</h4>

</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a class="anchor" id="ae2a62ab481a2922cbfc788193857a12e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const struct afb_binding_v2 afbBindingV2</td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line">= {</div><div class="line">    .api = <span class="stringliteral">&quot;soundmanager&quot;</span>,</div><div class="line">    .specification = NULL,</div><div class="line">    .verbs = binding_verbs,</div><div class="line">    .preinit = preinit,</div><div class="line">    .init = sm_init,</div><div class="line">    .onevent = onevent</div><div class="line">}</div></div><!-- fragment -->
<p>Definition at line <a class="el" href="soundmanager_8h_source.html#l00431">431</a> of file <a class="el" href="soundmanager_8h_source.html">soundmanager.h</a>.</p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>