HDCP.h revision efbb781c15abf8e085f5ab8d39710bd58ea0b6e4
1395e9b8db245f7638c1c79e97d8ee56be91614dbJohn Reck/* 2395e9b8db245f7638c1c79e97d8ee56be91614dbJohn Reck * Copyright (C) 2012 The Android Open Source Project 3395e9b8db245f7638c1c79e97d8ee56be91614dbJohn Reck * 4395e9b8db245f7638c1c79e97d8ee56be91614dbJohn Reck * Licensed under the Apache License, Version 2.0 (the "License"); 5395e9b8db245f7638c1c79e97d8ee56be91614dbJohn Reck * you may not use this file except in compliance with the License. 6395e9b8db245f7638c1c79e97d8ee56be91614dbJohn Reck * You may obtain a copy of the License at 7395e9b8db245f7638c1c79e97d8ee56be91614dbJohn Reck * 8395e9b8db245f7638c1c79e97d8ee56be91614dbJohn Reck * http://www.apache.org/licenses/LICENSE-2.0 9395e9b8db245f7638c1c79e97d8ee56be91614dbJohn Reck * 10395e9b8db245f7638c1c79e97d8ee56be91614dbJohn Reck * Unless required by applicable law or agreed to in writing, software 11395e9b8db245f7638c1c79e97d8ee56be91614dbJohn Reck * distributed under the License is distributed on an "AS IS" BASIS, 12395e9b8db245f7638c1c79e97d8ee56be91614dbJohn Reck * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13395e9b8db245f7638c1c79e97d8ee56be91614dbJohn Reck * See the License for the specific language governing permissions and 14395e9b8db245f7638c1c79e97d8ee56be91614dbJohn Reck * limitations under the License. 15395e9b8db245f7638c1c79e97d8ee56be91614dbJohn Reck */ 16395e9b8db245f7638c1c79e97d8ee56be91614dbJohn Reck 17395e9b8db245f7638c1c79e97d8ee56be91614dbJohn Reck#ifndef HDCP_H_ 18395e9b8db245f7638c1c79e97d8ee56be91614dbJohn Reck 192cbbd8d3ab8de2937ffff753311876c786176b1bChris Craik#define HDCP_H_ 20395e9b8db245f7638c1c79e97d8ee56be91614dbJohn Reck 21395e9b8db245f7638c1c79e97d8ee56be91614dbJohn Reck#include <media/IHDCP.h> 22395e9b8db245f7638c1c79e97d8ee56be91614dbJohn Reck 232cbbd8d3ab8de2937ffff753311876c786176b1bChris Craiknamespace android { 24395e9b8db245f7638c1c79e97d8ee56be91614dbJohn Reck 25395e9b8db245f7638c1c79e97d8ee56be91614dbJohn Reckstruct HDCP : public BnHDCP { 26395e9b8db245f7638c1c79e97d8ee56be91614dbJohn Reck HDCP(); 27395e9b8db245f7638c1c79e97d8ee56be91614dbJohn Reck virtual ~HDCP(); 28395e9b8db245f7638c1c79e97d8ee56be91614dbJohn Reck 292cbbd8d3ab8de2937ffff753311876c786176b1bChris Craik virtual status_t setObserver(const sp<IHDCPObserver> &observer); 302cbbd8d3ab8de2937ffff753311876c786176b1bChris Craik virtual status_t initAsync(const char *host, unsigned port); 31395e9b8db245f7638c1c79e97d8ee56be91614dbJohn Reck virtual status_t shutdownAsync(); 32395e9b8db245f7638c1c79e97d8ee56be91614dbJohn Reck 33395e9b8db245f7638c1c79e97d8ee56be91614dbJohn Reck virtual status_t encrypt( 34395e9b8db245f7638c1c79e97d8ee56be91614dbJohn Reck const void *inData, size_t size, uint32_t streamCTR, 35395e9b8db245f7638c1c79e97d8ee56be91614dbJohn Reck uint64_t *outInputCTR, void *outData); 36395e9b8db245f7638c1c79e97d8ee56be91614dbJohn Reck 37395e9b8db245f7638c1c79e97d8ee56be91614dbJohn Reckprivate: 383acf0382da22cda88234e599cd81b1ff5441cc35John Reck void *mLibHandle; 393acf0382da22cda88234e599cd81b1ff5441cc35John Reck HDCPModule *mHDCPModule; 40395e9b8db245f7638c1c79e97d8ee56be91614dbJohn Reck sp<IHDCPObserver> mObserver; 41395e9b8db245f7638c1c79e97d8ee56be91614dbJohn Reck 42395e9b8db245f7638c1c79e97d8ee56be91614dbJohn Reck static void ObserveWrapper(void *me, int msg, int ext1, int ext2); 43395e9b8db245f7638c1c79e97d8ee56be91614dbJohn Reck void observe(int msg, int ext1, int ext2); 44395e9b8db245f7638c1c79e97d8ee56be91614dbJohn Reck 453acf0382da22cda88234e599cd81b1ff5441cc35John Reck DISALLOW_EVIL_CONSTRUCTORS(HDCP); 463acf0382da22cda88234e599cd81b1ff5441cc35John Reck}; 473acf0382da22cda88234e599cd81b1ff5441cc35John Reck 483acf0382da22cda88234e599cd81b1ff5441cc35John Reck} // namespace android 493acf0382da22cda88234e599cd81b1ff5441cc35John Reck 503acf0382da22cda88234e599cd81b1ff5441cc35John Reck#endif // HDCP_H_ 513acf0382da22cda88234e599cd81b1ff5441cc35John Reck 523acf0382da22cda88234e599cd81b1ff5441cc35John Reck