My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes    
 
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
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
/**
* BlueCove - Java library for Bluetooth
* Copyright (C) 2007-2009 Vlad Skarzhevskyy
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
* @version $Id$
*/
package com.intel.bluetooth;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.Vector;

import javax.bluetooth.BluetoothStateException;
import javax.bluetooth.DataElement;
import javax.bluetooth.DeviceClass;
import javax.bluetooth.DiscoveryAgent;
import javax.bluetooth.DiscoveryListener;
import javax.bluetooth.RemoteDevice;
import javax.bluetooth.ServiceRecord;
import javax.bluetooth.ServiceRegistrationException;
import javax.bluetooth.UUID;

class BluetoothStackToshiba implements BluetoothStack, DeviceInquiryRunnable, SearchServicesRunnable {

private boolean initialized = false;

private Vector deviceDiscoveryListeners = new Vector/* <DiscoveryListener> */();

private Hashtable deviceDiscoveryListenerFoundDevices = new Hashtable();

private Hashtable deviceDiscoveryListenerReportedDevices = new Hashtable();

private final static int ATTR_RETRIEVABLE_MAX = 0xFFFF;

private final static int RECEIVE_MTU_MAX = 1024;

// FIXME
private String getBTWVersionInfo()
{
return "";
}

// FIXME
private int getDeviceVersion()
{
return 0;
}

// FIXME
private int getDeviceManufacturer()
{
return 0;
}

BluetoothStackToshiba() {

}

// ---------------------- Library initialization

public String getStackID() {
return BlueCoveImpl.STACK_TOSHIBA;
}

public String toString() {
return getStackID();
}

/*
* (non-Javadoc)
*
* @see com.intel.bluetooth.BluetoothStack#getFeatureSet()
*/
public int getFeatureSet() {
return 0;
}

/*
* (non-Javadoc)
*
* @see com.intel.bluetooth.BluetoothStack#isNativeCodeLoaded()
*/
public native boolean isNativeCodeLoaded();

/*
* (non-Javadoc)
*
* @see com.intel.bluetooth.BluetoothStack#requireNativeLibraries()
*/
public LibraryInformation[] requireNativeLibraries() {
return LibraryInformation.library(BlueCoveImpl.NATIVE_LIB_TOSHIBA);
}

public native int getLibraryVersion();

public native int detectBluetoothStack();

public native void enableNativeDebug(Class nativeDebugCallback, boolean on);

private native boolean initializeImpl() throws BluetoothStateException;

private native void destroyImpl();

public void initialize() throws BluetoothStateException {
if (!initializeImpl()) {
throw new BluetoothStateException("TOSHIBA BluetoothStack not found");
}
initialized = true;
}

public void destroy() {
if (initialized) {
destroyImpl();
initialized = false;
DebugLog.debug("TOSHIBA destroyed");
}
}

/*
* (non-Javadoc)
*
* @see com.intel.bluetooth.BluetoothStack#isCurrentThreadInterruptedCallback()
*/
public boolean isCurrentThreadInterruptedCallback() {
return UtilsJavaSE.isCurrentThreadInterrupted();
}

public RemoteDevice[] retrieveDevices(int option) {
return null;
}

public Boolean isRemoteDeviceTrusted(long address) {
return null;
}

public Boolean isRemoteDeviceAuthenticated(long address) {
return null;
}

/*
* (non-Javadoc)
*
* @see com.intel.bluetooth.BluetoothStack#removeAuthenticationWithRemoteDevice (long)
*/
public void removeAuthenticationWithRemoteDevice(long address) throws IOException {
}

// ---------------------- LocalDevice

public native String getLocalDeviceBluetoothAddress() throws BluetoothStateException;

public DeviceClass getLocalDeviceClass() {
// TODO Auto-generated method stub
return null;
}

/*
* (non-Javadoc)
*
* @see com.intel.bluetooth.BluetoothStack#setLocalDeviceServiceClasses(int)
*/
public void setLocalDeviceServiceClasses(int classOfDevice) {
// TODO Auto-generated method stub
}

public String getLocalDeviceName() {
// TODO Auto-generated method stub
return null;
}

public boolean isLocalDevicePowerOn() {
// TODO Auto-generated method stub
return true;
}

public String getLocalDeviceProperty(String property) {
// Copied directly from WIDCOMM: probably needs to be changed
if (BluetoothConsts.PROPERTY_BLUETOOTH_CONNECTED_DEVICES_MAX.equals(property)) {
return "7";
}
if (BluetoothConsts.PROPERTY_BLUETOOTH_SD_TRANS_MAX.equals(property)) {
return "1";
}
if (BluetoothConsts.PROPERTY_BLUETOOTH_CONNECTED_INQUIRY_SCAN.equals(property)) {
return BlueCoveImpl.TRUE;
}
if (BluetoothConsts.PROPERTY_BLUETOOTH_CONNECTED_PAGE_SCAN.equals(property)) {
return BlueCoveImpl.TRUE;
}
if (BluetoothConsts.PROPERTY_BLUETOOTH_CONNECTED_INQUIRY.equals(property)) {
return BlueCoveImpl.TRUE;
}
if (BluetoothConsts.PROPERTY_BLUETOOTH_CONNECTED_PAGE.equals(property)) {
return BlueCoveImpl.TRUE;
}

if (BluetoothConsts.PROPERTY_BLUETOOTH_SD_ATTR_RETRIEVABLE_MAX.equals(property)) {
return String.valueOf(ATTR_RETRIEVABLE_MAX);
}
if (BluetoothConsts.PROPERTY_BLUETOOTH_MASTER_SWITCH.equals(property)) {
return BlueCoveImpl.FALSE;
}
if (BluetoothConsts.PROPERTY_BLUETOOTH_L2CAP_RECEIVEMTU_MAX.equals(property)) {
return String.valueOf(RECEIVE_MTU_MAX);
}

if ("bluecove.radio.version".equals(property)) {
return String.valueOf(getDeviceVersion());
}
if ("bluecove.radio.manufacturer".equals(property)) {
return String.valueOf(getDeviceManufacturer());
}
if ("bluecove.stack.version".equals(property)) {
return getBTWVersionInfo();
}
// Some Hack and testing functions, not documented
if (property.startsWith("bluecove.nativeFunction:")) {
String functionDescr = property.substring(property.indexOf(':') + 1, property.length());
int paramIdx = functionDescr.indexOf(':');
if (paramIdx == -1) {
throw new RuntimeException("Invalid native function " + functionDescr + "; arguments expected");
}
String function = functionDescr.substring(0, paramIdx);
long address = RemoteDeviceHelper.getAddress(functionDescr.substring(function.length() + 1, functionDescr
.length()));
if ("getRemoteDeviceVersionInfo".equals(function)) {
return getRemoteDeviceVersionInfo(address);
} else if ("cancelSniffMode".equals(function)) {
return String.valueOf(cancelSniffMode(address));
} else if ("setSniffMode".equals(function)) {
return String.valueOf(setSniffMode(address));
} else if ("getRemoteDeviceRSSI".equals(function)) {
return String.valueOf(getRemoteDeviceRSSI(address));
} else if ("getRemoteDeviceLinkMode".equals(function)) {
if (isRemoteDeviceConnected(address)) {
return getRemoteDeviceLinkMode(address);
} else {
return "disconnected";
}
}
}
return null;
}

public int getLocalDeviceDiscoverable() {
// TODO Auto-generated method stub
return 0;
}

public boolean setLocalDeviceDiscoverable(int mode) throws BluetoothStateException {
// TODO Auto-generated method stub
return false;
}

// ---------------------- Remote Device authentication

public boolean authenticateRemoteDevice(long address) throws IOException {
return false;
}

/*
* (non-Javadoc)
*
* @see com.intel.bluetooth.BluetoothStack#authenticateRemoteDevice(long,
* java.lang.String)
*/
public boolean authenticateRemoteDevice(long address, String passkey) throws IOException {
return false;
}

// --- Some testing functions accessible by LocalDevice.getProperty

// FIXME ALL

public boolean isRemoteDeviceConnected(long address)
{
return true;
}

public String getRemoteDeviceLinkMode(long address)
{
return "";
}

public String getRemoteDeviceVersionInfo(long address)
{
return "";
}

public boolean setSniffMode(long address)
{
return false;
}

public boolean cancelSniffMode(long address)
{
return false;
}

public int getRemoteDeviceRSSI(long address)
{
return 0;
}


// ---------------------- Device Inquiry

private native int runDeviceInquiryImpl(DeviceInquiryThread startedNotify, int accessCode,
DiscoveryListener listener) throws BluetoothStateException;

public boolean startInquiry(int accessCode, DiscoveryListener listener) throws BluetoothStateException {
deviceDiscoveryListeners.addElement(listener);
if (BlueCoveImpl.getConfigProperty(BlueCoveConfigProperties.PROPERTY_INQUIRY_REPORT_ASAP, false)) {
deviceDiscoveryListenerFoundDevices.put(listener, new Hashtable());
}
deviceDiscoveryListenerReportedDevices.put(listener, new Vector());
return DeviceInquiryThread.startInquiry(this, this, accessCode, listener);
}

public int runDeviceInquiry(DeviceInquiryThread startedNotify, int accessCode, DiscoveryListener listener)
throws BluetoothStateException {
try {
int discType = runDeviceInquiryImpl(startedNotify, accessCode, listener);
if (discType == DiscoveryListener.INQUIRY_COMPLETED) {
// Report found devices if any not reported
Hashtable previouslyFound = (Hashtable) deviceDiscoveryListenerFoundDevices.get(listener);
if (previouslyFound != null) {
Vector reported = (Vector) deviceDiscoveryListenerReportedDevices.get(listener);
for (Enumeration en = previouslyFound.keys(); en.hasMoreElements();) {
RemoteDevice remoteDevice = (RemoteDevice) en.nextElement();
if (reported.contains(remoteDevice)) {
continue;
}
reported.addElement(remoteDevice);
Integer deviceClassInt = (Integer) previouslyFound.get(remoteDevice);
DeviceClass deviceClass = new DeviceClass(deviceClassInt.intValue());
listener.deviceDiscovered(remoteDevice, deviceClass);
// If cancelInquiry has been called
if (!deviceDiscoveryListeners.contains(listener)) {
return DiscoveryListener.INQUIRY_TERMINATED;
}
}
}
}
return discType;
} finally {
deviceDiscoveryListeners.removeElement(listener);
deviceDiscoveryListenerFoundDevices.remove(listener);
deviceDiscoveryListenerReportedDevices.remove(listener);
}
}

public void deviceDiscoveredCallback(DiscoveryListener listener, long deviceAddr, int deviceClass,
String deviceName, boolean paired) {
// Copied directly from WIDCOMM driver
DebugLog.debug("deviceDiscoveredCallback deviceName", deviceName);
if (!deviceDiscoveryListeners.contains(listener)) {
return;
}
// Update name if name retrieved
RemoteDevice remoteDevice = RemoteDeviceHelper.createRemoteDevice(this, deviceAddr, deviceName, paired);
Vector reported = (Vector) deviceDiscoveryListenerReportedDevices.get(listener);
if (reported == null || (reported.contains(remoteDevice))) {
return;
}
// See -Dbluecove.inquiry.report_asap=false
Hashtable previouslyFound = (Hashtable) deviceDiscoveryListenerFoundDevices.get(listener);
if (previouslyFound != null) {
Integer deviceClassInt = (Integer) previouslyFound.get(remoteDevice);
if (deviceClassInt == null) {
previouslyFound.put(remoteDevice, new Integer(deviceClass));
} else if (deviceClass != 0) {
previouslyFound.put(remoteDevice, new Integer(deviceClass));
}
} else {
DeviceClass cod = new DeviceClass(deviceClass);
reported.addElement(remoteDevice);
DebugLog.debug("deviceDiscoveredCallback address", remoteDevice.getBluetoothAddress());
DebugLog.debug("deviceDiscoveredCallback deviceClass", cod);
listener.deviceDiscovered(remoteDevice, cod);
}
}

private native boolean deviceInquiryCancelImpl();

public boolean cancelInquiry(DiscoveryListener listener) {
// no further deviceDiscovered() events will occur for this inquiry
if (!deviceDiscoveryListeners.removeElement(listener)) {
return false;
}
return deviceInquiryCancelImpl();
}

/**
* get device name while discovery running. Device may not report its name first time while discovering.
*
* @param address
* @return name
*/
private native String getRemoteDeviceFriendlyNameImpl(long address);

public String getRemoteDeviceFriendlyName(long address) throws IOException {
return getRemoteDeviceFriendlyNameImpl(address);
}

// ---------------------- Service search

private native short connectSDPImpl(long address);

private native void disconnectSDPImpl(short cid);

private native long[] searchServicesImpl(SearchServicesThread startedNotify, short cid, byte[][] uuidSet);

private native byte[] populateWorkerImpl(short cid, long handle, int[] attrSet);

private boolean setAttributes(ServiceRecordImpl serviceRecord, int[] attrIDs, byte[] bytes) {
boolean anyRetrived = false;

ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
// Need to rename this class
BluetoothStackWIDCOMMSDPInputStream btis = null;
try {
btis = new BluetoothStackWIDCOMMSDPInputStream(bais);
}
catch (Exception e) {
}

for (int i = 0; i < attrIDs.length; i++) {
int id = attrIDs[i];
try {
if (BluetoothStackWIDCOMMSDPInputStream.debug) {
DebugLog.debug("decode attribute " + id + " Ox" + Integer.toHexString(id));
}
DataElement element = btis.readElement();

// Do special case conversion for only one element in the
// list.
if (id == BluetoothConsts.ProtocolDescriptorList) {
Enumeration protocolsSeqEnum = (Enumeration) element.getValue();
if (protocolsSeqEnum.hasMoreElements()) {
DataElement protocolElement = (DataElement) protocolsSeqEnum.nextElement();
if (protocolElement.getDataType() != DataElement.DATSEQ) {
DataElement newMainSeq = new DataElement(DataElement.DATSEQ);
newMainSeq.addElement(element);
element = newMainSeq;
}
}
}

serviceRecord.populateAttributeValue(id, element);
anyRetrived = true;
} catch (Throwable e) {
if (BluetoothStackWIDCOMMSDPInputStream.debug) {
DebugLog.error("error populate attribute " + id + " Ox" + Integer.toHexString(id), e);
}
}
}
return anyRetrived;
}


public int runSearchServices(SearchServicesThread startedNotify, int[] attrSet, UUID[] uuidSet,
RemoteDevice device, DiscoveryListener listener) throws BluetoothStateException {
short cid;
try {
cid = connectSDPImpl(RemoteDeviceHelper.getAddress(device.getBluetoothAddress()));
}
catch (Exception e) {
return DiscoveryListener.SERVICE_SEARCH_DEVICE_NOT_REACHABLE;
}

byte[][] uuidBytes = new byte[uuidSet.length][16];
for (int i = 0; i < uuidSet.length; i++) {
uuidBytes[i] = new byte[16];
String full = uuidSet[i].toString();
for (int j = 0; j < 16; j++) {
String sub = full.substring(j*2, j*2+2).toUpperCase();
uuidBytes[i][j] = (byte)Integer.parseInt(sub, 16);
}
}

long[] handles;

try {
handles = searchServicesImpl(startedNotify, cid, uuidBytes);
}
catch (Exception e) {
disconnectSDPImpl(cid);
return DiscoveryListener.SERVICE_SEARCH_ERROR;
}

if (handles.length <= 0) {
disconnectSDPImpl(cid);
return DiscoveryListener.SERVICE_SEARCH_NO_RECORDS;
}

ServiceRecordImpl[] records = new ServiceRecordImpl[handles.length];

for (int i = 0; i < handles.length; i++) {
records[i] = new ServiceRecordImpl(this, device, handles[i]);
byte[] bytes;
try {
bytes = populateWorkerImpl(cid, handles[i], attrSet);
}
catch (Exception e) {
disconnectSDPImpl(cid);
return DiscoveryListener.SERVICE_SEARCH_ERROR;
}
if (bytes != null) {
setAttributes(records[i], attrSet, bytes);
}
}

listener.servicesDiscovered(startedNotify.getTransID(), records);

disconnectSDPImpl(cid);

return DiscoveryListener.SERVICE_SEARCH_COMPLETED;
}

public int searchServices(int[] attrSet, UUID[] uuidSet, RemoteDevice device, DiscoveryListener listener)
throws BluetoothStateException {
return SearchServicesThread.startSearchServices(this, this, attrSet, uuidSet, device, listener);
}

public boolean cancelServiceSearch(int transID) {
// No service search cancel on Toshiba
return false;
}

public boolean populateServicesRecordAttributeValues(ServiceRecordImpl serviceRecord, int[] attrIDs)
throws IOException {
if (attrIDs.length > 0xFFFF) {
throw new IllegalArgumentException();
}

short cid;
try {
cid = connectSDPImpl(RemoteDeviceHelper.getAddress(serviceRecord.getHostDevice().getBluetoothAddress()));
}
catch (Exception e) {
return false;
}

byte[] bytes;

try {
bytes = populateWorkerImpl(cid, serviceRecord.getHandle(), attrIDs);
}
catch (Exception e) {
disconnectSDPImpl(cid);
return false;
}

if (bytes == null) {
return false;
}

boolean ret;

ret = setAttributes(serviceRecord, attrIDs, bytes);

disconnectSDPImpl(cid);

return ret;
}

// ---------------------- Client RFCOMM connections

public long connectionRfOpenClientConnection(BluetoothConnectionParams params) throws IOException {
// TODO Auto-generated method stub
return 0;
}

public void connectionRfCloseClientConnection(long handle) throws IOException {
// TODO Auto-generated method stub

}

public int rfGetSecurityOpt(long handle, int expected) throws IOException {
return expected;
}

/*
* (non-Javadoc)
*
* @see com.intel.bluetooth.BluetoothStack#l2Encrypt(long,long,boolean)
*/
public boolean rfEncrypt(long address, long handle, boolean on) throws IOException {
return false;
}

// ---------------------- Server RFCOMM connections

public long rfServerOpen(BluetoothConnectionNotifierParams params, ServiceRecordImpl serviceRecord)
throws IOException {
// TODO Auto-generated method stub
return 0;
}

public void rfServerClose(long handle, ServiceRecordImpl serviceRecord) throws IOException {
// TODO Auto-generated method stub

}

public void rfServerUpdateServiceRecord(long handle, ServiceRecordImpl serviceRecord, boolean acceptAndOpen)
throws ServiceRegistrationException {
// TODO Auto-generated method stub

}

public long rfServerAcceptAndOpenRfServerConnection(long handle) throws IOException {
// TODO Auto-generated method stub
return 0;
}

public void connectionRfCloseServerConnection(long handle) throws IOException {
// TODO Auto-generated method stub
}

// ---------------------- Shared Client and Server RFCOMM connections

public void connectionRfFlush(long handle) throws IOException {
// TODO Auto-generated method stub

}

public int connectionRfRead(long handle) throws IOException {
// TODO Auto-generated method stub
return 0;
}

public int connectionRfRead(long handle, byte[] b, int off, int len) throws IOException {
// TODO Auto-generated method stub
return 0;
}

public int connectionRfReadAvailable(long handle) throws IOException {
// TODO Auto-generated method stub
return 0;
}

public void connectionRfWrite(long handle, int b) throws IOException {
// TODO Auto-generated method stub

}

public void connectionRfWrite(long handle, byte[] b, int off, int len) throws IOException {
// TODO Auto-generated method stub

}

public long getConnectionRfRemoteAddress(long handle) throws IOException {
// TODO Auto-generated method stub
return 0;
}

// ---------------------- Client and Server L2CAP connections

/*
* (non-Javadoc)
*
* @see com.intel.bluetooth.BluetoothStack#l2OpenClientConnection(com.intel.bluetooth.BluetoothConnectionParams,
* int, int)
*/
public long l2OpenClientConnection(BluetoothConnectionParams params, int receiveMTU, int transmitMTU)
throws IOException {
// TODO Auto-generated method stub
return 0;
}

/*
* (non-Javadoc)
*
* @see com.intel.bluetooth.BluetoothStack#l2CloseClientConnection(long)
*/
public void l2CloseClientConnection(long handle) throws IOException {
// TODO Auto-generated method stub
}

/*
* (non-Javadoc)
*
* @see com.intel.bluetooth.BluetoothStack#l2ServerOpen(com.intel.bluetooth.BluetoothConnectionNotifierParams,
* int, int, com.intel.bluetooth.ServiceRecordImpl)
*/
public long l2ServerOpen(BluetoothConnectionNotifierParams params, int receiveMTU, int transmitMTU,
ServiceRecordImpl serviceRecord) throws IOException {
// TODO Auto-generated method stub
return 0;
}

/*
* (non-Javadoc)
*
* @see com.intel.bluetooth.BluetoothStack#l2ServerUpdateServiceRecord(long,
* com.intel.bluetooth.ServiceRecordImpl, boolean)
*/
public void l2ServerUpdateServiceRecord(long handle, ServiceRecordImpl serviceRecord, boolean acceptAndOpen)
throws ServiceRegistrationException {
// TODO Auto-generated method stub
}

/*
* (non-Javadoc)
*
* @see com.intel.bluetooth.BluetoothStack#l2ServerAcceptAndOpenServerConnection(long)
*/
public long l2ServerAcceptAndOpenServerConnection(long handle) throws IOException {
// TODO Auto-generated method stub
return 0;
}

/*
* (non-Javadoc)
*
* @see com.intel.bluetooth.BluetoothStack#l2CloseServerConnection(long)
*/
public void l2CloseServerConnection(long handle) throws IOException {
// TODO Auto-generated method stub

}

/*
* (non-Javadoc)
*
* @see com.intel.bluetooth.BluetoothStack#l2ServerClose(long,
* com.intel.bluetooth.ServiceRecordImpl)
*/
public void l2ServerClose(long handle, ServiceRecordImpl serviceRecord) throws IOException {
// TODO Auto-generated method stub

}

public int l2GetSecurityOpt(long handle, int expected) throws IOException {
return expected;
}

/*
* (non-Javadoc)
*
* @see com.intel.bluetooth.BluetoothStack#l2Ready(long)
*/
public boolean l2Ready(long handle) throws IOException {
// TODO Auto-generated method stub
return false;
}

/*
* (non-Javadoc)
*
* @see com.intel.bluetooth.BluetoothStack#l2receive(long, byte[])
*/
public int l2Receive(long handle, byte[] inBuf) throws IOException {
// TODO Auto-generated method stub
return 0;
}

/*
* (non-Javadoc)
*
* @see com.intel.bluetooth.BluetoothStack#l2send(long, byte[])
*/
public void l2Send(long handle, byte[] data, int transmitMTU) throws IOException {
// TODO Auto-generated method stub
}

/*
* (non-Javadoc)
*
* @see com.intel.bluetooth.BluetoothStack#l2GetReceiveMTU(long)
*/
public int l2GetReceiveMTU(long handle) throws IOException {
// TODO Auto-generated method stub
return 0;
}

/*
* (non-Javadoc)
*
* @see com.intel.bluetooth.BluetoothStack#l2GetTransmitMTU(long)
*/
public int l2GetTransmitMTU(long handle) throws IOException {
// TODO Auto-generated method stub
return 0;
}

/*
* (non-Javadoc)
*
* @see com.intel.bluetooth.BluetoothStack#l2RemoteAddress(long)
*/
public long l2RemoteAddress(long handle) throws IOException {
// TODO Auto-generated method stub
return 0;
}

/*
* (non-Javadoc)
*
* @see com.intel.bluetooth.BluetoothStack#l2Encrypt(long,long,boolean)
*/
public boolean l2Encrypt(long address, long handle, boolean on) throws IOException {
// TODO Auto-generated method stub
return false;
}
}

Change log

r2945 by skarzhevskyy on Mar 21, 2009   Diff
honor requested TransmitMTU
Go to: 
Project members, sign in to write a code review

Older revisions

r2915 by skarzhevskyy on Mar 13, 2009   Diff
Updated javadocs and Copyright
r2525 by skarzhevskyy on Dec 8, 2008   Diff
Cleanup references to "bluetooth.*"
properties
r2464 by tr...@gamblin.ca on Nov 28, 2008   Diff
Implemented
RemoteDevice.getFriendlyName for
Toshiba
Implemented service discovery for
Toshiba (retrieving attributes not
...
All revisions of this file

File info

Size: 23491 bytes, 827 lines

File properties

svn:mime-type
text/plain
svn:eol-style
native
svn:keywords
Date Author Id Revision
Powered by Google Project Hosting