Skip to content

Commit 6709195

Browse files
committed
Rebuilding
1 parent 6665ab3 commit 6709195

File tree

11 files changed

+323
-2
lines changed

11 files changed

+323
-2
lines changed

BTDemo/common/pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@
2020

2121
<dependency>
2222
<groupId>com.codename1</groupId>
23-
<artifactId>cn1-bluetooth-lib</artifactId>
23+
<artifactId>cn1-bluetooth</artifactId>
2424
<version>1.0-SNAPSHOT</version>
25+
<type>pom</type>
2526
</dependency>
2627

2728
<!-- INJECT DEPENDENCIES -->
File renamed without changes.

BTDemo/pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
<maven.compiler.target>1.8</maven.compiler.target>
3131
<kotlin.compiler.jvmTarget>1.8</kotlin.compiler.jvmTarget>
3232
<cn1app.name>BTDemo</cn1app.name>
33+
<exec.mainClass>com.codename1.btle.BTDemoStub</exec.mainClass>
34+
<cn1.mainClass>com.codename1.btle.BTDemo</cn1.mainClass>
3335
</properties>
3436
<dependencyManagement>
3537
<dependencies>
Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
package com.codename1.bluetoothle;
2+
3+
4+
/**
5+
*
6+
* @author Chen
7+
*/
8+
public class Bluetooth {
9+
10+
public static final int SCAN_MODE_BALANCED = 1;
11+
12+
public static final int SCAN_MODE_LOW_LATENCY = 2;
13+
14+
public static final int SCAN_MODE_LOW_POWER = 0;
15+
16+
public static final int SCAN_MODE_OPPORTUNISTIC = -1;
17+
18+
public static final int MATCH_MODE_AGGRESSIVE = 1;
19+
20+
public static final int MATCH_MODE_STICKY = 2;
21+
22+
public static final int MATCH_NUM_ONE_ADVERTISEMENT = 1;
23+
24+
public static final int MATCH_NUM_FEW_ADVERTISEMENT = 2;
25+
26+
public static final int MATCH_NUM_MAX_ADVERTISEMENT = 3;
27+
28+
public static final int CALLBACK_TYPE_ALL_MATCHES = 1;
29+
30+
public static final int CALLBACK_TYPE_FIRST_MATCH = 2;
31+
32+
public static final int CALLBACK_TYPE_MATCH_LOST = 4;
33+
34+
public static final int CONNECTION_PRIORITY_LOW = 0;
35+
36+
public static final int CONNECTION_PRIORITY_BALANCED = 1;
37+
38+
public static final int CONNECTION_PRIORITY_HIGH = 2;
39+
40+
public Bluetooth() {
41+
}
42+
43+
public boolean initialize(boolean request, boolean statusReceiver, String restoreKey) {
44+
}
45+
46+
/**
47+
* Not supported by iOS. With throw an IOException if called on iOS.
48+
* @throws IOException
49+
*/
50+
public void enable() {
51+
}
52+
53+
/**
54+
* Not supported by iOS. With throw an IOException if called on iOS.
55+
* @throws IOException
56+
*/
57+
public void disable() {
58+
}
59+
60+
public void startScan(ActionListener callback, java.util.ArrayList services, boolean allowDuplicates, int scanMode, int matchMode, int matchNum, int callbackType) {
61+
}
62+
63+
public void stopScan() {
64+
}
65+
66+
public void retrieveConnected(ActionListener callback, java.util.ArrayList services) {
67+
}
68+
69+
public void connect(ActionListener callback, String address) {
70+
}
71+
72+
public void reconnect(ActionListener callback, String address) {
73+
}
74+
75+
public void disconnect(String address) {
76+
}
77+
78+
public void close(String address) {
79+
}
80+
81+
/**
82+
* Not currently supported on iOS. Currently does nothing if called on iOS.
83+
* @param callback
84+
* @param address
85+
* @throws IOException
86+
*/
87+
public void discover(ActionListener callback, String address) {
88+
}
89+
90+
public void services(ActionListener callback, String address, java.util.ArrayList services) {
91+
}
92+
93+
public void characteristics(ActionListener callback, String address, String service, java.util.ArrayList characteristics) {
94+
}
95+
96+
public void descriptors(ActionListener callback, String address, String service, String characteristic) {
97+
}
98+
99+
public void read(ActionListener callback, String address, String service, String characteristic) {
100+
}
101+
102+
public void subscribe(ActionListener callback, String address, String service, String characteristic) {
103+
}
104+
105+
public void unsubscribe(ActionListener callback, String address, String service, String characteristic) {
106+
}
107+
108+
public void write(ActionListener callback, String address, String service, String characteristic, String value, boolean noResponse) {
109+
}
110+
111+
public void writeQ(ActionListener callback, String address, String service, String characteristic, String value, boolean noResponse) {
112+
}
113+
114+
public void readDescriptor(ActionListener callback, String address, String service, String characteristic, String descriptor) {
115+
}
116+
117+
public void writeDescriptor(ActionListener callback, String address, String service, String characteristic, String descriptor, String value) {
118+
}
119+
120+
public void rssi(ActionListener callback, String address) {
121+
}
122+
123+
/**
124+
* Not supported by iOS. With throw an IOException if called on iOS.
125+
* @param callback
126+
* @param address
127+
* @param mtu
128+
* @throws IOException
129+
*/
130+
public void mtu(ActionListener callback, String address, int mtu) {
131+
}
132+
133+
/**
134+
* Not supported by iOS. With throw an IOException if called on iOS.
135+
*
136+
* @param callback
137+
* @param address
138+
* @param priority
139+
* @throws IOException
140+
*/
141+
public void requestConnectionPriority(ActionListener callback, String address, int priority) {
142+
}
143+
144+
public boolean isInitialized() {
145+
}
146+
147+
public boolean isEnabled() {
148+
}
149+
150+
public boolean isScanning() {
151+
}
152+
153+
public boolean wasConnected(String address) {
154+
}
155+
156+
public boolean isConnected(String address) {
157+
}
158+
159+
public boolean isDiscovered(String address) {
160+
}
161+
162+
/**
163+
* Not supported on iOS. Will throw IOException if called on iOS.
164+
* @return
165+
* @throws IOException
166+
*/
167+
public boolean hasPermission() {
168+
}
169+
170+
/**
171+
* Not supported on iOS. Will throw IOException if called on iOS.
172+
* @return
173+
* @throws IOException
174+
*/
175+
public boolean requestPermission() {
176+
}
177+
178+
/**
179+
* Not supported on iOS. Will throw IOException if called on iOS.
180+
* @return
181+
* @throws IOException
182+
*/
183+
public boolean isLocationEnabled() {
184+
}
185+
186+
/**
187+
* Not supported on iOS. Will throw IOException if called on iOS.
188+
* @return
189+
* @throws IOException
190+
*/
191+
public boolean requestLocation() {
192+
}
193+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package com.codename1.cordova;
2+
3+
4+
/**
5+
*
6+
* @author Chen
7+
*/
8+
public class Cordova {
9+
10+
public Cordova() {
11+
}
12+
13+
public boolean execute(String action, String jsonArgs, CordovaCallback callback) {
14+
}
15+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
package com.codename1.cordova;
2+
3+
4+
/**
5+
*
6+
* @author Chen
7+
*/
8+
public class CordovaCallback {
9+
10+
public CordovaCallback() {
11+
}
12+
13+
public CordovaCallback(ActionListener listener) {
14+
}
15+
16+
public void onError(String jsonStr) {
17+
}
18+
19+
public void onError(java.util.Map json) {
20+
}
21+
22+
public void onSuccess(String jsonStr) {
23+
}
24+
25+
public void onSuccess(java.util.Map json) {
26+
}
27+
28+
public void sendResult(String jsonStr) {
29+
}
30+
31+
public void sendResult(java.util.Map json) {
32+
}
33+
34+
public java.util.Map getResponse() {
35+
}
36+
37+
public <any> getResponseAsync(int timeout) {
38+
}
39+
40+
public java.util.Map getResponseAndWait(int timeout) {
41+
}
42+
43+
public boolean isError() {
44+
}
45+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
package com.codename1.cordova;
2+
3+
4+
/**
5+
*
6+
* @author Chen
7+
*/
8+
public class CordovaCallbackManager {
9+
10+
public CordovaCallbackManager() {
11+
}
12+
13+
public static void setMethodCallback(String method, CordovaCallback callback) {
14+
}
15+
16+
public static void removeMethodCallback(String method) {
17+
}
18+
19+
public static void sendResult(String method, String result, boolean success, boolean keepCallback) {
20+
}
21+
22+
public static void sendResult(String method, String result, boolean success) {
23+
}
24+
25+
public static void onSuccess(String method, String result) {
26+
}
27+
28+
public static void onError(String method, String result) {
29+
}
30+
31+
public static void sendResult(String method, String result) {
32+
}
33+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package com.codename1.cordova;
2+
3+
4+
/**
5+
*
6+
* @author Chen
7+
*/
8+
public interface CordovaNative {
9+
10+
public boolean execute(String action, String jsonArgs);
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package com.codename1.util;
2+
3+
4+
public class JSONParserUtils {
5+
6+
public JSONParserUtils() {
7+
}
8+
9+
public static java.util.Map parse(String json) {
10+
}
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package com.codename1.util;
2+
3+
4+
public class JSONUtils {
5+
6+
public JSONUtils() {
7+
}
8+
9+
public static String toJSON(Object o) {
10+
}
11+
}

0 commit comments

Comments
 (0)