blob: caf1d752b70e7f88b3c1efe28ca66ba3f1b8cf14 [file] [log] [blame]
Marco Nelissen08b9e2d2014-12-16 12:46:34 -08001/*
2 * Copyright (C) 2014 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 MIDI_IO_WRAPPER_H_
18#define MIDI_IO_WRAPPER_H_
19
20#include <libsonivox/eas_types.h>
21
22namespace android {
23
24class MidiIoWrapper : public RefBase {
25public:
26 MidiIoWrapper(const char *path);
27 MidiIoWrapper(int fd, off64_t offset, int64_t size);
28
29 ~MidiIoWrapper();
30
31 int readAt(void *buffer, int offset, int size);
32 int size();
33
34 EAS_FILE_LOCATOR getLocator();
35
36private:
37 int mFd;
38 off64_t mBase;
39 int64_t mLength;
40 EAS_FILE mEasFile;
41};
42
43
44} // namespace android
45
46#endif // MIDI_IO_WRAPPER_H_