1/* 2 * Copyright (C) 2010 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 __IDRM_SERVICE_LISTENER_H__ 18#define __IDRM_SERVICE_LISTENER_H__ 19 20#include <utils/RefBase.h> 21#include <binder/IInterface.h> 22#include <binder/Parcel.h> 23 24namespace android { 25 26class DrmInfoEvent; 27 28/** 29 * This is the interface class for DRM service listener. 30 * 31 */ 32class IDrmServiceListener : public IInterface 33{ 34public: 35 enum { 36 NOTIFY = IBinder::FIRST_CALL_TRANSACTION, 37 }; 38 39public: 40 DECLARE_META_INTERFACE(DrmServiceListener); 41 42public: 43 virtual status_t notify(const DrmInfoEvent& event) = 0; 44}; 45 46/** 47 * This is the Binder implementation class for DRM service listener. 48 */ 49class BpDrmServiceListener: public BpInterface<IDrmServiceListener> 50{ 51public: 52 BpDrmServiceListener(const sp<IBinder>& impl) 53 : BpInterface<IDrmServiceListener>(impl) {} 54 55 virtual status_t notify(const DrmInfoEvent& event); 56}; 57 58/** 59 * This is the Binder implementation class for DRM service listener. 60 */ 61class BnDrmServiceListener: public BnInterface<IDrmServiceListener> 62{ 63public: 64 virtual status_t onTransact( 65 uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags = 0); 66}; 67 68}; 69 70#endif /* __IDRM_SERVICE_LISTENER_H__ */ 71 72