1/*
2 * Copyright (C) 2017 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_HARDWARE_CAS_V1_0_SHARED_LIBRARY_H_
18#define ANDROID_HARDWARE_CAS_V1_0_SHARED_LIBRARY_H_
19
20#include <utils/RefBase.h>
21#include <utils/String8.h>
22#include <media/stagefright/foundation/ABase.h>
23
24namespace android {
25namespace hardware {
26namespace cas {
27namespace V1_0 {
28namespace implementation {
29
30class SharedLibrary : public RefBase {
31public:
32    explicit SharedLibrary(const String8 &path);
33    ~SharedLibrary();
34
35    bool operator!() const;
36    void *lookup(const char *symbol) const;
37    const char *lastError() const;
38
39private:
40    void *mLibHandle;
41    DISALLOW_EVIL_CONSTRUCTORS(SharedLibrary);
42};
43
44}  // namespace implementation
45}  // namespace V1_0
46}  // namespace cas
47}  // namespace hardware
48}  // namespace android
49
50#endif // ANDROID_HARDWARE_CAS_V1_0_SHARED_LIBRARY_H_
51