HDCP.h revision 1b19c9d120869c3182373a9b06a1ed98898df882
1/*
2 * Copyright (C) 2012 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 HDCP_H_
18
19#define HDCP_H_
20
21#include <media/IHDCP.h>
22
23namespace android {
24
25struct HDCP : public BnHDCP {
26    HDCP();
27    virtual ~HDCP();
28
29    virtual status_t setObserver(const sp<IHDCPObserver> &observer);
30    virtual status_t initAsync(const char *host, unsigned port);
31    virtual status_t shutdownAsync();
32
33    virtual status_t encrypt(
34            const void *inData, size_t size, uint32_t streamCTR,
35            uint64_t *outInputCTR, void *outData);
36
37private:
38    void *mLibHandle;
39    HDCPModule *mHDCPModule;
40    sp<IHDCPObserver> mObserver;
41
42    DISALLOW_EVIL_CONSTRUCTORS(HDCP);
43};
44
45}  // namespace android
46
47#endif  // HDCP_H_
48
49