/
TeamTalkBase.java
775 lines (701 loc) · 35.3 KB
/
TeamTalkBase.java
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
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
/*
* Copyright (c) 2005-2017, BearWare.dk
*
* Contact Information:
*
* Bjoern D. Rasmussen
* Kirketoften 5
* DK-8260 Viby J
* Denmark
* Email: contact@bearware.dk
* Phone: +45 20 20 54 59
* Web: http://www.bearware.dk
*
* This source code is part of the TeamTalk 5 SDK owned by
* BearWare.dk. All copyright statements may not be removed
* or altered from any source distribution. If you use this
* software in a product, an acknowledgment in the product
* documentation is required.
*
*/
package dk.bearware;
import java.util.Vector;
public abstract class TeamTalkBase
{
private long ttInst = 0;
public static native String getVersion();
private native long initTeamTalkPoll();
protected TeamTalkBase(boolean create_instance) {
if(create_instance)
ttInst = initTeamTalkPoll();
}
protected void finalize( ) throws Throwable {
closeTeamTalk(ttInst);
}
private native boolean closeTeamTalk(long lpTTInstance);
public boolean closeTeamTalk() {
return closeTeamTalk(ttInst);
}
private native boolean getMessage(long lpTTInstance,
TTMessage pMsg,
int pnWaitMs);
public boolean getMessage(TTMessage pMsg,
int pnWaitMs) {
return getMessage(ttInst, pMsg, pnWaitMs);
}
private native boolean pumpMessage(long lpTTInstance,
int nClientEvent,
int nIdentifier);
public boolean pumpMessage(int nClientEvent, int nIdentifier) {
return pumpMessage(ttInst, nClientEvent, nIdentifier);
}
private native int getFlags(long lpTTInstance);
public int getFlags() { return getFlags(ttInst); }
public static native boolean setLicenseInformation(String szRegName,
String szRegKey);
public static native boolean getDefaultSoundDevices(IntPtr lpnInputDeviceID,
IntPtr lpnOutputDeviceID);
private static native boolean getSoundDevices(SoundDevice[] lpSoundDevices,
IntPtr lpnHowMany);
public static boolean getSoundDevices(Vector<SoundDevice> lpSoundDevices) {
IntPtr lpnHowMany = new IntPtr();
if(!getSoundDevices(null, lpnHowMany))
return false;
SoundDevice[] devs = new SoundDevice[lpnHowMany.value];
if(getSoundDevices(devs, lpnHowMany))
{
for(int i=0;i<lpnHowMany.value;i++)
lpSoundDevices.add(devs[i]);
}
return true;
}
public static native boolean restartSoundSystem();
public static native long startSoundLoopbackTest(int nInputDeviceID,
int nOutputDeviceID,
int nSampleRate,
int nChannels,
boolean bDuplexMode,
SpeexDSP lpSpeexDSP);
public static native boolean closeSoundLoopbackTest(long lpTTSoundLoop);
private native boolean initSoundInputDevice(long lpTTInstance, int nInputDeviceID);
public boolean initSoundInputDevice(int nInputDeviceID) {
return initSoundInputDevice(ttInst, nInputDeviceID);
}
private native boolean initSoundOutputDevice(long lpTTInstance, int nOutputDeviceID);
public boolean initSoundOutputDevice(int nOutputDeviceID) {
return initSoundOutputDevice(ttInst, nOutputDeviceID);
}
private native boolean initSoundDuplexDevices(long lpTTInstance, int nInputDeviceID, int nOutputDeviceID);
public boolean initSoundDuplexDevices(int nInputDeviceID, int nOutputDeviceID) {
return initSoundDuplexDevices(ttInst, nInputDeviceID, nOutputDeviceID);
}
private native boolean closeSoundInputDevice(long lpTTInstance);
public boolean closeSoundInputDevice() {
return closeSoundInputDevice(ttInst);
}
private native boolean closeSoundOutputDevice(long lpTTInstance);
public boolean closeSoundOutputDevice() {
return closeSoundOutputDevice(ttInst);
}
private native boolean closeSoundDuplexDevices(long lpTTInstance);
public boolean closeSoundDuplexDevices() {
return closeSoundDuplexDevices(ttInst);
}
private native int getSoundInputLevel(long lpTTInstance);
public int getSoundInputLevel() { return getSoundInputLevel(ttInst); }
private native boolean setSoundInputGainLevel(long lpTTInstance, int nLevel);
public boolean setSoundInputGainLevel(int nLevel)
{ return setSoundInputGainLevel(ttInst, nLevel); }
private native int getSoundInputGainLevel(long lpTTInstance);
public int getSoundInputGainLevel() { return getSoundInputGainLevel(ttInst); }
private native boolean setSoundInputPreprocess(long lpTTInstance, SpeexDSP lpSpeexDSP);
public boolean setSoundInputPreprocess(SpeexDSP lpSpeexDSP) {
return setSoundInputPreprocess(ttInst, lpSpeexDSP);
}
private native boolean getSoundInputPreprocess(long lpTTInstance, SpeexDSP lpSpeexDSP);
public boolean getSoundInputPreprocess(SpeexDSP lpSpeexDSP) {
return getSoundInputPreprocess(ttInst, lpSpeexDSP);
}
private native boolean setSoundOutputVolume(long lpTTInstance, int nVolume);
public boolean setSoundOutputVolume(int nVolume)
{ return setSoundOutputVolume(ttInst, nVolume); }
private native int getSoundOutputVolume(long lpTTInstance);
public int getSoundOutputVolume()
{ return getSoundOutputVolume(ttInst); }
private native boolean setSoundOutputMute(long lpTTInstance, boolean bMuteAll);
public boolean setSoundOutputMute(boolean bMuteAll)
{ return setSoundOutputMute(ttInst, bMuteAll); }
private native boolean enable3DSoundPositioning(long lpTTInstance,
boolean bEnable);
public boolean enable3DSoundPositioning(boolean bEnable) {
return enable3DSoundPositioning(ttInst, bEnable);
}
private native boolean autoPositionUsers(long lpTTInstance);
public boolean autoPositionUsers() { return autoPositionUsers(ttInst); }
private native boolean enableAudioBlockEvent(long lpTTInstance, int nUserID,
int nStreamType, boolean bEnable);
public boolean enableAudioBlockEvent(int nUserID, int nStreamType, boolean bEnable)
{ return enableAudioBlockEvent(ttInst, nUserID, nStreamType, bEnable); }
private native boolean enableVoiceTransmission(long lpTTInstance,
boolean bEnable);
public boolean enableVoiceTransmission(boolean bEnable) {
return enableVoiceTransmission(ttInst, bEnable);
}
private native boolean enableVoiceActivation(long lpTTInstance,
boolean bEnable);
public boolean enableVoiceActivation(boolean bEnable)
{ return enableVoiceActivation(ttInst, bEnable); }
private native boolean setVoiceActivationLevel(long lpTTInstance,
int nLevel);
public boolean setVoiceActivationLevel(int nLevel)
{ return setVoiceActivationLevel(ttInst, nLevel); }
private native int getVoiceActivationLevel(long lpTTInstance);
public int getVoiceActivationLevel()
{ return getVoiceActivationLevel(ttInst); }
private native boolean setVoiceActivationStopDelay(long lpTTInstance,
int nDelayMSec);
public boolean setVoiceActivationStopDelay(int nDelayMSec)
{ return setVoiceActivationStopDelay(nDelayMSec); }
private native int getVoiceActivationStopDelay(long lpTTInstance);
public int getVoiceActivationStopDelay()
{ return getVoiceActivationStopDelay(ttInst); }
private native boolean startRecordingMuxedAudioFile(long lpTTInstance,
AudioCodec lpAudioCodec,
String szAudioFileName,
int uAFF);
public boolean startRecordingMuxedAudioFile(AudioCodec lpAudioCodec,
String szAudioFileName,
int uAFF) {
return startRecordingMuxedAudioFile(ttInst, lpAudioCodec, szAudioFileName, uAFF);
}
private native boolean stopRecordingMuxedAudioFile(long lpTTInstance);
public boolean stopRecordingMuxedAudioFile() {
return stopRecordingMuxedAudioFile(ttInst);
}
private native boolean startVideoCaptureTransmission(long lpTTInstance,
VideoCodec lpVideoCodec);
public boolean startVideoCaptureTransmission(VideoCodec lpVideoCodec) {
return startVideoCaptureTransmission(ttInst, lpVideoCodec);
}
private native boolean stopVideoCaptureTransmission(long lpTTInstance);
public boolean stopVideoCaptureTransmission() {
return stopVideoCaptureTransmission(ttInst);
}
private static native boolean getVideoCaptureDevices(VideoCaptureDevice[] lpVideoDevices,
IntPtr lpnHowMany);
public static boolean getVideoCaptureDevices(Vector<VideoCaptureDevice> lpVideoDevices) {
IntPtr lpnHowMany = new IntPtr();
if(!getVideoCaptureDevices(null, lpnHowMany))
return false;
VideoCaptureDevice[] devs = new VideoCaptureDevice[lpnHowMany.value];
if(getVideoCaptureDevices(devs, lpnHowMany))
{
for(int i=0;i<lpnHowMany.value;i++)
lpVideoDevices.add(devs[i]);
}
return true;
}
private native boolean initVideoCaptureDevice(long lpTTInstance, String szDeviceID,
VideoFormat lpVideoFormat);
public boolean initVideoCaptureDevice(String szDeviceID,
VideoFormat lpVideoFormat) {
return initVideoCaptureDevice(ttInst, szDeviceID, lpVideoFormat);
}
private native boolean closeVideoCaptureDevice(long lpTTInstance);
public boolean closeVideoCaptureDevice() {
return closeVideoCaptureDevice(ttInst);
}
private native VideoFrame acquireUserVideoCaptureFrame(long lpTTInstance,
int nUserID);
public VideoFrame acquireUserVideoCaptureFrame(int nUserID) {
return acquireUserVideoCaptureFrame(ttInst, nUserID);
}
/*
private native boolean releaseVideoCaptureFrame(long lpTTInstance,
int nUserID);
public boolean releaseVideoCaptureFrame(int nUserID) {
return releaseVideoCaptureFrame(ttInst, nUserID);
}
*/
private native boolean startStreamingMediaFileToChannel(long lpTTInstance,
String szMediaFilePath,
VideoCodec lpVideoCodec);
public boolean startStreamingMediaFileToChannel(String szMediaFilePath,
VideoCodec lpVideoCodec) {
return startStreamingMediaFileToChannel(ttInst, szMediaFilePath,
lpVideoCodec);
}
private native boolean stopStreamingMediaFileToChannel(long lpTTInstance);
public boolean stopStreamingMediaFileToChannel() {
return stopStreamingMediaFileToChannel(ttInst);
}
public static native boolean getMediaFileInfo(String szMediaFilePath,
MediaFileInfo lpMediaFileInfo);
private native VideoFrame acquireUserMediaVideoFrame(long lpTTInstance,
int nUserID);
public VideoFrame acquireUserMediaVideoFrame(int nUserID) {
return acquireUserMediaVideoFrame(ttInst, nUserID);
}
/*
private native boolean releaseUserMediaVideoFrame(long lpTTInstance,
int nUserID);
public boolean releaseUserMediaVideoFrame(int nUserID) {
return releaseUserMediaVideoFrame(ttInst, nUserID);
}
*/
private native int sendDesktopWindow(long lpTTInstance,
DesktopWindow lpDesktopWindow,
int nConvertBitmap);
public int sendDesktopWindow(DesktopWindow lpDesktopWindow,
int nConvertBitmap) {
return sendDesktopWindow(ttInst, lpDesktopWindow, nConvertBitmap);
}
private native boolean closeDesktopWindow(long lpTTInstance);
public boolean closeDesktopWindow() {
return closeDesktopWindow(ttInst);
}
private native boolean sendDesktopCursorPosition(long lpTTInstance,
int nPosX, int nPosY);
public boolean sendDesktopCursorPosition(int nPosX, int nPosY) {
return sendDesktopCursorPosition(ttInst, nPosX, nPosY);
}
private native boolean sendDesktopInput(long lpTTInstance,
int nUserID,
DesktopInput[] lpDesktopInputs);
public boolean sendDesktopInput(int nUserID,
DesktopInput[] lpDesktopInputs) {
return sendDesktopInput(ttInst, nUserID, lpDesktopInputs);
}
private native DesktopWindow acquireUserDesktopWindow(long lpTTInstance,
int nUserID);
public DesktopWindow acquireUserDesktopWindow(int nUserID) {
return acquireUserDesktopWindow(ttInst, nUserID);
}
private native DesktopWindow acquireUserDesktopWindowEx(long lpTTInstance,
int nUserID,
int nBitmapFormat);
public DesktopWindow acquireUserDesktopWindowEx(int nUserID,
int /*BitmapFormat*/nBitmapFormat) {
return acquireUserDesktopWindowEx(ttInst, nUserID, nBitmapFormat);
}
private native boolean connect(long lpTTInstance,
String szHostAddress,
int nTcpPort,
int nUdpPort,
int nLocalTcpPort,
int nLocalUdpPort,
boolean bEncrypted);
public boolean connect(String szHostAddress,
int nTcpPort,
int nUdpPort,
int nLocalTcpPort,
int nLocalUdpPort,
boolean bEncrypted) {
return (szHostAddress != null) ?
connect(ttInst, szHostAddress, nTcpPort, nUdpPort,
nLocalTcpPort, nLocalUdpPort, bEncrypted) :
false;
}
private native boolean connectSysID(long lpTTInstance,
String szHostAddress,
int nTcpPort,
int nUdpPort,
int nLocalTcpPort,
int nLocalUdpPort,
boolean bEncrypted,
String szSystemID);
public boolean connectSysID(String szHostAddress,
int nTcpPort,
int nUdpPort,
int nLocalTcpPort,
int nLocalUdpPort,
boolean bEncrypted,
String szSystemID) {
return (szHostAddress != null && szSystemID != null) ?
connectSysID(ttInst, szHostAddress, nTcpPort, nUdpPort,
nLocalTcpPort, nLocalUdpPort, bEncrypted, szSystemID) :
false;
}
private native boolean connectEx(long lpTTInstance,
String szHostAddress,
int nTcpPort,
int nUdpPort,
String szBindIPAddr,
int nLocalTcpPort,
int nLocalUdpPort,
boolean bEncrypted);
public boolean connectEx(String szHostAddress,
int nTcpPort,
int nUdpPort,
String szBindIPAddr,
int nLocalTcpPort,
int nLocalUdpPort,
boolean bEncrypted) {
return connectEx(ttInst, szHostAddress, nTcpPort, nUdpPort,
szBindIPAddr, nLocalTcpPort, nLocalUdpPort,
bEncrypted);
}
private native boolean disconnect(long lpTTInstance);
public boolean disconnect() {
return disconnect(ttInst);
}
private native boolean queryMaxPayload(long lpTTInstance, int nUserID);
public boolean queryMaxPayload(int nUserID) {
return queryMaxPayload(ttInst, nUserID);
}
private native boolean getClientStatistics(long lpTTInstance, ClientStatistics lpClientStatistics);
public boolean getClientStatistics(ClientStatistics lpClientStatistics) {
return getClientStatistics(ttInst, lpClientStatistics);
}
private native int doPing(long lpTTInstance);
public int doPing() {
return doPing(ttInst);
}
private native int doLogin(long lpTTInstance,
String szNickname,
String szUsername,
String szPassword);
public int doLogin(String szNickname,
String szUsername,
String szPassword) {
return (szNickname != null && szUsername != null && szPassword != null) ?
doLogin(ttInst, szNickname,
szUsername, szPassword) :
-1;
}
private native int doLoginEx(long lpTTInstance,
String szNickname,
String szUsername,
String szPassword,
String szClientName);
public int doLoginEx(String szNickname,
String szUsername,
String szPassword,
String szClientName) {
return (szNickname != null && szUsername != null && szPassword != null && szClientName != null) ?
doLoginEx(ttInst, szNickname, szUsername, szPassword, szClientName) : -1;
}
private native int doLogout(long lpTTInstance);
public int doLogout() { return doLogout(ttInst); }
private native int doJoinChannel(long lpTTInstance,
Channel lpChannel);
public int doJoinChannel(Channel lpChannel) {
return doJoinChannel(ttInst, lpChannel);
}
private native int doJoinChannelByID(long lpTTInstance,
int nChannelID,
String szPassword);
public int doJoinChannelByID(int nChannelID,
String szPassword) {
return doJoinChannelByID(ttInst, nChannelID, szPassword);
}
private native int doLeaveChannel(long lpTTInstance);
public int doLeaveChannel() {
return doLeaveChannel(ttInst);
}
private native int doChangeNickname(long lpTTInstance,
String szNewNick);
public int doChangeNickname(String szNewNick) {
return doChangeNickname(ttInst, szNewNick);
}
private native int doChangeStatus(long lpTTInstance, int nStatusMode, String szStatusMessage);
public int doChangeStatus(int nStatusMode, String szStatusMessage) {
return doChangeStatus(ttInst, nStatusMode, szStatusMessage);
}
private native int doTextMessage(long lpTTInstance, TextMessage lpTextMessage);
public int doTextMessage(TextMessage lpTextMessage) {
return doTextMessage(ttInst, lpTextMessage);
}
private native int doChannelOp(long lpTTInstance, int nUserID, int nChannelID, boolean bMakeOperator);
public int doChannelOp(int nUserID, int nChannelID, boolean bMakeOperator) {
return doChannelOp(ttInst, nUserID, nChannelID, bMakeOperator);
}
private native int doChannelOpEx(long lpTTInstance, int nUserID, int nChannelID,
String szOpPassword,boolean bMakeOperator);
public int doChannelOpEx(int nUserID, int nChannelID,
String szOpPassword, boolean bMakeOperator) {
return doChannelOpEx(ttInst, nUserID, nChannelID, szOpPassword, bMakeOperator);
}
private native int doKickUser(long lpTTInstance, int nUserID, int nChannelID);
public int doKickUser(int nUserID, int nChannelID) {
return doKickUser(ttInst, nUserID, nChannelID);
}
private native int doSendFile(long lpTTInstance, int nChannelID, String szLocalFilePath);
public int doSendFile(int nChannelID, String szLocalFilePath) {
return doSendFile(ttInst, nChannelID, szLocalFilePath);
}
private native int doRecvFile(long lpTTInstance, int nChannelID, int nFileID,
String szLocalFilePath);
public int doRecvFile(int nChannelID, int nFileID,
String szLocalFilePath) {
return doRecvFile(ttInst, nChannelID, nFileID, szLocalFilePath);
}
private native int doDeleteFile(long lpTTInstance, int nChannelID, int nFileID);
public int doDeleteFile(int nChannelID, int nFileID) {
return doDeleteFile(ttInst, nChannelID, nFileID);
}
private native int doSubscribe(long lpTTInstance, int nUserID, int uSubscriptions);
public int doSubscribe(int nUserID, int uSubscriptions) {
return doSubscribe(ttInst, nUserID, uSubscriptions);
}
private native int doUnsubscribe(long lpTTInstance, int nUserID, int uSubscriptions);
public int doUnsubscribe(int nUserID, int uSubscriptions) {
return doUnsubscribe(ttInst, nUserID, uSubscriptions);
}
private native int doMakeChannel(long lpTTInstance, Channel lpChannel);
public int doMakeChannel(Channel lpChannel) {
return doMakeChannel(ttInst, lpChannel);
}
private native int doUpdateChannel(long lpTTInstance, Channel lpChannel);
public int doUpdateChannel(Channel lpChannel) {
return doUpdateChannel(ttInst, lpChannel);
}
private native int doRemoveChannel(long lpTTInstance, int nChannelID);
public int doRemoveChannel(int nChannelID) {
return doRemoveChannel(ttInst, nChannelID);
}
private native int doMoveUser(long lpTTInstance, int nUserID, int nChannelID);
public int doMoveUser(int nUserID, int nChannelID) {
return doMoveUser(ttInst, nUserID, nChannelID);
}
private native int doUpdateServer(long lpTTInstance, ServerProperties lpServerProperties);
public int doUpdateServer(ServerProperties lpServerProperties) {
return doUpdateServer(ttInst, lpServerProperties);
}
private native int doListUserAccounts(long lpTTInstance, int nIndex, int nCount);
public int doListUserAccounts(int nIndex, int nCount) {
return doListUserAccounts(ttInst, nIndex, nCount);
}
private native int doNewUserAccount(long lpTTInstance, UserAccount lpUserAccount);
public int doNewUserAccount(UserAccount lpUserAccount) {
return doNewUserAccount(ttInst, lpUserAccount);
}
private native int doDeleteUserAccount(long lpTTInstance, String szUsername);
public int doDeleteUserAccount(String szUsername) {
return doDeleteUserAccount(ttInst, szUsername);
}
private native int doBanUser(long lpTTInstance, int nUserID, int nChannelID);
public int doBanUser(int nUserID, int nChannelID) {
return doBanUser(ttInst, nUserID, nChannelID);
}
private native int doBanUserEx(long lpTTInstance, int nUserID, int uBanTypes);
public int doBanUserEx(int nUserID, int uBanTypes) {
return doBanUserEx(ttInst, nUserID, uBanTypes);
}
private native int doBan(long lpTTInstance, BannedUser lpBannedUser);
public int doBan(BannedUser lpBannedUser) {
return doBan(ttInst, lpBannedUser);
}
private native int doBanIPAddress(long lpTTInstance, String szIPAddress, int nChannelID);
public int doBanIPAddress(String szIPAddress, int nChannelID) {
return doBanIPAddress(ttInst, szIPAddress, nChannelID);
}
private native int doUnBanUser(long lpTTInstance, String szIPAddress, int nChannelID);
public int doUnBanUser(String szIPAddress, int nChannelID) {
return doUnBanUser(ttInst, szIPAddress, nChannelID);
}
private native int doUnBanUserEx(long lpTTInstance, BannedUser lpBannedUser);
public int doUnBanUserEx(BannedUser lpBannedUser) {
return doUnBanUserEx(ttInst, lpBannedUser);
}
private native int doListBans(long lpTTInstance, int nChannelID, int nIndex, int nCount);
public int doListBans(int nChannelID, int nIndex, int nCount) {
return doListBans(ttInst, nChannelID, nIndex, nCount);
}
private native int doSaveConfig(long lpTTInstance);
public int doSaveConfig() {
return doSaveConfig(ttInst);
}
private native int doQueryServerStats(long lpTTInstance);
public int doQueryServerStats() {
return doQueryServerStats(ttInst);
}
private native int doQuit(long lpTTInstance);
public int doQuit() {
return doQuit(ttInst);
}
private native boolean getServerProperties(long lpTTInstance,
ServerProperties lpServerProperties);
public boolean getServerProperties(ServerProperties lpServerProperties)
{ return getServerProperties(ttInst, lpServerProperties); }
private native boolean getServerUsers(long lpTTInstance,
User[] lpUserIDs, IntPtr lpnHowMany);
public boolean getServerUsers(User[] lpUsers, IntPtr lpnHowMany) {
return getServerUsers(ttInst, lpUsers, lpnHowMany);
}
private native int getRootChannelID(long lpTTInstance);
public int getRootChannelID() {
return getRootChannelID(ttInst);
}
private native int getMyChannelID(long lpTTInstance);
public int getMyChannelID() {
return getMyChannelID(ttInst);
}
private native boolean getChannel(long lpTTInstance,
int nChannelID,
Channel lpChannel);
public boolean getChannel(int nChannelID,
Channel lpChannel) {
return getChannel(ttInst, nChannelID, lpChannel);
}
private native String getChannelPath(long lpTTInstance,
int nChannelID);
public String getChannelPath(int nChannelID) {
return getChannelPath(ttInst, nChannelID);
}
private native int getChannelIDFromPath(long lpTTInstance,
String szChannelPath);
public int getChannelIDFromPath(String szChannelPath) {
return getChannelIDFromPath(ttInst, szChannelPath);
}
private native boolean getChannelUsers(long lpTTInstance,
int nChannelID,
User[] lpUsers,
IntPtr lpnHowMany);
public boolean getChannelUsers(int nChannelID,
User[] lpUsers,
IntPtr lpnHowMany) {
return getChannelUsers(ttInst, nChannelID, lpUsers, lpnHowMany);
}
private native boolean getChannelFiles(long lpTTInstance,
int nChannelID,
RemoteFile[] lpRemoteFiles,
IntPtr lpnHowMany);
public boolean getChannelFiles(int nChannelID,
RemoteFile[] lpRemoteFiles,
IntPtr lpnHowMany) {
return getChannelFiles(ttInst, nChannelID, lpRemoteFiles, lpnHowMany);
}
private native boolean getChannelFile(long lpTTInstance,
int nChannelID,
int nFileID,
RemoteFile lpRemoteFile);
public boolean getChannelFile(int nChannelID,
int nFileID,
RemoteFile lpRemoteFile) {
return getChannelFile(ttInst, nChannelID, nFileID, lpRemoteFile);
}
private native boolean isChannelOperator(long lpTTInstance,
int nUserID,
int nChannelID);
public boolean isChannelOperator(int nUserID,
int nChannelID) {
return isChannelOperator(ttInst, nUserID, nChannelID);
}
private native boolean getServerChannels(long lpTTInstance,
Channel[] lpChannels,
IntPtr lpnHowMany);
//TODO: return array instead of query
public boolean getServerChannels(Channel[] lpChannels,
IntPtr lpnHowMany) {
return getServerChannels(ttInst, lpChannels, lpnHowMany);
}
private native int getMyUserID(long lpTTInstance);
public int getMyUserID() {
return getMyUserID(ttInst);
}
private native boolean getMyUserAccount(long lpTTInstance,
UserAccount lpUserAccount);
public boolean getMyUserAccount(UserAccount lpUserAccount) {
return getMyUserAccount(ttInst, lpUserAccount);
}
private native boolean getUser(long lpTTInstance,
int nUserID,
User lpUser);
public boolean getUser(int nUserID,
User lpUser) {
return getUser(ttInst, nUserID, lpUser);
}
private native boolean getUserStatistics(long lpTTInstance,
int nUserID,
UserStatistics lpUserStatistics);
public boolean getUserStatistics(int nUserID,
UserStatistics lpUserStatistics) {
return getUserStatistics(ttInst, nUserID, lpUserStatistics);
}
private native boolean setUserVolume(long lpTTInstance,
int nUserID,
int nStreamType,
int nVolume);
public boolean setUserVolume(int nUserID,
int nStreamType,
int nVolume) {
return setUserVolume(ttInst, nUserID, nStreamType, nVolume);
}
private native boolean setUserMute(long lpTTInstance,
int nUserID,
int nStreamType,
boolean bMute);
public boolean setUserMute(int nUserID,
int nStreamType,
boolean bMute) {
return setUserMute(ttInst, nUserID, nStreamType, bMute);
}
private native boolean setUserStoppedPlaybackDelay(long lpTTInstance,
int nUserID,
int nStreamType,
int nDelayMSec);
public boolean setUserStoppedPlaybackDelay(int nUserID,
int nStreamType,
int nDelayMSec) {
return setUserStoppedPlaybackDelay(ttInst, nUserID, nStreamType, nDelayMSec);
}
private native boolean setUserPosition(long lpTTInstance,
int nUserID,
int nStreamType,
float x, float y, float z);
public boolean setUserPosition(int nUserID,
int nStreamType,
float x, float y, float z) {
return setUserPosition(ttInst, nUserID, nStreamType, x, y, z);
}
private native boolean setUserStereo(long lpTTInstance,
int nUserID,
int nStreamType,
boolean bLeftSpeaker,
boolean bRightSpeaker);
public boolean setUserStereo(int nUserID,
int nStreamType,
boolean bLeftSpeaker,
boolean bRightSpeaker) {
return setUserStereo(ttInst, nUserID, nStreamType, bLeftSpeaker, bRightSpeaker);
}
private native boolean setUserMediaStorageDir(long lpTTInstance,
int nUserID,
String szFolderPath,
String szFileNameVars,
int uAFF);
public boolean setUserMediaStorageDir(int nUserID,
String szFolderPath,
String szFileNameVars, int uAFF) {
return setUserMediaStorageDir(ttInst, nUserID, szFolderPath, szFileNameVars, uAFF);
}
private native boolean setUserAudioStreamBufferSize(long lpTTInstance,
int nUserID, int uStreamType, int nMSec);
public boolean setUserAudioStreamBufferSize(int nUserID, int uStreamType, int nMSec) {
return setUserAudioStreamBufferSize(ttInst, nUserID, uStreamType, nMSec);
}
private native AudioBlock acquireUserAudioBlock(long lpTTInstance,
int nStreamType, int nUserID);
public AudioBlock acquireUserAudioBlock(int nStreamType, int nUserID) {
return acquireUserAudioBlock(ttInst, nStreamType, nUserID);
}
private native boolean getFileTransferInfo(long lpTTInstance,
int nTransferID, FileTransfer lpFileTransfer);
public boolean getFileTransferInfo(int nTransferID, FileTransfer lpFileTransfer) {
return getFileTransferInfo(ttInst, nTransferID, lpFileTransfer);
}
private native boolean cancelFileTransfer(long lpTTInstance,
int nTransferID);
public boolean cancelFileTransfer(int nTransferID) {
return cancelFileTransfer(ttInst, nTransferID);
}
public native String getErrorMessage(int nError);
private native boolean DBG_SetSoundInputTone(long lpTTInstance,
int uStreamTypes,
int nFrequency);
public boolean DBG_SetSoundInputTone(int uStreamTypes,
int nFrequency) {
return DBG_SetSoundInputTone(ttInst, uStreamTypes, nFrequency);
}
}