10008a48aadba9d59b1d72586224d0a5afb9fb684Jean-Michel Trivi/* 20008a48aadba9d59b1d72586224d0a5afb9fb684Jean-Michel Trivi * Copyright (C) 2016 The Android Open Source Project 30008a48aadba9d59b1d72586224d0a5afb9fb684Jean-Michel Trivi * 40008a48aadba9d59b1d72586224d0a5afb9fb684Jean-Michel Trivi * Licensed under the Apache License, Version 2.0 (the "License"); 50008a48aadba9d59b1d72586224d0a5afb9fb684Jean-Michel Trivi * you may not use this file except in compliance with the License. 60008a48aadba9d59b1d72586224d0a5afb9fb684Jean-Michel Trivi * You may obtain a copy of the License at 70008a48aadba9d59b1d72586224d0a5afb9fb684Jean-Michel Trivi * 80008a48aadba9d59b1d72586224d0a5afb9fb684Jean-Michel Trivi * http://www.apache.org/licenses/LICENSE-2.0 90008a48aadba9d59b1d72586224d0a5afb9fb684Jean-Michel Trivi * 100008a48aadba9d59b1d72586224d0a5afb9fb684Jean-Michel Trivi * Unless required by applicable law or agreed to in writing, software 110008a48aadba9d59b1d72586224d0a5afb9fb684Jean-Michel Trivi * distributed under the License is distributed on an "AS IS" BASIS, 120008a48aadba9d59b1d72586224d0a5afb9fb684Jean-Michel Trivi * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 130008a48aadba9d59b1d72586224d0a5afb9fb684Jean-Michel Trivi * See the License for the specific language governing permissions and 140008a48aadba9d59b1d72586224d0a5afb9fb684Jean-Michel Trivi * limitations under the License. 150008a48aadba9d59b1d72586224d0a5afb9fb684Jean-Michel Trivi */ 160008a48aadba9d59b1d72586224d0a5afb9fb684Jean-Michel Trivi 170008a48aadba9d59b1d72586224d0a5afb9fb684Jean-Michel Trivi#ifndef ANDROID_IAUDIOMANAGER_H 180008a48aadba9d59b1d72586224d0a5afb9fb684Jean-Michel Trivi#define ANDROID_IAUDIOMANAGER_H 190008a48aadba9d59b1d72586224d0a5afb9fb684Jean-Michel Trivi 200008a48aadba9d59b1d72586224d0a5afb9fb684Jean-Michel Trivi#include <utils/Errors.h> 210008a48aadba9d59b1d72586224d0a5afb9fb684Jean-Michel Trivi#include <binder/IInterface.h> 220008a48aadba9d59b1d72586224d0a5afb9fb684Jean-Michel Trivi#include <hardware/power.h> 230008a48aadba9d59b1d72586224d0a5afb9fb684Jean-Michel Trivi#include <system/audio.h> 240008a48aadba9d59b1d72586224d0a5afb9fb684Jean-Michel Trivi 250008a48aadba9d59b1d72586224d0a5afb9fb684Jean-Michel Trivinamespace android { 260008a48aadba9d59b1d72586224d0a5afb9fb684Jean-Michel Trivi 270008a48aadba9d59b1d72586224d0a5afb9fb684Jean-Michel Trivi// ---------------------------------------------------------------------------- 280008a48aadba9d59b1d72586224d0a5afb9fb684Jean-Michel Trivi 290008a48aadba9d59b1d72586224d0a5afb9fb684Jean-Michel Triviclass IAudioManager : public IInterface 300008a48aadba9d59b1d72586224d0a5afb9fb684Jean-Michel Trivi{ 310008a48aadba9d59b1d72586224d0a5afb9fb684Jean-Michel Trivipublic: 320008a48aadba9d59b1d72586224d0a5afb9fb684Jean-Michel Trivi // These transaction IDs must be kept in sync with the method order from 330008a48aadba9d59b1d72586224d0a5afb9fb684Jean-Michel Trivi // IAudioService.aidl. 340008a48aadba9d59b1d72586224d0a5afb9fb684Jean-Michel Trivi enum { 35ef694223510cb1873fd04583a60525ef174f93a8Mikhail Naganov TRACK_PLAYER = IBinder::FIRST_CALL_TRANSACTION, 36ef694223510cb1873fd04583a60525ef174f93a8Mikhail Naganov PLAYER_ATTRIBUTES = IBinder::FIRST_CALL_TRANSACTION + 1, 37ef694223510cb1873fd04583a60525ef174f93a8Mikhail Naganov PLAYER_EVENT = IBinder::FIRST_CALL_TRANSACTION + 2, 38ef694223510cb1873fd04583a60525ef174f93a8Mikhail Naganov RELEASE_PLAYER = IBinder::FIRST_CALL_TRANSACTION + 3, 390008a48aadba9d59b1d72586224d0a5afb9fb684Jean-Michel Trivi }; 400008a48aadba9d59b1d72586224d0a5afb9fb684Jean-Michel Trivi 410008a48aadba9d59b1d72586224d0a5afb9fb684Jean-Michel Trivi DECLARE_META_INTERFACE(AudioManager) 420008a48aadba9d59b1d72586224d0a5afb9fb684Jean-Michel Trivi 430008a48aadba9d59b1d72586224d0a5afb9fb684Jean-Michel Trivi // The parcels created by these methods must be kept in sync with the 440008a48aadba9d59b1d72586224d0a5afb9fb684Jean-Michel Trivi // corresponding methods from IAudioService.aidl and objects it imports. 4563189325cc429140b14885061eb67d9c771b96a4Jean-Michel Trivi virtual audio_unique_id_t trackPlayer(player_type_t playerType, audio_usage_t usage, 4663189325cc429140b14885061eb67d9c771b96a4Jean-Michel Trivi audio_content_type_t content, const sp<IBinder>& player) = 0; 4763189325cc429140b14885061eb67d9c771b96a4Jean-Michel Trivi /*oneway*/ virtual status_t playerAttributes(audio_unique_id_t piid, audio_usage_t usage, 4863189325cc429140b14885061eb67d9c771b96a4Jean-Michel Trivi audio_content_type_t content)= 0; 4963189325cc429140b14885061eb67d9c771b96a4Jean-Michel Trivi /*oneway*/ virtual status_t playerEvent(audio_unique_id_t piid, player_state_t event) = 0; 5063189325cc429140b14885061eb67d9c771b96a4Jean-Michel Trivi /*oneway*/ virtual status_t releasePlayer(audio_unique_id_t piid) = 0; 510008a48aadba9d59b1d72586224d0a5afb9fb684Jean-Michel Trivi}; 520008a48aadba9d59b1d72586224d0a5afb9fb684Jean-Michel Trivi 530008a48aadba9d59b1d72586224d0a5afb9fb684Jean-Michel Trivi// ---------------------------------------------------------------------------- 540008a48aadba9d59b1d72586224d0a5afb9fb684Jean-Michel Trivi 550008a48aadba9d59b1d72586224d0a5afb9fb684Jean-Michel Trivi}; // namespace android 560008a48aadba9d59b1d72586224d0a5afb9fb684Jean-Michel Trivi 570008a48aadba9d59b1d72586224d0a5afb9fb684Jean-Michel Trivi#endif // ANDROID_IAUDIOMANAGER_H 58