• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
24 namespace android {
25 
26 class DrmInfoEvent;
27 
28 /**
29  * This is the interface class for DRM service listener.
30  *
31  */
32 class IDrmServiceListener : public IInterface
33 {
34 public:
35     enum {
36         NOTIFY = IBinder::FIRST_CALL_TRANSACTION,
37     };
38 
39 public:
40     DECLARE_META_INTERFACE(DrmServiceListener);
41 
42 public:
43     virtual status_t notify(const DrmInfoEvent& event) = 0;
44 };
45 
46 /**
47  * This is the Binder implementation class for DRM service listener.
48  */
49 class BpDrmServiceListener: public BpInterface<IDrmServiceListener>
50 {
51 public:
BpDrmServiceListener(const sp<IBinder> & impl)52     explicit 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  */
61 class BnDrmServiceListener: public BnInterface<IDrmServiceListener>
62 {
63 public:
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