-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathLeapC.java
1797 lines (1676 loc) · 78.6 KB
/
LeapC.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
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
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* Copyright 2020-2022 Jakob Hjelm (Komposten)
*
* This file is part of LeapJna.
*
* LeapJna is a free Java library: you can use, redistribute it and/or modify
* it under the terms of the MIT license as written in the LICENSE file in the root
* of this project.
*/
package komposten.leapjna.leapc;
import com.sun.jna.Library;
import com.sun.jna.Native;
import com.sun.jna.Pointer;
import com.sun.jna.ptr.IntByReference;
import com.sun.jna.ptr.LongByReference;
import komposten.leapjna.leapc.data.LEAP_ALLOCATOR;
import komposten.leapjna.leapc.data.LEAP_CLOCK_REBASER;
import komposten.leapjna.leapc.data.LEAP_CONNECTION;
import komposten.leapjna.leapc.data.LEAP_CONNECTION_CONFIG;
import komposten.leapjna.leapc.data.LEAP_CONNECTION_INFO;
import komposten.leapjna.leapc.data.LEAP_CONNECTION_MESSAGE;
import komposten.leapjna.leapc.data.LEAP_DEVICE;
import komposten.leapjna.leapc.data.LEAP_DEVICE_INFO;
import komposten.leapjna.leapc.data.LEAP_DEVICE_REF;
import komposten.leapjna.leapc.data.LEAP_IMAGE;
import komposten.leapjna.leapc.data.LEAP_POINT_MAPPING;
import komposten.leapjna.leapc.data.LEAP_RECORDING;
import komposten.leapjna.leapc.data.LEAP_RECORDING_PARAMETERS;
import komposten.leapjna.leapc.data.LEAP_RECORDING_STATUS;
import komposten.leapjna.leapc.data.LEAP_TELEMETRY_DATA;
import komposten.leapjna.leapc.data.LEAP_VARIANT;
import komposten.leapjna.leapc.data.LEAP_VECTOR;
import komposten.leapjna.leapc.data.LEAP_VERSION;
import komposten.leapjna.leapc.enums.eLeapConnectionConfig;
import komposten.leapjna.leapc.enums.eLeapEventType;
import komposten.leapjna.leapc.enums.eLeapPerspectiveType;
import komposten.leapjna.leapc.enums.eLeapPolicyFlag;
import komposten.leapjna.leapc.enums.eLeapRS;
import komposten.leapjna.leapc.enums.eLeapRecordingFlags;
import komposten.leapjna.leapc.enums.eLeapTrackingMode;
import komposten.leapjna.leapc.enums.eLeapVersionPart;
import komposten.leapjna.leapc.events.LEAP_CONFIG_CHANGE_EVENT;
import komposten.leapjna.leapc.events.LEAP_CONFIG_RESPONSE_EVENT;
import komposten.leapjna.leapc.events.LEAP_HEAD_POSE_EVENT;
import komposten.leapjna.leapc.events.LEAP_IMAGE_EVENT;
import komposten.leapjna.leapc.events.LEAP_POLICY_EVENT;
import komposten.leapjna.leapc.events.LEAP_TRACKING_EVENT;
import komposten.leapjna.leapc.events.LEAP_TRACKING_MODE_EVENT;
import komposten.leapjna.leapc.util.ArrayPointer;
import komposten.leapjna.leapc.util.PrimitiveArrayPointer;
import komposten.leapjna.util.Configurations;
/**
* <p>
* The main interface for interacting with the UltraLeap C API.
* </p>
* <p>
* Use {@link #INSTANCE LeapC.INSTANCE} to obtain an instance of this interface
* that is linked to the native API using JNA. After that all API methods can be
* called on that instance in a similar way to how the C API is used.
* </p>
*/
@SuppressWarnings("deprecation")
public interface LeapC extends Library
{
final LeapC INSTANCE = (LeapC) Native.synchronizedLibrary(Native
.load(LeapCConfig.getDllName(), LeapC.class, LeapCConfig.getLibraryOptions()));
/**
* <p>
* Creates a new connection to the Ultraleap Tracking Service and stores a handle for the
* connection in the provided {@link LEAP_CONNECTION}.
* </p>
* <p>
* Pass the LEAP_CONNECTION pointer to {@link #LeapOpenConnection(Pointer)} to establish
* a connection to the Ultraleap Tracking Service; and to subsequent operations on the same
* connection.
* </p>
*
* @param pConfig The configuration to be used with the newly created connection. If
* pConfig is null, a connection is created with a default configuration.
* @param phConnection Receives a pointer to the connection object, set to invalid on
* failure.
* @return The operation result code, a member of the {@link eLeapRS} enumeration.
* @see <a href=
* "https://docs.ultraleap.com/tracking-api/group/group___functions.html#_CPPv420LeapCreateConnectionPK22LEAP_CONNECTION_CONFIGP15LEAP_CONNECTION">LeapC
* API - LeapCreateConnection</a>
* @since LeapJna 1.0.0
* @since Ultraleap Orion SDK 3.0.0
*/
public eLeapRS LeapCreateConnection(LEAP_CONNECTION_CONFIG pConfig,
LEAP_CONNECTION phConnection);
/**
* <p>
* Destroys a previously opened connection.
* </p>
* <p>
* This method closes the specified connection object if it is opened, destroys the
* underlying object, and releases all resources associated with it.
* </p>
* <p>
* This method never fails.
* </p>
* <p>
* Be sure that no other functions are accessing the connection when this function is
* called.
* </p>
*
* @param hConnection A handle to the connection object to be destroyed, created by
* {@link #LeapCreateConnection(LEAP_CONNECTION_CONFIG, LEAP_CONNECTION)
* LeapCreateConnection()}. Use {@link LEAP_CONNECTION#handle} to obtain the
* handle from the connection object.
* @see <a href=
* "https://docs.ultraleap.com/tracking-api/group/group___functions.html#_CPPv421LeapDestroyConnection15LEAP_CONNECTION">LeapC
* API - LeapDestroyConnection</a>
* @since LeapJna 1.0.0
* @since Ultraleap Orion SDK 3.0.0
*/
public void LeapDestroyConnection(Pointer hConnection);
/**
* <p>
* Opens a connection to the Ultraleap Tracking Service.
* </p>
* <p>
* This routine will not block. A connection to the service will not be established
* until the first invocation of
* {@link #LeapPollConnection(Pointer, int, LEAP_CONNECTION_MESSAGE)}.
* </p>
*
* @param hConnection A handle to the connection object, created by
* {@link #LeapCreateConnection(LEAP_CONNECTION_CONFIG, LEAP_CONNECTION)
* LeapCreateConnection()}. Use {@link LEAP_CONNECTION#handle} to obtain the
* handle from the connection object.
* @return The operation result code, a member of the {@link eLeapRS} enumeration.
* @see <a href=
* "https://docs.ultraleap.com/tracking-api/group/group___functions.html#_CPPv418LeapOpenConnection15LEAP_CONNECTION">LeapC
* API - LeapOpenConnection</a>
* @since LeapJna 1.0.0
* @since Ultraleap Orion SDK 3.0.0
*/
public eLeapRS LeapOpenConnection(Pointer hConnection);
/**
* <p>
* Closes a previously opened connection.
* </p>
* <p>
* This method closes the specified connection object if it is opened
* </p>
* <p>
* This method never fails.
* </p>
*
* @param hConnection A handle to the connection object, created by
* {@link #LeapCreateConnection(LEAP_CONNECTION_CONFIG, LEAP_CONNECTION)
* LeapCreateConnection()}. Use {@link LEAP_CONNECTION#handle} to obtain the
* handle from the connection object.
* @see <a href=
* "https://docs.ultraleap.com/tracking-api/group/group___functions.html#_CPPv419LeapCloseConnection15LEAP_CONNECTION">LeapC
* API - LeapCloseConnection</a>
* @since LeapJna 1.0.0
* @since Ultraleap Orion SDK 4.0.0
*/
public void LeapCloseConnection(Pointer hConnection);
/**
* <p>
* Polls the connection for a new event.
* </p>
* <p>
* The specific types of events that may be received are not configurable in this
* entrypoint. Configure the device or connection object directly to change what events
* will be received.
* </p>
* <p>
* Pointers in the retrieved event message structure will be valid until the associated
* connection or device is closed, or the next call to
* <code>LeapPollConnection()</code>.
* </p>
* <p>
* Calling this method concurrently will return {@link eLeapRS#ConcurrentPoll}.
* </p>
*
* @param hConnection The connection handle created by
* {@link #LeapCreateConnection(LEAP_CONNECTION_CONFIG, LEAP_CONNECTION)
* LeapCreateConnection()}. Use {@link LEAP_CONNECTION#handle} to obtain the
* handle from the connection object.
* @param timeout The maximum amount of time to wait, in milliseconds. If this value is
* zero, the <code>message</code> pointer references the next queued message,
* if there is one, and returns immediately.
* @param message A structure that is filled with event information. This structure will
* be valid as long as the <code>LEAP_CONNECTION</code> object is valid.
* @return The operation result code, a member of the {@link eLeapRS} enumeration. If
* the operation times out, this method will return {@link eLeapRS#Timeout} and
* the <code>message</code> pointer will reference a message of type
* {@link eLeapEventType#None}.
* @see <a href=
* "https://docs.ultraleap.com/tracking-api/group/group___functions.html#_CPPv418LeapPollConnection15LEAP_CONNECTION8uint32_tP23LEAP_CONNECTION_MESSAGE">LeapC
* API - LeapPollConnection</a>
* @since LeapJna 1.0.0
* @since Ultraleap Orion SDK 3.0.0
*/
public eLeapRS LeapPollConnection(Pointer hConnection, int timeout,
LEAP_CONNECTION_MESSAGE message);
/**
*
* <p>
* Retrieves status information about the specified connection.
* </p>
* <p>
* Call {@link #LeapCreateConnection(LEAP_CONNECTION_CONFIG, LEAP_CONNECTION)
* LeapCreateConnection()} to generate the handle for the connection; call
* {@link #LeapOpenConnection(Pointer) LeapOpenConnection} to establish the connection;
* then call this function to check the connection status.
* </p>
*
* @param hConnection The handle of the connection of interest. Created by
* <code>LeapCreateConnection()</code>. Use {@link LEAP_CONNECTION#handle} to
* obtain the handle from the connection object.
* @param pInfo A pointer to a structure that receives additional connection
* information. On input, the size field of <code>pInfo</code> is the size of
* the buffer (i.e. the size of a {@link LEAP_CONNECTION_INFO} struct); On
* output, the size field of <code>pInfo</code> receives the size necessary to
* hold the entire information block.
* @return The operation result code, a member of the {@link eLeapRS} enumeration.
* @see <a href=
* "https://docs.ultraleap.com/tracking-api/group/group___functions.html#_CPPv421LeapGetConnectionInfo15LEAP_CONNECTIONP20LEAP_CONNECTION_INFO">LeapC
* API - LeapGetConnectionInfo</a>
* @since LeapJna 1.0.0
* @since Ultraleap Orion SDK 3.0.0
*/
public eLeapRS LeapGetConnectionInfo(Pointer hConnection, LEAP_CONNECTION_INFO pInfo);
/**
* <p>
* Retrieves a list of Ultraleap Tracking camera devices currently attached to the system.
* </p>
* <p>
* To get the number of connected devices, call this function with the
* <code>pArray</code> parameter set to <code>null</code>. The number of devices is
* written to the memory specified by <code>pnArray</code>. Use the device count to
* create an array of {@link LEAP_DEVICE_REF} structs large enough to hold the number of
* connected devices. Finally, call <code>LeapGetDeviceList()</code> with this array and
* known count to get the list of Leap devices. A device must be opened with
* {@link #LeapOpenDevice(LEAP_DEVICE_REF, LEAP_DEVICE)} before device properties can be
* queried.
* </p>
*
* @param hConnection The connection handle created by
* {@link #LeapCreateConnection(LEAP_CONNECTION_CONFIG, LEAP_CONNECTION)
* LeapCreateConnection()}. Use {@link LEAP_CONNECTION#handle} to obtain the
* handle from the connection object.
* @param pArray A pointer to an array that LeapC fills with the device list. Use
* {@link ArrayPointer#empty(Class, int)} with the appropriate array size to
* create the pointer.
* @param pnArray On input, set to the number of elements in <code>pArray</code>; on
* output LeapC sets this to the number of valid device handles.
* @return The operation result code, a member of the {@link eLeapRS} enumeration.
* @see <a href=
* "https://docs.ultraleap.com/tracking-api/group/group___functions.html#_CPPv417LeapGetDeviceList15LEAP_CONNECTIONP15LEAP_DEVICE_REFP8uint32_t">LeapC
* API - LeapGetDeviceList</a>
* @since LeapJna 1.0.0
* @since Ultraleap Orion SDK 3.0.0
*/
public eLeapRS LeapGetDeviceList(Pointer hConnection,
ArrayPointer<LEAP_DEVICE_REF> pArray, IntByReference pnArray);
/**
* <p>
* Opens a device reference and retrieves a handle to the device.
* </p>
* <p>
* To ensure resources are properly freed, users must call
* {@link #LeapCloseDevice(Pointer)} when finished with the device, even if the retrieved
* device has problems or cannot stream.
* </p>
*
* @param rDevice A device reference.
* @param phDevice A pointer that receives the opened device handle.
* @return The operation result code, a member of the {@link eLeapRS} enumeration.
* @see <a href=
* "https://docs.ultraleap.com/tracking-api/group/group___functions.html#_CPPv414LeapOpenDevice15LEAP_DEVICE_REFP11LEAP_DEVICE">LeapC
* API - LeapOpenDevice</a>
* @since LeapJna 1.0.0
* @since Ultraleap Orion SDK 3.0.0
*/
public eLeapRS LeapOpenDevice(LEAP_DEVICE_REF rDevice, LEAP_DEVICE phDevice);
/**
* Closes a device handle previously opened with
* {@link #LeapOpenDevice(LEAP_DEVICE_REF, LEAP_DEVICE)}.
*
* @param hDevice The device handle to close. Use {@link LEAP_DEVICE#handle} to obtain
* the handle from the device object.
* @see <a href=
* "https://docs.ultraleap.com/tracking-api/group/group___functions.html#_CPPv415LeapCloseDevice11LEAP_DEVICE">LeapC
* API - LeapCloseDevice</a>
* @since LeapJna 1.0.0
* @since Ultraleap Orion SDK 3.0.0
*/
public void LeapCloseDevice(Pointer hDevice);
/**
* <p>
* For a multi-device aware client, sets the device to use in the context of non-"Ex"
* API functions which are logically device-specific but don't provide a device
* parameter.
* </p>
* <p>
* Automatically subscribes to the specified device (see
* {@link #LeapSubscribeEvents(Pointer, Pointer)}), and if
* <code>unsubscribeOthers</code> is '<code>1</code>', then unsubscribes from all other
* devices as well (see {@link #LeapUnsubscribeEvents(Pointer, Pointer)}).
* </p>
* <p>
* Affects future invocations of the following functions:
* <ul>
* <li>LeapCameraMatrix()
* <li>LeapDistortionCoeffs()
* <li>LeapGetFrameSize()
* <li>LeapInterpolateFrame()
* <li>LeapInterpolateFrameFromTime()
* <li>LeapPixelToRectilinear()
* <li>LeapRectilinearToPixel()
* </ul>
* </p>
* <p>
* It is not necessary to call this function from a client that does not claim to be
* multi-device-aware (see {@link eLeapConnectionConfig} and
* {@link #LeapCreateConnection(LEAP_CONNECTION_CONFIG, LEAP_CONNECTION)}).
* </p>
*
* @param hConnection The connection handle created by
* {@link #LeapCreateConnection(LEAP_CONNECTION_CONFIG, LEAP_CONNECTION)
* LeapCreateConnection()}. Use {@link LEAP_CONNECTION#handle} to obtain the
* handle from the connection object.
* @param hDevice A handle to the device to be queried. Use {@link LEAP_DEVICE#handle}
* to obtain the handle from the device object.
* @param unsubscribeOthers Set to '<code>1</code>' to unsubscribe from all other
* devices, or <code>0</code> to keep all subscriptions.
* @return The operation result code, a member of the {@link eLeapRS} enumeration.
* @since LeapJna 1.2.0
* @since Ultraleap Gemini SDK 5.4.0
*/
public eLeapRS LeapSetPrimaryDevice(Pointer hConnection, Pointer hDevice, int unsubscribeOthers);
/**
* <p>
* Gets device properties.
* </p>
* <p>
* To get the device serial number you must supply a {@link LEAP_DEVICE_INFO} struct
* whose serial member points to a char array large enough to hold the null-terminated
* serial number string. To get the required length, call
* {@link #LeapGetDeviceInfo(Pointer, LEAP_DEVICE_INFO)} using a
* <code>LEAP_DEVICE_INFO</code> struct that has serial set to <code>null</code>. This
* will return {@link eLeapRS#InsufficientBuffer}, but LeapC still sets the
* <code>serial_length</code> field of the struct to the required length. You can then
* allocate memory for the string (using e.g.
* {@link LEAP_DEVICE_INFO#allocateSerialBuffer(int)}), set the serial field, and call
* this function again.
* </p>
*
* @param hDevice A handle to the device to be queried. Use {@link LEAP_DEVICE#handle}
* to obtain the handle from the device object.
* @param info The struct to receive the device property data.
* @return The operation result code, a member of the {@link eLeapRS} enumeration.
* @see <a href=
* "https://docs.ultraleap.com/tracking-api/group/group___functions.html#_CPPv417LeapGetDeviceInfo11LEAP_DEVICEP16LEAP_DEVICE_INFO">LeapC
* API - LeapGetDeviceInfo</a>
* @since LeapJna 1.0.0
* @since Ultraleap Orion SDK 3.0.0
*/
public eLeapRS LeapGetDeviceInfo(Pointer hDevice, LEAP_DEVICE_INFO info);
/**
* <p>
* Get the transform to world coordinates from 3D Leap coordinates.
* </p>
* <p>
* To get the transform, you must supply an array of 16 elements.
* </p>
* <p>
* The function will return a an array representing a 4 x 4 matrix of the form:
* <pre>
* R, t
* 0, 1
*
* where:
* R is a 3 x 3 rotation matrix
* t is a 3 x 1 translation vector
* </pre>
* </p>
* <p>
* Note that the matrix is in column major, e.g. transform[12] corresponds to the x coordinate of the
* translation vector t.
* </p>
* <p>
* A possible pipeline would be, for example:
* <ol>
* <li>Get "palm_pos" the position of the center of the palm (as a 3x1 vector)
* <li>Construct a 4x1 vector using the palm_position: palm_pos_4 = (palm_pos.x; palm_pos.y; palm_pos.z; 1.0f)
* <li>Create a 4x4 matrix "trans_mat" as illustrated above using the returned transform
* <li>Get the position of the center of the palm in world coordinates by multiplying trans_mat and palm_pos_4:
* center_world_4 = trans_mat * palm_pos_4
* </ol>
* </p>
* <p>
* This function returns eLeapRS_Unsupported in the case where this functionality is not yet supported.
* </p>
*
* @param hDevice A handle to the device to be queried. Use {@link LEAP_DEVICE#handle}
* to obtain the handle from the device object.
* @param transform A pointer to a single-precision float array of size 16, containing
* the coefficients of the 4x4 matrix in Column Major order.
* @return The operation result code, a member of the {@link eLeapRS} enumeration.
* @since LeapJna 1.2.0
* @since Ultraleap Gemini SDK 5.4.0
*/
public eLeapRS LeapGetDeviceTransform(Pointer hDevice, PrimitiveArrayPointer transform);
/**
* <p>
* Provides the human-readable canonical name of the specified device model.
* </p>
* <p>
* This method is guaranteed to never return <code>null</code> for the
* {@link LEAP_DEVICE_INFO#pid} field returned by a successful call to
* {@link LeapC#LeapGetDeviceInfo(Pointer, LEAP_DEVICE_INFO)}.
* </p>
*
* @param pid The pid of the device.
*
* @return The string name of the device model, or <code>null</code> if the device type
* string is invalid.
* @see <a href=
* "https://docs.ultraleap.com/tracking-api/group/group___functions.html#_CPPv421LeapDevicePIDToString14eLeapDevicePID">LeapC
* API - LeapDevicePIDToString</a>
* @since LeapJna 1.0.0
*/
public String LeapDevicePIDToString(int pid);
/**
* <p>
* Subscribe to event messages based on device.
* </p>
* <p>
* If events from multiple devices are being sent from a service, this function allows
* the client to receive events from the specified device. Clients that claim to be
* multi-device-aware (see {@link eLeapConnectionConfig} and
* {@link #LeapCreateConnection(LEAP_CONNECTION_CONFIG, LEAP_CONNECTION)}) must
* subscribe to a device to receive various device-specific events.
* </p>
*
* @param hConnection The connection handle created by
* {@link #LeapCreateConnection(LEAP_CONNECTION_CONFIG, LEAP_CONNECTION)
* LeapCreateConnection()}. Use {@link LEAP_CONNECTION#handle} to obtain the
* handle from the connection object.
* @param hDevice The device handle to close. Use {@link LEAP_DEVICE#handle} to obtain
* the handle from the device object.
* @return The operation result code, a member of the {@link eLeapRS} enumeration.
* @since LeapJna 1.2.0
* @since Ultraleap Gemini SDK 5.4.0
*/
public eLeapRS LeapSubscribeEvents(Pointer hConnection, Pointer hDevice);
/**
* <p>
* Unsubscribe from event messages based on device.
* </p>
* <p>
* If events from multiple devices are being sent from a service, this function
* prevents receiving further events from the specified device that had
* previously been enabled using a call to {@link #LeapSubscribeEvents(Pointer, Pointer)}.
* </p>
*
* @param hConnection The connection handle created by
* {@link #LeapCreateConnection(LEAP_CONNECTION_CONFIG, LEAP_CONNECTION)
* LeapCreateConnection()}. Use {@link LEAP_CONNECTION#handle} to obtain the
* handle from the connection object.
* @param hDevice The device handle to close. Use {@link LEAP_DEVICE#handle} to obtain
* the handle from the device object.
* @return The operation result code, a member of the {@link eLeapRS} enumeration.
* @since LeapJna 1.2.0
* @since Ultraleap Gemini SDK 5.4.0
*/
public eLeapRS LeapUnsubscribeEvents(Pointer hConnection, Pointer hDevice);
/**
*
* Returns the version of a specified part of the system.
*
* If an invalid connection handle is provided only the version details of the client
* will be available.
*
* @param hConnection The connection handle created by
* {@link #LeapCreateConnection(LEAP_CONNECTION_CONFIG, LEAP_CONNECTION)
* LeapCreateConnection()}. Use {@link LEAP_CONNECTION#handle} to obtain the
* handle from the connection object.
* @param versionPart The version part to return, this will reference one part of the
* system. A member of the {@link eLeapVersionPart} enumeration.
* @param pVersion A pointer to a struct used to store the version number.
* @returns The operation result code, a member of the {@link eLeapRS} enumeration.
* @see <a href=
* "https://docs.ultraleap.com/tracking-api/group/group___functions.html#_CPPv414LeapGetVersion15LEAP_CONNECTION16eLeapVersionPartP12LEAP_VERSION">LeapC
* API - LeapGetVersion</a>
* @since LeapJna 1.2.0
* @since Ultraleap Gemini SDK 5.2.0
*/
public eLeapRS LeapGetVersion(Pointer hConnection, int versionPart, LEAP_VERSION pVersion);
/**
* <p>
* Retrieves the number of bytes required to allocate an interpolated frame at the
* specified time.
* </p>
* <p>
* Use this function to determine the size of the buffer to allocate when calling
* {@link #LeapInterpolateFrame(Pointer, long, LEAP_TRACKING_EVENT, long)}.
* </p>
*
* @param hConnection The connection handle created by
* {@link #LeapCreateConnection(LEAP_CONNECTION_CONFIG, LEAP_CONNECTION)
* LeapCreateConnection()}. Use {@link LEAP_CONNECTION#handle} to obtain the
* handle from the connection object.
* @param timestamp The timestamp of the frame whose size is to be queried.
* @param pncbEvent A pointer that receives the number of bytes required to store the
* specified frame.
* @return The operation result code, a member of the {@link eLeapRS} enumeration.
* @see <a href=
* "https://docs.ultraleap.com/tracking-api/group/group___functions.html#_CPPv414LeapGetVersion15LEAP_CONNECTION16eLeapVersionPartP12LEAP_VERSION">LeapC
* API - LeapGetFrameSize</a>
* @since LeapJna 1.0.0
* @since Ultraleap Orion SDK 3.1.1
*/
public eLeapRS LeapGetFrameSize(Pointer hConnection, long timestamp, LongByReference pncbEvent);
/**
* <p>
* Retrieves the number of bytes required to allocate an interpolated frame at the
* specified time for a particular device.
* </p>
* <p>
* Use this function to determine the size of the buffer to allocate when calling
* {@link #LeapInterpolateFrameEx(Pointer, long, LEAP_TRACKING_EVENT, long)}.
* </p>
*
* @param hConnection The connection handle created by
* {@link #LeapCreateConnection(LEAP_CONNECTION_CONFIG, LEAP_CONNECTION)
* LeapCreateConnection()}. Use {@link LEAP_CONNECTION#handle} to obtain the
* handle from the connection object.
* @param hDevice The device handle to close. Use {@link LEAP_DEVICE#handle} to obtain
* the handle from the device object.
* @param timestamp The timestamp of the frame whose size is to be queried.
* @param pncbEvent A pointer that receives the number of bytes required to store the
* specified frame.
* @return The operation result code, a member of the {@link eLeapRS} enumeration.
* @see <a href=
* "https://docs.ultraleap.com/tracking-api/group/group___functions.html#_CPPv418LeapGetFrameSizeEx15LEAP_CONNECTION11LEAP_DEVICE7int64_tP8uint64_t">LeapC
* API - LeapGetFrameSizeEx</a>
* @since LeapJna 1.2.0
*/
public eLeapRS LeapGetFrameSizeEx(Pointer hConnection, Pointer hDevice, long timestamp,
LongByReference pncbEvent);
/**
* <p>
* Constructs a frame at the specified timestamp by interpolating between a frame near
* the timestamp and a frame near the sourceTimestamp.
* </p>
* <p>
* Caller is responsible for allocating a buffer large enough to hold the data of the
* frame. Use {@link #LeapGetFrameSize(Pointer, long, LongByReference)} to calculate the
* minimum size of this buffer.
* </p>
* <p>
* Use {@link #LeapCreateClockRebaser(LEAP_CLOCK_REBASER)},
* {@link #LeapUpdateRebase(Pointer, long, long)}, and
* {@link #LeapRebaseClock(Pointer, long, LongByReference)} to synchronize time
* measurements in the application with time measurements in the Ultraleap Tracking Service.
* This process is required to achieve accurate, smooth interpolation.
* </p>
*
* @param hConnection The connection handle created by
* {@link #LeapCreateConnection(LEAP_CONNECTION_CONFIG, LEAP_CONNECTION)
* LeapCreateConnection()}. Use {@link LEAP_CONNECTION#handle} to obtain the
* handle from the connection object.
* @param timestamp The timestamp to which to interpolate the frame data.
* @param sourceTimestamp The timestamp of the beginning frame from which to interpolate
* the data.
* @param pEvent A <code>LEAP_TRACKING_EVENT</code> with enough allocated memory to fit
* the frame data. Use <code>LeapGetFrameSize</code> to get the required size,
* and then {@link LEAP_TRACKING_EVENT#LEAP_TRACKING_EVENT(int)} to create the
* struct and allocate memory.
* @param ncbEvent The size of the <code>pEvent</code> struct in bytes.
* @return The operation result code, a member of the {@link eLeapRS} enumeration.
* @see <a href=
* "https://docs.ultraleap.com/tracking-api/group/group___functions.html#_CPPv428LeapInterpolateFrameFromTime15LEAP_CONNECTION7int64_t7int64_tP19LEAP_TRACKING_EVENT8uint64_t">LeapC
* API - LeapInterpolateFrameFromTime</a>
* @since LeapJna 1.0.0
* @since Ultraleap Orion SDK 3.1.1
*/
public eLeapRS LeapInterpolateFrameFromTime(Pointer hConnection, long timestamp,
long sourceTimestamp, LEAP_TRACKING_EVENT pEvent, long ncbEvent);
/**
* <p>
* Constructs a frame at the specified timestamp for a particular device by
* interpolating between a frame near the timestamp and a frame near the
* sourceTimestamp.
* </p>
* <p>
* Caller is responsible for allocating a buffer large enough to hold the data of the
* frame. Use {@link #LeapGetFrameSize(Pointer, long, LongByReference)} to calculate the
* minimum size of this buffer.
* </p>
* <p>
* Use {@link #LeapCreateClockRebaser(LEAP_CLOCK_REBASER)},
* {@link #LeapUpdateRebase(Pointer, long, long)}, and
* {@link #LeapRebaseClock(Pointer, long, LongByReference)} to synchronize time
* measurements in the application with time measurements in the Ultraleap Tracking Service.
* This process is required to achieve accurate, smooth interpolation.
* </p>
*
* @param hConnection The connection handle created by
* {@link #LeapCreateConnection(LEAP_CONNECTION_CONFIG, LEAP_CONNECTION)
* LeapCreateConnection()}. Use {@link LEAP_CONNECTION#handle} to obtain the
* handle from the connection object.
* @param hDevice The device handle to close. Use {@link LEAP_DEVICE#handle} to obtain
* the handle from the device object.
* @param timestamp The timestamp to which to interpolate the frame data.
* @param sourceTimestamp The timestamp of the beginning frame from which to interpolate
* the data.
* @param pEvent A <code>LEAP_TRACKING_EVENT</code> with enough allocated memory to fit
* the frame data. Use <code>LeapGetFrameSize</code> to get the required size,
* and then {@link LEAP_TRACKING_EVENT#LEAP_TRACKING_EVENT(int)} to create the
* struct and allocate memory.
* @param ncbEvent The size of the <code>pEvent</code> struct in bytes.
* @return The operation result code, a member of the {@link eLeapRS} enumeration.
* @see <a href=
* "https://docs.ultraleap.com/tracking-api/group/group___functions.html#_CPPv430LeapInterpolateFrameFromTimeEx15LEAP_CONNECTION11LEAP_DEVICE7int64_t7int64_tP19LEAP_TRACKING_EVENT8uint64_t">LeapC
* API - LeapInterpolateFrameFromTimeEx</a>
* @since LeapJna 1.2.0
*/
public eLeapRS LeapInterpolateFrameFromTimeEx(Pointer hConnection, Pointer hDevice,
long timestamp, long sourceTimestamp, LEAP_TRACKING_EVENT pEvent, long ncbEvent);
/**
* <p>
* Constructs a frame at the specified timestamp by interpolating between measured
* frames.
* </p>
* <p>
* Caller is responsible for allocating a buffer large enough to hold the data of the
* frame. Use {@link #LeapGetFrameSize(Pointer, long, LongByReference)} to calculate the
* minimum size of this buffer.
* </p>
* <p>
* Use {@link #LeapCreateClockRebaser(LEAP_CLOCK_REBASER)},
* {@link #LeapUpdateRebase(Pointer, long, long)}, and
* {@link #LeapRebaseClock(Pointer, long, LongByReference)} to synchronize time
* measurements in the application with time measurements in the Ultraleap Tracking Service.
* This process is required to achieve accurate, smooth interpolation.
* </p>
*
* @param hConnection The connection handle created by
* {@link #LeapCreateConnection(LEAP_CONNECTION_CONFIG, LEAP_CONNECTION)
* LeapCreateConnection()}. Use {@link LEAP_CONNECTION#handle} to obtain the
* handle from the connection object.
* @param timestamp The timestamp at which to interpolate the frame data.
* @param pEvent A <code>LEAP_TRACKING_EVENT</code> with enough allocated memory to fit
* the frame data. Use <code>LeapGetFrameSize</code> to get the required size,
* and then {@link LEAP_TRACKING_EVENT#LEAP_TRACKING_EVENT(int)} to create the
* struct and allocate memory.
* @param ncbEvent The size of the <code>pEvent</code> struct in bytes.
* @return The operation result code, a member of the {@link eLeapRS} enumeration.
* @see <a href=
* "https://docs.ultraleap.com/tracking-api/group/group___functions.html#_CPPv420LeapInterpolateFrame15LEAP_CONNECTION7int64_tP19LEAP_TRACKING_EVENT8uint64_t">LeapC
* API - LeapInterpolateFrame</a>
* @since LeapJna 1.0.0
* @since Ultraleap Orion SDK 3.1.1
*/
public eLeapRS LeapInterpolateFrame(Pointer hConnection, long timestamp,
LEAP_TRACKING_EVENT pEvent, long ncbEvent);
/**
* <p>
* Constructs a frame at the specified timestamp for a particular device by
* interpolating between measured frames. frames.
* </p>
* <p>
* Caller is responsible for allocating a buffer large enough to hold the data of the
* frame. Use {@link #LeapGetFrameSizeEx(Pointer, Pointer, long, LongByReference)} to
* calculate the minimum size of this buffer.
* </p>
* <p>
* Use {@link #LeapCreateClockRebaser(LEAP_CLOCK_REBASER)},
* {@link #LeapUpdateRebase(Pointer, long, long)}, and
* {@link #LeapRebaseClock(Pointer, long, LongByReference)} to synchronize time
* measurements in the application with time measurements in the Ultraleap Tracking Service.
* This process is required to achieve accurate, smooth interpolation.
* </p>
*
* @param hConnection The connection handle created by
* {@link #LeapCreateConnection(LEAP_CONNECTION_CONFIG, LEAP_CONNECTION)
* LeapCreateConnection()}. Use {@link LEAP_CONNECTION#handle} to obtain the
* handle from the connection object.
* @param hDevice The device handle to close. Use {@link LEAP_DEVICE#handle} to obtain
* the handle from the device object.
* @param timestamp The timestamp at which to interpolate the frame data.
* @param pEvent A <code>LEAP_TRACKING_EVENT</code> with enough allocated memory to fit
* the frame data. Use <code>LeapGetFrameSize</code> to get the required size,
* and then {@link LEAP_TRACKING_EVENT#LEAP_TRACKING_EVENT(int)} to create the
* struct and allocate memory.
* @param ncbEvent The size of the <code>pEvent</code> struct in bytes.
* @return The operation result code, a member of the {@link eLeapRS} enumeration.
* @see <a href=
* "https://docs.ultraleap.com/tracking-api/group/group___functions.html#_CPPv422LeapInterpolateFrameEx15LEAP_CONNECTION11LEAP_DEVICE7int64_tP19LEAP_TRACKING_EVENT8uint64_t">LeapC
* API - LeapInterpolateFrameEx</a>
* @since LeapJna 1.2.0
*/
public eLeapRS LeapInterpolateFrameEx(Pointer hConnection, Pointer hDevice, long timestamp,
LEAP_TRACKING_EVENT pEvent, long ncbEvent);
/**
* <p>
* Gets the head tracking pose at the specified timestamp by interpolating between
* measured frames.
* </p>
* <p>
* Use {@link #LeapCreateClockRebaser(LEAP_CLOCK_REBASER)},
* {@link #LeapUpdateRebase(Pointer, long, long)}, and
* {@link #LeapRebaseClock(Pointer, long, LongByReference)} to synchronize time
* measurements in the application with time measurements in the Ultraleap Tracking Service.
* This process is required to achieve accurate, smooth interpolation.
* </p>
*
* @param hConnection The connection handle created by
* {@link #LeapCreateConnection(LEAP_CONNECTION_CONFIG, LEAP_CONNECTION)
* LeapCreateConnection()}. Use {@link LEAP_CONNECTION#handle} to obtain the
* handle from the connection object.
* @param timestamp The timestamp at which to interpolate the frame data.
* @param pEvent A pointer to a flat buffer which is filled with an interpolated frame.
* @return The operation result code, a member of the {@link eLeapRS} enumeration.
* @deprecated This function is no longer supported. Calling it will have no effect.
* @see <a href=
* "https://developer.leapmotion.com/documentation/v4/group___functions.html#gab756331205d6ee0cd61708d77d968536">LeapC
* API - LeapInterpolateHeadPose</a>
* @since LeapJna 1.0.0
*/
@Deprecated
public eLeapRS LeapInterpolateHeadPose(Pointer hConnection, long timestamp,
LEAP_HEAD_POSE_EVENT pEvent);
/**
* <p>
* Sets or clears one or more policy flags.
* </p>
* <p>
* Changing policies is asynchronous. After you call this function, a subsequent call to
* {@link #LeapPollConnection(Pointer, int, LEAP_CONNECTION_MESSAGE)} provides a
* {@link LEAP_POLICY_EVENT} containing the current policies, reflecting any changes.
* </p>
* To get the current policies without changes, specify zero for both the set and clear
* parameters. When ready, <code>LeapPollConnection()</code> provides the a
* <code>LEAP_POLICY_EVENT</code> containing the current settings.
* <p>
* The {@link eLeapPolicyFlag} enumeration defines the policy flags.
* </p>
*
* @param hConnection The connection handle created by
* {@link #LeapCreateConnection(LEAP_CONNECTION_CONFIG, LEAP_CONNECTION)
* LeapCreateConnection()}. Use {@link LEAP_CONNECTION#handle} to obtain the
* handle from the connection object.
* @param set A bitwise combination of flags to be set. Set to 0 if not setting any
* flags.
* @param clear A bitwise combination of flags to be cleared. Set to 0 if not clearing
* any flags.
* @return The operation result code, a member of the {@link eLeapRS} enumeration.
* @see eLeapPolicyFlag#createMask(eLeapPolicyFlag...)
* @see <a href=
* "https://docs.ultraleap.com/tracking-api/group/group___functions.html#_CPPv418LeapSetPolicyFlags15LEAP_CONNECTION8uint64_t8uint64_t">LeapC
* API - LeapSetPolicyFlags</a>
* @since LeapJna 1.0.0
* @since Ultraleap Orion SDK 3.0.0
*/
public eLeapRS LeapSetPolicyFlags(Pointer hConnection, long set, long clear);
/**
* <p>
* Sets or clears one or more policy flags for a particular device.
* </p>
* <p>
* Changing policies is asynchronous. After you call this function, a subsequent call to
* {@link #LeapPollConnection(Pointer, int, LEAP_CONNECTION_MESSAGE)} provides a
* {@link LEAP_POLICY_EVENT} containing the current policies, reflecting any changes.
* </p>
* To get the current policies without changes, specify zero for both the set and clear
* parameters. When ready, <code>LeapPollConnection()</code> provides the a
* <code>LEAP_POLICY_EVENT</code> containing the current settings.
* <p>
* The {@link eLeapPolicyFlag} enumeration defines the policy flags.
* </p>
*
* @param hConnection The connection handle created by
* {@link #LeapCreateConnection(LEAP_CONNECTION_CONFIG, LEAP_CONNECTION)
* LeapCreateConnection()}. Use {@link LEAP_CONNECTION#handle} to obtain the
* handle from the connection object.
* @param hDevice The device handle to close. Use {@link LEAP_DEVICE#handle} to obtain
* the handle from the device object.
* @param set A bitwise combination of flags to be set. Set to 0 if not setting any
* flags.
* @param clear A bitwise combination of flags to be cleared. Set to 0 if not clearing
* any flags.
* @return The operation result code, a member of the {@link eLeapRS} enumeration.
* @see eLeapPolicyFlag#createMask(eLeapPolicyFlag...)
* @since LeapJna 1.2.0
* @since Ultraleap Gemini SDK 5.4.0
*/
public eLeapRS LeapSetPolicyFlagsEx(Pointer hConnection, Pointer hDevice, long set, long clear);
/**
* <p>
* Requests a tracking mode.
* </p>
* <p>
* Changing tracking modes is asynchronous. After you call this function, a subsequent
* call to {@link #LeapPollConnection(Pointer, int, LEAP_CONNECTION_MESSAGE)} provides a
* {@link LEAP_POLICY_EVENT} containing the current policies, reflecting any changes.
* </p>
*
* <p>
* The {@link eLeapTrackingMode} enumeration defines the tracking mode.
* </p>
*
* @param hConnection The connection handle created by
* {@link #LeapCreateConnection(LEAP_CONNECTION_CONFIG, LEAP_CONNECTION)
* LeapCreateConnection()}. Use {@link LEAP_CONNECTION#handle} to obtain the
* handle from the connection object.
* @param mode The enum value specifying the requested tracking mode.
* @return The operation result code, a member of the {@link eLeapRS} enumeration.
* @see <a href=
* "https://docs.ultraleap.com/tracking-api/group/group___functions.html#_CPPv419LeapSetTrackingMode15LEAP_CONNECTION17eLeapTrackingMode">LeapC
* API - LeapSetTrackingMode</a>
* @since LeapJna 1.1.0
* @since Ultraleap Gemini SDK 5.0.0
*/
public eLeapRS LeapSetTrackingMode(Pointer hConnection, int mode);
/**
* <p>
* Requests a tracking mode for a particular device.
* </p>
* <p>
* Changing tracking modes is asynchronous. After you call this function, a subsequent
* call to {@link #LeapPollConnection(Pointer, int, LEAP_CONNECTION_MESSAGE)} provides a
* {@link LEAP_POLICY_EVENT} containing the current policies, reflecting any changes.
* </p>
*
* <p>
* The {@link eLeapTrackingMode} enumeration defines the tracking mode.
* </p>
*
* @param hConnection The connection handle created by
* {@link #LeapCreateConnection(LEAP_CONNECTION_CONFIG, LEAP_CONNECTION)
* LeapCreateConnection()}. Use {@link LEAP_CONNECTION#handle} to obtain the
* handle from the connection object.
* @param hDevice The device handle to close. Use {@link LEAP_DEVICE#handle} to obtain
* the handle from the device object.
* @param mode The enum value specifying the requested tracking mode.
* @return The operation result code, a member of the {@link eLeapRS} enumeration.
* @since LeapJna 1.2.0
* @since Ultraleap Gemini SDK 5.4.0
*/
public eLeapRS LeapSetTrackingModeEx(Pointer hConnection, Pointer hDevice, int mode);
/**
* <p>
* Requests the currently set tracking mode.
* </p>
*
* <p>
* Requesting the current tracking mode is asynchronous. After you call this function, a
* subsequent call to {@link #LeapPollConnection(Pointer, int, LEAP_CONNECTION_MESSAGE)}
* provides a {@link LEAP_TRACKING_MODE_EVENT} containing the current tracking mode,
* reflecting any changes.
* </p>
*
* <p>
* The {@link eLeapTrackingMode} enumeration defines the tracking mode.
* </p>
*
* @param hConnection The connection handle created by
* {@link #LeapCreateConnection(LEAP_CONNECTION_CONFIG, LEAP_CONNECTION)
* LeapCreateConnection()}. Use {@link LEAP_CONNECTION#handle} to obtain the
* handle from the connection object.
* @return The operation result code, a member of the {@link eLeapRS} enumeration.
* @see <a href=
* "https://docs.ultraleap.com/tracking-api/group/group___functions.html#_CPPv419LeapGetTrackingMode15LEAP_CONNECTION">LeapC
* API - LeapGetTrackingMode</a>
* @since LeapJna 1.2.0
*/
public eLeapRS LeapGetTrackingMode(Pointer hConnection);
/**
* <p>
* Requests the currently set tracking mode.
* </p>
*
* <p>
* Requesting the current tracking mode is asynchronous. After you call this function, a
* subsequent call to {@link #LeapPollConnection(Pointer, int, LEAP_CONNECTION_MESSAGE)}
* provides a {@link LEAP_TRACKING_MODE_EVENT} containing the current tracking mode,
* reflecting any changes.
* </p>
*
* <p>
* The {@link eLeapTrackingMode} enumeration defines the tracking mode.
* </p>
*
* @param hConnection The connection handle created by
* {@link #LeapCreateConnection(LEAP_CONNECTION_CONFIG, LEAP_CONNECTION)
* LeapCreateConnection()}. Use {@link LEAP_CONNECTION#handle} to obtain the
* handle from the connection object.
* @param hDevice The device handle to close. Use {@link LEAP_DEVICE#handle} to obtain
* the handle from the device object.
* @return The operation result code, a member of the {@link eLeapRS} enumeration.
* @since LeapJna 1.2.0
* @since Ultraleap Gemini SDK 5.4.0
*/
public eLeapRS LeapGetTrackingModeEx(Pointer hConnection, Pointer hDevice);
/**
* <p>
* Pauses the service.
* </p>
* <p>
* Attempts to pause or unpause the service depending on the argument. This is treated
* as a 'user pause', as though a user had requested a pause through the Leap Control
* Panel. The connection must have the {@link eLeapPolicyFlag#AllowPauseResume} policy
* set or it will fail with {@link eLeapRS#InvalidArgument}.
* </p>
*
* @param hConnection The connection handle created by
* {@link #LeapCreateConnection(LEAP_CONNECTION_CONFIG, LEAP_CONNECTION)
* LeapCreateConnection()}. Use {@link LEAP_CONNECTION#handle} to obtain the
* handle from the connection object.
* @param pause Set to '<code>1</code>' to pause, or '<code>0</code>' to unpause
* @return The operation result code, a member of the {@link eLeapRS} enumeration.
* @see <a href=
* "https://docs.ultraleap.com/tracking-api/group/group___functions.html#_CPPv412LeapSetPause15LEAP_CONNECTIONb">LeapC
* API - LeapSetPause</a>
* @since LeapJna 1.0.0
* @since Ultraleap Orion SDK 4.0.0
*/
public eLeapRS LeapSetPause(Pointer hConnection, int pause);
/**
* <p>
* Requests the current value of a service configuration setting.
* </p>
* <p>
* The value is fetched asynchronously since it requires a service transaction.
* {@link #LeapPollConnection(Pointer, int, LEAP_CONNECTION_MESSAGE)} returns a
* {@link LEAP_CONFIG_RESPONSE_EVENT} structure when the request has been processed. Use
* the <code>pRequestID</code> value to correlate the response to the originating