111e8d335b1da528ee771b19b63df23ae6fd52f41Phil Burk/*
211e8d335b1da528ee771b19b63df23ae6fd52f41Phil Burk * Copyright (C) 2017 The Android Open Source Project
311e8d335b1da528ee771b19b63df23ae6fd52f41Phil Burk *
411e8d335b1da528ee771b19b63df23ae6fd52f41Phil Burk * Licensed under the Apache License, Version 2.0 (the "License");
511e8d335b1da528ee771b19b63df23ae6fd52f41Phil Burk * you may not use this file except in compliance with the License.
611e8d335b1da528ee771b19b63df23ae6fd52f41Phil Burk * You may obtain a copy of the License at
711e8d335b1da528ee771b19b63df23ae6fd52f41Phil Burk *
811e8d335b1da528ee771b19b63df23ae6fd52f41Phil Burk *      http://www.apache.org/licenses/LICENSE-2.0
911e8d335b1da528ee771b19b63df23ae6fd52f41Phil Burk *
1011e8d335b1da528ee771b19b63df23ae6fd52f41Phil Burk * Unless required by applicable law or agreed to in writing, software
1111e8d335b1da528ee771b19b63df23ae6fd52f41Phil Burk * distributed under the License is distributed on an "AS IS" BASIS,
1211e8d335b1da528ee771b19b63df23ae6fd52f41Phil Burk * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1311e8d335b1da528ee771b19b63df23ae6fd52f41Phil Burk * See the License for the specific language governing permissions and
1411e8d335b1da528ee771b19b63df23ae6fd52f41Phil Burk * limitations under the License.
1511e8d335b1da528ee771b19b63df23ae6fd52f41Phil Burk */
1611e8d335b1da528ee771b19b63df23ae6fd52f41Phil Burk
1711e8d335b1da528ee771b19b63df23ae6fd52f41Phil Burk#ifndef ANDROID_AAUDIO_IAAUDIO_CLIENT_H
1811e8d335b1da528ee771b19b63df23ae6fd52f41Phil Burk#define ANDROID_AAUDIO_IAAUDIO_CLIENT_H
1911e8d335b1da528ee771b19b63df23ae6fd52f41Phil Burk
2011e8d335b1da528ee771b19b63df23ae6fd52f41Phil Burk#include <stdint.h>
2111e8d335b1da528ee771b19b63df23ae6fd52f41Phil Burk#include <binder/IInterface.h>
2211e8d335b1da528ee771b19b63df23ae6fd52f41Phil Burk
2311e8d335b1da528ee771b19b63df23ae6fd52f41Phil Burk#include <aaudio/AAudio.h>
2411e8d335b1da528ee771b19b63df23ae6fd52f41Phil Burk
25523b3047af443d0a51141ddabd328d52be5a23b0Phil Burk#include "binding/AAudioCommon.h"
2611e8d335b1da528ee771b19b63df23ae6fd52f41Phil Burk
2711e8d335b1da528ee771b19b63df23ae6fd52f41Phil Burknamespace android {
2811e8d335b1da528ee771b19b63df23ae6fd52f41Phil Burk
2911e8d335b1da528ee771b19b63df23ae6fd52f41Phil Burk
3011e8d335b1da528ee771b19b63df23ae6fd52f41Phil Burk// Interface (our AIDL) - client methods called by service
3111e8d335b1da528ee771b19b63df23ae6fd52f41Phil Burkclass IAAudioClient : public IInterface {
3211e8d335b1da528ee771b19b63df23ae6fd52f41Phil Burkpublic:
3311e8d335b1da528ee771b19b63df23ae6fd52f41Phil Burk
3411e8d335b1da528ee771b19b63df23ae6fd52f41Phil Burk    DECLARE_META_INTERFACE(AAudioClient);
3511e8d335b1da528ee771b19b63df23ae6fd52f41Phil Burk
36523b3047af443d0a51141ddabd328d52be5a23b0Phil Burk    virtual void onStreamChange(aaudio::aaudio_handle_t handle, int32_t opcode, int32_t value) = 0;
3711e8d335b1da528ee771b19b63df23ae6fd52f41Phil Burk
3811e8d335b1da528ee771b19b63df23ae6fd52f41Phil Burk};
3911e8d335b1da528ee771b19b63df23ae6fd52f41Phil Burk
4011e8d335b1da528ee771b19b63df23ae6fd52f41Phil Burkclass BnAAudioClient : public BnInterface<IAAudioClient> {
4111e8d335b1da528ee771b19b63df23ae6fd52f41Phil Burkpublic:
4211e8d335b1da528ee771b19b63df23ae6fd52f41Phil Burk    virtual status_t onTransact(uint32_t code, const Parcel& data,
4311e8d335b1da528ee771b19b63df23ae6fd52f41Phil Burk                                Parcel* reply, uint32_t flags = 0);
4411e8d335b1da528ee771b19b63df23ae6fd52f41Phil Burk};
4511e8d335b1da528ee771b19b63df23ae6fd52f41Phil Burk
4611e8d335b1da528ee771b19b63df23ae6fd52f41Phil Burk} /* namespace android */
4711e8d335b1da528ee771b19b63df23ae6fd52f41Phil Burk
4811e8d335b1da528ee771b19b63df23ae6fd52f41Phil Burk#endif //ANDROID_AAUDIO_IAAUDIO_SERVICE_H
49