-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlistCom_java.h
62 lines (45 loc) · 1011 Bytes
/
listCom_java.h
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
//
// listCom.h
// listCom
//
// Created by Angelo Scialabba on 11/13/13.
//
//
#ifndef __listCom__listCom__
#define __listCom__listCom__
#ifdef WIN
#include <iostream>
#include <stdio.h>
#include <windows.h>
#include <setupapi.h>
#include <devguid.h>
#include <regstr.h>
#include <jni.h>
#elif defined(MAC)
#include <iostream>
#include <JavaVM/jni.h>
#else
#warning No platform specified
#endif
#define MAXPATHLEN 1024
typedef struct SerialDevice {
char port[MAXPATHLEN];
char locationId[MAXPATHLEN];
char vendorId[MAXPATHLEN];
char productId[MAXPATHLEN];
char manufacturer[MAXPATHLEN];
char serialNumber[MAXPATHLEN];
} stSerialDevice;
typedef struct DeviceListItem {
struct SerialDevice value;
struct DeviceListItem *next;
int* length;
} stDeviceListItem;
#ifdef __cplusplus
extern "C" {
#endif
JNIEXPORT jobjectArray JNICALL Java_cc_arduino_packages_discoverers_SerialLister_serialPortList(JNIEnv *env, jobject obj);
#ifdef __cplusplus
}
#endif
#endif