Direct-BT v3.3.0-1-gc2d430c
Direct-BT - Direct Bluetooth Programming.
EInfoReport.cxx
Go to the documentation of this file.
1/*
2 * Author: Sven Gothel <sgothel@jausoft.com>
3 * Copyright (c) 2021 Gothel Software e.K.
4 * Copyright (c) 2021 ZAFENA AB
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining
7 * a copy of this software and associated documentation files (the
8 * "Software"), to deal in the Software without restriction, including
9 * without limitation the rights to use, copy, modify, merge, publish,
10 * distribute, sublicense, and/or sell copies of the Software, and to
11 * permit persons to whom the Software is furnished to do so, subject to
12 * the following conditions:
13 *
14 * The above copyright notice and this permission notice shall be
15 * included in all copies or substantial portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 */
25
26#include "org_direct_bt_EInfoReport.h"
27
28// #define VERBOSE_ON 1
29#include <jau/debug.hpp>
30
31#include "helper_base.hpp"
32#include "helper_dbt.hpp"
33
35
36using namespace direct_bt;
37using namespace jau::jni;
38
39/*
40 * Class: org_direct_bt_EInfoReport
41 * Method: ctorImpl1
42 * Signature: ()J
43 */
44jlong Java_org_direct_1bt_EInfoReport_ctorImpl1(JNIEnv *env, jobject obj) {
45 try {
46 (void)obj;
47 // new instance
49
50 return ref.release_to_jlong();
51 } catch(...) {
53 }
54 return (jlong) (intptr_t)nullptr;
55}
56
57/*
58 * Class: org_direct_bt_EInfoReport
59 * Method: ctorImpl2
60 * Signature: (J)J
61 */
62jlong Java_org_direct_1bt_EInfoReport_ctorImpl2(JNIEnv *env, jobject obj, jlong nativeInstanceOther) {
63 try {
64 (void)obj;
65 shared_ptr_ref<EInfoReport> ref_other_cpy(nativeInstanceOther);
66 return ref_other_cpy.release_to_jlong();
67 } catch(...) {
69 }
70 return (jlong) (intptr_t)nullptr;
71}
72
73void Java_org_direct_1bt_EInfoReport_replace_nativeImpl(JNIEnv *env, jobject obj, jlong nativeInstanceOther) {
74 try {
75 shared_ptr_ref<EInfoReport> ref_other(nativeInstanceOther);
76 shared_ptr_ref<EInfoReport> ref(env, obj);
77
78 // replace the shared managed object
79 ref = ref_other.shared_ptr();
80 ref.release_into_object(env, obj);
81 } catch(...) {
83 }
84}
85
86/*
87 * Class: org_direct_bt_EInfoReport
88 * Method: dtorImpl
89 * Signature: (J)V
90 */
91void Java_org_direct_1bt_EInfoReport_dtorImpl(JNIEnv *env, jclass clazz, jlong nativeInstance) {
92 (void)clazz;
93 try {
94 shared_ptr_ref<EInfoReport> sref(nativeInstance, false /* throw_on_nullptr */); // hold copy until done
95 if( nullptr != sref.pointer() ) {
96 std::shared_ptr<EInfoReport>* sref_ptr = castInstance<EInfoReport>(nativeInstance);
97 delete sref_ptr;
98 }
99 } catch(...) {
101 }
102}
103
104void Java_org_direct_1bt_EInfoReport_clear(JNIEnv *env, jobject obj) {
105 try {
106 shared_ptr_ref<EInfoReport> ref(env, obj); // hold until done
107 ref->clear();
108 } catch(...) {
110 }
111}
112
113jint Java_org_direct_1bt_EInfoReport_setImpl(JNIEnv *env, jobject obj, jobject jeir_other) {
114 try {
115 shared_ptr_ref<EInfoReport> ref(env, obj); // hold until done
116 shared_ptr_ref<EInfoReport> ref_other(env, jeir_other); // hold until done
117 return static_cast<jint>( number( ref->set(*ref_other) ) );
118 } catch(...) {
120 }
121 return 0;
122}
123
124/*
125 * Class: org_direct_bt_EInfoReport
126 * Method: setAddressTypeImpl
127 * Signature: (B)V
128 */
129void Java_org_direct_1bt_EInfoReport_setAddressTypeImpl(JNIEnv *env, jobject obj, jbyte jat) {
130 try {
131 shared_ptr_ref<EInfoReport> ref(env, obj); // hold until done
132 ref->setAddressType(static_cast<BDAddressType>(jat));
133 } catch(...) {
135 }
136}
137
138/*
139 * Class: org_direct_bt_EInfoReport
140 * Method: setAddressImpl
141 * Signature: ([B)V
142 */
143void Java_org_direct_1bt_EInfoReport_setAddressImpl(JNIEnv *env, jobject obj, jbyteArray jaddress) {
144 try {
145 shared_ptr_ref<EInfoReport> ref(env, obj); // hold until done
146
147 if( nullptr == jaddress ) {
148 throw jau::IllegalArgumentException("address null", E_FILE_LINE);
149 }
150 const size_t address_size = env->GetArrayLength(jaddress);
151 if( sizeof(EUI48) > address_size ) {
152 throw jau::IllegalArgumentException("address byte size "+std::to_string(address_size)+" < "+std::to_string(sizeof(EUI48)), E_FILE_LINE);
153 }
154 JNICriticalArray<uint8_t, jbyteArray> criticalArray(env); // RAII - release
155 uint8_t * address_ptr = criticalArray.get(jaddress, criticalArray.Mode::NO_UPDATE_AND_RELEASE);
156 if( nullptr == address_ptr ) {
157 throw jau::InternalError("GetPrimitiveArrayCritical(address byte array) is null", E_FILE_LINE);
158 }
159 const EUI48& address = *reinterpret_cast<EUI48 *>(address_ptr);
160
161 ref->setAddress(address);
162 } catch(...) {
164 }
165}
166
167/*
168 * Class: org_direct_bt_EInfoReport
169 * Method: setRSSI
170 * Signature: (B)V
171 */
172void Java_org_direct_1bt_EInfoReport_setRSSI(JNIEnv *env, jobject obj, jbyte jrssi) {
173 try {
174 shared_ptr_ref<EInfoReport> ref(env, obj); // hold until done
175 ref->setRSSI(static_cast<int8_t>(jrssi));
176 } catch(...) {
178 }
179}
180
181/*
182 * Class: org_direct_bt_EInfoReport
183 * Method: setTxPower
184 * Signature: (B)V
185 */
186void Java_org_direct_1bt_EInfoReport_setTxPower(JNIEnv *env, jobject obj, jbyte jtxp) {
187 try {
188 shared_ptr_ref<EInfoReport> ref(env, obj); // hold until done
189 ref->setTxPower(static_cast<int8_t>(jtxp));
190 } catch(...) {
192 }
193}
194
195/*
196 * Class: org_direct_bt_EInfoReport
197 * Method: setFlagsImpl
198 * Signature: (B)V
199 */
200void Java_org_direct_1bt_EInfoReport_setFlagsImpl(JNIEnv *env, jobject obj, jbyte jf) {
201 try {
202 shared_ptr_ref<EInfoReport> ref(env, obj); // hold until done
203 ref->setFlags(static_cast<GAPFlags>(jf));
204 } catch(...) {
206 }
207}
208
209/*
210 * Class: org_direct_bt_EInfoReport
211 * Method: addFlagImpl
212 * Signature: (B)V
213 */
214void Java_org_direct_1bt_EInfoReport_addFlagImpl(JNIEnv *env, jobject obj, jbyte jf) {
215 try {
216 shared_ptr_ref<EInfoReport> ref(env, obj); // hold until done
217 ref->addFlags(static_cast<GAPFlags>(jf));
218 } catch(...) {
220 }
221}
222
223/*
224 * Class: org_direct_bt_EInfoReport
225 * Method: setName
226 * Signature: (Ljava/lang/String;)V
227 */
228void Java_org_direct_1bt_EInfoReport_setName(JNIEnv *env, jobject obj, jstring jname) {
229 try {
230 shared_ptr_ref<EInfoReport> ref(env, obj); // hold until done
231 std::string name = from_jstring_to_string(env, jname);
232 ref->setName(name);
233 } catch(...) {
235 }
236}
237
238/*
239 * Class: org_direct_bt_EInfoReport
240 * Method: setShortName
241 * Signature: (Ljava/lang/String;)V
242 */
243void Java_org_direct_1bt_EInfoReport_setShortName(JNIEnv *env, jobject obj, jstring jsname) {
244 try {
245 shared_ptr_ref<EInfoReport> ref(env, obj); // hold until done
246 std::string sname = from_jstring_to_string(env, jsname);
247 ref->setShortName(sname);
248 } catch(...) {
250 }
251}
252
253/*
254 * Class: org_direct_bt_EInfoReport
255 * Method: addService
256 * Signature: (Ljava/lang/String;)V
257 */
258void Java_org_direct_1bt_EInfoReport_addService(JNIEnv *env, jobject obj, jstring juuid) {
259 try {
260 shared_ptr_ref<EInfoReport> ref(env, obj); // hold until done
261 std::string uuid_s = from_jstring_to_string(env, juuid);
262 std::shared_ptr<const jau::uuid_t> uuid = jau::uuid_t::create(uuid_s);
263 ref->addService(uuid);
264 } catch(...) {
266 }
267}
268
269/*
270 * Class: org_direct_bt_EInfoReport
271 * Method: setServicesComplete
272 * Signature: (Z)V
273 */
274void Java_org_direct_1bt_EInfoReport_setServicesComplete(JNIEnv *env, jobject obj, jboolean jv) {
275 try {
276 shared_ptr_ref<EInfoReport> ref(env, obj); // hold until done
277 ref->setServicesComplete(JNI_TRUE==jv);
278 } catch(...) {
280 }
281}
282
283/*
284 * Class: org_direct_bt_EInfoReport
285 * Method: setDeviceClass
286 * Signature: (I)V
287 */
288void Java_org_direct_1bt_EInfoReport_setDeviceClass(JNIEnv *env, jobject obj, jint jv) {
289 try {
290 shared_ptr_ref<EInfoReport> ref(env, obj); // hold until done
291 ref->setDeviceClass(static_cast<uint32_t>(jv));
292 } catch(...) {
294 }
295}
296
297/*
298 * Class: org_direct_bt_EInfoReport
299 * Method: setDeviceID
300 * Signature: (SSSS)V
301 */
302void Java_org_direct_1bt_EInfoReport_setDeviceID(JNIEnv *env, jobject obj, jshort jsource, jshort jvendor, jshort jproduct, jshort jversion) {
303 try {
304 shared_ptr_ref<EInfoReport> ref(env, obj); // hold until done
305 ref->setDeviceID(static_cast<uint16_t>(jsource), static_cast<uint16_t>(jvendor), static_cast<uint16_t>(jproduct), static_cast<uint16_t>(jversion));
306 } catch(...) {
308 }
309}
310
311/*
312 * Class: org_direct_bt_EInfoReport
313 * Method: setConnInterval
314 * Signature: (SS)V
315 */
316void Java_org_direct_1bt_EInfoReport_setConnInterval(JNIEnv *env, jobject obj, jshort jmin, jshort jmax) {
317 try {
318 shared_ptr_ref<EInfoReport> ref(env, obj); // hold until done
319 ref->setConnInterval(static_cast<uint16_t>(jmin), static_cast<uint16_t>(jmax));
320 } catch(...) {
322 }
323}
324
325/*
326 * Class: org_direct_bt_EInfoReport
327 * Method: getTimestamp
328 * Signature: ()J
329 */
330jlong Java_org_direct_1bt_EInfoReport_getTimestamp(JNIEnv *env, jobject obj) {
331 try {
332 shared_ptr_ref<EInfoReport> ref(env, obj); // hold until done
333 return static_cast<jlong>( ref->getTimestamp() );
334 } catch(...) {
336 }
337 return 0;
338}
339
340/*
341 * Class: org_direct_bt_EInfoReport
342 * Method: getEIRDataMaskImpl
343 * Signature: ()I
344 */
346 try {
347 shared_ptr_ref<EInfoReport> ref(env, obj); // hold until done
348 return static_cast<jint>( number( ref->getEIRDataMask() ) );
349 } catch(...) {
351 }
352 return 0;
353}
354
355jint Java_org_direct_1bt_EInfoReport_getSourceImpl(JNIEnv *env, jobject obj) {
356 try {
357 shared_ptr_ref<EInfoReport> ref(env, obj); // hold until done
358 return static_cast<jint>( EInfoReport::number( ref->getSource() ) );
359 } catch(...) {
361 }
362 return static_cast<jint>( EInfoReport::number( EInfoReport::Source::NA ) );
363}
364
365/*
366 * Class: org_direct_bt_EInfoReport
367 * Method: getFlagsImpl
368 * Signature: ()B
369 */
370jbyte Java_org_direct_1bt_EInfoReport_getFlagsImpl(JNIEnv *env, jobject obj) {
371 try {
372 shared_ptr_ref<EInfoReport> ref(env, obj); // hold until done
373 return static_cast<jbyte>( number( ref->getFlags() ) );
374 } catch(...) {
376 }
377 return 0;
378}
379
380/*
381 * Class: org_direct_bt_EInfoReport
382 * Method: getADAddressType
383 * Signature: ()B
384 */
386 try {
387 shared_ptr_ref<EInfoReport> ref(env, obj); // hold until done
388 return static_cast<jbyte>( ref->getADAddressType() );
389 } catch(...) {
391 }
392 return 0;
393}
394
395/*
396 * Class: org_direct_bt_EInfoReport
397 * Method: getAddressTypeImpl
398 * Signature: ()B
399 */
401 try {
402 shared_ptr_ref<EInfoReport> ref(env, obj); // hold until done
403 return static_cast<jbyte>( number( ref->getAddressType() ) );
404 } catch(...) {
406 }
407 return 0;
408}
409
410/*
411 * Class: org_direct_bt_EInfoReport
412 * Method: getAddressImpl
413 * Signature: ()[B
414 */
415jbyteArray Java_org_direct_1bt_EInfoReport_getAddressImpl(JNIEnv *env, jobject obj) {
416 try {
417 shared_ptr_ref<EInfoReport> ref(env, obj); // hold until done
418 const EUI48 & addr = ref->getAddress();
419 jbyteArray jaddr = env->NewByteArray(sizeof(addr));
420 env->SetByteArrayRegion(jaddr, 0, sizeof(addr), (const jbyte*)(addr.b));
421 return jaddr;
422 } catch(...) {
424 }
425 return nullptr;
426}
427
428/*
429 * Class: org_direct_bt_EInfoReport
430 * Method: getName
431 * Signature: ()Ljava/lang/String;
432 */
433jstring Java_org_direct_1bt_EInfoReport_getName(JNIEnv *env, jobject obj) {
434 try {
435 shared_ptr_ref<EInfoReport> ref(env, obj); // hold until done
436 return from_string_to_jstring(env, ref->getName());
437 } catch(...) {
439 }
440 return nullptr;
441}
442
443/*
444 * Class: org_direct_bt_EInfoReport
445 * Method: getShortName
446 * Signature: ()Ljava/lang/String;
447 */
448jstring Java_org_direct_1bt_EInfoReport_getShortName(JNIEnv *env, jobject obj) {
449 try {
450 shared_ptr_ref<EInfoReport> ref(env, obj); // hold until done
451 return from_string_to_jstring(env, ref->getShortName());
452 } catch(...) {
454 }
455 return nullptr;
456}
457
458/*
459 * Class: org_direct_bt_EInfoReport
460 * Method: getRSSI
461 * Signature: ()B
462 */
463jbyte Java_org_direct_1bt_EInfoReport_getRSSI(JNIEnv *env, jobject obj) {
464 try {
465 shared_ptr_ref<EInfoReport> ref(env, obj); // hold until done
466 return static_cast<jbyte>( ref->getRSSI() );
467 } catch(...) {
469 }
470 return 0;
471}
472
473/*
474 * Class: org_direct_bt_EInfoReport
475 * Method: getTxPower
476 * Signature: ()B
477 */
478jbyte Java_org_direct_1bt_EInfoReport_getTxPower(JNIEnv *env, jobject obj) {
479 try {
480 shared_ptr_ref<EInfoReport> ref(env, obj); // hold until done
481 return static_cast<jbyte>( ref->getTxPower() );
482 } catch(...) {
484 }
485 return 0;
486}
487
489{
490 try {
491 shared_ptr_ref<EInfoReport> ref(env, obj); // hold until done
492 std::shared_ptr<ManufactureSpecificData> mdata = ref->getManufactureSpecificData();
493
494 jclass map_cls = search_class(env, "java/util/HashMap");
495 jmethodID map_ctor = search_method(env, map_cls, "<init>", "(I)V", false);
496 jmethodID map_put = search_method(env, map_cls, "put", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;", false);
497
498 jclass short_cls = search_class(env, "java/lang/Short");
499 jmethodID short_ctor = search_method(env, short_cls, "<init>", "(S)V", false);
500 jobject result = nullptr;
501
502 if( nullptr != mdata ) {
503 result = env->NewObject(map_cls, map_ctor, 1);
504 jbyteArray arr = env->NewByteArray( (jsize) mdata->getData().size() );
505 env->SetByteArrayRegion(arr, 0, (jsize) mdata->getData().size(), (const jbyte *)mdata->getData().get_ptr());
506 jobject key = env->NewObject(short_cls, short_ctor, mdata->getCompany());
507 env->CallObjectMethod(result, map_put, key, arr);
508
509 env->DeleteLocalRef(arr);
510 env->DeleteLocalRef(key);
511 } else {
512 result = env->NewObject(map_cls, map_ctor, 0);
513 }
514 if (nullptr == result) {
515 throw jau::OutOfMemoryError("new HashMap() returned null", E_FILE_LINE);
516 }
517 return result;
518 } catch(...) {
520 }
521 return nullptr;
522}
523
524/*
525 * Class: org_direct_bt_EInfoReport
526 * Method: getServices
527 * Signature: ()Ljava/util/List;
528 */
529jobject Java_org_direct_1bt_EInfoReport_getServices(JNIEnv *env, jobject obj) {
530 try {
531 shared_ptr_ref<EInfoReport> ref(env, obj); // hold until done
532 jau::darray<std::shared_ptr<const jau::uuid_t>> service_uuids = ref->getServices();
533 jau::function<jobject(JNIEnv*, const std::shared_ptr<const jau::uuid_t>&)> ctor_uuid2string =
534 [](JNIEnv *env_, const std::shared_ptr<const jau::uuid_t>& uuid_ptr)->jobject {
535 return from_string_to_jstring(env_, uuid_ptr->toUUID128String());
536 };
537 return convert_vector_sharedptr_to_jarraylist<jau::darray<std::shared_ptr<const jau::uuid_t>>, const jau::uuid_t>(env, service_uuids, ctor_uuid2string);
538 } catch(...) {
540 }
541 return nullptr;
542}
543
544/*
545 * Class: org_direct_bt_EInfoReport
546 * Method: getServicesComplete
547 * Signature: ()Z
548 */
549jboolean Java_org_direct_1bt_EInfoReport_getServicesComplete(JNIEnv *env, jobject obj) {
550 try {
551 shared_ptr_ref<EInfoReport> ref(env, obj); // hold until done
552 return ref->getServicesComplete() ? JNI_TRUE : JNI_FALSE;
553 } catch(...) {
555 }
556 return 0;
557}
558
559/*
560 * Class: org_direct_bt_EInfoReport
561 * Method: getDeviceClass
562 * Signature: ()I
563 */
565 try {
566 shared_ptr_ref<EInfoReport> ref(env, obj); // hold until done
567 return static_cast<jint>( ref->getDeviceClass() );
568 } catch(...) {
570 }
571 return 0;
572}
573
574/*
575 * Class: org_direct_bt_EInfoReport
576 * Method: getDeviceIDSource
577 * Signature: ()S
578 */
580 try {
581 shared_ptr_ref<EInfoReport> ref(env, obj); // hold until done
582 return static_cast<jshort>( ref->getDeviceIDSource() );
583 } catch(...) {
585 }
586 return 0;
587}
588
589/*
590 * Class: org_direct_bt_EInfoReport
591 * Method: getDeviceIDVendor
592 * Signature: ()S
593 */
595 try {
596 shared_ptr_ref<EInfoReport> ref(env, obj); // hold until done
597 return static_cast<jshort>( ref->getDeviceIDVendor() );
598 } catch(...) {
600 }
601 return 0;
602}
603
604/*
605 * Class: org_direct_bt_EInfoReport
606 * Method: getDeviceIDProduct
607 * Signature: ()S
608 */
610 try {
611 shared_ptr_ref<EInfoReport> ref(env, obj); // hold until done
612 return static_cast<jshort>( ref->getDeviceIDProduct() );
613 } catch(...) {
615 }
616 return 0;
617}
618
619/*
620 * Class: org_direct_bt_EInfoReport
621 * Method: getDeviceIDVersion
622 * Signature: ()S
623 */
625 try {
626 shared_ptr_ref<EInfoReport> ref(env, obj); // hold until done
627 return static_cast<jshort>( ref->getDeviceIDVersion() );
628 } catch(...) {
630 }
631 return 0;
632}
633
634/*
635 * Class: org_direct_bt_EInfoReport
636 * Method: getConnInterval
637 * Signature: ([S)V
638 */
639void Java_org_direct_1bt_EInfoReport_getConnInterval(JNIEnv *env, jobject obj, jshortArray jminmax) {
640 try {
641 shared_ptr_ref<EInfoReport> ref(env, obj); // hold until done
642
643 if( nullptr == jminmax ) {
644 throw jau::IllegalArgumentException("address null", E_FILE_LINE);
645 }
646 const size_t array_size = env->GetArrayLength(jminmax);
647 if( 2 > array_size ) {
648 throw jau::IllegalArgumentException("minmax array size "+std::to_string(array_size)+" < 2", E_FILE_LINE);
649 }
650 JNICriticalArray<uint16_t, jshortArray> criticalArray(env); // RAII - release
651 uint16_t * array_ptr = criticalArray.get(jminmax, criticalArray.Mode::UPDATE_AND_RELEASE);
652 if( nullptr == array_ptr ) {
653 throw jau::InternalError("GetPrimitiveArrayCritical(short array) is null", E_FILE_LINE);
654 }
655 ref->getConnInterval(array_ptr[0], array_ptr[1]);
656 } catch(...) {
658 }
659}
660
661/*
662 * Class: org_direct_bt_EInfoReport
663 * Method: getDeviceIDModalias
664 * Signature: ()Ljava/lang/String;
665 */
667 try {
668 shared_ptr_ref<EInfoReport> ref(env, obj); // hold until done
669 return from_string_to_jstring(env, ref->getDeviceIDModalias());
670 } catch(...) {
672 }
673 return nullptr;
674}
675
676/*
677 * Class: org_direct_bt_EInfoReport
678 * Method: eirDataMaskToString
679 * Signature: ()Ljava/lang/String;
680 */
682 try {
683 shared_ptr_ref<EInfoReport> ref(env, obj); // hold until done
684 return from_string_to_jstring(env, ref->eirDataMaskToString());
685 } catch(...) {
687 }
688 return nullptr;
689}
690
691/*
692 * Class: org_direct_bt_EInfoReport
693 * Method: toString
694 * Signature: (Z)Ljava/lang/String;
695 */
696jstring Java_org_direct_1bt_EInfoReport_toString(JNIEnv *env, jobject obj, jboolean includeServices) {
697 try {
698 shared_ptr_ref<EInfoReport> ref(env, obj); // hold until done
699 return from_string_to_jstring(env, ref->toString(JNI_TRUE==includeServices));
700 } catch(...) {
702 }
703 return nullptr;
704}
void Java_org_direct_1bt_EInfoReport_clear(JNIEnv *env, jobject obj)
jint Java_org_direct_1bt_EInfoReport_setImpl(JNIEnv *env, jobject obj, jobject jeir_other)
void Java_org_direct_1bt_EInfoReport_dtorImpl(JNIEnv *env, jclass clazz, jlong nativeInstance)
Definition: EInfoReport.cxx:91
void Java_org_direct_1bt_EInfoReport_setDeviceClass(JNIEnv *env, jobject obj, jint jv)
jint Java_org_direct_1bt_EInfoReport_getSourceImpl(JNIEnv *env, jobject obj)
jbyte Java_org_direct_1bt_EInfoReport_getTxPower(JNIEnv *env, jobject obj)
jshort Java_org_direct_1bt_EInfoReport_getDeviceIDSource(JNIEnv *env, jobject obj)
void Java_org_direct_1bt_EInfoReport_replace_nativeImpl(JNIEnv *env, jobject obj, jlong nativeInstanceOther)
Definition: EInfoReport.cxx:73
void Java_org_direct_1bt_EInfoReport_setTxPower(JNIEnv *env, jobject obj, jbyte jtxp)
jint Java_org_direct_1bt_EInfoReport_getEIRDataMaskImpl(JNIEnv *env, jobject obj)
jbyte Java_org_direct_1bt_EInfoReport_getRSSI(JNIEnv *env, jobject obj)
jlong Java_org_direct_1bt_EInfoReport_getTimestamp(JNIEnv *env, jobject obj)
jshort Java_org_direct_1bt_EInfoReport_getDeviceIDVersion(JNIEnv *env, jobject obj)
void Java_org_direct_1bt_EInfoReport_setFlagsImpl(JNIEnv *env, jobject obj, jbyte jf)
void Java_org_direct_1bt_EInfoReport_getConnInterval(JNIEnv *env, jobject obj, jshortArray jminmax)
void Java_org_direct_1bt_EInfoReport_addFlagImpl(JNIEnv *env, jobject obj, jbyte jf)
void Java_org_direct_1bt_EInfoReport_setAddressImpl(JNIEnv *env, jobject obj, jbyteArray jaddress)
void Java_org_direct_1bt_EInfoReport_setDeviceID(JNIEnv *env, jobject obj, jshort jsource, jshort jvendor, jshort jproduct, jshort jversion)
jshort Java_org_direct_1bt_EInfoReport_getDeviceIDVendor(JNIEnv *env, jobject obj)
jint Java_org_direct_1bt_EInfoReport_getDeviceClass(JNIEnv *env, jobject obj)
void Java_org_direct_1bt_EInfoReport_setServicesComplete(JNIEnv *env, jobject obj, jboolean jv)
jstring Java_org_direct_1bt_EInfoReport_getName(JNIEnv *env, jobject obj)
void Java_org_direct_1bt_EInfoReport_setConnInterval(JNIEnv *env, jobject obj, jshort jmin, jshort jmax)
jstring Java_org_direct_1bt_EInfoReport_getDeviceIDModalias(JNIEnv *env, jobject obj)
jobject Java_org_direct_1bt_EInfoReport_getServices(JNIEnv *env, jobject obj)
void Java_org_direct_1bt_EInfoReport_setRSSI(JNIEnv *env, jobject obj, jbyte jrssi)
void Java_org_direct_1bt_EInfoReport_setShortName(JNIEnv *env, jobject obj, jstring jsname)
jobject Java_org_direct_1bt_EInfoReport_getManufacturerData(JNIEnv *env, jobject obj)
jshort Java_org_direct_1bt_EInfoReport_getDeviceIDProduct(JNIEnv *env, jobject obj)
jstring Java_org_direct_1bt_EInfoReport_toString(JNIEnv *env, jobject obj, jboolean includeServices)
jbyte Java_org_direct_1bt_EInfoReport_getADAddressType(JNIEnv *env, jobject obj)
void Java_org_direct_1bt_EInfoReport_setName(JNIEnv *env, jobject obj, jstring jname)
jboolean Java_org_direct_1bt_EInfoReport_getServicesComplete(JNIEnv *env, jobject obj)
void Java_org_direct_1bt_EInfoReport_addService(JNIEnv *env, jobject obj, jstring juuid)
jstring Java_org_direct_1bt_EInfoReport_eirDataMaskToString(JNIEnv *env, jobject obj)
jstring Java_org_direct_1bt_EInfoReport_getShortName(JNIEnv *env, jobject obj)
jbyte Java_org_direct_1bt_EInfoReport_getAddressTypeImpl(JNIEnv *env, jobject obj)
jbyteArray Java_org_direct_1bt_EInfoReport_getAddressImpl(JNIEnv *env, jobject obj)
jlong Java_org_direct_1bt_EInfoReport_ctorImpl1(JNIEnv *env, jobject obj)
Definition: EInfoReport.cxx:44
void Java_org_direct_1bt_EInfoReport_setAddressTypeImpl(JNIEnv *env, jobject obj, jbyte jat)
jlong Java_org_direct_1bt_EInfoReport_ctorImpl2(JNIEnv *env, jobject obj, jlong nativeInstanceOther)
Definition: EInfoReport.cxx:62
jbyte Java_org_direct_1bt_EInfoReport_getFlagsImpl(JNIEnv *env, jobject obj)
#define E_FILE_LINE
Collection of 'Extended Advertising Data' (EAD), 'Advertising Data' (AD) or 'Extended Inquiry Respons...
Definition: BTTypes0.hpp:898
Implementation of a dynamic linear array storage, aka vector.
Definition: darray.hpp:148
Class template jau::function is a general-purpose static-polymorphic function wrapper.
T * get(U jarray_val, Mode mode_val=UPDATE_AND_RELEASE)
Acquired the primitive array.
Definition: jni_mem.hpp:193
A std::shared_ptr<T> storage instance to be copied from and released into a java object's long native...
Definition: helper_jni.hpp:393
const std::shared_ptr< T > & shared_ptr() const
Provides access to const reference of shared_ptr<T>, r-value.
Definition: helper_jni.hpp:630
std::shared_ptr< T > * pointer() noexcept
Provides access to the shared_ptr<T> pointer, l-value of storage.
Definition: helper_jni.hpp:621
std::string toString() const noexcept
Definition: helper_jni.hpp:657
jlong release_to_jlong() noexcept
Release ownership and return the jlong representation of the shared_ptr<T> storage.
Definition: helper_jni.hpp:574
void release_into_object(JNIEnv *env, jobject obj)
Deletes the std::shared_ptr<T> storage of the target java object if exists first and writes this inst...
Definition: helper_jni.hpp:593
static std::unique_ptr< uuid_t > create(TypeSize const t, uint8_t const *const buffer, lb_endian_t const le_or_be)
Definition: uuid.cpp:56
std::string to_string(const alphabet &v) noexcept
Definition: base_codec.hpp:97
BDAddressType
BT Core Spec v5.2: Vol 3, Part C Generic Access Profile (GAP): 15.1.1.1 Public Bluetooth address.
Definition: BTAddress.hpp:60
GAPFlags
GAP Flags values, see Bluetooth Core Specification Supplement V9, Part A: 1.3, p 12 pp.
Definition: BTTypes0.hpp:802
constexpr uint32_t number(const iostate rhs) noexcept
Definition: byte_stream.hpp:72
jstring from_string_to_jstring(JNIEnv *env, const std::string &str)
jmethodID search_method(JNIEnv *env, jclass clazz, const char *method_name, const char *prototype, bool is_static)
std::string from_jstring_to_string(JNIEnv *env, jstring str)
jclass search_class(JNIEnv *env, const char *clazz_name)
#define rethrow_and_raise_java_exception(E)
Re-throw current exception and raise respective java exception using any matching function above.
Definition: helper_base.hpp:52
A packed 48 bit EUI-48 identifier, formerly known as MAC-48 or simply network device MAC address (Med...
Definition: eui48.hpp:324
uint8_t b[6]
Definition: eui48.hpp:324