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
/**
* BlueCove - Java library for Bluetooth
* Copyright (C) 2008-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;

/**
* BlueCove runtime configuration properties. Can be configured as system
* properties. If System property is not an option (e.g. when running in Web
* Start) create text file with property name e.g. "bluecove.stack.first" write
* the value and add this file to BlueCove or Application jar
*
* @see BlueCoveImpl#setConfigProperty(String, String)
*/
public interface BlueCoveConfigProperties {

/**
* Will enable debug prints prints in BlueCove code. BlueCove log is
* redirected to log4j when log4j classes are available in classpath. Then
* BlueCove debug can be enabled using log4j configuration. Initialization
* property.
*/
public static final String PROPERTY_DEBUG = "bluecove.debug";

/**
* BlueCove log when enabled is printed to System.out. You can disable this
* feature. Initialization property.
*/
public static final String PROPERTY_DEBUG_STDOUT = "bluecove.debug.stdout";

/**
* BlueCove log is redirected to log4j when log4j classes are available in
* classpath. You can disable this feature. Initialization property.
*/
public static final String PROPERTY_DEBUG_LOG4J = "bluecove.debug.log4j";

/**
* If automatic Bluetooth Stack detection is not enough this can be used to
* force desired Stack Initialization. Values "widcomm", "bluesoleil" or
* "winsock". Use "emulator" value to start jsr-82 emulator. By default
* winsock is selected if available. Initialization property.
*/
public static final String PROPERTY_STACK = "bluecove.stack";

/**
* Used to optimize stack detection. If -Dbluecove.stack.first=widcomm then
* widcomm (bluecove.dll) stack is loaded first and if not available then
* BlueCove will switch to winsock. By default intelbth.dll is loaded first.
* Initialization property.
*/
public static final String PROPERTY_STACK_FIRST = "bluecove.stack.first";

/**
* "false" to disable the load of native library from resources.
* Initialization property.
*/
public static final String PROPERTY_NATIVE_RESOURCE = "bluecove.native.resource";

/**
* Load library (.dll) from specified location. Initialization property.
*
* Path separated by system-dependent path-separator (: or ;) accepted.
*/
public static final String PROPERTY_NATIVE_PATH = "bluecove.native.path";

/**
* Linux implementation class. Initialization property.
*/
public static final String PROPERTY_BLUEZ_CLASS = "bluecove.bluez.class";

/**
* If Stack support multiple bluetooth adapters select one by its system ID.
* (Linux BlueZ and Emulator) Initialization property.
*/
public static final String PROPERTY_LOCAL_DEVICE_ID = "bluecove.deviceID";

/**
* If Stack support multiple bluetooth adapters select one by its bluetooth
* address. (Linux BlueZ and Emulator) Initialization property.
*/
public static final String PROPERTY_LOCAL_DEVICE_ADDRESS = "bluecove.deviceAddress";

/**
* JSR-82 simulator class. Initialization property.
*/
public static final String PROPERTY_EMULATOR_CLASS = "bluecove.emulator.class";

/**
* JSR-82 air simulator server can be on remote computer, default
* 'localhost'. Initialization property.
*/
public static final String PROPERTY_EMULATOR_HOST = "bluecove.emu.rmiRegistryHost";

/**
* JSR-82 air simulator server listen on different port, default 8090.
* <p>
* Use 0 on the client to enable in process server, RMI will not be used.
* Initialization property.
*/
public static final String PROPERTY_EMULATOR_PORT = "bluecove.emu.rmiRegistryPort";

/**
* JSR-82 air simulator server and RMI registry can be started inside client
* JVM, default 'false'. Initialization property.
*/
public static final String PROPERTY_EMULATOR_RMI_REGISTRY = "bluecove.emu.rmiRegistry";

/**
* Some properties can't be changed at runtime once the Stack was
* initialized.
*/
public static final String[] INITIALIZATION_PROPERTIES = new String[] { PROPERTY_STACK, PROPERTY_STACK_FIRST, PROPERTY_NATIVE_RESOURCE,
PROPERTY_NATIVE_RESOURCE, PROPERTY_BLUEZ_CLASS, PROPERTY_LOCAL_DEVICE_ID, PROPERTY_LOCAL_DEVICE_ADDRESS, PROPERTY_EMULATOR_CLASS, PROPERTY_EMULATOR_HOST, PROPERTY_EMULATOR_PORT };

/**
* The amount of time in milliseconds for which the implementation will
* attempt to establish connection RFCOMM or L2CAP before it throws
* BluetoothConnectionException. Defaults to 2 minutes. WIDCOMM and OS X
* only.
*/
public static final String PROPERTY_CONNECT_TIMEOUT = "bluecove.connect.timeout";

/**
* On MS stack retry connection automatically when received WSAENETUNREACH
* during connect. Default to 2 retry attempts.
*
* @since bluecove 2.1.0
*/
public static final String PROPERTY_CONNECT_UNREACHABLE_RETRY = "bluecove.connect.unreachable_retry";

/**
* Device Inquiry time in seconds defaults to 11 seconds. MS Stack and OS X
* only.
*/
public static final String PROPERTY_INQUIRY_DURATION = "bluecove.inquiry.duration";

static final int PROPERTY_INQUIRY_DURATION_DEFAULT = 11;

/**
* Set true to make Device Inquiry call DiscoveryListener?.deviceDiscovered
* without waiting for updated service class. WIDCOMM only.
*/
public static final String PROPERTY_INQUIRY_REPORT_ASAP = "bluecove.inquiry.report_asap";

/**
* You can increase OBEX transfer speed by changing mtu to bigger value.
* Default is 1024
*/
public static final String PROPERTY_OBEX_MTU = "bluecove.obex.mtu";

/**
* The amount of time in milliseconds for which the implementation will
* attempt to successfully transmit a packet before it throws
* InterruptedIOException. Defaults to 2 minutes.
*/
public static final String PROPERTY_OBEX_TIMEOUT = "bluecove.obex.timeout";

/**
* Remove JSR-82 1.1 restriction for legal PSM values are in the range
* (0x1001..0xFFFF).
*
* For JSR-82 1.2 Reserved Ranges @see <A HREF="https://opensource.motorola.com/sf/discussion/do/listPosts/projects.jsr82/discussion.jsr_82_1_2_open_discussion.topc1808"
* >JSR-82 1.2</A>
*/
public static final String PROPERTY_JSR_82_PSM_MINIMUM_OFF = "bluecove.jsr82.psm_minimum_off";

/**
* In some cases BlueCove has a control how String are encoded in SDP records.
* This one will force it to be encoded as ASCII (charsetName "US-ASCII").
* May be useful for connections with some OEM devices.
*
* Used on MS stack and BlueZ GPL module for now. TODO other stacks.
*
* Defaults to false.
*/
public static final String PROPERTY_SDP_STRING_ENCODING_ASCII = "bluecove.sdp.string_encoding_ascii";

/**
* To be able to use some of android bluetooth APIs, we need a reference to
* an android context object
*/
public static final String PROPERTY_ANDROID_CONTEXT = "bluecove.android.context";

/**
* In android, device can't be discoverable forever. you have to set time in seconds.
* After this time, device will return automatically to non-discoverable.
*/
public static final String PROPERTY_ANDROID_DISCOVERABLE_DURATION = "bluecove.android.discoverable_duration";

/**
* Android APIs don't give utilities to examine the service record. So, set this property
* with comma-separated UUIDs you wish services containing them to be
* considered as OBEX services.
*/
public static final String PROPERTY_ANDROID_OBEX_UUIDS = "bluecove.android.obex_uuids";
}

Change log

r3053 by minashokry on Jul 31, 2010   Diff
finish service discovery and implement
rfcomm connections
Go to: 
Project members, sign in to write a code review

Older revisions

r3049 by minashokry on Jul 25, 2010   Diff
more support of android stack. changes
are mainly in changing discovery mode
r2974 by skarzhevskyy on Mar 31, 2009   Diff
config property
bluecove.sdp.string_encoding_ascii
r2915 by skarzhevskyy on Mar 13, 2009   Diff
Updated javadocs and Copyright
All revisions of this file

File info

Size: 8684 bytes, 215 lines

File properties

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