diff options
author | Henry Fang <quxiangfang@google.com> | 2019-02-01 15:17:39 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2019-02-01 15:17:39 +0000 |
commit | 3ef35e4b4e7351a83ef535c4715eece8087d9d6c (patch) | |
tree | 4a8c7514e160380d4d562c1303de0ea58b13d622 /headers | |
parent | b5b0f66cd637880a8c11a1a7b6210b147494e287 (diff) | |
parent | fc2d0de03f80fe23516dc898ec1144a113374c9e (diff) |
Merge "Revert "Revert "Add plugin API to use cas@1.1 new interface"""
Diffstat (limited to 'headers')
-rw-r--r-- | headers/media_plugin/media/cas/CasAPI.h | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/headers/media_plugin/media/cas/CasAPI.h b/headers/media_plugin/media/cas/CasAPI.h index 4de314dca4..c87ee5655e 100644 --- a/headers/media_plugin/media/cas/CasAPI.h +++ b/headers/media_plugin/media/cas/CasAPI.h @@ -48,6 +48,14 @@ typedef void (*CasPluginCallback)( uint8_t *data, size_t size); +typedef void (*CasPluginCallbackExt)( + void *appData, + int32_t event, + int32_t arg, + uint8_t *data, + size_t size, + const CasSessionId *sessionId); + struct CasFactory { CasFactory() {} virtual ~CasFactory() {} @@ -67,6 +75,13 @@ struct CasFactory { CasPluginCallback callback, CasPlugin **plugin) = 0; + // Construct a new extend instance of a CasPlugin given a CA_system_id + virtual status_t createPlugin( + int32_t CA_system_id, + void *appData, + CasPluginCallbackExt callback, + CasPlugin **plugin) = 0; + private: CasFactory(const CasFactory &); CasFactory &operator=(const CasFactory &); /* NOLINT */ @@ -110,7 +125,15 @@ struct CasPlugin { int32_t arg, const CasData &eventData) = 0; - // Native implementation of the MediaCas Java API provision method. + // Deliver an session event to the CasPlugin. The format of the event is + // specific to the CA scheme and is opaque to the framework. + virtual status_t sendSessionEvent( + const CasSessionId &sessionId, + int32_t event, + int32_t arg, + const CasData &eventData) = 0; + + // Native implementation of the MediaCas Java API provision method. virtual status_t provision( const String8 &provisionString) = 0; |