Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fc2d0de0 authored by Henry Fang's avatar Henry Fang
Browse files

Revert "Revert "Add plugin API to use cas@1.1 new interface""

This reverts commit 18aa6733.

Reason for revert: <This CL isn't related to public API which triggered previous revert>

Change-Id: Icddf41abd76a4bd63dd2b67d6ee732d9642ac94a
parent 18aa6733
Loading
Loading
Loading
Loading
+24 −1
Original line number Diff line number Diff line
@@ -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,6 +125,14 @@ struct CasPlugin {
            int32_t arg,
            const CasData &eventData) = 0;

    // 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;