Debian Codegraph @

media/native/midi/amidi_internal.h

raw symbols SCIP
1 /*
2 * Copyright (C) 2018 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 #ifndef ANDROID_MEDIA_AMIDI_INTERNAL_H_
18 #define ANDROID_MEDIA_AMIDI_INTERNAL_H_
19
20 #include <jni.h>
21
22 #include "android/media/midi/BpMidiDeviceServer.h"
23
24 typedef struct {
25 int32_t type; /* one of AMIDI_DEVICE_TYPE_* constants */
26 int32_t inputPortCount; /* number of input (send) ports associated with the device */
27 int32_t outputPortCount; /* number of output (received) ports associated with the device */
28 int32_t defaultProtocol; /* one of the AMIDI_DEVICE_PROTOCOL_* constants */
29 } AMidiDeviceInfo;
30
31 struct AMidiDevice {
32 android::sp<android::media::midi::BpMidiDeviceServer>
33 server; /* The Binder interface to the MIDI server (from the Java MidiDevice) */
34 int32_t deviceId; /* The integer id of the device assigned in the Java API */
35 JavaVM* javaVM; /* The Java VM (so we can obtain the JNIEnv in the
36 AMidiDevice_close function) */
37 jobject midiDeviceObj; /* NewGlobalRef() reference to the Java MidiDevice associated with
38 this native AMidiDevice. */
39 AMidiDeviceInfo deviceInfo; /* Attributes of the device. */
40 };
41
42 #endif // ANDROID_MEDIA_AMIDI_INTERNAL_H_